/* The DEFAULT palette: phosphor. Kris, 2026-09-22 — "anyway, this is nice. make it
   default".

   ⚠️ These are NO LONGER the sampled values. The palette started as colours sampled from a
   screenshot Kris sent (ground #031111, text #cbffff/#91ffff, cyan on teal), and on
   2026-09-22 he asked for "a bit more contrast between the background ... make it
   blacker/greyer ... and the text/elements ... make it greener/brighter". So the ground
   moved off teal toward neutral near-black and the text moved off cyan toward phosphor
   green. Every value below is contrast-measured against the ground, not eyeballed: the
   headings gained contrast (17.66 -> 19.26:1) and secondary text gained a lot
   (5.99 -> 7.80:1). Body copy reads 15.58:1, nominally below the cyan it replaced,
   because a saturated green is less luminous than a near-white cyan - it looks brighter
   and measures a shade lower, and both are far above the 4.5:1 AA floor.

   These live in :root rather than in a theme file on purpose — a default has to hold with
   JavaScript switched off, and js/theme.js only ever ADDS a data-theme attribute.

   ⚠️ THIS THEME HAS BOTH HALVES, and the SYSTEM picks (Kris, 2026-09-22: "each theme
   should have both a dark and light theme" … "site should always use system theme" …
   "for all themes with both light and dark mode, always follow the system mode"). It is
   still one design: the layout, type, spacing and the role each colour plays are identical
   in both halves. Only the luminance is mirrored, and the reader's OS decides which way
   round. There is no in-page light/dark switch and there must not be one —
   `color-scheme: light dark` plus the media query IS the control, and it needs no
   JavaScript.

   ⚠️ TWO HALVES IS NOT THE RULE FOR EVERY THEME. The six historical themes are pinned to
   the ONE palette each of them actually had, because a 2005 page that never existed in
   dark is not recovered by inventing one (Kris, 2026-09-22, withdrawing the recolours:
   "only both 2026 themes, and future themes from now on"). Both halves is the rule for
   the 2026 designs and for anything made after them. */
:root{
  color-scheme:light dark;
  --bg:#050706;     /* near-black, barely green — the ground is greyer than the text */
  --card:#101614;   /* the panel, lifted enough to read as a surface against that ground */
  --ink:#e8fff2;    /* headings and primary text — 19.26:1 */
  --body:#b8c9c0;   /* body copy — calm, desaturated, 11.69:1 */
  --link:#5cff96;   /* THE PHOSPHOR GREEN, and it belongs to links alone — 15.58:1.
                       Kris, 2026-09-22: "only use the striking phosphor green for
                       hyperlinks / a tags". It is the one saturated colour on the page, so
                       it reads as "this is pressable" rather than as decoration; the moment
                       body copy wears it too, it stops meaning anything. Anything that is
                       not an <a> takes --ink, --body or --dim. */
  --dim:#6fae8c;    /* secondary text — 7.80:1, well clear of AA */
  --line:#1a241f;   /* hairlines and borders */
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

/* The DEFAULT palette's LIGHT half — phosphor on paper rather than phosphor in the dark.
   The same five jobs, the same hues, the luminance mirrored: a pale ground with the faint
   green cast the dark ground has, a near-black green for headings, a calm desaturated green
   for body copy, and one saturated green kept for links alone. The link keeps the dark
   half's HUE (143° -> 142°) and loses the glow it does not need on white, because a neon
   #5cff96 on paper measures 1.4:1 and is unreadable.

   Measured against this ground with tools/contrast.py — ink 16.58:1, body 9.79:1,
   link 6.18:1, dim 5.25:1; on --card they all read a shade higher still. */
@media (prefers-color-scheme: light){
  :root{
    --bg:#eef3f0;     /* pale, barely green — the ground is greener than the ink is */
    --card:#fbfdfc;   /* the panel, lifted off that ground the way --card is in the dark */
    --ink:#0b1510;    /* headings and primary text — 16.58:1 */
    --body:#2f4038;   /* body copy — calm, desaturated, 9.79:1 */
    --link:#07682f;   /* THE PHOSPHOR GREEN AT DAY, and still links only — 6.18:1 */
    --dim:#4c6b5b;    /* secondary text — 5.25:1, clear of AA */
    --line:#d3e0d8;   /* hairlines and borders */
  }
}
/* EVERY OTHER THEME KEEPS ITS OWN LINK COLOUR. Until 2026-09-22 every link rule in this
   file used var(--ink), so that is exactly what this restores for the themes — a period
   design must not inherit the default's phosphor green on the handful of link rules it
   does not happen to override itself, which would have put a neon link on the white 2005
   page. Only the default (no data-theme attribute) keeps --link. */
html[data-theme]{--link:var(--ink)}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--mono);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:clamp(16px,5vw,64px);
}

