/* dinilb.com: one stylesheet for every page. Design decisions are at the top of README.md.
   Every page sets a skin on <body data-skin="...">; a skin is only colour variables. */
:root {
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(1.25rem, 4.5vw, 4rem);
  --max: 88rem;
  --text: 38rem;
  --r: 4px;
}
body { --bg: #000; --fg: #f2f2f0; --muted: #8c8c8c; --line: #262626; --accent: #ff3b30; --panel: #121212; --on-accent: #fff; }
body[data-skin="sona"]   { --bg: #fff; --fg: #000; --muted: #6b6b6b; --line: #e5e5e5; --accent: #ff3b30; --panel: #f2f2f2; }
body[data-skin="receptionist-ai"] { --bg: #eef2ec; --fg: #0f1a12; --muted: #5d6b60; --line: #cfd8cc; --accent: #1f9d4c; --panel: #fff; }
body[data-skin="loopback"] { --bg: #efeff3; --fg: #121218; --muted: #62626e; --line: #d4d4de; --accent: #5946e0; --panel: #fff; }
body[data-skin="commit-alarm"] { --bg: #000; --fg: #fff; --muted: #8e8e93; --line: #2a2a2a; --accent: #ff6a14; --panel: #121212; }
body[data-skin="siteguard"] { --bg: #f5f7f6; --fg: #11211f; --muted: #5d6a67; --line: #dbe3e0; --accent: #0e5c5a; --panel: #fff; --on-accent: #fff; --ok: #1d8a4e; --ok-bg: #e6f4ec; --bad: #c43d36; --bad-bg: #fbe9e8; }
body[data-skin="groundtruth"] { --bg: #111317; --fg: #ebe8e1; --muted: #8c929a; --line: #2b2f36; --accent: #f5a524; --panel: #1b1e23; --on-accent: #111; }
body[data-skin="wavelength"] { --bg: #f4f3ef; --fg: #1d1d1b; --muted: #74726b; --line: #d9d6cd; --accent: #2b59c3; --panel: #fff; }
body[data-skin="tavvi"] { --bg: #fff; --fg: #101010; --muted: #6a6a6a; --line: #e4e4e4; --accent: #1f9d55; --panel: #e3ece3; }
body[data-skin="bard"] { --bg: #170b29; --fg: #f4effd; --muted: #a497bd; --line: #33224f; --accent: #ff3d8b; --panel: #22123b; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--fg); font: 400 18px/1.5 var(--sans); }
img, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.5; }
.muted { color: var(--muted); }
.t { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.4rem; padding-bottom: 1.4rem; font-size: 0.89rem; }
.top .me { white-space: nowrap; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1rem; }
.top nav { display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); }
.top nav a { text-decoration: none; white-space: nowrap; }
.top .short { display: none; }
.top nav a:hover, .top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.crumb { display: flex; gap: 0.75rem; align-items: baseline; }

/* home hero */
.hero { position: relative; min-height: min(calc(100svh - 4.6rem), 62rem); display: flex; flex-direction: column; padding-bottom: 2rem; }
.corners { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.rec { color: var(--fg); }
.rec::before, .dot::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--accent); margin-right: 0.55em; vertical-align: 0.02em; }
.rec.idle::before { background: var(--muted); }
.name { font-weight: 900; font-size: min(12.5rem, calc((100vw - 2 * var(--pad)) / 5.3), 19vh); line-height: 0.82; letter-spacing: -0.055em; margin-top: clamp(1.25rem, 3.5vh, 3rem); margin-left: -0.04em; }
.name span { display: block; }
.voice { position: relative; margin-top: clamp(1.25rem, 3.5vh, 2.25rem); }
.voice canvas { width: 100%; height: clamp(5rem, 13vh, 9rem); cursor: crosshair; touch-action: pan-y; }
.voice .hint { position: absolute; right: 0; top: -1.6rem; color: var(--muted); }
.hero-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: end; margin-top: auto; padding-top: 1.75rem; }
.said { list-style: none; }
.said li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.2rem 0; }
.said .who { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding-top: 0.5em; }
.said .who b { color: var(--fg); font-weight: 500; }
.said .line { font-size: clamp(1.05rem, 1.55vw, 1.35rem); line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; }
.js .said .w { opacity: 0; transition: opacity 120ms linear; }
.js .said .w.on { opacity: 1; }
.js .said .w.live { color: var(--accent); }
.stats { text-align: right; color: var(--muted); }
.stats b { color: var(--fg); font-weight: 500; }

/* photo slots: a finished frame that waits for a real photo */
.photo { position: relative; }
.photo .frame { position: relative; aspect-ratio: var(--ar, 4 / 5); background: var(--panel); border-radius: var(--r); overflow: hidden;
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in srgb, var(--fg) 6%, transparent) 11px 12px); }
.photo .frame::after { content: ""; position: absolute; inset: 0.6rem; border: 1px dashed color-mix(in srgb, var(--fg) 22%, transparent); border-radius: 2px; }
.photo .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo figcaption { margin-top: 0.5rem; color: var(--muted); }
.photo.filled .frame::after { display: none; }
.portrait { width: clamp(6.5rem, 11vw, 9.5rem); }

/* numbered sections */
.sec { padding-top: clamp(5rem, 11vw, 9rem); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 0.9rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); color: var(--muted); gap: 1rem; }
.sec-head .n { color: var(--fg); }
.big { font-weight: 800; font-size: clamp(2.6rem, 7vw, 6.25rem); line-height: 0.92; letter-spacing: -0.045em; }
.mid { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 0.98; letter-spacing: -0.035em; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.4; max-width: var(--text); }

/* media */
.media { position: relative; background: var(--panel); border-radius: var(--r); overflow: hidden; }
.media img, .media video { width: 100%; height: auto; }
.media.fill img, .media.fill video { height: 100%; object-fit: cover; }
.tag { position: absolute; left: 0.75rem; bottom: 0.7rem; z-index: 2; font-family: var(--mono); font-size: 0.66rem; background: rgba(0,0,0,0.72); color: #fff; padding: 0.15rem 0.45rem; border-radius: 2px; }
.tag::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: #ff3b30; margin-right: 0.45em; }
.paused .tag::before { background: #888; }
.play { position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2; font: 500 0.75rem var(--mono); background: #000; color: #fff; border: 0; padding: 0.4rem 0.7rem; border-radius: 2px; cursor: pointer; }

/* strip: app screens drifting past, unframed */
.strip { overflow: hidden; position: relative; }
.strip .track { display: flex; gap: clamp(0.75rem, 1.5vw, 1.25rem); width: max-content; animation: drift var(--dur, 60s) linear infinite; align-items: center; }
.strip img { height: var(--h, clamp(20rem, 42vw, 34rem)); width: auto; border-radius: clamp(12px, 1.8vw, 26px); }
.strip.paused .track, .strip:hover .track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }

/* rows of work */
.works { display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); }
.work { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: end; }
.work .stage { border-radius: var(--r); overflow: hidden; padding: clamp(0.9rem, 2.4vw, 2rem); display: block; text-decoration: none; position: relative; }
.work .stage .media { border-radius: 3px; }
.work .k { color: var(--muted); }
.work h3 { font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 0.95; letter-spacing: -0.04em; margin-top: 0.5rem; }
.work h3 a { text-decoration: none; }
.work h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--accent); }
.work .one { margin-top: 0.75rem; font-size: 1.06rem; max-width: 26rem; }
.work .res { margin-top: 0.9rem; }
.work .go { display: inline-block; margin-top: 1.1rem; font-weight: 600; }
.work.first { grid-template-columns: 1fr; }
.work.first .txt { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: end; }
.work.first h3 { font-size: clamp(3rem, 8vw, 6.5rem); }

/* the stage of each project carries that project's own colours */
.stage[data-skin] { background: var(--sbg); color: var(--sfg); }
.stage[data-skin="sona"] { --sbg: #f2f2f2; --sfg: #000; }
.stage[data-skin="receptionist-ai"] { --sbg: #e3ebe0; --sfg: #0f1a12; }
.stage[data-skin="loopback"] { --sbg: #e6e5ef; --sfg: #121218; }
.stage[data-skin="commit-alarm"] { --sbg: #141414; --sfg: #fff; box-shadow: inset 0 0 0 1px #2a2a2a; }
.stage[data-skin="siteguard"] { --sbg: #eef3f1; --sfg: #11211f; box-shadow: inset 0 0 0 1px #dbe3e0; }
.stage[data-skin="groundtruth"] { --sbg: #1b1e23; --sfg: #ebe8e1; box-shadow: inset 0 0 0 1px #2b2f36; }
.stage[data-skin="wavelength"] { --sbg: #f4f3ef; --sfg: #1d1d1b; }
.stage[data-skin="tavvi"] { --sbg: #e3ece3; --sfg: #101010; }
.stage[data-skin="bard"] { --sbg: #22123b; --sfg: #f4effd; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.6rem, 1.6vw, 1.25rem); align-items: start; max-width: 40rem; margin: 0 auto; }
.stage .pair { max-width: 24rem; }
.pair img { border-radius: 14px; }

/* flow diagrams drawn from a project's real steps */
.flow { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 0; counter-reset: step; }
.flow li { position: relative; padding: 0.9rem 1rem 1rem; border: 1.5px solid currentColor; margin: 0 0 -1.5px -1.5px; background: color-mix(in srgb, var(--sbg, var(--panel)) 70%, #fff 30%); min-height: 7.5rem; }
.flow li b { display: block; font-weight: 700; font-size: 1rem; line-height: 1.2; margin-top: 0.35rem; }
.flow li span { display: block; font-size: 0.84rem; line-height: 1.35; margin-top: 0.35rem; opacity: 0.8; }
.flow li .mono { opacity: 0.7; }
.flow li.hot { background: var(--accent-2, #1f9d4c); color: #fff; border-color: var(--sfg, var(--fg)); }
.flow code { font-family: var(--mono); font-size: 0.78em; }
.stage .flow { --accent-2: var(--sacc); }
.stage[data-skin="receptionist-ai"] { --sacc: #1f9d4c; }
.stage[data-skin="loopback"] { --sacc: #5946e0; }

/* hackathon table */
.hacks { border-top: 1px solid var(--line); }
.hacks li { display: grid; grid-template-columns: 7.5rem minmax(0, 1.25fr) minmax(0, 1.4fr) minmax(0, 1fr) 5.5rem; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.hacks .ev { font-weight: 600; }
.hacks .won { font-weight: 600; }
.hacks .won.yes::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); margin-right: 0.5em; vertical-align: 0.1em; }
.hacks .photo .frame { --ar: 4 / 3; }
.hacks .photo figcaption { display: none; }
.count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem; margin-bottom: 2.5rem; }

/* sona block on home */
.sona-block > *, .work > *, .p-media, .cols > * { min-width: 0; }
.sona-block { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: end; }
.sona-stage { background: #f2f2f2; color: #000; border-radius: var(--r); overflow: hidden; }
.sona-stage .mac { padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 2vw, 1.5rem) 0; }
.sona-stage .mac .media { border-radius: 6px 6px 0 0; box-shadow: 0 0 0 1px #dcdcdc; background: #fff; }
.sona-stage .strip { padding: clamp(1rem, 2vw, 1.5rem) 0; }
.sona-stage .strip img { --h: clamp(14rem, 24vw, 21rem); height: var(--h); box-shadow: 0 0 0 1px #dedede; }

/* buttons: plain blocks with hard edges */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--fg); color: var(--bg); text-decoration: none; padding: 0.72rem 1.05rem; border-radius: var(--r); font-weight: 600; font-size: 0.94rem; line-height: 1.1; }
.btn.alt { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn.hot { background: var(--accent); color: var(--on-accent); }
.btn:hover { text-decoration: underline; text-decoration-color: currentColor; }
.btn svg { width: 1em; height: 1em; }
.note { margin-top: 0.75rem; color: var(--muted); }

/* project pages */
.p-hero { padding-top: clamp(2.5rem, 7vw, 5.5rem); }
.status { display: inline-flex; border: 1.5px solid var(--fg); border-radius: 2px; overflow: hidden; }
.status span { padding: 0.3rem 0.6rem; }
.status span:first-child { background: var(--fg); color: var(--bg); }
.p-title { font-weight: 900; font-size: clamp(3.6rem, 12vw, 10.5rem); line-height: 0.84; letter-spacing: -0.055em; margin: 1.25rem 0 0 -0.04em; }
.p-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: end; margin-top: clamp(1.25rem, 3vw, 2rem); }
.p-top.solo { grid-template-columns: 1fr; }
.p-top.solo .note { margin-top: 1rem; }
.p-media { margin-top: clamp(2rem, 5vw, 3.5rem); }
.p-media .media { box-shadow: 0 0 0 1px var(--line); }
.cols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.25rem, 3vw, 2.75rem); }
.prose { max-width: var(--text); font-size: 1.08rem; }
.prose p + p { margin-top: 0.9em; }
.lines { border-top: 1px solid var(--line); max-width: 46rem; }
.lines li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.lines code { font-family: var(--mono); font-size: 0.82em; }
.nums { border-top: 1px solid var(--line); max-width: 46rem; }
.nums li { display: grid; grid-template-columns: minmax(6rem, 12rem) minmax(0, 1fr); gap: 1.25rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.nums b { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.03em; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; color: var(--accent); }
body[data-skin="tavvi"] .nums b { color: var(--fg); }
.nums li.plain { display: block; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery figcaption { margin-top: 0.5rem; color: var(--muted); }
.gallery .tall .media { max-width: 24rem; }
.next { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1rem; }
.next a { font-weight: 800; font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: -0.035em; text-decoration: none; line-height: 1; }
.next a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* skin touches */
body[data-skin="groundtruth"] .status span:first-child { background: var(--accent); color: #111; }
body[data-skin="commit-alarm"] .p-title { font-family: var(--mono); font-weight: 600; letter-spacing: -0.07em; }
body[data-skin="wavelength"] .p-title { font-weight: 700; letter-spacing: -0.045em; }
body[data-skin="bard"] .p-title { font-style: italic; }
.wave-rule { height: 22px; width: 100%; color: var(--accent); margin-top: 1.5rem; }
.alarm { font-family: var(--mono); font-weight: 600; font-size: clamp(3.5rem, 10vw, 8rem); letter-spacing: -0.06em; line-height: 0.9; color: var(--accent); }

/* footer */
.foot { margin-top: clamp(5rem, 11vw, 9rem); border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.foot .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-size: 0.94rem; }
.contact .links { display: grid; gap: 0.25rem; }
.contact .links a { font-weight: 800; font-size: clamp(2rem, 6vw, 4.5rem); letter-spacing: -0.04em; line-height: 1.05; text-decoration: none; }
.contact .links a span { font-weight: 400; color: var(--muted); font-size: 0.45em; letter-spacing: 0; margin-left: 0.6rem; vertical-align: 0.4em; }
.contact .links a:hover { color: var(--accent); }

/* sf */
.sf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.5rem); }
.sf-grid .photo:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.sf-grid .photo:nth-child(1) .frame { --ar: auto; height: 100%; min-height: 20rem; }
.visits { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.visits li { font-weight: 800; font-size: clamp(1.6rem, 4vw, 3rem); letter-spacing: -0.035em; line-height: 1.1; }

@media (max-width: 900px) {
  .work, .work.first .txt, .sona-block, .p-top, .cols { grid-template-columns: 1fr; }
  .hacks li { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .hacks li > :nth-child(3), .hacks li > :nth-child(4) { grid-column: 2; }
  .hacks .photo { grid-column: 2; width: 8rem; }
  .flow { --cols: 2 !important; }
  .hero-foot { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-foot .stats { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top nav a.opt { display: none; }
  .top .short { display: inline; } .top .full { display: none; }
  .crumb .mono { display: none; }
  .top { font-size: 0.83rem; }
  .said li { grid-template-columns: 1fr; gap: 0; }
  .said .who { padding: 0.4rem 0 0; }
  .hero-foot { grid-template-columns: 1fr; }
  .portrait { width: 7rem; }
  .flow { --cols: 1 !important; }
  .flow li { min-height: 0; }
  .nums li { grid-template-columns: 1fr; gap: 0.25rem; }
  .gallery { grid-template-columns: 1fr; }
  .sf-grid { grid-template-columns: 1fr 1fr; }
  .corners .opt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip .track { animation: none; }
  .strip { overflow-x: auto; }
}
.sf-hacks li { grid-template-columns: 6.5rem minmax(0, 1.2fr) minmax(0, 2fr) 6rem 7rem; }
@media (max-width: 900px) { .sf-hacks li { grid-template-columns: 5.5rem minmax(0, 1fr); } .sf-hacks li > :nth-child(n+3) { grid-column: 2; } }

.nums b { white-space: nowrap; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.nums li { grid-template-columns: minmax(7rem, 11.5rem) minmax(0, 1fr); }
.row3 { display: flex; gap: clamp(0.75rem, 2vw, 1.5rem); align-items: flex-end; overflow-x: auto; padding-bottom: 0.5rem; }
.row3 figure { flex: 0 0 auto; }
.row3 img { height: clamp(18rem, 40vw, 34rem); width: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.row3.watch img { height: clamp(12rem, 22vw, 18rem); border-radius: 22%; }
.row3 figcaption { margin-top: 0.5rem; max-width: 18rem; }
.gallery .tall { max-width: 22rem; }
.alarm { white-space: nowrap; font-size: clamp(3rem, 7vw, 6rem); }
.facts { border-top: 1px solid var(--line); margin-bottom: 1.5rem; }
.facts li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; align-items: baseline; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem); }
.tile h3 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.035em; line-height: 1; margin-top: 1rem; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.tile p { margin-top: 0.5rem; max-width: 30rem; color: var(--muted); }
.tile .media { aspect-ratio: 16 / 10; }
.tile .media img, .tile .media video { height: 100%; object-fit: cover; }
.duo { aspect-ratio: 16 / 10; background: var(--panel); border-radius: var(--r); display: flex; gap: 1rem; justify-content: center; align-items: center; padding: 1.25rem; }
.duo img { height: 100%; width: auto; border-radius: 12px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }

.p-title { font-size: min(10.5rem, calc((100vw - 2 * var(--pad)) / var(--fit, 6))); }
body[data-skin="commit-alarm"] .p-title { font-size: min(9rem, calc((100vw - 2 * var(--pad)) / (var(--fit, 6) * 1.05))); }
.alarm-hero { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.alarm-hero .pair { max-width: 30rem !important; margin-left: auto !important; }
@media (max-width: 900px) { .alarm-hero { grid-template-columns: 1fr; } .alarm-hero .pair { margin-left: 0 !important; } }

/* ---- polish pass, 19 nov */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
.btn:focus-visible { outline-offset: 2px; }

/* home hero: composed, the foot sits right under the waveform */
.hero { min-height: 0; padding-bottom: 0; }
.hero-foot { margin-top: clamp(0.75rem, 2vh, 1.5rem); padding-top: 0; align-items: start; grid-template-columns: auto minmax(0, 1fr) auto; }
.portrait { width: clamp(5rem, 7vw, 6.5rem); }
.sec.peek { padding-top: clamp(2.5rem, 6vh, 4rem); }
@media (max-width: 900px) {
  .hero-foot { grid-template-columns: auto minmax(0, 1fr); }
  .hero-foot .stats { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero-foot { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0.9rem; }
  .portrait { width: 4.25rem; }
  .portrait figcaption { font-size: 0.6rem; }
}

/* page heads: title left, something real on the right */
.p-title { padding-bottom: 0.1em; }
.p-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36%); gap: clamp(1rem, 3vw, 2.5rem); align-items: end; }
.p-head.solo { grid-template-columns: 1fr; }
.p-head:not(.solo) .p-title { font-size: min(10.5rem, calc((100vw - 2 * var(--pad)) * 0.6 / var(--fit, 6))); }
body[data-skin="commit-alarm"] .p-head:not(.solo) .p-title { font-size: min(9rem, calc((100vw - 2 * var(--pad)) * 0.6 / (var(--fit, 6) * 1.05))); }
.p-aside { justify-self: end; padding-bottom: 0.6rem; }
.key { font-weight: 900; font-size: clamp(3rem, 6.5vw, 6rem); letter-spacing: -0.05em; line-height: 0.85; color: var(--accent); white-space: nowrap; }
body[data-skin="tavvi"] .key { color: var(--fg); }
.key-l { margin-top: 0.7rem; max-width: 19rem; }
.p-aside .shots { display: flex; gap: 1rem; align-items: flex-end; }
.p-aside .shots img { height: clamp(11rem, 21vw, 19rem); width: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.p-hero.tight { padding-top: clamp(1.5rem, 4vw, 3rem); }
.facts-big li { font-size: 0.82rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.facts-big li:first-child { border-top: 1px solid var(--line); }
.status.sm { font-size: 0.66rem; }
.work h3 { margin-top: 0.75rem; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.6rem, 1.6vw, 1.25rem); }
.row4 img { border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.row4 figcaption { margin-top: 0.5rem; }
@media (max-width: 900px) {
  .p-head { grid-template-columns: 1fr; }
  .p-head:not(.solo) .p-title { font-size: min(10.5rem, calc((100vw - 2 * var(--pad)) / var(--fit, 6))); }
  body[data-skin="commit-alarm"] .p-head:not(.solo) .p-title { font-size: min(9rem, calc((100vw - 2 * var(--pad)) / (var(--fit, 6) * 1.05))); }
  .p-aside { justify-self: start; }
  .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .p-aside .shots img { height: 10rem; } .key { font-size: 3rem; } }
.stage-wrap { min-width: 0; }
.stage-wrap > .status { margin-bottom: 0.6rem; }
.work h3 { margin-top: 0; }

.pull { font-weight: 900; font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 14ch; }
.count-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
@media (max-width: 760px) { .count-row { grid-template-columns: 1fr; } .count-row .presenting { max-width: 16rem; } }
.portrait.filled figcaption { display: none; }

.photo.filled .frame { background-image: none; }
.photo.filled .frame::after { display: none; }
.photo figcaption { color: var(--muted); }
.portrait figcaption { display: none; }
.count-row.solo { grid-template-columns: 1fr; }
.hero-photo { margin-top: clamp(1.5rem, 4vw, 3rem); }
.hero-photo .photo { max-width: 44rem; }
.gallery.one { grid-template-columns: 1fr; }
.sf-grid.wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-grid.wall .photo:nth-child(1) { grid-column: 1 / -1; grid-row: auto; }
.sf-grid.wall .photo:nth-child(1) .frame { --ar: 16 / 9; height: auto; min-height: 0; }
@media (max-width: 560px) { .sf-grid.wall { grid-template-columns: 1fr; } }
.sf-grid > * { min-width: 0; }
.sf-grid:not(.wall) .photo:nth-child(1) { grid-column: auto; grid-row: auto; }
.sf-grid:not(.wall) .photo:nth-child(1) .frame { --ar: 4 / 3; height: auto; min-height: 0; }

/* siteguard: calm product skin */
body[data-skin="siteguard"] .p-title, body[data-skin="siteguard"] .pull { color: var(--accent); }
body[data-skin="siteguard"] .status { border-color: var(--accent); }
body[data-skin="siteguard"] .status span:first-child { background: var(--accent); color: #fff; }
body[data-skin="siteguard"] .media { border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
body[data-skin="siteguard"] .photo .frame { border-radius: 10px; }
.cam { position: absolute; left: 0.7rem; top: 0.65rem; z-index: 2; font-family: var(--mono); font-size: 0.66rem; background: rgba(255,255,255,0.92); color: #11211f; padding: 0.2rem 0.5rem; border-radius: 4px; }
.cam::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: #c43d36; margin-right: 0.45em; vertical-align: 0.05em; }
body[data-skin="siteguard"] .tag { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; padding: 0.35rem 0.65rem; border-radius: 6px; border: 1px solid; }
.chip.ok { color: var(--ok); background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.chip.bad { color: var(--bad); background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.chip b { font-weight: 700; }
.camgrid { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(0.75rem, 2vw, 1.25rem); }
.camgrid-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.camgrid-head .name { font-weight: 800; color: var(--accent); letter-spacing: -0.02em; font-size: 1.1rem; }
.camgrid .gallery figcaption { margin-top: 0.45rem; }

/* sharp media: nothing is ever drawn wider than half its pixels; boxes centre in their space */
.media { margin-inline: 0; }
.stage .media, .gallery .media, .p-media > .media { margin-inline: auto; }
.duo img { object-fit: contain; height: auto; max-height: 100%; }
/* sona stage: a mac window at real size, an iphone note and the watch */
.sona-stage { background: #f2f2f2; color: #000; border-radius: var(--r); padding: clamp(1rem, 2.5vw, 2rem); }
.sona-row { display: flex; gap: clamp(1rem, 2.5vw, 2rem); align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.macwin { flex: 1 1 26rem; border-radius: 11px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px #d6d6d6; }
.macbar { height: 28px; background: #ececec; border-bottom: 1px solid #dadada; display: flex; align-items: center; gap: 7px; padding: 0 11px; position: relative; }
.macbar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.macbar i:nth-child(2) { background: #febc2e; } .macbar i:nth-child(3) { background: #28c840; }
.macbar span { position: absolute; left: 0; right: 0; text-align: center; font: 600 12px var(--sans); color: #555; pointer-events: none; }
.macwin img { width: 100%; height: auto; display: block; }
.sona-small { display: flex; gap: 1rem; align-items: flex-end; }
.sona-small .ph { height: clamp(14rem, 24vw, 21rem); width: auto; border-radius: 18px; box-shadow: 0 0 0 1px #dedede; }
.sona-small .wt { height: clamp(9rem, 14vw, 12rem); width: auto; border-radius: 22%; }
.row3.watch img { height: auto; max-height: 15rem; width: auto; }
.p-aside .shots img { height: clamp(11rem, 19vw, 16rem); }
/* downloads */
.dls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.dl { display: inline-flex; align-items: center; gap: 0.55rem; height: 48px; padding: 0 1rem 0 0.8rem; background: #000; color: #fff; border-radius: 10px; text-decoration: none; box-shadow: 0 0 0 1px #a6a6a6 inset; line-height: 1; }
.dl svg { width: 26px; height: 26px; flex: none; }
.dl span { display: flex; flex-direction: column; font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }
.dl small { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.01em; margin-bottom: 2px; }
.dl:hover { text-decoration: none; filter: brightness(1.25); }
.dl.badge { padding: 0; background: none; box-shadow: none; height: 48px; }
.dl.badge img { height: 48px; width: auto; }
.dl-note { margin-top: 0.6rem; }
.dl-wrap { display: block; }
.lockup { display: inline-flex; align-items: center; gap: 0.35em; }
.lockup img { width: 1em; height: 1em; border-radius: 22%; }
.lockup b { font-weight: inherit; }
.hero-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.1rem; }
.hero-dl .lockup { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; }
.hero-dl .lockup img { width: 44px; height: 44px; }
.p-title.with-icon { display: flex; align-items: center; gap: 0.12em; }
.p-title .appicon { width: 0.8em; height: 0.8em; border-radius: 22%; }
.work h3 .lockup img { width: 0.95em; height: 0.95em; }
@media (max-width: 560px) { .sona-small .ph { height: 15rem; } .sona-small .wt { height: 8rem; } .dl { height: 44px; } .dl span { font-size: 1.05rem; } }
.macwin { min-width: 0; }
@media (max-width: 560px) { .macwin { flex: 1 1 100%; } .sona-small { width: 100%; justify-content: center; } .sona-small .ph { height: 13rem; } .sona-small .wt { height: 7rem; } }

.hero-foot.no-photo { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 900px) { .hero-foot.no-photo { grid-template-columns: 1fr; } }
.hacks li { grid-template-columns: 7.5rem minmax(0, 1.25fr) minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 900px) { .hacks li { grid-template-columns: 5.5rem minmax(0, 1fr); } }
.sf-hacks li { grid-template-columns: 6.5rem minmax(0, 1.2fr) minmax(0, 2fr) 6rem 7rem; }
@media (max-width: 900px) { .sf-hacks li { grid-template-columns: 5.5rem minmax(0, 1fr); } }
.sf-lead { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.sf-lead .photo { width: 100%; }
.sf-grid.wall .photo:nth-child(1) .frame { --ar: 1280 / 853; }
.sf-grid.wall .photo:nth-child(1) { justify-self: start; width: 100%; }
.pair > * { min-width: 0; }
.pair img { width: 100%; height: auto; }
.sona-first { gap: 1.25rem; }
.sona-first > .status { justify-self: start; }
.sona-first .txt { align-items: end; }
@media (max-width: 560px) { .dls { flex-wrap: nowrap; width: 100%; max-width: 22rem; } .dl { flex: 1 1 0; min-width: 0; padding: 0 0.6rem; gap: 0.45rem; justify-content: center; } .dl span { font-size: 1rem; } .dl svg { width: 22px; height: 22px; } .hero-dl .dls { flex-basis: 100%; } }

.sf-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 3vw, 2.75rem); align-items: center; }
.sf-row .photo { width: 100%; justify-self: end; }
@media (max-width: 760px) { .sf-row { grid-template-columns: 1fr; } .sf-row .photo { justify-self: stretch; } }
.sf-grid.wall { justify-items: start; }
.sf-grid.wall .photo { width: 100%; }
.sf-grid.wall .photo:nth-child(1) { grid-column: auto; }

/* review fixes, 19 nov */
.voice .hint { position: static; display: block; text-align: right; margin-top: 0.4rem; }
.nums b { font-variant-numeric: normal; letter-spacing: -0.02em; }
.sona-intro .lede { max-width: 30rem; }
.sona-intro .actions { margin-top: 1.25rem; }
.shots2 { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: clamp(1rem, 3vw, 2.5rem); align-items: start; }
.shots2 figure { display: grid; grid-template-rows: auto auto; }
.shots2 img { height: clamp(16rem, 36vw, 32rem); width: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.shots2.watch img { height: auto; max-height: 15rem; border-radius: 22%; box-shadow: none; }
.shots2 figcaption { margin-top: 0.5rem; max-width: 16rem; }
@media (max-width: 560px) { .shots2 { grid-template-columns: 1fr 1fr; gap: 0.75rem; } .shots2 img { height: auto; width: 100%; } .shots2.watch img { width: 100%; max-height: none; } }
.mac-cols { align-items: start; }
.mac-cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 900px) { .mac-cols { grid-template-columns: 1fr; } }
.more { margin-top: 1.25rem; max-width: 46rem; }
.more summary { cursor: pointer; color: var(--muted); }
.lines.small li { font-size: 0.88rem; }
@media (max-width: 900px) { .flow[style*="--cols:6"] { --cols: 2 !important; } }
/* the live clip marker: a small dot in the corner, covering nothing */
.tag { left: auto; right: 0.5rem; top: 0.5rem; bottom: auto; padding: 0; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #ff3b30; font-size: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.75); }
.tag::before { display: none; }
.paused .tag { background: #888; }
/* downloads: the same height, the same weight, flush with the text */
.dls { flex-wrap: nowrap; }
.dl, .dl.badge { flex: none; height: 48px; }
.dl { border-radius: 8px; padding: 0 0.9rem 0 0.75rem; }
.dl.badge img { height: 48px; width: auto; display: block; }
@media (max-width: 560px) { .dls { width: auto; max-width: none; } .dl, .dl.badge { flex: none; height: 44px; } .dl.badge img { height: 44px; } .dl { padding: 0 0.75rem 0 0.6rem; } .dl span { font-size: 1.05rem; } }
@media (max-width: 340px) { .dls { flex-wrap: wrap; } }
/* footer rule as wide as the content, like every other rule */
.foot { border-top: 0; background: linear-gradient(var(--line), var(--line)) no-repeat; background-size: calc(100% - 2 * var(--pad)) 1px; background-position: var(--pad) 0; }
/* games: a neat grid */
.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile .media { margin-inline: auto; }
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.tile .media { width: 100%; aspect-ratio: 16 / 10; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr; } }
.shots2 { align-items: end; }
@media (max-width: 560px) { .shots2 img { aspect-ratio: auto; } .nums li { grid-template-columns: 1fr; gap: 0.2rem; } }
.shots2 figure { grid-template-rows: 1fr auto; align-items: end; height: 100%; }
.shots2 { align-items: stretch; }
.shots2 figcaption { min-height: 3em; }
