/* ==========================================================================
   First Mile — one stylesheet, no framework, no build step.
   Ground is a cool near-white, the primary is a sport blue, and the accent is
   a running orange used only for numbers and markers so it never competes.
   Every colour pair used for text is checked in tools-build/csscheck.js.
   ========================================================================== */

:root {
  --bg: #f5f7fa;
  --bg-tint: #edf1f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --text: #101828;
  --text-soft: #33415c;
  --text-mute: #55617a;

  --primary: #1a4fd6;
  --primary-strong: #123ba6;
  --primary-wash: #e6edfd;

  --accent: #ef5b25;
  --accent-ink: #c0410f;
  --accent-wash: #fdece4;

  --line: #dbe3ee;
  --line-strong: #c2cddd;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .05), 0 12px 28px rgba(16, 24, 40, .08);

  --sans: 'Inter', 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --wrap: 1120px;
  --read: 760px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary-strong);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  letter-spacing: -.03em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -.01em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-size: 1.0625rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--bg-tint);
  color: var(--text);
}

.site-nav a[aria-current='page'] {
  color: var(--primary);
  background: var(--primary-wash);
}

.header-cta {
  margin-left: 8px;
}

/* The nav link rule is more specific than .btn-primary, so the CTA needs its
   own colour rule or it renders dark text on a blue pill. */
.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-tint);
  border-color: var(--text-mute);
  color: var(--text);
}

.btn-sm {
  padding: 9px 16px;
  font-size: .875rem;
}

.btn:active {
  transform: translateY(1px);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

/* A track-lane texture, not a photograph: six thin lanes bending out of the
   bottom-left corner. It reads as movement without adding an image request. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, rgba(26, 79, 214, .07) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(115deg, rgba(239, 91, 37, .05) 0 1px, transparent 1px 138px);
  mask-image: radial-gradient(120% 90% at 78% 10%, #000 0%, transparent 72%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 72px 64px;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin-bottom: 18px;
}

.hero-lede {
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  color: var(--text-soft);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-mute);
  font-size: .875rem;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-facts svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex: 0 0 auto;
}

/* ---------- sections ---------- */

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 44px 0;
}

.section-alt {
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  color: var(--text-mute);
  max-width: 58ch;
}

.section-head .section-link {
  flex: 0 0 auto;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 2px;
}

.section-link::after {
  content: ' \2192';
}

/* ---------- tool cards ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--primary-wash);
  color: var(--primary);
}

.tool-icon svg {
  width: 22px;
  height: 22px;
}

.tool-card h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
}

.tool-card p {
  margin: 0 0 18px;
  color: var(--text-mute);
  font-size: .9375rem;
  line-height: 1.55;
}

.tool-card-example {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- audience ---------- */

.segment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.segment {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
}

.segment-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segment-top svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex: 0 0 auto;
}

.segment h3 {
  margin: 0;
  font-size: 1rem;
}

.segment-line {
  margin: 0;
  color: var(--text-soft);
  font-size: .875rem;
  font-weight: 600;
}

.segment p {
  margin: 0;
  color: var(--text-mute);
  font-size: .875rem;
  line-height: 1.55;
}

.segment a {
  margin-top: auto;
  padding-top: 6px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}

.segment a::after {
  content: ' \2192';
}

/* ---------- post list ---------- */

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.post-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.post-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-wash);
  color: var(--primary-strong);
  letter-spacing: .02em;
}

.post-card h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.post-card p {
  margin: 0;
  color: var(--text-mute);
  font-size: .9375rem;
  line-height: 1.55;
}

/* ---------- faq preview ---------- */

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq-item {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
}

.faq-item:hover {
  border-color: var(--primary);
  color: var(--text);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--text-mute);
  font-size: .875rem;
}

/* ---------- tool page ---------- */

.tool-head {
  padding: 40px 0 8px;
}

.tool-head h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  margin-bottom: 10px;
}

.tool-head p {
  color: var(--text-mute);
  max-width: 62ch;
  margin: 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 26px 0 8px;
}

.tool-form {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.tool-result {
  position: sticky;
  top: 84px;
  padding: 24px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-soft);
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: .8125rem;
  color: var(--text-mute);
  font-weight: 400;
}

input[type='number'],
input[type='text'],
select {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: .9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  appearance: none;
}

input[type='number'] {
  font-variant-numeric: tabular-nums;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355617a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 36px;
}

