/* Renan Meira — portfolio. Direction D, "Instrument". No build step.
   Rules of the look: flat colour, hairline rules, type and geometry. No gradients, shadows, glows, rounded corners or cards.
   Sections: fonts · tokens · base · bar · home dial · colour layers · hub glyphs · portal · inner pages · ledger parts · demos · footer · motion */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque/bricolage-grotesque-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3/source-sans-3-latin-wght.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --bg: #0b0b0c;
  --ink: #f4f2ec;
  --ink-2: rgba(244, 242, 236, 0.74);
  --ink-3: rgba(244, 242, 236, 0.52);
  --rule: rgba(244, 242, 236, 0.22);
  --accent: #ffb547;

  /* the dial keeps the theme's own colours even when the page behind it changes */
  --dial-bg: #0b0b0c;
  --dial-ink: #f4f2ec;

  /* one flat colour per segment; the page takes it on hover and each section wears it as its header */
  --w-profile: #ffb547;
  --w-market: #4fd0e0;
  --w-triage: #8be39a;
  --w-catalog: #ff8a7a;
  --w-contact: #c9a2ff;
  /* the same hues as text on the dial */
  --t-profile: var(--w-profile); --t-market: var(--w-market); --t-triage: var(--w-triage); --t-catalog: var(--w-catalog); --t-contact: var(--w-contact);
  --on-colour: #0b0b0c;          /* ink used on top of a segment colour */

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(16px, 2.4vw, 32px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --io: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1ea;
  --ink: #171614;
  --ink-2: rgba(23, 22, 20, 0.78);
  --ink-3: rgba(23, 22, 20, 0.56);
  --rule: rgba(23, 22, 20, 0.24);
  --accent: #c2410c;
  --dial-bg: #f4f1ea;
  --dial-ink: #171614;
  --t-profile: #b45309; --t-market: #0b7285; --t-triage: #1f7a3a; --t-catalog: #b3261e; --t-contact: #6b3fa0;
  color-scheme: light;
}

/* ---------- colour sets ----------
   Four sets of five segment colours, switched by the "Colour" button in the bar (data-palette on <html>).
   "signal" is the default above. To try a new tone, edit the five values in one block. Every colour must be
   light enough for near-black text, because the page is set in dark ink while a colour is showing. */
