/* ═══════════════════════════════════════════════════════════════════════════
   Reseller Project Registration — self-hosted front-end prototype

   COLOR IS NOT INVENTED HERE. Layer 0 and Layer 1 below are copied verbatim
   from force-app/main/default/lwc/h2Theme/h2Theme.css, which is itself
   transcribed from the Synology Color Guide (rev 2021/04/15). Do not retune.

   WHAT IS NEW vs h2Theme
     · A dark ramp. h2Theme has none — it only ever renders on SLDS light.
       Derived toward --syn-cold-gray-6 (#5f6670) so the neutral carries the
       brand's own hue bias instead of reading as flat grey.
     · An upward type scale. h2Theme stops at 22px because it styles dense
       record-page components. A public wizard needs 16px body copy.
     · Nothing else. Radii, spacing, elevation, motion all reused as-is.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ LAYER 0 · SYNOLOGY BRAND CONSTANTS ══════════════════════════════════ */
:root {
  --syn-black:        #000000;
  --syn-white:        #ffffff;
  --syn-gray-6:       #666666;
  --syn-cold-gray-6:  #5f6670;
  --syn-blue-6:       #0067e6;   /* Synology Blue  — primary interactive */
  --syn-green-6:      #26d4ac;   /* Synology Green — complementary      */
  --syn-purple-6:     #3743dd;   /* secondary                           */
  --syn-light-blue-6: #16b8e8;   /* secondary                           */
  --syn-yellow-6:     #fcbf1d;   /* tertiary — max 5% of composition    */
  --syn-orange-6:     #f57000;
  --syn-red-6:        #f53c3c;
}

