/* ShelfCall guide and tool pages. Same Shelf Tag tokens as the home page
   and the app. Yellow belongs to the mic. */
:root {
  --bg: #e9ece6; --surface: #f7f8f4; --ink: #141a16; --muted: #56615a; --line: #cbd2c9;
  --accent: #f2c230; --accent-ink: #141a16; --ok: #2a7148; --warn: #a8431b;
  --band: #141a16; --band-ink: #e6ebe4; --band-muted: #8f9a90; --band-line: #2b332d;
  --font: Archivo, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --gutter: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111613; --surface: #1a201c; --ink: #e6ebe4; --muted: #8f9a90; --line: #2b332d;
    --ok: #6fbf8b; --warn: #f08a5d;
    --band: #0b0f0c; --band-ink: #e6ebe4; --band-muted: #8f9a90; --band-line: #232a25;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; }
.mono { font-family: var(--mono); }
.display { font-stretch: 62%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.005em; line-height: 0.92; text-wrap: balance; margin: 0; }
.label { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); }
.tag { display: inline-block; background: var(--ink); color: var(--bg); font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; padding: 5px 9px; border-radius: 3px; text-decoration: none; }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px var(--gutter); border-bottom: 1px solid var(--line); }
.brand { font-size: 30px; text-decoration: none; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a.tag, .top nav a.tag:hover { color: var(--bg); }

/* Page head */
.crumbs { padding: 28px var(--gutter) 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.head { padding: 18px var(--gutter) 40px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
h1.display { font-size: 96px; max-width: 980px; }
.lede { margin: 0; font-size: 20px; color: var(--muted); max-width: 640px; text-wrap: pretty; }

/* Two columns: the thing, and the reading beside it */
.body { padding: 0 var(--gutter) 72px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.body.solo { grid-template-columns: minmax(0, 760px); }
.aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }

/* Long-form reading */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 44px; line-height: 0.95; margin: 1.6em 0 0; text-wrap: balance; }
.prose h3 { font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; font-size: 21px; line-height: 1.1; margin: 1.4em 0 0; }
.prose p, .prose li { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose .said { font-style: italic; }
.prose code, .prose .num { font-family: var(--mono); font-size: 0.86em; }
.note { border-left: 4px solid var(--ink); background: var(--surface); padding: 14px 18px; border-radius: 0 4px 4px 0; }
.note strong { font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; display: block; margin-bottom: 2px; }
.formula { font-family: var(--mono); font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; overflow-x: auto; white-space: nowrap; }

/* Cards and panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head .display { font-size: 28px; }
.panel-body { padding: 20px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.chart { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.chart th { text-align: right; font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
table.chart td { text-align: right; font-family: var(--mono); font-size: 15px; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.chart th:first-child, table.chart td:first-child { text-align: left; }
table.chart tbody tr:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
table.chart td.strong { font-weight: 700; }
table.chart caption { caption-side: top; text-align: left; padding: 0 0 10px; }

/* The tenths gauge from the app */
.gauge { display: inline-flex; gap: 2px; height: 16px; vertical-align: -3px; margin-right: 10px; }
.gauge i { width: 3px; height: 100%; border-radius: 1px; background: var(--line); }
.gauge i.on { background: var(--ink); }

/* Calculators */
.calc { display: flex; flex-direction: column; gap: 18px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--muted); }
input.in, select.in { width: 100%; min-width: 0; border: 1.5px solid var(--line); border-radius: 4px; background: var(--bg); padding: 11px 12px; font: inherit; font-family: var(--mono); font-size: 16px; color: var(--ink); }
input.in.text { font-family: var(--font); }
input.in:focus, select.in:focus { outline: none; border-color: var(--ink); }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.result { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.result .n { font-family: var(--mono); font-weight: 600; font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.result .sub { font-size: 13px; color: var(--muted); }
.result.bad .n { color: var(--warn); }
.result.good .n { color: var(--ok); }
.rows { width: 100%; border-collapse: collapse; }
.rows th { text-align: left; font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; color: var(--muted); padding: 0 6px 8px; white-space: nowrap; }
.rows td { padding: 4px 6px; vertical-align: middle; }
.rows td.out { font-family: var(--mono); font-size: 15px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows td.out.bad { color: var(--warn); }
.rows .in { padding: 9px 8px; font-size: 15px; }
.rows .x { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.rows .x:hover { color: var(--warn); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); border-radius: 4px; padding: 12px 18px; font: inherit; font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--muted); border-color: var(--muted); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* "Or just say it" */
.say { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.say .disc { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.say .display { font-size: 30px; }
.say p { margin: 0; font-size: 15px; color: var(--muted); }
.say a { font-weight: 700; }

/* Related pages */
.related { padding: 0 var(--gutter) 72px; }
.related h2 { font-size: 40px; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-top: 1px solid var(--ink); text-decoration: none; }
.card:hover { background: var(--surface); }
.card .display { font-size: 26px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

/* Signup band */
.band { background: var(--band); color: var(--band-ink); }
.cta { padding: 64px var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; }
.cta h2 { font-size: 64px; }
.cta p { margin: 12px 0 0; color: var(--band-muted); font-size: 17px; max-width: 46ch; }
.signup { display: flex; gap: 8px; width: 100%; }
.signup input[type=email] { flex: 1; min-width: 0; border: 1.5px solid var(--band-line); border-radius: 4px; background: #1a201c; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--band-ink); }
.signup input[type=email]:focus { outline: none; border-color: var(--band-ink); }
.signup input::placeholder { color: var(--band-muted); }
.signup button { background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--accent); border-radius: 4px; padding: 14px 20px; font: inherit; font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; cursor: pointer; white-space: nowrap; }
.signup button[disabled] { opacity: 0.6; cursor: progress; }
.band :focus-visible { outline-color: var(--band-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { border: 1.5px solid #6fbf8b; border-left-width: 5px; border-radius: 4px; padding: 16px 18px; font-size: 17px; overflow-wrap: anywhere; }
.done strong { color: #6fbf8b; font-stretch: 75%; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; display: block; margin-bottom: 4px; }
.err { font-size: 15px; color: #f08a5d; min-height: 20px; margin-top: 8px; }

/* Footer */
.foot { border-top: 1px solid var(--band-line); padding: 36px var(--gutter); display: grid; grid-template-columns: 1fr repeat(3, auto); gap: 40px 56px; font-size: 14px; color: var(--band-muted); }
.foot .display { font-size: 22px; color: var(--band-ink); }
.foot h3 { margin: 0 0 10px; font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--band-muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.foot a { color: var(--band-ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  h1.display { font-size: 72px; }
  .body { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .aside { position: static; }
  .cta { grid-template-columns: 1fr; gap: 24px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top { padding: 16px var(--gutter); }
  .brand { font-size: 26px; }
  .top nav { gap: 14px; }
  .top nav .hide-sm { display: none; }
  .crumbs { padding-top: 20px; }
  .head { padding-bottom: 28px; gap: 16px; }
  h1.display { font-size: clamp(44px, 13vw, 64px); }
  .lede { font-size: 18px; }
  .body { padding-bottom: 48px; }
  .formula { white-space: normal; }
  .prose h2 { font-size: 36px; }
  .panel-body { padding: 16px; }
  table.chart th, table.chart td { padding: 8px 8px; }
  table.chart td { font-size: 14px; }
  .related { padding-bottom: 48px; }
  .cta { padding: 48px var(--gutter); }
  .cta h2 { font-size: 48px; }
  .signup { flex-direction: column; }
  .foot { grid-template-columns: 1fr; gap: 24px; }
  /* Row tables stack into cards on a phone */
  .rows thead { display: none; }
  .rows, .rows tbody, .rows tr, .rows td { display: block; width: 100%; }
  .rows tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rows td { padding: 0; }
  .rows td[data-label]::before { content: attr(data-label); display: block; font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .rows td.wide { grid-column: 1 / -1; }
  .rows td.out { text-align: left; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #999; color-scheme: light; }
  .top nav, .crumbs, .aside, .related, .band, .no-print { display: none !important; }
  .top { padding: 0 0 8px; }
  .head { padding: 10px 0 14px; }
  h1.display { font-size: 40px; }
  .lede { font-size: 13px; }
  .body { display: block; padding: 0; }
  .panel { border: 0; }
  table.chart td { font-size: 11px; padding: 4px 8px; }
  table.chart th { font-size: 10px; padding: 4px 8px; }
  a { text-decoration: none; }
}
