@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --surface: #fbf9f4;
  --ink: #1a1814;
  --muted: #5b554a;
  --rule: #d6cfbf;
  --blaze: #e2560f;
  --blaze-ink: #a33d07;
  --blaze-wash: rgb(226 86 15 / 0.085);
  --blaze-line: rgb(226 86 15 / 0.38);
  --open: #276e33;
  --warn: #855610;
  --hover-bg: #a33d07;
  --hover-fg: #ffffff;
  --closed: #7f796d;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Archivo", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --surface: #1a1816;
    --ink: #eee8dc;
    --muted: #a59e91;
    --rule: #2f2b27;
    --blaze: #ff7a2e;
    --blaze-ink: #ff9354;
    --blaze-wash: rgb(255 122 46 / 0.09);
    --blaze-line: rgb(255 122 46 / 0.4);
    --open: #5cc46f;
    --warn: #e2ad4a;
    --hover-bg: #ff7a2e;
    --hover-fg: #121110;
    --closed: #857f73;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  accent-color: var(--blaze);
  scrollbar-color: var(--rule) var(--paper);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--blaze);
}
::selection { background: var(--blaze); color: #fff; }
a { color: inherit; text-decoration-color: var(--blaze-line); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
svg { stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: max(2.25rem, env(safe-area-inset-top)) clamp(1.15rem, 5vw, 2.5rem) max(2.5rem, env(safe-area-inset-bottom));
}

/* ---------- masthead ---------- */
.masthead { position: relative; padding-top: 0.5rem; }
.reticle {
  position: absolute;
  top: 0;
  right: -0.25rem;
  width: clamp(4.25rem, 16vw, 7.5rem);
  height: auto;
  color: var(--blaze);
  stroke-width: 1.4;
  opacity: 0.9;
}
h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3rem, 12.5vw, 5.75rem);
  line-height: 0.9;
  font-weight: 820;
  font-stretch: 70%;
  letter-spacing: -0.012em;
  word-spacing: 0.05em;
  text-wrap: balance;
}
.lede {
  margin: 1.35rem 0 0;
  max-width: 34rem;
  font-size: 1.2rem;
  line-height: 1.42;
  text-wrap: pretty;
}
.byline {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- section headings ---------- */
section { margin-top: 3.25rem; }
h2 {
  margin: 0 0 1rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ink);
  font-size: 1.55rem;
  line-height: 1.1;
  font-weight: 760;
  font-stretch: 80%;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* ---------- picks ---------- */
.picks-grid { display: grid; gap: 0.75rem; }
@media (min-width: 40rem) { .picks-grid { grid-template-columns: 1fr 1fr; } }
.pick {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.05rem 1.1rem 0.95rem;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 6px 18px -12px rgb(0 0 0 / 0.25);
  transition: background-color 180ms cubic-bezier(.16,1,.3,1), transform 180ms cubic-bezier(.16,1,.3,1);
}
.pick:hover { background: var(--blaze-wash); }
.pick:active { transform: translateY(1px); }
.pick-name {
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 770;
  font-stretch: 80%;
}
.pick-why { color: var(--muted); font-size: 0.98rem; line-height: 1.45; text-wrap: pretty; }
.pick-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
}
.pick-tag {
  color: var(--blaze-ink);
  font-weight: 680;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.pick-meta svg { width: 1.05rem; height: 1.05rem; margin-left: auto; color: var(--muted); }

/* ---------- buddy rule ---------- */
.buddy {
  padding: 1.15rem 1.15rem 0.6rem;
  background: var(--blaze-wash);
  border: 1px solid var(--blaze-line);
  border-radius: 6px;
}
.buddy h2 { border-top: 0; padding-top: 0; margin-bottom: 0.5rem; }
.buddy > p { margin: 0 0 0.9rem; max-width: 62ch; text-wrap: pretty; }
.rules { margin: 0; }
.rules > div {
  display: grid;
  gap: 0.1rem 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--blaze-line);
}
@media (min-width: 40rem) { .rules > div { grid-template-columns: 11rem 1fr; } }
.rules dt { font-weight: 680; }
.rules dd { margin: 0; color: var(--muted); }
@media (prefers-color-scheme: dark) { .rules dd { color: var(--ink); opacity: 0.82; } }

