/* ============================================================================
   DREAM — the Dream Clean direction, forked from SIGNAL
   ----------------------------------------------------------------------------
   Approved by Jessica 2026-08-15. Structure, spacing, type and the two-material
   system are SIGNAL's, unchanged. The accent is the Dream Clean brand blue
   (sampled from the logo render: face #4F88F4, shade #3D72E2), and every rule
   that assumed a LIGHT accent flips its text logic: the blue canvas carries
   paper text, the way SIGNAL's ink surface does. Deltas from signal.css are
   marked "DC:".
   ============================================================================
   SIGNAL — a locked design direction
   ----------------------------------------------------------------------------
   Point of view : a billboard bolted to an instrument panel.
   The one tension: poster-scale condensed display type on a full-bleed
   saturated canvas, sitting directly beside quiet, dense, high-precision app
   chrome. Loud outside, cold inside — same system, one attribute apart.

   Structural DNA borrowed from rilla.com: accent-as-canvas (the brand colour
   used as an entire page field, not a button), oversized condensed uppercase
   display type, black-on-accent action buttons, soft-glow inset cards that sit
   IN the canvas rather than on top of it, generous 18/26px radii.
   Palette, type and component contract are our own.

   EVERY selector below is scoped under [data-theme="dream"].
   Rule bodies are frozen once approved — the only legal edit is namespacing.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKEN CONTRACT
   Every direction in this system must define these exact custom-property
   names. That contract is what makes switching directions a one-line change.
   Values below are the SIGNAL direction's answers.
   ------------------------------------------------------------------------ */

