:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f2f2f7;
  --surface-elevated: #fbfbfd;
  --ink: #3a3a3c;
  --ink-strong: #2c2c2e;
  --muted: #636366;
  --muted-soft: #8e8e93;
  --line: rgba(60, 60, 67, 0.18);
  --border: var(--line);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.18);
  --blue: #3a3a3c;
  --blue-hover: #2c2c2e;
  --accent: #34c759;
  --accent-2: #ff9500;
  --green: #34c759;
  --danger: #ff3b30;
  --control-bg: #3a3a3c;
  --control-hover: #2c2c2e;
  --control-ink: #f5f5f7;
  --device-frame: #48484a;
  --focus-ring: rgba(52, 199, 89, 0.2);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-soft: #2c2c2e;
  --surface-elevated: #242426;
  --ink: #f2f2f7;
  --ink-strong: #ffffff;
  --muted: #aeaeb2;
  --muted-soft: #8e8e93;
  --line: rgba(84, 84, 88, 0.65);
  --border: var(--line);
  --fill: rgba(120, 120, 128, 0.24);
  --fill-strong: rgba(120, 120, 128, 0.32);
  --blue: #f2f2f7;
  --blue-hover: #ffffff;
  --accent: #30d158;
  --accent-2: #ff9f0a;
  --green: #30d158;
  --danger: #ff5a5f;
  --control-bg: #f2f2f7;
  --control-hover: #ffffff;
  --control-ink: #1c1c1e;
  --device-frame: #111113;
  --focus-ring: rgba(48, 209, 88, 0.24);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 44px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 0 max(22px, calc((100vw - 1024px) / 2));
  background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}

.brand img {
  width: 21px;
  height: 21px;
}

nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-size: 12px;
}

nav a,
.nav-cta,
.text-link {
  color: var(--blue);
  transition: color 0.18s ease;
}

nav a {
  color: var(--muted);
}

nav a:hover,
.nav-cta:hover,
.text-link:hover {
  color: var(--blue-hover);
}

.nav-cta {
  justify-self: end;
  font-size: 12px;
}

.account-entry {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
}

.nav-avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--control-ink);
  background: var(--control-bg);
  font-weight: 800;
}

.nav-avatar {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.nav-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-elevated) 84%, transparent);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.theme-toggle-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
  display: block;
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 15px;
  border-radius: 0 999px 999px 0;
  background: var(--surface);
}

:root[data-theme="dark"] .theme-toggle-icon::after {
  right: auto;
  left: 0;
  border-radius: 999px 0 0 999px;
}

.lang-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.lang-toggle:hover {
  color: var(--blue-hover);
}

main {
  width: 100%;
}

.ribbon {
  margin: 0;
  min-height: 50px;
  padding: 14px 22px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.product-rail {
  min-height: 132px;
  padding: 22px max(22px, calc((100vw - 980px) / 2)) 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 22px;
  overflow-x: auto;
  background: color-mix(in srgb, var(--surface-elevated) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.product-rail a {
  min-width: 88px;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--ink);
  text-align: center;
  font-size: 12px;
}

.rail-icon {
  width: 50px;
  height: 42px;
  position: relative;
  display: block;
}

.desktop-icon::before,
.mac-icon::before {
  content: "";
  position: absolute;
  inset: 4px 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--surface-elevated);
}

.desktop-icon::after,
.mac-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
}

.phone-icon::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 1px;
  width: 19px;
  height: 39px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--surface-elevated);
}

.account-icon::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--surface-elevated);
}

.account-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 25px;
  width: 32px;
  height: 14px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.room-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 23px 0 0 -2px var(--surface-elevated), 23px 0 0 0 var(--ink);
}

.room-icon::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 19px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow:
    0 -5px 0 color-mix(in srgb, var(--ink) 72%, transparent),
    0 5px 0 color-mix(in srgb, var(--ink) 72%, transparent);
}

.hero {
  min-height: 720px;
  padding: 82px max(22px, calc((100vw - 1180px) / 2)) 68px;
  display: grid;
  grid-template-columns: minmax(500px, 0.92fr) minmax(420px, 1.08fr);
  gap: 68px;
  align-items: center;
  background: linear-gradient(180deg, var(--surface-elevated), var(--bg) 78%);
}

