/* ============================================================
   Olympus Studios — portfolio site
   macOS 27 design language (Apple "macOS 27" Figma UI kit).
   Auto light/dark. Values extracted from the kit:
   - Labels: black/white @ .85 / .5–.55 / .25 / .10 / .05
   - Window background: #FFFFFF light · #1E1E1E dark
   - Accent (systemBlue): #0088FF light · #0091FF dark
   - Materials (over blur 16): #F6F6F6 @ 36–72% light,
     black @ 10–40% dark; glass shadow 0 18 48
   - Global/Radius ramp 4/5/6/7/9 · large controls are capsules
   Previous brutalist theme preserved on branch
   backup/apollo-brutalist-ui.
   ============================================================ */

:root {
  color-scheme: light dark;

  /* Base surfaces */
  --page:        #f5f5f7;
  --card:        #ffffff;
  --card-2:      #fafafa;

  /* Labels — kit "Labels/…" light mode */
  --label:       rgba(0, 0, 0, 0.85);
  --fill:        rgba(0, 0, 0, 0.10);   /* Fills - Opaque/Primary */
  --fill-2:      rgba(0, 0, 0, 0.05);   /* Quinary */

  /* Body copy: kit secondary label is 3.9:1 on white — fine for UI
     chrome, short of WCAG AA for paragraphs. One step darker. */
  --text-body:   rgba(0, 0, 0, 0.62);

  /* Hairlines */
  --hairline:    rgba(0, 0, 0, 0.10);
  --hairline-dim:rgba(0, 0, 0, 0.05);

  /* Accent — kit "Accents/Blue" for controls/graphics; darker
     variants keep white button text and text links at WCAG AA. */
  --accent:      #0088ff;
  --accent-solid:#0066cc;
  --accent-solid-down: #005bb8;
  --accent-text: #0066cc;
  --on-accent:   #ffffff;

  /* System colours (fills/graphics) */
  --green: #34c759;
  --red:   #ff3b30;
  --amber: #ff9500;
  --blue:  #0088ff;

  /* Text/graphic-safe variants — the kit hues fail WCAG as small
     text/thin graphics on white; these reach AA (green 4.95:1,
     red 5.38:1, amber 4.6:1). Used for +/- data, session state,
     and the equity spark + timeline segments. */
  --green-text: #008236;
  --red-text:   #d70015;
  --amber-text: #b25000;

  /* Liquid Glass material (kit Materials/Medium + blur 16) */
  --material:    rgba(246, 246, 246, 0.60);
  --material-strong: rgba(246, 246, 246, 0.72);

  /* Shadows — derived from kit glass shadow 0 18 48 @ .25 */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, 0.08);

  /* Radii — kit Global/Radius ramp + window/card scale */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --capsule:   999px;

  --ring-hole: var(--card);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:        #161617;
    --card:        #1e1e1e;   /* kit Window Background dark */
    --card-2:      #242426;

    --label:       rgba(255, 255, 255, 0.85);
    --fill:        rgba(255, 255, 255, 0.10);
    --fill-2:      rgba(255, 255, 255, 0.05);

    --text-body:   rgba(255, 255, 255, 0.68);

    --hairline:    rgba(255, 255, 255, 0.10);
    --hairline-dim:rgba(255, 255, 255, 0.05);

    --accent:      #0091ff;
    --accent-solid:#0066cc;
    --accent-solid-down: #0074e8;
    --accent-text: #52a8ff;
    --on-accent:   #ffffff;

    --green: #30d158;
    --red:   #ff453a;
    --amber: #ff9f0a;
    --blue:  #0091ff;

    /* Bright hues already clear AA on the #1e1e1e card, so the
       text/graphic variants reuse them. */
    --green-text: #30d158;
    --red-text:   #ff453a;
    --amber-text: #ff9f0a;

    --material:    rgba(22, 22, 23, 0.60);
    --material-strong: rgba(22, 22, 23, 0.75);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.30), 0 0 0 0.5px rgba(255, 255, 255, 0.04);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg, video { display: block; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ── Section micro-label (macOS group header) ── */

.eyebrow {
  margin: 0 0 6px;
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
}

.lead {
  max-width: 62ch;
  color: var(--text-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.5;
}

/* ── Shell + layout rhythm ── */

.shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 0;
  animation: shell-in 240ms ease backwards;
}

@keyframes shell-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section { margin-top: clamp(46px, 7vw, 88px); }

.section-head { margin-bottom: clamp(18px, 2.6vw, 28px); }
.section-head h2 { max-width: 24ch; }
.section-head .lead { margin-top: 12px; }

/* ── Top bar — floating Liquid Glass toolbar ── */

.topbar {
  position: sticky;
  top: 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--material-strong);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--shadow-2);
}