[data-theme="dream"] {
  /* --- brand constants (never re-declared by a surface) ------------------ */
  --ink:            #0B0B0C;
  --paper:          #F4F2ED;
  --signal:         #3560D2;  /* DC: brand blue, 5.0:1 against --paper */
  --signal-deep:    #2647A8;
  --signal-tint:    #4F88F4;

  /* --- canvas ----------------------------------------------------------- */
  --canvas:         var(--paper);

  /* --- materials — the two-material system ------------------------------ */
  /* raised: sits up out of the canvas. Default for anything interactive
     or containing content. */
  --raised-fill:    #FFFFFF;
  --raised-border:  rgba(11, 11, 12, 0.10);
  --raised-hi:      inset 0 1px 0 rgba(255, 255, 255, 0.90);
  --raised-in:      inset 0 -1px 0 rgba(11, 11, 12, 0.05);
  --raised-drop:    0 1px 2px rgba(11, 11, 12, 0.05),
                    0 10px 28px -14px rgba(11, 11, 12, 0.22);

  /* recessed: pressed into the canvas. The ONLY expression of
     active / selected / current. There is no third material. */
  --recess-fill:    #E6E3DB;
  --recess-hi:      inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --recess-in:      inset 0 2px 6px rgba(11, 11, 12, 0.11);

  /* --- text tiers ------------------------------------------------------- */
  /* Tiers are contrast-solved, not eyeballed. Against the darkest light
     surface (--recess-fill) mid = 7.5:1 and low = 5.1:1. faint is 4.5:1
     against --raised-fill and is legal ONLY for placeholder text and
     decorative glyphs sitting on a raised surface. */
  --t-hi:           #0B0B0C;
  --t-mid:          #46453F;
  --t-low:          #5F5E57;
  --t-faint:        #78776F;

  /* --- lines ------------------------------------------------------------ */
  --line:           rgba(11, 11, 12, 0.13);
  --line-2:         rgba(11, 11, 12, 0.06);

  /* --- action (flips per surface — see §2) ------------------------------ */
  --act-fill:       var(--ink);
  --act-text:       var(--paper);
  --act-fill-hov:   #23232A;
  --focus:          var(--signal);

  /* --- radius scale + blur ---------------------------------------------- */
  --r-pill:         999px;
  --r-xl:           26px;
  --r-lg:           18px;
  --r-md:           12px;
  --r-sm:           8px;
  --blur:           14px;

  /* --- type ------------------------------------------------------------- */
  /* display font — hero numbers and section titles ONLY. Never body,
     never labels, never data. */
  --display:        "Anton", "Haettenschweiler", "Arial Narrow", sans-serif;
  /* everything else, including all numbers */
  --ui:             "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont,
                    "Segoe UI", Roboto, sans-serif;

  /* type scale */
  --fs-display-xl:  clamp(3.5rem, 13.5vw, 11rem);
  --fs-display-l:   clamp(2.75rem, 8vw, 6rem);
  --fs-display-m:   clamp(2rem, 4.5vw, 3.25rem);
  --fs-h1:          clamp(1.75rem, 3vw, 2.5rem);
  --fs-h2:          1.5rem;
  --fs-h3:          1.125rem;
  --fs-body:        0.9375rem;
  --fs-sm:          0.8125rem;
  --fs-xs:          0.75rem;
  --fs-micro:       0.6875rem;

  /* --- space scale ------------------------------------------------------ */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

  /* --- motion ----------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur:  150ms;
}

/* ---------------------------------------------------------------------------
   READING SCALE  —  data-scale="editorial"
   Approved 2026-08-15.

   The default scale above is sized for app chrome: 15px body, 11px eyebrow,
   correct for the dense instrument-panel half of this direction. Long-form
   editorial surfaces — a personal site, an essay, a case study — are read at
   arm's length and need a larger reading tier.

   This does NOT replace the default. Opt in per document:
       <html data-theme="dream" data-scale="editorial">
   Display sizes are deliberately untouched; the poster voice is already right.
   Only the reading tiers and the two rule bodies that hard-code a size move.
   ------------------------------------------------------------------------ */

[data-theme="dream"][data-scale="editorial"] {
  --fs-body:  1.0625rem;   /* 17px — was .9375rem */
  --fs-sm:    0.9375rem;   /* 15px — was .8125rem */
  --fs-xs:    0.875rem;    /* 14px — was .75rem   */
  --fs-micro: 0.8125rem;   /* 13px — was .6875rem */
  --fs-h3:    1.25rem;     /*      — was 1.125rem */
  --fs-h2:    1.75rem;     /*      — was 1.5rem   */
}

/* .lede sizes itself with a literal clamp rather than a token, so it needs a
   rule of its own here. */
[data-theme="dream"][data-scale="editorial"] .lede {
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
}

/* Eyebrows carry heavy tracking; at the larger size they read better with
   slightly less of it. */
[data-theme="dream"][data-scale="editorial"] .eyebrow {
  letter-spacing: 0.11em;
}

/* ---------------------------------------------------------------------------
   2. SURFACE CONTEXTS
   Three canvases, one component library. A component NEVER carries a
   "dark" or "on-accent" variant — it reads the tokens of whatever surface it
   is standing on. Set data-surface on any container.
   ------------------------------------------------------------------------ */

[data-theme="dream"] [data-surface="paper"] { --canvas: var(--paper); }

[data-theme="dream"] [data-surface="ink"] {
  --canvas:         var(--ink);
  --raised-fill:    #17171A;
  --raised-border:  rgba(255, 255, 255, 0.11);
  --raised-hi:      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --raised-in:      inset 0 -1px 0 rgba(0, 0, 0, 0.40);
  --raised-drop:    0 1px 2px rgba(0, 0, 0, 0.60),
                    0 18px 40px -20px rgba(0, 0, 0, 0.90);
  --recess-fill:    #060607;
  --recess-hi:      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --recess-in:      inset 0 2px 8px rgba(0, 0, 0, 0.70);
  --t-hi:           var(--paper);
  --t-mid:          #ABA9A1;
  --t-low:          #8B8A84;
  --t-faint:        #7A7973;
  --line:           rgba(255, 255, 255, 0.13);
  --line-2:         rgba(255, 255, 255, 0.06);
  --act-fill:       var(--signal);
  --act-text:       #FFFFFF;              /* DC: ink label failed on blue */
  --act-fill-hov:   var(--signal-deep);   /* DC: darker, keeps the white label */
  --focus:          var(--signal-tint);
}

[data-theme="dream"] [data-surface="dream"] {
  --canvas:         var(--signal);
  /* cards on the accent canvas are the SAME field, lit from inside —
     they belong to the canvas rather than sitting on top of it */
  --raised-fill:    #4570E0;  /* DC: blue family replaces orange */
  --raised-border:  rgba(11, 11, 12, 0.14);
  --raised-hi:      inset 0 3px 3px rgba(255, 255, 255, 0.42);
  --raised-in:      inset 0 44px 64px rgba(140, 172, 255, 0.42);
  --raised-drop:    0 18px 44px -22px rgba(10, 28, 88, 0.55);
  --recess-fill:    #2C51B8;
  --recess-hi:      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --recess-in:      inset 0 3px 10px rgba(10, 28, 88, 0.45);
  /* DC: the brand blue is a DARK accent (the orange was light), so the text
     logic flips: on the dream surface ALL text is paper, exactly as on ink.
     There is still no hierarchy here — that constraint carries over. */
  --t-hi:           var(--paper);
  --t-mid:          var(--paper);
  --t-low:          var(--paper);
  --t-faint:        rgba(244, 242, 237, 0.72);
  --line:           rgba(244, 242, 237, 0.25);
  --line-2:         rgba(244, 242, 237, 0.10);
  --act-fill:       var(--ink);
  --act-text:       #FFFFFF;
  --act-fill-hov:   #23232A;
  --focus:          var(--paper);
}

/* ---------------------------------------------------------------------------
   3. ROOT + TYPOGRAPHY
   ------------------------------------------------------------------------ */

[data-theme="dream"] {
  background: var(--canvas);
  color: var(--t-hi);
  font-family: var(--ui);
  font-size: var(--fs-body);
  letter-spacing: -0.011em;
}

[data-theme="dream"] [data-surface] {
  background: var(--canvas);
  color: var(--t-hi);
}

/* display — the poster voice. Uppercase, jammed tight, never below 2rem. */
[data-theme="dream"] .display-xl,
[data-theme="dream"] .display-l,
[data-theme="dream"] .display-m {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: 0.005em;
  color: var(--t-hi);
}
[data-theme="dream"] .display-xl { font-size: var(--fs-display-xl); }
[data-theme="dream"] .display-l  { font-size: var(--fs-display-l);  }
[data-theme="dream"] .display-m  { font-size: var(--fs-display-m); line-height: 0.9; }

/* headings — UI font, tight. Numbers live here too, never in display. */
[data-theme="dream"] .h1,
[data-theme="dream"] .h2,
[data-theme="dream"] .h3 {
  font-family: var(--ui);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.026em;
  color: var(--t-hi);
}
[data-theme="dream"] .h1 { font-size: var(--fs-h1); }
[data-theme="dream"] .h2 { font-size: var(--fs-h2); }
[data-theme="dream"] .h3 { font-size: var(--fs-h3); letter-spacing: -0.018em; }

[data-theme="dream"] .lede {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--t-mid);
  letter-spacing: -0.017em;
}
[data-theme="dream"] .body   { font-size: var(--fs-body); line-height: 1.55; color: var(--t-mid); }
[data-theme="dream"] .small  { font-size: var(--fs-sm);  line-height: 1.5;  color: var(--t-mid); }
[data-theme="dream"] .micro  { font-size: var(--fs-micro); line-height: 1.4; color: var(--t-low); }