/* Kris, 2026-09-21: "make the layout wider on laptop view with some margin on the side,
   but narrow like earlier in iphone view". The phone keeps the 560px column it always
   had; the width only opens up once there is room for it, and `body`'s own
   clamp(16px,5vw,64px) padding is the margin that stops it reading as full bleed. */
.card{
  width:min(560px,100%);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:6px;
  overflow:hidden;
}
@media (min-width:820px){.card{width:min(720px,100%)}}
@media (min-width:1200px){.card{width:min(880px,100%)}}

/* --- the effect --- */
.portrait{
  display:block;
  width:100%;
  aspect-ratio:750/495;
  background:#151517;
  cursor:crosshair;
  touch-action:none;
}
.portrait svg{display:block;width:100%;height:100%}
/* The photo sits at the BOTTOM of the home card, after the words (Kris, 2026-09-20).
   It bleeds to the card's edges through .meta's side padding. */
.meta .portrait{width:auto;margin:26px -24px 0}
.meta .portrait + .foot{margin-top:0;border-top:0}

/* --- caption, echoing the reference card --- */
.meta{padding:22px 24px 26px}
/* The wordmark as it appears on a BUILT page — the same mark as the home page's
   .name, set smaller because the page's own <h1> is the loudest thing on it.
   Kris, 2026-09-21: on /work/ it "should yes, be smaller, but not this small".
   It was .tags: 13px, --dim, .14em tracking — a caption style, inherited from the
   home page's old "Software · Systems" line, which was removed the same day. It
   read as a label rather than a logo. It now tracks .name's weight, tracking and
   ink colour, at roughly half the size. Renamed off .tags because nothing tags
   anything any more; every old theme hides it by this name. */
.wordmark{
  margin:0 0 16px;
  font-size:clamp(20px,4vw,26px);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.05;
  color:var(--ink);
  text-transform:uppercase;
}
.wordmark a{color:inherit;text-decoration:none}
.wordmark a:hover{color:var(--dim)}
/* The logo is MONOSPACE (Kris, 2026-09-21): "use nice monospace font for my logo
   KRIS KHAIRA … ui-monospace,'SF Mono',Menlo,Consolas,monospace" — which is the
   --mono stack the rest of the 2026 theme already runs on, so the wordmark now
   matches the body rather than opposing it. Weight drops 800 → 700 because SF Mono
   and Menlo stop at Bold; 800 only synthesised a smeared fake. Mono advances are
   wide (~0.6em), so the tracking goes slightly NEGATIVE to keep the 11 characters
   inside the 560px phone card. */
.name{
  margin:0;
  font-size:clamp(30px,8vw,50px);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.05;
  text-transform:uppercase;
  font-family:var(--mono);
}
.role{
  margin:12px 0 0;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--dim);
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  align-items:center;
}
.role a,.nav a{color:var(--link);text-decoration:none;border-bottom:1px solid var(--line)}
.role a:hover,.nav a:hover,.nav a[aria-current]{border-color:var(--link)}

/* --- section nav --- */
.nav{
  margin:14px 0 0;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
}

/* GitHub / LinkedIn: same row as the sections, right-hand side */
.nav .out{margin-left:auto;display:flex;flex-wrap:wrap;gap:8px 18px}

.about{
  margin:22px 0 0;
  padding-top:20px;
  border-top:1px solid var(--line);
  font-size:13.5px;
  color:var(--body);
  letter-spacing:.01em;
}
.about p{margin:0 0 12px}
.about p:last-child{margin-bottom:0}
.about ul{margin:0 0 12px;padding-left:18px}
.about ul:last-child{margin-bottom:0}
.about li{margin:0 0 4px}
.about em{color:var(--dim)}
.about a{color:var(--link);text-decoration:underline;text-decoration-color:var(--dim);text-underline-offset:3px}
.about a:hover{text-decoration-color:var(--link)}