/* Where the backdrop blur is unavailable, the translucent glass would
   let scrolled-under footage bleed through and drop nav contrast — fall
   back to the opaque window surface. */
@supports not ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .topbar { background: var(--card); }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.topbar-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  filter: brightness(0) opacity(0.85);
  transition: filter 120ms;
}

@media (prefers-color-scheme: dark) {
  .topbar-logo { filter: brightness(0) invert(1) opacity(0.9); }
}

/* Dim lives in the filter, so hover must brighten the filter, not the
   opacity property (which is already 1). */
a.topbar-left:hover .topbar-logo { filter: brightness(0) opacity(1); }

@media (prefers-color-scheme: dark) {
  a.topbar-left:hover .topbar-logo { filter: brightness(0) invert(1) opacity(1); }
}

.topbar-left h1 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
.topbar-left .eyebrow { margin-bottom: 1px; font-size: 0.72rem; }

/* ── Nav — toolbar buttons ── */

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--capsule);
  color: var(--text-body);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms, color 120ms;
}

.nav-link:hover {
  background: var(--fill-2);
  color: var(--label);
}

.nav-link[aria-current="page"] {
  color: var(--label);
  background: var(--fill);
}

/* ── Context strip ── */

.context-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 12px 18px;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.context-strip p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.86rem;
  font-weight: 500;
}

/* ── Status pill ── */

@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--capsule);
  background: var(--fill-2);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
  flex-shrink: 0;
  animation: live-blink 2s ease-in-out infinite;
}

.status-pill span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-body);
}

/* ── Intro block ── */

.intro { margin-top: clamp(34px, 5vw, 58px); }
.intro .eyebrow { margin-bottom: 10px; }
.intro .lead { margin-top: 16px; }
.intro h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); letter-spacing: -0.022em; }

/* ── Buttons — macOS push buttons (capsule) ── */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--capsule);
  background: var(--card);
  color: var(--label);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background 120ms, color 120ms, box-shadow 120ms;
}

.btn:hover {
  background: var(--card-2);
  box-shadow: var(--shadow-2);
}

.btn:active { background: var(--fill-2); }

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-solid {
  background: var(--accent-solid);
  border-color: transparent;
  color: var(--on-accent);
}

.btn-solid:hover {
  background: var(--accent-solid-down);
  color: var(--on-accent);
}

/* Own pressed state — otherwise the generic .btn:active fill would
   paint white text on a near-transparent surface on keyboard/touch
   activation paths where :hover isn't co-applied. */
.btn-solid:active { background: var(--accent-solid-down); }

/* ── Grouped containers (macOS settings-style tables) ── */

.joined {
  display: grid;
  gap: 1px;
  background: var(--hairline-dim);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

/* ── Stat grid ── */

.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  padding: 18px 18px 20px;
  background: var(--card);
}

.stat .label {
  display: block;
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
}