/* ---------- options ---------- */
.options-head h2 { margin-bottom: 0.35rem; }
.options-head p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.95rem; }
.scale-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.range {
  scroll-margin-top: 1rem;
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}
.range:target { animation: found 1.8s cubic-bezier(.16,1,.3,1) both; }
@keyframes found {
  0% { background: var(--blaze-wash); box-shadow: 0 0 0 0.75rem var(--blaze-wash); }
  100% { background: transparent; box-shadow: 0 0 0 0.75rem transparent; }
}
.range-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
h3 {
  margin: 0;
  font-size: clamp(1.65rem, 6.2vw, 2.15rem);
  line-height: 1;
  font-weight: 780;
  font-stretch: 76%;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.where { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; }
.drive {
  flex: none;
  margin: 0.15rem 0 0;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.drive small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 400; }

.track {
  position: relative;
  height: 9px;
  margin: 0.95rem 0 0.85rem;
  background:
    linear-gradient(var(--rule), var(--rule)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(to right, var(--muted) 0 1px, transparent 1px 25%) 0 100% / 100% 5px no-repeat;
  border-right: 1px solid var(--muted);
}
.track span {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: calc(var(--m) / 120 * 100%);
  background: var(--blaze);
  border-radius: 0 3px 3px 0;
}

.status {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.97rem;
  font-weight: 560;
}
.dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--closed);
  transform: translateY(-0.05rem);
}
.status[data-state="open"] .dot { background: var(--open); box-shadow: 0 0 0 3px color-mix(in srgb, var(--open) 22%, transparent); }
.status[data-state="open"] .status-text { color: var(--open); }
.status[data-state="warn"] .dot { background: var(--warn); }
.status[data-state="warn"] .status-text { color: var(--warn); }
.status[data-state="closed"] .status-text { color: var(--muted); }

h4 {
  margin: 1.4rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 680;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.guns { list-style: none; margin: 0; padding: 0; }
.guns li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--rule);
  font-weight: 620;
}
.guns li:last-child { border-bottom: 0; }
.cal { flex: none; color: var(--muted); font-size: 0.88rem; font-weight: 400; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 1rem 0 0;
  padding: 0.85rem 0 0.9rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.facts dd { margin: 0.15rem 0 0; font-size: 1rem; font-weight: 500; line-height: 1.35; }
.facts .sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0;
}

.notes { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 64ch; }
.notes li {
  position: relative;
  padding-left: 1.05rem;
  margin: 0.4rem 0;
  text-wrap: pretty;
}
.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.38rem;
  height: 0.38rem;
  background: var(--blaze);
}