/* ═══ LAYER 1 · SEMANTIC TOKENS (light) ═══════════════════════════════════ */
:root {
  --h2-blue:        var(--syn-blue-6);
  --h2-blue-ink:    #0967db;
  --h2-blue-hover:  #0058c4;
  --h2-blue-deep:   #0050b3;
  --h2-blue-wash:   #f2f8ff;
  --h2-blue-tint:   #e3f0ff;
  --h2-blue-border: #99c7ff;

  --h2-green:        var(--syn-green-6);
  --h2-green-ink:    #1b7d66;
  --h2-green-tint:   #e7fbf6;
  --h2-green-border: #a9efdf;

  --h2-purple:     var(--syn-purple-6);
  --h2-purple-ink: #3c47d6;

  --h2-yellow:        var(--syn-yellow-6);
  --h2-yellow-ink:    #8e6908;
  --h2-yellow-tint:   #fff7e3;
  --h2-yellow-border: #fee29a;

  --h2-red:        var(--syn-red-6);
  --h2-red-ink:    #c72626;
  --h2-red-tint:   #feecec;
  --h2-red-border: #fa9e9e;

  --h2-ink:      #1a1f36;   /* 16.24:1 */
  --h2-mid:      #54607a;   /*  6.30:1 */
  --h2-muted:    #637289;   /*  4.89:1 */
  --h2-on-brand: var(--syn-white);

  --h2-canvas:    #f5f7fa;
  --h2-solid:     var(--syn-white);
  --h2-wash:      #f8faff;
  --h2-tint:      #f0f4ff;
  --h2-tint-deep: #e3f0ff;

  --h2-glass-top:    rgba(255, 255, 255, 0.94);
  --h2-glass-bottom: rgba(246, 249, 255, 0.90);
  --h2-glass-edge:   rgba(255, 255, 255, 0.86);
  --h2-glass-blur:   blur(20px) saturate(140%);

  --h2-ambient-blue:  rgba(0, 103, 230, 0.10);
  --h2-ambient-green: rgba(38, 212, 172, 0.10);

  --h2-line:        #e3e8f0;
  --h2-line-strong: #d0d9e8;
  --h2-line-faint:  #f0f3f8;
  --h2-line-glass:  rgba(143, 160, 190, 0.22);

  --h2-page-bg: linear-gradient(160deg, #eef3fb 0%, #e6edf8 100%);
  --h2-field-bg: var(--syn-white);
  --h2-rail-empty: #dbe3ef;
  --h2-code-bg: #101728;
  --h2-code-fg: #cfe0ff;

  /* Radii, spacing, elevation, motion — unchanged from h2Theme */
  --h2-radius-xs: 4px;  --h2-radius-sm: 6px;  --h2-radius-md: 8px;
  --h2-radius-lg: 13px; --h2-radius-xl: 16px; --h2-radius-2xl: 20px;
  --h2-radius-pill: 999px;

  --h2-sp-1: 4px;  --h2-sp-2: 6px;  --h2-sp-3: 8px;  --h2-sp-4: 12px;
  --h2-sp-5: 14px; --h2-sp-6: 16px; --h2-sp-7: 20px; --h2-sp-8: 24px;
  --h2-sp-9: 32px; --h2-sp-10: 44px;

  --h2-shadow-flat:   0 1px 3px rgba(0, 0, 0, 0.06);
  --h2-shadow-raised: 0 10px 22px -20px rgba(26, 31, 54, 0.7),
                      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --h2-shadow-glass:  0 22px 58px -38px rgba(22, 48, 95, 0.50),
                      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --h2-glow:       0 4px 14px rgba(0, 103, 230, 0.28);
  --h2-glow-hover: 0 6px 18px rgba(0, 103, 230, 0.36);
  --h2-glow-brand: linear-gradient(135deg, var(--h2-blue) 0%, var(--h2-purple) 100%);

  --h2-ease: 0.12s ease;
  --h2-ease-slow: 0.15s ease;

  /* Type — h2Theme's scale, extended upward for public web */
  --h2-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --h2-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --h2-fs-micro: 10px;  --h2-fs-tiny: 11px;  --h2-fs-sm: 12px;
  --h2-fs-base: 13px;   --h2-fs-md: 14px;    --h2-fs-body: 16px;
  --h2-fs-lg: 18px;     --h2-fs-xl: 21px;    --h2-fs-display: 30px;

  --h2-fw-normal: 500; --h2-fw-semi: 600; --h2-fw-bold: 700; --h2-fw-heavy: 800;
  --h2-track-eyebrow: 0.09em;
}

/* ═══ DARK RAMP ═══════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --h2-blue-ink:    #6cb0ff;   /* 7.1:1 on --h2-solid */
    --h2-blue-hover:  #3d8fff;
    --h2-blue-wash:   #16203a;
    --h2-blue-tint:   #1b2b4d;
    --h2-blue-border: #2f4d80;

    --h2-green-ink:    #3fe0bb;
    --h2-green-tint:   #123029;
    --h2-green-border: #1f5c4c;

    --h2-purple-ink: #8b93f2;

    --h2-yellow-ink:    #f2c552;
    --h2-yellow-tint:   #33280d;
    --h2-yellow-border: #6b5518;

    --h2-red-ink:    #ff8585;
    --h2-red-tint:   #3a1a1a;
    --h2-red-border: #7a3232;

    --h2-ink:   #e9edf6;
    --h2-mid:   #a7b3c8;
    --h2-muted: #8b98ae;

    --h2-canvas:    #0e121a;
    --h2-solid:     #171d28;
    --h2-wash:      #1c2431;
    --h2-tint:      #1b2540;
    --h2-tint-deep: #1f2c4d;

    --h2-glass-top:    rgba(26, 33, 46, 0.90);
    --h2-glass-bottom: rgba(19, 25, 36, 0.86);
    --h2-glass-edge:   rgba(120, 138, 170, 0.16);

    --h2-ambient-blue:  rgba(77, 155, 255, 0.13);
    --h2-ambient-green: rgba(63, 224, 187, 0.10);

    --h2-line:        #28313f;
    --h2-line-strong: #3a4657;
    --h2-line-faint:  #1f2733;
    --h2-line-glass:  rgba(120, 138, 170, 0.18);

    --h2-page-bg: linear-gradient(160deg, #0d111a 0%, #121826 100%);
    --h2-field-bg: #1d2532;
    --h2-rail-empty: #2c3646;
    --h2-code-bg: #0a0f1a;

    --h2-shadow-flat:   0 1px 3px rgba(0, 0, 0, 0.4);
    --h2-shadow-raised: 0 10px 22px -18px rgba(0, 0, 0, 0.9),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --h2-shadow-glass:  0 22px 58px -34px rgba(0, 0, 0, 0.8),
                        inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

/* Viewer toggle must win in both directions */
:root[data-theme="dark"] {
  --h2-blue-ink: #6cb0ff; --h2-blue-hover: #3d8fff; --h2-blue-wash: #16203a;
  --h2-blue-tint: #1b2b4d; --h2-blue-border: #2f4d80;
  --h2-green-ink: #3fe0bb; --h2-green-tint: #123029; --h2-green-border: #1f5c4c;
  --h2-purple-ink: #8b93f2;
  --h2-yellow-ink: #f2c552; --h2-yellow-tint: #33280d; --h2-yellow-border: #6b5518;
  --h2-red-ink: #ff8585; --h2-red-tint: #3a1a1a; --h2-red-border: #7a3232;
  --h2-ink: #e9edf6; --h2-mid: #a7b3c8; --h2-muted: #8b98ae;
  --h2-canvas: #0e121a; --h2-solid: #171d28; --h2-wash: #1c2431;
  --h2-tint: #1b2540; --h2-tint-deep: #1f2c4d;
  --h2-glass-top: rgba(26, 33, 46, 0.90);
  --h2-glass-bottom: rgba(19, 25, 36, 0.86);
  --h2-glass-edge: rgba(120, 138, 170, 0.16);
  --h2-ambient-blue: rgba(77, 155, 255, 0.13);
  --h2-ambient-green: rgba(63, 224, 187, 0.10);
  --h2-line: #28313f; --h2-line-strong: #3a4657; --h2-line-faint: #1f2733;
  --h2-line-glass: rgba(120, 138, 170, 0.18);
  --h2-page-bg: linear-gradient(160deg, #0d111a 0%, #121826 100%);
  --h2-field-bg: #1d2532; --h2-rail-empty: #2c3646; --h2-code-bg: #0a0f1a;
  --h2-shadow-flat: 0 1px 3px rgba(0, 0, 0, 0.4);
  --h2-shadow-raised: 0 10px 22px -18px rgba(0, 0, 0, 0.9),
                      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --h2-shadow-glass: 0 22px 58px -34px rgba(0, 0, 0, 0.8),
                     inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] {
  --h2-blue-ink: #0967db; --h2-blue-hover: #0058c4; --h2-blue-wash: #f2f8ff;
  --h2-blue-tint: #e3f0ff; --h2-blue-border: #99c7ff;
  --h2-green-ink: #1b7d66; --h2-green-tint: #e7fbf6; --h2-green-border: #a9efdf;
  --h2-purple-ink: #3c47d6;
  --h2-yellow-ink: #8e6908; --h2-yellow-tint: #fff7e3; --h2-yellow-border: #fee29a;
  --h2-red-ink: #c72626; --h2-red-tint: #feecec; --h2-red-border: #fa9e9e;
  --h2-ink: #1a1f36; --h2-mid: #54607a; --h2-muted: #637289;
  --h2-canvas: #f5f7fa; --h2-solid: #ffffff; --h2-wash: #f8faff;
  --h2-tint: #f0f4ff; --h2-tint-deep: #e3f0ff;
  --h2-glass-top: rgba(255, 255, 255, 0.94);
  --h2-glass-bottom: rgba(246, 249, 255, 0.90);
  --h2-glass-edge: rgba(255, 255, 255, 0.86);
  --h2-ambient-blue: rgba(0, 103, 230, 0.10);
  --h2-ambient-green: rgba(38, 212, 172, 0.10);
  --h2-line: #e3e8f0; --h2-line-strong: #d0d9e8; --h2-line-faint: #f0f3f8;
  --h2-line-glass: rgba(143, 160, 190, 0.22);
  --h2-page-bg: linear-gradient(160deg, #eef3fb 0%, #e6edf8 100%);
  --h2-field-bg: #ffffff; --h2-rail-empty: #dbe3ef; --h2-code-bg: #101728;
  --h2-shadow-flat: 0 1px 3px rgba(0, 0, 0, 0.06);
  --h2-shadow-raised: 0 10px 22px -20px rgba(26, 31, 54, 0.7),
                      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --h2-shadow-glass: 0 22px 58px -38px rgba(22, 48, 95, 0.50),
                     inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

/* ═══ PAGE ════════════════════════════════════════════════════════════════ */
.page {
  font-family: var(--h2-font);
  font-size: var(--h2-fs-body);
  color: var(--h2-ink);
  background: var(--h2-page-bg);
  min-height: 100vh;
  padding: var(--h2-sp-8) var(--h2-sp-6) var(--h2-sp-10);
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--h2-sp-7); }

/* ── Masthead ─────────────────────────────────────────────────────────── */
.masthead { display: flex; align-items: center; gap: var(--h2-sp-5); flex-wrap: wrap; }

/* The signature 4px Blue→Purple bar from h2Theme's .h2-logo-mark */
.logo-mark {
  width: 4px; height: 46px; flex: 0 0 auto;
  border-radius: var(--h2-radius-pill);
  background: linear-gradient(180deg, var(--h2-blue) 0%, var(--h2-purple) 100%);
  box-shadow: 0 5px 16px -6px rgba(0, 103, 230, 0.76);
}

.eyebrow {
  margin: 0 0 2px; color: var(--h2-muted);
  font-size: var(--h2-fs-tiny); font-weight: var(--h2-fw-heavy);
  letter-spacing: var(--h2-track-eyebrow); text-transform: uppercase;
}
.masthead h1 {
  margin: 0; font-size: var(--h2-fs-xl); font-weight: var(--h2-fw-heavy);
  line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance;
}
.masthead-spacer { flex: 1 1 auto; }

.support-note {
  font-size: var(--h2-fs-sm); color: var(--h2-muted);
  text-align: right; line-height: 1.5;
}
.support-note a { color: var(--h2-blue-ink); text-decoration: none; font-weight: var(--h2-fw-semi); }
.support-note a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Surface ──────────────────────────────────────────────────────────── */
.surface {
  position: relative; overflow: hidden;
  border: 1px solid var(--h2-glass-edge);
  border-radius: var(--h2-radius-2xl);
  background: linear-gradient(135deg, var(--h2-glass-top), var(--h2-glass-bottom));
  box-shadow: var(--h2-shadow-glass);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .surface { backdrop-filter: var(--h2-glass-blur); -webkit-backdrop-filter: var(--h2-glass-blur); }
}

.ambient {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.ambient--blue  { top: -190px; right: -120px; background: radial-gradient(circle, var(--h2-ambient-blue), transparent 70%); }
.ambient--green { bottom: -220px; left: -140px; background: radial-gradient(circle, var(--h2-ambient-green), transparent 70%); }

@media (prefers-reduced-transparency: reduce) {
  .surface { background: var(--h2-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ambient { display: none; }
}

.body-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 232px 1fr;
}

/* ── Step rail ────────────────────────────────────────────────────────────
   The gradient bar doubles as the progress line: its filled height is the
   share of steps completed. Progress is real information, so the brand's
   own device carries it rather than a separate decorative element.        */
.rail {
  position: relative;
  padding: var(--h2-sp-8) var(--h2-sp-6) var(--h2-sp-8) var(--h2-sp-8);
  border-right: 1px solid var(--h2-line-glass);
  background: rgba(255, 255, 255, 0.24);
}
:root[data-theme="dark"] .rail { background: rgba(255, 255, 255, 0.02); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rail { background: rgba(255, 255, 255, 0.02); }
}

.rail-track {
  position: absolute; left: 33px; top: 42px; bottom: 42px;
  width: 3px; border-radius: var(--h2-radius-pill);
  background: var(--h2-rail-empty);
}
.rail-fill {
  position: absolute; left: 0; top: 0; width: 3px;
  border-radius: var(--h2-radius-pill);
  background: linear-gradient(180deg, var(--h2-blue) 0%, var(--h2-purple) 100%);
  box-shadow: 0 0 12px -2px rgba(0, 103, 230, 0.6);
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--h2-sp-7); }

.rail-item {
  position: relative; display: flex; align-items: center; gap: var(--h2-sp-4);
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; text-align: left; width: 100%;
  color: var(--h2-muted); cursor: pointer;
  transition: color var(--h2-ease);
}
.rail-item:disabled { cursor: not-allowed; opacity: 0.55; }
.rail-item:not(:disabled):hover { color: var(--h2-mid); }

.rail-dot {
  flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%;
  background: var(--h2-rail-empty);
  box-shadow: 0 0 0 4px var(--h2-glass-top);
  transition: background var(--h2-ease), transform var(--h2-ease);
}
.rail-item[data-state="done"] .rail-dot { background: var(--h2-green); }
.rail-item[data-state="current"] .rail-dot { background: var(--h2-blue); transform: scale(1.35); }

.rail-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rail-name { font-size: var(--h2-fs-md); font-weight: var(--h2-fw-semi); }
.rail-item[data-state="current"] .rail-name { color: var(--h2-blue-ink); font-weight: var(--h2-fw-bold); }
.rail-item[data-state="done"] .rail-name { color: var(--h2-mid); }
.rail-hint {
  font-size: var(--h2-fs-tiny); color: var(--h2-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px;
}

/* ── Panel ────────────────────────────────────────────────────────────── */
.panel { padding: var(--h2-sp-9) var(--h2-sp-9) var(--h2-sp-8); min-width: 0; }

.panel-head { margin-bottom: var(--h2-sp-8); }
.panel-head h2 {
  margin: 0; font-size: var(--h2-fs-lg); font-weight: var(--h2-fw-heavy);
  letter-spacing: -0.01em; text-wrap: balance;
}
.panel-head p {
  margin: var(--h2-sp-2) 0 0; color: var(--h2-mid);
  font-size: var(--h2-fs-md); line-height: 1.55; max-width: 60ch;
}

.step { display: none; flex-direction: column; gap: var(--h2-sp-7); }
.step.is-active { display: flex; animation: rise 0.28s cubic-bezier(0.2, 0, 0.2, 1); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .step.is-active { animation: none; }
  .rail-fill { transition: none; }
}

/* ── Fields ───────────────────────────────────────────────────────────── */
.fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--h2-sp-6); }

.legend {
  display: flex; align-items: baseline; gap: var(--h2-sp-3);
  font-size: var(--h2-fs-tiny); font-weight: var(--h2-fw-heavy);
  letter-spacing: var(--h2-track-eyebrow); text-transform: uppercase;
  color: var(--h2-muted);
  padding-bottom: var(--h2-sp-3); border-bottom: 1px solid var(--h2-line);
  width: 100%;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--h2-sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--h2-sp-6); }
.span-2 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: var(--h2-sp-2); min-width: 0; }

.field > label, .field-label {
  font-size: var(--h2-fs-sm); font-weight: var(--h2-fw-semi); color: var(--h2-mid);
  display: flex; align-items: center; gap: var(--h2-sp-2);
}
.req { color: var(--h2-red-ink); font-weight: var(--h2-fw-bold); }
.opt { color: var(--h2-muted); font-weight: var(--h2-fw-normal); font-size: var(--h2-fs-tiny); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="date"], input[type="number"], select, textarea {
  font-family: inherit; font-size: var(--h2-fs-md); color: var(--h2-ink);
  background: var(--h2-field-bg);
  border: 1px solid var(--h2-line-strong);
  border-radius: var(--h2-radius-sm);
  padding: 9px 11px; width: 100%; box-sizing: border-box;
  transition: border-color var(--h2-ease), box-shadow var(--h2-ease);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--h2-blue);
  box-shadow: 0 0 0 3px var(--h2-blue-tint);
}
input::placeholder, textarea::placeholder { color: var(--h2-muted); opacity: 0.75; }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--h2-muted) 50%),
                    linear-gradient(135deg, var(--h2-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 32px;
}

.field-help { font-size: var(--h2-fs-tiny); color: var(--h2-muted); line-height: 1.5; }
.field-error { font-size: var(--h2-fs-tiny); color: var(--h2-red-ink); font-weight: var(--h2-fw-semi); display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--h2-red); }
.field.has-error .field-error { display: block; }

