/* ================================================================
   صرفه‌جویی — Editorial monochrome
   - Mode-reactive lighting (high = bright, low = cursor-lit)
   - Blackout: dark veil with cursor-tracking hole
   - Magazine-style content article
   - Typographic card covers
   ================================================================ */

@font-face {
  font-family: "Kahroba";
  src: url("../woff2%28web%29/FD%28FarsiDigits%29/Kahroba-FD-L.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kahroba";
  src: url("../woff2%28web%29/FD%28FarsiDigits%29/Kahroba-FD-RG.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kahroba";
  src: url("../woff2%28web%29/FD%28FarsiDigits%29/Kahroba-FD-M.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kahroba";
  src: url("../woff2%28web%29/FD%28FarsiDigits%29/Kahroba-FD-SB.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kahroba";
  src: url("../woff2%28web%29/FD%28FarsiDigits%29/Kahroba-FD-B.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Kahroba", "Tahoma", system-ui, sans-serif;
  --font-mono: "Kahroba", "Tahoma", system-ui, sans-serif;

  /* DEFAULT THEME: MONO */
  --bg:           #ffffff;
  --bg-soft:      oklch(0.975 0 0);
  --bg-softer:    oklch(0.955 0 0);
  --ink:          oklch(0.14 0 0);
  --ink-soft:     oklch(0.40 0 0);
  --ink-faint:    oklch(0.62 0 0);
  --ink-ghost:    oklch(0.82 0 0);
  --hairline:     oklch(0.90 0 0);
  --hairline-soft: oklch(0.95 0 0);

  --lamp:         oklch(0.91 0.13 91);
  --lamp-deep:    oklch(0.46 0.08 82);
  --lamp-glow:    oklch(0.96 0.12 92);
  --warn:         oklch(0.30 0 0);

  /* Reactive */
  --energy: 72;
  --mx: 50vw; --my: 40vh; --halo-strength: 0;

  --pad: clamp(22px, 4vw, 80px);
  --gutter: clamp(14px, 2vw, 28px);
  --maxw: 1480px;
}

/* === MODE-SHIFTED VARS ===
   HIGH = bright at the theme's natural palette (no tint).
   LOW = palette stays the same — the dim-veil does the darkening,
   the cursor opens a window of readable (not 100%) brightness. */
[data-mode="high"][data-theme="mono"] {
  --bg:           #ffffff;
  --bg-soft:      oklch(0.975 0 0);
  --bg-softer:    oklch(0.955 0 0);
  --lamp:         oklch(0.62 0.19 34);
  --lamp-deep:    oklch(0.48 0.18 31);
  --lamp-glow:    oklch(0.70 0.20 35);
}

[data-mode="low"][data-theme="mono"] {
  --lamp:         oklch(0.68 0.16 152);
  --lamp-deep:    oklch(0.43 0.14 150);
  --lamp-glow:    oklch(0.76 0.17 152);
}

/* THEME: WARM CREAM */
[data-theme="warm"] {
  --bg: oklch(0.97 0.014 82); --bg-soft: oklch(0.95 0.016 82); --bg-softer: oklch(0.93 0.018 82);
  --ink: oklch(0.20 0.014 60); --ink-soft: oklch(0.44 0.012 60); --ink-faint: oklch(0.62 0.010 60); --ink-ghost: oklch(0.82 0.008 65);
  --hairline: oklch(0.86 0.014 70); --hairline-soft: oklch(0.91 0.012 75);
}
[data-mode="high"][data-theme="warm"] { --bg: oklch(0.97 0.014 82); }
[data-mode="high"][data-theme="cool"] { --bg: oklch(0.97 0.006 250); }
[data-mode="high"][data-theme="ink"]  { --bg: oklch(0.12 0 0); }

/* THEME: COOL SLATE */
[data-theme="cool"] {
  --bg: oklch(0.97 0.006 250); --bg-soft: oklch(0.94 0.008 250); --bg-softer: oklch(0.92 0.010 250);
  --ink: oklch(0.18 0.014 250); --ink-soft: oklch(0.44 0.010 250); --ink-faint: oklch(0.64 0.008 250); --ink-ghost: oklch(0.83 0.006 250);
  --hairline: oklch(0.86 0.008 245); --hairline-soft: oklch(0.91 0.006 245);
}

/* THEME: INK (dark) */
[data-theme="ink"] {
  --bg: oklch(0.10 0 0); --bg-soft: oklch(0.14 0 0); --bg-softer: oklch(0.18 0 0);
  --ink: oklch(0.96 0 0); --ink-soft: oklch(0.72 0 0); --ink-faint: oklch(0.52 0 0); --ink-ghost: oklch(0.32 0 0);
  --hairline: oklch(0.24 0 0); --hairline-soft: oklch(0.20 0 0);
}

/* === Base === */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: light; }
html[data-theme="ink"] { color-scheme: dark; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02";
  color: var(--ink);
  background: var(--bg);
  direction: rtl;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 380ms ease, color 380ms ease;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--bg); }

/* === Light pool — neutral top-to-bottom brightness. LOW mode changes
   only the light distribution, not the color temperature. */
.light-pool {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 700ms ease;
  opacity: 0;
}
.light-pool::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}
[data-mode="high"] .light-pool {
  opacity: 1;
  background: radial-gradient(
    ellipse 86vmax 128vh at 50% -18vh,
    oklch(1 0 0 / 0.18) 0%,
    oklch(1 0 0 / 0.08) 30%,
    transparent 72%
  );
}

[data-mode="low"] .light-pool {
  opacity: 1;
  background:
    linear-gradient(180deg,
      oklch(1 0 0 / 0.18) 0%,
      oklch(1 0 0 / 0.085) 18%,
      oklch(1 0 0 / 0.022) 54%,
      transparent 92%);
}
[data-mode="low"] .light-pool::after {
  opacity: 1;
  background:
    linear-gradient(180deg,
      oklch(1 0 0 / 0.05) 0%,
      oklch(1 0 0 / 0.012) 34%,
      transparent 76%);
}
html.is-energy-flicker[data-mode="low"] .light-pool {
  animation: low-energy-flicker 1.8s ease-in-out infinite;
}
html.is-energy-flicker[data-mode="low"] .dim-veil {
  animation: low-energy-veil 1.8s ease-in-out infinite;
}
@keyframes low-energy-flicker {
  0%, 100% { opacity: 1; }
  18% { opacity: 0.82; }
  24% { opacity: 0.98; }
  52% { opacity: 0.76; }
  60% { opacity: 0.94; }
}
@keyframes low-energy-veil {
  0%, 100% { opacity: 1; }
  18% { opacity: 1.08; }
  24% { opacity: 0.96; }
  52% { opacity: 1.16; }
  60% { opacity: 0.98; }
}
[data-mode="high"][data-theme="ink"] .light-pool {
  background: radial-gradient(
    ellipse 100vmax 120vh at 50% -10vh,
    oklch(1 0 0 / 0.10) 0%,
    oklch(1 0 0 / 0.03) 35%,
    transparent 70%
  );
}

/* === DIM VEIL — LOW-mode: a neutral falloff from the whole top edge
   downward. No colored halo, no center spotlight. === */
.dim-veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(180deg,
      oklch(0 0 0 / 0.00) 0%,
      oklch(0 0 0 / 0.13) 40%,
      oklch(0 0 0 / 0.28) 100%);
  opacity: 0;
  transition: opacity 800ms ease;
  -webkit-mask-image: none;
  mask-image: none;
}
[data-theme="ink"] .dim-veil { background: oklch(0 0 0 / 0.38); }
[data-mode="low"] .dim-veil { opacity: 1; }
body.is-blackout .dim-veil { opacity: 0 !important; }
html.is-lamp-off .dim-veil { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) { .dim-veil { transition: opacity 0s; } }

html.is-lamp-off {
  --bg: oklch(0.12 0 0);
  --bg-soft: oklch(0.16 0 0);
  --bg-softer: oklch(0.20 0 0);
  --ink: oklch(0.88 0 0);
  --ink-soft: oklch(0.68 0 0);
  --ink-faint: oklch(0.52 0 0);
  --ink-ghost: oklch(0.34 0 0);
  --hairline: oklch(0.30 0 0);
  --hairline-soft: oklch(0.24 0 0);
}

/* === CURSOR SPOT — visible but controlled lift around the cursor in LOW mode.
   Screen blend so it brightens the underlying dim without becoming a lamp. */
.cursor-spot {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 800ms ease;
  background: radial-gradient(
    circle 166px at var(--mx) var(--my),
    oklch(1 0 0 / 0.32) 0%,
    oklch(1 0 0 / 0.16) 36%,
    oklch(1 0 0 / 0.06) 62%,
    transparent 78%
  );
  mix-blend-mode: normal;
  filter: blur(2px);
}
[data-mode="low"] .cursor-spot { opacity: 1; }
body.is-blackout .cursor-spot { opacity: 0 !important; }
html.is-lamp-off .cursor-spot { opacity: 0 !important; }
@media (pointer: coarse) { .cursor-spot { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-spot { display: none; } }

/* === LAMP-OFF VEIL — page transition state.
   When the lamp "turns off", the page goes near-fully dark for travel.
   On the new page it fades back as the lamp turns on. */
.lamp-veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 88;
  display: grid;
  align-items: end;
  justify-items: center;
  background:
    linear-gradient(180deg, oklch(0.04 0 0 / 0.28), oklch(0.02 0 0 / 0.64)),
    oklch(0.075 0 0 / 0.76);
  opacity: 0;
  color: oklch(0.88 0 0);
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 600;
  transition: opacity 460ms cubic-bezier(.55, 0, .25, 1);
}
html.is-lamp-off .lamp-veil { opacity: 1 !important; }
html.is-lamp-off .stage {
  filter: grayscale(1);
}

.lamp-veil::before {
  content: attr(data-message);
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: min(86vw, 520px);
  margin-bottom: max(28px, env(safe-area-inset-bottom));
  padding: 7px 12px;
  border: 1px solid oklch(1 0 0 / 0.16);
  border-radius: 999px;
  background: oklch(0.10 0 0 / 0.76);
  box-shadow: 0 16px 44px oklch(0 0 0 / 0.26);
  color: oklch(0.82 0 0);
  font-size: clamp(12px, 2.4vw, 14px);
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 360ms ease, transform 360ms ease;
}

.lamp-veil.has-message::before {
  opacity: 1;
  transform: translateY(0);
}

.lamp-veil::after {
  content: attr(data-step);
  position: absolute;
  bottom: calc(max(28px, env(safe-area-inset-bottom)) + 44px);
  right: 50%;
  transform: translate(50%, 8px);
  color: oklch(0.56 0 0);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  opacity: 0;
  transition: opacity 360ms ease, transform 360ms ease;
}

.lamp-veil.has-message::after {
  opacity: 1;
  transform: translate(50%, 0);
}

/* During lamp-off, the mode toggle stays visible & beckoning */
html.is-lamp-off .mode-toggle {
  position: relative;
  z-index: 70;
  background: oklch(0 0 0 / 0.6);
  color: oklch(0.98 0 0);
  border-color: oklch(1 0 0 / 0.4);
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.15), 0 0 30px oklch(1 0 0 / 0.18);
}
html.is-lamp-off .mode-toggle .label,
html.is-lamp-off .mode-toggle .readout { color: oklch(0.85 0 0); }
html.is-lamp-off .energy-line { opacity: 0; }