/* eyebrow — the one place tracking opens up */
[data-theme="dream"] .eyebrow {
  font-size: var(--fs-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--t-low);
}

/* numerals: tabular everywhere data is shown */
[data-theme="dream"] .num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

[data-theme="dream"] .link {
  color: var(--t-hi);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
[data-theme="dream"] [data-surface="dream"] .link { text-decoration-color: var(--ink); }
[data-theme="dream"] .link:hover { text-decoration-thickness: 3px; }

/* ---------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   ------------------------------------------------------------------------ */

[data-theme="dream"] .wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--s-5);
}
[data-theme="dream"] .wrap--narrow { max-width: 760px; }

[data-theme="dream"] .sec { padding-block: var(--s-9); }
[data-theme="dream"] .sec--tight { padding-block: var(--s-8); }

[data-theme="dream"] .sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}
[data-theme="dream"] .sec-head__t { display: grid; gap: var(--s-2); }

[data-theme="dream"] .stack   { display: grid; gap: var(--s-4); }
[data-theme="dream"] .row     { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
[data-theme="dream"] .grid-2  { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
[data-theme="dream"] .grid-3  { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
[data-theme="dream"] .grid-4  { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* mast — the fixed top bar */
[data-theme="dream"] .mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-3) var(--s-5);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--line-2);
}
[data-theme="dream"] .mast__mark {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--display);
  font-size: 1.375rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--t-hi);
}
[data-theme="dream"] .mast__nav { display: flex; align-items: center; gap: var(--s-1); }

