/* ============================================================
   Home page (index.html only) — design board 43
   Loaded after style.css and built on its tokens (--bg, --ink,
   --sec, --gold, --mono, --gx). Order of the page:
     heading   the K2 map in layers, the name, the elevation ruler
     timeline  every entry of the log on one rail
     columns   work log, skills table, About | the index (sticky)
     contact   the footer
     pop-ups   one <dialog>, one card per log entry
   One filter for the whole page: js/home.js writes data-sel on
   .home ("n" = everything, 0–4 = one discipline) and the rules
   below light that band on the map and dim everything else.
   Breakpoints: 969px (one column, the index becomes a jump bar),
   1131px (table heads turn upright, the year sits above its
   rows), 520px (a log row stacks). The heading has none: its
   narrow-screen changes are clamp() steps on 100vw.
   The numbers marked "map" come from the terrain data and are
   checked by PortfolioV2/.tooling/site-gen-home.py --check.
   ============================================================ */

/* ---------- page ---------- */
.home{
  --line:rgba(16,18,20,.16);   /* this page's hairline (style.css --hair is .10) */
  --rule:rgba(16,18,20,.35);
  /* discipline tints, lowest ground first: Mechanical, Hardware, Research, Software, AI / ML systems */
  --t0:#EDF2F2;--t1:#D3E5EA;--t2:#9CCADB;--t3:#3F86AE;--t4:#0E2A47;
  /* map: --mw is the K2 map's width, --ml / --mt its corner. The summit lands at
     54.1vw across and 187px down (lower on a narrow screen, where the name stacks above it). */
  --mw:max(100.3vw,1100px);
  --ml:calc(54.1vw - .5414*var(--mw));
  --mt:calc(clamp(187px,710px - 40.86vw,560px) - .2406*var(--mw));
  font-variant-numeric:normal;   /* tabular figures widen the commas and colons of running text */
  -webkit-font-smoothing:auto;   /* the board's text weight on a Mac (style.css thins it with "antialiased") */
}
.t0{background:var(--t0)}
.t1{background:var(--t1)}
.t2{background:var(--t2)}
.t3{background:var(--t3)}
.t4{background:var(--t4)}

/* the filter: everything that belongs to a discipline carries data-d */
[data-d]{transition:opacity .22s ease}
[data-sel="0"] [data-d]:not([data-d="0"]),
[data-sel="1"] [data-d]:not([data-d="1"]),
[data-sel="2"] [data-d]:not([data-d="2"]),
[data-sel="3"] [data-d]:not([data-d="3"]),
[data-sel="4"] [data-d]:not([data-d="4"]){opacity:.24}

/* gold underline that draws under a row's title */
.lt{
  background-image:linear-gradient(var(--gold),var(--gold));
  background-repeat:no-repeat;background-size:0 1px;background-position:0 100%;
  padding-bottom:2px;
  transition:background-size .28s var(--ease);
}
.lr:hover .lt,.lr:focus-visible .lt{background-size:100% 1px}

.sec{scroll-margin-top:24px}
.main > .sec + .sec{margin-top:88px}

/* a section's head: its number in the index, its name, one mono note */
.sec-head{
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 16px;
  padding-bottom:12px;border-bottom:1px solid var(--ink);
}
.sec-title,.rail-head{
  font-family:var(--mono);font-size:11px;font-weight:500;line-height:16px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--ink);
}
.sec-num{margin-right:14px;color:var(--sec)}
.sec-note{font-family:var(--mono);font-size:11px;line-height:16px;color:var(--sec)}

/* outlined button (resume PDF, pop-up links) */
.btn{
  display:inline-flex;align-items:center;min-height:44px;padding:0 18px;
  border:1px solid var(--ink);border-radius:2px;
  font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;
}
.btn-ink{background:var(--ink);color:var(--bg)}
.btn-paper{background:var(--bg);color:var(--ink)}