:root[data-palette="print"]     { --w-profile: #e3b23c; --w-market: #8fb8de; --w-triage: #a8c686; --w-catalog: #e5896b; --w-contact: #d4a5c9; }  /* muted, like ink on paper */
:root[data-palette="blueprint"] { --w-profile: #e6eefc; --w-market: #a9c8ff; --w-triage: #7fb0ff; --w-catalog: #c3d4ea; --w-contact: #5f97f5; }  /* one hue, five strengths */
:root[data-palette="alarm"]     { --w-profile: #ffd23f; --w-market: #ff9f1c; --w-triage: #ff6b4a; --w-catalog: #f25c54; --w-contact: #f4efe6; }  /* warning yellows and reds */
/* on the light theme the dial's own labels need a darker version of each colour */
:root[data-theme="light"][data-palette] {
  --t-profile: color-mix(in srgb, var(--w-profile) 45%, #000); --t-market: color-mix(in srgb, var(--w-market) 45%, #000); --t-triage: color-mix(in srgb, var(--w-triage) 45%, #000);
  --t-catalog: color-mix(in srgb, var(--w-catalog) 45%, #000); --t-contact: color-mix(in srgb, var(--w-contact) 45%, #000);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 64ch; }
code { font-family: var(--mono); font-size: 0.86em; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.disp { font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.86; margin: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { top: 12px; }
button.txt { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button.txt:hover { color: var(--accent); }

/* type rises out of a mask */
.ln { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.ln > span { display: inline-block; transform: translateY(105%); transition: transform 900ms var(--out); }
.is-in .ln > span { transform: none; }
.ln:nth-child(2) > span { transition-delay: 90ms; }

/* ---------- bar (top of every page) ---------- */
.bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 28px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.bar a { text-decoration: none; }
.bar nav { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline; }
.bar nav a[aria-current="page"] { text-decoration: underline; }
.bar .n { opacity: 0.6; margin-right: 0.5em; }

/* ---------- home: the dial ---------- */
.stage { position: relative; }
.frame { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--pad); }
.mid { display: grid; grid-template-columns: 5fr 7fr; align-items: center; }
.left { padding-right: var(--pad); border-right: 1px solid var(--rule); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.name { font-size: clamp(3.4rem, 9.4vw, 9.6rem); }
.st { font-family: var(--display); font-size: clamp(1.15rem, 1.75vw, 1.9rem); line-height: 1.2; max-width: 24ch; min-height: 4.8em; margin: 28px 0 36px; }
.facts { border-top: 1px solid var(--rule); margin: 0; padding: 0; list-style: none; max-width: 30em; }
/* rows keep a fixed height so the column does not jump when a segment swaps its words in */
.facts li { display: grid; grid-template-columns: 8em 1fr; align-content: start; min-height: 64px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; transition: padding-left 300ms var(--out); }
.facts li:hover { padding-left: 10px; }
.facts .mono { color: var(--ink-3); }
.first { align-self: flex-start; margin-top: 22px; font-size: 16px; text-underline-offset: 0.25em; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink-3); }
.foot a { text-decoration: none; }

.dial { display: block; width: min(100%, 80vh); margin: 0 auto; overflow: visible; }
.dial .ring, .dial .tk line, .dial .needle, .dial .hub-ring { fill: none; stroke: var(--ink); stroke-width: 0.35; }
.dial .tk line { stroke-width: 0.3; opacity: 0.7; }
.dial .tk { transform-origin: 0 0; animation: drift 240s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
/* the pointer rides the bezel and snaps to a segment with a little overshoot: that is the click */
.dial .needle { stroke-width: 1.6; transform: rotate(var(--n, -36deg)); transition: transform 360ms var(--spring); }

.s { cursor: pointer; outline: none; transition: transform 300ms var(--spring); }
.s path { fill: var(--dial-bg); stroke: var(--dial-ink); stroke-width: 0.35; }
.s text { font-family: var(--mono); font-size: 5.2px; font-weight: 700; letter-spacing: 0.04em; fill: var(--dial-ink); text-anchor: middle; transition: fill 160ms linear; }
.s .i { fill: var(--ct); font-size: 4px; font-weight: 400; letter-spacing: 0.06em; }
.s.is-hot { transform: translate(var(--dx), var(--dy)); }
/* quiet hover (the default): the colour stays inside the segment */
.s path { transition: fill 180ms linear; }
:root:not([data-fx="full"]) .s.is-hot path { fill: var(--c); }
:root:not([data-fx="full"]) .s.is-hot text, :root:not([data-fx="full"]) .s.is-hot .i { fill: var(--on-colour); }
/* "line": a thin bar across the top and the divider take the colour as well */
.stage::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--hot, transparent); transform: scaleX(0); transform-origin: left; transition: transform 420ms var(--out); pointer-events: none; }
:root[data-fx="line"] .stage.has-hot::after { transform: scaleX(1); }
:root[data-fx="line"] .stage.has-hot .left { border-right-color: var(--hot); transition: border-color 200ms linear; }
.s.is-hot text { fill: var(--ct); }
.s.is-hot .i { fill: var(--dial-ink); }
.s.is-flash path { fill: var(--c); transition: none; }
.s:focus-visible path { stroke-width: 1; }
.hub { font-family: var(--mono); font-size: 3.3px; letter-spacing: 0.06em; fill: var(--ink-2); text-anchor: middle; }

/* entrance: rings draw, ticks and segments arrive in order */
.dial .ring, .dial .hub-ring { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--io), stroke 0ms; }
.is-in .dial .ring, .is-in .dial .hub-ring { stroke-dashoffset: 0; }
.dial .tk { opacity: 0; transition: opacity 600ms linear 700ms; }
.is-in .dial .tk { opacity: 1; }
.dial .s { opacity: 0; }
.is-in .dial .s { opacity: 1; transition: transform 300ms var(--spring), opacity 500ms linear; }
.is-in .dial .s:nth-of-type(1) { transition-delay: 0ms, 500ms; } .is-in .dial .s:nth-of-type(2) { transition-delay: 0ms, 600ms; }
.is-in .dial .s:nth-of-type(3) { transition-delay: 0ms, 700ms; } .is-in .dial .s:nth-of-type(4) { transition-delay: 0ms, 800ms; }
.is-in .dial .s:nth-of-type(5) { transition-delay: 0ms, 900ms; }
/* the bottom edge of the clip sits far below the bar, so a menu that drops out of it is not cut off */
.frame > .bar, .frame > .foot { clip-path: inset(0 100% -100vh 0); transition: clip-path 900ms var(--io); }
.is-in .frame > .bar, .is-in .frame > .foot { clip-path: inset(0 0 -100vh 0); }
.st, .facts, .first { opacity: 0; transform: translateY(10px); transition: opacity 500ms linear 350ms, transform 700ms var(--out) 350ms; }
.is-in .st, .is-in .facts, .is-in .first { opacity: 1; transform: none; }
.left { border-right-color: transparent; transition: border-color 600ms linear 600ms; }
.is-in .left { border-right-color: var(--rule); }
/* any input during the entrance finishes it at once */
.intro-skip * { transition-delay: 0ms !important; transition-duration: 1ms !important; }

/* phone: the dial becomes a ruled list of the same five sections */
.seg-list { list-style: none; margin: 8px 0 28px; padding: 0; display: none; border-top: 1px solid var(--ink); }
.seg-list a { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 4px 10px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--ink); text-decoration: none; }
.seg-list .t { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.seg-list .d { grid-column: 2; color: var(--ink-2); font-size: 15px; }
.seg-list .sw { width: 14px; height: 14px; background: var(--c); align-self: center; }
@media (max-width: 639px) {
  .frame { min-height: 0; }
  .mid { grid-template-columns: 1fr; }
  .left { border-right: 0; padding: 36px 0 20px; }
  .dialcol { display: none; }
  .seg-list { display: block; }
  .name { font-size: 21vw; }
  .st, .facts li { min-height: 0; }
  .foot span:first-child { display: none; }
}

/* ---------- colour layers ----------
   Only used when Hover is set to "full". Each layer holds a copy of the page in dark ink, clipped by a circle
   that site.js grows from the pointer. On either side of the moving edge the text is already the right colour,
   so it is readable in every frame. */
.flood { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  --ink: #0b0b0c; --ink-2: rgba(11, 11, 12, 0.8); --ink-3: rgba(11, 11, 12, 0.62); --rule: rgba(11, 11, 12, 0.35); --accent: #0b0b0c;
  color: var(--ink);
  clip-path: circle(0px at 0px 0px); }

/* ---------- hub ----------
   At rest: a crosshair. When a segment is hot: the section's name, large, with its tag above.
   One quiet change per hover. A short inner pointer turns with the outer one, so the centre moves with the wheel. */
.hub-n { font-family: var(--display); font-weight: 800; font-size: 12.5px; letter-spacing: -0.02em; text-anchor: middle; fill: var(--ink); }
.hub-n.roll { animation: hub-roll 160ms var(--out); }
@keyframes hub-roll { from { opacity: 0; transform: translateY(3px); } }
.dial .needle.in { stroke-width: 0.9; }

/* (older per-segment drawings, no longer in the page) */
.g { opacity: 0; transition: opacity 140ms linear; }
.g.is-on { opacity: 1; transition: opacity 200ms linear 80ms; }
.g line, .g path { stroke: var(--ink); fill: none; stroke-width: 0.35; }
.g .big { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.05em; text-anchor: middle; fill: var(--ink); transform: scale(0.7); transform-origin: 0 0; transition: transform 420ms var(--spring); }
.g .big.at { font-size: 28px; }
.g.is-on .big { transform: scale(1); }
.g .num { font-family: var(--mono); font-weight: 600; font-size: 6px; text-anchor: middle; fill: var(--ink); }
.g .draw { stroke-width: 0.8; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 500ms var(--io) 80ms; }
.g.is-on .draw { stroke-dashoffset: 0; }
.g .gn { stroke-width: 1; transform-origin: 0 4px; transform: rotate(-136deg); transition: transform 700ms var(--spring) 120ms; }
.g.is-on .gn { transform: none; }
.g .row { stroke-width: 0.5; opacity: 0.6; transform: translateX(-10px); transition: transform 420ms var(--out); }
.g .row.hi { stroke-width: 1.7; opacity: 1; }
.g.is-on .row { transform: none; }
.g .row:nth-child(2) { transition-delay: 50ms; } .g .row:nth-child(3) { transition-delay: 100ms; }
.g .row:nth-child(4) { transition-delay: 150ms; } .g .row:nth-child(5) { transition-delay: 200ms; }
.g .cell { fill: var(--ink); transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform 300ms var(--spring); }
.g .blank { fill: none; stroke: var(--ink); stroke-width: 0.5; stroke-dasharray: 1.4 1.2; }
.g.is-on .cell { transform: scale(1); }
.g .cell:nth-child(3n) { transition-delay: 60ms; } .g .cell:nth-child(3n+1) { transition-delay: 120ms; }

/* ---------- portal: the segment's colour opens from the click and becomes the next page's header ---------- */
.portal { position: fixed; inset: 0; z-index: 50; display: grid; align-content: end; padding: 0 var(--pad) 12vh; background: var(--c); color: var(--on-colour);
  clip-path: circle(0px at 0px 0px); }
.portal .pd { font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.35; max-width: 44ch; margin: 22px 0 0; opacity: 0; transition: opacity 400ms linear 420ms; }
.portal.is-open .pd { opacity: 1; }
.portal .pt { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 11vw, 11rem); line-height: 0.86; letter-spacing: -0.05em; overflow: hidden; padding-bottom: 0.1em; margin-top: 16px; max-width: 11ch; }
.portal .pt > span { display: inline-block; transform: translateY(105%); transition: transform 700ms var(--out) 220ms; }
.portal.is-open .pt > span { transform: none; }

/* ---------- inner pages ---------- */
.top { background: var(--c); color: var(--on-colour); padding: 0 var(--pad); --accent: #0b0b0c; }
.top .bar { border-bottom-color: rgba(11, 11, 12, 0.35); }
.top .bar a:hover, .top button.txt:hover { text-decoration: underline; }
.sec { padding: clamp(40px, 9vh, 96px) 0 clamp(36px, 7vh, 72px); }
.sec .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.sec h1 { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 11vw, 11rem); line-height: 0.86; letter-spacing: -0.05em; margin: 16px 0 28px; max-width: 11ch; }
.sec .lede { font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.35; max-width: 46ch; margin: 0; }
.btn-alt { display: inline-block; white-space: nowrap; margin-top: 10px; }   /* the address beside a mail button stays in one piece */
.sec .lede.result { margin-top: 14px; font-weight: 700; }   /* one headline result under the opening sentence */

.page { padding: 0 var(--pad) 96px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--pad); padding-top: 56px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.cols h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 18px; padding-top: 18px; border-top: 1px solid var(--ink); }
.cols > div > * + h2 { margin-top: 56px; }
.cols h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.cols ul { padding-left: 1.1em; max-width: 64ch; }
.cols li { margin-bottom: 0.4em; }

.aside { align-self: start; position: sticky; top: 16px; margin: 0; border-top: 1px solid var(--ink); }
.aside dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 12px; }
.aside dd { margin: 2px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 15px; }

/* ---------- ledger parts (used inside pages) ---------- */
.flow { list-style: none; padding: 0 !important; margin: 20px 0 28px; counter-reset: step; max-width: none !important; }
.flow li { counter-increment: step; display: grid; grid-template-columns: 3em 10em 1fr; gap: 0 12px; padding: 10px 0; margin: 0; border-top: 1px solid var(--rule); font-size: 16px; }
.flow li:last-child { border-bottom: 1px solid var(--rule); }
.flow li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.flow li strong { font-family: var(--display); font-weight: 700; }
.flow li.human strong::after { content: "person"; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); padding: 1px 5px; margin-left: 8px; vertical-align: 2px; }
/* phones: no grid here. The step's sentence is bare text, and a grid would drop it into the narrow number column. */
@media (max-width: 639px) { .flow li { display: block; position: relative; padding-left: 2.6em; } .flow li::before { position: absolute; left: 0; top: 10px; } .flow li strong { display: block; margin-bottom: 2px; } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); margin: 20px 0 28px; border-top: 1px solid var(--rule); }
.stat { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--rule); }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 8px; max-width: 24ch; }