/* --- CV --- */
.cv{
  margin:26px 0 0;
  padding-top:20px;
  border-top:1px solid var(--line);
  font-size:13px;
  color:var(--body);
}
.cv h2,.section-title{
  margin:26px 0 12px;
  font-size:13px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--dim);
  font-weight:600;
}
.cv h2:first-child{margin-top:0}
/* /ways-of-working/: the index lists one note per preference, title over its summary */
.modules{list-style:disc;margin:0;padding:0 0 0 18px}
.modules li{margin:0 0 10px;font-size:13.5px}
.modules a{color:var(--link);text-decoration:none;border-bottom:1px solid var(--line)}
.modules a:hover{border-color:var(--link)}
.page .cv{margin:14px 0 0;padding-top:0;border-top:0}   /* on its own page the CV needs no divider */
.cv h3{margin:18px 0 2px;font-size:14px;color:var(--ink)}
.cv .org{margin:0;color:var(--ink)}
.cv .when{margin:0 0 8px;color:var(--dim);font-size:12px}
.cv p{margin:0 0 10px}
.cv ul{margin:0 0 10px;padding-left:18px}
.cv li{margin:0 0 4px}
.cv .sub{margin:4px 0 4px;padding-left:18px}
.cv .facts{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;padding:0;list-style:none}

/* --- inner pages: Writings and Work --- */
.page{
  margin:22px 0 0;
  padding-top:20px;
  border-top:1px solid var(--line);
  font-size:13.5px;
  color:var(--body);
}
.title{
  margin:0 0 6px;
  font-size:clamp(22px,5.5vw,28px);
  font-weight:800;
  line-height:1.15;
  letter-spacing:.01em;
  color:var(--ink);
  font-family:var(--mono);
}
.when{margin:0 0 18px;color:var(--dim);font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.lede{margin:0 0 20px}
/* closing line of an index: the way into (or back out of) Ancient History */
.more{margin:28px 0 0;font-size:13px;color:var(--dim)}
.more a{color:var(--link);text-decoration:underline;text-decoration-color:var(--dim);text-underline-offset:3px}
.when a{color:inherit}
.lede a{color:var(--link);text-decoration:underline;text-decoration-color:var(--dim);text-underline-offset:3px}

.list{list-style:none;margin:0;padding:0}
.list li{display:flex;gap:14px;padding:9px 0;border-top:1px solid var(--line)}
.list li:first-child{border-top:0}
.list time{flex:0 0 5.4em;color:var(--dim);font-size:12px;padding-top:2px}
.list a{color:var(--link);text-decoration:none}
.list a:hover{text-decoration:underline}
.list .y{color:var(--dim);font-size:11px;letter-spacing:.08em}
.year{margin:24px 0 4px;font-size:12px;letter-spacing:.14em;color:var(--dim)}
.year:first-of-type{margin-top:0}
/* ---- thumbnail slots ------------------------------------------------------
   CONTRACT (2026-09-21): a thumbnail file is the artefact at ITS OWN aspect ratio.
   It is never padded, letterboxed or pre-cropped to fit a slot. Each context here
   gives it a fixed-size SLOT (`.pic`) that reserves the space and keeps the column
   or grid even; the image is FITTED inside that slot, so it is shown whole.

   Why this replaced `object-fit:cover` on a forced 2:1 box: the corpus was measured
   on 2026-09-21 and is not one shape — 42 files are 2:1, 8 are 4:3 or square, two
   are panoramas (8:1 and 10:1) and one is a portrait book cover. `cover` was
   silently cutting a third off the 4:3 ones and ~80% off the panoramas, and the
   portrait had to be letterboxed INTO the file to survive it, which is the thing
   Kris objected to. Slot heights are taller than the old fixed height so that the
   non-2:1 shapes get room; a 2:1 thumbnail still renders at exactly its old size.
   The border sits on the <img>, so it hugs the artwork rather than the empty slot.
   Intrinsic width/height come from `thumb_img()` in build.py — no layout shift. */
.pic{display:flex;align-items:center;line-height:0}
img.tn{max-width:100%;max-height:100%;width:auto;height:auto;
       border:1px solid var(--line);border-radius:2px}

/* timeline: CV roles among the projects */
.timeline .job strong{font-weight:700}
.timeline time:empty::before{content:"—"}
.timeline li>span{flex:1 1 auto;min-width:0}
.timeline .pic{flex:0 0 96px;align-self:flex-start;height:64px;justify-content:flex-end}
.timeline .tn{border-color:rgba(128,128,128,.35);border-radius:3px}
.timeline .pic:hover .tn{border-color:currentColor}
/* a role's row: the organisation's mark (or an initial chip) and a line from the CV */
.timeline .x{display:block;margin-top:4px;font-size:12px;line-height:1.5;opacity:.75}
.timeline .mark{display:block;width:40px;height:40px;margin-left:auto}
.timeline .job .pic{flex:0 0 auto;height:auto}
.timeline .chip{display:flex;align-items:center;justify-content:center;border:1px solid rgba(128,128,128,.45);border-radius:3px;font:700 18px/1 system-ui,-apple-system,"Segoe UI",sans-serif}
@media (max-width:480px){.timeline .pic{flex-basis:72px;height:48px}.timeline .mark{width:32px;height:32px}}

.grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:18px 14px}
.grid a{display:block;color:var(--link);text-decoration:none}
.grid a:hover .t{text-decoration:underline}
/* A px height, not `aspect-ratio`: on a flex container the aspect-ratio box does not
   cap `max-height:100%` on the image, so square and 4:3 thumbnails overflowed the band
   and the grid rows went uneven. 80px is what a 2:1 thumbnail fills at this column width. */
