/* GeekXY public identity layer. The legacy admin UI does not load this file.
   Alpha masks inherit theme ink; no white tile or theme-dependent PNG swap. */
:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-soft: #f1f5f1;
  --ink: #172b23;
  --muted: #5f7167;
  --line: #dfe7df;
  --line-strong: #7e9485;
  --brand: #246c4f;
  --brand-dark: #184e38;
  --brand-soft: #e8f2e9;
  --on-brand: #ffffff;
  --danger: #b32a24;
  --danger-soft: #fff0ed;
  --warning: #825b20;
  --warning-soft: #faf4e7;
  --warning-line: #e8d9b8;
  --success: #216b47;
  --success-soft: #e9f4ec;
  --pending: #3b628b;
  --pending-soft: #eaf0f7;
  --shadow: 0 4px 8px rgb(21 48 31 / .025), 0 20px 64px -20px rgb(21 48 31 / .13);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --logo-filter: none;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Keep the explicit and OS-selected dark palettes identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111a16;
    --surface: #1a2520;
    --surface-soft: #202e26;
    --ink: #e8f1e8;
    --muted: #adbdaf;
    --line: #35473b;
    --line-strong: #607966;
    --brand: #a4d8b2;
    --brand-dark: #c3e6ca;
    --brand-soft: #293f31;
    --on-brand: #142d1f;
    --danger: #ffa49b;
    --danger-soft: #3b2523;
    --warning: #e3c084;
    --warning-soft: #2b281e;
    --warning-line: #514733;
    --success: #acd9b8;
    --success-soft: #273c2e;
    --pending: #a8c9eb;
    --pending-soft: #233345;
    --shadow: 0 4px 8px rgb(0 0 0 / .05), 0 24px 64px -20px rgb(0 0 0 / .32);
    --logo-filter: brightness(0) invert(1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111a16;
  --surface: #1a2520;
  --surface-soft: #202e26;
  --ink: #e8f1e8;
  --muted: #adbdaf;
  --line: #35473b;
  --line-strong: #607966;
  --brand: #a4d8b2;
  --brand-dark: #c3e6ca;
  --brand-soft: #293f31;
  --on-brand: #142d1f;
  --danger: #ffa49b;
  --danger-soft: #3b2523;
  --warning: #e3c084;
  --warning-soft: #2b281e;
  --warning-line: #514733;
  --success: #acd9b8;
  --success-soft: #273c2e;
  --pending: #a8c9eb;
  --pending-soft: #233345;
  --shadow: 0 4px 8px rgb(0 0 0 / .05), 0 24px 64px -20px rgb(0 0 0 / .32);
  --logo-filter: brightness(0) invert(1);
}

:root body[data-page] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  line-height: 1.65;
}
a, button, summary { touch-action: manipulation; }
html { scrollbar-gutter: stable; }
input, textarea, select { scroll-margin-block: 28px; }
.field-feedback, .form-feedback, .order-message, .availability-note { overflow-wrap: anywhere; }
.order-summary, .counter, .status-grid { font-variant-numeric: tabular-nums; }
.field-group:focus-within label { color: var(--brand-dark); }
#networkNotice[hidden] { display: none; }
/* Keep the off-screen skip link clipped even in scrolled full-page captures;
   unlike visibility:hidden this retains keyboard focusability. */