.stat .value {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat .note {
  display: block;
  margin-top: 7px;
  color: var(--text-body);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* ── Card grid — separated elevated cards ── */

.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card-grid.joined {
  gap: 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

/* A cell spanning the full grid width — used to even out odd counts. */
.card--wide { grid-column: 1 / -1; }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--card);
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

a.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.card .eyebrow { margin: 0; }
.card h3 { color: var(--label); }
.card p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.5;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent-text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 120ms;
}

.card-foot svg { width: 14px; height: 14px; transition: transform 140ms ease; }

a.card:hover .card-foot svg { transform: translateX(4px); }

/* ── Conic progress ring ── */

.ring {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--label);
  background:
    radial-gradient(circle at center, var(--ring-hole) 52%, transparent 53%),
    conic-gradient(var(--accent) var(--ring, 100%),
                   var(--fill) var(--ring, 100%));
}

/* ── Tags — macOS token pills ── */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--capsule);
  background: var(--fill-2);
  border: 1px solid var(--hairline-dim);
  color: var(--text-body);
  font-size: 0.76rem;
  font-weight: 600;
}

/* ── Two-column info panel ── */

.split {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.split > div { background: var(--card); padding: clamp(22px, 3vw, 34px); }
.split .eyebrow { margin-bottom: 8px; }
.split h3 { margin-bottom: 12px; }
.split p { color: var(--text-body); font-size: 0.92rem; line-height: 1.55; }

.facts { display: grid; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline-dim);
}
.fact:first-child { padding-top: 0; border-top: none; }
.fact .k {
  color: var(--text-body);
  font-size: 0.84rem;
  font-weight: 500;
}
.fact .v { color: var(--label); font-size: 0.86rem; font-weight: 600; text-align: right; }

/* ── Video gallery ── */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}

.gallery figure:hover { box-shadow: var(--shadow-2); }

.gallery video,
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #000;
}

.gallery video { aspect-ratio: 16 / 9; }
.gallery img   { aspect-ratio: 3 / 2; }

.gallery figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--hairline-dim);
}

.gallery figcaption .name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--label);
}

.gallery figcaption .meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-body);
}

/* ── Showreel strips (tiles, mixed orientation) ── */

.showreel-h {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.showreel-h video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.showreel-v {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.showreel-v video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* ── CTA block ── */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-2);
}

.cta-text { max-width: 46ch; }
.cta-text h2 { margin-bottom: 10px; }
.cta-text p { margin: 0; color: var(--text-body); font-size: 0.95rem; line-height: 1.5; }

/* ── Note line (disclosure) ── */

.note-line {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-body);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ── Dashboard mockups (Trading page) ── */

.dash-frame {
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.dash-tag {
  display: block;
  margin: 0;
  padding: 9px 16px;
  border-bottom: 1px solid var(--hairline-dim);
  background: var(--fill-2);
  color: var(--text-body);
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-body { padding: clamp(18px, 2.4vw, 26px); }

.dash-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Stock card */
.dash-stock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}
.dash-idx { color: var(--text-body); font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-score {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  color: var(--label);
  font-size: 0.86rem;
  font-weight: 650;
  background:
    radial-gradient(circle at center, var(--ring-hole) 52%, transparent 53%),
    conic-gradient(var(--accent) 86%, var(--fill) 86%);
}

.dash-stock-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}
.dash-stock-main h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-top: 2px; }
.dash-chip {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: var(--capsule);
  background: var(--fill-2);
  border: 1px solid var(--hairline-dim);
  color: var(--text-body);
  font-size: 0.78rem;
  font-weight: 600;
}
.dash-price { text-align: right; }
.dash-price strong { display: block; font-size: clamp(1.2rem, 2vw, 1.6rem); font-variant-numeric: tabular-nums; }
.dash-price .positive,
.dash-price .negative { font-size: 0.86rem; font-weight: 600; }

