/* Ecom Profit Calculator — site styles */

:root {
  --paper: #EDF0EB;
  --paper-deep: #E4E9E2;
  --white: #FFFFFF;
  --ink: #12302F;
  --ink-soft: #1B403E;
  --text: #1B2B2A;
  --muted: #5B6B67;
  --line: #D6DDD5;
  --etsy: #F1641E;
  --shopify: #5E8E3E;
  --gain: #1E9E57;
  --warn: #C26A0A;
  --loss: #D93F45;
  --accent: var(--etsy);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1152px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 8px; }
.brand svg { flex: none; }
.brand-name { white-space: nowrap; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.nav a[aria-current="page"] { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.menu-btn { display: none; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 500; color: var(--ink); }

@media (max-width: 819px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 64px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(18, 48, 47, 0.35);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav a[aria-current="page"] { background: var(--paper); box-shadow: none; }
}

@media (max-width: 400px) { .brand-name { font-size: 16px; } .brand { gap: 8px; } .menu-btn { padding: 8px 10px; } }

/* ---------- Page intro ---------- */
.page-intro { padding-top: 20px; padding-bottom: 28px; }
.page-intro h1 { max-width: 18ch; font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
.page-intro--narrow h1 { max-width: none; }
.lede { margin-top: 12px; max-width: 36rem; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.55; color: var(--muted); }
.updated { margin-top: 10px; font-size: 13px; color: var(--muted); }

.breadcrumb { padding-top: 12px; font-size: 14px; color: var(--muted); }
.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: rgba(91, 107, 103, 0.6); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.9); }

/* ==========================================================================
   Calculator
   ========================================================================== */
.calc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.6); }
.tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--muted); transition: color .15s, background-color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(18, 48, 47, 0.08), inset 0 0 0 1px var(--line); }
.tab-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.currency { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; color: var(--text); }
.select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 48, 47, 0.12); }
@media (max-width: 519px) {
  .calc-bar { flex-direction: column; align-items: stretch; }
  .currency { justify-content: space-between; }
}

.calc-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .calc-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }

/* Input sheet */
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.sheet-section { padding: 24px 20px; }
.sheet-section + .sheet-section { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .sheet-section { padding: 26px 28px; } }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.section-desc { margin-top: 4px; font-size: 14px; color: var(--muted); }
.accent-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.reset-btn { flex: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background-color .15s, color .15s; }
.reset-btn:hover { background: var(--paper); color: var(--ink); }