.eyebrow,
.label,
.platform {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  max-width: 650px;
  margin: 13px 0 18px;
  color: var(--ink-strong);
  font-size: clamp(46px, 4.2vw, 60px);
  font-weight: 680;
  line-height: 1.04;
}

.h1-line {
  display: block;
  white-space: nowrap;
}

h2 {
  margin: 11px 0 0;
  color: var(--ink-strong);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 680;
  line-height: 1.06;
}

h3 {
  margin: 9px 0 12px;
  color: var(--ink-strong);
  font-size: 26px;
  font-weight: 650;
  line-height: 1.16;
}

.hero-subhead {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
}

.hero-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.hero-downloads {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.hero-downloads a {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-elevated) 86%, transparent);
  box-shadow: var(--shadow);
}

.hero-downloads span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.hero-downloads strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--control-bg);
  color: var(--control-ink);
}

.button.primary:hover {
  background: var(--control-hover);
}

.button.secondary,
.button.ghost {
  background: var(--fill);
  color: var(--ink);
  border-color: var(--line);
}

.button.full {
  width: 100%;
}

.text-link {
  font-size: 16px;
  font-weight: 600;
}

.text-link::after {
  content: " >";
}

.hero-stage {
  position: relative;
  min-height: 560px;
}

.desktop-device {
  position: absolute;
  inset: 56px 0 auto auto;
  width: min(620px, 76vw);
  padding: 13px 13px 42px;
  border-radius: 34px;
  background: var(--device-frame);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.24);
}

.desktop-device::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 140px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 25%, transparent);
  transform: translateX(-50%);
}

.desktop-screen {
  min-height: 355px;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-elevated);
}

.mini-bar {
  display: flex;
  gap: 7px;
}

.mini-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--fill-strong);
}

.live-panel {
  margin-top: 54px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.live-panel img {
  width: 62px;
  height: 62px;
  padding: 11px;
  border-radius: 18px;
  background: var(--control-bg);
}

.live-panel strong {
  display: block;
  font-size: 32px;
  line-height: 1.05;
}

.live-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.threads-stage {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
}

.sound-field,
.soft-wave {
  height: 132px;
  margin-top: 54px;
}

.threads-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.threads-ready .threads-canvas {
  opacity: 1;
}

.sound-orbit {
  position: relative;
  height: 164px;
  margin: 58px 0 60px;
  width: calc(100% + 36px);
  margin-left: -18px;
  border-radius: 8px;
}

.phone-device {
  position: absolute;
  left: 0;
  bottom: 16px;
  width: 230px;
  min-height: 470px;
  padding: 18px;
  border: 8px solid var(--device-frame);
  border-radius: 46px;
  background: var(--surface-elevated);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.phone-island {
  width: 72px;
  height: 23px;
  margin: 0 auto 48px;
  border-radius: 999px;
  background: var(--device-frame);
}

.phone-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13px;
  font-weight: 700;
}

.phone-status::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
}

.phone-device p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}

.headline-section {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 106px 0 34px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
}

.feature-grid,
.download-grid,
.account-section,
.setup {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 34px;
}