.dash-chart {
  width: 100%;
  height: 150px;
  margin: 16px 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-dim);
  background: transparent;
}
.dash-chart .fill {
  fill: rgba(0, 136, 255, 0.08);   /* fallback where color-mix() is unsupported */
  fill: color-mix(in srgb, var(--accent) 8%, transparent);
}
.dash-chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 10px 0;
}
.dash-kpi > div {
  padding: 10px 13px;
  background: var(--fill-2);
  border-right: 1px solid var(--hairline-dim);
}
.dash-kpi > div:last-child { border-right: none; }
.dash-kpi span {
  display: block;
  color: var(--text-body);
  font-size: 0.74rem;
  font-weight: 600;
}
.dash-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dash-research {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  margin-top: 10px;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-research > div:first-child {
  padding: 14px;
  border-right: 1px solid var(--hairline-dim);
  background: var(--fill-2);
}
.dash-research p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.86rem;
  line-height: 1.5;
}
.dash-research .eyebrow { margin-bottom: 6px; }
.dash-media .dash-item {
  display: block;
  padding: 10px 13px;
  border-bottom: 1px solid var(--hairline-dim);
  color: var(--label);
  background: var(--fill-2);
}
.dash-media .dash-item:last-child { border-bottom: none; }
.dash-media strong { display: block; font-size: 0.84rem; line-height: 1.35; font-weight: 600; }
.dash-media span {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-body);
}

/* Ladder */
.dash-ladder-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline-dim);
}
.dash-ladder-head strong { font-size: 1rem; }
.dash-ladder-head span {
  color: var(--text-body);
  font-size: 0.74rem;
  font-weight: 600;
}
.dash-ladder { display: grid; gap: 4px; }
.dash-rung {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--hairline-dim);
  border-radius: var(--radius-sm);
  background: var(--fill-2);
  font-size: 0.8rem;
}
.dash-rung .label {
  color: var(--text-body);
  font-size: 0.7rem;
  font-weight: 600;
}
.dash-rung .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-rung .qty {
  color: var(--text-body);
  font-size: 0.72rem;
}

/* Session timeline */
.dash-session-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.dash-session-head .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 16%, transparent);
  flex-shrink: 0;
}
.dash-session-head strong { font-size: 1rem; color: var(--green-text); }
.dash-summary {
  margin: 0 0 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--label);
}
.dash-summary span { display: block; color: var(--text-body); margin-bottom: 2px; }

.dash-timeline { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; }
.dash-timeline .day {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-body);
  width: 34px;
  flex-shrink: 0;
}
.dash-timeline .track {
  flex: 1;
  position: relative;
  height: 8px;
  border-radius: 4px;
  display: flex;
  background: var(--fill-2);
}
.dash-timeline .seg { height: 100%; border-radius: 4px; }
.dash-timeline .seg + .seg { margin-left: 2px; }
.dash-timeline .seg--closed { background: var(--fill); }
.dash-timeline .seg--pre    { background: var(--amber-text); }
.dash-timeline .seg--rth    { background: var(--green-text); }
.dash-timeline .seg--post   { background: var(--blue); }
.dash-timeline .tick {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: var(--text-body);
}
.dash-timeline .tick em { font-style: normal; }
.dash-timeline .needle {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--label);
  border-radius: 1px;
  transform: translateX(-50%);
}

.dash-foot {
  color: var(--text-body);
  font-size: 0.74rem;
  font-weight: 600;
}

/* Backtest */
.dash-bt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline-dim);
}
.dash-bt-head strong { font-size: 1rem; }
.dash-bt-head span {
  color: var(--text-body);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dash-bt-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-bottom: 8px;
}
.dash-bt-metrics > div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--hairline-dim);
  font-size: 0.8rem;
}
.dash-bt-metrics > div:nth-last-child(-n+2) { border-bottom: none; }
.dash-bt-metrics span {
  color: var(--text-body);
  font-size: 0.72rem;
  font-weight: 600;
}
.dash-bt-metrics strong { font-weight: 650; font-variant-numeric: tabular-nums; }

