@font-face {
  font-family: 'Archivo';
  src: url(../fonts/archivo.woff2) format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #efece5;
  --card: #fbfaf6;
  --ink: #1c1e21;
  --ink-2: #43474d;
  --muted: #696d73;
  --line: #ddd8cc;
  --line-2: #c3bdaf;
  --soft: #e5e1d7;
  --accent: #cf3f1c;
  --accent-2: #a9321a;
  --accent-soft: #f7ddd3;
  --clear: #2a65ab;
  --clear-soft: #dbe6f4;
  --head: #2b7f55;
  --head-soft: #d7ebdd;
  --good: #2b7f55;
  --good-soft: #d7ebdd;
  --warm: #8a5a00;
  --warm-soft: #f6e6c2;
  --steel-hi: #5a6873;
  --steel: #3a4650;
  --steel-lo: #27313a;
  --steel-ink: #efe9da;
  --steel-dim: #a7b0b8;
  --stamp: #e6dfcc;
  --m-hardwood: #c99862;
  --m-softwood: #eed4a1;
  --ply-a: #ead39f;
  --ply-b: #d4b177;
  --m-mdf: #ba936b;
  --m-aluminium: #d7dce1;
  --m-steel: #a2a9b0;
  --m-printed: #5db7aa;
  --grain: rgba(92, 56, 18, .26);
  --hatch: rgba(30, 36, 42, .34);
  --layers: rgba(10, 40, 36, .22);
  --sec-wood: #e5c993;
  --shadow: 0 1px 0 rgba(40, 35, 20, .05), 0 10px 24px -16px rgba(40, 35, 20, .45);
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bar-h: 56px;
  /* Hammertone: noise lit from the top left, laid over the steel with soft-light */
  --hammer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='h' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23999' surfaceScale='2.6' diffuseConstant='1.05'%3E%3CfeDistantLight azimuth='235' elevation='52'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23h)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121417;
    --card: #1b1e22;
    --ink: #eceae4;
    --ink-2: #bdc1c6;
    --muted: #8e939a;
    --line: #2c3035;
    --line-2: #40464d;
    --soft: #24282d;
    --accent: #f2683f;
    --accent-2: #ff8a63;
    --accent-soft: #3b2018;
    --clear: #6ea8ec;
    --clear-soft: #172a3f;
    --head: #5ec48f;
    --head-soft: #163020;
    --good: #6fcf9a;
    --good-soft: #163020;
    --warm: #e9b85c;
    --warm-soft: #3a2c10;
    --steel-hi: #4a5864;
    --steel: #2c3640;
    --steel-lo: #1b232a;
    --steel-ink: #ece5d3;
    --steel-dim: #8f9aa3;
    --m-hardwood: #9a7146;
    --m-softwood: #b99a66;
    --ply-a: #b39465;
    --ply-b: #977748;
    --m-mdf: #86684a;
    --m-aluminium: #87909a;
    --m-steel: #5f6870;
    --m-printed: #2f8478;
    --grain: rgba(30, 16, 4, .4);
    --hatch: rgba(10, 12, 14, .5);
    --layers: rgba(0, 20, 18, .35);
    --sec-wood: #8f7044;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 26px -14px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
p, li { text-wrap: pretty; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.45 var(--sans);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.12; margin: 0; }
.noscript { text-align: center; padding: 3rem 16px; }

/* Fractions: <span class="fr">7/64</span> is set as a real fraction where the type is big enough to read it,
   and left as 7/64 in running text. */
.fr, .nw { white-space: nowrap; }
.big .fr, .spec .fr, .bitname .fr, .gauge-name .fr { font-feature-settings: 'frac'; }
.big .sp, .spec .sp, .bitname .sp, .gauge-name .sp { font-size: 0; }
.big .sp + .fr, .spec .sp + .fr, .bitname .sp + .fr, .gauge-name .sp + .fr { margin-left: .05em; }

/* ---------- The header: the lid of the case ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  color: var(--steel-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .1)),
    var(--hammer) 0 0 / 180px 180px,
    var(--steel);
  background-blend-mode: normal, soft-light, normal;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35), 0 2px 0 rgba(0, 0, 0, .06);
  padding-top: env(safe-area-inset-top);
}
.bar-in {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 8px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { display: block; border-radius: 8px; box-shadow: 0 1px 0 rgba(255, 255, 255, .15), 0 2px 6px rgba(0, 0, 0, .35); }
.brand span { font: 800 21px/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.bar-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(0, 0, 0, .18); color: var(--steel-ink);
  font: 650 15px/1 var(--sans); font-stretch: 87.5%;
}
.bar-btn:hover { background: rgba(0, 0, 0, .3); }
.bar-in > .bar-btn { grid-row: 1; grid-column: 2; justify-self: end; }
@media (min-width: 820px) { .bar-in > .bar-btn { grid-column: 3; } }
/* On the narrowest phones the words stay and the little case of bits goes, so it's never a bare icon */
.bar-btn svg { display: none; }
@media (min-width: 370px) {
  .bar-btn svg { display: block; }
  .bar-btn { padding: 4px 11px 4px 9px; gap: 6px; }
}
@media (max-width: 419px) { .brand span { font-size: 18.5px; } .brand { gap: 8px; } .brand img { width: 30px; height: 30px; } }
.tabs { grid-column: 1 / -1; display: flex; gap: 2px; margin: 4px -4px 0; }
.tabs a {
  flex: 1; text-align: center; text-decoration: none;
  padding: 9px 6px 10px; border-radius: 9px 9px 0 0;
  font: 700 15.5px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .02em; text-transform: uppercase;
  color: var(--steel-dim);
}
.tabs a:hover { color: var(--steel-ink); }
@media (max-width: 399px) { .tabs a { font-stretch: 75%; letter-spacing: .01em; padding-left: 2px; padding-right: 2px; white-space: nowrap; } }
@media (max-width: 339px) { .tabs a { font-size: 14px; font-stretch: 62.5%; } }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--bg); box-shadow: 0 -1px 0 rgba(255, 255, 255, .12); }
@media (min-width: 820px) {
  .bar-in { grid-template-columns: auto 1fr auto; padding-top: 0; }
  .tabs { grid-column: auto; justify-content: center; margin: 0; align-self: end; padding-top: 10px; }
  .tabs a { flex: 0 1 auto; padding: 12px 18px 13px; }
  .brand { padding: 9px 0; }
}