.stage { position: relative; z-index: 3; }

/* === Energy hairline (top, drains right→left RTL) === */
.energy-line {
  position: fixed;
  top: 0;
  right: 0;
  height: 2px;
  width: calc(var(--energy) * 1%);
  background: var(--ink);
  z-index: 50;
  opacity: calc(0.18 + (1 - var(--energy) / 100) * 0.82);
  transition: width 600ms cubic-bezier(.4,0,.2,1), opacity 600ms ease, background 400ms ease, height 200ms ease;
  pointer-events: none;
}
.energy-line.is-low { background: oklch(0.55 0 0); height: 3px; }
.energy-line.is-critical { background: var(--ink); height: 3px; animation: pulse-warn 900ms ease-in-out infinite; }
@keyframes pulse-warn { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* === Header === */
.site-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px var(--pad);
  position: sticky;
  top: 0;
  z-index: 62;
  max-width: var(--maxw);
  margin: 0 auto;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg), transparent 0%), color-mix(in oklch, var(--bg), transparent 8%));
  border-bottom: 1px solid var(--hairline-soft);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  grid-column: 2;
  justify-self: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo {
  display: block;
  width: auto;
  height: clamp(44px, 4.4vw, 62px);
  object-fit: contain;
}
.brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.header-right { display: contents; }
.mode-control {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* === Mode toggle pill — a real lamp switch with a bulb === */
.mode-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  min-height: 52px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 220ms ease, background 220ms ease;
  position: relative;
}
.mode-toggle:hover { border-color: var(--ink); background: var(--bg-soft); }
.mode-help {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: color-mix(in oklch, var(--bg), transparent 5%);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease, transform 220ms ease;
}
.mode-help:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-soft);
  transform: translateY(-1px);
}

/* Consumption lamp cluster */
.lamp-cluster {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 18px);
  gap: 4px;
  width: 66px;
  height: 34px;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: color 380ms ease, filter 380ms ease;
}

.mini-lamp {
  position: relative;
  width: 18px;
  height: 34px;
}

.mini-lamp .wire {
  display: none;
}

.mini-lamp .cap {
  position: absolute;
  top: 21px;
  right: 4px;
  width: 10px;
  height: 7px;
  border: 1.6px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  background:
    linear-gradient(currentColor, currentColor) center 2px / 8px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center 5px / 8px 1px no-repeat;
  opacity: 0.48;
}

.mini-lamp .lamp-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 44% 44%;
  background: transparent;
  opacity: 0.44;
  border: 1.8px solid currentColor;
  box-shadow: none;
  transition: opacity 260ms ease, background 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.mini-lamp .lamp-dot::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 4px;
  border-bottom: 1.4px solid currentColor;
  border-left: 1.4px solid currentColor;
  border-right: 1.4px solid currentColor;
  border-radius: 0 0 5px 5px;
  opacity: 0.72;
}

.mini-lamp .lamp-dot::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: -5px;
  width: 4px;
  height: 5px;
  background: currentColor;
  opacity: 0.78;
}

.lamp-cluster .beam {
  position: absolute;
  top: 25px;
  right: -6px;
  width: 76px;
  height: 18px;
  background: radial-gradient(ellipse at top, oklch(1 0 0 / 0.30), transparent 70%);
  opacity: 0;
  transition: opacity 260ms ease;
}

.mode-toggle .mini-lamp .lamp-dot {
  background: currentColor;
  opacity: 0.22;
  box-shadow: none;
}

.mode-toggle.is-on .lamp-cluster,
.mode-toggle.is-off .lamp-cluster {
  color: var(--ink);
  filter: drop-shadow(0 0 7px oklch(1 0 0 / 0.42));
}

.mode-toggle.is-on .mini-lamp .lamp-dot,
.mode-toggle.is-off .mini-lamp:first-child .lamp-dot {
  background: color-mix(in oklch, var(--lamp), white 16%);
  border-color: color-mix(in oklch, var(--lamp), var(--ink) 22%);
  opacity: 1;
  box-shadow: 0 0 16px var(--lamp);
}
.mode-toggle.is-on .lamp-cluster .beam,
.mode-toggle.is-off .lamp-cluster .beam { opacity: 1; }

.mode-toggle.is-on .mini-lamp .cap,
.mode-toggle.is-on .mini-lamp .wire,
.mode-toggle.is-off .mini-lamp:first-child .cap,
.mode-toggle.is-off .mini-lamp:first-child .wire {
  color: var(--ink);
  opacity: 0.9;
}

[data-theme="ink"] .lamp-cluster { color: var(--ink-faint); }
[data-theme="ink"] .mode-toggle.is-on .lamp-cluster { color: var(--ink); }

/* Bulb breath when on */
.mode-toggle.is-on .lamp-cluster,
.mode-toggle.is-off .mini-lamp:first-child {
  animation: bulb-breath 4.5s ease-in-out infinite;
}
@keyframes bulb-breath {
  0%, 100% { filter: drop-shadow(0 0 6px oklch(1 0 0 / 0.36)); }
  50%      { filter: drop-shadow(0 0 11px oklch(1 0 0 / 0.58)); }
}

/* Switch viz */
.switch-viz {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 280ms ease, border-color 280ms ease;
}
.switch-viz .knob {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: right 320ms cubic-bezier(.4, 0, .2, 1), background 280ms ease, box-shadow 280ms ease;
}
.mode-toggle.is-off .switch-viz .knob {
  right: calc(100% - 14px);
  background: var(--ink-ghost);
  box-shadow: none;
}
.mode-toggle.is-on .switch-viz {
  background: var(--ink);
  border-color: var(--ink);
}
.mode-toggle.is-on .switch-viz .knob {
  background: var(--lamp);
  box-shadow: 0 0 6px oklch(1 0 0 / 0.6);
}
[data-theme="ink"] .mode-toggle.is-on .switch-viz { background: oklch(0.30 0 0); border-color: oklch(0.45 0 0); }
[data-theme="ink"] .mode-toggle.is-on .switch-viz .knob { background: var(--lamp); }

.mode-toggle .label {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink);
  padding-right: 10px;
  border-right: 1px solid var(--hairline);
}
[data-mode="low"] .mode-toggle .label { color: var(--ink-soft); }

/* === Energy display — segmented battery cells + fine bar + percentage === */
.energy-display {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: color-mix(in oklch, var(--bg), transparent 6%);
  box-shadow: 0 12px 28px -22px oklch(0 0 0 / 0.42);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}
.energy-display:hover { border-color: var(--ink-soft); }