/* ---------------------------------------------------------------------------
   5. BUTTONS
   Closed variant list: primary · secondary · ghost · danger.
   Sizes: default · sm. Nothing else exists.
   ------------------------------------------------------------------------ */

[data-theme="dream"] .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding-inline: var(--s-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
[data-theme="dream"] .btn:active { transform: translateY(1px); }
[data-theme="dream"] .btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
[data-theme="dream"] .btn[disabled],
[data-theme="dream"] .btn[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}
[data-theme="dream"] .btn--sm { height: 34px; padding-inline: var(--s-4); font-size: var(--fs-xs); }
[data-theme="dream"] .btn--icon { width: 44px; padding-inline: 0; }
[data-theme="dream"] .btn--icon.btn--sm { width: 34px; }
[data-theme="dream"] .btn--block { width: 100%; }

[data-theme="dream"] .btn--primary {
  background: var(--act-fill);
  color: var(--act-text);
  box-shadow: var(--raised-drop);
}
[data-theme="dream"] .btn--primary:hover { background: var(--act-fill-hov); }

[data-theme="dream"] .btn--secondary {
  background: var(--raised-fill);
  color: var(--t-hi);
  border: 1px solid var(--raised-border);
  box-shadow: var(--raised-hi), var(--raised-drop);
}
[data-theme="dream"] .btn--secondary:hover { border-color: var(--line); }

[data-theme="dream"] .btn--ghost {
  background: transparent;
  color: var(--t-mid);
}
[data-theme="dream"] .btn--ghost:hover { background: var(--recess-fill); color: var(--t-hi); }

[data-theme="dream"] .btn--danger {
  background: var(--signal-deep);
  color: #FFF;
  box-shadow: var(--raised-drop);
}
[data-theme="dream"] .btn--danger:hover { background: #1D3A8C; }  /* DC */

/* ---------------------------------------------------------------------------
   6. SEGMENTED CONTROL, TABS, TOGGLE, SELECTION
   Selected state = the recessed material. Always. No accent fills here.
   ------------------------------------------------------------------------ */

[data-theme="dream"] .seg {
  display: inline-flex;
  padding: var(--s-1);
  gap: var(--s-1);
  border-radius: var(--r-pill);
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
}
[data-theme="dream"] .seg__b {
  height: 32px;
  padding-inline: var(--s-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--t-low);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
[data-theme="dream"] .seg__b:hover { color: var(--t-hi); }
[data-theme="dream"] .seg__b[aria-selected="true"] {
  background: var(--raised-fill);
  color: var(--t-hi);
  box-shadow: var(--raised-hi), var(--raised-drop);
}

[data-theme="dream"] .tabs {
  display: flex;
  gap: var(--s-5);
  border-bottom: 1px solid var(--line);
}
[data-theme="dream"] .tabs__t {
  position: relative;
  padding-block: var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--t-low);
  cursor: pointer;
}
[data-theme="dream"] .tabs__t:hover { color: var(--t-hi); }
[data-theme="dream"] .tabs__t[aria-selected="true"] { color: var(--t-hi); }
[data-theme="dream"] .tabs__t[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: var(--signal);
}
[data-theme="dream"] [data-surface="dream"] .tabs__t[aria-selected="true"]::after { background: var(--ink); }

[data-theme="dream"] .toggle {
  position: relative;
  width: 46px;
  height: 27px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
[data-theme="dream"] .toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: var(--r-pill);
  background: var(--raised-fill);
  box-shadow: var(--raised-drop);
  transition: transform var(--dur) var(--ease);
}
[data-theme="dream"] .toggle[aria-checked="true"] { background: var(--act-fill); }
[data-theme="dream"] .toggle[aria-checked="true"]::after {
  transform: translateX(19px);
  background: var(--act-text);
}

[data-theme="dream"] .check {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--t-mid);
  cursor: pointer;
}
[data-theme="dream"] .check__box {
  width: 20px; height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  color: transparent;
}
[data-theme="dream"] .check__box--round { border-radius: var(--r-pill); }
[data-theme="dream"] .check[aria-checked="true"] { color: var(--t-hi); }
[data-theme="dream"] .check[aria-checked="true"] .check__box {
  background: var(--act-fill);
  color: var(--act-text);
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   7. FIELDS
   ------------------------------------------------------------------------ */

[data-theme="dream"] .field { display: grid; gap: var(--s-2); }
[data-theme="dream"] .field__l {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--t-mid);
}
[data-theme="dream"] .field__i {
  height: 44px;
  width: 100%;
  padding-inline: var(--s-4);
  border: 1px solid var(--raised-border);
  border-radius: var(--r-md);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi);
  color: var(--t-hi);
  font-size: var(--fs-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
[data-theme="dream"] textarea.field__i { height: auto; padding-block: var(--s-3); resize: vertical; min-height: 96px; }
[data-theme="dream"] select.field__i { appearance: none; padding-right: var(--s-7); cursor: pointer; }
[data-theme="dream"] .field__i::placeholder { color: var(--t-faint); }
[data-theme="dream"] .field__i:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--raised-hi), 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
[data-theme="dream"] .field__i[aria-invalid="true"] { border-color: var(--signal-deep); }
[data-theme="dream"] .field__h { font-size: var(--fs-xs); color: var(--t-low); }
[data-theme="dream"] .field__h--err { color: var(--signal-deep); }
[data-theme="dream"] [data-surface="ink"] .field__h--err,
[data-theme="dream"] [data-surface="dream"] .field__h--err { color: var(--t-hi); }

/* .field__ctrl wraps the control whenever an adornment sits inside it, so the
   adornment anchors to the input rather than to the whole field block. */
[data-theme="dream"] .field__ctrl { position: relative; display: block; }
[data-theme="dream"] .field__ctrl .ico {
  position: absolute;
  top: 13px;
  color: var(--t-low);
  pointer-events: none;
}
[data-theme="dream"] .field__ctrl .ico--lead  { left: var(--s-4); }
[data-theme="dream"] .field__ctrl .ico--trail { right: var(--s-4); }
[data-theme="dream"] .field__ctrl:has(.ico--lead) .field__i { padding-left: var(--s-8); }

/* inline capture — the marketing form: one field, one action, one pill */
[data-theme="dream"] .capture {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-5);
  border-radius: var(--r-pill);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), var(--raised-drop);
  max-width: 460px;
}
[data-theme="dream"] .capture__i {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  background: none;
  outline: none;
  color: var(--t-hi);
  font-size: var(--fs-sm);
}
[data-theme="dream"] .capture__i::placeholder { color: var(--t-faint); }