/* label / value rows (About, pop-ups) */
.facts{margin-top:22px;border-bottom:1px solid var(--line)}
.facts > div{display:flex;flex-wrap:wrap;gap:2px 16px;padding:10px 0;border-top:1px solid var(--line)}
.facts dt{
  flex:0 0 104px;
  font-family:var(--mono);font-size:11px;line-height:21px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--sec);
}
.facts dd{flex:1 1 200px;min-width:0;font-size:14px;line-height:21px}

/* ============================================================
   Heading
   ============================================================ */
/* clip, not hidden: the map's sliding layers reach far past the right edge, and a box that is
   only "hidden" can still be scrolled sideways (a scrollIntoView, a dragged selection) and stay there */
.top{position:relative;overflow:hidden;overflow:clip;min-height:720px;display:flex;flex-direction:column}

/* ---------- the map: a box of the map's own shape; everything in it is placed in map percent ---------- */
.k2{
  position:absolute;left:var(--ml);top:var(--mt);
  width:var(--mw);aspect-ratio:1197/897;   /* map */
  pointer-events:none;
}
.k2-layer{position:absolute;left:0;top:0;width:100%;height:100%;max-width:none}

/* the five tint bands lie at ghost strength over the line map ("fog");
   a pressed discipline shows its band in full and keeps the others faint */
.k2-band{opacity:.05;transition:opacity .22s ease}
.home:not([data-sel="n"]) .k2-band{opacity:.12}
[data-sel="0"] .k2-band[data-band="0"],
[data-sel="1"] .k2-band[data-band="1"],
[data-sel="2"] .k2-band[data-band="2"],
[data-sel="3"] .k2-band[data-band="3"],
[data-sel="4"] .k2-band[data-band="4"]{opacity:1}

/* two soft openings bring the full tints back round the pointer. An opening is a square
   with a soft alpha mask; js/home.js slides .k2-open with a transform and slides the
   full-tint map inside it (.k2-tint) the opposite way, so the map stays put and only the
   opening moves. A is tight and keeps up; B is wider, fainter and trails.
   map: 56% / 36% is where they rest, on the K2 massif. */
.k2-open,.k2-probe{
  position:absolute;left:0;top:0;width:100%;height:100%;
  will-change:transform;transform:translate3d(56%,36%,0);
}
.k2-mask{
  --box:min(calc(var(--mw)*var(--side)),var(--cap));   /* a share of the map's width, and no more than --cap */
  position:absolute;
  left:calc(var(--box)/-2);top:calc(var(--box)/-2);
  width:var(--box);height:var(--box);
  overflow:hidden;overflow:clip;
  transition:opacity .5s ease;
  -webkit-mask-size:100% 100%;mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
}
.k2-open-a .k2-mask{
  --side:.1441;--cap:185px;   /* 185px from a 1284px map up (a 1280px window); about 120px of it shows colour */
  -webkit-mask-image:url(../assets/topo/k2/fog-a.png);mask-image:url(../assets/topo/k2/fog-a.png);
}
.k2-open-b .k2-mask{
  --side:.2161;--cap:278px;
  -webkit-mask-image:url(../assets/topo/k2/fog-b.png);mask-image:url(../assets/topo/k2/fog-b.png);
}
.home:not([data-sel="n"]) .k2-mask{opacity:0}
.k2-pin{position:absolute;left:50%;top:50%;width:0;height:0}
.k2-tint{
  position:absolute;left:0;top:0;width:var(--mw);aspect-ratio:1197/897;
  will-change:transform;transform:translate3d(-56%,-36%,0);
}

/* under 970px the heading ends in plain page, so the map's lower edge fades out */
.k2-fade{
  position:absolute;left:0;right:0;bottom:0;
  height:clamp(0px,calc((970px - 100vw)*100),160px);
  background:linear-gradient(180deg,rgba(246,247,245,0),var(--bg));
}