.callout { border-left: 2px solid var(--ink); padding: 2px 0 2px 16px; margin: 20px 0; }
.callout p:last-child { margin-bottom: 0; }

/* purpose: the first thing in a case study. One large line, then who it is for and what it removes */
.purpose { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 14px 0 18px; margin-bottom: 40px; }
.purpose .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.purpose .big { font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 2.3vw, 1.9rem); line-height: 1.18; letter-spacing: -0.02em; margin: 10px 0 18px; max-width: 30ch; }
.purpose dl { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 0; margin: 0; max-width: none; }
.purpose dt, .purpose dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--rule); }
.purpose dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 11px; }
/* ideal state: what the finished tool does, and whether each piece exists yet */
.ideal td:last-child { width: 11.5em; white-space: nowrap; }
.state { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--ink); }
.state.on { background: var(--ink); color: var(--bg); }
.state.plan { border-style: dashed; color: var(--ink-2); }
@media (max-width: 639px) { .purpose dl { grid-template-columns: 1fr; } .purpose dd { border-top: 0; padding-top: 0; } .ideal td:last-child { width: auto; white-space: normal; } }
.fact-table { border-collapse: collapse; width: 100%; margin: 16px 0 24px; font-size: 16px; }
.fact-table th, .fact-table td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-top: 1px solid var(--rule); }
.fact-table tr:last-child td { border-bottom: 1px solid var(--rule); }
.fact-table th { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

.timeline { list-style: none; padding: 0 !important; margin: 16px 0 0; max-width: none !important; }
.timeline li { display: grid; grid-template-columns: 11em 1fr; gap: 0 16px; padding: 14px 0; margin: 0; border-top: 1px solid var(--rule); }
.timeline .when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
.timeline h3, .timeline p { grid-column: 2; }
.timeline p { margin-bottom: 0.5em; }
@media (max-width: 639px) { .timeline li { grid-template-columns: 1fr; } .timeline h3, .timeline p { grid-column: 1; } }

.skills section { display: grid; grid-template-columns: 11em 1fr; gap: 0 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.skills h3 { grid-column: 1; margin: 0; font-size: 1.05rem; }
.skills .level { grid-column: 1; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.skills ul { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding-left: 1.1em; font-size: 16px; }
@media (max-width: 639px) { .skills section { grid-template-columns: 1fr; } .skills ul { grid-column: 1; grid-row: auto; margin-top: 8px; } }

.btn { display: inline-block; background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); }
.btn:hover { background: var(--bg); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--ink); color: var(--bg); }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.pager a { text-decoration: none; }

/* ---------- demos ----------
   Each demo is a small app window: title bar, tools, stage rail, a list beside an inspector, and a status bar
   that carries the answer in the page colour. Flat and ruled like the rest of the site. */
.demo { margin-top: 56px; }
.demo h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.4rem); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 20px; max-width: 26ch; }
.demo button.b { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 7px 11px; cursor: pointer; }
.demo button.b:hover, .demo button.b[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.demo button.b:disabled { opacity: 0.35; cursor: default; background: transparent; color: var(--ink); }
.demo .note { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); max-width: 70ch; }