.dash-spark {
  width: 100%;
  height: 54px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-dim);
}
.dash-spark .line {
  fill: none;
  stroke: var(--green-text);   /* AA-legible equity curve in light mode */
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-spark .fill {
  fill: rgba(52, 199, 89, 0.12);   /* fallback where color-mix() is unsupported */
  fill: color-mix(in srgb, var(--green) 12%, transparent);
}

.positive { color: var(--green-text); }
.negative { color: var(--red-text); }

/* ── Watermark footer ── */

.watermark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: clamp(56px, 9vw, 110px);
  padding: 26px 0 24px;
  border-top: 1px solid var(--hairline-dim);
}

.watermark-mark {
  width: 18px;
  height: 18px;
  filter: brightness(0) opacity(0.5);
}

@media (prefers-color-scheme: dark) {
  .watermark-mark { filter: brightness(0) invert(1) opacity(0.45); }
}

.watermark-text {
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Focus ── */

a:focus-visible,
button:focus-visible,
video:focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  a:focus-visible,
  button:focus-visible,
  video:focus-visible {
    outline-color: var(--accent);
  }
}

/* ── Utilities ── */

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

.skip-link {
  position: absolute;
  top: -52px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--capsule);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-2);
  transition: top 120ms;
}

.skip-link:focus { top: 16px; }

/* ── Responsive ── */

@media (max-width: 1040px) {
  /* two-up with an odd last card spanning full width */
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid > *:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .showreel-v { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-three { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .card-grid,
  .card-grid.cols-2 { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 620px); padding-top: 10px; }
  .topbar {
    position: static;
    display: grid;
    gap: 12px;
    justify-items: start;
  }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: 1fr; }
  .context-strip { flex-direction: column; align-items: flex-start; }
  .showreel-h { grid-template-columns: 1fr; }
  .showreel-v { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-research { grid-template-columns: 1fr; }
  .dash-research > div:first-child { border-right: none; border-bottom: 1px solid var(--hairline-dim); }
}

/* ── Motion ──
   Scroll-in reveals. app.js adds .js to <html>, tags children of
   [data-reveal-stagger] with data-reveal + a --ri index, and adds
   .is-in as elements enter the viewport. The hidden resting state
   only exists when BOTH JavaScript and full motion are available,
   so content is never hidden from no-JS or reduced-motion visitors. */

@media (prefers-reduced-motion: no-preference) {
  /* Reveal moves via the independent `translate` property, leaving
     `transform` free for a.card:hover so the two never collide. The
     transition also lists box-shadow/transform at their own 200ms so
     the hover lift and shadow stay smooth (not snapped or staggered). */
  html.js [data-reveal] {
    opacity: 0;
    translate: 0 12px;
    transition:
      opacity    600ms cubic-bezier(0.22, 0.61, 0.36, 1) calc(var(--ri, 0) * 70ms),
      translate  600ms cubic-bezier(0.22, 0.61, 0.36, 1) calc(var(--ri, 0) * 70ms),
      box-shadow 200ms ease,
      transform  200ms ease;
  }

  html.js [data-reveal].is-in {
    opacity: 1;
    translate: none;
  }

  /* Conic rings sweep from 0% to their inline --ring value on first
     reveal (no-ops gracefully where @property is unsupported). */
  html.js [data-reveal]:not(.is-in) .ring { --ring: 0% !important; }

  /* Cross-document crossfade between pages. */
  @view-transition { navigation: auto; }
}

/* Print/PDF must never inherit the un-scrolled reveal resting state,
   or everything below the fold renders invisible. */
@media print {
  html.js [data-reveal] {
    opacity: 1 !important;
    translate: none !important;
    transform: none !important;
    transition: none !important;
  }
}

@property --ring {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

.ring { transition: --ring 900ms cubic-bezier(0.22, 0.61, 0.36, 1) 120ms; }

/* Hover coherence: buttons share the card-foot arrow behaviour. */
.btn svg { transition: transform 140ms ease; }
.btn:hover svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
}