/* ── Choice chips ─────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: var(--h2-sp-3); }

.chip {
  position: relative; display: inline-flex; align-items: center; gap: var(--h2-sp-2);
  border: 1px solid var(--h2-line-strong); border-radius: var(--h2-radius-pill);
  background: var(--h2-field-bg); color: var(--h2-mid);
  font-size: var(--h2-fs-base); font-weight: var(--h2-fw-semi);
  padding: 7px 15px; cursor: pointer;
  transition: all var(--h2-ease);
}
.chip:hover { border-color: var(--h2-blue-border); background: var(--h2-tint); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) {
  background: var(--h2-blue-tint); border-color: var(--h2-blue);
  color: var(--h2-blue-ink);
}
.chip:has(input:focus-visible) { outline: 2px solid var(--h2-blue); outline-offset: 2px; }

/* Yes/No pair — tighter, so a wall of them stays scannable */
.yesno { display: flex; gap: var(--h2-sp-2); }
.yesno .chip { padding: 6px 18px; font-size: var(--h2-fs-sm); }
.yesno .chip:has(input:checked) { box-shadow: inset 0 0 0 1px var(--h2-blue); }

.workload-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: var(--h2-sp-4);
  padding: var(--h2-sp-4) 0;
  border-bottom: 1px solid var(--h2-line-faint);
}
.workload-row:last-child { border-bottom: none; }
.workload-name { font-size: var(--h2-fs-md); font-weight: var(--h2-fw-semi); color: var(--h2-ink); }
.workload-desc { font-size: var(--h2-fs-tiny); color: var(--h2-muted); margin-top: 1px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  border: 1px solid var(--h2-blue); border-radius: var(--h2-radius-pill);
  background: var(--h2-blue); color: var(--h2-on-brand);
  font-family: inherit; font-size: var(--h2-fs-md); font-weight: var(--h2-fw-semi);
  padding: 9px 22px; cursor: pointer; white-space: nowrap;
  transition: all var(--h2-ease-slow);
}
.btn:hover:not(:disabled) { background: var(--h2-blue-hover); border-color: var(--h2-blue-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--secondary { background: var(--h2-field-bg); color: var(--h2-blue-ink); }
.btn--secondary:hover:not(:disabled) { background: var(--h2-tint); border-color: var(--h2-blue); color: var(--h2-blue-ink); }

.btn--ghost {
  border: none; background: none; color: var(--h2-muted);
  font-size: var(--h2-fs-sm); padding: 6px 8px;
  text-decoration: underline; text-underline-offset: 2px;
}
.btn--ghost:hover { color: var(--h2-mid); }

/* One glowing element per view — it marks the single primary action. */
.btn--glow {
  background: var(--h2-glow-brand); border-color: transparent;
  color: var(--h2-on-brand); box-shadow: var(--h2-glow);
  transition: box-shadow var(--h2-ease-slow), transform var(--h2-ease-slow);
}
.btn--glow:hover:not(:disabled) { box-shadow: var(--h2-glow-hover); transform: translateY(-1px); }
.btn--glow:active:not(:disabled) { transform: none; box-shadow: var(--h2-glow); }

.btn:focus-visible, .rail-item:focus-visible, .btn--ghost:focus-visible,
.theme-toggle:focus-visible, .drawer-toggle:focus-visible {
  outline: 2px solid var(--h2-blue); outline-offset: 2px; border-radius: var(--h2-radius-sm);
}

.actions {
  display: flex; align-items: center; gap: var(--h2-sp-4);
  padding-top: var(--h2-sp-7); margin-top: var(--h2-sp-2);
  border-top: 1px solid var(--h2-line-glass);
}
.actions-spacer { flex: 1 1 auto; }
.actions-note { font-size: var(--h2-fs-tiny); color: var(--h2-muted); }

/* ── Banner ───────────────────────────────────────────────────────────── */
.banner {
  display: flex; gap: var(--h2-sp-4);
  border: 1px solid; border-left-width: 3px;
  border-radius: var(--h2-radius-md);
  padding: var(--h2-sp-5) var(--h2-sp-6);
  font-size: var(--h2-fs-md); line-height: 1.55;
}
.banner strong { display: block; margin-bottom: 2px; font-weight: var(--h2-fw-bold); }
.banner--info    { background: var(--h2-blue-tint);   border-color: var(--h2-blue-border);   border-left-color: var(--h2-blue);   color: var(--h2-blue-ink); }
.banner--success { background: var(--h2-green-tint);  border-color: var(--h2-green-border);  border-left-color: var(--h2-green);  color: var(--h2-green-ink); }
.banner--warning { background: var(--h2-yellow-tint); border-color: var(--h2-yellow-border); border-left-color: var(--syn-orange-6); color: var(--h2-yellow-ink); }
.banner--danger  { background: var(--h2-red-tint);    border-color: var(--h2-red-border);    border-left-color: var(--h2-red);    color: var(--h2-red-ink); }

/* ── OTP ──────────────────────────────────────────────────────────────── */
.otp-row { display: flex; gap: var(--h2-sp-3); }
.otp-box {
  width: 52px; height: 60px; text-align: center;
  font-size: var(--h2-fs-xl); font-weight: var(--h2-fw-bold);
  font-variant-numeric: tabular-nums;
  padding: 0; border-radius: var(--h2-radius-md);
}
.otp-meta { display: flex; align-items: center; gap: var(--h2-sp-5); font-size: var(--h2-fs-sm); color: var(--h2-muted); }
.otp-timer { font-variant-numeric: tabular-nums; font-weight: var(--h2-fw-semi); color: var(--h2-mid); }

/* ── Product picker ───────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.results {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 268px; overflow-y: auto;
  background: var(--h2-solid);
  border: 1px solid var(--h2-line-strong); border-radius: var(--h2-radius-md);
  box-shadow: var(--h2-shadow-raised);
  display: none;
}
.results.is-open { display: block; }
.result {
  display: flex; align-items: baseline; gap: var(--h2-sp-4);
  padding: 10px var(--h2-sp-5); cursor: pointer;
  border-bottom: 1px solid var(--h2-line-faint);
}
.result:last-child { border-bottom: none; }
.result:hover, .result.is-cursor { background: var(--h2-wash); }
.result-sku {
  font-family: var(--h2-font-mono); font-size: var(--h2-fs-sm);
  font-weight: var(--h2-fw-bold); color: var(--h2-blue-ink);
  flex: 0 0 118px;
}
.result-name { font-size: var(--h2-fs-base); color: var(--h2-mid); }
.results-empty { padding: var(--h2-sp-6); font-size: var(--h2-fs-md); color: var(--h2-muted); text-align: center; }

.cart { border: 1px solid var(--h2-line); border-radius: var(--h2-radius-md); overflow: hidden; background: var(--h2-solid); }
.cart-head {
  display: grid; grid-template-columns: 122px 1fr 92px 36px;
  gap: var(--h2-sp-4); align-items: center;
  padding: var(--h2-sp-4) var(--h2-sp-5);
  background: var(--h2-wash); border-bottom: 1px solid var(--h2-line);
  font-size: var(--h2-fs-micro); font-weight: var(--h2-fw-heavy);
  letter-spacing: var(--h2-track-eyebrow); text-transform: uppercase; color: var(--h2-muted);
}
.cart-row {
  display: grid; grid-template-columns: 122px 1fr 92px 36px;
  gap: var(--h2-sp-4); align-items: center;
  padding: var(--h2-sp-4) var(--h2-sp-5);
  border-bottom: 1px solid var(--h2-line-faint);
}
.cart-row:last-child { border-bottom: none; }
.cart-sku { font-family: var(--h2-font-mono); font-size: var(--h2-fs-sm); font-weight: var(--h2-fw-bold); color: var(--h2-ink); }
.cart-name { font-size: var(--h2-fs-base); color: var(--h2-mid); }
.cart-row input { padding: 6px 8px; font-size: var(--h2-fs-base); text-align: center; font-variant-numeric: tabular-nums; }
.cart-empty { padding: var(--h2-sp-8); text-align: center; font-size: var(--h2-fs-md); color: var(--h2-muted); }

.icon-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--h2-line-strong); border-radius: var(--h2-radius-sm);
  background: var(--h2-solid); color: var(--h2-muted);
  font-size: 16px; line-height: 1; cursor: pointer; transition: all var(--h2-ease);
}
.icon-btn:hover { border-color: var(--h2-red-border); background: var(--h2-red-tint); color: var(--h2-red-ink); }
.icon-btn:focus-visible { outline: 2px solid var(--h2-blue); outline-offset: 2px; }

.affinity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--h2-sp-3); }
.affinity-lbl { font-size: var(--h2-fs-tiny); font-weight: var(--h2-fw-heavy); letter-spacing: var(--h2-track-eyebrow); text-transform: uppercase; color: var(--h2-muted); }
.affinity-chip {
  border: 1px dashed var(--h2-green-border); border-radius: var(--h2-radius-pill);
  background: var(--h2-green-tint); color: var(--h2-green-ink);
  font-family: var(--h2-font-mono); font-size: var(--h2-fs-sm); font-weight: var(--h2-fw-bold);
  padding: 5px 13px; cursor: pointer; transition: all var(--h2-ease);
}
.affinity-chip:hover { border-style: solid; }
.affinity-chip:focus-visible { outline: 2px solid var(--h2-blue); outline-offset: 2px; }

/* ── Review ───────────────────────────────────────────────────────────── */
.review-group { display: flex; flex-direction: column; gap: var(--h2-sp-4); }
.review-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--h2-sp-4);
  padding-bottom: var(--h2-sp-3); border-bottom: 1px solid var(--h2-line);
}
.review-hd h3 {
  margin: 0; font-size: var(--h2-fs-tiny); font-weight: var(--h2-fw-heavy);
  letter-spacing: var(--h2-track-eyebrow); text-transform: uppercase; color: var(--h2-muted);
}
.review-list { display: grid; grid-template-columns: 190px 1fr; gap: var(--h2-sp-3) var(--h2-sp-6); }
.review-k { font-size: var(--h2-fs-sm); color: var(--h2-muted); }
.review-v { font-size: var(--h2-fs-md); color: var(--h2-ink); font-weight: var(--h2-fw-semi); overflow-wrap: anywhere; }
.review-v--empty { color: var(--h2-muted); font-weight: var(--h2-fw-normal); font-style: italic; }