/* the probed point: a ring and a dot */
.k2-ring{
  position:absolute;left:-8px;top:-8px;width:16px;height:16px;
  border:1.5px solid var(--ink);border-radius:50%;
  box-shadow:0 0 0 1px rgba(255,255,255,.8);
}
.k2-dot{position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;background:var(--ink)}

/* the summit */
.k2-summit{position:absolute;left:54.135%;top:32.107%;width:0;height:0}   /* map */
.k2-peak{
  position:absolute;left:-3px;top:-3px;width:6px;height:6px;
  border-radius:50%;background:var(--gold);border:1px solid var(--bg);
}
.k2-tag{
  position:absolute;left:10px;top:-10px;padding:2px 6px;white-space:nowrap;background:var(--bg);
  font-family:var(--mono);font-size:11px;line-height:16px;letter-spacing:.08em;color:var(--sec);
}

/* three washes over the map, in the order written: the fade down to the page map's
   strength over the heading's last 220px; page colour behind the nav and, under 970px,
   behind the stacked name; page colour under the ruler column (970px and up) */
.top-wash{
  position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;
  background:
    linear-gradient(0deg,rgba(246,247,245,.6) 0,rgba(246,247,245,0) 220px),
    linear-gradient(180deg,
      #F6F7F5 0,
      #F6F7F5 max(calc(430px - 30vw),clamp(0px,calc((970px - 100vw)*100),300px)),
      rgba(246,247,245,0) calc(max(calc(430px - 30vw),clamp(0px,calc((970px - 100vw)*100),300px)) + 110px)),
    linear-gradient(270deg,
      #F6F7F5 0,
      rgba(246,247,245,.94) clamp(0px,calc((100vw - 970px)*100),15vw),
      rgba(246,247,245,0) clamp(0px,calc((100vw - 970px)*100),34vw));
}

/* ---------- nav ---------- */
.top-nav{
  position:relative;display:flex;gap:0 32px;overflow-x:auto;
  /* 10px of room under the links, taken back by the margin: a scrolling row clips, and the focus ring needs it */
  padding:16px var(--gx) 10px;margin-bottom:-10px;
  /* under 560px the row scrolls sideways: a soft right edge says there is more,
     and no scrollbar is drawn */
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - clamp(0px,calc((560px - 100vw)*100),40px)),rgba(0,0,0,0));
  mask-image:linear-gradient(90deg,#000 calc(100% - clamp(0px,calc((560px - 100vw)*100),40px)),rgba(0,0,0,0));
  overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;
}
.top-nav::-webkit-scrollbar{display:none}
.top-nav a{
  flex:0 0 auto;display:inline-flex;align-items:center;min-height:44px;
  font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;
}
.top-nav a:first-child{margin-left:auto}

/* ---------- the name ---------- */
.top-row{
  flex:1 1 auto;padding:20px var(--gx) 24px;
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px 32px;
}
/* from 970px the ruler always sits beside the name. A classic scrollbar makes the row up to 15px
   narrower than 100vw; left to wrap, the ruler would drop while the clamp() steps still say "wide" */
@media (min-width:970px){.top-row{flex-wrap:nowrap}}
.top-name{position:relative;flex:1 1 520px;min-width:0;align-self:flex-end}
.top-name h1{font-size:clamp(40px,8.5vw,104px);font-weight:600;line-height:.98;letter-spacing:-.025em}
.name-rule{width:64px;height:1px;margin-top:24px;background:var(--gold)}
.name-sub{margin-top:16px;font-size:15px;color:var(--ink)}
.proofs{display:flex;flex-wrap:wrap;gap:0 28px;margin-top:10px}
.proofs a{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:14.5px;font-weight:600}
.arrow{font-family:var(--mono);font-weight:400}

