/* ===== SGU "Destiny" theme — chrome & motifs (see SGU_TASKS.md §2.3/§2.4) ===== */

/* Hidden unless destiny is active, so light/dark layouts are unaffected
   (scope/spire included — otherwise their default SVG fills render black
   blobs in light/dark, and they'd sit in normal flow) */
.sgu-bg, .sgu-frame, .sgu-bg__sweep, .sgu-bg__glow2, .sgu-scope, .sgu-ship, .sgu-pulsar { display: none; }
.header-logo { display: none; }
/* Content sits 14px off the sheet frame (inset 10px) — tight enough that the
   frame ticks read as part of the sheet, not as a dead band (v0.36.1: the old
   24px padding + solid plates made the paper stop at every component edge). */
[data-theme="destiny"] body { background-color: var(--bg-page); padding: 14px; }

/* Header/footer are OPEN etch (no slab): the paper, grid and stipple run
   THROUGH the logo, buttons and version line — the overlap the plates used to
   give, now on the chrome. Hairlines keep the divisions. */
[data-theme="destiny"] .app-header { background: transparent; }
[data-theme="destiny"] .app-footer { background: transparent; }

/* --- Paper ground: stipple grain + drifting grid + print-edge vignette (behind content) ---
   Phase 1 of the schematic rework (destiny_theme.md): the field is *paper*, not space. */
[data-theme="destiny"] .sgu-bg {
  display: block; position: fixed; inset: -140px; z-index: -1; pointer-events: none;
  /* halftone stipple (1px dot / 3px cell) over the two-layer grid, warm line-art tint */
  background-image:
    radial-gradient(var(--stipple) 1px, transparent 1.4px),
    linear-gradient(rgba(232, 230, 223, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 230, 223, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(232, 230, 223, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 230, 223, 0.1) 1px, transparent 1px);
  background-size: 3px 3px, 28px 28px, 28px 28px, 140px 140px, 140px 140px;
  animation: sgu-grid-drift 90s linear infinite;
}
[data-theme="destiny"] .sgu-bg::before { /* vignette (print edges deepened) */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 5, 8, 0.68) 100%);
}
/* --- Schematic ambience (pure CSS, transform/opacity only): a slow light drifting
     across the sheet — the radar sweep, retinted to line-art. (Radar language lives
     in the star-chart scope from Phase 3 onward.) --- */
[data-theme="destiny"] .sgu-bg__sweep { /* very slow sweep across the paper */
  display: block; position: absolute; inset: -30%;
  background: conic-gradient(from 0deg,
    rgba(232, 230, 223, 0) 0deg,
    rgba(232, 230, 223, 0.045) 26deg,
    rgba(232, 230, 223, 0) 64deg);
  animation: sgu-sweep-rotate 150s linear infinite;
}
@keyframes sgu-grid-drift { from { background-position: 0 0; } to { background-position: -140px -28px; } }
@keyframes sgu-sweep-rotate { to { transform: rotate(360deg); } }

/* --- Sheet frame + corner ticks (above content, non-interactive) --- */
[data-theme="destiny"] .sgu-frame {
  display: block; position: fixed; inset: 10px; z-index: 1200; pointer-events: none;
  border: 1px solid rgba(232, 230, 223, 0.24);
}
[data-theme="destiny"] .sgu-frame::before { /* corner ticks */
  content: ""; position: absolute; inset: -1px; background-repeat: no-repeat;
  background-image:
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7)),
    linear-gradient(rgba(232, 230, 223, 0.7), rgba(232, 230, 223, 0.7));
  background-size:
    20px 2px, 2px 20px,
    20px 2px, 2px 20px,
    20px 2px, 2px 20px,
    20px 2px, 2px 20px;
  background-position:
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
}

/* --- Header logo (gate ring — same concentric-ring language as the lock dialog's ring) ---
   Art is a 200-unit viewBox rendered at 34px (scale ~0.17); stroke widths are in
   viewBox units sized for that: 7.3u ≈ 1.2px, 8.8u ≈ 1.5px. */