.hours { margin-top: 0.9rem; }
.hours summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.hours summary::-webkit-details-marker { display: none; }
.hours summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 160ms ease-out;
}
.hours[open] summary::after { transform: translateY(0.08rem) rotate(-135deg); }
.hours p { margin: 0.25rem 0 0; font-size: 0.9rem; line-height: 1.6; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-weight: 650;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.btn svg { width: 1.1rem; height: 1.1rem; }
.btn:first-child { background: var(--ink); color: var(--paper); }
.btn:first-child:hover { background: var(--hover-bg); border-color: var(--hover-bg); color: var(--hover-fg); }
.btn:not(:first-child):hover { background: var(--blaze-wash); }
.btn.ghost { border-color: transparent; padding-inline: 0.6rem; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }

/* ---------- skip ---------- */
.skip ul { list-style: none; margin: 0; padding: 0; }
.skip li {
  display: grid;
  gap: 0.1rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 40rem) { .skip li { grid-template-columns: 15rem 1fr; } }
.skip b { font-weight: 680; }
.skip span { color: var(--muted); }

/* ---------- spec ---------- */
.quote {
  margin: 0 0 1.4rem;
  font-size: clamp(1.35rem, 4.6vw, 1.7rem);
  line-height: 1.25;
  font-weight: 640;
  font-stretch: 84%;
  text-wrap: balance;
}
.quote::before { content: "\201C"; color: var(--blaze); }
.quote::after { content: "\201D"; color: var(--blaze); }
.spec-notes { display: grid; gap: 1.25rem 2rem; }
@media (min-width: 40rem) { .spec-notes { grid-template-columns: 1fr 1fr; } }
.spec-notes h3 {
  font-size: 1.15rem;
  font-stretch: 88%;
  font-weight: 720;
  line-height: 1.2;
}
.spec-notes p { margin: 0.4rem 0 0; text-wrap: pretty; }

/* ---------- footer ---------- */
.fine {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 64ch;
}
.fine p { margin: 0 0 0.6rem; text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- ar.sebmade.com additions ---------- */
.track span { width: calc(var(--m) / 60 * 100%); }
.section-lede { margin: 0 0 1rem; color: var(--muted); font-size: 0.97rem; max-width: 60ch; text-wrap: pretty; }

.sheet { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.sheet li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "part price" "item item" "stock stock";
  gap: 0.15rem 1rem;
  padding: 0.9rem 0 0.95rem;
  border-bottom: 1px solid var(--rule);
}
.sheet .stock { grid-area: stock; justify-self: start; }
@media (min-width: 40rem) {
  .sheet li { grid-template-columns: 6.5rem 1fr auto; grid-template-areas: "part item price" ". stock ."; align-items: baseline; }
}
.sheet .part {
  grid-area: part;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sheet .item { grid-area: item; font-weight: 640; line-height: 1.35; text-wrap: pretty; }
.sheet .price { grid-area: price; justify-self: end; font-size: 1.02rem; font-weight: 500; white-space: nowrap; }
.sheet .sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
}
.stock {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-weight: 560;
}
.stock::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-0.05rem);
}
.stock.ok { color: var(--open); }
.stock.warn { color: var(--warn); }
.sheet li.total { border-bottom: 2px solid var(--ink); }
.sheet li.total .part { color: var(--blaze-ink); }
.sheet li.total .price { font-size: 1.45rem; font-weight: 500; color: var(--ink); }

.callout {
  margin-top: 1.4rem;
  padding: 1rem 1.15rem 1.05rem;
  background: var(--blaze-wash);
  border: 1px solid var(--blaze-line);
  border-radius: 6px;
}
.callout h3 { font-size: 1.15rem; font-stretch: 88%; font-weight: 720; line-height: 1.2; }
.callout p { margin: 0.4rem 0 0; max-width: 64ch; text-wrap: pretty; }