/* ---------- the elevation ruler: the legend drawn to real elevation, its labels the filter ---------- */
.elev{
  position:relative;flex:0 1 300px;min-width:0;align-self:flex-start;
  margin-top:clamp(0px,calc((970px - 100vw)*100),280px);   /* stacked under 970px: clear of the summit */
  padding:10px 0 12px 12px;
}
.tag{padding:2px 6px;background:var(--bg)}
.elev-peak,.elev-note{
  font-family:var(--mono);font-size:11px;line-height:16px;color:var(--sec);text-align:right;
}
.elev-peak{
  margin:0 64px 8px 0;
  max-height:clamp(0px,calc((100vw - 970px)*100),16px);overflow:hidden;   /* stacked, it would repeat the summit label */
}
.elev-note{margin:10px 64px 0 0}
.elev-scale{position:relative;height:440px}
.elev-band{
  position:absolute;left:0;right:96px;
  top:calc(var(--t) + 1px);height:calc(var(--h) - 2px);   /* --t, --h: the band's share of the ruler, set per button */
  display:flex;justify-content:flex-end;align-items:center;
  padding:0 8px 0 0;background:none;color:inherit;
  border:0;border-right:2px solid rgba(16,18,20,0);
  font-family:inherit;font-size:13.5px;font-weight:600;line-height:1.2;text-align:right;
  cursor:pointer;
}
.elev-band > span{
  display:inline-flex;align-items:center;gap:10px;padding:6px 10px;
  background:var(--bg);color:var(--ink);
}
.elev-band[aria-pressed="true"] > span{background:var(--ink);color:var(--bg)}
/* an ink tick on the band under the probe (gold when that band is the pressed one) */
.elev-band.under{border-right-color:var(--ink)}
.elev-band.under[aria-pressed="true"]{border-right-color:var(--gold)}
.elev-n{font-family:var(--mono);font-size:12px;font-weight:400}
/* a tick for every 150m contour, longer on every fifth */
.elev-ticks span{position:absolute;right:76px;width:6px;height:0;border-top:1px solid var(--ink)}
.elev-ticks .long{width:12px}
.elev-bar{
  position:absolute;right:64px;top:0;bottom:0;width:12px;
  border:1px solid var(--ink);display:flex;flex-direction:column;
}
.elev-bar span{flex:0 0 auto}
/* the gold tick and its number ride one box that js/home.js slides (0 = summit, 100% = foot) */
.elev-now{
  position:absolute;left:0;right:0;top:0;height:100%;pointer-events:none;
  will-change:transform;transform:translate3d(0,25.360%,0);   /* map: the elevation at the resting point */
}
.elev-now-line{
  position:absolute;right:56px;top:0;width:36px;height:0;
  border-top:1px solid var(--gold);box-shadow:0 1px 0 var(--gold);
}
.elev-now-num{
  position:absolute;right:0;top:0;width:52px;margin-top:-9px;
  font-family:var(--mono);font-size:11px;line-height:18px;color:var(--ink);
  text-align:right;white-space:nowrap;
}
.elev-foot{display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin-top:10px}
.readout{
  padding:2px 8px;background:var(--bg);
  font-family:var(--mono);font-size:11px;line-height:17px;letter-spacing:.06em;
  color:var(--sec);text-align:right;
}
.scale{padding:2px 8px;background:var(--bg)}
.scale-in{
  display:flex;align-items:center;gap:8px;
  font-family:var(--mono);font-size:11px;line-height:16px;color:var(--ink);
}
.scale-bar{display:flex;width:calc(.0809*var(--mw));height:8px;border:1px solid var(--ink)}   /* map: a true 2 km */
.scale-bar span{flex:1 1 0;background:var(--ink)}
.scale-bar span:nth-child(even){background:var(--bg)}

/* ============================================================
   Below the heading
   ============================================================ */
.below{position:relative;z-index:0}

/* the K2 line map again, faint, behind everything: the tile and its mirror repeat,
   lined up with the heading's own map so the lines run on across its lower edge
   (the heading is 720px tall from 970px up) */