.energy-cells {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.energy-cells .cell {
  width: 5px;
  height: 17px;
  background: var(--hairline);
  border-radius: 1.5px;
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink), transparent 94%);
  transition: background 240ms ease, opacity 200ms ease, transform 240ms ease;
}
.energy-cells .cell.is-lit { background: var(--ink); transform: translateY(-1px); }
[data-mode="high"] .energy-cells .cell.is-lit {
  background: oklch(0.56 0.20 34);
  box-shadow: 0 0 10px oklch(0.62 0.20 34 / 0.34);
}
[data-mode="low"] .energy-cells .cell.is-lit {
  background: oklch(0.55 0.16 152);
  box-shadow: 0 0 10px oklch(0.62 0.16 152 / 0.28);
}
.energy-display.is-low .energy-cells .cell.is-lit { background: var(--lamp-deep); }
.energy-display.is-critical .energy-cells .cell.is-lit {
  background: oklch(0.54 0.14 36);
  animation: cell-pulse 1.3s ease-in-out infinite;
}
@keyframes cell-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.32; }
}
[data-theme="ink"] .energy-cells .cell { background: oklch(0.30 0 0); }
[data-theme="ink"] .energy-cells .cell.is-lit { background: oklch(0.96 0 0); }

.energy-fine-bar {
  position: relative;
  width: 38px;
  height: 5px;
  background: var(--hairline);
  border-radius: 999px;
  overflow: hidden;
}
.energy-fine-bar .fill {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: calc(var(--energy) * 1%);
  background: var(--ink);
  transition: width 600ms cubic-bezier(.4, 0, .2, 1), background 240ms ease;
}
[data-mode="high"] .energy-fine-bar .fill { background: oklch(0.56 0.20 34); }
[data-mode="low"] .energy-fine-bar .fill { background: oklch(0.55 0.16 152); }

[data-mode="high"] .energy-display {
  border-color: oklch(0.56 0.20 34 / 0.26);
  box-shadow: 0 0 0 1px oklch(0.56 0.20 34 / 0.08), 0 14px 32px -24px oklch(0.56 0.20 34 / 0.5);
}

[data-mode="low"] .energy-display {
  border-color: oklch(0.55 0.16 152 / 0.24);
  box-shadow: 0 0 0 1px oklch(0.55 0.16 152 / 0.08), 0 14px 32px -24px oklch(0.55 0.16 152 / 0.42);
}
.energy-display.is-critical .energy-fine-bar .fill {
  animation: cell-pulse 1.3s ease-in-out infinite;
}
[data-theme="ink"] .energy-fine-bar { background: oklch(0.30 0 0); }
[data-theme="ink"] .energy-fine-bar .fill { background: oklch(0.96 0 0); }

.energy-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: left;
}

/* Ritual coachmark */
.coachmark {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: oklch(1 0 0 / 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 380ms ease;
}
.coachmark.is-on { opacity: 1; }
body.is-ritual-active .site-header {
  position: sticky;
  z-index: 98;
}
body.is-coach-active .site-header {
  position: sticky;
  z-index: 98;
  isolation: isolate;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: transparent;
  border-bottom-color: transparent;
}
body.is-ritual-active .brand,
body.is-ritual-active .mode-control,
body.is-ritual-active .mode-toggle {
  position: relative;
  z-index: 99;
}
body.is-coach-active .mode-control,
body.is-coach-active .mode-toggle {
  position: relative;
  z-index: 99;
}
body.is-ritual-active .mode-toggle,
body.is-coach-active .mode-toggle,
body.is-ritual-active .mode-help,
body.is-coach-active .mode-help {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: color-mix(in oklch, var(--bg), white 1%) !important;
  box-shadow: 0 16px 36px -24px oklch(0 0 0 / 0.45);
}
body.is-coach-active .coachmark {
  background: oklch(1 0 0 / 0.18);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.is-coach-active .stage > :not(.site-header) {
  filter: blur(7px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  transition: filter 220ms ease, opacity 220ms ease;
}
.coach-toggle-proxy {
  position: fixed;
  z-index: 130;
  margin: 0;
  appearance: none;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto;
  background: color-mix(in oklch, var(--bg), white 1%) !important;
  box-shadow: 0 20px 44px -26px oklch(0 0 0 / 0.52);
}
.coach-toggle-proxy * {
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.coach-panel {
  width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: color-mix(in oklch, var(--bg), transparent 2%);
  box-shadow: 0 34px 80px -42px oklch(0 0 0 / 0.55);
  padding: 22px;
  display: grid;
  gap: 10px;
  pointer-events: auto;
  transform: translateY(10px) scale(0.98);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
}
.coachmark.is-on .coach-panel { transform: translateY(0) scale(1); }
.coach-panel-ritual {
  width: min(520px, calc(100vw - 40px));
  justify-items: center;
  text-align: center;
  padding: 26px 26px 24px;
  border-radius: 28px;
  box-shadow: 0 40px 100px -50px oklch(0 0 0 / 0.5);
}
.coach-logo {
  display: block;
  width: min(220px, 48vw);
  height: auto;
  margin-bottom: 6px;
  filter: drop-shadow(0 14px 28px oklch(0 0 0 / 0.10));
}
.coach-panel strong {
  font-size: clamp(20px, 4vw, 30px);
  line-height: 1.25;
}
.coach-panel small {
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 34ch;
}
.coach-dismiss {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease;
}
.coach-dismiss:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
}
.coachmark .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lamp); box-shadow: 0 0 8px var(--lamp);
}

/* === Cover area (combined hero + filter — tighter than before) === */
.cover {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 92px) var(--pad) clamp(22px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.62fr) minmax(260px, 0.62fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.cover-copy {
  min-width: 0;
}
.cover h1 {
  font-size: clamp(44px, 9vw, 124px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-feature-settings: "ss01";
}
.cover h1 em {
  font-style: normal;
  color: var(--ink-faint);
  font-weight: 300;
}
.cover h1 .struck {
  position: relative;
  display: inline-block;
}
.cover h1 .struck::after {
  content: "";
  position: absolute;
  inset: auto 0 50%;
  height: 0.06em;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  animation: strike-in 1.2s 0.6s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes strike-in {
  to { transform: scaleX(1); }
}
.cover .aside { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.cover .lede {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 40ch;
  text-wrap: pretty;
  margin: 0;
}
.cover .meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.cover .meta-row .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-ghost);
}

.hero-cascade {
  position: relative;
  height: min(460px, 58vh);
  min-height: 330px;
  overflow: hidden;
  border-inline: 1px solid var(--hairline-soft);
  background: var(--bg-soft);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

.cascade-rail {
  display: grid;
  gap: 10px;
  padding: 20px 12px;
  animation: cascade-rise 28s linear infinite;
}

.hero-cascade:hover .cascade-rail,
.hero-cascade:focus-within .cascade-rail {
  animation-play-state: paused;
}

.cascade-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
  text-decoration: none;
  color: oklch(0.96 0 0);
  transition: border-color 180ms ease, transform 180ms ease;
  overflow: hidden;
  isolation: isolate;
}
.cascade-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, oklch(0 0 0 / 0.08), oklch(0 0 0 / 0.66));
}
.cascade-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18);
  transform: scale(1.02);
}

.cascade-card:hover,
.cascade-card:focus-visible {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.cascade-card span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: oklch(0.86 0 0);
  letter-spacing: 0.04em;
}

.cascade-card strong {
  align-self: end;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
}

@keyframes cascade-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* === Inline filter (sits subtly above content) === */
.filter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px var(--pad) 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 20px;
  border-top: 1px solid var(--hairline);
}
.filter-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
}
.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  color: var(--ink-soft);
  text-transform: none;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: color-mix(in oklch, var(--bg), transparent 4%);
  white-space: nowrap;
}
.chip {
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  padding: 2px 0;
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 180ms ease;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  position: relative;
}
.chip:hover { color: var(--ink); }
.chip.is-active { color: var(--ink); }
.chip.is-active::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: -6px;
  height: 2px;
  background: var(--ink);
}
.chip .n {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ink-ghost);
}

/* === Featured banner (full width, dramatic) === */
.featured {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--pad) 18px;
}
.featured-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.featured-frame {
  position: relative;
  aspect-ratio: 16 / 7;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(28px, 4vw, 56px);
  transition: border-color 280ms ease, background 280ms ease;
  isolation: isolate;
}
.featured-photo,
.item-photo,
.work-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.16) contrast(0.98);
  opacity: 0;
  transition: opacity 520ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
  color: transparent;
}
.featured-photo.is-loaded,
.item-photo.is-loaded,
.work-image.is-loaded { opacity: 1; }
.work-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: oklch(0.08 0 0);
}
.featured-link:hover .featured-frame {
  background: var(--bg);
  border-color: var(--ink);
}
/* Giant faded plate number behind the featured title */
.featured-plate {
  position: absolute;
  bottom: -0.18em;
  left: -0.05em;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(180px, 36vw, 520px);
  line-height: 1;
  color: oklch(0 0 0 / 0.04);
  pointer-events: none;
  letter-spacing: -0.06em;
  user-select: none;
}

.featured-frame::before,
.item-media::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, oklch(0 0 0 / 0.10) 0%, oklch(0 0 0 / 0.18) 42%, oklch(0 0 0 / 0.72) 100%),
    repeating-linear-gradient(90deg, oklch(1 0 0 / 0.08) 0 1px, transparent 1px 44px);
  opacity: 1;
  z-index: 1;
}

.featured-media-mark,
.item-media-mark {
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  top: clamp(18px, 3vw, 42px);
  z-index: 1;
  font-size: clamp(42px, 8vw, 116px);
  line-height: 0.9;
  font-weight: 700;
  color: oklch(1 0 0 / 0.16);
  letter-spacing: 0;
  max-width: 7ch;
  text-align: left;
  direction: rtl;
  pointer-events: none;
}