.grid .pic{width:100%;height:80px;justify-content:center}
.grid .tn{border-radius:3px}
.grid .pic.none{background:var(--line);border:1px solid var(--line);border-radius:3px;color:var(--dim);font-size:11px;letter-spacing:.14em}
.grid .t{display:block;margin-top:7px;font-size:12.5px;line-height:1.35}
.grid .y{display:block;color:var(--dim);font-size:11px}

.prose{overflow-wrap:anywhere}
.prose p,.prose ul,.prose ol,.prose blockquote{margin:0 0 14px}
.prose ul,.prose ol{padding-left:20px}
.prose li{margin:0 0 4px}
.prose h3,.prose h4{margin:22px 0 8px;font-size:14px;color:var(--ink)}
.prose a{color:var(--link);text-decoration:underline;text-decoration-color:var(--dim);text-underline-offset:3px}
.prose a:hover{text-decoration-color:var(--link)}
.prose img,.shot{max-width:100%;height:auto;border-radius:3px;border:1px solid var(--line)}
.shot{display:block;margin:0 0 18px}   /* never upscaled: most are 510px wide */
.shot.logo{width:120px;border:0;border-radius:0}   /* a mark, not a screenshot */
.prose blockquote{padding:2px 0 2px 14px;border-left:2px solid var(--line);color:var(--dim)}
.prose .caps{font-size:.93em;letter-spacing:.04em}

.pager{display:flex;justify-content:space-between;gap:18px;margin:26px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:12px}
.pager a{color:var(--link);text-decoration:none;max-width:48%}
.pager a:hover{text-decoration:underline}
.pager .next{margin-left:auto;text-align:right}
.pager small{display:block;color:var(--dim);letter-spacing:.14em;text-transform:uppercase;font-size:10.5px}

.foot{margin:26px 0 0;padding-top:16px;border-top:1px solid var(--line);font-size:11px;color:var(--dim);letter-spacing:.08em}
.foot .era{cursor:default;user-select:none;-webkit-user-select:none}

/* the theme list — hidden until one of js/theme.js's doors has been used */
.themes{margin:10px 0 0;font-size:11px;color:var(--dim);letter-spacing:.08em}
.themes[hidden]{display:none}
.themes button{all:unset;cursor:pointer;margin-left:12px;color:var(--dim);border-bottom:1px solid var(--line)}
.themes button:hover,.themes button[aria-pressed="true"]{color:var(--ink);border-color:var(--ink)}
.themes button:focus-visible{outline:1px solid var(--ink);outline-offset:3px}