.feature-card,
.download-card,
.auth-panel,
.member-center,
.admin-center,
.setup {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.feature-card {
  min-height: 360px;
  padding: 32px;
  overflow: hidden;
}

.feature-card.span-2 {
  grid-column: span 2;
}

.feature-card p:not(.eyebrow),
.download-card p,
.account-copy p,
.setup li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.feature-card.dark {
  background: var(--surface-soft);
  color: var(--ink);
}

.feature-card.dark p {
  color: var(--muted);
}

.feature-card.blue {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.feature-card.pale {
  background: var(--surface-soft);
}

.downloads {
  padding-bottom: 40px;
}

.download-grid {
  display: grid;
  grid-template-columns: 1.18fr repeat(2, minmax(0, 0.91fr));
  gap: 18px;
}

.app-download-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.secure-download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-card {
  min-height: 390px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.primary-download {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
}

.primary-download .platform,
.primary-download p,
.primary-download .text-link {
  color: var(--muted);
}

.primary-download .button.primary {
  background: var(--control-bg);
  color: var(--control-ink);
}

.download-card p {
  margin-bottom: 0;
}

.package-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.package-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.primary-download .package-list div {
  border-color: var(--line);
}

.package-list dt,
.package-list dd {
  margin: 0;
  font-size: 13px;
}

.package-list dt {
  color: var(--muted);
  font-weight: 700;
}

.primary-download .package-list dt {
  color: var(--muted);
}

.package-list dd {
  color: var(--ink);
  font-weight: 760;
  text-align: right;
}

.primary-download .package-list dd {
  color: var(--ink);
}

:root[data-theme="dark"] .mini-bar span {
  background: var(--fill-strong);
}

:root[data-theme="dark"] .desktop-screen,
:root[data-theme="dark"] .phone-device,
:root[data-theme="dark"] .hero-downloads a {
  border-color: var(--line);
}

:root[data-theme="dark"] .live-panel img {
  background: var(--control-bg);
}

:root[data-theme="dark"] .feature-card.dark,
:root[data-theme="dark"] .primary-download,
:root[data-theme="dark"] .plan-card.highlight,
:root[data-theme="dark"] .countdown-card {
  background: var(--surface-elevated);
}

:root[data-theme="dark"] .feature-card.blue {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}

:root[data-theme="dark"] .primary-download .button.primary {
  background: var(--control-bg);
  color: var(--control-ink);
}

:root[data-theme="dark"] .package-list div {
  border-color: var(--line);
}

:root[data-theme="dark"] .download-card,
:root[data-theme="dark"] .feature-card,
:root[data-theme="dark"] .setup {
  border: 1px solid var(--line);
}

.download-actions {
  margin-top: auto;
}

.account-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.78fr);
  gap: 56px;
  align-items: start;
  padding: 104px 0 40px;
}

.account-copy {
  position: sticky;
  top: 86px;
}

.auth-panel {
  padding: 28px;
  box-shadow: var(--shadow);
}

.member-center,
.admin-center {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
}

.member-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.member-topline strong,
.countdown-card strong,
.usage-grid strong,
.trial-card strong,
.plan-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.12;
}

.role-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  font-size: 12px;
  font-weight: 750;
}

.countdown-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 24px;
  color: var(--control-ink);
  background:
    radial-gradient(circle at 84% 12%, rgba(52, 199, 89, 0.2), transparent 34%),
    linear-gradient(145deg, var(--control-bg), color-mix(in srgb, var(--control-bg) 82%, var(--muted)));
}

.countdown-card strong {
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: 0;
}

.countdown-card p {
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--control-ink) 68%, transparent);
  font-size: 14px;
  line-height: 1.45;
}

.usage-grid,
.plans-grid,
.admin-stats {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.usage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.usage-grid div,
.trial-card,
.plan-card,
.stat-card {
  border-radius: 22px;
  background: var(--fill);
}

.usage-grid div,
.plan-card,
.stat-card {
  padding: 18px;
}

.trial-card {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.trial-card p,
.plan-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.plans-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-card {
  display: flex;
  flex-direction: column;
  min-height: 196px;
}

.plan-card.muted-plan {
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.plan-card.muted-plan strong {
  color: var(--muted-soft);
}

.plan-card.muted-plan .label,
.plan-card.muted-plan p {
  color: var(--muted-soft);
}

.plan-card .button {
  margin-top: auto;
}

.plan-card.highlight {
  color: var(--control-ink);
  background:
    radial-gradient(circle at 84% 18%, rgba(52, 199, 89, 0.2), transparent 30%),
    linear-gradient(145deg, var(--control-bg), color-mix(in srgb, var(--control-bg) 82%, var(--muted)));
}

.plan-card.highlight p,
.plan-card.highlight .label {
  color: color-mix(in srgb, var(--control-ink) 68%, transparent);
}

.order-panel {
  margin-top: 16px;
}

.orders-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.order-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.admin-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.admin-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-weight: 750;
}

.admin-table td {
  color: var(--ink);
}

.user-row {
  cursor: pointer;
}

.user-row:hover td {
  background: var(--fill);
}

.user-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.user-email-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: var(--fill);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  font-size: 16px;
  font-weight: 520;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.form-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.inline-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 650;
}

.session {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.session strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.result {
  min-height: 120px;
  margin: 20px 0 0;
  padding: 16px;
  color: var(--muted);
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.58;
}

.result.ok {
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
}

.result.err {
  color: var(--danger);
}

.setup {
  margin-top: 96px;
  margin-bottom: 54px;
  padding: 38px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 34px;
}

.account-page {
  background:
    radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%),
    linear-gradient(180deg, var(--surface-elevated), var(--bg) 44%, var(--bg));
}

.account-nav {
  position: fixed;
  left: 0;
  right: 0;
}

.account-shell {
  min-height: 100vh;
  padding-top: 44px;
}

.auth-screen {
  min-height: calc(100vh - 44px);
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.68fr);
  gap: 54px;
  align-items: center;
  padding: 70px 0;
}

