/* DIXL HQ: a calm, dense instrument panel in the same dark theme as the studio app.
   Dark only. Colour means stage, shape means status; the orange accent is kept for what needs Diego.
   No inline styles anywhere (the policy forbids them): everything is a class here. */

@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/hanken-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #101216;
  --bg-glow: #14171d;
  --surface: #181b21;
  --surface-2: #1e222a;
  --line: #262b34;
  --line-soft: #20242c;
  --ink: #eef1f5;
  --ink-2: #b9c0cc;
  --ink-3: #949cab;
  --ink-faint: #838c9a;
  --accent: #f2822f;
  --accent-soft: #f59b57;
  --bad: #ff6b6b;
  --p1: #46b46a; /* Idea */
  --p2: #3d86e0; /* Arrangement */
  --p3: #f2822f; /* Mix & Master */
  --p5: #2ec3cf; /* Detail */
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 1rem;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); font-size: 100%; }
@media (min-width: 1024px) { html { font-size: 112.5%; } }
@media (min-width: 1680px) { html { font-size: 125%; } }

body {
  margin: 0;
  color: var(--ink-2);
  font-family: 'Hanken Grotesk Variable', -apple-system, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: radial-gradient(120% 80% at 50% -10%, var(--bg-glow), var(--bg) 60%) fixed no-repeat;
  min-height: 100vh;
}
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); color: var(--ink); }

a { color: var(--ink); text-decoration-color: var(--ink-faint); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

main { max-width: 44rem; margin: 0 auto; padding: 1.25rem var(--gutter) 4rem; }
.center { text-align: center; padding-top: 22vh; }
.center h1 { font-size: 1.625rem; margin: 0 0 1.25rem; }
.center p { margin: 0 0 0.75rem; color: var(--ink-3); }

.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-faint); }
.bad { color: var(--bad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---- controls ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-primary { color: #14100b; background: var(--accent); border-color: transparent; }
.btn-primary:hover { color: #14100b; background: var(--accent-soft); border-color: transparent; }
.linkbtn {
  font: inherit; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--ink-faint); text-underline-offset: 0.18em;
}
.linkbtn:hover { text-decoration-color: var(--accent-soft); }
.back { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-3); font-size: 0.875rem; text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---- page head and the pulse ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; }
.wordmark { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.01em; color: var(--ink-3); margin: 0; }
.top .small, .small { font-size: 0.8125rem; color: var(--ink-faint); }

/* The pulse is the one big thing: nothing else on the page is set this large. */
.pulse {
  margin: 1.5rem 0 3rem; max-width: 24ch;
  font-size: 1.75rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-3);
  text-wrap: balance;
}
.pulse b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.pulse .when { display: block; margin-top: 0.6rem; font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
@media (min-width: 640px) { .pulse { font-size: 2.25rem; margin-top: 2.25rem; max-width: 32ch; } .pulse .when { font-size: 1rem; } }

/* ---- sections ---- */
.block { margin: 0 0 2.5rem; }
.block > h2 { display: flex; align-items: baseline; gap: 0.5rem; margin: 0 0 0.35rem; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.block > h2 .count { font-weight: 400; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.empty { margin: 0.25rem 0; color: var(--ink-faint); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--line-soft); }
.rows > li:last-child { border-bottom: 1px solid var(--line-soft); }

/* ---- shapes: shape means status (white or grey, never a stage colour) ---- */
.mark { display: inline-block; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--ink); }
.mark.ring { background: none; border: 1.5px solid var(--ink-2); }
.mark.dashed { background: none; border: 1.5px dashed var(--ink-faint); }
.mark.stone { background: var(--ink-faint); border-radius: 0.2rem; }
.mark.need { background: var(--accent); }
.mark.need-ring { background: none; border: 1.5px solid var(--accent); }
.mark.quiet { background: var(--ink-faint); }
.mark.quiet-ring { background: none; border: 1.5px solid var(--ink-faint); }
.dot { display: inline-block; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-faint); }
.dot.s-idea { background: var(--p1); }
.dot.s-arr { background: var(--p2); }
.dot.s-detail { background: var(--p5); }
.dot.s-mix { background: var(--p3); }

/* ---- studio rows ---- */
.trow { display: grid; grid-template-columns: 0.55rem 1fr auto; column-gap: 0.75rem; align-items: center; min-height: 3.5rem; padding: 0.55rem 0; }
.trow .name { color: var(--ink); font-weight: 600; font-size: 1rem; }
.trow .meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; color: var(--ink-3); min-width: 0; }
.trow .meta > * { flex: none; }
.trow .meta .ell { flex: 0 1 auto; }
.stars { color: var(--ink-2); letter-spacing: 0.08em; font-size: 0.8125rem; white-space: nowrap; }
.rest { color: var(--ink-faint); }