/* the old wordmark lives in the 2009 header image; here it stays out of sight */
.masthead{display:none}

/* --- Home: the one call to action (Kris, 2026-09-20) ---------------------- */
/* Sits between Highlights and the Ways of Working link. Scoped to .about so it beats the
   plain link styling the home card sets on its prose. */
/* FILLED and content-width, not a full-bleed outline — an outlined block the width
   of the column reads as a callout, not something you press (Kris, 2026-09-20). */
.about .cta{
  display:inline-flex;
  flex-direction:column;
  gap:3px;
  margin:26px 0 30px;
  padding:13px 20px 14px;
  background:var(--link);
  color:var(--bg);
  border:0;
  border-radius:6px;
  text-decoration:none;
  font:700 19px/1.25 var(--mono);
  box-shadow:0 1px 0 rgba(0,0,0,.25);
  transition:transform .08s ease,box-shadow .08s ease,opacity .12s ease;
}
/* The arrow belongs to the LABEL, not to the button: hung off `.cta` it became a
   third flex item and dropped onto its own line (Kris, 2026-09-20). */
.cta-label::after{content:" →"}
.about .cta:hover{opacity:.88;transform:translateY(-1px);box-shadow:0 3px 8px rgba(0,0,0,.28)}
.about .cta:active{transform:translateY(0);box-shadow:0 1px 0 rgba(0,0,0,.25)}
.about .cta:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
/* The label is an anonymous flex item and comes first in the markup, so the sub-line
   already sits under it — no `order` needed, and setting one would flip them. */
.cta-sub{
  font:400 12px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  color:inherit;
  opacity:.72;
}

/* --- /work/ : contents ----------------------------------------------------- */
/* One level: the roles, then Education and Also. Rows filter with the entries they
   point at (js/work-filter.js), so `[hidden]` must come LAST — a `[hidden]` rule loses
   to any later rule of equal specificity, which is how every filtered-out project once
   stayed on screen. */
/* THE CONTENTS LIST IS A TABLE. Kris, 2026-09-22: "make sure the company names are shown
   like as if it's all in a column ... as if the whole TOC is a table", then "YYYY - YYYY
   should be on the far left ... no need to show the month", and finally "i meant the
   TOC... not the main one" — which is this nav, not the .entries list below it. Sketched:

       2022–present  SEEK                Engineering Manager (Hirer Enablement)
       2017–2018     AirAsia Activities  Chief Technology Officer
       2018–2022     Freelance           Consultant

   Three cells per row, and every row ships all three even when one is empty (see
   build.py): a missing grid item pulls the cells after it into the wrong column. The
   widths are FIXED in `ch`, not `max-content` — each row is its own grid, so a
   content-sized column is sized per ROW and nothing lines up, which is the whole ask.
   1ch is this list's 13px monospace, about 7.8px. */
.toc{display:flex;flex-direction:column;margin:0 0 20px;border-left:1px solid var(--line);padding-left:14px;
  --toc-when:13ch;--toc-org:19ch}
.toc a{
  font:400 13px/1.5 var(--mono);
  color:var(--dim);
  text-decoration:none;
  padding:3px 0;
  display:grid;
  grid-template-columns:var(--toc-when) var(--toc-org) minmax(0,1fr);
  gap:0 10px;
  align-items:baseline;
}
.toc a:hover{color:var(--ink)}
/* The years lead the row and must not shout over it: quieter still, and never wrapping,
   so a range cannot break across two lines and push the row out of the grid. */
.toc a .y{opacity:.65;white-space:nowrap}
.toc a[hidden]{display:none}
/* Two levels (Kris, 2026-09-22): the organisation row, then its roles. The roles need no
   indent — an empty organisation cell already places them one column in. */
.toc a.t-org{color:var(--ink);margin-top:6px}
.toc a.t-org:first-child{margin-top:0}
.toc a.t-org .t-orgname{color:var(--dim)}
.toc a.t-role .t-title{color:var(--dim)}
.toc a.t-role:hover .t-title{color:var(--ink)}
/* Education and Also carry no cells of their own, so they span the row rather than
   leaving two empty columns in front of a two-word link. */