/* ---------------------------------------------------------------------------
   8. CHIPS, PILLS, BADGES
   ------------------------------------------------------------------------ */

[data-theme="dream"] .chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 32px;
  padding-inline: var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--t-mid);
  cursor: pointer;
}
[data-theme="dream"] .chip:hover { color: var(--t-hi); }
[data-theme="dream"] .chip[aria-pressed="true"] {
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  border-color: transparent;
  color: var(--t-hi);
  font-weight: 600;
}
[data-theme="dream"] .chip__x { color: var(--t-faint); }

[data-theme="dream"] .pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 24px;
  padding-inline: var(--s-3);
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--recess-fill);
  color: var(--t-mid);
}
[data-theme="dream"] .pill__dot {
  width: 6px; height: 6px;
  border-radius: var(--r-pill);
  background: currentColor;
  flex: none;
}
[data-theme="dream"] .pill--live   { background: var(--signal); color: #FFF; }  /* DC */
[data-theme="dream"] .pill--good   { background: color-mix(in srgb, var(--t-hi) 88%, transparent); color: var(--canvas); }
[data-theme="dream"] .pill--quiet  { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--t-low); }

[data-theme="dream"] .badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: var(--signal);
  color: #FFF;  /* DC: ink label failed on blue */
  font-size: var(--fs-micro);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
