/* --- self-hosted fonts (matches scrapyard-blog's convention) -----------
   Only the weights this site uses: Open Sans 400 (hero/display) + 600
   (in-content headings, labels, nav) as one variable-weight file; Lato 400
   (body) + 700, normal style only (no italic weights were loaded from the
   Google Fonts CDN either, so .gap-caption's font-style:italic keeps
   relying on browser-synthesized italic, same as before this migration). */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato/lato-400-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato/lato-400-latin-ext.woff2') format('woff2');
  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: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato/lato-700-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato/lato-700-latin-ext.woff2') format('woff2');
  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: 'Open Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/open-sans/open-sans-normal-latin.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/open-sans/open-sans-normal-latin-ext.woff2') format('woff2');
  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;
}

:root {
  --bg: #fbfaf8; --text: #2f2a2b; --muted: #6b6360; --card: #f1efe9; --border: #e6e2dc;
  --link: #0e647c; --link-hover: #0f5e72; --link-deep: #0f4c5c; --green: #257953;
  --sandstone: #a88565; --sandstone-text: #816346; --meta: #5f7585;
  --meta-strong: var(--meta);
  --ink: #1e120a; --error-text: #b8481e; --cyan: #2db8dd;
  --code-bg: #fff8e2; --code-text: #b8481e;
  --panel: #1e1b1c; --panel-border: #3a3436; --panel-text: #e8dfd0;
  --seg: color-mix(in srgb, var(--green) 75%, var(--bg));
  --seg-code: color-mix(in srgb, var(--sandstone) 75%, var(--bg));
  --font-head: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1b1c; --text: #e8dfd0; --muted: #a89a8f; --card: #2f2a2b; --border: #3a3436;
    --link: #5aaec0; --link-hover: #2db8dd; --link-deep: #5aaec0; --green: #46ac7d;
    --sandstone: #c8a585; --sandstone-text: #c8a585; --meta: #93a7b5;
    --meta-strong: #bcd0da;
    --ink: #e8dfd0; --error-text: #e0764c;
    --code-bg: #362f2b; --code-text: #c8a585;
    --panel: #2f2a2b;
    --seg: color-mix(in srgb, var(--green) 65%, var(--bg));
    --seg-code: color-mix(in srgb, var(--sandstone) 65%, var(--bg));
  }
}
* { box-sizing: border-box; }
/* Dark ink on cyan in BOTH themes — inheriting the theme's text color would
   break dark mode (warm paper on cyan reads ~1.76:1). */