.toc a.t-static{display:block;margin-top:6px}
@media (max-width:640px){
  .toc{--toc-when:13ch;--toc-org:0}
  .toc a{grid-template-columns:var(--toc-when) minmax(0,1fr);gap:0 10px}
  .toc a .t-orgname{grid-column:2}
  .toc a .t-title{grid-column:2}
}

/* --- /work/ : filters ------------------------------------------------------ */
/* `.chip` is already the timeline's initial badge and `.role` the home page's job
   line, so these are `.f-chip` and `.entry.w-role`. AGENTS.md: grep site.css
   before naming a class. */
.filters{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 10px}
.f-chip{
  font:500 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  padding:8px 11px;
  border:1px solid var(--line);
  border-radius:3px;
  background:none;
  color:var(--dim);
  cursor:pointer;
}
.f-chip:hover{border-color:var(--dim);color:var(--ink)}
.f-chip.on{border-color:var(--ink);color:var(--ink)}
.f-chip .n{opacity:.55;margin-left:4px}
/* The Order row: same chips, a small label in front, tucked under the filter row. */
.sorts{margin-top:0}
.f-label{font:500 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--dim);padding:8px 0;margin-right:2px}
.shown{margin:0 0 18px;font-size:12px;color:var(--dim);min-height:1em}

/* --- /work/ : entries ------------------------------------------------------ */
.entries{display:flex;flex-direction:column}
/* An organisation and the roles done there, nested. The group carries the top rule;
   roles inside it separate with a lighter dashed one. */
.org-group{border-top:1px solid var(--line);padding:22px 0 6px}
.org-group[hidden]{display:none}
/* ONE FLEX LINE. The TABLE — fixed columns for the date, organisation and role — is the
   CONTENTS NAV's, up in the .toc rules. It was built here first and taken out again:
   "for the non-TOC entries in Work, i don't need this gap between company name and role.
   it was meant only for the TOC" (Kris, 2026-09-22). A fixed column on a heading that
   holds one organisation and one role buys no alignment and costs a gap wide enough to
   read as a bug. */
/* The heading is the MARK plus two rows: the organisation, then the role with its dates.
   Kris, 2026-09-22 — "fix this layout. looks messy" — of the one-line version, where the
   organisation and role ran together and wrapped mid-phrase, the role link's underline
   broke across that wrap, and the dates were squeezed into a six-character column.
   `align-items:start` keeps the mark on the first row rather than floating it to the
   middle of a two-line heading. This is a two-column grid for the MARK only; the
   organisation and role are stacked, not columned, so the gap Kris objected to on the
   one-line version does not come back. */
.org-title{
  margin:0 0 2px;
  font:700 20px/1.3 var(--mono);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:0 12px;
  align-items:start;
}
.org-title .org-head{min-width:0}
/* The organisation names the row; the ROLE is what a reader is scanning for, so the
   organisation is set quieter and a size down and the role keeps the heading size. */
.org-title .org-name{display:block;font:500 15px/1.4 var(--mono);color:var(--dim)}
.org-title .org-role{display:block}
.org-title .e-meta{font-weight:400;margin-left:2px}
.org-title a.rlink{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
.org-title a.rlink:hover{border-color:var(--ink)}
.org-group.solo .entry{padding-left:38px;padding-top:6px}
@media (max-width:600px){.org-group.solo .entry{padding-left:0}}
@media (max-width:600px){.org-group .entry{padding-left:0}}
.entry{padding:18px 0;border-top:1px solid var(--line)}
.entry[hidden]{display:none}
.e-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px}
.e-title{margin:0;font:700 17px/1.35 var(--mono)}
.e-title a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
.e-title a:hover{border-color:var(--ink)}
.e-meta{margin:0;font:400 13px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--dim)}
.e-meta strong{color:var(--ink);font-weight:500}
.e-tags{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0}
.tag{
  font:500 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-transform:uppercase;
  letter-spacing:.06em;
  padding:4px 6px;
  border:1px solid var(--line);
  border-radius:2px;
  color:var(--dim);
}
/* A role can carry sub-teams as <h4> — Hirer Enablement holds Hirer Shared Services
   and Hirer Tech Uplift (Kris, 2026-09-20). Styled on both /work/ and /cv/. */