.auth-visual {
  min-height: 560px;
  position: relative;
  display: grid;
  place-items: center;
}

.auth-device {
  width: min(620px, 100%);
  min-height: 440px;
  padding: 44px;
  border-radius: 38px;
  background:
    radial-gradient(circle at 30% 16%, color-mix(in srgb, var(--surface) 88%, transparent), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 92%, var(--accent)), var(--surface-elevated));
  box-shadow: var(--shadow);
}

.auth-device img {
  width: 66px;
  height: 66px;
  padding: 12px;
  border-radius: 18px;
  background: var(--control-bg);
}

.auth-card {
  padding: 34px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-card h1 {
  font-size: clamp(38px, 4vw, 52px);
  white-space: normal;
}

.auth-tabs {
  grid-template-columns: repeat(2, 1fr);
}

.compact-result {
  min-height: 72px;
}

.workspace {
  min-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 28px;
  width: min(1360px, calc(100% - 44px));
  margin: 0 auto;
  padding: 34px 0 46px;
}

.workspace-sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 92px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.profile-chip {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 20px;
  background: var(--fill);
}

.profile-avatar {
  width: 46px;
  height: 46px;
}

.profile-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.profile-chip span:not(.profile-avatar) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-tabs {
  display: grid;
  gap: 8px;
}

.side-tab {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.side-tab.active {
  color: var(--control-ink);
  background: var(--control-bg);
}

.workspace-sidebar .button {
  margin-top: auto;
}

.workspace-main {
  min-width: 0;
}

.workspace-panel {
  display: none;
  padding: 34px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
}

.workspace-panel.active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-heading h2 {
  font-size: clamp(36px, 4.4vw, 58px);
}

.status-pill,
.table-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-size: 12px;
  font-weight: 800;
}

.account-dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(160px, 0.62fr));
  gap: 14px;
}

.countdown-card.large {
  grid-row: span 2;
  min-height: 300px;
  display: grid;
  align-content: end;
}