.item-media-mark {
  left: 18px;
  top: 18px;
  font-size: clamp(22px, 3vw, 40px);
  max-width: 5.5ch;
}

.item-kind {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  color: oklch(0.92 0 0);
  background: oklch(0 0 0 / 0.34);
  border: 1px solid oklch(1 0 0 / 0.20);
  padding: 4px 8px;
}

.item-water, .featured-frame.item-water { --cat: oklch(0.62 0.11 225); }
.item-power, .featured-frame.item-power { --cat: oklch(0.78 0.15 92); }
.item-gas, .featured-frame.item-gas { --cat: oklch(0.63 0.11 150); }
.item-fuel, .featured-frame.item-fuel { --cat: oklch(0.58 0.12 35); }
.item-plastic, .featured-frame.item-plastic { --cat: oklch(0.66 0.10 310); }
[data-theme="ink"] .featured-plate { color: oklch(1 0 0 / 0.06); }

.featured-kicker {
  position: absolute;
  top: 18px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  z-index: 2;
  color: oklch(0.90 0 0);
  text-transform: uppercase;
  background: oklch(0 0 0 / 0.34);
  padding: 5px 10px;
  border: 1px solid oklch(1 0 0 / 0.20);
}
.featured-title {
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
  align-self: end;
  z-index: 2;
  color: oklch(0.98 0 0);
  transition: color 280ms ease;
}
.featured-link:hover .featured-title { color: oklch(1 0 0); }
[data-theme="ink"] .featured-link:hover .featured-title { color: var(--lamp); }
.featured-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}
.featured-desc {
  max-width: 56ch;
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  text-wrap: pretty;
}
.featured-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}
.featured-more::after {
  content: "←";
  font-family: var(--font-sans);
  transition: transform 220ms ease;
}
.featured-link:hover .featured-more::after { transform: translateX(-4px); }

/* === Catalog === */
.catalog-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--pad) 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--hairline);
}
.catalog-head h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.catalog-head .range {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.catalog {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--pad) 80px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: clamp(14px, 2vw, 26px);
  row-gap: clamp(22px, 3vw, 34px);
}

/* === Item = typographic cover === */
.item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity 220ms ease;
  grid-column: span 3;
}
.item.is-motion,
.item.s-landscape,
.item.s-wide,
.item.s-hero,
.item.s-tall,
.item.s-square,
.item.s-portrait { grid-column: span 3; }
.item-media {
  position: relative;
  aspect-ratio: 4 / 5.15;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  align-items: end;
  padding: clamp(14px, 1.7vw, 24px);
  transition: border-color 240ms ease, background 240ms ease, transform 380ms cubic-bezier(.2,.7,.2,1);
  isolation: isolate;
}
/* Filament line under the card on hover — pure white now, RTL right→left */
.item-media::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 2px;
  background: var(--ink);
  transition: width 520ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.item:hover .item-media::after { width: 100%; }
.item.is-motion .item-media,
.item.s-landscape .item-media,
.item.s-wide .item-media { aspect-ratio: 4 / 5.15; padding: clamp(14px, 1.7vw, 24px); }
.item.s-square .item-media { aspect-ratio: 1; }
.item.s-tall .item-media { aspect-ratio: 4 / 5.15; }
.item:hover .item-media { border-color: var(--ink); background: var(--bg); }

/* Subtle charge marker in the corner */
.item-charge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding: 3px 7px;
  border: 1px solid var(--hairline);
  pointer-events: none;
}
.item.is-viewed .item-charge { opacity: 0; }

/* Item info row below cover — index + meta only, on a hairline */
.item-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.item-info .idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.item-info .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  max-width: 18ch;
  white-space: normal;
  line-height: 1.5;
  text-align: left;
}

/* Big title fills the cover */
.item-cover-title {
  position: relative;
  z-index: 2;
  width: 100%;
  font-size: clamp(15px, 1.22vw, 18px);
  line-height: 1.26;
  letter-spacing: 0;
  font-weight: 600;
  color: oklch(0.98 0 0);
  text-wrap: pretty;
  margin: 0;
  transition: color 240ms ease;
  display: block;
  overflow: visible;
}
.item.is-motion .item-cover-title {
  font-size: clamp(16px, 1.34vw, 19px);
}
.item:hover .item-cover-title { color: oklch(1 0 0); }
[data-theme="ink"] .item:hover .item-cover-title { color: var(--lamp); }

/* (cover-bottom removed in favor of cleaner item-info row below) */
.item-cover-bottom { display: none; }

/* Caption row below the cover (legacy class kept for compat) */
.item-info {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: baseline;
}
.item-info .idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.item-info .desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  max-width: 38ch;
  text-wrap: pretty;
}
.item-info .cat {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.item.is-viewed .item-cover-title::after {
  content: " ◐";
  color: var(--ink-ghost);
  font-size: 16px;
  vertical-align: middle;
}
.item.is-committed .item-cover-title::after {
  content: " ●";
  color: var(--lamp);
  font-size: 14px;
  vertical-align: middle;
}

/* === Section break (chapter divider) === */
.section-break {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--pad) clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: baseline;
  gap: 20px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding-left: 8px;
  border-left: 1px solid var(--hairline);
}
.section-title {
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
}
.section-rule { height: 1px; background: var(--hairline); align-self: center; }
.section-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  white-space: nowrap;
}

/* === Editorial aside (full-bleed pull-quote between sections) === */
.editorial-aside {
  max-width: var(--maxw);
  margin: clamp(28px, 4vw, 56px) auto;
  padding: clamp(72px, 9vw, 120px) var(--pad);
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.editorial-aside .aside-kicker {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--lamp-deep);
  text-transform: uppercase;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  border-left: 1px solid var(--bg);
  border-right: 1px solid var(--bg);
}
[data-theme="ink"] .editorial-aside .aside-kicker { color: var(--lamp); }
.editorial-aside .aside-quote {
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 400;
  margin: 0 auto 24px;
  max-width: 28ch;
  text-wrap: balance;
  color: var(--ink);
}
.editorial-aside .aside-source {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.editorial-aside .aside-source::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--ink-ghost);
}

/* === Index TOC (numbered list at the end) === */
.index-toc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4px var(--pad) 64px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.toc-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 18px;
  padding: 18px 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--hairline-soft);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: padding 280ms ease, background 200ms ease, color 200ms ease;
}
.toc-item:hover {
  padding-right: 22px;
  background: var(--bg-soft);
  color: var(--lamp-deep);
}
[data-theme="ink"] .toc-item:hover { color: var(--lamp); }
.toc-item .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.toc-item .t {
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0;
  line-height: 1.3;
}
.toc-item .leader {
  border-bottom: 1px dotted var(--ink-ghost);
  height: 0.7em;
  min-width: 24px;
  margin-bottom: 4px;
}
.toc-item .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.toc-item .arrow {
  font-family: var(--font-mono);
  color: var(--ink-ghost);
  margin-right: -6px;
  transition: transform 260ms ease;
}
.toc-item:hover .arrow { transform: translateX(-6px); color: var(--lamp); }
.toc-item.is-viewed .t::before {
  content: "◐ ";
  color: var(--ink-ghost);
}
.toc-item.is-committed .t::before {
  content: "● ";
  color: var(--lamp);
}

/* === Status feed (live system events — bottom-left) === */
.status-feed {
  position: fixed;
  z-index: 68;
  top: auto;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  width: 320px;
  max-width: calc(100vw - 32px);
  background: color-mix(in oklch, var(--bg), transparent 4%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 240ms ease;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 22px 54px -34px oklch(0 0 0 / 0.44);
}
.status-feed.has-items {
  opacity: 0.94;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.status-feed.has-items:hover { opacity: 1; }
.status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--hairline);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.status-close {
  appearance: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 10px;
  padding: 3px 8px;
  cursor: pointer;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.status-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  line-height: 1.4;
  padding: 4px 5px;
  border-radius: 6px;
  background: color-mix(in oklch, var(--bg-soft), transparent 48%);
  animation: status-in 360ms ease;
}
.status-item .t {
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.status-item .msg {
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}
.status-item.kind-charge .msg { color: var(--lamp-deep); }
[data-theme="ink"] .status-item.kind-charge .msg { color: var(--lamp); }
.status-item.kind-warn .msg { color: var(--warn); }
.status-item.kind-mode .msg { color: var(--ink); }
.status-item:nth-child(n+2) { display: none; }
@keyframes status-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.energy-ticker {
  position: fixed;
  z-index: 64;
  right: clamp(16px, 3vw, 28px);
  left: auto;
  bottom: clamp(16px, 3vw, 28px);
  width: min(360px, calc(100vw - 32px));
  min-height: 54px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: color-mix(in oklch, var(--bg), transparent 34%);
  -webkit-backdrop-filter: saturate(155%) blur(22px);
  backdrop-filter: saturate(155%) blur(22px);
  box-shadow: 0 28px 80px -44px oklch(0 0 0 / 0.58);
  padding: 10px 13px;
  display: grid;
  gap: 3px;
  pointer-events: none;
  overflow: hidden;
  transition: background 280ms ease, border-color 280ms ease, opacity 280ms ease, box-shadow 280ms ease;
}
[data-mode="low"] .energy-ticker {
  background: color-mix(in oklch, var(--bg-soft), transparent 32%);
  border-color: color-mix(in oklch, var(--hairline), black 12%);
  opacity: 0.86;
  box-shadow: 0 20px 52px -34px oklch(0 0 0 / 0.38);
}
[data-mode="low"] .energy-ticker .ticker-kicker,
[data-mode="low"] .energy-ticker .ticker-text {
  color: color-mix(in oklch, var(--ink-soft), black 10%);
}

.ticker-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-faint);
}