.rifles { list-style: none; margin: 0; padding: 0; }
.rifles li { padding: 0.95rem 0 1rem; border-bottom: 1px solid var(--rule); }
.rifles li:first-child { padding-top: 0.25rem; }
.rifle-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rifle-head b { font-size: 1.15rem; font-weight: 720; font-stretch: 88%; line-height: 1.2; }
.rifle-head .price { flex: none; font-size: 1rem; font-weight: 500; }
.rifles p { margin: 0.35rem 0 0; color: var(--muted); max-width: 64ch; text-wrap: pretty; }
@media (prefers-color-scheme: dark) { .rifles p { color: var(--ink); opacity: 0.82; } }
.tag {
  margin-right: 0.55rem;
  color: var(--blaze-ink);
  font-weight: 680;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tag.muted { color: var(--muted); }
@media (prefers-color-scheme: dark) { .rifles .tag { opacity: 1; } }

.online { margin-top: 1.75rem; }
.online h3 { font-size: 1.15rem; font-stretch: 88%; font-weight: 720; line-height: 1.2; margin-bottom: 0.35rem; }
.online ul { list-style: none; margin: 0; padding: 0; }
.online li {
  display: grid;
  gap: 0.1rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 40rem) { .online li { grid-template-columns: 9rem 1fr; } }
.online b { font-weight: 680; }
.online span { color: var(--muted); }

.law .spec-notes h3 { margin-top: 0; }
.fine a { color: inherit; }

.later {
  margin-top: 1rem;
  padding: 1rem 1.15rem 1.05rem;
  border: 1.5px dashed var(--rule);
  border-radius: 6px;
}
.later h3, .swaps h3 { font-size: 1.15rem; font-stretch: 88%; font-weight: 720; line-height: 1.2; }
.later p { margin: 0.4rem 0 0; max-width: 64ch; text-wrap: pretty; }
.later b { font-weight: 680; }
.swaps { margin-top: 1.6rem; }
.swaps ul { list-style: none; margin: 0.35rem 0 0; padding: 0; }
.swaps li {
  display: grid;
  gap: 0.1rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 40rem) { .swaps li { grid-template-columns: 7rem 1fr; } }
.swaps b { font-family: var(--mono); font-weight: 500; color: var(--blaze-ink); }
.swaps span { color: var(--muted); text-wrap: pretty; }


/* ---------- desktop ---------- */
.rail { display: none; }

@media (min-width: 64rem) {
  body { font-size: 1.0625rem; }
  main { max-width: 66rem; padding-inline: 3rem; padding-top: 3rem; }
  section { margin-top: 4.5rem; }
  section, .range { scroll-margin-top: 1.5rem; }

  /* first screen: title left, short version right */
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
  .top .picks { margin-top: 0; }
  .masthead .reticle { display: none; }
  h1 { max-width: 10ch; font-size: clamp(4.25rem, 5.6vw, 5.6rem); }
  .lede { font-size: 1.28rem; }
  .picks-grid { grid-template-columns: 1fr; gap: 0.9rem; }

  /* the build sheet reads like an order */
  .sheet li {
    grid-template-columns: 7.5rem minmax(0, 1fr) 11.5rem 7rem;
    grid-template-areas: "part item stock price";
    gap: 0 1.75rem;
    padding: 1.05rem 0;
  }
  .sheet .item { font-size: 1.06rem; }
  .sheet .sub { max-width: 58ch; }
  .sheet .stock { margin-top: 0; }
  .sheet .price { font-size: 1.08rem; }
  .sheet li.total { padding: 1.2rem 0 1.25rem; }
  .sheet li.total .price { font-size: 1.85rem; }

  .pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.75rem;
    align-items: start;
  }
  .pair > .callout, .pair > .later { margin-top: 0; }
  .swaps { margin-top: 2.25rem; }
  .swaps ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .swaps li { grid-template-columns: 6.5rem 1fr; border-top: 1px solid var(--rule); border-bottom: 0; }

  /* rifles as a 2 x 2 */
  .rifles { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
  .rifles li, .rifles li:first-child { padding: 1.05rem 0 1.2rem; border-top: 1px solid var(--rule); border-bottom: 0; }
  .rifles li:nth-child(-n+2) { border-top: 0; padding-top: 0.25rem; }

  /* ranges and shops side by side */
  .options-head p { max-width: 70ch; }
  .scale-legend { display: none; }
  .cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
    align-items: start;
  }
  .cards .range { padding-top: 1.5rem; }
  .cards .range:nth-child(n+3) { border-top: 0; }
  h3 { font-size: 2rem; }

  /* paying */
  .buddy { padding: 1.5rem 1.75rem 1rem; }
  .rules { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .rules > div { grid-template-columns: 1fr; align-content: start; }
  .rules > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .law .spec-notes { gap: 1.75rem 3rem; }
  .law .spec-notes > div.ltc { grid-column: 1 / -1; max-width: 46rem; }
  .fine { max-width: 90ch; }
}

/* wide screens: sticky summary rail on the left */
@media (min-width: 76rem) {
  .page {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
    max-width: 88rem;
    margin: 0 auto;
    padding-inline: 2.5rem;
  }
  main { max-width: 66rem; margin: 0; padding-inline: 0; }
  .rail { display: block; }
}
.rail-inner {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 3rem 0 2rem;
  scrollbar-width: none;
}
.rail-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.rail-mark { flex: none; width: 2.6rem; height: 2.6rem; color: var(--blaze); stroke-width: 2.4; }
.toc { display: grid; }
.toc a {
  padding: 0.42rem 0 0.42rem 0.9rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-weight: 620;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color 160ms ease-out, border-color 160ms ease-out;
}
.toc a:hover { color: var(--ink); border-left-color: var(--muted); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--blaze); }
.tally { margin: 2rem 0 0; border-top: 2px solid var(--ink); }
.tally > div { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.tally dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tally dd { margin: 0.15rem 0 0; font-size: 1.12rem; font-weight: 500; line-height: 1.3; }
.tally dd:not(.mono) { font-size: 0.98rem; font-weight: 640; }
.tally small {
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
}
.tally dd.mono small { display: inline; margin-left: 0.3rem; font-family: var(--mono); }
.rail-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.7rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-weight: 650;
  font-size: 0.93rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.rail-cta svg { flex: none; width: 1.05rem; height: 1.05rem; }
.rail-cta:hover { background: var(--hover-bg); color: var(--hover-fg); }

.ltc { padding-top: 1rem; border-top: 1px solid var(--rule); }
.ltc h3::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; background: var(--blaze); transform: translateY(-0.12rem); }