.pgm{
  position:absolute;left:0;top:0;right:0;bottom:0;z-index:-1;pointer-events:none;
  opacity:.4;
  background-image:url(../assets/topo/k2/k2-lines-2x.svg);background-repeat:repeat-y;
  background-size:var(--mw) auto;background-position:var(--ml) calc(var(--mt) - 720px);
  /* under 970px the heading ends in plain page, so the map fades back in */
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,0),#000 clamp(0px,calc((970px - 100vw)*100),160px));
  mask-image:linear-gradient(180deg,rgba(0,0,0,0),#000 clamp(0px,calc((970px - 100vw)*100),160px));
}

/* The pointer's glow below the heading: a soft light-blue spot under the pointer, down to the footer. Two small
   boxes that js/home.js slides under the pointer, each showing the map's five bands through the heading's own
   soft masks. Their picture is the bands in a ramp of light blues, without lines, over its mirror, as a JPEG
   (PortfolioV2/.tooling/site-k2-fill.mjs). It lies over the page map's lines and under everything else: the
   blues are lighter than those lines, so inside the glow the lines pale a little, and the darkest thing under
   the small grey text is never darker with the glow than without it. A picture, because the boxes move their background in
   every frame, and a picture is only copied where a vector file would be redrawn. It lies exactly on the map
   (js/home.js moves it back by as much as the box moved). The pair is faded as one, by js/home.js; 0 while no
   pointer is there. (In the heading the spot is the map's own tints, as before.) */
.pgo{
  position:absolute;left:0;top:0;right:0;bottom:0;z-index:-1;pointer-events:none;
  overflow:hidden;overflow:clip;opacity:0;
}
.pg-open{
  --box:min(calc(var(--mw)*var(--side)),var(--cap));
  position:absolute;left:0;top:0;width:var(--box);height:var(--box);
  margin:calc(var(--box)/-2) 0 0 calc(var(--box)/-2);   /* its centre is the point it is moved to */
  will-change:transform;
  background-image:url(../assets/topo/k2/k2-fill-page-2x.jpg);background-repeat:repeat-y;background-size:var(--mw) auto;
  -webkit-mask-size:100% 100%;mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
}
.pg-open-a{--side:.1441;--cap:185px;-webkit-mask-image:url(../assets/topo/k2/fog-a.png);mask-image:url(../assets/topo/k2/fog-a.png)}
.pg-open-b{--side:.2161;--cap:278px;-webkit-mask-image:url(../assets/topo/k2/fog-b.png);mask-image:url(../assets/topo/k2/fog-b.png)}

/* ---------- timeline strip ---------- */
.tl{
  padding:28px var(--gx) 26px;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
}
.tl .sec-head{padding-bottom:0;border-bottom:0}
.tl-scroll{overflow-x:auto}
/* --n = number of entries: 70px each, 76px for "today" */
.tl-track{display:flex;align-items:stretch;min-width:calc(var(--n)*70px + 76px);padding:12px 0 2px}
.tl-list{display:contents;list-style:none}
.tl-list > li{flex:1 1 0;min-width:70px;padding-top:14px}
.tl-line{border-top:1px solid var(--ink)}
.tl-sq{display:block;width:10px;height:10px;margin-top:-6px;border:1px solid var(--ink)}   /* a discipline's tint */
.tl-tk{display:block;width:0;height:9px;margin:-5px 0 0 4px;border-left:1px solid var(--ink)}   /* no discipline */
.tl-text{padding:8px 8px 0 0}
.tl-when{font-family:var(--mono);font-size:11px;line-height:15px;color:var(--sec)}
.tl-text .tl-when:first-child{min-height:15px}   /* an entry with no month keeps its line */
.tl-what{margin-top:2px;font-size:11.5px;font-weight:600;line-height:15px;overflow-wrap:anywhere}
.tl-today{flex:0 0 76px;padding-top:3px}
.tl-today-mark{display:block;width:0;height:22px;border-left:2px solid var(--gold)}
.tl-today-text{padding-top:2px}
.tl-today-word{font-family:var(--mono);font-size:11px;font-weight:500;line-height:15px;color:var(--ink)}