.app { border: 1px solid var(--ink); background: var(--bg); }
.app-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.app-bar .sq { width: 9px; height: 9px; background: var(--c); flex: none; }
.app-bar .sp { margin-left: auto; opacity: 0.65; }
.app-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.app-tools .live { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink-2); text-align: right; }
/* the stage rail: a bar under each stage fills as it runs */
.rail { display: flex; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.rail li { flex: 1; position: relative; padding: 8px 12px 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); border-right: 1px solid var(--rule); white-space: nowrap; overflow: hidden; }
.rail li:last-child { border-right: 0; }
.rail .n { margin-right: 0.7em; opacity: 0.7; }
.rail li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform 600ms linear; }
.rail li.on, .rail li.done { color: var(--ink); }
.rail li.on::after { transform: scaleX(0.5); }
.rail li.done::after { transform: scaleX(1); transition-duration: 200ms; }

.panes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 25rem; }
.pane-list { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--rule); }
.pane-list li { background: var(--bg); }
.pane-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: start; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; padding: 10px 12px 10px 9px; cursor: pointer; }
.pane-list button:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pane-list li.sel button { border-left-color: var(--c); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.pane-list .t { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.pane-list .s { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 3px; overflow-wrap: anywhere; }
.pane-list .v { font-family: var(--mono); font-size: 13px; text-align: right; max-width: 13rem; }
.pane-list .rank { float: left; font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 0.85; letter-spacing: -0.04em; margin-right: 12px; }
.pane-list li.off .t { text-decoration: line-through; font-weight: 400; color: var(--ink-3); }
.pane-list li.off .v, .pane-list li.todo .v { color: var(--ink-3); }
.pane-list li.need .s { color: var(--ink); }
.pane-list li.rise { animation: row-in 420ms var(--out) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }

.pane-detail { padding: 16px 18px 18px; min-width: 0; }
.pane-detail .kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; color: var(--ink-3); overflow-wrap: anywhere; }
.pane-detail h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.02em; margin: 4px 0 14px; }
.pane-detail .muted { color: var(--ink-3); margin: 0; }
.pane-detail .mail, .pane-detail .src { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--rule); font-size: 15px; line-height: 1.45; }
.pane-detail .src cite { display: block; margin-top: 6px; font-family: var(--mono); font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.pane-detail mark { background: var(--c); color: var(--on-colour); padding: 0 3px; }
.checks { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--rule); }
.checks li { display: grid; grid-template-columns: 1.6em 8.5em minmax(0, 1fr); gap: 0 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 15px; animation: row-in 300ms var(--out) both; }
.checks li:nth-child(2) { animation-delay: 60ms; } .checks li:nth-child(3) { animation-delay: 120ms; } .checks li:nth-child(4) { animation-delay: 180ms; }
.checks .mk { font-family: var(--mono); font-weight: 700; }
.checks .nt { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.checks li.no .mk, .checks li.no .nt { color: var(--accent); }
.checks li.hm .nt { color: var(--ink); }
.pane-detail .verdict { margin: 0; font-size: 15px; color: var(--ink-2); }
/* request panel pieces: section labels, a small parts table, the draft, the fine print */
.pane-detail .sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 10px; margin: 16px 0 8px; }
.pane-detail .sub:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ptable { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 0 0 4px; }
.ptable th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 5px 0; }
.ptable td { padding: 5px 10px 5px 0; border-top: 1px solid var(--rule); }
.mono-s { font-family: var(--mono); font-size: 13px; }
.pane-detail pre.draft { margin: 0; padding: 10px 12px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pane-detail .flagline { margin: 0; padding-left: 10px; border-left: 3px solid var(--accent); font-size: 15px; }
/* price console pieces: the market band, the stat pills, vendor rows */
.band { width: 132px; height: 16px; display: block; margin-left: auto; }
.band .b-line { stroke: currentColor; stroke-width: 1; opacity: 0.55; }
.band .b-end { fill: currentColor; }
.band .b-typ { stroke: currentColor; stroke-width: 2; }
.band .b-you { fill: var(--c); stroke: var(--bg); stroke-width: 0.6; }
.pane-list .typ { display: block; margin-top: 3px; }
.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 0 14px; }
.pill { padding: 8px 10px 9px 0; }
.pill .k { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.pill .v { display: block; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; margin-top: 2px; }
.pill.main .v { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.pill.you .v { font-family: var(--mono); font-weight: 400; font-size: 12.5px; letter-spacing: 0; padding-top: 5px; }
.pill.you .k::before { content: "◆ "; color: var(--c); }
.ptable .lnk { display: block; font-family: var(--mono); font-size: 12px; }
.ptable .ttl { display: block; font-size: 13px; color: var(--ink-3); }
.ptable tr.ex td { color: var(--ink-3); }
.ptable tr.ex .mono-s { text-decoration: line-through; }
.pane-detail .fine { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.pane-detail .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.demo input.v { font: inherit; font-family: var(--mono); font-size: 13px; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); padding: 5px 0; width: 11em; }

.app-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 14px 14px 12px; background: var(--c); color: var(--on-colour); }
.app-status .big { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 0.9; letter-spacing: -0.045em; transition: opacity 200ms linear; }
.app-status .cap { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.5; flex: 1 1 18rem; }
.app-status.wait .big { opacity: 0.5; }
.app-status .big.pop { animation: pop 320ms var(--out); }
@keyframes pop { from { transform: translateY(0.18em); } }

.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--ink); white-space: nowrap; }
.tag.solid { background: var(--ink); color: var(--bg); }
.tag.dash { border-style: dashed; }
.tag.dim { border-color: var(--ink-3); color: var(--ink-3); }
@media (max-width: 760px) {
  .panes { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pane-list { border-right: 0; }
  .pane-detail { border-top: 1px solid var(--ink); }
  .app-bar .sp, .rail .n { display: none; }
  .rail li { padding: 8px 8px 9px; font-size: 11px; }
  .app-tools .live { margin-left: 0; flex-basis: 100%; text-align: left; }
}

/* ---------- footer ---------- */
footer.site { padding: 0 var(--pad) 28px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
footer.site a { text-decoration: none; }

/* ---------- motion on inner pages ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 500ms linear, transform 800ms var(--out); }
.rv.is-seen { opacity: 1; transform: none; }
.sec .eyebrow, .sec .lede { opacity: 0; transition: opacity 500ms linear 300ms; }
.is-in .sec .eyebrow, .is-in .sec .lede { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation: none !important; }
  .flood { transition: none !important; }
}

/* ---------- sketchbook: doodle, concept, model ----------
   One .sk block per creature. Frames are flat with a hairline, like the rest of the site.
   Doodles sit on paper white and concepts on their own grey, in both themes, so they read as objects. */
.sk { padding-top: 18px; border-top: 1px solid var(--ink); margin-top: 72px; }
.sk:first-of-type { margin-top: 56px; }
.sk h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -0.035em; line-height: 1; margin: 0 0 10px; }
.sk > p { max-width: 58ch; margin: 0 0 24px; color: var(--ink-2); }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--pad); align-items: start; }
.sk-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .sk-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk-row + .sk-row, .sk-row + .sk-fig, .sk-fig + .sk-row { margin-top: var(--pad); }
.sk-fig { margin: 0; }
.sk-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #f3f1ec; }
.sk-fig.tall img { aspect-ratio: 3 / 4; object-fit: contain; }
.sk-fig.sq img { aspect-ratio: 1 / 1; object-fit: contain; }
.sk-fig.wide img { aspect-ratio: 4 / 3; object-fit: contain; }
.sk-fig video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #201f24; }
.sk-fig.concept img { background: #bcbcbc; }
.sk-fig.model img { background: #4f5749; }
.sk-fig figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 8px; }
.sk-fig figcaption b { font-weight: 400; color: var(--ink); margin-right: 8px; }
.sk-intro { max-width: 58ch; margin: 0; padding-top: 56px; font-size: 1.1rem; line-height: 1.5; }
.sk-intro + .sk-steps { padding-top: 32px; }
.sk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 var(--pad); margin: 0; padding: 56px 0 0; list-style: none; counter-reset: sk; }
.sk-steps li { counter-increment: sk; border-top: 1px solid var(--rule); padding: 12px 0 16px; }
.sk-steps li::before { content: "0" counter(sk); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); display: block; margin-bottom: 6px; }
.sk-steps strong { font-family: var(--display); font-weight: 700; display: block; }