[data-theme="destiny"] .header-logo { display: inline-flex; align-self: center; width: 34px; height: 34px; flex: none; }
.header-logo svg { width: 100%; height: 100%; overflow: visible; }
.header-logo__spin { transform-origin: center; animation: sgu-spin 60s linear infinite; stroke: #59c2ff; fill: none; }
@keyframes sgu-spin { to { transform: rotate(360deg); } }
/* Logo retuned to line-art monochrome (Q5): white rings, warm-gray ticks;
   the amber chevron-breath (#DEST-2) is now the ONLY color pulse in the theme. */
[data-theme="destiny"] .gate-logo__ring-outer { fill: none; stroke: #e8e6df; stroke-width: 7.3; }
[data-theme="destiny"] .gate-logo__ring-inner { fill: none; stroke: #e8e6df; stroke-width: 7.3; }
[data-theme="destiny"] .gate-logo__ticks { fill: none; stroke: #9a988f; stroke-width: 7.3; }
[data-theme="destiny"] .gate-logo__chevron { fill: none; stroke: #9a988f; stroke-width: 8.8; stroke-linecap: square; stroke-linejoin: miter; }
[data-theme="destiny"] .gate-logo__sweep { fill: none; stroke: #cfd6e4; stroke-width: 8.8; opacity: 0.9; }
[data-theme="destiny"] .gate-logo__core { fill: #e8e6df; stroke: none; }

/* --- Warm chevron breathing (#DEST-2): a slow traveling wave around the gate.
     8 chevrons × 0.75s stagger = 6s cycle, so the handoff around the ring is seamless. */
[data-theme="destiny"] .gate-logo__chevron { animation: sgu-chev-breathe 6s ease-in-out infinite backwards; } /* backwards: hold the 0% (dim) state during each delay so nothing pops at load */
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(1) { animation-delay: 0s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(2) { animation-delay: 0.75s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(3) { animation-delay: 1.5s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(4) { animation-delay: 2.25s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(5) { animation-delay: 3s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(6) { animation-delay: 3.75s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(7) { animation-delay: 4.5s; }
[data-theme="destiny"] .gate-logo__chevrons path:nth-child(8) { animation-delay: 5.25s; }
@keyframes sgu-chev-breathe {
  0%, 100% { opacity: 0.55; stroke: #9a988f; filter: drop-shadow(0 0 0 rgba(255, 180, 84, 0)); }
  50% { opacity: 1; stroke: #ffb454; filter: drop-shadow(0 0 2.5px rgba(255, 180, 84, 0.85)); }
}

/* --- Header / footer chrome --- */
[data-theme="destiny"] .app-header { border-bottom: 1px solid var(--border-subtle); }
[data-theme="destiny"] .app-header__subtitle { font-family: var(--font-mono); letter-spacing: 0.08em; }
/* Footer: open etch — no top border, shrunk (~7px freed vertically), and the
   version sits bottom-right at the sheet frame's edge: the text's right end
   (viewport - 30px) is exactly where the frame's corner tick begins. */
[data-theme="destiny"] .app-footer { border-top: none; font-family: var(--font-mono); letter-spacing: 0.2em; padding: 0.1rem 1rem 0.3rem; text-align: right; }

/* --- Etched panels (Phase 2): flat graphite plate, organic asymmetric radii (R4),
     double hairline (R2). No backdrop blur — the paper shows through, not glass. --- */
[data-theme="destiny"] .panel {
  position: relative;
  border: 1px solid rgba(232, 230, 223, 0.42);
  /* v0.36.10: the background must not compete with data inside the columns.
     80% flat fill + a light frosted blur (the 'fog' option, chosen over the
     flat-only variant in A/B review): pulsar/ship/scope dissolve into a soft
     presence under the plates while staying fully crisp in the gutters and
     margins. Backdrop is the fixed .sgu-bg layer (static between bursts), so
     the blur is cheap and inner-list scrolling never re-triggers it. */
  background-color: rgba(21, 24, 29, 0.8);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  /* inner 4px line, separated by a dark gap = the etched double hairline */
  box-shadow: inset 0 0 0 3px rgba(16, 18, 22, 0.9), inset 0 0 0 4px rgba(232, 230, 223, 0.22),
              inset 0 14px 30px -24px rgba(0, 0, 0, 0.9);
}
/* Each panel gets its own curve set — leaf/teardrop variety, never two alike.
   px-based (gentle): % radii on tall panels eat header/summary content.
   5-column layout (POC #23): accounts | assets | liabilities | projection | charts */
[data-theme="destiny"] .panel--accounts     { border-radius: 64px 20px 44px 28px / 96px 40px 60px 120px; }
[data-theme="destiny"] .panel--assets       { border-radius: 26px 76px 24px 58px / 48px 110px 44px 92px; }
[data-theme="destiny"] .panel--liabilities  { border-radius: 58px 22px 66px 26px / 40px 88px 52px 96px; }
[data-theme="destiny"] .panel--projection   { border-radius: 52px 64px 24px 76px / 84px 96px 48px 108px; }
[data-theme="destiny"] .panel--charts       { border-radius: 24px 58px 48px 62px / 70px 44px 96px 38px; }
/* Content clearance for the curves (headers top-inset, bodies bottom-inset) */
[data-theme="destiny"] .panel__header { padding-top: 1.15rem; }
[data-theme="destiny"] .panel--accounts .panel__header { padding-left: 1.9rem; }
[data-theme="destiny"] .panel--assets .panel__header { padding-right: 2.4rem; }
[data-theme="destiny"] .panel--liabilities .panel__header { padding-right: 2rem; }
[data-theme="destiny"] .panel--projection .panel__header { padding-right: 2rem; }
[data-theme="destiny"] .panel--charts .panel__header { padding-right: 1.6rem; }
[data-theme="destiny"] .panel__body { padding-bottom: 1.35rem; }
/* Top stipple band: the plate header reads like a printed plate (R3), fading down */
[data-theme="destiny"] .panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 38px;
  background-image: radial-gradient(var(--stipple) 1px, transparent 1.3px);
  background-size: 3px 3px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
  pointer-events: none; z-index: 1;
}
[data-theme="destiny"] .theme-selector__options {
  border-radius: 10px 16px 12px 18px / 16px 10px 18px 12px;
  border: 1px solid rgba(232, 230, 223, 0.42);
  box-shadow: inset 0 0 0 2px rgba(16, 18, 22, 0.9), inset 0 0 0 3px rgba(232, 230, 223, 0.2);
}
[data-theme="destiny"] .dialog-panel {
  border-radius: 40px 56px 44px 60px / 56px 40px 64px 44px;
  border: 1px solid rgba(232, 230, 223, 0.5);
  box-shadow: inset 0 0 0 3px rgba(16, 18, 22, 0.9), inset 0 0 0 4px rgba(232, 230, 223, 0.25),
              0 18px 50px rgba(0, 0, 0, 0.55);
}

/* --- Panel titles in display font --- */
[data-theme="destiny"] .panel__title {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.08em; color: #e8e6df;
}
/* R6 readout titles: stencil chevron icon + faint FIG. plate number */
[data-theme="destiny"] .panel-icon {
  display: inline-block; width: 1em; height: 1em;
  margin-right: 0.4rem; vertical-align: -0.125em;
  fill: #e8e6df; opacity: 0.9; /* glyphs render with inherited fill — force line-art (was invisible black) */
}
[data-theme="destiny"] .panel__title::after {
  font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.18em;
  color: var(--text-muted); opacity: 0.75; margin-left: 0.6rem; vertical-align: 0.28em;
}
[data-theme="destiny"] .panel--accounts .panel__title::after { content: "FIG. 01"; }
[data-theme="destiny"] .panel--assets .panel__title::after { content: "FIG. 02"; }
[data-theme="destiny"] .panel--liabilities .panel__title::after { content: "FIG. 03"; }
[data-theme="destiny"] .panel--projection .panel__title::after { content: "FIG. 04"; }
[data-theme="destiny"] .panel--charts .panel__title::after { content: "FIG. 05"; }

/* --- Star-chart scope (Phase 3): the radar, carried by the budgets dialog
     (v0.38.3) — same treatment as the gate ring in the lock/unlock dialogs:
     centered motif above the title, destiny only. It left the charts panel
     corner, where even at 55px it grazed the chart cards. --- */
[data-theme="destiny"] .sgu-scope {
  display: block; width: 130px; height: auto; margin: 0 auto 0.75rem;
}
/* The budgets dialog is left-aligned (unlike the lock dialogs) — center the
   caption under the scope. */
[data-theme="destiny"] .budget-dialog .gate-caption { text-align: center; }
[data-theme="destiny"] .sgu-scope__plate { fill: rgba(13, 15, 19, 0.7); stroke: rgba(232, 230, 223, 0.4); stroke-width: 1.5; }
[data-theme="destiny"] .sgu-scope__ring { fill: none; stroke: rgba(232, 230, 223, 0.1); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__cross { stroke: rgba(232, 230, 223, 0.14); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__stars circle { fill: rgba(232, 230, 223, 0.55); }
[data-theme="destiny"] .sgu-scope__target-ring { fill: none; stroke: rgba(232, 230, 223, 0.7); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__target-dot { fill: rgba(232, 230, 223, 0.9); }
[data-theme="destiny"] .sgu-scope__target line { stroke: rgba(232, 230, 223, 0.7); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__leader { stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__label-box { fill: rgba(13, 15, 19, 0.85); stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__label { fill: rgba(232, 230, 223, 0.8); font-family: var(--font-mono); font-size: 8px; letter-spacing: 2.5px; }
[data-theme="destiny"] .sgu-scope__sweep { fill: rgba(232, 230, 223, 0.05); stroke: rgba(232, 230, 223, 0.35); stroke-width: 1; }
[data-theme="destiny"] .sgu-scope__sweep-g { transform-origin: 50% 50%; animation: sgu-scope-rotate 12s linear infinite; }
@keyframes sgu-scope-rotate { to { transform: rotate(360deg); } }

/* --- Binary pulsar (Phase 6, step 1): distant gamma-ray binary in the sky
     behind the plates. 15s tilted orbit (2 orbits per 30s burst = phase-locked
     flash); transform/opacity only. Upper-LEFT of the sheet (v0.36.2: bigger,
     left-ish); the right side stays reserved for the Destiny ship (step 2). --- */
[data-theme="destiny"] .sgu-pulsar {
  display: block; position: fixed; left: 3.5%; top: 15%;
  width: var(--pulsar-size, 220px); height: var(--pulsar-size, 220px);
  pointer-events: none;
}
[data-theme="destiny"] .sgu-pulsar__svg { width: 100%; height: 100%; overflow: visible; }
[data-theme="destiny"] .sgu-pulsar__orbit {
  fill: none; stroke: rgba(232, 230, 223, 0.22); stroke-width: 1;
  stroke-dasharray: 2 4;
}
[data-theme="destiny"] .sgu-pulsar__bary { fill: rgba(232, 230, 223, 0.5); }
[data-theme="destiny"] .sgu-pulsar__core { fill: rgba(232, 230, 223, 0.9); }
[data-theme="destiny"] .sgu-pulsar__beam { stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-pulsar__beam-cross { stroke: rgba(232, 230, 223, 0.3); stroke-width: 1; }
[data-theme="destiny"] .sgu-pulsar__leader { stroke: rgba(232, 230, 223, 0.4); stroke-width: 1; }
[data-theme="destiny"] .sgu-pulsar__label-box { fill: rgba(13, 15, 19, 0.85); stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-pulsar__label { fill: rgba(232, 230, 223, 0.85); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 1.5px; }
[data-theme="destiny"] .sgu-pulsar__label-sub { fill: var(--text-muted); font-family: var(--font-mono); font-size: 6.5px; letter-spacing: 1.2px; }
/* tilt: circular orbit + rotating pair, squashed into an ellipse
   (foreshortening), then angled — the orbital plane leans. The shock ring
   lives inside this group, so bursts follow the plane. The callout stays
   level (documentation doesn't slant). */
[data-theme="destiny"] .sgu-pulsar__tilt {
  transform: rotate(-14deg) scaleY(0.68); transform-origin: 50% 50%; transform-box: view-box;
}
[data-theme="destiny"] .sgu-pulsar__pair {
  transform-origin: 50% 50%; transform-box: view-box;
  animation: sgu-pulsar-orbit 15s linear infinite;
}
[data-theme="destiny"] .sgu-pulsar__ring {
  fill: none; stroke: rgba(232, 230, 223, 0.85); stroke-width: 1.3;
  transform-origin: center; transform-box: fill-box;
  animation: sgu-pulsar-ring 30s ease-out infinite;
}
/* trailing echo: a dimmer, smaller ring half a second behind the shockfront */
[data-theme="destiny"] .sgu-pulsar__ring--echo {
  --pulsar-ring-peak: 0.4;
  --pulsar-ring-max: 3.9;
  animation-delay: 0.5s;
}
[data-theme="destiny"] .sgu-pulsar__glow {
  stroke: rgba(232, 230, 223, 0.95); stroke-width: 2; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(232, 230, 223, 0.95));
  animation: sgu-pulsar-glow 30s ease-in-out infinite;
}
/* paper flash: a faint lamp in the sky behind everything (scales with the pulsar) */
[data-theme="destiny"] .sgu-pulsar__flash {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--pulsar-size, 220px) * 2.3); height: calc(var(--pulsar-size, 220px) * 2.3);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 230, 223, 0.18), rgba(232, 230, 223, 0.06) 45%, transparent 70%);
  opacity: 0;
  animation: sgu-pulsar-paper 30s linear infinite;
}
/* Burst intensity is parameterized (defaults = the v0.36.1 look) so variants
   are one-line overrides, not new keyframes. */
@keyframes sgu-pulsar-orbit { to { transform: rotate(360deg); } }
@keyframes sgu-pulsar-ring {
  0%, 92% { opacity: 0; transform: scale(0.4); }
  94% { opacity: var(--pulsar-ring-peak, 0.9); }
  100% { opacity: 0; transform: scale(var(--pulsar-ring-max, 4.8)); }
}
@keyframes sgu-pulsar-glow { 0%, 92% { opacity: 0; } 95.5% { opacity: var(--pulsar-glow-peak, 1); } 100% { opacity: 0; } }
@keyframes sgu-pulsar-paper { 0%, 92% { opacity: 0; } 95.5% { opacity: var(--pulsar-flash-peak, 0.65); } 100% { opacity: 0; } }
@media (max-width: 700px) {
  [data-theme="destiny"] .sgu-pulsar { --pulsar-size: 150px; left: 8%; top: 9%; opacity: 0.8; }
  [data-theme="destiny"] .sgu-pulsar__label-box,
  [data-theme="destiny"] .sgu-pulsar__label,
  [data-theme="destiny"] .sgu-pulsar__label-sub,
  [data-theme="destiny"] .sgu-pulsar__leader { display: none; }
}

/* --- The ship DESTINY (Stargate Universe), from the reference's technical
     sheet: needle prow, dash-dot centerline, segmented core spine, intake
     rings, engine array in the swept stern scoop, survey tags with dashed
     leaders. VERTICAL, bottom-right of the sheet, prow up (rotate 90deg:
     the SVG's left edge becomes the top) — the nameplate runs spine-style
     along the hull. Ghosts through the projection plate from the
     background layer. The prow sensor arcs (now at the top) stay
     phase-locked to the pulsar's 30s gamma burst. Static etching otherwise. --- */
[data-theme="destiny"] .sgu-ship {
  display: block; position: fixed; right: 3.3%; bottom: 12%;
  width: 340px; height: auto; pointer-events: none;
  color: #e8e6df;
  transform: rotate(90deg);
}
[data-theme="destiny"] .sgu-ship__svg { width: 100%; height: auto; overflow: visible; }
[data-theme="destiny"] .sgu-ship__axis { stroke: rgba(232, 230, 223, 0.35); stroke-width: 1; stroke-dasharray: 12 5 3 5; }
[data-theme="destiny"] .sgu-ship__hull { fill: none; stroke: rgba(232, 230, 223, 0.9); stroke-width: 1.8; stroke-linejoin: round; }
[data-theme="destiny"] .sgu-ship__inner { fill: none; stroke: rgba(232, 230, 223, 0.3); stroke-width: 1; }
[data-theme="destiny"] .sgu-ship__detail { fill: none; stroke: rgba(232, 230, 223, 0.45); stroke-width: 1; }
[data-theme="destiny"] .sgu-ship__engines { fill: url(#sgu-ship-stipple); opacity: 0.2; stroke: none; }
[data-theme="destiny"] .sgu-ship__tag { fill: rgba(232, 230, 223, 0.1); stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-ship__leader { stroke: rgba(232, 230, 223, 0.3); stroke-width: 1; stroke-dasharray: 2 3; }
[data-theme="destiny"] .sgu-ship__label-box { fill: rgba(13, 15, 19, 0.85); stroke: rgba(232, 230, 223, 0.5); stroke-width: 1; }
[data-theme="destiny"] .sgu-ship__label { fill: rgba(232, 230, 223, 0.95); font-family: var(--font-mono); font-size: 8px; letter-spacing: 2.5px; }
/* signal arcs: dark until the burst window — phase-locked with sgu-pulsar-glow */
[data-theme="destiny"] .sgu-ship__signal path {
  fill: none; stroke: rgba(232, 230, 223, 0.9); stroke-width: 1.4;
  opacity: 0;
  animation: sgu-ship-signal 30s ease-in-out infinite;
}
[data-theme="destiny"] .sgu-ship__signal path:nth-child(2) { animation-delay: 0.15s; }
[data-theme="destiny"] .sgu-ship__signal path:nth-child(3) { animation-delay: 0.3s; }
@keyframes sgu-ship-signal {
  0%, 93% { opacity: 0; }
  96% { opacity: 0.9; }
  99.5%, 100% { opacity: 0; }
}
@media (max-width: 1024px) {
  [data-theme="destiny"] .sgu-ship { width: 280px; right: 4%; bottom: 9%; }
  /* tablet: raise the pulsar so its callout clears the tighter account rows */
  [data-theme="destiny"] .sgu-pulsar { top: 9%; }
}
@media (max-width: 700px) {
  [data-theme="destiny"] .sgu-ship { width: 200px; right: 5%; bottom: 8%; opacity: 0.45; }
}

/* --- Buttons: chamfered (Phase 4 swaps panel pills to chevrons), INK logic:
     white ink on graphite — primary is INVERTED (stamped), danger is etched red.
     No blue fills anywhere. --- */
[data-theme="destiny"] .btn {
  border-radius: 0; font-family: var(--font-mono); letter-spacing: 0.04em;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
[data-theme="destiny"] .btn--primary { background-color: #e8e6df; border: 1px solid #e8e6df; color: #101216; font-weight: 600; }
[data-theme="destiny"] .btn--primary:hover { background-color: #cfd6e4; border-color: #cfd6e4; }
[data-theme="destiny"] .btn--danger { background-color: rgba(196, 122, 109, 0.1); border: 1px solid rgba(196, 122, 109, 0.5); color: #c47a6d; }
[data-theme="destiny"] .btn--danger:hover { background-color: rgba(196, 122, 109, 0.2); color: #d98d80; }
[data-theme="destiny"] .btn--ghost { border: 1px solid rgba(232, 230, 223, 0.38); background-color: transparent; color: var(--text-secondary); }
[data-theme="destiny"] .btn--ghost:hover { background-color: rgba(232, 230, 223, 0.08); color: var(--text-primary); }

/* --- Explicit focus overrides (base rules hardcode #2563eb / blue shadows) --- */
[data-theme="destiny"] .projection-controls__input {
  /* base rule hardcodes a light border (#d1d5db) — theme it explicitly (§2.3 #5) */
  border-color: #3a414c;
}
[data-theme="destiny"] .projection-controls__input:focus { border-color: #cfd6e4; box-shadow: 0 0 0 2px rgba(207, 214, 228, 0.15); }
/* End-date field (#126 follow-up): native picker glyphs must read on graphite */

/* --- Projection period slider (Issue #126): the GATE RING. ---
   Ship-schematic language: the thumb is a machined gate ring — 12 line-art
   hatch spokes, one amber position pointer, amber status core — that SPOOLS
   with the value (3 turns across the full 10y range, driven by --p from
   syncDaysInputs()). The track is an engineering ruler: 10 ticks, a
   line-art fill line up to --fill, and 2px registration end-caps.
   Purely decorative mechanics; the value math is the same everywhere. */
[data-theme="destiny"] .projection-controls__slider {
  -webkit-appearance: none; appearance: none;
  height: 30px; background: transparent; cursor: pointer;
}
[data-theme="destiny"] .projection-controls__slider:focus { outline: none; }

[data-theme="destiny"] .projection-controls__slider::-webkit-slider-runnable-track {
  height: 12px; border-radius: 0; background-color: transparent;
  background-image:
    linear-gradient(#e8e6df, #e8e6df),
    linear-gradient(#e8e6df, #e8e6df),
    repeating-linear-gradient(90deg, rgba(232, 230, 223, 0.32) 0 1px, transparent 1px 10%),
    linear-gradient(90deg, #e8e6df 0 var(--fill, 0%), rgba(232, 230, 223, 0.16) var(--fill, 0%) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: left center, right center, center, center;
  background-size: 2px 10px, 2px 10px, 100% 10px, 100% 2px;
}
[data-theme="destiny"] .projection-controls__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; border: none; border-radius: 50%;
  margin-top: -9px; /* center the 30px ring on the 12px track */
  background-color: #0d0f13;
  background-image:
    radial-gradient(circle, #ffb454 0 1.5px, rgba(255, 180, 84, 0.4) 2.4px, transparent 3.2px),
    radial-gradient(circle, #0d0f13 0 4px, rgba(13, 15, 19, 0) 4.8px),
    conic-gradient(#ffb454 0deg 5deg, transparent 5deg 360deg),
    repeating-conic-gradient(rgba(232, 230, 223, 0.65) 0deg 2.5deg, transparent 2.5deg 30deg),
    radial-gradient(circle, transparent 0 10.5px, rgba(232, 230, 223, 0.9) 11px 12.5px, transparent 13.2px);
  transform: rotate(calc(var(--p, 0) * 1080deg));
  transition: transform 220ms cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 120ms ease;
  box-shadow: 0 0 0 1px rgba(13, 15, 19, 0.9), 0 2px 8px rgba(0, 0, 0, 0.55);
}
[data-theme="destiny"] .projection-controls__slider:hover::-webkit-slider-thumb,
[data-theme="destiny"] .projection-controls__slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px rgba(13, 15, 19, 0.9), 0 0 0 3px rgba(255, 180, 84, 0.22), 0 0 14px rgba(255, 180, 84, 0.35);
}

/* Firefox: same ring, native track/progress geometry */
[data-theme="destiny"] .projection-controls__slider::-moz-range-track {
  height: 12px; border: none; background-color: transparent;
  background-image:
    linear-gradient(#e8e6df, #e8e6df),
    linear-gradient(#e8e6df, #e8e6df),
    repeating-linear-gradient(90deg, rgba(232, 230, 223, 0.32) 0 1px, transparent 1px 10%),
    linear-gradient(90deg, #e8e6df 0 var(--fill, 0%), rgba(232, 230, 223, 0.16) var(--fill, 0%) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: left center, right center, center, center;
  background-size: 2px 10px, 2px 10px, 100% 10px, 100% 2px;
}
[data-theme="destiny"] .projection-controls__slider::-moz-range-thumb {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background-color: #0d0f13;
  background-image:
    radial-gradient(circle, #ffb454 0 1.5px, rgba(255, 180, 84, 0.4) 2.4px, transparent 3.2px),
    radial-gradient(circle, #0d0f13 0 4px, rgba(13, 15, 19, 0) 4.8px),
    conic-gradient(#ffb454 0deg 5deg, transparent 5deg 360deg),
    repeating-conic-gradient(rgba(232, 230, 223, 0.65) 0deg 2.5deg, transparent 2.5deg 30deg),
    radial-gradient(circle, transparent 0 10.5px, rgba(232, 230, 223, 0.9) 11px 12.5px, transparent 13.2px);
  transform: rotate(calc(var(--p, 0) * 1080deg));
  transition: transform 220ms cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 120ms ease;
  box-shadow: 0 0 0 1px rgba(13, 15, 19, 0.9), 0 2px 8px rgba(0, 0, 0, 0.55);
}
[data-theme="destiny"] .projection-controls__slider:hover::-moz-range-thumb {
  box-shadow: 0 0 0 1px rgba(13, 15, 19, 0.9), 0 0 0 3px rgba(255, 180, 84, 0.22), 0 0 14px rgba(255, 180, 84, 0.35);
}
/* Detail label + units pick up the schematic ink (base uses --text-secondary,
   already themed; the accent line stays line-art). */
[data-theme="destiny"] .projection-controls__period-detail { color: var(--text-secondary); letter-spacing: 0.02em; }

/* Modal dimming must read on the graphite page (base .dialog-overlay is only rgba(0,0,0,.45)) */
[data-theme="destiny"] .dialog-overlay { background: rgba(6, 7, 9, 0.78); }
[data-theme="destiny"] .dialog-input:focus { box-shadow: 0 0 0 2px rgba(207, 214, 228, 0.15); }
[data-theme="destiny"] .workspace-selector__select:focus { box-shadow: 0 0 0 2px rgba(207, 214, 228, 0.15); }
/* Dialog selects: the custom listbox (v0.38.4) replaces the browser-drawn
   native popup — graphite plate + line-art trigger, mono option rows,
   amber for the selected option (the theme's accent, not OS blue). */
[data-theme="destiny"] .dialog-select__trigger {
  background-color: rgba(13, 15, 19, 0.85);
  border: 1px solid rgba(232, 230, 223, 0.42);
  color: #e8e6df;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border-radius: 10px 16px 12px 18px / 14px 12px 16px 12px;
}
[data-theme="destiny"] .dialog-select__trigger:hover { border-color: rgba(232, 230, 223, 0.6); }
[data-theme="destiny"] .dialog-select__trigger:focus {
  border-color: #cfd6e4;
  box-shadow: 0 0 0 2px rgba(207, 214, 228, 0.15);
}
[data-theme="destiny"] .dialog-select__options {
  background-color: rgba(13, 15, 19, 0.97);
  border: 1px solid rgba(232, 230, 223, 0.42);
  border-radius: 12px 18px 14px 20px / 16px 14px 18px 14px;
  box-shadow: inset 0 0 0 2px rgba(16, 18, 22, 0.9), 0 18px 50px rgba(0, 0, 0, 0.55);
}
[data-theme="destiny"] .dialog-select__option {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(232, 230, 223, 0.85);
}
[data-theme="destiny"] .dialog-select__option:hover,
[data-theme="destiny"] .dialog-select__option:focus {
  background-color: rgba(232, 230, 223, 0.08);
  color: #e8e6df;
}
[data-theme="destiny"] .dialog-select__option.selected {
  color: #ffb454;
  font-weight: 600;
}

/* ===== Custom scrollbars (destiny) — every scrollable component =====
   The default bright Chromium bar was the one element in the sheet that
   didn't look etched. Now: transparent track, thin angular thumb carrying
   the double-etch (dark separation gap + inner hairline) — a survey tag
   riding the rail. Applied to all destiny scrollers (panel bodies, lists,
   dialogs, dropdowns) via the attribute-scoped universal. */
[data-theme="destiny"] * {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(232, 230, 223, 0.32) transparent; /* Firefox */
}
[data-theme="destiny"] ::-webkit-scrollbar { width: 8px; height: 8px; }
[data-theme="destiny"] ::-webkit-scrollbar-track { background: transparent; }
[data-theme="destiny"] ::-webkit-scrollbar-thumb {
  background-color: rgba(232, 230, 223, 0.32);
  border: 1px solid rgba(16, 18, 22, 0.8); /* dark gap = etched separation */
  box-shadow: inset 0 0 0 1px rgba(232, 230, 223, 0.15); /* inner echo line */
  border-radius: 2px;
}
[data-theme="destiny"] ::-webkit-scrollbar-thumb:hover { background-color: rgba(232, 230, 223, 0.55); }
[data-theme="destiny"] ::-webkit-scrollbar-corner { background: transparent; }

/* Projection plate: the bar is not wanted at rest — its content is designed
   to fit. Thumb stays transparent unless the plate is hovered (Chromium), so
   a genuine overflow never becomes undiscoverable. */
[data-theme="destiny"] .panel--projection .panel__body::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="destiny"] .panel--projection:hover .panel__body::-webkit-scrollbar-thumb {
  background-color: rgba(232, 230, 223, 0.32);
  border-color: rgba(16, 18, 22, 0.8);
  box-shadow: inset 0 0 0 1px rgba(232, 230, 223, 0.15);
}

/* ===== Task 4 — data sections (accounts, transactions) ===== */

/* Table headers in mono for the blueprint feel; amounts/currency/freq read as data → mono too */
[data-theme="destiny"] .grid-table thead th { font-family: var(--font-mono); letter-spacing: 0.1em; }
[data-theme="destiny"] .cell-balance,
[data-theme="destiny"] .cell-amount,
[data-theme="destiny"] .cell-currency,
[data-theme="destiny"] .cell-freq { font-family: var(--font-mono); }

/* Accounts total — C1: the big tick-ring dial (R5). The value sits inside a
   segmented ring; the label drops below in readout style (R6). Pure CSS. */
[data-theme="destiny"] .accounts-summary {
  flex-direction: column; align-items: center; gap: 0.35rem;
  border-top: 1px solid var(--border-subtle); padding-top: 0.9rem;
}
[data-theme="destiny"] .accounts-summary__label {
  font-family: var(--font-mono); font-size: 0.625rem; font-weight: 400;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted);
}
[data-theme="destiny"] .accounts-summary__value {
  position: relative;
  font-family: var(--font-display); font-size: clamp(0.8rem, 1.1vw + 0.55rem, 1.2rem); font-weight: 400;
  letter-spacing: 0.02em; color: #e8e6df;
  padding: 1.1em 1.25em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
[data-theme="destiny"] .accounts-summary__value::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  /* 60 fine graduation ticks — instrument, not speckle */
  background: repeating-conic-gradient(var(--line-art-dim) 0deg 1.4deg, transparent 1.4deg 6deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 4px));
  pointer-events: none;
}

/* Muted micro-copy sits over glass now — keep it one step up (#DEST-4) */
[data-theme="destiny"] .transactions-summary__hint { color: var(--text-secondary); }
[data-theme="destiny"] .projection-controls__unit { color: var(--text-secondary); }
[data-theme="destiny"] .category-badge { color: #bccadf; background-color: rgba(21, 35, 60, 0.9); }

/* Transaction section labels + compact summary */
[data-theme="destiny"] .transaction-section__label {
  font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.18em;
}
[data-theme="destiny"] .transactions-summary { border-radius: 0; }
[data-theme="destiny"] .transactions-summary__label {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.14em;
}
/* clearance for the transactions panel's bottom-right curve (92px ry) */
[data-theme="destiny"] .transactions-summary { padding-right: 1.7rem; border-radius: 0; }
/* Mono (not Michroma) — the display face is too wide and breaks #89's single-line layout */
[data-theme="destiny"] .transactions-summary__value { font-family: var(--font-mono); font-size: 0.875rem; }

/* Ratio chart — C3: etched plate + circular scope readout (R5). The donut is a
   masked conic split income/expense, driven by --ratio-deg (one-line JS hook in
   renderRatioChart; inert in other themes, hidden when the chart is empty). */
[data-theme="destiny"] .ratio-chart {
  background-color: rgba(13, 15, 19, 0.82); /* --bg-input */
  border: 1px solid var(--border-subtle);
  border-radius: 30px 14px 36px 16px / 40px 24px 48px 22px;
  box-shadow: inset 0 0 0 2px rgba(13, 15, 19, 0.9), inset 0 0 0 3px rgba(232, 230, 223, 0.16);
  display: grid; grid-template-columns: 1fr 84px; grid-template-rows: auto 1fr; column-gap: 1rem;
  position: relative;
}
@media (max-width: 560px) {
  [data-theme="destiny"] .ratio-chart { grid-template-columns: 1fr 72px; column-gap: 0.6rem; }
  [data-theme="destiny"] .ratio-chart::after,
  [data-theme="destiny"] .ratio-chart::before { width: 72px; height: 72px; }
}
[data-theme="destiny"] .ratio-chart__header { grid-column: 1 / -1; }
[data-theme="destiny"] .ratio-chart__bars { align-self: center; }
[data-theme="destiny"] .ratio-chart:empty::before,
[data-theme="destiny"] .ratio-chart:empty::after { display: none; }
[data-theme="destiny"] .ratio-chart::after { /* the scope: donut ring, masked to the rim */
  content: ""; grid-column: 2; grid-row: 2; align-self: center;
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid rgba(232, 230, 223, 0.3);
  background: conic-gradient(var(--color-income) 0deg var(--ratio-deg, 0deg),
                             var(--color-expense) var(--ratio-deg, 0deg) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
  opacity: 0.85;
}
[data-theme="destiny"] .ratio-chart::before { /* scope center pin */
  content: ""; grid-column: 2; grid-row: 2; align-self: center;
  width: 84px; height: 84px;
  background: radial-gradient(circle at center, var(--line-art) 0 2px, transparent 2.6px);
  pointer-events: none;
}
[data-theme="destiny"] .ratio-chart__title {
  font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
}
[data-theme="destiny"] .ratio-chart__ratio { font-family: var(--font-display); color: #e8e6df; }
[data-theme="destiny"] .ratio-chart__bar-label,
[data-theme="destiny"] .ratio-chart__bar-value { font-family: var(--font-mono); }

/* Debt / conditional rows re-tuned to the palette */
[data-theme="destiny"] .account-row--debt { background-color: rgba(255, 107, 94, 0.06); }
[data-theme="destiny"] .account-row--debt:hover { background-color: rgba(255, 107, 94, 0.1); }
[data-theme="destiny"] .transaction--conditional { background-color: rgba(255, 180, 84, 0.09); }

/* ===== Task 5 — projection summary + charts ===== */
/* E (Phase 4): period presets become etched arrowheads (R7) — the reference's
   small chevron button clusters. Header/panel buttons keep the chamfer. */
[data-theme="destiny"] .projection-controls__preset {
  border-radius: 0; font-family: var(--font-mono); letter-spacing: 0.06em;
  /* (2026-09-02 history) when the column was the 22rem track, six arrowhead
     chips measured 335px (IBM Plex Mono loaded) against the 318px control row
     and wrapped 10yr. The column's 10% widening to 24.2rem (row ≈355px)
     restored the room, so the original padding stands again. */
  padding: 0.3rem 0.9rem 0.3rem 0.55rem;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
}
[data-theme="destiny"] .projection-controls__presets { gap: 0.25rem; }
/* End-date button (hazhir 2026-09-02): same etched-chip treatment as the
   presets/currency so it reads as one family on the plate. */
[data-theme="destiny"] .projection-controls__date-btn {
  background-color: var(--bg-input);
  border-color: var(--border-cell);
  border-radius: 0; font-family: var(--font-mono); letter-spacing: 0.12em;
  color: var(--text-secondary);
}
[data-theme="destiny"] .projection-controls__date-btn:hover,
[data-theme="destiny"] .projection-controls__date-btn:focus-visible {
  border-color: var(--border-highlight);
  color: var(--text-primary);
}
/* Display-currency dropdown: etched-chip treatment so it reads as part of
   the header plate (Issue #84). (The period chip it paired with was removed,
   hazhir 2026-09-02 — the detail line below the slider shows the period.) */
[data-theme="destiny"] .projection-currency__select {
  background-color: var(--bg-input);
  border-color: var(--border-cell);
  border-radius: 0; font-family: var(--font-mono); letter-spacing: 0.12em;
  color: var(--text-secondary);
}
[data-theme="destiny"] .projection-currency__select:hover,
[data-theme="destiny"] .projection-currency__select:focus {
  border-color: var(--border-highlight);
  color: var(--text-primary);
  box-shadow: 0 0 0 2px rgba(207, 214, 228, 0.15);
}
[data-theme="destiny"] .projection-currency__warn { color: var(--amber); }
/* Currency symbol fallback: Michroma (the readout display font) has no euro
   glyph — "€250.00" rendered as "O250.00". The .cur-sym span (added by
   formatCurrencyWithSymbol for projection values, Issue #84) uses the mono
   font, which covers all 8 supported currencies. */
[data-theme="destiny"] .projection-result__value .cur-sym,
[data-theme="destiny"] .projection-cashflow__value .cur-sym {
  font-family: var(--font-mono);
}
[data-theme="destiny"] .projection-controls__preset--active { background-color: #e8e6df; border-color: #e8e6df; color: #101216; font-weight: 600; }

/* Results — C2: each row carries a mini scope (R5) to its left. The highlight
   row's scope is amber and sweeps (transform-free: @property angle, Chromium OK). */
@property --sgu-sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
[data-theme="destiny"] .projection-result__row {
  position: relative;
  border-radius: 0;
  /* room for the scope; 3.1 → 2.75rem (#127) — the plain-1fr hub column is
     tight enough that the longest label row ("Projected Net Worth") needs
     the 0.35rem saved to keep a positive gap, and the scope ring still
     clears the label by 0.2rem. */
  padding-left: 2.75rem;
  background-color: rgba(13, 15, 19, 0.65);
  border: 1px solid var(--border-cell);
}
[data-theme="destiny"] .projection-result__row--highlight {
  background-color: rgba(27, 32, 39, 0.85);
  border-color: rgba(255, 180, 84, 0.35);
}
[data-theme="destiny"] .projection-result__row::before { /* scope ring + 4 quadrant ticks */
  content: ""; position: absolute; left: 0.55rem; top: 50%;
  width: 2rem; height: 2rem; transform: translateY(-50%);
  border: 1px solid rgba(232, 230, 223, 0.38); border-radius: 50%;
  background: repeating-conic-gradient(var(--line-art-dim) 0deg 6deg, transparent 6deg 90deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  pointer-events: none;
}
[data-theme="destiny"] .projection-result__row::after { /* scope center pin */
  content: ""; position: absolute; left: calc(0.55rem + 1rem); top: 50%;
  width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%;
  background: var(--line-art); pointer-events: none;
}
[data-theme="destiny"] .projection-result__row--highlight::before {
  border-color: rgba(255, 180, 84, 0.5);
  background:
    conic-gradient(from var(--sgu-sweep), rgba(255, 180, 84, 0.4) 0deg 26deg, transparent 26deg 360deg),
    repeating-conic-gradient(rgba(255, 180, 84, 0.65) 0deg 6deg, transparent 6deg 90deg);
  animation: sgu-scope-sweep 8s linear infinite;
}
[data-theme="destiny"] .projection-result__row--highlight::after { background: var(--amber); box-shadow: 0 0 6px rgba(255, 180, 84, 0.55); }
@keyframes sgu-scope-sweep { to { --sgu-sweep: 360deg; } }
[data-theme="destiny"] .projection-result__label {
  /* (#127) absolute 11px = the floor, at every viewport incl. mobile (html
     15px); letter-spacing 0.14em → 0 so the longest label ("Projected Net
     Worth") + display-face value hold one line with a positive gap in the
     plain-1fr hub column. */
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0;
}
[data-theme="destiny"] .projection-result__value { font-family: var(--font-display); font-weight: 400; color: #e8e6df; }
/* In the narrow hub column the wide display face wraps long values
   (e.g. "-CA$209,579.45") onto a second line — step it down so label +
   value hold one line. */
@container (max-width: 620px) {
  /* (#127) narrow plain-1fr hub column: the label keeps the absolute-11px
     floor (was 0.6rem = 9.6px/9px — sub-floor text), the value steps 14 →
     13px (still above floor, display face keeps its weight), and the row
     gives back 0.25rem on the right so the longest pair ("Projected Net
     Worth" + value) holds one line with a positive gap instead of the
     label flex-compressing into the value. */
  [data-theme="destiny"] .projection-result__row { padding-right: 0.5rem; }
  [data-theme="destiny"] .projection-result__label { font-size: 11px; letter-spacing: 0; }
  [data-theme="destiny"] .projection-result__value { font-size: 0.8125rem; }
}

/* Budget overview + projection charts — etched plates (flat, no glass) */
[data-theme="destiny"] .budget-overview {
  background-color: rgba(13, 15, 19, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 22px 34px 20px 38px / 30px 26px 36px 28px;
  box-shadow: inset 0 0 0 2px rgba(13, 15, 19, 0.9), inset 0 0 0 3px rgba(232, 230, 223, 0.16);
}
[data-theme="destiny"] .budget-overview__title { font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
[data-theme="destiny"] .projection-chart {
  background-color: rgba(13, 15, 19, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 34px 16px 40px 14px / 26px 38px 20px 42px;
  box-shadow: inset 0 0 0 2px rgba(13, 15, 19, 0.9), inset 0 0 0 3px rgba(232, 230, 223, 0.16);
}

/* ===== 5-column layout (POC #23–#29) — new components in the etched language =====
   Column footers read as plate readouts (R6): stencil label + display value.
   No element may fall back to light/dark values (completeness rule, §2.3 #5). */
[data-theme="destiny"] .panel__footer {
  border-top: 1px solid rgba(232, 230, 223, 0.42);
  background-color: transparent; /* the plate fill already covers it */
  font-family: var(--font-mono);
}
[data-theme="destiny"] .panel__footer-label { color: #e8e6df; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.6875rem; }
[data-theme="destiny"] .panel__footer-hint { color: var(--text-muted); letter-spacing: 0.18em; font-size: 0.5625rem; }
[data-theme="destiny"] .panel__footer-value { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.02em; color: #e8e6df; }
/* semantic colors stay semantic (gold never touches data values) */
[data-theme="destiny"] .panel--assets .panel__footer-value { color: var(--color-income); }
[data-theme="destiny"] .panel--liabilities .panel__footer-value { color: var(--color-expense); }
/* Content clearance for the plates' bottom curves (label/value get clipped
   otherwise) — same pattern as the header clearances above. The label takes
   its own row (readout style, R6) so wide values never wrap the pair. */
[data-theme="destiny"] .panel--assets .panel__footer,
[data-theme="destiny"] .panel--liabilities .panel__footer {
  padding-left: 2.2rem;
  padding-right: 2.2rem;
  flex-wrap: wrap;
  row-gap: 0.125rem;
}
[data-theme="destiny"] .panel--assets .panel__footer-label,
[data-theme="destiny"] .panel--liabilities .panel__footer-label {
  width: 100%;
}

/* Cash-flow grid: readout rows like the projection results */
[data-theme="destiny"] .projection-cashflow {
  background-color: rgba(13, 15, 19, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: 20px 30px 18px 36px / 28px 22px 32px 24px;
  box-shadow: inset 0 0 0 2px rgba(13, 15, 19, 0.9), inset 0 0 0 3px rgba(232, 230, 223, 0.16);
  gap: 0.3rem;
}
[data-theme="destiny"] .projection-cashflow__title { font-family: var(--font-mono); letter-spacing: 0.2em; color: var(--text-muted); font-weight: 400; }
[data-theme="destiny"] .projection-cashflow__label { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; }
[data-theme="destiny"] .projection-cashflow__value { font-family: var(--font-display); font-weight: 400; font-size: 0.9rem; }

/* Line-art icons inherit the button ink via currentColor; destiny adds a
   hair of stroke weight so they etch at the same depth as the chrome. */
[data-theme="destiny"] .btn .btn-icon { stroke-width: 1.9; }
[data-theme="destiny"] .btn--primary .btn-icon { stroke-width: 2; }
[data-theme="destiny"] .btn--danger .btn-icon { stroke-width: 2; }

/* Account category groups: the header row is an etched plate tab (R6) —
   full-width bar, matching the expense category group headers (#114/#115) */
[data-theme="destiny"] .account-group-header__inner {
  background-color: rgba(13, 15, 19, 0.82);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.18em; color: #e8e6df;
}
[data-theme="destiny"] .account-group-header__inner:hover { background-color: rgba(232, 230, 223, 0.08); }
[data-theme="destiny"] .account-group__chevron { color: var(--text-secondary); }
[data-theme="destiny"] .account-group__chevron .btn-icon { stroke-width: 2; }
[data-theme="destiny"] .account-group__count { color: var(--text-muted); letter-spacing: 0.1em; }

/* Expense category groups (#114): header row is a stencil plate tab, like accounts */
[data-theme="destiny"] .expense-group-header__inner {
  background-color: rgba(13, 15, 19, 0.82);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.18em; color: #e8e6df;
}
[data-theme="destiny"] .expense-group-header__inner:hover { background-color: rgba(232, 230, 223, 0.08); }
[data-theme="destiny"] .expense-group-header__name { color: #e8e6df; }
[data-theme="destiny"] .expense-group-header__count { color: var(--text-muted); letter-spacing: 0.1em; }

/* ===== Task 6 — gate motif + lock/unlock treatment ===== */
/* base: hidden outside destiny (destiny fill/size rules live with the panel titles above) */
.panel-icon { display: none; }

.gate-ring { display: none; }
[data-theme="destiny"] .gate-ring {
  display: block; width: 130px; height: auto; margin: 0 auto 0.75rem;
}
[data-theme="destiny"] .gate-ring circle { fill: none; stroke: #e8e6df; stroke-width: 2; }
[data-theme="destiny"] .gate-ring__ticks { stroke: #9a988f; stroke-width: 6; }
.gate-caption { display: none; }
[data-theme="destiny"] .gate-caption {
  display: block;
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.3em; color: #ffb454; margin-bottom: 1rem;
}

/* Locked banner re-tuned to the graphite palette */
[data-theme="destiny"] .app-locked-banner {
  background: linear-gradient(135deg, #1a1e24, #101216);
  border-bottom: 1px solid var(--border-subtle);
  color: #e8e6df;
}
[data-theme="destiny"] .app-locked-banner__text { font-family: var(--font-mono); letter-spacing: 0.08em; }

/* Unlock dialing overlay (created by JS, destiny only) */
.gate-dial {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 16, 0.7);
}
.gate-dial__seq { display: flex; gap: 8px; }
.gate-dial__cell {
  width: 38px; height: 38px;
  border: 1px solid var(--border-color);
  background: rgba(10, 15, 28, 0.9);
}
.gate-dial__cell svg { width: 24px; height: 24px; display: block; margin: auto;
  stroke: #cfd6e4; fill: none; stroke-width: 1.8; opacity: 0.18;
}
[data-theme="destiny"] .gate-dial__cell svg { animation: sgu-chev-flash 0.3s ease-out both; }
.gate-dial__cell:nth-child(2) svg { animation-delay: 0.07s !important; }
.gate-dial__cell:nth-child(3) svg { animation-delay: 0.14s !important; }
.gate-dial__cell:nth-child(4) svg { animation-delay: 0.21s !important; }
.gate-dial__cell:nth-child(5) svg { animation-delay: 0.28s !important; }
.gate-dial__cell:nth-child(6) svg { animation-delay: 0.35s !important; }
.gate-dial__cell:nth-child(7) svg { animation-delay: 0.42s !important; }
.gate-dial__cell:nth-child(8) svg { animation-delay: 0.49s !important; }
.gate-dial__cell:nth-child(9) svg { animation-delay: 0.56s !important; }
@keyframes sgu-chev-flash {
  0% { opacity: 0.18; filter: none; }
  40% { opacity: 1; filter: drop-shadow(0 0 7px rgba(207, 214, 228, 0.9)); }
  100% { opacity: 0.6; filter: none; }
}

/* --- Reduced motion: stop all destiny animations --- */
@media (prefers-reduced-motion: reduce) {
  [data-theme="destiny"] .sgu-bg,
  [data-theme="destiny"] .sgu-bg__sweep,
  [data-theme="destiny"] .header-logo__spin,
  [data-theme="destiny"] .gate-logo__chevron,
  [data-theme="destiny"] .gate-dial__cell svg,
  [data-theme="destiny"] .projection-result__row--highlight::before,
  [data-theme="destiny"] .sgu-scope__sweep-g {
    animation: none !important; opacity: 0.8;
  }
  [data-theme="destiny"] .sgu-pulsar__pair,
  [data-theme="destiny"] .sgu-pulsar__glow,
  [data-theme="destiny"] .sgu-pulsar__flash, [data-theme="destiny"] .sgu-ship__signal path {
    animation: none !important; opacity: 0;
  }
  [data-theme="destiny"] .sgu-pulsar__ring { animation: none !important; opacity: 0.25; transform: scale(1.2); }
}