/* ---------- photos ---------- */
.hero { margin: 0 0 1.5rem; }
.hero a {
  display: block;
  padding: clamp(0.75rem, 2.5vw, 1.75rem) clamp(0.75rem, 3vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: zoom-in;
  transition: border-color 160ms ease-out;
}
.hero a:hover { border-color: var(--blaze-line); }
.hero img { display: block; width: 100%; height: auto; }
.hero figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.92rem; max-width: 70ch; text-wrap: pretty; }
.hero figcaption b { color: var(--ink); font-weight: 650; }

.thumb {
  grid-area: thumb;
  align-self: start;
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: zoom-in;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.thumb:hover { border-color: var(--blaze-line); }
.thumb:active { transform: translateY(1px); }
.thumb img, .later-img img { display: block; width: 100%; height: auto; }
@media (prefers-color-scheme: dark) {
  .thumb, .hero a, .later-img { background: #ededed; }
  .thumb img, .hero img, .later-img img { mix-blend-mode: multiply; }
}
.item-link { color: inherit; text-decoration: underline; text-decoration-color: var(--blaze-line); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.item-link:hover { color: var(--blaze-ink); text-decoration-color: currentColor; }

/* sheet rows now carry a photo column */
.sheet li {
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  grid-template-areas: "thumb part price" "thumb item item" "thumb stock stock";
  column-gap: 0.9rem;
}
@media (min-width: 40rem) {
  .sheet li {
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    grid-template-areas: "thumb part price" "thumb item ." "thumb stock .";
    column-gap: 1.25rem;
    align-items: start;
  }
}
@media (min-width: 64rem) {
  .sheet li {
    grid-template-columns: 9.5rem minmax(0, 1fr) 10.5rem 7rem;
    grid-template-areas: "thumb part . ." "thumb item stock price";
    column-gap: 1.75rem;
    row-gap: 0.2rem;
    align-items: baseline;
  }
  .sheet .thumb { align-self: start; }
  .sheet .part { align-self: end; }
}

.later-img {
  display: block;
  width: 9rem;
  margin: 0 0 0.75rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: zoom-in;
}
@media (min-width: 40rem) {
  .later-img { float: right; width: 8.5rem; margin: 0 0 0.5rem 1rem; }
}

/* photo viewer */
.zoom {
  width: min(92vw, 68rem);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #1a1814;
  box-shadow: 0 24px 80px -20px rgb(0 0 0 / 0.5);
}
.zoom::backdrop { background: rgb(18 17 16 / 0.74); }
.zoom img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.zoom-cap {
  margin: 0;
  padding: 0.8rem 1.15rem 1rem;
  border-top: 1px solid #e6e0d3;
  color: #5b554a;
  font-size: 0.95rem;
}
.zoom-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1.5px solid #1a1814;
  border-radius: 6px;
  background: #1a1814;
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
}
.zoom-close:hover { background: #a33d07; border-color: #a33d07; }