.e-body h4,.cv h4{
  margin:14px 0 6px;
  font:700 16.5px/1.35 var(--mono);
  letter-spacing:0;
}
/* The organisation's mark on a role. Simple Icons only, monochrome via
   currentColor — an organisation with no mark there gets its initial chip and is
   never traced. ⚠️ Grab's Simple Icon is its WORDMARK, not the G app icon, so it
   reads wider than the rest (flagged to Kris 2026-09-20). */
/* Mark on the left, title and org/date stacked to its right (Kris, 2026-09-20). */
.e-top{display:grid;grid-template-columns:auto 1fr;gap:0 12px;align-items:start}
.e-top .e-head{grid-column:2}
.entry .mark,.org-title .mark{width:28px;height:28px;margin:2px 0 0;display:block;opacity:.85;flex:none}
.entry .mark.chip,.org-title .mark.chip{
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line);border-radius:3px;
  font:700 13px/1 var(--mono);color:var(--dim);
}
/* .art — supplied ARTWORK, not a Simple Icon: a raster file in its own colours
   (Kris, 2026-09-21, handing over the SEEK mark). It gets full opacity, because
   the .85 that softens a monochrome glyph only muddies a coloured one, and the
   3px radius of the chip, so a square app-icon sits on the same grid as the rest.
   object-fit keeps it honest if a future file is not square. */
.mark.art{opacity:1;border-radius:3px;object-fit:contain}
.timeline .mark.art{border-radius:4px}

/* The role TITLE is its own permalink — no separate # glyph (Kris, 2026-09-20).
   It must not look like an outbound link, so it stays plain until hover. */
.rlink{color:inherit;text-decoration:none;border:0}
.rlink:hover{text-decoration:underline;text-decoration-color:var(--dim);text-underline-offset:4px}
.rlink:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.entry:target{background:rgba(128,128,128,.07);border-radius:4px}

/* Projects done during a role, folded into it. */
.e-also{
  margin:14px 0 6px;font:500 11px/1 var(--mono);
  text-transform:uppercase;letter-spacing:.12em;color:var(--dim);
}
.e-projects{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.e-projects li{display:flex;align-items:center;gap:10px}
.e-projects .pic{flex:0 0 64px;height:44px;justify-content:center}
.e-projects a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
.e-projects a:hover{border-color:var(--ink)}
.e-projects .y{color:var(--dim);font-size:11px}
.e-body{margin:10px 0 0;font-size:14.5px;line-height:1.55}
.e-body p{margin:0 0 9px}
.e-body ul{margin:0 0 9px;padding-left:18px}
.e-body li{margin:0 0 5px}
/* A project row keeps its thumbnail at the right edge so the words stay aligned. */
.entry.w-project{display:grid;grid-template-columns:1fr auto;gap:10px 14px;align-items:start}
.entry.w-project .e-head,.entry.w-project .e-tags{grid-column:1}
.entry.w-project .pic{grid-column:2;grid-row:1/3;width:96px;height:64px;justify-content:flex-end;align-items:flex-start}

/* ⚠️ MUST come after `.entry.w-project{display:grid}`. Both selectors score 0-2-0,
   so the later one wins — with the hide rule above, every filtered-out PROJECT
   stayed on screen while the chip and the count said 2. Roles hid correctly, which
   is what made it look like a tagging problem rather than a CSS one.
   Live-checked 2026-09-20 with ?type=print. */
.entry[hidden]{display:none}

/* --- /work/: Download PDF and tailoring to a job (Kris, 2026-11-05) ---------------------
   js/work-tailor.js reveals the two buttons, the form and the banner; with JS off none of
   them show. A tailored view hides with .t-off — never [hidden], which js/work-filter.js
   owns — and !important because the grid rule on a project row would otherwise win, the
   same 0-2-0 tie the rule above records. */
.t-off{display:none !important}
.print-only{display:none}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.actions:not(:has(button:not([hidden]))){display:none}
.tailor{margin:0 0 22px;padding:14px 16px;border:1px solid var(--line);border-radius:6px}
.tailor[hidden],.tailored[hidden]{display:none}
.t-hint{margin:0 0 12px}
.t-form label{display:block;margin:0 0 10px;font-size:12px;letter-spacing:.06em;color:var(--dim)}
.t-form input,.t-form textarea,.t-form select{
  display:block;width:100%;margin-top:4px;padding:7px 9px;
  /* A faint wash of the theme's own --ink, never var(--bg). No period theme maps --bg, so it
     fell through to :root's near-black and 2009 and 2005 drew dark ink on black fields; plain
     transparent then made the fields vanish into the box on the light half (Kris, 2026-11-10:
     "kinda hard to tell the diff between the background of the form and the field itself").
     --ink is mapped in every theme, so the wash darkens a light ground and lightens a dark one.
     The rgba line is the fallback for a browser without color-mix(). */
  font:13px/1.45 var(--mono);color:var(--ink);
  background:rgba(128,128,128,.08);background:color-mix(in srgb,var(--ink) 6%,transparent);
  border:1px solid var(--line);border-color:color-mix(in srgb,var(--ink) 28%,transparent);border-radius:4px;
}
.t-form input[type=file]{padding:5px}
.t-form input:focus,.t-form textarea:focus,.t-form select:focus{outline:2px solid var(--link);outline-offset:1px}
/* /contact/: the trap field is off-screen, not display:none — some bots skip hidden inputs. */
.hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.c-off[hidden]{display:none}
.c-note{margin:12px 0 0;font-size:12px;color:var(--dim)}
.c-sent{margin:0}
.c-sent:focus{outline:none}
.t-captcha{margin:4px 0 10px;min-height:0}
.t-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0}
.t-row button[disabled]{opacity:.5;cursor:progress}
.t-status{font-size:12px;color:var(--dim)}
.t-status.bad{color:var(--ink)}
.tailored{margin:0 0 22px;padding:14px 16px;border:1px solid var(--link);border-radius:6px}
.t-for{margin:0;color:var(--ink);font-size:15px}
.t-note{margin:4px 0 8px;font-size:12px;color:var(--dim)}
.t-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 4px;font-size:12px}
.t-controls a{color:var(--link)}
.t-highlights{margin:0;padding-left:18px;font-size:14px;line-height:1.55}
.t-highlights li{margin:0 0 6px}
.t-highlights .t-src{font-size:11px;color:var(--dim);white-space:nowrap}