.skip-link:not(:focus) { clip-path: inset(50%); }
main[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:where(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
.site-header, .site-footer { width: min(1120px, calc(100% - 64px)); }
.site-header { min-height: 90px; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { gap: 11px; flex-shrink: 0; border-radius: 6px; }
.brand strong { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -.045em; }
.brand-xy { color: var(--brand); }
.brand small { margin-top: 4px; font-size: 11px; letter-spacing: .12em; }
.brand-mark-xy { display: block; flex-shrink: 0; width: 66px; height: 46px; color: var(--ink); background: transparent; border-radius: 0; box-shadow: none; }
.brand-mark-xy img { display: block; width: 100%; height: 100%; object-fit: contain; filter: var(--logo-filter); }
@supports (mask-image: url("/static/brand/geekxy-xy.webp")) {
  .brand-mark-xy { background: currentColor; mask: url("/static/brand/geekxy-xy.webp") center / contain no-repeat; }
  .brand-mark-xy img { opacity: 0; }
}
.site-header nav { gap: 6px; }
.site-header nav a { padding: 10px 16px; font-size: 14px; font-weight: 600; line-height: 24px; white-space: nowrap; }
.site-header nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }
.site-header nav a:hover { color: var(--ink); background: var(--surface-soft); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 112px; min-height: 44px; margin-left: 12px; padding: 9px 12px; border-color: var(--line); border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; }
.theme-toggle::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-toggle[data-theme-preference="light"]::before { background: transparent; box-shadow: inset 0 0 0 3px var(--bg); }
.theme-toggle[data-theme-preference="dark"]::before { background: currentColor; box-shadow: inset 4px -2px 0 0 var(--bg); }

.public-shell { width: min(860px, calc(100% - 64px)); flex: 1; padding: 40px 0 56px; }
.redemption-layout { display: block; }
.redemption-flow { min-width: 0; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.guide-hero h1 { margin: 12px 0 14px; font-size: clamp(28px, 3vw, 36px); font-weight: 650; line-height: 1.35; letter-spacing: -.045em; }
.text-link { font-size: 13px; font-weight: 600; text-underline-offset: 4px; }
:root body[data-page] .availability-note { margin-bottom: 28px; padding: 13px 17px; color: var(--warning); background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--radius-sm); font-size: 13px; }
.availability-note strong { color: var(--warning); font-weight: 650; }
.availability-note .note-dot { margin-top: 7px; }

.card { border-color: var(--line); }
.workspace { padding: 32px 40px; }
.recovery-entry { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 5px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.text-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px; color: var(--brand-dark); background: transparent; border: 0; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.text-action:hover:not(:disabled) { color: var(--ink); background: var(--brand-soft); }
.text-action:disabled { color: var(--muted); cursor: wait; }
.return-action { margin: -8px 0 18px -8px; font-size: 14px; }
#recoverTitle:focus { outline: none; }
.stepper { margin: 0 0 28px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.stepper li { gap: 10px; flex-wrap: nowrap; font-size: 14px; font-weight: 500; white-space: nowrap; }
.stepper li:not(:last-child)::after { margin: 0 10px; min-width: 8px; }
.stepper span { width: 28px; height: 28px; font-size: 12px; }
.stepper .is-current { color: var(--brand-dark); font-weight: 650; }
.wizard-screen { gap: 24px; }
.screen-head { gap: 7px; }
.screen-head h2, .panel-intro h2 { font-size: 26px; font-weight: 650; letter-spacing: -.025em; }
.screen-head > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.field-group { gap: 9px; }
.field-group > .field-hint,
.recovery-identifier-hint { max-width: 68ch; }
.recovery-identifier-hint {
  margin: -2px 0 1px;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  line-height: 1.65;
}
label, .field-heading label { font-size: 16px; font-weight: 600; }
.field-heading { align-items: center; gap: 12px; }
.field-heading p, .field-hint, .panel-intro p, .consent-row label { font-size: 13px; line-height: 1.75; }
.panel-intro p { font-size: 15px; }
.field-heading .text-link { flex-shrink: 0; }
input, textarea, select { min-height: 54px; padding: 13px 16px; border-color: var(--line-strong); border-radius: var(--radius-sm); font-size: 16px; }
textarea { font: 14px/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; min-height: 180px; }
#codeInput { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 16px; letter-spacing: .07em; }
#codeInput::placeholder { font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 15px; letter-spacing: 0; }
input:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--brand); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--brand-soft); }
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus { outline-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
:root body[data-page] input:disabled, :root body[data-page] textarea:disabled, :root body[data-page] select:disabled { background: var(--surface-soft); color: var(--muted); }
.field-feedback, .form-feedback { min-height: 22px; font-size: 13px; line-height: 1.7; }
.field-feedback:empty, .form-feedback:empty { margin: 0; }
.counter { font-size: 12px; }
.badge { padding: 4px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.button { min-height: 48px; padding: 12px 18px; gap: 10px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; line-height: 1.5; }
.button.primary { box-shadow: 0 3px 8px rgb(22 64 40 / .12); }
.button.primary:hover:not(:disabled) { box-shadow: 0 6px 16px rgb(22 64 40 / .18); filter: brightness(1.04); }
.button:hover:not(:disabled) { transform: none; }
.button:active:not(:disabled) { transform: translateY(0); filter: none; }
.button:disabled { opacity: 1; color: var(--muted); background: var(--surface-soft); border-color: var(--line); box-shadow: none; }
.button.is-busy { color: var(--on-brand); background: var(--brand); border-color: transparent; }
.wizard-nav { margin-top: 0; gap: 12px; }
.wizard-nav .button, .button.wide { min-height: 54px; }
.wizard-nav.split .button.ghost { padding-inline: 10px; }
.reveal-button { min-height: 44px; min-width: 54px; font-size: 13px; }
.consent-row input { width: 20px; min-height: 20px; padding: 0; }
.consent-row label { cursor: pointer; }
.consent-row { align-items: start; }
.account-validate-button { margin-top: -8px; }
#sessionSection.is-confirmed textarea { min-height: 96px; height: 96px; }
.account-check, .recovery-notice { overflow-wrap: anywhere; }
.consent-row label { min-height: 32px; display: flex; align-items: center; }
.consent-row input { margin-top: 6px; flex-shrink: 0; }
#recoveryCopyFeedback:empty { display: none; }

/* Tactile control states. Keep the pressed state visible even when the
   operating system asks us to reduce motion: color, edge contrast and an
   inset shadow communicate the click without relying on movement. */
:root body[data-page] {
  --control-pressed: color-mix(in srgb, var(--brand) 86%, #000);
  --surface-pressed: color-mix(in srgb, var(--brand-soft) 78%, var(--surface));
}
:root body[data-page] :is(.button, .theme-toggle, .text-action, .reveal-button, .tab) {
  position: relative;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease,
    box-shadow 120ms ease, filter 120ms ease;
}
:root body[data-page] :is(.button, .theme-toggle, .text-action, .reveal-button, .tab):active:not(:disabled) {
  transform: none;
  filter: brightness(.95);
  background: var(--surface-pressed);
  border-color: var(--brand);
  box-shadow: inset 0 2px 5px rgb(17 48 31 / .18), 0 1px 2px rgb(17 48 31 / .08);
}
:root body[data-page] .button.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand-dark));
  box-shadow: 0 7px 16px rgb(22 64 40 / .16), inset 0 1px rgb(255 255 255 / .18);
}
:root body[data-page] .button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 98%, #fff), var(--brand));
  box-shadow: 0 10px 22px rgb(22 64 40 / .2), inset 0 1px rgb(255 255 255 / .2);
}
:root body[data-page] :is(.button.primary, .button.is-busy):disabled {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: none;
  filter: none;
}
:root body[data-page] .button.primary.is-busy {
  color: var(--on-brand);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 86%, #fff), var(--brand-dark));
  border-color: transparent;
  box-shadow: 0 5px 12px rgb(22 64 40 / .13), inset 0 1px rgb(255 255 255 / .14);
}
:root body[data-page] .button.primary:active:not(:disabled),
:root body[data-page] .button.is-busy:active:not(:disabled) {
  background: var(--control-pressed);
  border-color: var(--control-pressed);
  filter: brightness(.98);
  box-shadow: inset 0 3px 7px rgb(7 32 20 / .3), 0 1px 2px rgb(7 32 20 / .12);
}
:root body[data-page] .button.secondary:active:not(:disabled) {
  color: var(--brand-dark);
  background: var(--brand-soft);
}
:root body[data-page] .reveal-button { position: absolute; }
:root body[data-page] .reveal-button:active:not(:disabled) {
  transform: translateY(-50%);
  background: var(--brand-soft);
}
:root body[data-page] .button.ghost:active:not(:disabled),
:root body[data-page] :is(.theme-toggle, .text-action, .reveal-button, .tab):active:not(:disabled) {
  color: var(--brand-dark);
}
:root body[data-page] .button.is-busy { transform: none; filter: none; }
:root body[data-page] :is(.button, .theme-toggle, .text-action, .reveal-button, .tab):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
:root body[data-page] .tab.is-active { box-shadow: 0 2px 6px rgb(23 54 37 / .12), inset 0 1px rgb(255 255 255 / .55); }
:root body[data-page] .tab.is-active:active:not(:disabled) {
  background: var(--surface-pressed);
  box-shadow: inset 0 2px 5px rgb(17 48 31 / .14), 0 1px 2px rgb(17 48 31 / .08);
}