/* ---------- visual support ----------
   The menu itself, then one block per choice. Each choice is an attribute on <html> set by site.js.
   This block is last in the file so it wins over the theme and colour-set rules above. */
.vs { position: relative; }
.vs-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid currentColor !important; padding: 5px 10px 5px 8px !important; }
.vs-btn .vs-eye { display: block; flex: none; }
.vs-btn:hover, .vs-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.top .vs-btn:hover, .top .vs-btn[aria-expanded="true"] { background: #0b0b0c; color: #f4f2ec; }
/* on a phone the button can sit mid-row, so the panel hangs from the whole bar instead of from the button */
@media (max-width: 700px) { .bar { position: relative; } .vs { position: static; } .vs-panel { left: 0; right: 0; top: calc(100% + 1px); width: auto; } }
.vs-quick { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 2px 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.vs-quick .txt { text-decoration: underline; text-underline-offset: 3px; }
.vs-panel { position: absolute; right: 0; top: calc(100% + 12px); z-index: 60; width: min(21rem, 86vw); background: var(--bg); color: var(--ink); border: 1px solid var(--ink); padding: 12px 14px 12px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 15px; --accent: var(--ink); }
.top .vs-panel { background: #0b0b0c; color: #f4f2ec; border-color: #0b0b0c; --ink: #f4f2ec; --ink-3: rgba(244, 242, 236, 0.6); --rule: rgba(244, 242, 236, 0.25); }
.vs-panel fieldset { border: 0; margin: 0; padding: 0; }
.vs-panel legend { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 0 0 8px; }
.vs-panel label { display: grid; grid-template-columns: 22px 1fr; gap: 0 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.vs-panel input { grid-row: 1 / 3; width: 16px; height: 16px; margin: 3px 0 0; accent-color: currentColor; }
.vs-panel .n { font-weight: 600; }
.vs-panel .d { grid-column: 2; font-size: 13.5px; color: var(--ink-3); }
.vs-panel .vs-reset { margin-top: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: underline; }

/* low vision: larger text. Everything scales together, so nothing overlaps. */
:root[data-vs-text] body { zoom: 1.25; }

/* low vision: stronger contrast. Pure black and white, no dimmed text, heavier lines. */
:root[data-vs-contrast] { --bg: #000; --ink: #fff; --ink-2: #fff; --ink-3: #ececec; --rule: rgba(255, 255, 255, 0.8); --dial-bg: #000; --dial-ink: #fff; --accent: #ffd400; }
:root[data-vs-contrast][data-theme="light"] { --bg: #fff; --ink: #000; --ink-2: #000; --ink-3: #1a1a1a; --rule: rgba(0, 0, 0, 0.85); --dial-bg: #fff; --dial-ink: #000; --accent: #0000c8; }
:root[data-vs-contrast] .dial .ring, :root[data-vs-contrast] .dial .tk line, :root[data-vs-contrast] .dial .hub-ring, :root[data-vs-contrast] .s path { stroke-width: 0.7; }
:root[data-vs-contrast] .page a, :root[data-vs-contrast] .bar a { text-decoration: underline; }
:root[data-vs-contrast] .hub, :root[data-vs-contrast] .s .i { fill: var(--dial-ink); }

/* colour blindness: five colours chosen to stay apart for the common kinds (the Okabe-Ito set).
   Colour is never the only signal on this site: every segment also carries its name and number. */
:root[data-vs-colour] { --w-profile: #e69f00; --w-market: #56b4e9; --w-triage: #009e73; --w-catalog: #f0e442; --w-contact: #cc79a7; }
:root[data-vs-colour][data-theme="light"] {
  --t-profile: color-mix(in srgb, var(--w-profile) 45%, #000); --t-market: color-mix(in srgb, var(--w-market) 45%, #000); --t-triage: color-mix(in srgb, var(--w-triage) 45%, #000);
  --t-catalog: color-mix(in srgb, var(--w-catalog) 45%, #000); --t-contact: color-mix(in srgb, var(--w-contact) 45%, #000);
}

/* light sensitivity: always dark, lower contrast, colour blocks dimmed and less saturated */
:root[data-vs-glare] { --bg: #151515; --ink: #c9c4b8; --ink-2: rgba(201, 196, 184, 0.8); --ink-3: rgba(201, 196, 184, 0.58); --rule: rgba(201, 196, 184, 0.2); --dial-bg: #151515; --dial-ink: #c9c4b8; --accent: #c9a15a;
  --t-profile: var(--w-profile); --t-market: var(--w-market); --t-triage: var(--w-triage); --t-catalog: var(--w-catalog); --t-contact: var(--w-contact); color-scheme: dark; }
:root[data-vs-glare] :is(.top, .portal, .app-status, .flood, .s.is-hot path, .seg-list .sw) { filter: saturate(0.55) brightness(0.78); }
:root[data-vs-glare] .dial .s .i { opacity: 0.8; }

/* motion sensitivity: nothing animates, whatever the system setting says */
:root[data-vs-motion] *, :root[data-vs-motion] *::before, :root[data-vs-motion] *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation: none !important; }

/* dyslexia: more room between letters, words and lines, and no small capitals */
:root[data-vs-reading] body { letter-spacing: 0.035em; word-spacing: 0.14em; line-height: 1.75; }
:root[data-vs-reading] :is(.mono, .eyebrow, .kicker, .sub, .rail li, .app-bar, .cap, .tag, .state, .aside dt, .purpose .k, .purpose dt, .fact-table th, .ptable th, .demo button.b, .live, .pill .k) { text-transform: none; letter-spacing: 0.02em; font-family: var(--body); font-size: 14px; }
:root[data-vs-reading] :is(h1, h2, h3, .disp, .big, .pt) { letter-spacing: 0; line-height: 1.1; }
:root[data-vs-reading] .page p, :root[data-vs-reading] .page li { max-width: 62ch; }