/* ---------- two columns: content left, index right; the index keeps 300px and stays put ---------- */
.cols{
  display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:flex-start;
  gap:56px;padding:88px var(--gx) 96px;
}
.main{flex:1 1 0;min-width:0}
.rail{flex:0 0 300px;position:sticky;top:24px;padding-left:24px;border-left:1px solid var(--line)}
.rail-head{padding:0 0 12px 12px;border-bottom:1px solid var(--ink)}
.ixs{display:flex;flex-wrap:wrap}
.ix{
  flex:1 1 100%;min-width:0;display:flex;gap:10px;min-height:44px;padding:9px 12px;
  border-bottom:1px solid var(--line);
  transition:background-color .2s ease,color .2s ease;
}
.ix-num{flex:0 0 20px;font-family:var(--mono);font-size:11px;font-weight:500;line-height:20px}
.ix-text{display:block;min-width:0}
.ixn{display:block;font-size:14.5px;font-weight:600;line-height:20px}
.ixt{display:block;font:400 11px/17px var(--mono)}
.ixd{color:var(--sec)}
/* the section in view */
.ix[aria-current="location"]{background:var(--ink);color:var(--bg)}
.ix[aria-current="location"] .ixd{color:var(--bg)}
.rail-else{margin-top:28px}
.els{display:flex;flex-wrap:wrap}
.el{
  flex:1 1 100%;min-width:0;display:flex;justify-content:space-between;align-items:center;gap:12px;
  min-height:44px;padding:0 12px;border-bottom:1px solid var(--line);
}
.el-name{font-size:14.5px;font-weight:600;white-space:nowrap}
.el-note{font-family:var(--mono);font-size:11px;color:var(--sec);white-space:nowrap}
.rail-note{margin:16px 12px 0;font-family:var(--mono);font-size:11px;line-height:17px;color:var(--sec)}

/* ---------- work log ---------- */
.chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:16px 0 18px}
.chip{
  display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;
  font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:2px;
  cursor:pointer;
  transition:color .2s ease,background-color .2s ease,border-color .2s ease;
}
.chip[aria-pressed="true"]{color:var(--bg);background:var(--ink);border-color:var(--ink)}
.chip-sw{flex:0 0 14px;height:10px;border:1px solid var(--rule)}
.year{display:flex;flex-wrap:wrap;gap:0 24px;border-top:1px solid var(--rule)}
.yh{flex:0 0 76px;padding-top:12px;font-size:22px;font-weight:600;letter-spacing:-.02em;line-height:1.2}
.log{flex:1 1 380px;min-width:0;list-style:none}
.log > li{border-top:1px solid var(--line)}
.log > li:first-child{border-top:0}
.log-end{border-top:1px solid var(--rule)}
/* one entry: date, tint dot, title + one line, kind. A link when it has a page or a repo;
   js/home.js makes every entry that has a card a button that opens its pop-up. */