[data-theme="dream"] [data-surface="dream"] .badge { background: var(--ink); color: #FFF; }  /* DC */

/* ---------------------------------------------------------------------------
   9. PANELS, TILES, CARDS
   ------------------------------------------------------------------------ */

[data-theme="dream"] .panel {
  border-radius: var(--r-lg);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), var(--raised-in), var(--raised-drop);
}
[data-theme="dream"] .panel__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-2);
}
[data-theme="dream"] .panel__bd { padding: var(--s-5); }
[data-theme="dream"] .panel__ft {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line-2);
}
[data-theme="dream"] .panel--recessed {
  background: var(--recess-fill);
  border-color: transparent;
  box-shadow: var(--recess-hi), var(--recess-in);
}

/* stat tile — the number is the artwork */
[data-theme="dream"] .tile {
  display: grid;
  align-content: space-between;
  gap: var(--s-6);
  min-height: 190px;
  padding: var(--s-5);
  border-radius: var(--r-xl);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), var(--raised-in), var(--raised-drop);
}
[data-theme="dream"] .tile__n {
  font-family: var(--ui);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--t-hi);
}
[data-theme="dream"] .tile__l { font-size: var(--fs-sm); font-weight: 600; color: var(--t-mid); line-height: 1.3; }

/* numbered step card — index sits in the corner, hairline-quiet */
[data-theme="dream"] .step {
  position: relative;
  display: grid;
  align-content: end;
  gap: var(--s-3);
  min-height: 320px;
  padding: var(--s-5);
  border-radius: var(--r-xl);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), var(--raised-in), var(--raised-drop);
}
[data-theme="dream"] .step__n {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--t-low);
}