/* Give the working surface a little more depth while keeping the sparse
   first screen calm and focused. */
:root body[data-page] {
  background:
    radial-gradient(circle at 84% -12%, color-mix(in srgb, var(--accent, #d7a63c) 11%, transparent), transparent 28rem),
    radial-gradient(circle at 4% 18%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 30rem),
    var(--bg);
}
:root body[data-page] .workspace.card {
  border-color: color-mix(in srgb, var(--brand) 12%, var(--line));
  box-shadow: 0 6px 16px rgb(21 48 31 / .035), 0 28px 64px -24px rgb(21 48 31 / .22);
}
:root body[data-page] .site-header nav a[aria-current="page"] {
  box-shadow: inset 0 1px rgb(255 255 255 / .45), 0 1px 3px rgb(21 48 31 / .06);
}

@media (prefers-reduced-motion: reduce) {
  :root body[data-page] :is(.button, .theme-toggle, .text-action, .reveal-button, .tab) {
    transition-duration: .01ms;
  }
  :root body[data-page] :is(.button, .theme-toggle, .text-action, .reveal-button, .tab):active:not(:disabled) {
    transform: none;
    filter: brightness(.95);
  }
  :root body[data-page] .button.is-busy:active:not(:disabled) { filter: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .wizard-screen.is-active, #orderPanel:not([hidden]) { animation: flow-enter 140ms ease-out; }
  .redemption-progress li > span { transition: background-color 140ms, border-color 140ms; }
}
@keyframes flow-enter { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.account-check { display: grid; gap: 15px; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface-soft); }
.account-check-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.account-check-kicker { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.account-check h3 { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.45; }
.account-check-badge { flex-shrink: 0; padding: 4px 8px; color: var(--success); border: 1px solid var(--line); border-radius: 999px; background: var(--success-soft); font-size: 11px; font-weight: 650; }
.account-check dl { display: grid; gap: 9px; margin: 0; }
.account-check dl > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.account-check dt { color: var(--muted); font-size: 12px; }
.account-check dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 16px; font-weight: 650; }
.account-check > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.account-confirm { padding-top: 13px; border-top: 1px solid var(--line); }
.account-confirm label { color: var(--ink); font-size: 14px; font-weight: 600; }
.order-panel { margin-top: 0; padding: 36px 44px; }
.order-heading { margin-bottom: 17px; }
.order-heading h2 { font-size: 24px; font-weight: 650; line-height: 1.4; }
.redemption-progress-panel { margin: 20px 0 24px; padding: 20px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.progress-heading h3 { margin: 0; font-size: 15px; font-weight: 650; }
.progress-heading p { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.redemption-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.redemption-progress li { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 0; color: var(--muted); text-align: center; }
.redemption-progress li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 14px; left: calc(50% + 18px); width: calc(100% - 36px); height: 2px; background: var(--line); }
.redemption-progress li.is-complete:not(:last-child)::after { background: var(--brand); }
.redemption-progress li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); font-size: 12px; font-weight: 700; }
.redemption-progress strong { margin-top: 3px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.redemption-progress small { font-size: 11px; font-weight: 400; white-space: nowrap; }
.redemption-progress .is-complete { color: var(--brand-dark); }
.redemption-progress .is-complete > span, .redemption-progress .is-current[data-tone="active"] > span { color: var(--on-brand); border-color: var(--brand); background: var(--brand); }
.redemption-progress .is-current { color: var(--ink); }
.redemption-progress .is-current[data-tone="warning"] > span { color: var(--warning); border-color: var(--warning); background: var(--warning-soft); }
.redemption-progress .is-current[data-tone="error"] > span { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.redemption-progress .is-current[data-tone="success"] > span { color: var(--on-brand); border-color: var(--success); background: var(--success); }
.order-summary dl { grid-template-columns: 1fr; gap: 12px; }
.order-summary dl > div { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: baseline; gap: 10px; }
.order-summary dt, .muted { font-size: 12px; }
.order-summary dd { margin: 0; font-size: 13px; }
.order-summary dd { overflow-wrap: anywhere; }
.progress-activity { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 14px; margin-top: 20px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.redemption-progress[data-motion="running"] .is-current[data-tone="active"] > span { color: transparent; background: var(--brand-soft); }
.redemption-progress[data-motion="running"] .is-current[data-tone="active"] > span::after { content: ""; position: absolute; inset: 5px; border: 2px solid var(--line-strong); border-top-color: var(--brand); border-right-color: var(--brand); border-radius: 50%; animation: redemption-spin .9s linear infinite; }
@keyframes redemption-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .redemption-progress[data-motion="running"] .is-current[data-tone="active"] > span { color: var(--brand-dark); }
  .redemption-progress[data-motion="running"] .is-current[data-tone="active"] > span::after { display: none; animation: none; }
}
.status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-grid article { padding: 13px; }
.status-grid strong { font-size: 13px; }
.status-dot { background: var(--muted); box-shadow: 0 0 0 4px var(--surface-soft); }
.status-dot[data-tone="pending"] { background: var(--pending); box-shadow: 0 0 0 4px var(--pending-soft); }
:root body[data-page] .action-panel { background: var(--surface-soft); }
:root body[data-page] .recovery-notice { color: var(--ink); border-color: var(--warning-line); background: var(--warning-soft); }
:root body[data-page] .recovery-notice > div:first-child p, :root body[data-page] .recovery-notice dt { color: var(--warning); }
.recovery-notice p { font-size: 13px; line-height: 1.8; }
.recovery-notice dl div { grid-template-columns: 1fr; gap: 3px; }
.recovery-notice dl { gap: 12px; }
.recovery-notice dd { font-size: 13px; font-family: ui-monospace, Consolas, monospace; user-select: all; }
.order-actions { justify-content: flex-start; }
.order-details > summary { font-size: 13px; }
.site-footer { padding: 23px 0 28px; border-color: var(--line); font-size: 12px; align-items: baseline; }
.footer-brand { color: var(--ink); font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.footer-brand > span { margin-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }

/* The guide uses the same surfaces, type rhythm, and semantic status colors. */
.guide-shell { width: min(800px, calc(100% - 64px)); flex: 1; padding: 44px 0 72px; }
.guide-hero { padding: 0 0 24px; }
.guide-hero > p.guide-lead { font-size: 15px; line-height: 1.85; }
.guide-note { margin: 0 0 18px; }
:root body[data-page] .guide-note.is-caution { background: var(--warning-soft); border-color: var(--warning-line); border-left-color: var(--warning); }
.guide-note li { font-size: 14px; line-height: 1.85; }
.guide-panel { margin-bottom: 32px; padding: 20px 22px; }
.guide-panel h2, .faq h2 { font-size: 17px; font-weight: 650; }
.guide-panel p, .guide-steps p, .faq details p { font-size: 14px; line-height: 1.9; }
.guide-section-title { margin-bottom: 22px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.guide-steps > li { gap: 18px; padding-bottom: 32px; }
.guide-steps h3 { font-size: 17px; font-weight: 650; }
.guide-number { color: var(--brand-dark); border-color: var(--line); background: var(--brand-soft); font-weight: 600; }
.guide-steps .button { min-height: 46px; font-size: 14px; }
.code-card { margin-top: 16px; }
.code-card figcaption { padding: 12px 16px; font-size: 12px; }
.code-card pre { padding: 18px 20px; font-size: 13px; border: 0; border-radius: 0; }
.code-card pre code { padding: 0; border: 0; border-radius: 0; background: transparent; font-size: inherit; }
.faq { padding: 24px 26px 6px; }
.faq h2 { margin-bottom: 16px; }
.faq summary { min-height: 54px; padding: 14px 0; font-size: 14px; font-weight: 500; }
.faq summary::after { font-size: 20px; }
.faq summary:focus-visible { outline-offset: 1px; border-radius: 3px; }

@media (max-width: 780px) {
  .site-header, .site-footer { width: calc(100% - 40px); }
  .site-header { min-height: 78px; gap: 12px; }
  .brand strong { font-size: 20px; }
  .brand small { display: none; }
  .brand-mark-xy { width: 52px; height: 39px; }
  .site-header nav { gap: 3px; }
  .site-header nav a { padding-inline: 10px; font-size: 13px; }
  .theme-toggle { margin-left: 4px; }
  .public-shell { width: min(720px, calc(100% - 40px)); padding: 32px 0 48px; }
  .workspace, .order-panel { padding: 28px 30px; }
  .stepper { margin-bottom: 24px; padding-bottom: 22px; }
  .stepper li { flex-wrap: nowrap; font-size: 13px; }
  .field-grid.two { grid-template-columns: 1fr; }
  .site-footer { display: flex; flex-wrap: wrap; gap: 7px 20px; padding: 20px 0 24px; }
  .guide-shell { width: min(640px, calc(100% - 40px)); padding: 32px 0 48px; }
  .guide-hero { padding: 0 0 24px; }
  .guide-hero h1 { font-size: 28px; }
  .guide-steps > li { grid-template-columns: 32px minmax(0, 1fr); gap: 14px; }
  .guide-number { width: 32px; height: 32px; }
  .guide-steps > li:not(:last-child)::before { left: 15px; top: 40px; }
}
@media (max-width: 540px) {
  .site-header, .site-footer { width: calc(100% - 32px); }
  .site-header nav a:first-child { display: none; }
  .site-header { min-height: 72px; gap: 6px; }
  .brand { gap: 6px; }
  .brand strong { font-size: 19px; }
  .brand-mark-xy { width: 44px; height: 34px; }
  .site-header nav a { padding-inline: 8px; font-size: 12px; }
  .theme-toggle { min-width: 44px; width: 44px; margin: 0; padding: 0; gap: 0; font-size: 0; }
  .theme-toggle::before { width: 17px; height: 17px; flex-basis: 17px; }
  .public-shell, .guide-shell { width: calc(100% - 32px); padding-top: 26px; }
  :root body[data-page] .availability-note { margin-bottom: 23px; padding: 12px 14px; font-size: 12px; }
  .availability-note strong { display: block; margin-bottom: 3px; }
  .workspace { padding: 24px 21px; border-radius: 18px; }
  .stepper { margin-bottom: 22px; padding-bottom: 22px; }
  .stepper li { flex-direction: column; align-items: flex-start; position: relative; gap: 8px; font-size: 11px; }
  .stepper li:not(:last-child)::after { display: block; position: absolute; top: 12px; left: 32px; right: 12px; margin: 0; }
  .stepper span { width: 26px; height: 26px; }
  .wizard-screen { gap: 20px; }
  .screen-head h2, .panel-intro h2 { font-size: 23px; }
  .screen-head > p, .panel-intro p { font-size: 14px; }
  .recovery-entry { margin-top: 12px; font-size: 13px; }
  .return-action { margin-bottom: 14px; }
  .field-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
  input, textarea, #codeInput, #codeInput::placeholder { font-size: 16px; }
  input, textarea { padding-inline: 12px; }
  .field-footer { align-items: baseline; gap: 6px; }
  .counter { margin-left: auto; }
  .account-check { padding: 16px; }
  .account-check-heading { align-items: center; }
  .account-check dl > div { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
  .wizard-nav.split { flex-wrap: nowrap; gap: 8px; }
  .wizard-nav.split .button.primary { min-width: 0; flex: 1; }
  .wizard-nav.split .button.ghost { font-size: 13px; }
  .order-panel { padding: 24px 21px; border-radius: 18px; }
  .order-heading { display: grid; gap: 10px; }
  .order-heading h2 { font-size: 23px; }
  .progress-heading { display: grid; gap: 4px; }
  .progress-heading p { text-align: left; }
  .redemption-progress li:not(:last-child)::after { left: calc(50% + 16px); width: calc(100% - 32px); }
  .redemption-progress strong { font-size: 12px; }
  .redemption-progress small { display: none; }
  .order-summary dl > div { grid-template-columns: 48px minmax(0, 1fr); }
  .order-actions { display: flex; }
  .order-actions .button { width: auto; flex: 1 1 auto; }
  .button-row .button { white-space: normal; }
  .recovery-notice { padding: 14px; }
  .guide-hero h1 { font-size: 27px; }
  .guide-hero > p.guide-lead { font-size: 14px; }
  .guide-panel { padding: 17px; }
  .guide-note { padding: 15px 16px; }
  .guide-note li, .guide-panel p, .guide-steps p, .faq details p { font-size: 14px; }
  .guide-steps > li { gap: 12px; }
  .guide-steps h3 { font-size: 16px; }
  .code-card pre { padding: 14px; font-size: 12px; }
  .code-card figcaption { padding: 10px 14px; line-height: 1.7; }
  .faq { padding: 20px 18px 6px; }
  .site-footer { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .button:hover:not(:disabled) { transform: none; }
  :root body[data-page] .reveal-button:active:not(:disabled) { transform: translateY(-50%); }
}
@media (forced-colors: active) {
  .brand-mark-xy { color: CanvasText; forced-color-adjust: none; }
  .stepper .is-current span { outline: 2px solid Highlight; outline-offset: -2px; }
  .redemption-progress .is-current > span { outline: 2px solid Highlight; outline-offset: 2px; }
  .button.primary { border: 1px solid ButtonText; }
}


/* Compact overview: plan names are information, never a second plan selector. */
.redeem-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.redeem-intro .eyebrow { margin: 0 0 4px; font-size: 10px; letter-spacing: .16em; }
.redeem-intro h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 34px); line-height: 1.45; font-weight: 650; letter-spacing: -.04em; }
.redeem-lead { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.plan-catalog { flex-shrink: 0; display: grid; gap: 7px; text-align: right; }
.plan-catalog-label, .plan-catalog-hint { color: var(--muted); font-size: 11px; }
.plan-catalog ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.plan-catalog li { min-width: 49px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--brand-dark); font-size: 12px; font-weight: 650; text-align: center; white-space: nowrap; }
@media (max-width: 640px) {
  .redeem-intro { display: grid; gap: 16px; margin-bottom: 22px; }
  .plan-catalog { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 12px; text-align: left; }
  .plan-catalog ul { gap: 4px; }
  .plan-catalog li { min-width: 0; padding: 4px 6px; font-size: 11px; }
  .plan-catalog-hint { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .account-check-heading { align-items: start; flex-direction: column; gap: 8px; }
  .account-check dl > div { grid-template-columns: 1fr; gap: 2px; }
  .wizard-nav.split { flex-wrap: wrap; }
  .wizard-nav.split .button.primary { flex-basis: 100%; }
}

/* Loading controls stay inside the work area even during viewport changes. */
body[data-page] .button.is-busy { max-inline-size: 100%; }
body[data-page] .button.is-busy > [data-button-label] {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* Consistent form contrast across public pages, login and administration. */
:root {
  --control-bg: #f3f7f4;
  --control-text: #17251d;
  --control-placeholder: #56665c;
  --control-border: #788b7e;
  --control-hover: #526f5d;
  --control-focus: #176b43;
  --control-ring: #176b4333;
  --control-muted-bg: #e6ece8;
  --control-muted-text: #536459;
  --control-error: #b42318;
}
html.dark, :root[data-theme="dark"] {
  --control-bg: #182b22;
  --control-text: #edf7f0;
  --control-placeholder: #b0c3b7;
  --control-border: #718d7c;
  --control-hover: #9eb9a8;
  --control-focus: #78d7a0;
  --control-ring: #78d7a033;
  --control-muted-bg: #26382e;
  --control-muted-text: #afc2b5;
  --control-error: #ffaba3;
}
@media (prefers-color-scheme: dark) {
  :root:not(.dark):not([data-theme="light"]):has(body[data-page]) {
    --control-bg: #182b22; --control-text: #edf7f0;
    --control-placeholder: #b0c3b7; --control-border: #718d7c;
    --control-hover: #9eb9a8; --control-focus: #78d7a0;
    --control-ring: #78d7a033; --control-muted-bg: #26382e;
    --control-muted-text: #afc2b5; --control-error: #ffaba3;
  }
}
/* This sheet loads last. Exclude buttons, switches and plan selection radios. */
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger) {
  color: var(--control-text);
  background-color: var(--control-bg);
  border-color: var(--control-border);
  caret-color: var(--control-focus);
  box-shadow: inset 0 1px 2px #10271b08;
}
html body :is(input, textarea)::placeholder {
  color: var(--control-placeholder);
  opacity: 1;
}
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger):hover:not(:focus):not(:disabled):not([aria-disabled="true"]):not([readonly]) {
  border-color: var(--control-hover);
}
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger):focus {
  border-color: var(--control-focus);
  outline: 2px solid var(--control-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--control-ring);
}
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger):is(:disabled, [aria-disabled="true"], [readonly]) {
  color: var(--control-muted-text);
  -webkit-text-fill-color: var(--control-muted-text);
  background-color: var(--control-muted-bg);
  border-color: var(--control-border);
  box-shadow: none;
  opacity: 1;
}
html body :is(input, textarea, select):disabled,
html body .custom-select-trigger[aria-disabled="true"] { cursor: not-allowed; }
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger)[aria-invalid="true"] {
  border-color: var(--control-error);
  outline-color: var(--control-error);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-error) 17%, transparent);
}
html body input:autofill {
  -webkit-text-fill-color: var(--control-text);
  caret-color: var(--control-focus);
  box-shadow: 0 0 0 1000px var(--control-bg) inset;
}
@media (forced-colors: active) {
  html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger) {
    color: CanvasText; background-color: Canvas; border-color: ButtonText;
    -webkit-text-fill-color: CanvasText; box-shadow: none;
  }
  html body :is(input, textarea)::placeholder { color: GrayText; }
  html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), textarea, select, .custom-select-trigger):focus { outline-color: Highlight; }
}