/* --- print: the PDF ----------------------------------------------------------------------
   "Download PDF" prints the page as it stands, so these rules are the PDF's design: black on
   white whatever the theme or the system's dark mode, the reading column at full width, and
   nothing that only works on a screen — nav, filters, contents, buttons, forms, thumbnails,
   reader notes. Colours go !important because a theme stylesheet loads after this one and
   sets its own; on paper there is one design. Links stay links: the PDF keeps them. */
@media print{
  @page{margin:14mm 15mm}
  :root,html[data-theme]{
    --bg:#fff;--card:#fff;--ink:#000;--body:#1a1a1a;--link:#000;--dim:#555;--line:#ccc;
    color-scheme:light;
  }
  html,body{background:#fff !important}
  body{display:block;padding:0;min-height:0}
  body *{color:#000 !important;background:transparent !important;box-shadow:none !important;text-shadow:none !important}
  .t-note,.e-meta,.y,.org-name,.print-contact{color:#555 !important}
  .card{width:auto !important;border:0;border-radius:0;overflow:visible}
  .meta{padding:0}
  .page{border-top:0;margin-top:6px;padding-top:0}
  .print-only{display:block}
  .print-contact{margin:0 0 14px;font-size:11px}
  .nav,.masthead,.filters,.toc,.shown,.actions,.tailor,.t-controls,.more,.foot,.e-tags,
  .pic,.e-projects .pic,.ann-add,.ann-pinmode,.ann-panel,.ann-pin{display:none !important}
  a{text-decoration:none !important}
  .tailored{border:1px solid #999;padding:10px 12px}
  .org-group{border-top:1px solid #ccc;padding-top:12px}
  h2,h3,h4,.org-title,.e-head{break-after:avoid;page-break-after:avoid}
  li,.e-head,.t-highlights li{break-inside:avoid;page-break-inside:avoid}
  .entry.w-project{display:block}
  /* .entries is a flex column on screen; printed, Chrome kept each organisation whole and
     pushed it to a fresh page, leaving half of every page blank. Block flow fragments. */
  .entries{display:block}
  /* Web-only words: the page's own name and the "filter by the kind of work" lede. */
  .no-print{display:none !important}
}