/* ── Payload drawer ───────────────────────────────────────────────────── */
.drawer { display: flex; flex-direction: column; gap: var(--h2-sp-4); }
.drawer-toggle {
  align-self: flex-start;
  border: 1px solid var(--h2-line-strong); border-radius: var(--h2-radius-pill);
  background: var(--h2-field-bg); color: var(--h2-mid);
  font-family: inherit; font-size: var(--h2-fs-sm); font-weight: var(--h2-fw-semi);
  padding: 6px 14px; cursor: pointer; transition: all var(--h2-ease);
}
.drawer-toggle:hover { border-color: var(--h2-blue-border); color: var(--h2-blue-ink); }
.drawer-body { display: none; }
.drawer-body.is-open { display: block; }
pre.payload {
  margin: 0; padding: var(--h2-sp-6);
  background: var(--h2-code-bg); color: var(--h2-code-fg);
  border-radius: var(--h2-radius-md);
  font-family: var(--h2-font-mono); font-size: var(--h2-fs-sm); line-height: 1.65;
  overflow-x: auto;
}

/* ── Done ─────────────────────────────────────────────────────────────── */
.done { display: flex; flex-direction: column; align-items: center; gap: var(--h2-sp-6); padding: var(--h2-sp-9) 0 var(--h2-sp-7); text-align: center; }
.done-mark {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--h2-green-tint); border: 1px solid var(--h2-green-border);
  color: var(--h2-green-ink); font-size: 28px; font-weight: var(--h2-fw-bold);
}
.done h2 { margin: 0; font-size: var(--h2-fs-xl); font-weight: var(--h2-fw-heavy); }
.done p { margin: 0; max-width: 52ch; color: var(--h2-mid); font-size: var(--h2-fs-md); line-height: 1.6; }
.done-ref {
  font-family: var(--h2-font-mono); font-size: var(--h2-fs-lg); font-weight: var(--h2-fw-bold);
  color: var(--h2-ink); background: var(--h2-tint);
  border: 1px solid var(--h2-blue-border); border-radius: var(--h2-radius-md);
  padding: var(--h2-sp-4) var(--h2-sp-7); letter-spacing: 0.04em;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--h2-sp-5); flex-wrap: wrap;
  font-size: var(--h2-fs-sm); color: var(--h2-muted);
}
.footer-note { max-width: 62ch; line-height: 1.55; }
.theme-toggle {
  border: 1px solid var(--h2-line-strong); border-radius: var(--h2-radius-pill);
  background: var(--h2-field-bg); color: var(--h2-mid);
  font-family: inherit; font-size: var(--h2-fs-sm); font-weight: var(--h2-fw-semi);
  padding: 6px 14px; cursor: pointer; transition: all var(--h2-ease);
}
.theme-toggle:hover { border-color: var(--h2-blue-border); color: var(--h2-blue-ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .page { padding: var(--h2-sp-6) var(--h2-sp-4) var(--h2-sp-9); }
  .body-grid { grid-template-columns: 1fr; }
  .rail {
    border-right: none; border-bottom: 1px solid var(--h2-line-glass);
    padding: var(--h2-sp-6);
    overflow-x: auto;
  }
  .rail-track, .rail-fill { display: none; }
  .rail-list { flex-direction: row; gap: var(--h2-sp-6); min-width: max-content; }
  .rail-hint { display: none; }
  .rail-name { font-size: var(--h2-fs-sm); }
  .panel { padding: var(--h2-sp-7) var(--h2-sp-6) var(--h2-sp-7); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .review-list { grid-template-columns: 1fr; gap: var(--h2-sp-1) 0; }
  .review-v { margin-bottom: var(--h2-sp-3); }
  .cart-head { display: none; }
  .cart-row { grid-template-columns: 1fr auto; grid-template-areas: "sku del" "name name" "qty qty"; gap: var(--h2-sp-2); }
  .cart-sku { grid-area: sku; } .cart-name { grid-area: name; }
  .cart-qty { grid-area: qty; } .cart-del { grid-area: del; }
  .cart-qty input { max-width: 88px; }
  .support-note { text-align: left; }
  .otp-box { width: 44px; height: 54px; font-size: var(--h2-fs-lg); }
}
