/* Extra styles for the prerendered pages (firm/<slug>/, 404). Layout and type come from the app stylesheet.
   No inline styles on those pages (CSP), so sizes are classes. Scrollbars are the app's custom ones. */
.logo.s72 { --s: 72px; } .logo.s40 { --s: 40px; } .logo.s30 { --s: 30px; }
.sx-top { position: sticky; top: 0; z-index: 40; background: oklch(0.968 0.012 85 / 0.9); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 3px solid var(--ink); }
.sx-top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.sx-top .brand-sm { font-size: 26px; }
.sx-top .brand-sm .mark { width: 30px; height: 30px; font-size: 30px; }
.sx-nav { display: flex; gap: 4px; margin-left: auto; }
.sx-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.sx-nav a:hover { color: var(--ink); background: var(--paper-3); }
.sx-join { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 999px; }
.crumbs { padding-bottom: 4px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; font-size: 14px; color: var(--ink-3); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.sx-code { cursor: text; user-select: all; }
.rules .sx-size th { position: static; padding: 18px 0 8px; font: 700 12px var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--red); border-bottom: 1px solid var(--ink); background: transparent; }
.rules tbody + tbody .sx-size th { padding-top: 28px; }
.sx-near { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sx-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; }
.sx-card b { display: block; font: 700 17px/1.2 var(--serif); }
.sx-card small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.sx-all-h { margin: 36px 0 12px; font: 700 12px var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.sx-all { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.sx-all a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raise); font-size: 14px; font-weight: 500; text-decoration: none; transition: border-color 150ms var(--ease), color 150ms var(--ease); }
.sx-all a:hover { border-color: var(--ink); color: var(--red); }
.sx-all a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.state-empty { margin-top: 28px; }
/* phones: each plan becomes a card (plan on top, the numbers in a 2-column grid) instead of a table you swipe sideways */
@media (max-width: 680px) {
  .sheet-wrap { overflow: visible; }
  .p-sheet, .p-sheet tbody { display: block; width: 100%; min-width: 0 !important; }
  .p-sheet .s-sub { margin-left: 0; max-width: none; text-align: left; }
  .p-sheet thead { display: none; }
  .p-sheet tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line, #e3ddd2); }
  .p-sheet tr.sx-size { display: block; padding: 0; border: 0; }
  .p-sheet tr.sx-size th { display: block; border-left: 0 !important; border-right: 0 !important; box-shadow: none !important; }
  .p-sheet th[scope=row] { grid-column: 1 / -1; text-align: left; padding: 0; border: 0 !important; position: static; box-shadow: none !important; background: transparent; }
  .p-sheet td { border: 0 !important; box-shadow: none !important; }
  .p-sheet td, .p-sheet td.num { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 0; border: 0; min-width: 0; }
  .p-sheet td::before { content: attr(data-l); font: 700 10.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3, #68625e); margin-bottom: 2px; }
  .p-sheet td.num { text-align: left; }
  .sx-nav { display: none; }
  .sx-join { margin-left: auto; }
  .sx-top .brand-sm { font-size: 22px; }
  .sx-near { grid-template-columns: 1fr; }
}

/* "Go to <firm>" under a live code (links through /go/, the click is counted) */
.p-go { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; margin-top: 10px; border-radius: var(--r-8); background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color 150ms var(--ease), transform 100ms var(--ease); }
.p-go:hover { background: var(--red); }
.p-go:active { transform: scale(0.97); }
.aff-note[hidden] { display: none; }
.profile > .aff-note { margin: 0 0 22px; }

/* corrections page: what we said (struck back to grey), what is right (ink, red rule) */
.corr-head { padding-top: 18px; }
.corr-head .p-title { max-width: 18ch; }
.corr-list { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 18px; max-width: 820px; }
.corr-item { padding: 22px 24px 20px; background: var(--raise); border-radius: var(--r-12); box-shadow: var(--shadow); }
.corr-item time { display: block; font: 700 12px/1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--red); }
.corr-item h2 { margin: 8px 0 14px; font: 700 24px/1.15 var(--serif); letter-spacing: -0.01em; }
.corr-dl { margin: 0; display: grid; gap: 14px; }
.corr-dl > div { padding-left: 16px; border-left: 3px solid var(--line-2); }
.corr-dl > div:nth-child(2) { border-left-color: var(--red); }
.corr-dl dt { font: 700 11.5px/1.2 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); }
.corr-dl dd { margin: 4px 0 0; font-size: 16px; line-height: 1.45; }
.corr-dl dd.was { color: var(--ink-3); font-family: var(--serif); font-size: 18px; }
.corr-dl dd.now { font: 700 19px/1.35 var(--serif); }
.corr-dl dd a { color: var(--ink-2); text-underline-offset: 3px; }
.corr .fine { margin-top: 28px; }

/* ---------- v6 (UI Lab patterns on the prerendered pages) ---------- */
/* reading progress: a red hairline over the top bar's ink rule, driven by the page's scroll (JS fallback in static.js) */
.sx-top { position: sticky; }
.sx-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--red); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .sx-top::after { transform: scaleX(0); animation: sx-prog linear both; animation-timeline: scroll(root block); }
  @keyframes sx-prog { to { transform: scaleX(1); } }
}

/* "On this page": a floating glass capsule pinned under the top bar, the pill follows the section in view */
.sx-spy { position: sticky; top: 76px; z-index: 30; display: flex; justify-content: center; margin: 22px 0 -6px; pointer-events: none; }
.sx-spy-in { position: relative; pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sx-spy-in::-webkit-scrollbar { display: none; }
.sx-spy-in a { position: relative; z-index: 1; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color 150ms var(--ease); }
.sx-spy-in a:hover { color: var(--ink); }
.sx-spy-in a[aria-current='true'] { color: var(--ink); font-weight: 600; }
.sx-spy-pill { position: absolute; z-index: 0; top: 5px; left: 0; height: 38px; width: var(--w, 0px); border-radius: 999px; background: var(--lg-pill); box-shadow: 0 1px 2px rgba(29,23,18,0.12), 0 0 0 1px rgba(29,23,18,0.06); transform: translateX(var(--x, 0px)); opacity: 0; transition: transform 320ms var(--spring), width 320ms var(--spring), opacity 150ms var(--ease); }
.sx-spy-pill.on { opacity: 1; }
.p-block { scroll-margin-top: 132px; }
@media (max-width: 680px) { .sx-spy { top: 70px; margin-top: 16px; } .p-block { scroll-margin-top: 124px; } }

/* copy code: the label morphs to Copied (letters they share stay still), a toast confirms */
.p-copy { gap: 8px; }
.p-copy[hidden] { display: none; }
.p-copy .ml { position: relative; display: inline-flex; overflow: hidden; white-space: pre; transition: width 300ms var(--spring); }
.p-copy .ch { display: inline-block; transition: opacity 180ms ease, filter 180ms ease, transform 220ms var(--ease); }
.p-copy .ch.out { opacity: 0; filter: blur(4px); transform: translateY(-6px); }
.p-copy .ch.in { animation: sx-chin 260ms var(--ease) both; }
@keyframes sx-chin { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }
.p-copy.copied { border-color: var(--add); color: var(--add); background: oklch(0.55 0.12 150 / 0.08); }
.toast-zone .sx-toast { animation: sx-toast-in 240ms var(--spring) both; }
.toast-zone .sx-toast.out { opacity: 0; transform: translateY(8px); transition: opacity 160ms ease, transform 160ms ease; }
@keyframes sx-toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .sx-top::after { animation-duration: auto !important; } }