.ticker-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
  min-height: 18px;
}

.ticker-text::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-right: 3px;
  background: var(--ink-faint);
  vertical-align: -0.18em;
  animation: status-pulse 1s steps(2, end) infinite;
}

/* === Pre-blackout warning band === */
.warning-band {
  position: relative;
  top: auto;
  z-index: 8;
  max-width: min(var(--maxw), calc(100% - (var(--pad) * 2)));
  margin: 8px auto 0;
  background: color-mix(in oklch, var(--bg), transparent 3%);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-height: 0;
  padding: 0 16px;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
  transform: translateY(-8px);
  opacity: 0;
  transition: max-height 360ms cubic-bezier(.2,.7,.2,1), padding 360ms cubic-bezier(.2,.7,.2,1), opacity 240ms ease, transform 360ms ease;
  pointer-events: none;
  flex-wrap: wrap;
  border: 1px solid color-mix(in oklch, var(--warn), transparent 72%);
  border-radius: 999px;
  box-shadow: 0 18px 38px -30px oklch(0 0 0 / 0.4);
}
.warning-band.is-on {
  max-height: 58px;
  padding: 9px 16px;
  margin-bottom: 8px;
  opacity: 1;
  transform: translateY(0);
}
.warning-band .kicker {
  background: color-mix(in oklch, var(--warn), transparent 86%);
  color: var(--warn);
  padding: 3px 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  border-radius: 999px;
}
.warning-band .text strong { color: var(--warn); font-weight: 700; }
.warning-band .action { color: var(--ink-soft); }
[data-theme="ink"] .warning-band .action { color: oklch(0.55 0 0); }

/* === Idle low-mode phrases (ghostly typographic floats) === */
.idle-phrase { display: none !important; }

/* === Article: drop cap + signature === */
.article-body p:first-of-type::first-letter {
  font-size: 5.2em;
  line-height: 0.88;
  font-weight: 600;
  float: right;
  margin: 0.04em 0 0 0.12em;
  margin-right: 0;
  margin-left: 0.12em;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.article-signature {
  max-width: 640px;
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.article-signature .glyph {
  width: 10px; height: 10px;
  background: var(--lamp);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--lamp);
}
.article-signature .by {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* Old single lamp breath removed; lamp-cluster has its own */

/* === MAGAZINE ARTICLE (content page) === */
.article {
  max-width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px var(--pad) 0;
}
.article-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: clamp(40px, 6vw, 80px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.article-back a { color: var(--ink); text-decoration: none; transition: color 180ms; }
.article-back a:hover { color: var(--lamp-deep); }
[data-theme="ink"] .article-back a:hover { color: var(--lamp); }

.article-head {
  max-width: 920px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.article-kicker::before, .article-kicker::after {
  content: "";
  width: 28px; height: 1px;
  background: var(--ink-ghost);
}
.article-title {
  font-size: clamp(42px, 8vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 24px;
  text-wrap: balance;
}
.article-dek {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto;
  text-wrap: pretty;
  line-height: 1.5;
  font-weight: 300;
}

.article-figure {
  margin: 0 0 clamp(36px, 5vw, 64px);
}
.article-figure .frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 96px);
  isolation: isolate;
}
.article-figure .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, oklch(0 0 0 / 0.06), oklch(0 0 0 / 0.68));
  pointer-events: none;
}
.article-figure.is-poster .frame { aspect-ratio: 4 / 5; max-width: 720px; margin: 0 auto; }
.article-figure .frame .work-title {
  position: relative;
  z-index: 2;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-align: center;
  margin: 0;
  text-wrap: balance;
  color: oklch(0.98 0 0);
  max-width: 14ch;
}
.article-figure .frame .work-badge {
  position: absolute;
  top: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  z-index: 3;
  color: oklch(0.90 0 0);
  text-transform: uppercase;
  background: oklch(0 0 0 / 0.34);
  padding: 5px 10px;
  border: 1px solid oklch(1 0 0 / 0.20);
}
.article-figure .frame .play {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid; place-items: center;
  transition: opacity 220ms ease;
}
.article-figure .frame .play .btn {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 220ms ease;
}
.article-figure .frame .play .btn::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 13px 20px 13px 0;
  border-color: transparent var(--ink) transparent transparent;
  margin-right: -4px;
}
.article-figure .frame .play .btn:hover { background: var(--ink); }
.article-figure .frame .play .btn:hover::before {
  border-color: transparent var(--bg) transparent transparent;
}
.article-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.article-body {
  max-width: 640px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}
.article-body p { margin: 0 0 1.2em; text-wrap: pretty; }
.article-pull {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
  margin: clamp(36px, 5vw, 56px) auto;
  text-wrap: balance;
  color: var(--ink);
  position: relative;
  padding: 32px 0;
}
.article-pull::before, .article-pull::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 32px; height: 1px;
  background: var(--lamp);
}
.article-pull::before { top: 0; }
.article-pull::after { bottom: 0; }

.article-action {
  max-width: 640px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.article-action .note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.btn-do {
  appearance: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  background: var(--ink);
  color: var(--bg);
  padding: 16px 36px;
  display: inline-flex; align-items: center; gap: 12px;
  transition: background 220ms ease;
}
.btn-do::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--lamp);
  box-shadow: 0 0 8px var(--lamp);
}
.btn-do:hover { background: var(--lamp-deep); }
.btn-do:disabled { cursor: default; }
.btn-do.is-done {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-do.is-done::before { background: var(--lamp); }

.article-secondary {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.article-secondary a, .article-secondary button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms ease;
}
.article-secondary a:hover, .article-secondary button:hover { color: var(--ink); }

/* === Related === */
.related {
  max-width: var(--maxw);
  margin: 80px auto 0;
  padding: 56px var(--pad) 60px;
  border-top: 1px solid var(--hairline);
}
.related h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 28px;
  font-weight: 500;
}
.related-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(16px, 2.4vw, 32px);
  row-gap: 32px;
}
.related-strip .item,
.related-strip .item.is-motion,
.related-strip .item.s-landscape,
.related-strip .item.s-wide,
.related-strip .item.s-hero,
.related-strip .item.s-tall,
.related-strip .item.s-square,
.related-strip .item.s-portrait {
  grid-column: span 1;
}

/* === Redesigned content page === */
.article-body p:first-of-type::first-letter { all: unset; }

.article-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 14px;
  margin-bottom: clamp(14px, 2vw, 24px);
  border-bottom: 1px solid var(--hairline-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.back-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 12px;
  background: color-mix(in oklch, var(--bg), transparent 6%);
}

.back-chip::before {
  content: "";
  width: 18px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 52%, currentColor 52%);
  opacity: 0.55;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(320px, 430px);
  justify-content: center;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start;
}

.article-shell .article-figure {
  position: sticky;
  top: 88px;
  margin: 0;
}

.article-shell .article-figure .frame {
  aspect-ratio: 4 / 5;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  background: oklch(0.12 0 0);
  box-shadow: 0 28px 70px -50px oklch(0 0 0 / 0.55);
  cursor: zoom-in;
  overflow: hidden;
}

.article-shell .article-figure.is-poster .frame {
  width: min(100%, 430px);
  margin-inline: auto;
}

.article-shell .article-figure.is-motion .frame {
  aspect-ratio: 16 / 10.2;
  cursor: default;
}

.article-shell .article-figure .frame::after { display: none; }

.article-shell .article-figure .frame .work-title { display: none; }

.article-shell .article-figure .frame .work-badge {
  top: 16px;
  right: 16px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0;
}

.article-shell .article-figure figcaption {
  margin-top: 8px;
  padding-inline: 4px;
  letter-spacing: 0;
  align-items: center;
}

.article-panel {
  min-height: 0;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: clamp(18px, 2vw, 24px);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg), white 10%), color-mix(in oklch, var(--bg-soft), transparent 12%));
  box-shadow: 0 26px 72px -58px oklch(0 0 0 / 0.62);
}

.article-panel .article-kicker {
  margin-bottom: 10px;
  letter-spacing: 0;
}

.article-panel .article-kicker::before,
.article-panel .article-kicker::after { display: none; }

.article-panel .article-title {
  max-width: none;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
  text-wrap: pretty;
}

.article-panel .article-dek {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(13px, 1.08vw, 15px);
  line-height: 1.7;
  text-wrap: pretty;
}

.article-panel .article-pull {
  margin: clamp(14px, 1.5vw, 18px) 0;
  padding: 10px 0;
  text-align: right;
  font-size: clamp(17px, 1.45vw, 22px);
  max-width: 24ch;
}