/* media card — image bed with a raised caption plate sitting inside it */
[data-theme="dream"] .media {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 380px;
  padding: var(--s-5);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--recess-fill);
  isolation: isolate;
}
[data-theme="dream"] .media__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg, #2A2A2E, #0B0B0C 62%);
}
[data-theme="dream"] .media__t {
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--signal-tint);  /* DC: base blue sat below 3:1 on the dark bed */
  max-width: 12ch;
}
[data-theme="dream"] .media__plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: rgba(11, 11, 12, 0.62);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: #FFF;
}
[data-theme="dream"] .media__q { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
[data-theme="dream"] .media__by { font-size: var(--fs-micro); color: rgba(255, 255, 255, 0.66); margin-top: var(--s-1); }

/* ---------------------------------------------------------------------------
   10. TABLE
   ------------------------------------------------------------------------ */

[data-theme="dream"] .tbl { font-size: var(--fs-sm); }
[data-theme="dream"] .tbl th {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--t-low);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
[data-theme="dream"] .tbl td {
  padding: var(--s-4);
  border-bottom: 1px solid var(--line-2);
  color: var(--t-mid);
  vertical-align: middle;
}
[data-theme="dream"] .tbl tbody tr:hover td { background: var(--line-2); }
[data-theme="dream"] .tbl tbody tr[aria-selected="true"] td { background: var(--recess-fill); color: var(--t-hi); }
[data-theme="dream"] .tbl .num { color: var(--t-hi); font-weight: 600; }
[data-theme="dream"] .tbl__nm { color: var(--t-hi); font-weight: 600; }

/* ---------------------------------------------------------------------------
   11. SIDEBAR NAV
   ------------------------------------------------------------------------ */

[data-theme="dream"] .side { display: grid; gap: var(--s-1); align-content: start; }
[data-theme="dream"] .side__g {
  padding: var(--s-4) var(--s-3) var(--s-2);
  font-size: var(--fs-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--t-faint);
}
[data-theme="dream"] .side__i {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 38px;
  padding-inline: var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--t-mid);
  cursor: pointer;
}
[data-theme="dream"] .side__i:hover { color: var(--t-hi); background: var(--line-2); }
[data-theme="dream"] .side__i[aria-current="page"] {
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  color: var(--t-hi);
  font-weight: 600;
}
[data-theme="dream"] .side__i .badge { margin-left: auto; }

/* ---------------------------------------------------------------------------
   12. AVATAR
   ------------------------------------------------------------------------ */

[data-theme="dream"] .avatar {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--recess-fill);
  color: var(--t-mid);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
}
[data-theme="dream"] .avatar--lg { width: 52px; height: 52px; font-size: var(--fs-sm); }
[data-theme="dream"] .avatar--sm { width: 26px; height: 26px; font-size: var(--fs-micro); }
[data-theme="dream"] .avatar--sig { background: var(--signal); color: var(--ink); }
[data-theme="dream"] .stackx { display: flex; }
[data-theme="dream"] .stackx .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--canvas); }
[data-theme="dream"] .stackx .avatar:first-child { margin-left: 0; }

/* ---------------------------------------------------------------------------
   13. METER + WAVEFORM
   ------------------------------------------------------------------------ */

[data-theme="dream"] .meter {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  overflow: hidden;
}
[data-theme="dream"] .meter__v {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--act-fill);
}
[data-theme="dream"] .meter--sig .meter__v { background: var(--signal); }

[data-theme="dream"] .wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}
[data-theme="dream"] .wave i {
  display: block;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--t-faint);
}
[data-theme="dream"] .wave i.on { background: var(--signal); }

/* ---------------------------------------------------------------------------
   14. TOAST, MODAL, COMMAND PALETTE, TOOLTIP
   ------------------------------------------------------------------------ */