.entry{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;padding:16px 0}
button.entry{width:100%;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.e-date{flex:0 0 62px;font-family:var(--mono);font-size:11px;line-height:21px;color:var(--sec)}
.e-dot{flex:0 0 9px;height:9px;border-radius:50%;border:1px solid var(--rule)}
.e-gap{flex:0 0 9px}
.rb{display:block;flex:1 1 200px;min-width:0}
.e-title{display:block;font-size:16px;font-weight:600;letter-spacing:-.01em;line-height:1.3;text-wrap:balance}
.e-meta{display:block;margin-top:4px;max-width:60ch;font-size:14px;line-height:1.5;color:var(--sec);text-wrap:pretty}
.e-kind{
  flex:0 0 auto;margin-left:auto;
  font-family:var(--mono);font-size:11px;line-height:21px;letter-spacing:.04em;
  color:var(--sec);white-space:nowrap;
}
.e-go{margin-left:8px;color:var(--ink)}

/* ---------- skills: each skill against the work that proves it ---------- */
.sk-intro{
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;
  gap:12px 24px;padding:18px 0 20px;
}
.sk-intro p{max-width:46ch;font-size:14px;line-height:1.5;color:var(--sec);text-wrap:pretty}
.sk{width:100%;max-width:900px;table-layout:fixed;border-collapse:collapse;font-size:13px;line-height:1.4}
.sk th,.sk td{
  box-sizing:content-box;   /* the widths below are content widths, as designed */
  padding:9px 6px;vertical-align:middle;text-align:center;
  border-bottom:1px solid var(--hair);
}
.sk thead th:first-child{width:200px}
.sk thead th{
  vertical-align:bottom;border-bottom:1px solid var(--ink);
  font:500 11px/1.4 var(--mono);color:var(--sec);white-space:nowrap;
}
.sk tbody th{font-size:13.5px;font-weight:600}
.sk th:first-child{padding-left:0;text-align:left}
.sk .skh{display:block}
.sk .sw{display:block;width:10px;height:10px;margin:0 auto 6px;border:1px solid var(--rule)}
.sk tbody tr:hover{background:rgba(16,18,20,.035)}
.sk-note{margin-top:12px;font-family:var(--mono);font-size:11px;line-height:17px;color:var(--sec)}

/* ---------- about ---------- */
.ab{display:flex;flex-wrap:wrap;align-items:flex-start;gap:28px 40px;padding-top:24px}
.ab-photo{
  flex:0 1 216px;min-width:0;width:216px;max-width:100%;height:auto;
  border:1px solid var(--line);filter:saturate(.9) contrast(1.02);
}
.ab-text{flex:1 1 280px;min-width:0}
.ab-text p{margin-bottom:14px;max-width:58ch;font-size:15.5px;line-height:1.6;text-wrap:pretty}

/* ---------- contact (style.css still supplies .contact-mail and .contact-copy) ---------- */
footer#contact{
  padding:64px var(--gx) 56px;border-top:1px solid var(--ink);
  scroll-margin-top:0;
}
.foot-line{margin-top:28px;max-width:46ch;color:var(--sec);text-wrap:pretty}
.foot-mail{margin-top:26px;line-height:1.1}
/* the address and its copy button are 44px targets, like every other control on the page */
.foot-mail .contact-mail{
  display:inline-flex;align-items:center;min-height:44px;
  margin-bottom:-2px;   /* its 2px hover underline adds no height to the line */
}
/* 16px taller than style.css draws it; the margins take them back, so the line it stands on keeps its height */
.foot-mail .contact-copy{min-height:44px;margin-top:-8px;margin-bottom:-8px}
/* under 333px the address is a touch smaller, so it still fits on one line; and with wider text spacing set by
   the reader (WCAG 1.4.12) it wraps instead of running off a 320px screen */
footer#contact .contact-mail{font-size:clamp(min(24px,7.2vw),4.2vw,52px)}
.foot-mail .contact-mail{max-width:100%;overflow-wrap:anywhere}
.foot-links{display:flex;flex-wrap:wrap;gap:0 28px;margin-top:26px}
.foot-links a{display:inline-flex;align-items:center;min-height:44px;font-family:var(--mono);font-size:12px}
.foot-note{margin-top:32px;font-family:var(--mono);font-size:11px;line-height:17px;letter-spacing:.03em;color:var(--sec)}

/* ============================================================
   Pop-ups: one native <dialog>, opened as a modal by js/home.js.
   Every card sits in it; the script shows the one that was asked for.
   ============================================================ */
.pop{
  width:min(760px,calc(100vw - 32px));max-width:none;max-height:min(86vh,860px);
  margin:auto;padding:0;overflow:auto;
  overscroll-behavior:contain;   /* a scroll that reaches the card's end is not handed on to the page */
  border:1px solid var(--ink);background:var(--bg);color:var(--ink);
}
.pop::backdrop{background:rgba(16,18,20,.42)}
/* While a pop-up is open the page behind it stays where it is: js/home.js puts .pop-open on <html>.
   The lock sits on body, whose overflow is the window's own (style.css gives it overflow-x); on <html>
   it would make body the box the sticky index sticks to, and the index would jump away. */