.article-panel .article-pull::before,
.article-panel .article-pull::after {
  right: 0;
  left: auto;
  transform: none;
  background: var(--ink);
  opacity: 0.22;
}

.article-panel .article-action {
  margin: 0;
  max-width: none;
  align-items: flex-start;
  text-align: right;
}

.article-panel .article-action .note {
  max-width: 30ch;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-transform: none;
}

.article-panel .btn-do {
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 18px;
}

.article-panel .article-secondary {
  justify-content: flex-start;
  max-width: none;
  margin: 14px 0 0;
  padding-top: 14px;
}

.content-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: clamp(16px, 2.4vw, 24px);
}

.nav-card {
  min-height: 72px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 10px 11px;
  color: var(--ink);
  text-decoration: none;
  background: oklch(1 0 0 / 0.96);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.nav-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  background: oklch(1 0 0);
}

.nav-card span,
.nav-card small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: color-mix(in oklch, var(--ink), white 36%);
}

.nav-card strong {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  text-wrap: pretty;
  display: block;
  overflow: visible;
}

.mobile-content-nav { display: none; }

.related {
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: clamp(20px, 2.4vw, 28px);
}

.related h3 {
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.5vw, 34px);
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.related-strip {
  align-items: start;
}
.related-card {
  display: grid;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.related-card-media {
  position: relative;
  aspect-ratio: 4 / 4.65;
  overflow: hidden;
  border-radius: 18px;
  background: color-mix(in oklch, var(--bg-soft), black 8%);
  box-shadow: 0 20px 48px -38px oklch(0 0 0 / 0.46);
}
.related-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 380ms ease, transform 280ms ease;
}
.related-card-photo.is-loaded { opacity: 1; }
.related-card:hover .related-card-photo { transform: scale(1.025); }
.related-card-kind {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid color-mix(in oklch, var(--hairline), white 20%);
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in oklch, var(--bg), white 34%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
}
.related-card-body {
  display: grid;
  gap: 8px;
  padding: 2px 2px 0;
}
.related-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 600;
  text-wrap: pretty;
}
.related-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
  background: oklch(0.06 0 0 / 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.media-lightbox.is-on {
  opacity: 1;
  pointer-events: auto;
}
.media-lightbox-close {
  position: absolute;
  top: clamp(16px, 3vw, 30px);
  left: clamp(16px, 3vw, 30px);
  appearance: none;
  border: 1px solid oklch(1 0 0 / 0.18);
  border-radius: 999px;
  background: oklch(0 0 0 / 0.26);
  color: oklch(0.96 0 0);
  min-height: 40px;
  padding: 8px 14px;
  font-family: inherit;
  cursor: pointer;
}
.media-lightbox-shell {
  width: min(1120px, calc(100vw - 44px));
  max-height: calc(100vh - 52px);
  display: grid;
  place-items: center;
}
.media-lightbox-figure {
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.media-lightbox-figure img,
.media-lightbox-figure video {
  max-width: 100%;
  max-height: calc(100vh - 136px);
  border-radius: 20px;
  display: block;
  object-fit: contain;
  box-shadow: 0 40px 100px -52px oklch(0 0 0 / 0.7);
}
.media-lightbox-figure figcaption {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  color: oklch(0.92 0 0);
}
.media-lightbox-figure figcaption strong {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
}
.media-lightbox-figure figcaption span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: oklch(0.76 0 0);
}

/* === Blackout — readable dark mode, not an unreadable black cover === */
body.is-blackout {
  --bg: oklch(0.13 0 0);
  --bg-soft: oklch(0.17 0 0);
  --bg-softer: oklch(0.205 0 0);
  --ink: oklch(0.92 0 0);
  --ink-soft: oklch(0.76 0 0);
  --ink-faint: oklch(0.60 0 0);
  --ink-ghost: oklch(0.38 0 0);
  --hairline: oklch(0.34 0 0);
  --hairline-soft: oklch(0.27 0 0);
  background: var(--bg);
  color: var(--ink);
}

.blackout-veil {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
  background:
    linear-gradient(180deg, oklch(0 0 0 / 0.00), oklch(0 0 0 / 0.08)),
    oklch(0.055 0 0 / 0.14);
  opacity: 0;
  transition: opacity 380ms ease;
}
body.is-blackout .blackout-veil { opacity: 0.16; }
body.is-blackout .light-pool { opacity: 0 !important; }
body.is-blackout .stage {
  pointer-events: none;
  background: var(--bg);
  color: var(--ink);
  filter: blur(4px) grayscale(1);
  transform: scale(1.006);
  transform-origin: center top;
}
body.is-blackout .energy-line { opacity: 0; }

.blackout-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  padding: 24px;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
body.is-blackout .blackout-modal { display: flex; }
.blackout-modal .panel {
  max-width: 560px;
  width: 100%;
  background: oklch(0.10 0 0 / 0.90);
  color: var(--ink);
  border: 1px solid oklch(1 0 0 / 0.16);
  padding: 24px;
  text-align: right;
  box-shadow:
    0 50px 90px -20px oklch(0 0 0 / 0.7),
    0 0 80px oklch(1 0 0 / 0.08);
  position: relative;
  border-radius: 10px;
}

.blackout-visual {
  position: relative;
  height: 168px;
  margin-bottom: 22px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, oklch(0.15 0 0), oklch(0.08 0 0));
}

.blackout-visual .wire {
  position: absolute;
  top: 0;
  right: 50%;
  width: 2px;
  height: 48px;
  background: var(--ink);
  opacity: 0.78;
}

.blackout-visual .bulb {
  position: absolute;
  top: 48px;
  right: calc(50% - 16px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: oklch(0.42 0 0);
  box-shadow: 0 0 20px oklch(1 0 0 / 0.14), 0 0 90px oklch(1 0 0 / 0.07);
}

.blackout-modal[data-reason="high"] .blackout-visual .bulb {
  animation: blackout-flicker 900ms steps(2, end) infinite;
}

.blackout-visual .beam {
  position: absolute;
  top: 72px;
  right: calc(50% - 150px);
  width: 300px;
  height: 112px;
  background: radial-gradient(ellipse at top, oklch(1 0 0 / 0.12), transparent 70%);
}

.blackout-visual .breaker {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 72px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
}

.blackout-visual .breaker span {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 16px oklch(1 0 0 / 0.16);
}

@keyframes blackout-flicker {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0.22; box-shadow: 0 0 12px var(--lamp); }
}
.blackout-modal .kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
}
[data-theme="ink"] .blackout-modal .kicker { color: var(--ink-faint); }
.blackout-modal .kicker::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-faint);
  box-shadow: 0 0 8px oklch(1 0 0 / 0.18);
}
.blackout-modal h3 {
  margin: 0 0 14px;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0;
}
.blackout-modal p {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.blackout-modal .lightswitch {
  appearance: none;
  background: oklch(0.88 0 0);
  color: oklch(0.08 0 0);
  border: 1px solid oklch(0.88 0 0);
  border-radius: 8px;
  padding: 11px 18px 11px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
}
.blackout-modal .lightswitch .toggle {
  width: 42px; height: 22px;
  background: oklch(0.30 0 0);
  border: 1px solid oklch(0.40 0 0);
  border-radius: 999px;
  position: relative;
}
.blackout-modal .lightswitch .toggle::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px; right: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: all 280ms ease;
}
.blackout-modal .lightswitch:hover .toggle::after {
  left: auto; right: 1px;
  background: oklch(0.92 0 0);
  box-shadow: 0 0 12px oklch(1 0 0 / 0.22);
}

/* === Page transition flash === */
.flash-veil {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  pointer-events: none;
  opacity: 1;
  transition: opacity 480ms ease;
}
.flash-veil.is-gone { opacity: 0; }
.transitioning { pointer-events: none; }
.transitioning .stage {
  transition: opacity 380ms ease, transform 380ms ease;
  opacity: 0;
  transform: translateY(-6px);
}

/* Charge cue */
.charge-cue {
  position: fixed;
  z-index: 70;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--ink);
  padding: 4px 10px;
  opacity: 0;
  animation: charge-rise 1500ms ease-out forwards;
  transform: translate(-50%, 0);
}
@keyframes charge-rise {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  18% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -38px); }
}

/* === Footer === */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px var(--pad) 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.footer .col { display: flex; gap: 14px; align-items: center; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Lightswitch (footer-style back link) */
.lightswitch {
  appearance: none;
  border: 1px solid var(--hairline);
  background: transparent;
  padding: 5px 12px 5px 5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 999px;
  text-transform: uppercase;
  transition: all 220ms ease;
}
.lightswitch:hover { border-color: var(--ink); color: var(--ink); }
.lightswitch .toggle {
  width: 24px; height: 14px;
  background: var(--bg-soft);
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--hairline);
}
.lightswitch .toggle::after {
  content: "";
  position: absolute;
  top: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--lamp);
  transition: all 280ms ease;
}
.lightswitch:hover .toggle::after {
  right: auto; left: 1px;
  background: var(--ink-ghost);
}