[data-theme="dream"] .toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), var(--raised-drop);
  font-size: var(--fs-sm);
  color: var(--t-hi);
  max-width: 420px;
}
[data-theme="dream"] .toast__x { margin-left: auto; color: var(--t-low); }
[data-theme="dream"] .toast--sig { background: var(--signal); border-color: transparent; color: #FFF; }  /* DC */
[data-theme="dream"] .toast--sig .toast__x { color: rgba(255, 255, 255, 0.62); }  /* DC */

[data-theme="dream"] .scrim {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--s-7) var(--s-4);
  border-radius: var(--r-lg);
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
[data-theme="dream"] .modal {
  width: min(440px, 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

[data-theme="dream"] .cmdk {
  width: min(520px, 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--raised-border);
  background: var(--raised-fill);
  box-shadow: var(--raised-hi), 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
[data-theme="dream"] .cmdk__q {
  width: 100%;
  height: 52px;
  padding-inline: var(--s-5);
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: none;
  outline: none;
  color: var(--t-hi);
  font-size: var(--fs-body);
}
[data-theme="dream"] .cmdk__q::placeholder { color: var(--t-faint); }
[data-theme="dream"] .cmdk__list { padding: var(--s-2); display: grid; gap: 2px; }
[data-theme="dream"] .cmdk__i {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 40px;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--t-mid);
  cursor: pointer;
}
[data-theme="dream"] .cmdk__i[aria-selected="true"] {
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  color: var(--t-hi);
}
[data-theme="dream"] .kbd {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--t-low);
}

[data-theme="dream"] .tip {
  display: inline-block;
  padding: 6px var(--s-3);
  border-radius: var(--r-sm);
  background: var(--t-hi);
  color: var(--canvas);
  font-size: var(--fs-micro);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   15. UPLOAD + EMPTY STATE
   ------------------------------------------------------------------------ */

[data-theme="dream"] .drop {
  display: grid;
  place-items: center;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-5);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line);
  background: var(--recess-fill);
  box-shadow: var(--recess-in);
  text-align: center;
}
[data-theme="dream"] .empty {
  display: grid;
  place-items: center;
  gap: var(--s-3);
  padding: var(--s-8) var(--s-5);
  text-align: center;
}
[data-theme="dream"] .empty .ico { color: var(--t-faint); }

/* ---------------------------------------------------------------------------
   16. MARKETING BLOCKS
   ------------------------------------------------------------------------ */

/* hero: display line / media band / display line — type wraps the imagery */
[data-theme="dream"] .hero { padding-block: var(--s-6) var(--s-9); text-align: center; }
[data-theme="dream"] .hero__band {
  display: flex;
  gap: var(--s-3);
  margin-block: var(--s-4);
  overflow: hidden;
}
[data-theme="dream"] .hero__band > * {
  flex: 1 0 190px;
  height: 200px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #33333A, #101014);
  box-shadow: var(--raised-drop);
}

[data-theme="dream"] .logowall {
  display: flex;
  align-items: center;
  gap: var(--s-7);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0.6;
}
[data-theme="dream"] .logowall span {
  font-family: var(--display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--t-hi);
}

[data-theme="dream"] .marquee {
  display: flex;
  gap: var(--s-5);
  align-items: center;
  padding-block: var(--s-4);
  border-block: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  text-transform: uppercase;
  color: var(--t-hi);
}
[data-theme="dream"] .marquee .dot { color: var(--signal); }
[data-theme="dream"] [data-surface="dream"] .marquee .dot { color: var(--paper); }

[data-theme="dream"] .cta {
  display: grid;
  justify-items: center;
  gap: var(--s-5);
  text-align: center;
  padding-block: var(--s-8);
}

[data-theme="dream"] .foot {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding-block: var(--s-7);
}
[data-theme="dream"] .foot__c { display: grid; gap: var(--s-2); align-content: start; }
[data-theme="dream"] .foot__c a { font-size: var(--fs-sm); color: var(--t-mid); }
[data-theme="dream"] .foot__c a:hover { color: var(--t-hi); }

/* ---------------------------------------------------------------------------
   17. ICONS
   One weight, one style, one door. Never introduce a second icon set.
   ------------------------------------------------------------------------ */

[data-theme="dream"] .ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-theme="dream"] .ico--lg { width: 24px; height: 24px; stroke-width: 1.6; }
[data-theme="dream"] .ico--xl { width: 40px; height: 40px; stroke-width: 1.3; }

/* ---------------------------------------------------------------------------
   18. UTILITY (the complete list — nothing else is legal)
   ------------------------------------------------------------------------ */

[data-theme="dream"] .u-hi    { color: var(--t-hi); }
[data-theme="dream"] .u-mid   { color: var(--t-mid); }
[data-theme="dream"] .u-low   { color: var(--t-low); }
[data-theme="dream"] .u-sig   { color: var(--signal); }
[data-theme="dream"] .u-mla   { margin-left: auto; }
[data-theme="dream"] .u-center{ text-align: center; }
[data-theme="dream"] .u-rule  { height: 1px; background: var(--line); border: 0; }