html.pop-open body{overflow:hidden}
.pop[open]{animation:pop-in .2s cubic-bezier(.16,1,.3,1)}
@keyframes pop-in{from{opacity:0;transform:translateY(10px)}}
/* stays in the corner while the card scrolls under it */
.pop-close{
  position:sticky;top:12px;z-index:1;display:block;
  min-height:44px;margin:12px 12px -56px auto;padding:0 14px;
  background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:2px;
  font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;
  cursor:pointer;
}
.pp{padding:24px 0 26px}
.pp-kind{
  margin:0 96px 0 24px;
  font-family:var(--mono);font-size:11px;line-height:16px;letter-spacing:.06em;color:var(--sec);
}
.pp-dot{display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:50%;border:1px solid var(--rule)}
.pp-title{
  margin:10px 96px 0 24px;
  font-size:26px;font-weight:600;letter-spacing:-.015em;line-height:1.15;text-wrap:balance;
}
.pp-lead{margin:12px 24px 0;max-width:62ch;font-size:16px;line-height:1.55;text-wrap:pretty}
.pim{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;
  margin:20px 24px 0;
}
.pim figure{min-width:0}
.pim img{width:100%;height:190px;object-fit:cover;object-position:50% 0;border:1px solid var(--line)}
.pim figure:only-child img{height:240px}
.pim figcaption{margin-top:6px;font-family:var(--mono);font-size:11px;line-height:16px;color:var(--sec)}
.pp-points{list-style:none;margin:20px 24px 0;max-width:66ch}
.pp-points li{position:relative;margin-bottom:9px;padding-left:22px;font-size:14.5px;line-height:1.55;text-wrap:pretty}
.pp-points li::before{
  content:"—";content:"—" / "";   /* second form: a decoration, not read out */
  position:absolute;left:0;color:var(--sec);
}
.pp .facts{margin:14px 24px 0}
.pp .facts > div{padding:9px 0}
.pp .facts dt{flex-basis:88px}
.pp-links{display:flex;flex-wrap:wrap;gap:10px;margin:22px 24px 0}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:1131px){
  .yh{flex-basis:100%}
  .sk th,.sk td{padding:8px 3px}
  .sk .skh{display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg)}
  .sk .sw{display:inline-block;margin:0 0 6px;vertical-align:middle}
}
@media (max-width:969px){
  .cols{flex-direction:column;align-items:stretch;gap:32px;padding-top:36px}
  .sec{scroll-margin-top:64px}
  /* the index becomes one slim bar of the five section names that sticks to the top */
  .rail{
    flex:0 0 auto;top:0;z-index:5;padding:0;border-left:0;
    background:var(--bg);box-shadow:0 1px 0 rgba(16,18,20,.16);
  }
  .rail .gone,.ix .ixd{display:none}
  .ixs{flex-wrap:nowrap}
  .ix{flex:1 1 0;justify-content:center;align-items:center;gap:0;padding:0 2px;border-bottom:0}
  /* a control that Tab brings into view from below stops clear of that bar, focus ring included */
  .main a,.main button{scroll-margin-top:56px}
}
@media (max-width:520px){
  .rb{order:3;flex-basis:100%}
  .ixn{font-size:13px}
  .sk thead th:first-child{width:42%}
  .sk tbody th{white-space:normal}
  /* the copy button no longer fits beside the address: it goes under it */
  .foot-mail .contact-copy{display:block;margin:10px 0 0}
}
/* a forced-colours theme keeps background pictures: on a dark one the glow would be a bright patch */
@media (forced-colors:active){
  .pgo{display:none}
}
@media (prefers-reduced-motion:reduce){
  [data-d],.lt,.ix,.chip{transition:none}
  .pop[open]{animation:none}
}