.metric-card,
.analytics-card {
  padding: 22px;
  border-radius: 24px;
  background: var(--fill);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.account-dashboard-grid .trial-card {
  grid-column: span 2;
}

.account-dashboard-grid .redeem-card {
  grid-column: span 2;
}

.redeem-panel-stack {
  display: grid;
  gap: 18px;
}

.redeem-panel-stack .redeem-card {
  margin-top: 0;
}

.redeem-form {
  min-width: min(360px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-code-section {
  padding: 18px;
  border-radius: 22px;
  background: var(--fill);
}

.admin-code-section .admin-create-user {
  margin-top: 14px;
}

.account-plans {
  grid-template-columns: repeat(2, minmax(0, 320px));
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-create-user {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) minmax(110px, 150px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.admin-create-code {
  grid-template-columns: minmax(170px, 210px) minmax(200px, 1fr) minmax(110px, 140px) minmax(90px, 110px) minmax(100px, 120px) auto;
}

.admin-inline-check {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.admin-inline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.redeem-code-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.redeem-code-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.55fr) minmax(180px, 0.45fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  border: 1px solid var(--line);
  font-size: 13px;
}

.redeem-code-main,
.redeem-code-actions {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.redeem-code-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.redeem-code-item code {
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.redeem-code-item span {
  color: var(--muted);
}

.copy-code-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.copy-code-button:hover {
  border-color: var(--fill-strong);
  background: var(--surface);
}

.copy-code-button.copied {
  border-color: rgba(52, 199, 89, 0.35);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
}

.announcement-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(220px, 1fr);
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.announcement-body-field,
.announcement-image-preview,
.announcement-actions {
  grid-column: 1 / -1;
}

.announcement-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 150px;
}

.announcement-image-field input[type="file"] {
  min-height: 44px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
}

.announcement-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--fill);
}

.announcement-image-preview[hidden] {
  display: none;
}

.announcement-image-preview img {
  width: 112px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.announcement-image-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.announcement-active-field {
  min-height: 44px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 750;
}

.announcement-active-field input {
  width: 18px;
  height: 18px;
}

.announcement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.announcement-history {
  padding: 18px;
  border-radius: 22px;
  background: var(--fill);
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.announcement-item.is-hidden {
  opacity: 0.62;
}

.announcement-item-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.announcement-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-item-main strong {
  color: var(--ink);
  font-size: 16px;
}

.announcement-item-main p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.announcement-thumb {
  width: min(240px, 100%);
  max-height: 148px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.announcement-item-main span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.announcement-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.announcement-item-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.admin-table {
  min-width: 1220px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.user-usage-panel {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background: var(--fill);
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.detail-item,
.password-panel {
  padding: 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 6px;
}

.detail-item strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.password-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.password-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reset-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.compact-result {
  grid-column: 1 / -1;
  margin: 0;
  white-space: pre-wrap;
  color: var(--blue);
}

.usage-records {
  display: grid;
  gap: 8px;
}

.usage-record {
  display: grid;
  grid-template-columns: 120px 120px repeat(3, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--muted);
  font-size: 13px;
}

.usage-record strong {
  color: var(--ink);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  margin-top: 18px;
}

.analytics-card.wide {
  grid-row: span 2;
}

.retention-card,
.forecast-card {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.chart-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.chart-heading strong {
  font-size: 22px;
}

.bar-chart,
.line-chart {
  height: 280px;
  display: flex;
  align-items: end;
  gap: 9px;
  padding-top: 18px;
}

.line-chart {
  height: 160px;
}

.line-chart.compact {
  height: 106px;
  margin-top: 18px;
}

.bar-chart span,
.line-chart span {
  flex: 1;
  min-width: 8px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent));
}

.line-chart span {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 72%, white), var(--accent-2));
}

.pill-chart {
  display: grid;
  gap: 12px;
}

.pill-chart div {
  position: relative;
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fill);
}

.pill-chart span,
.pill-chart strong {
  position: relative;
  z-index: 1;
}

.pill-chart em {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 46%, transparent), color-mix(in srgb, var(--accent-2) 36%, transparent));
}

.retention-summary,
.forecast-summary {
  display: grid;
  gap: 10px;
}

.retention-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.retention-summary div,
.forecast-summary div {
  padding: 14px;
  border-radius: 8px;
  background: var(--fill);
}

.retention-summary span,
.forecast-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.retention-summary strong,
.forecast-summary strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  line-height: 1;
}

.retention-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.retention-table {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.retention-row {
  display: grid;
  grid-template-columns: minmax(92px, 1.3fr) repeat(4, minmax(42px, 0.7fr));
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--fill);
  color: var(--muted);
  font-size: 12px;
}

.retention-row strong {
  color: var(--ink);
  font-size: 13px;
}

.retention-head {
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.forecast-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forecast-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--fill);
  color: var(--muted);
  line-height: 1.45;
}

.forecast-note.medium {
  background: rgba(255, 159, 10, 0.12);
  color: color-mix(in srgb, var(--accent-2) 70%, var(--ink));
}

.forecast-note.high {
  background: rgba(228, 71, 47, 0.12);
  color: color-mix(in srgb, var(--danger) 70%, var(--ink));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(24px);
}

.verification-modal {
  width: min(430px, 100%);
  padding: 30px;
  position: relative;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.verification-modal h2 {
  font-size: 42px;
}

.verification-modal p:not(.eyebrow):not(.form-note) {
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.setup ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.setup li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.setup li span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--control-ink);
  background: var(--control-bg);
  font-weight: 760;
}

.setup li b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}

.setup li p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.site-footer {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 0 0 32px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.footer-links a,
.icp-link {
  color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--blue);
}