/* === Tweaks panel === */
.tweaks {
  position: fixed;
  z-index: 80;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  width: 280px;
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 18px 18px 16px;
  display: none;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 30px 60px -24px oklch(0 0 0 / 0.4);
}
.tweaks.is-open { display: flex; }
.tweaks-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tweaks-head h4 {
  margin: 0;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.tweaks-close {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font-size: 18px; color: var(--ink-soft); line-height: 1; padding: 4px;
}
.tweaks-close:hover { color: var(--ink); }
.tweaks-group { display: flex; flex-direction: column; gap: 10px; }
.tweaks-group .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.theme-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.theme-swatch {
  appearance: none; background: transparent; cursor: pointer; padding: 0;
  border: 1px solid var(--hairline);
  aspect-ratio: 1;
  display: flex; flex-direction: column; overflow: hidden;
  position: relative;
  transition: border-color 180ms ease;
}
.theme-swatch:hover { border-color: var(--ink); }
.theme-swatch.is-active { border-color: var(--ink); border-width: 2px; }
.theme-swatch .a { flex: 1; }
.theme-swatch .b { height: 30%; }
.theme-swatch[data-theme="mono"] .a { background: #fff; }
.theme-swatch[data-theme="mono"] .b { background: #111; }
.theme-swatch[data-theme="warm"] .a { background: oklch(0.97 0.014 82); }
.theme-swatch[data-theme="warm"] .b { background: oklch(0.20 0.014 60); }
.theme-swatch[data-theme="cool"] .a { background: oklch(0.97 0.006 250); }
.theme-swatch[data-theme="cool"] .b { background: oklch(0.18 0.014 250); }
.theme-swatch[data-theme="ink"] .a { background: oklch(0.10 0 0); }
.theme-swatch[data-theme="ink"] .b { background: oklch(0.96 0 0); }
.theme-swatch .name {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bg);
  mix-blend-mode: difference; pointer-events: none;
}
.speed-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.speed-row button {
  appearance: none; background: transparent;
  border: 1px solid var(--hairline);
  padding: 6px 0;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); cursor: pointer;
  transition: all 180ms ease;
}
.speed-row button:hover { color: var(--ink); border-color: var(--ink); }
.speed-row button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }


/* ================================================================
   HOME REDESIGN — clean hero, carousel, usable gallery
   ================================================================ */
.home-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 3.4vw, 42px) var(--pad) clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(16px, 2.2vw, 32px);
  align-items: stretch;
}

.hero-panel {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  align-content: start;
  padding: clamp(18px, 2vw, 22px);
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg), white 10%), color-mix(in oklch, var(--bg-soft), transparent 4%));
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.34), transparent 46%),
    repeating-linear-gradient(90deg, color-mix(in oklch, var(--ink), transparent 96%) 0 1px, transparent 1px 52px);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto auto 18px 18px;
  width: clamp(140px, 18vw, 220px);
  height: clamp(120px, 14vw, 170px);
  border-radius: 26px;
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg), white 30%), color-mix(in oklch, var(--bg-soft), transparent 2%));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.35),
    0 24px 56px -46px oklch(0 0 0 / 0.18);
  pointer-events: none;
}

.hero-topline,
.hero-copy,
.hero-focus-card,
.hero-bottomline,
.hero-stats-inline {
  position: relative;
  z-index: 1;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.hero-kicker {
  align-self: flex-start;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 11px;
}

.hero-stats-inline {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hero-stats-inline span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  background: color-mix(in oklch, var(--bg), white 28%);
}

.hero-copy {
  display: grid;
  gap: 6px;
  max-width: 42ch;
}

.hero-panel h1 {
  max-width: 13.5ch;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-panel h1 em {
  display: block;
  font-style: normal;
  font-weight: 350;
  color: var(--ink-faint);
}

.hero-panel p {
  max-width: 42ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.58;
  text-wrap: pretty;
}

.hero-focus-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: clamp(14px, 1.4vw, 16px);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg), white 22%), color-mix(in oklch, var(--bg-soft), transparent 4%));
  box-shadow: 0 26px 60px -46px oklch(0 0 0 / 0.22);
}

.hero-focus-kicker {
  display: inline-flex;
  justify-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  background: color-mix(in oklch, var(--bg), white 32%);
}

.hero-focus-title {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
}

.hero-focus-desc {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.58;
}

.hero-focus-cta {
  display: grid;
  gap: 0;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}

.hero-focus-cta strong {
  font-size: 16px;
  line-height: 1.58;
  font-weight: 600;
  color: var(--ink);
}

.hero-bottomline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.hero-actions a:hover { transform: translateY(-2px); }
.hero-primary { background: var(--ink); color: var(--bg) !important; }
.hero-secondary { background: transparent; }

.hero-carousel {
  width: 100%;
  aspect-ratio: 1;
  min-height: auto;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  justify-self: stretch;
  align-self: start;
}

.carousel-viewport {
  position: absolute;
  inset: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  text-decoration: none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 620ms ease, transform 900ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
  opacity: 0;
  transition: opacity 520ms ease;
  background: transparent;
}

.carousel-slide img.is-loaded { opacity: 1; }

.carousel-controls {
  position: absolute;
  right: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 34px);
  top: auto;
  bottom: clamp(12px, 2vw, 20px);
  transform: none;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.carousel-controls button {
  pointer-events: auto;
  appearance: none;
  border: 1px solid var(--hairline);
  background: color-mix(in oklch, var(--bg), white 48%);
  color: var(--ink);
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.carousel-dots button {
  min-height: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.30);
}

.carousel-dots button.is-active {
  width: 28px;
  background: oklch(1 0 0 / 0.88);
}

.home-filter {
  position: sticky;
  top: 79px;
  z-index: 43;
  background: color-mix(in oklch, var(--bg), transparent 5%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hairline-soft);
  border-inline: 0;
  padding-block: 14px;
}

.clean-sections {
  max-width: var(--maxw);
  margin: 0 auto;
}

.catalog-intro {
  padding: clamp(38px, 5vw, 70px) var(--pad) 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: end;
  border-bottom: 1px solid var(--hairline);
}

.catalog-intro span,
.catalog-intro p {
  color: var(--ink-faint);
  font-size: 13px;
}

.catalog-intro h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1;
}