.fields { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 640px) {
  .fields { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
}
.field { position: relative; }
.field-top { display: flex; align-items: center; gap: 6px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--text); }
.input-wrap { display: flex; align-items: stretch; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 48, 47, 0.12); }
.input-wrap.invalid { border-color: var(--loss); box-shadow: 0 0 0 3px rgba(217, 63, 69, 0.12); }
.affix { display: flex; align-items: center; font-size: 14px; color: var(--muted); user-select: none; -webkit-user-select: none; }
.affix--pre { padding: 0 4px 0 12px; }
.affix--post { padding: 0 12px 0 4px; }
.num-input { width: 100%; min-width: 0; padding: 10px 12px 10px 0; border: 0; background: transparent; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); outline: none; }
.num-input--pct { padding: 10px 0 10px 12px; }
.num-input::placeholder { color: rgba(91, 107, 103, 0.5); }
.num-input::-webkit-outer-spin-button, .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input { -moz-appearance: textfield; appearance: textfield; }
.help { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.help.is-error { color: var(--loss); }
.input-row { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) {
  .input-row { flex-direction: row; align-items: center; gap: 16px; }
  .input-row .input-wrap { width: calc(50% - 10px); flex: none; }
  .input-row .chips { margin-top: 6px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: border-color .15s, color .15s, background-color .15s; }
.chip:hover { border-color: rgba(18, 48, 47, 0.5); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Tooltips */
.tip { display: inline-flex; }
.tip-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 600; line-height: 1; color: var(--muted); transition: border-color .15s, color .15s; }
.tip-btn:hover { border-color: var(--ink); color: var(--ink); }
.tip-body { display: none; position: absolute; top: 28px; left: 0; right: 0; z-index: 30; padding: 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.55; box-shadow: 0 12px 30px -12px rgba(18, 48, 47, 0.55); }
@media (hover: hover) { .tip:hover .tip-body { display: block; } }
.tip.open .tip-body, .tip-btn:focus-visible + .tip-body { display: block; }

/* Results */
.results { display: grid; gap: 24px; }
.summary { padding: 24px; border-radius: 24px; background: var(--ink); color: #fff; box-shadow: 0 24px 50px -28px rgba(18, 48, 47, 0.7); }
@media (min-width: 640px) { .summary { padding: 28px; } }
.summary :focus-visible { outline-color: #fff; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-label { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, 0.7); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.85); }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.net { margin-top: 8px; font-family: var(--font-display); font-size: clamp(2.75rem, 8vw, 3.9rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.margin-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.margin-group { display: inline-flex; align-items: center; gap: 8px; }
.margin-text { font-size: 14px; color: rgba(255, 255, 255, 0.75); }
.margin-text strong { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.summary .tip-btn { border-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.75); }
.summary .tip-btn:hover { border-color: #fff; color: #fff; }
.summary .tip-body { top: 36px; background: #fff; color: var(--text); }

.gauge { margin-top: 16px; }
.gauge-track { position: relative; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.gauge-fill { width: 0; height: 100%; border-radius: 999px; transition: width .3s ease-out, background-color .3s; }
.gauge-tick { position: absolute; top: 0; width: 1px; height: 100%; background: rgba(255, 255, 255, 0.3); }
.gauge-scale { position: relative; height: 16px; margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.5); font-variant-numeric: tabular-nums; }
.gauge-scale span { position: absolute; left: 0; }
.gauge-scale .mid { transform: translateX(-50%); }
.gauge-scale .end { left: auto; right: 0; }

.split { margin-top: 28px; }
.split-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.split-title { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: #fff; }
.split-total { white-space: nowrap; font-size: 14px; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.split-wrap { position: relative; margin-top: 12px; }
.split-bar { display: flex; gap: 2px; height: 40px; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }
.seg { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--ink); transition: width .3s ease-out; }
.loss-marker { position: absolute; top: -6px; bottom: -6px; width: 2px; border-radius: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.split-note { margin-top: 12px; font-size: 14px; line-height: 1.55; }
.legend { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.legend-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: rgba(255, 255, 255, 0.8); }
.legend-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-val { flex: none; color: #fff; font-variant-numeric: tabular-nums; }
.legend-pct { display: inline-block; width: 3.4em; margin-left: 8px; text-align: right; color: rgba(255, 255, 255, 0.5); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0 0; overflow: hidden; border-radius: 12px; background: rgba(255, 255, 255, 0.1); }
.stat { padding: 16px; background: var(--ink-soft); }
.stat dt { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.stat dd { margin: 0; }
.stat-value { margin-top: 4px !important; font-family: var(--font-display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 2px !important; font-size: 11px; line-height: 1.35; color: rgba(255, 255, 255, 0.5); }

.compare { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding: 16px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; }
.compare-text { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.75); }
.compare-text strong { font-weight: 600; color: #fff; }
.btn-light { align-self: flex-start; padding: 8px 14px; border-radius: 8px; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); }
.btn-light:hover { background: rgba(255, 255, 255, 0.9); }

/* Breakdown */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.breakdown-head { padding: 20px 20px 0; }
.breakdown-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.breakdown-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; padding: 12px 20px 20px; }
@media (min-width: 640px) { .breakdown-head { padding: 22px 24px 0; } .table-scroll { padding: 12px 24px 22px; } }
.bd-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.bd-table td { padding: 8px 0; vertical-align: baseline; }
.bd-table td.num { padding-left: 8px; text-align: right; white-space: nowrap; }
.bd-table td.pct { width: 4.6em; padding-left: 12px; text-align: right; white-space: nowrap; font-size: 12px; color: var(--muted); }
.bd-table th.group { padding: 20px 0 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
.bd-table tr:first-child th.group { padding-top: 4px; }
.bd-table tr.total td { border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.bd-table tr.total td.pct { font-weight: 400; color: var(--muted); }
.bd-table tr.grand td { padding-top: 12px; border-top: 2px solid rgba(18, 48, 47, 0.8); font-weight: 600; color: var(--ink); }
.bd-table tr.grand td.pct { font-weight: 400; color: var(--muted); }
.bd-table tr.net td { font-size: 16px; font-weight: 600; color: var(--ink); }
.bd-table tr.net td.pct { font-size: 12px; }

/* Floating summary */
.float-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); pointer-events: none; opacity: 0; transform: translateY(140%); transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease; }
.float-bar.is-visible { opacity: 1; transform: none; }
.float-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 28rem; margin: 0 auto; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45); pointer-events: auto; }
.float-inner :focus-visible { outline-color: #fff; }
.float-label { font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.float-values { display: flex; align-items: baseline; gap: 8px; }
.float-net { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.float-margin { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.float-btn { flex: none; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); font-size: 14px; font-weight: 500; color: #fff; }
.float-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* ==========================================================================
   Content
   ========================================================================== */
.content-section { padding-top: 64px; }
.prose { max-width: 44rem; }
.prose > h2 { margin-top: 52px; font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 650; letter-spacing: -0.02em; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; font-size: 1.2rem; font-weight: 600; }
.prose p { margin-top: 16px; font-size: 17px; line-height: 1.7; }
.prose ul, .prose ol { margin: 16px 0 0; padding-left: 1.3rem; }
.prose li { margin-top: 10px; padding-left: 4px; font-size: 17px; line-height: 1.65; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(18, 48, 47, 0.4); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose .formula { padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 10px; background: #fff; font-size: 16px; font-weight: 500; line-height: 1.6; color: var(--ink); }
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table-wrap th, .table-wrap td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.table-wrap thead th { background: #F5F7F4; font-size: 14px; font-weight: 600; color: var(--ink); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap th:first-child, .table-wrap td:first-child { min-width: 8rem; }

.callout { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 36px; padding: 22px; border-radius: 16px; background: var(--ink); }
.prose .callout p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }
.prose .callout a.btn { text-decoration: none; color: var(--ink); }
.prose a.btn-primary { color: #fff; text-decoration: none; }

/* FAQ */
.faq { margin-top: 16px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 0.9; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-bottom: 18px; }
.prose .faq .answer p:first-child { margin-top: 0; }

/* Guide list */
.guide-list { display: grid; margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prose .guide-list { padding-left: 0; }
.prose .guide-list li { margin: 0; padding: 0; }
.guide-row { border-bottom: 1px solid var(--line); }
.guide-row a { display: block; padding: 20px 0; text-decoration: none; }
.guide-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; }
.guide-row .guide-title { margin-top: 6px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.guide-row a:hover .guide-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-dek { max-width: 40rem; margin-top: 6px !important; font-size: 15px !important; line-height: 1.55 !important; color: var(--muted); }

/* Articles */
.article-head { max-width: 46rem; padding-bottom: 8px; }
.article-head h1 { margin-top: 18px; font-size: clamp(2rem, 4.8vw, 3.1rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
.article-dek { margin-top: 16px; font-size: clamp(1.05rem, 1.8vw, 1.2rem); line-height: 1.55; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.article-layout { display: grid; gap: 28px; padding-top: 28px; }
.toc { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.toc-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.toc ol { margin: 10px 0 0; padding-left: 1.2rem; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.toc li { margin-top: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 44rem) 15rem; justify-content: space-between; gap: 56px; }
  .toc { order: 2; position: sticky; top: 24px; align-self: start; }
  .article-body { order: 1; }
}
.related { max-width: 44rem; margin-top: 64px; }
.related-title { font-size: clamp(1.4rem, 2.6vw, 1.75rem); font-weight: 650; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 36rem; }
.form label { display: block; font-size: 14px; font-weight: 500; color: var(--text); }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 48, 47, 0.12); }
.form textarea { min-height: 160px; resize: vertical; }
.form .btn { border: 0; }
.hp { position: absolute; left: -9999px; }
.prose .form-note { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--paper-deep); }
.has-calc .site-footer { padding-bottom: 88px; }
@media (min-width: 1024px) { .has-calc .site-footer { padding-bottom: 72px; } }
.footer-inner { padding-top: 44px; padding-bottom: 36px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 0.8fr; } }
.footer-blurb { max-width: 22rem; margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-col h2 { font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.footer-col ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.footer-col a { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