/* ---- waiting ---- */
.wrow { display: grid; grid-template-columns: 0.55rem 1fr; column-gap: 0.75rem; align-items: center; min-height: 2.75rem; padding: 0.4rem 0; }
.wrow .line1 { display: block; }
.wrow .who { color: var(--ink); font-weight: 600; margin-right: 0.5rem; }
.wrow a { color: var(--ink-2); }

/* ---- software projects: aligned columns on desktop, compact rows on a phone ---- */
.prow { position: relative; display: grid; grid-template-columns: 1fr; row-gap: 0.1rem; padding: 0.6rem 0; min-height: 3.25rem; }
.prow .nm { color: var(--ink); font-weight: 600; font-size: 1rem; text-decoration: none; display: block; }
.prow a.nm::after { content: ''; position: absolute; inset: 0; }
.prow a.nm:hover { text-decoration: underline; text-decoration-color: var(--accent-soft); }
.prow .st { display: flex; gap: 0 0.9rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.prow .st .lab { color: var(--ink-faint); }
.prow .note { margin: 0.1rem 0 0; color: var(--ink-2); font-size: 0.875rem; max-width: 62ch; overflow-wrap: anywhere; }
.colhead { display: none; }
@media (min-width: 640px) {
  .prow { grid-template-columns: minmax(0, 1fr) 5rem 3.2rem 6rem 5.4rem; column-gap: 0.75rem; align-items: baseline; }
  .prow .st { display: contents; }
  .prow .st span { text-align: right; white-space: nowrap; }
  .prow .st .lab { display: none; }
  .prow .nm { grid-column: 1; }
  .prow .note { grid-column: 1 / -1; }
  .colhead { display: grid; grid-template-columns: minmax(0, 1fr) 5rem 3.2rem 6rem 5.4rem; column-gap: 0.75rem; font-size: 0.75rem; color: var(--ink-faint); padding: 0 0 0.35rem; }
  .colhead span { text-align: right; white-space: nowrap; }
  .colhead span:first-child { text-align: left; }
}

/* ---- other projects ---- */
.orow { padding: 0.7rem 0; }
.orow .nm { color: var(--ink); font-weight: 600; font-size: 1rem; margin: 0; }
.orow .note { margin: 0.2rem 0 0; max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 0.15rem 1.25rem; margin: 0.3rem 0 0.2rem; font-size: 0.875rem; color: var(--ink-3); }
.facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- folds ---- */
.disc { margin: 0; }
.disc > summary {
  display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; cursor: pointer; list-style: none; user-select: none;
  font-size: 0.875rem; font-weight: 600; color: var(--ink-3);
}
.disc > summary:hover { color: var(--ink); }
.disc > summary::-webkit-details-marker { display: none; }
.disc > summary::before {
  content: ''; flex: none; width: 0.55rem; height: 0.55rem; background: var(--accent-soft);
  clip-path: polygon(15% 0%, 100% 50%, 15% 100%); transition: transform 0.18s var(--ease-out);
}
.disc[open] > summary::before { transform: rotate(90deg); }
.disc > ul { margin: 0 0 0.5rem; padding: 0 0 0 1.05rem; list-style: none; }
.disc > ul li { display: flex; align-items: center; flex-wrap: wrap; gap: 0 0.4rem; min-height: 2.75rem; padding: 0.2rem 0; color: var(--ink-2); }

/* ---- documents, unsorted, footer ---- */
.drow { display: flex; align-items: baseline; gap: 0.6rem; min-height: 2.75rem; padding: 0.4rem 0; align-items: center; }
.tag { flex: none; font-size: 0.6875rem; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.5rem; white-space: nowrap; }
.foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--ink-faint); }
.foot p { margin: 0 0 0.5rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }

/* ---- project page ---- */
.phead h1 { margin: 0.25rem 0 0.4rem; font-size: 1.625rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
@media (min-width: 640px) { .phead h1 { font-size: 1.875rem; } }
.phead .small { display: flex; align-items: center; min-height: 2.75rem; margin: 0; }
.phead .lede { margin: 0.5rem 0 0; max-width: 56ch; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.nums { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 1rem 0 2rem; padding: 0; list-style: none; font-size: 0.875rem; color: var(--ink-3); }
.nums b { color: var(--ink); font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 0.3rem; }
.psec { margin: 0 0 2.5rem; }
.psec > h2 { margin: 0 0 0.75rem; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }

/* history: chapters hang on a rail, days nest under them */
.tl { list-style: none; margin: 0; padding: 0; }
.chap { position: relative; padding: 0 0 2rem 1.75rem; }
.chap::before { content: ''; position: absolute; left: 0.3rem; top: 0.55rem; bottom: 0; width: 1px; background: var(--line); }
.chap:last-child::before { bottom: auto; height: 0.5rem; }
.chap::after { content: ''; position: absolute; left: 0; top: 0.4rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-3); }
.chap.now::after { background: var(--ink); border-color: var(--ink); }
.chap .ctitle { margin: 0; font-size: 1.125rem; font-weight: 650; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.chap .cdates { margin: 0.1rem 0 0; font-size: 0.8125rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.story { margin: 0.85rem 0 1rem; max-width: 60ch; font-size: 1.0625rem; line-height: 1.72; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
@media (min-width: 640px) { .story { font-size: 1.125rem; } }
.days { list-style: none; margin: 0; padding: 0; }
.day > summary { display: grid; grid-template-columns: 3.6rem 1fr; column-gap: 0.75rem; align-items: baseline; min-height: 2.75rem; padding: 0.35rem 0; cursor: pointer; list-style: none; border-top: 1px solid var(--line-soft); }
.day > summary::-webkit-details-marker { display: none; }
.day > summary:hover .dline { color: var(--ink); }
.day .dd { font-size: 0.8125rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.day .dline { color: var(--ink-2); overflow-wrap: anywhere; }
.day[open] > summary .dline { color: var(--ink); }
.ents { list-style: none; margin: 0 0 0.75rem 0; padding: 0; }
@media (min-width: 640px) { .ents { margin-left: 4.35rem; } }
.ent { padding: 0.55rem 0; scroll-margin-top: 4rem; }
.ent + .ent { border-top: 1px solid var(--line-soft); }
.ent .etext { margin: 0.3rem 0 0; color: var(--ink); overflow-wrap: anywhere; max-width: 62ch; }
.ent .why { margin: 0.2rem 0 0; font-size: 0.875rem; color: var(--ink-3); }
.ent .srcs { margin: 0.3rem 0 0; font-size: 0.8125rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 0 0.9rem; }
.ent.flash { background: var(--surface); border-radius: var(--r-sm); }

/* the kind labels: small, shape-led */
.kind { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.6rem; white-space: nowrap; }
.kind.k-diego { color: var(--ink); border-color: var(--ink-3); }
.kind.k-claude { color: var(--ink-3); }
.kind.k-reversal { color: var(--ink); border-style: dashed; border-color: var(--ink-3); }
.kind.k-incident { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, var(--line)); }
.kind.k-dropped { color: var(--ink-faint); border-style: dashed; }
.kind.k-finding { color: var(--ink-2); }
.kind.k-over { color: var(--ink-faint); border-style: dotted; }

/* a reversal points back at what it overturned: an arrow, the old line, a jump */
.back-ref { display: grid; grid-template-columns: 1.25rem 1fr; column-gap: 0.25rem; margin: 0.5rem 0 0; padding: 0.4rem 0 0.1rem; color: var(--ink-3); font-size: 0.875rem; min-height: 2.75rem; }
.back-ref .arrow { color: var(--ink-3); font-size: 1rem; line-height: 1.3; }
.back-ref .was { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-faint); overflow-wrap: anywhere; }

.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; border-top: 1px solid var(--line-soft); }
.plist li:last-child { border-bottom: 1px solid var(--line-soft); }

/* the sealed document frame */
.docpage { margin: 0; }
.docbar { padding: 0 var(--gutter); min-height: 2.75rem; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.docframe { display: block; width: 100%; height: calc(100vh - 2.75rem); border: 0; background: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.min0 { min-width: 0; }
.center .linkbtn { min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.5rem; }