main { max-width: 1160px; margin: 0 auto; padding: 16px 16px 40px; outline: none; }

/* Part of junkdrawer.works, at the foot of every screen */
.jd-foot { padding: 6px 16px calc(22px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); }
.jd-foot a { text-decoration: none; }
.jd-foot a:hover, .jd-foot a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.jd-foot span { margin: 0 6px; }

/* ---------- Buttons and chips ---------- */
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link-btn svg { vertical-align: -2px; }
.link { font-weight: 650; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 20px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--card);
  font: 700 16.5px/1.1 var(--sans); font-stretch: 87.5%; text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.small { min-height: 38px; padding: 5px 14px; font-size: 15px; }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--soft); flex: none; }
.seg button {
  border: 0; background: transparent; min-height: 34px; padding: 4px 11px; border-radius: 8px;
  font: 650 15px/1.1 var(--sans); font-stretch: 87.5%; color: var(--ink-2);
}
.seg [aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 1.5px var(--ink); }

/* ---------- The Holes screen ---------- */
.holes { display: grid; gap: 14px; }
@media (min-width: 940px) {
  .holes { grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
  /* It stays in view while the cards scroll; taller than the window (inch machine screws on a short laptop
     screen), it scrolls inside itself so the materials at its foot can still be reached */
  .picker { position: sticky; top: calc(var(--bar-h) + 18px); max-height: calc(100vh - var(--bar-h) - 36px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.picker {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 12px 0 6px; min-width: 0;
}
.types { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; padding: 0 10px 10px; border-bottom: 1px dashed var(--line-2); }
.type {
  display: grid; justify-items: center; gap: 3px; min-width: 0;
  border: 0; background: none; padding: 6px 0 5px; border-radius: 10px; color: var(--ink-2);
}
.type .ticon, .chip .ticon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.type span { font: 650 10.5px/1.05 var(--sans); font-stretch: 62.5%; text-align: center; max-width: 100%; letter-spacing: .01em; }
.type:hover { background: var(--soft); color: var(--ink); }
.type[aria-checked="true"] { background: var(--steel); color: var(--steel-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 0 var(--accent); }
@media (min-width: 940px) { .type span { font-size: 11.5px; } }
/* Under 360 the nine tiles are 27 px wide: a little less padding and a little smaller type so "Machine" fits */
@media (max-width: 359px) {
  .types { gap: 1px; padding-left: 5px; padding-right: 5px; }
  .type span { font-size: 10px; letter-spacing: 0; }
}

.pick-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 6px 4px; padding: 8px 0 2px 12px; }
.pick-row .seg { grid-column: 2; justify-self: start; }
.pick-row .seg ~ .chips { grid-column: 2; }
.row-label { font: 750 12px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); align-self: center; }
.pick-row .seg + .chips, .pick-row .seg { margin-top: 0; }
.pick-row:has(.seg) .row-label { align-self: start; padding-top: 12px; }
.chips {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 3px 14px 6px 2px; scroll-padding: 0 14px;
  --fade-l: #000; --fade-r: transparent;
  -webkit-mask: linear-gradient(90deg, var(--fade-l), #000 22px, #000 calc(100% - 26px), var(--fade-r));
  mask: linear-gradient(90deg, var(--fade-l), #000 22px, #000 calc(100% - 26px), var(--fade-r));
}
.chips[data-at="middle"] { --fade-l: transparent; }
.chips[data-at="end"] { --fade-l: transparent; --fade-r: #000; }
.chips[data-at="none"] { --fade-r: #000; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--card);
  font: 650 15.5px/1 var(--sans); font-stretch: 87.5%; white-space: nowrap; color: var(--ink);
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.mat { padding-left: 6px; }
.chip.head { padding-left: 8px; }
.chip .hicon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.chip.off { opacity: .42; border-style: dashed; }
.swatch { display: block; flex: none; border-radius: 5px; }
.sw-hardwood { fill: var(--m-hardwood); } .sw-softwood { fill: var(--m-softwood); } .sw-plywood { fill: var(--ply-a); }
.sw-mdf { fill: var(--m-mdf); } .sw-aluminium { fill: var(--m-aluminium); } .sw-steel { fill: var(--m-steel); } .sw-printed { fill: var(--m-printed); }
.pick-hint { margin: 6px 12px 6px; font-size: 14.5px; color: var(--muted); }
.pick-hint .link-btn { white-space: nowrap; color: var(--ink-2); }
@media (min-width: 940px) {
  .chips { flex-wrap: wrap; overflow: visible; -webkit-mask: none; mask: none; padding-right: 12px; }
  .pick-row { grid-template-columns: 52px minmax(0, 1fr); padding-top: 10px; }
}

.result { min-width: 0; display: grid; gap: 12px; align-content: start; }
.spec { font: 800 30px/1.08 var(--sans); font-stretch: 87.5%; letter-spacing: -.005em; padding: 2px 2px 0; }
.spec .into { color: var(--ink-2); font-weight: 500; }
.spec .sub { display: block; font: 600 15px/1.3 var(--sans); color: var(--muted); margin-top: 4px; }
.warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 550; }
.nobits { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1.5px dashed var(--line-2); color: var(--ink-2); }
.nobits .link-btn { white-space: nowrap; }
.warn .link-btn { margin-left: 4px; white-space: nowrap; }
.diagram {
  margin: 0; padding: 8px 10px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.section { display: block; width: 100%; max-width: 470px; height: auto; margin: 0 auto; overflow: visible; }
.blk.m-hardwood { fill: var(--m-hardwood); } .blk.m-softwood { fill: var(--m-softwood); } .blk.m-plywood { fill: var(--ply-a); }
.blk.m-mdf { fill: var(--m-mdf); } .blk.m-aluminium { fill: var(--m-aluminium); } .blk.m-steel { fill: var(--m-steel); } .blk.m-printed { fill: var(--m-printed); }
.section .edge { fill: none; stroke: var(--ink-2); stroke-width: 1.3; }
.hole-cut { stroke-width: 1.7; stroke-linejoin: round; }
.hole-cut.r-main { fill: var(--accent-soft); stroke: var(--accent); }
.hole-cut.r-clear { fill: var(--clear-soft); stroke: var(--clear); }
.hole-cut.r-head { fill: var(--head-soft); stroke: var(--head); }
.ghost { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3.5 2.5; stroke-linejoin: round; opacity: .8; }
.ghost.thin { stroke-width: 1; stroke-dasharray: none; opacity: .45; }
.lead { stroke-width: 1.2; fill: none; }
.lead.r-main, .threads { stroke: var(--accent); }
.lead.r-clear { stroke: var(--clear); }
.lead.r-head { stroke: var(--head); }
.lbl { font: 700 12.5px var(--sans); font-stretch: 87.5%; }
.lbl.r-main { fill: var(--accent); } .lbl.r-clear { fill: var(--clear); } .lbl.r-head { fill: var(--head); }
.threads { stroke-width: 1.3; fill: none; }
.brass { fill: #d6aa4c; stroke: #87661e; stroke-width: 1.2; }
.knurl { stroke: rgba(95, 64, 10, .55); stroke-width: .9; fill: none; }
.bore { fill: #8a6a22; opacity: .55; }
.dim { font: 650 11.5px var(--sans); fill: var(--muted); }
.dimline { stroke: var(--muted); stroke-width: 1; fill: none; }
.joint { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.pin { fill: #cdd2d7; stroke: var(--ink-2); stroke-width: 1.2; }
.shelf-line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; fill: none; }
.dim.on-wood { fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.cup-floor { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2.5; }
.door-edge { stroke: var(--ink); stroke-width: 2.5; }

/* The hole cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hole {
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 13px 14px 12px 12px; overflow: hidden; min-width: 0;
}
.hole::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.hole.r-clear::before { background: var(--clear); }
.hole.r-head::before { background: var(--head); }
.hole .pic { padding-top: 2px; }
.hole .pic svg { display: block; overflow: visible; }
.cone-deg { font: 700 9px var(--sans); fill: var(--head); }
.bit-ghost { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 3 2.5; stroke-linejoin: round; }
.hole .body { min-width: 0; }
.hole-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.hole-head h3 { font: 800 14px/1.2 var(--sans); font-stretch: 87.5%; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.hole.r-clear h3 { color: var(--clear); }
.hole.r-head h3 { color: var(--head); }
.hole-head .where { font-size: 14px; color: var(--muted); }
.big { margin: 4px 0 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 800 36px/1.05 var(--sans); font-stretch: 87.5%; letter-spacing: -.01em; }
@media (min-width: 940px) { .big { font-size: 40px; } }
.big small { font-size: .55em; font-weight: 700; }
.big .bit-link { font: inherit; }
.bit-link { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 750; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.bit-link:hover, .bit-link:focus-visible { text-decoration-color: var(--accent); }
.tag {
  display: inline-block; padding: 3px 9px 4px; border-radius: 999px; background: var(--soft); color: var(--ink-2);
  font: 700 13.5px/1.1 var(--sans); font-stretch: 87.5%; letter-spacing: .01em; white-space: nowrap;
}
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.none { background: var(--accent-soft); color: var(--accent-2); }
.tag.near { background: var(--warm-soft); color: var(--warm); }
.big.want .bit-link { color: var(--muted); text-decoration: underline dashed var(--line-2) 2px; text-underline-offset: 5px; }
.hole .sizes { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.hole .sizes .bit-link { font-weight: 700; text-decoration-color: var(--line-2); }
.nearest { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: 15px; }
.nearest .bit-link { font-weight: 750; margin-right: 4px; }
.hole .alt, .hole .depth, .hole .note, .hole .pct { margin: 7px 0 0; font-size: 14.5px; color: var(--ink-2); }
.hole .pct { font-weight: 600; }
.hole .alt .bit-link { font-weight: 750; text-decoration-color: var(--line-2); }
.not-yours { font-size: 13px; color: var(--muted); }
.hole .depth b { font: 750 12px var(--sans); font-stretch: 87.5%; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.hole .note { color: var(--muted); }

.related { margin: 0; padding: 0 2px; }
.card-ish { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; }
.tools h2 { font: 800 13px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tools dl { margin: 0; display: grid; gap: 6px; }
.tools dl div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.tools dt { font-weight: 650; color: var(--ink-2); font-size: 15px; }
.tools dd { margin: 0; font: 700 17px/1.3 var(--sans); font-stretch: 87.5%; }
.mat-note, .yours { margin: 0; padding: 0 2px; font-size: 15px; color: var(--ink-2); }
.yours { color: var(--muted); }
.yours b { color: var(--accent-2); }

/* ---------- The drill index ---------- */
.index-head h1 { font: 800 30px/1.08 var(--sans); font-stretch: 87.5%; }
.index-head p { color: var(--ink-2); margin: 6px 0 0; max-width: 62ch; }
.cases { display: grid; gap: 18px; margin: 16px 0 28px; }
/* On a laptop the cases pack into two columns like a drawer, the wide ones across both */
@media (min-width: 980px) {
  .cases { display: block; columns: 2; column-gap: 18px; }
  .case { break-inside: avoid; margin-bottom: 18px; }
  .case.wide { column-span: all; }
  .case:not(.wide) + .case.wide { margin-top: 18px; }
}
.case {
  border-radius: 16px; overflow: hidden; color: var(--steel-ink);
  background:
    linear-gradient(172deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, .18)),
    var(--hammer) 0 0 / 180px 180px,
    var(--steel);
  background-blend-mode: normal, soft-light, normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 16px 30px -18px rgba(0, 0, 0, .7);
}
.lid {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .26));
  border-bottom: 1px solid rgba(0, 0, 0, .4); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07);
}
.plate {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px;
  padding: 5px 18px 6px; border-radius: 4px; color: #2b2721;
  background: linear-gradient(180deg, #f1e9d2, #d8cdb0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .45);
}
.plate::before, .plate::after { content: ''; position: absolute; top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9d9481 70%); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .35); }
.plate::before { left: 6px; } .plate::after { right: 6px; }
.plate b { font: 800 14.5px/1.25 var(--sans); font-stretch: 115%; text-transform: uppercase; letter-spacing: .06em; }
.plate span { font: 650 13px/1.25 var(--sans); font-stretch: 87.5%; color: #5d5547; }
.count { font: 800 19px/1 var(--sans); font-stretch: 87.5%; white-space: nowrap; }
.count small { font-size: 12.5px; color: var(--steel-dim); font-weight: 650; }
.lid-x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--steel-dim); display: grid; place-items: center; }
.lid-x:hover { background: rgba(255, 255, 255, .2); color: var(--steel-ink); }
.tray { display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, calc(var(--cell, 33px) * 1.75))); justify-content: center; gap: 4px 0; padding: 10px 8px 12px; }
.slot {
  position: relative; display: grid; justify-items: center; min-width: 0;
  border: 0; background: none; padding: 0 0 2px; border-radius: 10px; color: var(--stamp);
}
.slot svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.slot .bit { transition: transform .18s ease; }
.slot:hover .bit { transform: translateY(-3px); }
.slot.on .bit { transform: translateY(-9px); filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .45)); }
.arrive .slot .bit { animation: rise-in .5s cubic-bezier(.2, .8, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes rise-in { from { transform: translateY(10px); opacity: 0; } }
.stamp {
  margin-top: -2px; padding: 2px 3px 3px; border-radius: 3px; white-space: nowrap;
  font: 750 11.5px/1 var(--sans); font-stretch: 75%; letter-spacing: .02em; text-shadow: 0 -1px 0 rgba(0, 0, 0, .55);
}
.case.wide .stamp { font-size: 13px; }
.slot.on .stamp { background: var(--accent); color: #fff; text-shadow: none; }
.slot.gone .stamp { opacity: .45; }
.slot:focus-visible { outline-offset: -2px; }
.others h2 { font: 800 21px/1.1 var(--sans); font-stretch: 87.5%; }
.hint { color: var(--muted); font-size: 15px; margin: 6px 0; }
.set-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .set-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.set-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.set-list .btn { flex: none; white-space: nowrap; }
.set-name { min-width: 0; }
.set-name b { display: block; font: 750 16.5px/1.2 var(--sans); font-stretch: 87.5%; }
.set-name small { display: block; color: var(--muted); font-size: 14px; }

/* A bit's sheet */
.bit-top { align-items: flex-start; }
.bit-hero { flex: none; width: 56px; margin: -6px 0 -8px; }
.bit-hero svg { overflow: visible; }
.bit-title { flex: 1; min-width: 0; padding-top: 12px; }
.bitname { font: 800 46px/1 var(--sans); font-stretch: 87.5%; letter-spacing: -.01em; }
.bitname small { font-size: .5em; }
.bit-title p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.twins { margin: 8px 0; color: var(--ink-2); font-size: 15px; }
.own-row { padding: 10px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.own-row p { margin: 0; font-weight: 600; }
.mine svg { vertical-align: -3px; color: var(--good); }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 650; cursor: pointer; }
.switch input {
  appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px; margin: 0;
  background: var(--line-2); position: relative; transition: background .15s;
}
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.uses-title { font: 800 13px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 0; }
.uses h4 { margin: 12px 0 2px; font: 750 15.5px/1.2 var(--sans); font-stretch: 87.5%; color: var(--accent-2); }
.uses.spot { margin-top: 6px; }
.uses-title:empty { display: none; }
.uses ul { list-style: none; margin: 0; padding: 0; }
.use { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.use .what { min-width: 0; }
.use .what b { font-weight: 750; font-size: 16.5px; }
.use .what small { margin-left: 2px; }
.use small { color: var(--muted); font-size: 14px; }
.use .how { flex: none; font: 700 14px/1.2 var(--sans); font-stretch: 87.5%; color: var(--ink-2); text-align: right; }
.use .how.good { color: var(--good); }
.use:hover .what b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.field { display: grid; gap: 5px; margin: 0 0 12px; }
.field .label { font-weight: 650; font-size: 14.5px; color: var(--ink-2); }
.field select, .field input[type=text] { width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 11px; background: var(--bg); font: 600 16px var(--sans); }
.loose-pick { display: grid; gap: 0 10px; margin-top: 12px; }
@media (min-width: 520px) { .loose-pick { grid-template-columns: 1fr 2fr; } }

/* Your bits */
.set-toggles { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 2px; }
.set-toggles li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.set-toggles .switch .st { display: grid; }
.set-toggles .switch b { font: 700 16px/1.25 var(--sans); font-stretch: 87.5%; }
.set-toggles .switch small { font-weight: 450; color: var(--muted); font-size: 14px; }
.sub-title { font: 800 13px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 4px; }
.loose-chips { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.loose-chips li { display: inline-flex; align-items: center; gap: 2px; padding: 3px 3px 3px 12px; border-radius: 999px; background: var(--soft); font: 700 15px var(--sans); font-stretch: 87.5%; }
.x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.x:hover { background: var(--line); color: var(--ink); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-btn { cursor: pointer; }
.about { margin-top: 24px; padding-top: 12px; border-top: 1px dashed var(--line-2); color: var(--ink-2); font-size: 15px; }
.about p { margin: 0 0 6px; }
.about .btn.quiet { margin-left: -20px; }
.about .jd-foot { padding: 6px 0 0; text-align: left; }

/* ---------- The screw gauge: the whole screen, nothing scrolls ---------- */
body.gauge-on { overflow: hidden; }
body.gauge-on > .jd-foot { display: none; }
.gauge {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
}
.g-top {
  flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  color: var(--steel-ink);
  background: var(--hammer) 0 0 / 180px 180px, var(--steel); background-blend-mode: soft-light, normal;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35);
}
.g-close { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .22); color: var(--steel-ink); }
.g-close svg { width: 18px; height: 18px; }
.g-steps { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 2px; list-style: none; margin: 0; padding: 0 38px 0 0; }
.g-steps li { padding: 6px 8px; border-radius: 999px; font: 750 12.5px/1 var(--sans); font-stretch: 75%; letter-spacing: .05em; text-transform: uppercase; color: var(--steel-dim); }
@media (min-width: 380px) { .g-steps li { font-stretch: 87.5%; } }
@media (max-width: 339px) { .g-steps { padding-right: 0; } .g-steps li { padding: 6px 5px; } }
.g-steps li.done { color: var(--steel-ink); }
.g-steps li.now { background: var(--bg); color: var(--ink); }
.g-steps li.skip { opacity: .45; }
/* A step you can go back (or on) to: the whole pill is the button, a little taller than it looks */
.g-steps li > button {
  display: block; margin: -11px -8px; padding: 11px 8px; border: 0; border-radius: 999px; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--steel-ink);
}
.g-steps li > button:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 339px) { .g-steps li > button { margin: -11px -5px; padding: 11px 5px; } }
.g-zoom { flex-basis: 100%; text-align: center; padding: 4px 8px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 650; font-size: 14px; }
.g-field { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
/* The glass: light in both schemes, so a screw stands out on it. On the Name step only the band the
   screw is drawn on is glass; what's under it follows the page. */
.gauge:not([data-step="name"]) .g-field, .g-glass {
  background: #f7f5ef; color: #1c1e21;
  --ink: #1c1e21; --ink-2: #43474d; --muted: #6b6f75; --accent: #cf3f1c; --accent-2: #a9321a; --line: #ddd8cc;
}
@media (prefers-color-scheme: dark) { .gauge:not([data-step="name"]) .g-field, .g-glass { background: #dcd9d1; --line: #c4c0b6; } }
#gSvg { position: absolute; inset: 0; display: block; }
.g-over { position: absolute; inset: 0; pointer-events: none; }
.g-over > * { pointer-events: auto; }
.gauge[data-step="name"] .g-field { touch-action: auto; user-select: text; -webkit-user-select: text; background: var(--bg); color: var(--ink); }
/* On the Threads step the glass scrolls, so a short screen still reaches every comb, and a fade at its
   foot says when there are more below */
.gauge[data-step="threads"] .g-field { overflow-x: hidden; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-gutter: stable; }
.g-panel { position: relative; }
.gauge[data-below] .g-panel::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 44px; pointer-events: none;
  background: linear-gradient(rgba(247, 245, 239, 0), #f7f5ef 85%);
}
@media (prefers-color-scheme: dark) { .gauge[data-below] .g-panel::before { background: linear-gradient(rgba(220, 217, 209, 0), #dcd9d1 85%); } }
.gauge[data-step="name"] .g-over { overflow-y: auto; overscroll-behavior: contain; }
/* Turned on its side, a phone has no room to measure */
.g-turn {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; margin: 0; padding: 24px;
  background: rgba(247, 245, 239, .96); color: #1c1e21; text-align: center; font-weight: 650; font-size: 17px; line-height: 1.35;
}
/* On the gauge a note shows over the steps along the top: clear of the glass, where the card and the screw
   lie, and of the panel's readings */
body.gauge-on .toast { bottom: auto; top: calc(7px + env(safe-area-inset-top)); }
.card-ghost { fill: rgba(42, 101, 171, .06); stroke: #2a65ab; stroke-width: 1.3; stroke-dasharray: 6 4; }
.fence { stroke: #1c1e21; stroke-width: 2; fill: none; }
.jaw { stroke: #cf3f1c; stroke-width: 2.2; fill: none; }
.tick { stroke: #43474d; stroke-width: 1; fill: none; }
.rail { fill: rgba(28, 30, 33, .06); }
.g-box { fill: rgba(207, 63, 28, .07); }
.g-num { font: 650 10.5px var(--sans); fill: #6b6f75; }
.g-lbl { font: 700 12.5px var(--sans); font-stretch: 87.5%; fill: #a9321a; }
.grip circle { fill: #cf3f1c; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.grip path { fill: #fff; }
/* A comb is a steel leaf: lit along its teeth, its pitch stamped into it, a pivot hole at the end */
.comb { fill: url(#g-leaf); stroke: rgba(0, 0, 0, .45); stroke-width: 1; stroke-linejoin: round; }
.comb-lit { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1; stroke-linejoin: round; }
.comb-pivot { fill: none; stroke: rgba(0, 0, 0, .5); stroke-width: 1.5; }
.comb-stamp { font: 800 15px var(--sans); font-stretch: 87.5%; letter-spacing: .05em; fill: rgba(232, 236, 239, .8); }
.comb-stamp.sh { fill: rgba(0, 0, 0, .55); }
.comb-mark { stroke: #cf3f1c; stroke-width: 1.6; }
.comb-ten { font: 750 11px var(--sans); fill: #cf3f1c; }
.g-tell { font: 600 12px var(--sans); fill: #6b6f75; }
.comb-btn {
  position: absolute; left: 6px; right: 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  padding: 5px 8px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; text-align: left; color: #1c1e21;
  font: 600 14px/1.25 var(--sans);
}
.comb-btn b { font: 800 16px var(--sans); font-stretch: 87.5%; }
.comb-btn small { color: #6b6f75; font-size: 12.5px; }
.comb-btn > small { flex: none; padding-top: 2px; }
.comb-btn.on { border-color: #cf3f1c; background: rgba(207, 63, 28, .07); }
.comb-btn.on b { color: #a9321a; }
.g-panel {
  flex: none; display: grid; gap: 8px;
  padding: 10px max(14px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -10px 22px -16px rgba(0, 0, 0, .45);
}
.g-panel:empty { display: none; }
.g-panel > * { width: 100%; max-width: 560px; justify-self: center; }
.g-panel p { margin: 0; }
.g-say { font-weight: 550; font-size: 15.5px; line-height: 1.35; }
.g-warn { padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14.5px; }
.g-small { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
/* The line's at the foot of the glass and the card goes on: the way out says so */
.g-stuck.on { color: var(--accent-2); font-weight: 650; }
.g-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-opts .seg button { min-height: 32px; font-size: 14px; padding: 3px 10px; }
.g-meas { flex-wrap: nowrap; }
.g-what { flex: 1; min-width: 0; font: 750 13px/1.15 var(--sans); font-stretch: 87.5%; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.g-what small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; }
.g-nudge { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card); display: grid; place-items: center; color: var(--ink); }
.g-nudge:active { background: var(--soft); }
.g-read { flex: none; min-width: 112px; text-align: center; font: 600 14px/1.1 var(--sans); color: var(--ink-2); }
.g-read b { font: 800 24px/1 var(--sans); font-stretch: 87.5%; color: var(--ink); }
.g-read small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.g-could { flex: 1; min-width: 0; font: 650 15px/1.25 var(--sans); color: var(--accent-2); }
.g-end { justify-content: flex-end; flex-wrap: nowrap; }
.g-end .g-small { flex: 1; }
/* Three buttons in a row on the narrowest phones: a little less padding so none of them wraps */
@media (max-width: 359px) {
  .g-panel .btn { padding-left: 12px; padding-right: 12px; }
  .g-panel .btn.small { padding-left: 10px; padding-right: 10px; }
  .g-back span { display: none; } /* the arrow says it, and so do the steps along the top */
}
.g-next { flex: none; }
.g-next svg, .btn svg { flex: none; }
.g-tuck .g-mini { flex: 1; min-width: 0; margin: 0; font-size: 14.5px; color: var(--ink-2); }
.g-tuck .g-mini b { font-size: 17px; color: var(--ink); }

/* The Name step: the screw or bit drawn at true size where it lay, its name beside it */
.g-result { padding: 0 0 28px; }
.g-glass { position: relative; border-bottom: 1px solid var(--line); }
.g-draw { position: absolute; left: 0; top: 0; display: block; overflow: visible; }
.fence.faint { stroke: rgba(28, 30, 33, .35); stroke-width: 1.5; }
.sg { filter: drop-shadow(0 1.5px 1.2px rgba(0, 0, 0, .38)); }
.sg-edge { fill: none; stroke: rgba(0, 0, 0, .38); stroke-width: 1; }
.sg-crest { fill: none; stroke: rgba(255, 255, 255, .5); stroke-linecap: round; }
.sg-groove { fill: none; stroke: rgba(0, 0, 0, .3); stroke-linecap: round; }
.sg-knurl { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 1; }
.g-label { position: relative; max-width: 560px; padding-right: 16px; padding-bottom: 18px; }
.g-lay { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.g-details { max-width: 560px; margin: 0 auto; padding: 4px 16px 0; }
@media (min-width: 700px) { .g-details { margin: 0 0 0 var(--lx); padding-left: 0; } }
.g-kicker { margin: 0; font: 750 13px var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gauge-name { margin: 4px 0 8px; font: 800 34px/1.05 var(--sans); font-stretch: 87.5%; letter-spacing: -.01em; text-wrap: balance; animation: stamp .32s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: left center; }
@media (min-width: 420px) { .gauge-name { font-size: 38px; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.12); } 60% { opacity: 1; } to { transform: none; } }
.g-facts { margin: 0 0 8px; color: var(--ink-2); font-size: 15.5px; }
.g-twin { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: rgba(207, 63, 28, .08); font-size: 14.5px; }
.g-own { margin: 12px 0 0; font-weight: 600; }
.g-own.mine svg { vertical-align: -3px; color: var(--good); }
.g-ask { margin: 14px 0 6px; font-weight: 650; }
.g-heads, .g-kinds { flex-wrap: wrap; overflow: visible; -webkit-mask: none; mask: none; padding: 0; }
.g-usual { margin: 0 0 8px; }
.g-uses { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.g-none { margin: 18px 0 0; }
.g-list h3 { margin: 20px 0 4px; font: 800 13px/1 var(--sans); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.g-holes, .g-tools { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.g-holes li, .g-tools li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.g-holes span, .g-tools span { color: var(--ink-2); }
.g-holes b, .g-tools b { font: 800 19px var(--sans); font-stretch: 87.5%; text-align: right; }
.g-bit { text-align: right; }
/* The note under a bit ("a hair tight"), not the "mm" inside its name */
.g-bit > small { display: block; color: var(--muted); font-size: 13px; }
.g-result .row-btns { margin-top: 18px; }

/* ---------- The sheet ---------- */
.sheet {
  border: 0; padding: 0; background: var(--card); color: var(--ink);
  width: 100%; max-width: 600px; max-height: 88dvh;
  margin: auto auto 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .5);
}
.sheet[open] { animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.sheet::backdrop { background: rgba(12, 14, 16, .5); }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet-body { padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.sheet-top h2 { font: 800 26px/1.1 var(--sans); font-stretch: 87.5%; }
.close { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--soft); display: grid; place-items: center; color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  /* As wide as its words, up to the screen less a margin: left 50% alone would wrap it at half the screen */
  width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15.5px; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5);
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open], .gauge-name, .arrive .slot .bit { animation: none; }
  .slot .bit { transition: none; }
}