.clean-catalog {
  padding-top: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.clean-catalog .item,
.clean-catalog .item.is-motion,
.clean-catalog .item.s-landscape,
.clean-catalog .item.s-wide,
.clean-catalog .item.s-hero,
.clean-catalog .item.s-tall,
.clean-catalog .item.s-square,
.clean-catalog .item.s-portrait {
  grid-column: auto;
}

.clean-catalog .item-media {
  aspect-ratio: 4 / 4.9;
  border-radius: 16px;
  padding: clamp(13px, 1.45vw, 20px);
  transform: translateZ(0);
}

.clean-catalog .item:hover .item-media {
  transform: translateY(-4px);
}

.clean-catalog .item-info {
  border-top: 0;
  padding-top: 2px;
}

.section-break,
.editorial-aside,
.index-toc,
.featured { display: none; }

/* ================================================================
   MOBILE — اهمیت ویژه
   ================================================================ */
@media (max-width: 880px) {
  :root { --pad: 18px; --gutter: 12px; }
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding-top: 14px;
    padding-bottom: 14px;
    align-items: center;
    backdrop-filter: none;
    max-width: none;
  }
  .brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }
  .brand-logo { height: 40px; }
  .brand-num { display: none; }
  .header-right {
    display: contents;
  }
  .mode-control {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    gap: 6px;
  }
  .mode-toggle {
    min-height: 48px;
    width: min(132px, 100%);
    justify-content: center;
    padding: 6px 8px;
    gap: 6px;
    border-radius: 14px;
    background: color-mix(in oklch, var(--bg), transparent 3%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .mode-toggle .lamp-cluster {
    width: 58px;
    height: 31px;
    grid-template-columns: repeat(3, 17px);
    gap: 3px;
  }
  .mode-toggle .mini-lamp {
    width: 17px;
    height: 31px;
  }
  .mode-toggle .mini-lamp .cap { top: 19px; right: 4px; width: 9px; height: 6px; }
  .mode-toggle .mini-lamp .lamp-dot { top: 3px; right: 2px; width: 13px; height: 17px; }
  .mode-toggle .mini-lamp .lamp-dot::before { right: 4px; bottom: 4px; width: 4px; height: 4px; }
  .mode-toggle .mini-lamp .lamp-dot::after { right: 5px; width: 4px; height: 5px; bottom: -5px; }
  .mode-toggle .switch-viz { width: 28px; height: 15px; }
  .mode-toggle .switch-viz .knob { width: 9px; height: 9px; top: 2px; }
  .mode-toggle.is-off .switch-viz .knob { right: calc(100% - 12px); }
  .mode-toggle .label {
    display: none;
  }
  .mode-help {
    display: none;
  }

  .energy-display {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-height: 48px;
    width: min(132px, 100%);
    justify-content: center;
    padding: 6px 8px;
    gap: 6px;
    border-radius: 14px;
    background: color-mix(in oklch, var(--bg), transparent 3%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
  .energy-cells { gap: 1.5px; }
  .energy-cells .cell { width: 4px; height: 13px; }
  .energy-fine-bar { width: 28px; height: 3px; }
  .energy-pct { font-size: 10px; min-width: 26px; }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 12px;
    padding-bottom: 12px;
    align-items: stretch;
  }

  .hero-panel {
    min-height: auto;
    grid-template-rows: auto auto auto;
    gap: 12px;
    padding: 14px 14px 12px;
    border-radius: 18px;
  }

  .hero-panel::after {
    display: none;
  }

  .hero-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats-inline {
    justify-content: flex-start;
  }

  .hero-copy {
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .hero-panel h1 {
    max-width: none;
    width: 100%;
    margin: 0;
    font-size: clamp(28px, 8.4vw, 36px);
    line-height: 1.04;
    text-wrap: pretty;
  }

  .hero-panel p {
    max-width: none;
    width: 100%;
    font-size: 12px;
    line-height: 1.62;
  }

  .hero-focus-card {
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  .hero-focus-title {
    max-width: none;
    font-size: clamp(19px, 6vw, 26px);
  }

  .hero-focus-desc {
    max-width: none;
    font-size: 13px;
    line-height: 1.75;
  }

  .hero-focus-cta strong {
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-bottomline {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions a {
    flex: 1;
    min-width: 130px;
  }

  .hero-carousel {
    width: 100%;
    aspect-ratio: 1;
    min-height: auto;
    border-radius: 18px;
  }

  .carousel-slide {
    padding: 0;
  }

  .carousel-controls {
    right: 14px;
    left: 14px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .carousel-dots {
    display: none;
  }

  .carousel-controls button {
    min-height: 32px;
    padding-inline: 10px;
  }

  .home-filter {
    top: 70px;
    padding-block: 10px;
    border-inline: 0;
    overflow: hidden;
  }

  .catalog-intro {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 34px;
  }

  .catalog-intro h2 {
    font-size: 26px;
  }

  .clean-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    padding-top: 18px;
  }

  .clean-catalog .item-media {
    aspect-ratio: 4 / 5.05;
    border-radius: 14px;
    padding: 10px;
  }

  .cover { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 28px; gap: 28px; }
  .cover h1 {
    font-size: 26px;
    max-width: 100%;
    line-height: 1.08;
    text-align: right;
  }

  .cover-copy {
    max-width: 100%;
  }
  .cover .lede { font-size: 15px; }
  .cover .meta-row { font-size: 10px; gap: 12px; padding-top: 12px; }

  .hero-cascade {
    height: 246px;
    min-height: 246px;
    margin-inline: -4px;
    border-inline: 0;
  }

  .cascade-rail {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px 4px;
    animation-duration: 24s;
  }

  .cascade-card {
    min-height: 96px;
    padding: 11px;
  }

  .cascade-card strong {
    font-size: 14px;
  }

  .filter { gap: 18px; padding: 14px var(--pad) 14px; }
  .filter-section { gap: 12px; flex-wrap: nowrap; overflow-x: auto; padding-top: 12px; scrollbar-width: none; width: 100%; }
  .filter-section::-webkit-scrollbar { display: none; }
  .filter-label { font-size: 9px; flex-shrink: 0; }
  .chip { font-size: 13px; flex-shrink: 0; }

  .featured { padding: 18px var(--pad) 12px; }
  .featured-frame {
    aspect-ratio: 4 / 3.5;
    padding: 18px;
  }
  .featured-kicker { font-size: 9px; padding: 4px 8px; top: 14px; right: 14px; }
  .featured-title { font-size: clamp(32px, 11vw, 52px); }
  .featured-foot { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 14px; margin-top: 16px; }
  .featured-desc { font-size: 14px; }

  .catalog-head { padding: 36px var(--pad) 18px; }
  .catalog-head h3 { font-size: 16px; }
  .catalog-head .range { font-size: 10px; }

  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gutter);
    row-gap: 24px;
    padding-bottom: 100px;
  }
  .item,
  .item.s-square,
  .item.s-portrait,
  .item.is-motion,
  .item.s-hero,
  .item.s-wide,
  .item.s-landscape,
  .item.s-tall { grid-column: span 1; }
  .item-media { padding: 12px; }
  .item.is-motion .item-media { padding: 14px; }
  .item-media-mark {
    top: 10px;
    left: 10px;
    font-size: 21px;
  }
  .item-cover-title {
    width: 100%;
    font-size: 13px;
    line-height: 1.32;
  }
  .item.is-motion .item-cover-title { font-size: 14px; }
  .item-info { grid-template-columns: 1fr auto; gap: 8px; }
  .item-info .cat { grid-column: 1 / -1; padding-top: 4px; }
  .item-info .idx,
  .item-info .meta { font-size: 9px; }
  .item-info .meta { max-width: 12ch; }
  .item-info .desc { font-size: 12px; }

  .coachmark {
    inset: 0;
    top: 0;
    right: 0;
    left: 0;
    font-size: 12px;
    padding: 18px;
    max-width: none;
    justify-content: center;
  }
  .coach-panel-ritual {
    width: min(340px, calc(100vw - 28px));
    padding: 22px 18px 18px;
    border-radius: 24px;
  }
  .coach-logo {
    width: min(180px, 54vw);
  }
  .coachmark.is-ritual .coach-line {
    right: 134px;
    top: 76px;
    width: 84px;
    transform: rotate(166deg);
  }

  .article { padding: 14px var(--pad) 0; }
  .article-topline {
    padding-bottom: 12px;
    margin-bottom: 14px;
    font-size: 10px;
  }
  .back-chip {
    padding: 6px 10px;
  }
  .article-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .article-shell .article-figure {
    position: static;
  }
  .article-shell .article-figure .frame {
    border-radius: 18px;
    max-height: 42vh;
  }
  .article-shell .article-figure.is-poster .frame {
    width: min(100%, 290px);
    margin-inline: auto;
  }
  .article-shell .article-figure.is-motion .frame {
    aspect-ratio: 16 / 10.5;
  }
  .article-shell .article-figure figcaption {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .article-panel {
    min-height: 0;
    border-radius: 20px;
    padding: 14px;
  }
  .article-panel .article-kicker {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .article-panel .article-title {
    max-width: none;
    font-size: clamp(25px, 7.4vw, 34px);
    margin-bottom: 8px;
    line-height: 1.16;
  }
  .article-panel .article-dek {
    max-width: none;
    font-size: 13px;
    line-height: 1.68;
  }
  .article-panel .article-pull {
    max-width: none;
    font-size: 19px;
    margin: 12px 0;
    padding: 12px 0;
  }
  .btn-do { font-size: 14px; padding: 12px 22px; }
  .article-panel .article-action { gap: 10px; }
  .article-panel .article-secondary {
    gap: 16px;
    padding-top: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
  }
  .content-nav { display: none; }
  .mobile-content-nav {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 8px;
    margin: 16px 0 0;
    padding: 8px;
    border: 1px solid var(--hairline);
    border-radius: 18px;
    background: color-mix(in oklch, var(--bg), transparent 4%);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -34px oklch(0 0 0 / 0.5);
  }
  .mobile-content-nav a {
    min-height: 52px;
    border: 1px solid var(--hairline);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
    background: oklch(1 0 0 / 0.96);
  }
  .mobile-content-nav .is-next {
    align-items: flex-start;
    flex-direction: column;
    padding: 7px 12px;
    background: oklch(1 0 0);
    color: var(--ink);
  }
  .mobile-content-nav .is-next span {
    font-family: var(--font-mono);
    font-size: 9px;
    opacity: 0.6;
  }
  .mobile-content-nav .is-next strong {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    display: block;
    overflow: visible;
  }

  .related { padding: 30px var(--pad) 112px; margin-top: 24px; }
  .related h3 { margin-bottom: 18px; }
  .related-strip { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .related-card-title {
    font-size: 14px;
    line-height: 1.6;
  }
  .related-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .status-feed {
    right: 12px;
    left: 12px;
    top: 138px;
    bottom: auto;
    width: auto;
    font-size: 10px;
    z-index: 74;
    padding: 6px 8px;
    border-radius: 16px;
  }

  .status-head {
    padding-bottom: 4px;
    margin-bottom: 4px;
  }

  .status-item {
    padding: 2px 4px;
  }

  .energy-ticker {
    right: 12px;
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 58px;
    border-radius: 18px;
    z-index: 68;
  }
  .media-lightbox-close {
    top: 14px;
    left: 14px;
  }
  .media-lightbox-figure img,
  .media-lightbox-figure video {
    max-height: calc(100vh - 170px);
    border-radius: 16px;
  }

  .warning-band {
    justify-content: flex-start;
    gap: 10px;
    font-size: 11px;
    top: auto;
    max-width: calc(100% - 24px);
  }
  .warning-band .action { display: none; }
  .warning-band.is-on {
    max-height: 48px;
    padding: 8px 12px;
  }

  .blackout-modal .panel { padding: 18px; }
  .blackout-visual { height: 140px; margin-bottom: 18px; }
  .blackout-modal h3 { font-size: 20px; }

  .footer { padding: 24px var(--pad); font-size: 10px; }
  .footer .col { gap: 10px; }

  .tweaks { right: 12px; bottom: 12px; left: 12px; width: auto; }
}

@media (max-width: 420px) {
  .featured-title { font-size: 40px; }
  .cover h1 { font-size: 26px; }
  .article-title { font-size: 44px; }
}

@media print {
  .light-pool, .mouse-halo, .energy-line, .blackout-modal, .coachmark, .tweaks, .blackout-veil { display: none; }
}