.legal-consent {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.legal-consent a,
.free-service-summary a {
  color: var(--blue);
}

.free-service-summary {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  gap: 10px;
}

.free-service-summary strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.free-service-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.account-footer {
  padding-top: 34px;
}

.legal-page {
  background: var(--bg);
}

.legal-main {
  padding-bottom: 58px;
}

.legal-hero {
  min-height: 410px;
  padding: 120px max(22px, calc((100vw - 1180px) / 2)) 58px;
  display: grid;
  align-content: end;
  gap: 16px;
  background: linear-gradient(180deg, var(--surface-elevated), var(--bg));
}

.legal-hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.legal-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.legal-layout {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  gap: 8px;
}

.legal-toc a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--blue);
}

.legal-card {
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  display: grid;
  gap: 28px;
}

.legal-section {
  display: grid;
  gap: 12px;
  scroll-margin-top: 110px;
}

.legal-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.legal-section p {
  margin: 0;
}

.legal-section ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}

.guide-page {
  background: var(--bg);
}

.guide-hero {
  min-height: 520px;
  padding: 120px max(22px, calc((100vw - 1180px) / 2)) 80px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 70% 18%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 30%),
    linear-gradient(180deg, var(--surface-elevated), var(--bg));
}

.guide-hero h1 {
  max-width: 900px;
}

.guide-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
}

.guide-steps {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  gap: 22px;
  padding-bottom: 60px;
}

.guide-step {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.guide-step.reverse {
  grid-template-columns: minmax(420px, 1fr) minmax(0, 0.82fr);
}

.guide-step.reverse .guide-copy {
  order: 2;
}

.guide-copy,
.guide-visual {
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.guide-copy {
  padding: 42px;
  display: grid;
  align-content: center;
}

.guide-copy h2 {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.18;
}

.step-index {
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-size: 18px;
  font-weight: 800;
}

.guide-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.guide-visual {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 36%),
    var(--surface);
}

.screenshot-frame {
  padding: 22px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34%),
    var(--surface);
}

.screenshot-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
}

.desktop-shot img,
.app-shot img {
  width: 100%;
}

.app-shot img {
  border: 1px solid var(--line);
}

.tight-shot img {
  transform: scale(1.04);
}

.phone-shot {
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 36%),
    var(--surface);
}

.phone-shot img {
  width: min(310px, 84%);
  border-radius: 34px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.phone-shot-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at 35% 24%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34%),
    var(--surface);
}

.phone-shot-pair figure {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 0;
}

.phone-shot-pair img {
  width: min(220px, 100%);
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.phone-shot-pair figcaption {
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.guide-checklist {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.guide-checklist li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.guide-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.demo-window,
.pc-demo-screen {
  width: min(430px, 78%);
  padding: 28px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 5px;
  border-radius: 999px;
  background: var(--fill);
}

.demo-tabs span {
  height: 36px;
  border-radius: 999px;
}

.demo-tabs .active {
  background: var(--surface);
}

.demo-field {
  height: 54px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.demo-field.short {
  width: 72%;
}

.demo-button {
  height: 46px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--control-bg);
}

.demo-button.wide {
  width: 76%;
}

.demo-note {
  margin-top: 18px;
  color: var(--muted);
  font-weight: 700;
}

.download-demo {
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 18px;
}

.package-tile {
  min-height: 150px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.1);
  font-size: 38px;
  font-weight: 800;
}

.blue-tile {
  color: var(--control-ink);
  background: linear-gradient(145deg, var(--control-bg), color-mix(in srgb, var(--control-bg) 82%, var(--muted)));
}

.dark-tile {
  color: var(--control-ink);
  background: var(--control-bg);
}

.pale-tile {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--fill);
  font-weight: 760;
}

.demo-status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.demo-wave {
  height: 160px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 24px;
}

.demo-wave span {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent));
}

.demo-wave span:nth-child(1) { height: 38%; }
.demo-wave span:nth-child(2) { height: 72%; }
.demo-wave span:nth-child(3) { height: 96%; }
.demo-wave span:nth-child(4) { height: 58%; }
.demo-wave span:nth-child(5) { height: 82%; }