::selection { background: var(--cyan); color: #1e120a; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 7vh 24px 12vh; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-weight: 400; font-size: clamp(2rem, 6vw, 2.9rem); margin: 0 0 .3rem; letter-spacing: -.01em; }
h2, h3 { font-weight: 600; }
.tagline { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.05rem, 3.4vw, 1.3rem);
  color: var(--text); margin: 0 0 .6rem; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Prose links (G183): teal-vs-text contrast is ~2:1, below the 3:1 floor for
   color-only links, so links inside running text get an underline. Nav/chrome
   links keep the global `a` rule above (placement is the affordance there). */
.lede a, .ledger-item p a, .article-body p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.lede { font-size: 1.08rem; margin: 0 0 2.8rem; max-width: 62ch; }
/* /writing — the curated Field Notes surface: narrow prose column, entries link out */
.writing-list{ margin-top:2.2rem; display:flex; flex-direction:column; gap:1.7rem; }
.writing-item h3{ margin:0 0 .15rem; font-size:1.05rem; font-weight:600; }
.writing-item h3 a{ color:var(--ink); text-decoration:underline; text-decoration-color:var(--sandstone); text-decoration-thickness:1px; text-underline-offset:4px; }
.writing-item h3 a:hover{ color:var(--link); text-decoration-color:var(--link); }
.writing-item p{ margin:.35rem 0 0; font-size:.95rem; line-height:1.55; }
.writing-pair{ margin:.5rem 0 0; font-size:.85rem; font-family:var(--font-head); font-weight:600; color:var(--muted); }
.writing-pair a{ color:var(--sandstone-text); }
.writing-pair a:hover{ color:var(--link); }
.pd-dot{ display:inline-block; width:7px; height:7px; border-radius:50%; margin:0 .3rem 0 .15rem; vertical-align:1px; }
.pd-dot.discovery{ background:var(--green); }
.pd-dot.build{ background:var(--sandstone); }
.pd-dot.prototype{ background:var(--meta); }
.writing-standfirst{ font-size:1.12rem; color:var(--muted); }
/* Case-study header phase signature: the three phase tags with fill bars
   (discovery/prototype/build) from the work's coords, always visible. */
.phase-signature{ display:flex; gap:1.1rem; margin-top:.9rem; align-items:flex-end; }
.phase-signature .tagcol{ display:inline-flex; flex-direction:column; justify-content:flex-end; gap:5px; }
.phase-signature .seg{ display:block; width:100%; border-radius:3px 3px 0 0; height:calc(4px + var(--v) * 22px); opacity:calc(.4 + var(--v) * .55); }
.phase-signature .seg.discovery{ background:var(--green); }
.phase-signature .seg.prototype{ background:var(--meta); }
.phase-signature .seg.build{ background:var(--sandstone); }
.phase-signature .tag{ font-family:var(--font-head); font-weight:600; font-size:.7rem; letter-spacing:.07em; text-transform:uppercase; border:1px solid; border-radius:3px; padding:3px 8px; }
.phase-signature .tag.discovery{ color:var(--green); border-color:color-mix(in srgb, var(--green) 45%, transparent); }
.phase-signature .tag.prototype{ color:var(--meta); border-color:color-mix(in srgb, var(--meta) 45%, transparent); }
.phase-signature .tag.build{ color:var(--sandstone-text); border-color:color-mix(in srgb, var(--sandstone) 45%, transparent); }
.writing-all{ margin-top:2.6rem; }

/* Articles (/writing/<slug>) — the Field Notes article surface */
.article-head{ margin-top:2.4rem; }
.page-title{ font-family:var(--font-head); font-weight:400; font-size:1.7rem; color:var(--ink); margin:0 0 1.4rem; letter-spacing:-.01em; }
.article-kicker{ display:inline-block; font-family:var(--font-head); font-weight:700; font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--sandstone-text); margin-bottom:.5rem; }
.article-kicker:hover{ color:var(--link); }
.article-head h1{ font-size:1.55rem; font-weight:600; margin:0 0 .3rem; line-height:1.3; color:var(--ink); }
.article-body{ margin-top:1.6rem; font-size:1.02rem; line-height:1.65; }
.article-body h2{ font-family:var(--font-head); font-weight:600; font-size:1.25rem; margin:2.2rem 0 .7rem; }
.article-body h3{ font-family:var(--font-head); font-weight:600; font-size:1.05rem; margin:1.8rem 0 .5rem; }
.article-body p{ margin:0 0 1.1rem; }
.article-body a{ text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
.article-body ul, .article-body ol{ margin:0 0 1.1rem; padding-left:1.4rem; }
.article-body li{ margin-bottom:.35rem; }
.article-body blockquote{ margin:1.2rem 0; padding:.2rem 0 .2rem 1.1rem; border-left:3px solid var(--green); color:var(--muted); }
.article-body img{ max-width:100%; border-radius:8px; }
.article-body hr{ border:0; border-top:1px solid var(--sandstone); opacity:.5; margin:2rem 0; }
.article-body code{ font-family:"SFMono-Regular",Consolas,Menlo,monospace; font-size:.88em; background:var(--code-bg); color:var(--code-text); padding:.12em .4em; border-radius:3px; }
.article-body .highlight pre, .article-body > pre{
  border:1px solid var(--panel-border); border-radius:8px; padding:1rem 1.2rem;
  overflow-x:auto; margin:1.2rem 0; font-size:.85rem; line-height:1.55;
  /* Scroll shadows: the local-attachment covers hide the scroll cues at the
     edges, so a shadow only shows when there is more content that way. */
  background:
    linear-gradient(90deg, var(--panel) 40%, rgba(30,27,28,0)) left/28px 100% no-repeat local,
    linear-gradient(270deg, var(--panel) 40%, rgba(30,27,28,0)) right/28px 100% no-repeat local,
    linear-gradient(90deg, rgba(0,0,0,.55), transparent) left/14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(0,0,0,.55), transparent) right/14px 100% no-repeat scroll,
    var(--panel);
  scrollbar-width:thin; scrollbar-color:#5a534f transparent;
}
.article-body pre::-webkit-scrollbar{ height:8px; }
.article-body pre::-webkit-scrollbar-thumb{ background:#5a534f; border-radius:4px; }
.article-body pre::-webkit-scrollbar-track{ background:transparent; }
.article-body pre code{ background:none; color:var(--panel-text); padding:0; font-size:1em; }
/* Chroma token classes -> canon panel inks (keywords teal, strings green,
   comments muted, names/text paper) */
.article-body .highlight .k, .article-body .highlight .kd, .article-body .highlight .kn,
.article-body .highlight .kr, .article-body .highlight .kt, .article-body .highlight .im{ color:#5aaec0; }
.article-body .highlight .s, .article-body .highlight .s1, .article-body .highlight .s2,
.article-body .highlight .sb, .article-body .highlight .sd{ color:#46ac7d; }
.article-body .highlight .c, .article-body .highlight .c1, .article-body .highlight .cm,
.article-body .highlight .ch{ color:#a89a8f; }
.article-body .highlight .nf, .article-body .highlight .nc, .article-body .highlight .nn{ color:#93a7b5; }
.article-rel{ margin:.5rem 0 0 !important; }
.article-nav{ margin-top:2.6rem; padding-top:1.4rem; border-top:1px solid var(--sandstone); display:flex; justify-content:space-between; gap:1.5rem; }
.article-nav a{ display:flex; flex-direction:column; gap:.15rem; max-width:47%; }
.article-nav-next{ text-align:right; margin-left:auto; }
.article-nav-dir{ font-family:var(--font-head); font-weight:700; font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); }
.article-nav a:hover .article-nav-dir{ color:var(--link); }
.article-nav-ttl{ font-family:var(--font-head); font-weight:600; font-size:.9rem; color:var(--ink); text-decoration:underline; text-decoration-color:var(--sandstone); text-decoration-thickness:1px; text-underline-offset:3px; }
.article-nav a:hover .article-nav-ttl{ color:var(--link); text-decoration-color:var(--link); }
.article-foot{ margin-top:1.8rem; padding-top:1.2rem; font-family:var(--font-head); font-weight:600; font-size:.9rem; }
.writing-all-list{ margin-top:3.2rem; }
.writing-all-list h2{ font-family:var(--font-head); font-weight:700; font-size:1.15rem; margin:0 0 1.4rem; padding-bottom:.35rem; border-bottom:2px solid var(--sandstone); }

footer { margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
@media (max-width: 480px) { .contacts { gap: .8rem 1rem; } }
.ext-mark { font-size: .75em; }

/* /work: h1 becomes a link back home — keep it looking like a plain heading */
header h1 a { color: inherit; text-decoration: none; border-bottom: none; }
header h1 a:hover { opacity: .78; }

/* ===== Rail grammar: every subpage = slim sticky rail + content column ===== */
.wrap:has(.railpage){ max-width:1120px; }
.railpage{ display:flex; gap:56px; align-items:flex-start; }
.page-rail{ flex:0 0 180px; position:sticky; top:7vh; display:flex; flex-direction:column; gap:1.3rem; }
.rail-name{ font-family:var(--font-head); font-weight:400; font-size:1.35rem; color:var(--ink); line-height:1.2; }
.rail-name:hover{ color:var(--link); }
.rail-nav{ display:flex; flex-direction:column; gap:.4rem; font-family:var(--font-head); font-weight:600; font-size:.85rem; }
.rail-nav a{ color:var(--muted); padding-block:.1rem; }
.rail-nav a:hover{ color:var(--link); }
.rail-nav a.is-current{ color:var(--ink); position:relative; }
.rail-nav a.is-current::before{ content:""; position:absolute; left:-11px; top:50%; transform:translateY(-50%); width:4px; height:4px; border-radius:50%; background:var(--sandstone); }
.railmain{ flex:1; min-width:0; max-width:720px; }

/* Shared metadata bits (used by the ledger and the writing surfaces) */
.tag { color: var(--sandstone-text); font-family: var(--font-head); font-weight: 600; font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; }
.era { color: var(--meta); font-family: var(--font-head); font-weight: 600; font-size: .78rem; }
.ledger-tiles{ display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:.45rem; }
.ledger-tiles .tile{ font-family:var(--font-head); font-weight:600; font-size:.66rem; letter-spacing:.06em; text-transform:uppercase; padding:.1rem .45rem; border-radius:3px; border:1px solid; }
.ledger-tiles .tile.discovery{ color:var(--green); border-color:var(--green); }
.ledger-tiles .tile.build{ color:var(--sandstone-text); border-color:var(--sandstone); }
.ledger-tiles .tile.prototype{ color:var(--meta); border-color:var(--meta); }

/* ===== /work: the ledger — one chronological spine, cards alternating ===== */
.ledger{ position:relative; margin-top:2.4rem; padding-bottom:.5rem; }
.ledger::before{ content:""; position:absolute; left:50%; top:8px; bottom:0; width:2px; transform:translateX(-50%); background:var(--sandstone); opacity:.5; }
.ledger-item{ position:relative; width:calc(50% - 34px); margin-bottom:1.6rem; background:var(--card); border:1px solid var(--border); border-radius:8px; padding:13px 15px; }
.ledger-item + .ledger-item{ margin-top:-4.5rem; }
.ledger-item.side-left{ margin-right:auto; }
.ledger-item.side-right{ margin-left:auto; }
.ledger-item .ldot{ position:absolute; top:17px; width:11px; height:11px; border-radius:50%; box-shadow:0 0 0 3px var(--bg); }
.ledger-item::before{ content:""; position:absolute; top:22px; width:34px; height:1px; background:var(--sandstone); opacity:.5; }
.side-left::before{ right:-34px; }
.side-right::before{ left:-34px; }
.side-left .ldot{ right:-40px; }
.side-right .ldot{ left:-40px; }
.pd-product .ldot{ background:var(--green); }
.pd-engineering .ldot{ background:var(--sandstone); }
.pd-design .ldot{ background:var(--meta); }
.ledger-year{ position:absolute; top:-9px; font-family:var(--font-head); font-weight:600; font-size:10px; letter-spacing:.1em; color:var(--muted); background:var(--bg); padding:1px 7px; border-radius:3px; }
.side-left .ledger-year{ right:-34.5px; transform:translateX(50%); }
.side-right .ledger-year{ left:-34.5px; transform:translateX(-50%); }
.ledger-meta{ display:flex; gap:.6rem; align-items:baseline; flex-wrap:wrap; margin-bottom:.35rem; }
.ledger-item h3{ margin:0 0 .3rem; font-size:1rem; font-weight:600; }
.ledger-item h3 a{ color:var(--ink); text-decoration:underline; text-decoration-color:var(--sandstone); text-decoration-thickness:1px; text-underline-offset:4px; }
.ledger-item h3 a:hover{ color:var(--link); text-decoration-color:var(--link); }
.ledger-item p{ margin:0; font-size:.92rem; line-height:1.5; }
.ledger-related{ margin:.45rem 0 0 !important; font-family:var(--font-head); font-weight:600; font-size:.82rem; }
.ledger-related a{ color:var(--sandstone-text); }
.ledger-related a:hover{ color:var(--link); }

/* The alternating form needs a wide column: below 1000px the ledger goes
   single-file (spine left) even while the rail is still beside it. */
@media (max-width: 1000px){
  .ledger::before{ left:8px; transform:none; }
  .ledger-item{ width:auto; }
  .ledger-item.side-left, .ledger-item.side-right{ margin:0 0 1.3rem 30px; }
  .ledger-item + .ledger-item{ margin-top:0; }
  .side-left .ldot, .side-right .ldot{ left:-27px; right:auto; }
  .side-left::before, .side-right::before{ left:-22px; right:auto; width:22px; }
  .side-left .ledger-year, .side-right .ledger-year{ left:-21.5px; right:auto; transform:translateX(-50%); top:-9px; }
}

/* Mobile: the rail stacks into a header */
@media (max-width: 820px){
  .railpage{ display:block; }
  .page-rail{ position:static; margin-bottom:2rem; gap:.7rem; }
  .rail-nav{ flex-direction:row; flex-wrap:wrap; gap:.9rem .9rem; }
  .rail-nav a.is-current::before{ left:-9px; }
}

/* ===== Home — discipline-space ===== */
.home{ max-width:1120px; margin:0 auto; padding:0 40px; display:flex; gap:56px; align-items:flex-start; }
.home-left{ flex:0 0 43%; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; justify-content:center; padding:40px 0; }
.home-eyebrow{ font-family:var(--font-head); font-weight:600; font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.home-name{ font-family:var(--font-head); font-weight:400; font-size:40px; line-height:1.1; letter-spacing:-.01em; margin:8px 0 8px; }
.home-role{ font-family:var(--font-head); font-weight:600; font-size:12px; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); }
.home-tag{ margin:14px 0 0; font-size:16px; max-width:34ch; opacity:.92; }
.plotbox{ margin:18px 0 4px; }
#disc-plot{ display:block; width:100%; height:320px; }
.plotbox .plot-hint, .plotbox .readout{ padding:0 2px; }
.plot-hint{ font-family:var(--font-head); font-weight:600; font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-top:2px; }
.readout{ min-height:32px; margin-top:8px; font-family:"SFMono-Regular",Consolas,Menlo,monospace; font-size:11px; letter-spacing:.01em; color:var(--meta); }
.readout b{ display:block; color:var(--text); font-size:12px; font-family:var(--font-head); font-weight:600; }
.readout .q{ display:block; margin-top:1px; color:var(--link); font-weight:600; }
.home-links{ margin-top:24px; display:flex; gap:16px; flex-wrap:wrap; }
.home-links a{ color:var(--muted); }
.home-links a:hover{ color:var(--link); }
.home-links a{ font-family:var(--font-head); font-weight:600; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--text); text-decoration:none; border-bottom:2px solid transparent; padding-block:4px; }
.home-links a:hover{ border-bottom-color:var(--link); }
.home-colophon{ margin-top:15px; display:flex; flex-direction:column; gap:3px; font-family:var(--font-head); font-weight:600; font-size:10px; letter-spacing:.05em; text-transform:uppercase; color:var(--sandstone-text); font-variant-numeric:tabular-nums; }
.home-colophon .colophon-line{ display:block; }
.home-colophon .colophon-meta{ color:var(--muted); }
.home-colophon.is-stale{ color:var(--muted); }
.home-built{ margin-top:10px; font-family:var(--font-body); font-size:12px; line-height:1.5; color:var(--muted); max-width:34ch; }
.home-built a{ color:var(--link); text-decoration:none; border-bottom:1px solid var(--border); white-space:nowrap; }

.home-right{ flex:1; padding:96px 0 32vh; }
.home-intro{ font-size:19px; line-height:1.65; max-width:50ch; letter-spacing:-.004em; margin:0 0 20px; padding-left:16px; }
.home-intro em{ font-style:normal; color:var(--ink); }
.home-latest{ font-family:var(--font-head); font-weight:700; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--sandstone-text); white-space:nowrap; }
/* Every work renders at full contrast at all times — no dim-on-load wash.
   The currently-scrolled work gets a whisper of emphasis instead: a 2px
   accent border. It's reserved (transparent) on every work so the border
   never shifts text when .active toggles on/off. */
.work{ padding:36px 0 36px 14px; border-top:1px solid var(--border); border-left:2px solid transparent; transition:border-color .15s; }
.work.active{ border-left-color:var(--link); }
.work-n{ font-family:var(--font-head); font-weight:700; font-size:11px; letter-spacing:.14em; color:var(--sandstone-text); }
.work-title{ font-family:var(--font-head); font-weight:600; font-size:22px; line-height:1.25; letter-spacing:-.012em; margin:7px 0 3px; }
.work-yr{ font-family:var(--font-head); font-weight:600; font-size:12px; letter-spacing:.04em; color:var(--muted); margin-left:5px; }
.work-blurb{ margin:10px 0 12px; max-width:44ch; line-height:1.6; opacity:.88; }
.work-links{ display:flex; gap:14px; flex-wrap:wrap; margin:0 0 11px; }
.work-links a{ font-family:var(--font-head); font-weight:600; font-size:11px; letter-spacing:.03em; color:var(--muted); border-bottom:1px solid transparent; padding-block:4px; }
.work-links a:hover{ color:var(--link); border-bottom-color:currentColor; }
.work-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.work-tags .tag{ font-family:var(--font-head); font-weight:600; font-size:10px; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); border:1px solid var(--border); border-radius:3px; padding:3px 8px; }
.work-tags .tag:not(.on){ border-style:dashed; }   /* skills not at play for a work: dashed outline */
.tag.discovery.on{ color:var(--green); border-color:color-mix(in srgb, var(--green) 45%, transparent); }
.tag.prototype.on{ color:var(--meta); border-color:color-mix(in srgb, var(--meta) 45%, transparent); }
.tag.build.on{ color:var(--sandstone-text); border-color:color-mix(in srgb, var(--sandstone) 45%, transparent); }

/* mobile residue of the plot: a discipline bar above each chip, chip-width,
   so position (not only color) binds amount to label. Hidden on desktop. */
.work-tags .tagcol{ display:inline-flex; flex-direction:column; justify-content:flex-end; gap:4px; }
.work-tags .seg{ display:none; width:100%; border-radius:3px 3px 0 0; height:calc(3px + var(--v) * 26px); opacity:calc(.3 + var(--v) * .7); }
.work-tags .seg.discovery{ background:var(--green); }
.work-tags .seg.prototype{ background:var(--meta); }
.work-tags .seg.build{ background:var(--sandstone); }

/* Mobile identity marker, echoing the /work timeline's rail-and-dot motif:
   a slim vertical rail runs behind the work list, with one dot per work
   colour-coded to its dominant discipline (--dot-color set inline per
   section from its coords — see layouts/index.html). Desktop-hidden. */
.work-dot{ display:none; }

@media (max-width:820px){
  .home{ flex-direction:column; gap:0; padding:0 26px; }
  .home-left{ position:static; height:auto; display:block; padding:44px 0 4px; }
  .plotbox{ display:none; }              /* full 3D plot dropped on mobile */
  .home-name{ font-size:32px; }
  .home-right{ padding:18px 0 60px; }
  .work-tags .seg{ display:block; }      /* residue shown instead */
  .work-tags{ align-items:flex-end; }

  .work-rail{ position:relative; padding-left:24px; }
  .work-rail::before{
    content:""; position:absolute; left:6px; top:34px; bottom:44px; width:2px; background:var(--border);
  }
  .work{ position:relative; padding-left:12px; }
  .work-dot{
    display:block; position:absolute; left:-22px; top:40px;
    width:10px; height:10px; border-radius:50%;
    background:var(--dot-color, var(--sandstone));
    box-shadow:0 0 0 3px var(--bg); z-index:2;
  }
}

@media (prefers-color-scheme: dark) {
  /* .work-tags .tag, .readout, and .home-role/.home-eyebrow used to lift
     themselves above the shared --muted/--border tokens here with hardcoded
     dark hexes (#c3b9ac at 8.83:1 — over the 4.5-8:1 secondary-band ceiling;
     #b6ab9f at 7.58:1; #4a4340 border). Their base rules already read
     var(--muted)/var(--border), which resolve to compliant dark values
     (6.25:1 / 1.40:1) on their own, so the overrides were pure duplication
     once tokenized — removed rather than reasserted. */
  .work-blurb{ opacity:.95; }
}