input:focus,
select:focus {
  border-color: var(--primary);
  outline: 2px solid var(--primary-wash);
  outline-offset: 1px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-row label span {
  display: block;
  margin-bottom: 5px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* Segmented control: three or four short options that do not deserve a select. */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.segmented button {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}

.segmented button:hover {
  background: var(--surface);
  color: var(--text);
}

.segmented button[aria-pressed='true'] {
  background: var(--primary);
  color: #fff;
}

.segmented button[aria-pressed='true']:hover {
  background: var(--primary-strong);
  color: #fff;
}

/* ---------- result panel ---------- */

.result-lead {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.result-lead-label {
  display: block;
  margin-bottom: 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.result-value {
  display: block;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--primary-strong);
  font-variant-numeric: tabular-nums;
}

.result-unit {
  display: block;
  margin-top: 6px;
  font-size: .9375rem;
  color: var(--text-mute);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
}

.result-grid div {
  min-width: 0;
}

.result-grid dt {
  margin-bottom: 3px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.result-grid dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.result-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .875rem;
  color: var(--text-soft);
}

.result-note p {
  margin: 0 0 6px;
}

.result-note p:last-child {
  margin-bottom: 0;
}

/* ---------- tables inside results ---------- */

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

caption {
  text-align: left;
  padding-bottom: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num,
th.num {
  text-align: right;
}

tr.is-partial td {
  color: var(--text-mute);
  font-style: italic;
}

/* ---------- plan table ---------- */

.plan-week {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.plan-week:last-child {
  border-bottom: 0;
}

.plan-week-total {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary-strong);
}

.plan-week-focus {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.plan-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.plan-sessions li {
  display: flex;
  gap: 8px;
}

.plan-sessions .day {
  flex: 0 0 30px;
  font-weight: 700;
  color: var(--text-mute);
}

/* ---------- chips ---------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-soft);
}

.chip-good {
  background: var(--primary-wash);
  border-color: #c3d3fb;
  color: var(--primary-strong);
}

.chip-avoid {
  background: var(--accent-wash);
  border-color: #f7cdb9;
  color: var(--accent-ink);
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  padding: 22px 0 0;
  font-size: .8125rem;
  color: var(--text-mute);
}

main > .breadcrumb {
  max-width: var(--read);
  margin-inline: auto;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 6px;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--text-mute);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---------- reading pages ---------- */

.article {
  max-width: var(--read);
  margin: 0 auto;
  padding: 26px 0 56px;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.article h1 {
  font-size: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);
  margin-bottom: 14px;
}

.article-lede {
  font-size: 1.125rem;
  color: var(--text-soft);
  margin-bottom: 26px;
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.tool-foot {
  margin-top: 28px;
}

.article-tools p {
  flex: 1 1 260px;
  margin: 0;
  font-size: .875rem;
  color: var(--text-mute);
  align-self: center;
}

/* ---------- prose ---------- */

.prose {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text-soft);
  overflow-wrap: break-word;
}

.prose > p,
.prose > ul,
.prose > ol {
  max-width: 68ch;
}

.prose h2 {
  margin: 2em 0 .6em;
  font-size: 1.5rem;
  color: var(--text);
}

.prose h3 {
  margin: 1.7em 0 .5em;
  font-size: 1.1875rem;
  color: var(--text);
}

.prose p {
  margin: 0 0 1.15em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: .45em;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose a {
  font-weight: 600;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-soft);
  font-size: 1rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .875em;
  color: var(--text);
}

.prose .code-block {
  margin: 1.4em 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.55;
  color: var(--text);
}

.prose .code-block code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  margin: 1.4em 0;
  font-size: .9375rem;
}

.prose table th {
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
}

.prose .callout {
  margin: 1.6em 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--primary-wash);
  border: 1px solid #cfdcfc;
  color: var(--text-soft);
  font-size: 1rem;
}

.prose .callout p:last-child {
  margin-bottom: 0;
}

.prose .callout-warn {
  background: var(--accent-wash);
  border-color: #f8d2c0;
}

/* ---------- index page headers ---------- */

.page-head {
  padding: 48px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-head h1 {
  margin-bottom: 10px;
}

.page-head p {
  margin: 0;
  max-width: 60ch;
  color: var(--text-mute);
  font-size: 1.0625rem;
}

/* ---------- list rows (guides / faq index) ---------- */

.row-list {
  display: grid;
  gap: 12px;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
}

.row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.row-item h3 {
  margin: 0 0 4px;
  font-size: 1.0625rem;
}

.row-item h3 a {
  text-decoration: none;
  color: var(--text);
}

.row-item h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.row-item p {
  margin: 0;
  color: var(--text-mute);
  font-size: .9375rem;
}

.row-item-meta {
  align-self: start;
  justify-self: end;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--text-mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 24px;
  padding: 52px 0 26px;
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: .875rem;
  color: var(--text-mute);
  line-height: 1.6;
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: .875rem;
  color: var(--text-soft);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-col a.footer-more {
  font-weight: 700;
  color: var(--primary);
}

.footer-legal {
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  font-size: .8125rem;
  color: var(--text-mute);
}

.footer-legal p {
  margin: 0 0 4px;
}

.footer-legal p:last-child {
  margin-bottom: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .tool-grid,
  .segment-grid,
  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-result {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 58px;
    gap: 12px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 11px 12px;
  }

  .header-cta {
    margin-left: 0;
    margin-top: 8px;
  }

  .header-cta .btn {
    width: 100%;
  }

  .hero-inner {
    padding-block: 48px 44px;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .faq-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-item-meta {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .tool-grid,
  .segment-grid,
  .post-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-row label span {
    font-size: .6875rem;
  }

  .segmented {
    flex-wrap: nowrap;
  }

  .segmented button {
    flex: 1 1 0;
    padding: 9px 6px;
    font-size: .8125rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* ---------- print ---------- */

@media print {
  .site-header,
  .site-footer,
  .tool-form,
  .hero-actions,
  .article-tools {
    display: none;
  }

  body {
    background: #fff;
  }

  .tool-result {
    border: 1px solid #999;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .01ms;
    animation-duration: .01ms;
  }

  .tool-card:hover {
    transform: none;
  }
}