.guide-phone {
  position: relative;
  left: auto;
  bottom: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 980px) {
  .global-nav {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .nav-actions {
    gap: 12px;
  }

  .hero,
  .setup,
  .download-grid,
  .app-download-grid,
  .guide-step,
  .guide-step.reverse,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .guide-step.reverse .guide-copy {
    order: 0;
  }

  .legal-toc {
    position: static;
  }

  .hero {
    min-height: auto;
    padding-top: 70px;
    gap: 32px;
  }

  .hero-downloads {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 540px;
  }

  .desktop-device {
    right: 0;
    width: min(600px, 100%);
  }

  .phone-device {
    left: 18px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card.span-2 {
    grid-column: span 2;
  }

  .headline-section {
    align-items: start;
    flex-direction: column;
  }

  .account-copy {
    position: static;
  }

  .auth-screen,
  .workspace {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    padding-top: 44px;
  }

  .auth-visual {
    min-height: 260px;
  }

  .auth-device {
    min-height: 250px;
  }

  .workspace-sidebar {
    position: static;
    height: auto;
  }

  .side-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-tab {
    text-align: center;
  }

  .account-dashboard-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .account-dashboard-grid .trial-card {
    grid-column: auto;
  }

  .announcement-form,
  .announcement-item {
    grid-template-columns: 1fr;
  }

  .announcement-item-actions {
    justify-content: flex-start;
  }

  .guide-visual {
    min-height: 460px;
  }
}

@media (max-width: 680px) {
  .ribbon {
    font-size: 13px;
  }

  .product-rail {
    grid-template-columns: repeat(5, 88px);
  }

  h1 {
    font-size: clamp(36px, 10vw, 43px);
    line-height: 1.04;
  }

  h2 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .hero-subhead {
    font-size: 18px;
  }

  .retention-summary,
  .forecast-summary {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 500px;
  }

  .desktop-device {
    top: 78px;
    right: 0;
    width: min(360px, calc(100vw - 44px));
  }

  .desktop-screen {
    min-height: 310px;
  }

  .desktop-device .live-panel {
    display: none;
  }

  .sound-field {
    margin-top: 112px;
  }

  .phone-device {
    width: 188px;
    min-height: 390px;
    border-radius: 40px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card.span-2 {
    grid-column: span 1;
  }

  .feature-card,
  .download-card,
  .member-center,
  .admin-center,
  .setup,
  .auth-panel,
  .auth-card,
  .workspace-panel,
  .workspace-sidebar {
    border-radius: 24px;
  }

  .trial-card,
  .plans-grid,
  .usage-grid,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .trial-card {
    align-items: stretch;
  }

  .auth-screen,
  .workspace {
    width: min(100% - 28px, 1180px);
  }

  .auth-screen {
    gap: 18px;
    padding-bottom: 28px;
  }

  .auth-card,
  .workspace-panel {
    padding: 22px;
  }

  .auth-card h1 {
    font-size: clamp(38px, 10.5vw, 46px);
  }

  .auth-visual {
    display: none;
  }

  .panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .account-plans,
  .admin-toolbar,
  .admin-create-user,
  .admin-create-code,
  .redeem-form,
  .redeem-code-item,
  .password-panel,
  .reset-password-form,
  .user-detail-grid,
  .side-tabs {
    grid-template-columns: 1fr;
  }

  .countdown-card.large {
    min-height: 230px;
  }

  .bar-chart {
    height: 190px;
  }

  .download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions .button,
  .download-actions .text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .guide-hero {
    min-height: 430px;
    padding-top: 82px;
  }

  .legal-hero {
    min-height: 360px;
    padding-top: 92px;
  }

  .legal-hero h1 {
    font-size: clamp(38px, 10vw, 48px);
    line-height: 1.04;
  }

  .legal-card {
    padding: 24px;
    border-radius: 22px;
  }

  .legal-section h2 {
    font-size: 21px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 15px;
  }

  .guide-copy {
    padding: 30px;
  }

  .guide-visual {
    min-height: 390px;
  }

  .download-demo {
    grid-template-columns: repeat(2, minmax(104px, 1fr));
    padding: 22px;
  }

  .package-tile {
    min-height: 118px;
    font-size: 30px;
  }
}
