/* ameticapital.com — educational business arithmetic hub
   Brand accent distinct from ameti.capital --brand:#4a5c4d */
:root {
  --ink: #172f33;
  --paper: #f6f7f4;
  --muted: #526568;
  --brand: #3d5650;
  --line: #c5d0c9;
  --field: #acbcb5;
  --output: #e8efe9;
  --focus: #b07a2a;
}
* { box-sizing: border-box; }
html { overflow-wrap: anywhere; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 system-ui, sans-serif;
}
a { color: var(--brand); text-underline-offset: 4px; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.skip { position: absolute; top: -80px; }
.skip:focus {
  top: 0;
  left: 0;
  background: white;
  padding: 10px 14px;
  z-index: 2;
  color: var(--ink);
}
header, footer, main {
  max-width: 1140px;
  margin: auto;
  padding: 26px 30px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
nav { display: flex; gap: 22px; flex-wrap: wrap; }
.brand {
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: -0.6px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.brand-sub {
  font-weight: 550;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.hero { padding: 65px 0 45px; max-width: 890px; }
.eyebrow {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 2px;
  color: var(--brand);
  text-transform: uppercase;
}
h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.07;
  letter-spacing: -2px;
  margin: 20px 0 24px;
}
h2 { line-height: 1.2; letter-spacing: -0.7px; }
h3 { line-height: 1.25; }
.lead {
  font-size: 21px;
  max-width: 750px;
  color: var(--muted);
}
.button, button {
  display: inline-block;
  background: var(--brand);
  color: white;
  padding: 13px 22px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid currentColor;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 30px 0 55px;
}
.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  text-decoration: none;
  color: var(--ink);
}
.card span { color: var(--brand); font-weight: 700; }
.card p { color: var(--muted); }
.prose { max-width: 800px; margin: 40px auto 65px; }
.prose h1 { font-size: clamp(34px, 5vw, 52px); }
.prose h2 { margin-top: 38px; }
.prose p, .prose li { max-width: 75ch; }
.tool {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  margin: 30px 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 0 24px;
}
.fields-3 { grid-template-columns: 1fr 1fr 1fr; }
label { font-size: 14px; font-weight: 650; }
input, textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px;
  border: 1px solid var(--field);
  border-radius: 6px;
  margin-top: 6px;
  color: var(--ink);
  background: #fdfefb;
}
textarea { min-height: 200px; }
output {
  display: block;
  padding: 20px;
  background: var(--output);
  border-radius: 8px;
  white-space: pre-wrap;
  margin-top: 22px;
  font-weight: 650;
}
.note { font-size: 14px; color: var(--muted); }
.breadcrumbs { font-size: 14px; }
.sources {
  font-size: 14px;
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 20px;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 30px;
  padding-bottom: 45px;
  font-size: 14px;
}
footer nav { margin: 20px 0; }
.facts {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  font-size: 14px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.formula-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 22px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
}
.sibling {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--muted);
}
.disclaimer-callout {
  border-left: 3px solid var(--brand);
  padding: 8px 0 8px 18px;
  margin: 24px 0;
  color: var(--muted);
}
.print-note { display: none; }
[hidden] { display: none !important; }
details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
summary { font-weight: 700; cursor: pointer; }
details p { margin-bottom: 0; }
@media print {
  header, footer, .skip, .actions, form > button, details { display: none !important; }
  main, .prose { max-width: none; margin: 0; padding: 0; }
  .tool { break-inside: avoid; }
  body, output { background: white !important; color: black !important; }
  h1 { font-size: 28px !important; }
  .print-note { display: block; }
  input, textarea { border: 1px solid #888; }
}
@media (max-width: 650px) {
  header { align-items: flex-start; flex-direction: column; }
  header, footer, main { padding: 22px; }
  .hero { padding: 38px 0; }
  .cards, .fields, .fields-3 { grid-template-columns: 1fr; }
  .tool { padding: 20px; }
  nav { gap: 16px; }
  h1 { letter-spacing: -1px; }
}

/* 2026-10-04: tables, sources, code */
table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 0.95rem; }
caption { text-align: left; font-weight: 600; margin-bottom: 6px; }
th, td { border: 1px solid rgba(0,0,0,0.15); padding: 8px 10px; text-align: left; vertical-align: top; }
thead th { background: rgba(0,0,0,0.05); }
.prose table { display: block; overflow-x: auto; }
@media (min-width: 651px) { .prose table { display: table; } }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: rgba(0,0,0,0.05); padding: 1px 4px; border-radius: 3px; }
.sources ul { padding-left: 1.2em; }
.prose h3 { margin-top: 1.4em; }

/* 2026-11-08 Site 16 "The Crossing": designed records, to-scale chart, schematics, capture.
   Appended only — no existing rule above is modified. */
.viz { margin-top: 22px; }
.record-status { margin: 0 0 10px; }
.record-table, .statement { font-variant-numeric: tabular-nums; }
.record-table th { width: 36%; }
.statement .num-col { text-align: right; }
.statement thead th { background: var(--output); }
.statement .rule-top th, .statement .rule-top td { border-top: 2px solid var(--ink); }
.statement .rule-double th, .statement .rule-double td { border-bottom: 3px double var(--ink); }
.statement caption.stmt-note { font-weight: 400; color: var(--muted); font-size: 13px; }
.record-statement { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; background: white; }
.record-statement p { margin: 6px 0; }
.be-chart { margin: 18px 0 4px; }
.be-chart svg { width: 100%; height: auto; display: block; }
.chart-svg .tick { font: 12px system-ui, sans-serif; fill: var(--muted); }
.chart-svg .tick-exact { fill: var(--ink); font-weight: 700; }
.chart-svg .tick-sub { font: 10.5px system-ui, sans-serif; fill: var(--muted); }
.chart-svg .region { font: 600 12.5px system-ui, sans-serif; fill: var(--muted); }
.chart-svg .line-label { font: 600 13px system-ui, sans-serif; fill: var(--ink); }
.chart-svg .callout { font: 700 13.5px system-ui, sans-serif; fill: var(--ink); }
.chart-svg .callout-sub { font: 12px system-ui, sans-serif; fill: var(--muted); }
.chart-svg .annot { font: 11.5px system-ui, sans-serif; fill: var(--muted); }
figure.schematic { margin: 26px 0; padding: 20px 22px; background: white; border: 1px solid var(--line); border-radius: 12px; }
figure.schematic svg { width: 100%; height: auto; display: block; }
figure.schematic figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.schematic .s-label { font: 600 13px system-ui, sans-serif; fill: var(--ink); }
.schematic .s-region { font: 600 12.5px system-ui, sans-serif; fill: var(--muted); }
.schematic .s-note { font: 12px system-ui, sans-serif; fill: var(--muted); }
.capture { margin: 34px 0 8px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.capture h2 { margin-top: 0; }
.capture-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; }
.capture-form label { flex: 1 1 260px; }
@media print {
  .capture { display: none !important; }
  .viz, .be-chart, figure.schematic { break-inside: avoid; }
}

/* ============================================================
   AM-3 VISUAL ELEVATION (2026-11-28) — appended layer.
   Implements the AM-3 spec's token system, chrome, plates and
   settle grammar on the property's existing sheet. No rule above
   is modified; where the legacy element rules (header/footer)
   conflict, the class-scoped rules below win by specificity.
   ============================================================ */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 103.5%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
:root {
  --bg-canvas: #F6F7F4;
  --bg-surface: #FFFFFF;
  --bg-subtle: #ECEFEA;
  --bg-specimen: #F8F1E1;
  --bg-deficit-tint: #F9EDEB;
  --bg-surplus-tint: #E9F2EE;
  --bg-dark: #172F33;
  --bg-dark-elevated: #1F3B40;
  --ink-primary: #172F33;
  --ink-secondary: #435A5E;
  --accent-green: #3D5650;
  --accent-green-hov: #283D38;
  --ink-ochre: #8A5A19;
  --ink-deficit: #8C2D23;
  --ink-surplus: #245743;
  --ink-on-dark: #F6F7F4;
  --ink-on-dark-muted: #C4D2CF;
  --accent-gold: #E8C07A;
  --link-on-dark: #E8C07A;
  --link-on-dark-hov: #F6F7F4;
  --rule-hairline: #D5DDD9;
  --rule-dark: #2B4A4F;
  --border-control: #687E7A;
  --rule-ledger-top: #172F33;
  --font-display: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Header (spec §2) ---------- */
.site-header {
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  position: relative;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--rule-hairline);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 16px;
  height: 57px; max-width: 1160px; margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.site-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink-primary); flex: none;
}
.site-brand__mark { display: block; }
.site-brand__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.125rem, 1.5vw, 1.21875rem);
  letter-spacing: -0.018em; line-height: 1; white-space: nowrap;
}
.site-nav { display: none; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.site-nav__link {
  color: var(--ink-primary); text-decoration: none;
  font-size: 14.5px; font-weight: 500; white-space: nowrap; padding: 6px 0;
}
.site-nav__link:hover { color: var(--accent-green); }
.site-nav__link.is-section-active { box-shadow: inset 0 -2px 0 var(--accent-green); }
.site-nav__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-green); font-weight: 650; }
.site-header__cta { display: none; }
.btn-utility {
  display: inline-block; height: 34px; line-height: 32px; padding: 0 12px;
  border: 1px solid var(--accent-green); border-radius: 6px;
  color: var(--accent-green); text-decoration: none;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn-utility:hover { background: var(--accent-green); color: var(--ink-on-dark); }
.nav-drawer { display: block; border: 0; padding: 0; }
.nav-drawer__toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 10px; cursor: pointer;
  border: 1px solid var(--border-control); border-radius: 6px;
  font-weight: 600; font-size: 14px; color: var(--ink-primary);
  list-style: none;
}
.nav-drawer__toggle::-webkit-details-marker { display: none; }
.nav-drawer__label-open, .nav-drawer .icon-close { display: none; }
.nav-drawer[open] .nav-drawer__label-open { display: inline; }
.nav-drawer[open] .nav-drawer__label-closed, .nav-drawer[open] .icon-bars { display: none; }
.nav-drawer[open] .icon-close { display: block; }
.nav-drawer__panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
  background: var(--bg-canvas); border-bottom: 2px solid var(--ink-primary);
  padding: 12px 16px 20px;
}
.nav-drawer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-drawer__list a {
  display: block; padding: 10px 4px; color: var(--ink-primary);
  text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--rule-hairline);
}
.nav-drawer__list a.nav-drawer__sub { padding-left: 18px; font-weight: 500; }
@media (min-width: 768px) {
  .site-header__inner { height: 59px; }
  .site-nav { display: block; }
  .site-header__cta { display: block; }
  .nav-drawer { display: none; }
}

/* ---------- Footer (spec §2.4) ---------- */
.site-footer {
  max-width: none; margin: 0; padding: 0;
  background: var(--bg-dark); color: var(--ink-on-dark);
  border-top: 0; font-size: 14px;
}
.site-footer a { color: var(--link-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--link-on-dark-hov); text-decoration-thickness: 2px; }
.site-footer__grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  max-width: 1160px; margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 32px) 28px;
}
@media (min-width: 860px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__name { font-family: var(--font-display); font-size: 19px; color: var(--ink-on-dark); }
.site-footer__domain { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-on-dark-muted); }
.site-footer p { color: var(--ink-on-dark-muted); line-height: 1.6; }
.site-footer h3 {
  font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-on-dark); margin: 0 0 12px; font-family: var(--font-sans); font-weight: 650;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__rail {
  border-top: 1px solid var(--rule-dark);
  max-width: 1160px; margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 32px) 26px;
  display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between;
  color: var(--ink-on-dark-muted); font-size: 13px;
}

/* ---------- Typography elevation (spec §1.2) ---------- */
h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.022em; }
.prose h1, .hero h1 { font-family: var(--font-display); font-weight: 500; }
h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.014em; }

/* ---------- Signature plates (spec §4) ---------- */
.sig-plate {
  background: var(--bg-surface);
  border: 1px solid var(--border-control);
  border-top: 2px solid var(--rule-ledger-top);
  border-radius: 0 0 8px 8px;
  margin: 26px 0;
}
.sig-plate__stamp {
  background: var(--bg-specimen); border-bottom: 1px solid var(--rule-hairline);
  padding: 8px 14px; font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-primary);
}
.sig-plate svg { width: 100%; height: auto; display: block; }
.sig-plate__foot {
  border-top: 1px solid var(--rule-hairline); padding: 10px 14px;
  font-size: 13.5px; color: var(--ink-secondary);
}
.plate-label { font: 500 11.5px var(--font-mono); fill: var(--ink-secondary); }
.plate-callout { font: 700 12.5px var(--font-mono); fill: var(--ink-primary); }
.equation-plate {
  background: var(--bg-surface); border: 1px solid var(--rule-hairline);
  border-top: 2px solid var(--rule-ledger-top); border-radius: 0 0 8px 8px;
  padding: 14px 18px; margin: 22px 0;
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between;
}
.equation-plate .eq { font-family: var(--font-mono); font-size: 15px; }
.equation-plate .ex { font-size: 13.5px; color: var(--ink-secondary); }
.equation-plate .ex b { color: var(--ink-ochre); font-family: var(--font-mono); font-weight: 600; }

/* ---------- Guide reading frame (spec §3.5) ---------- */
.guide-frame { display: block; }
@media (min-width: 960px) {
  .guide-frame { display: grid; grid-template-columns: minmax(0, 68ch) 280px; gap: 48px; align-items: start; }
  .guide-rail { position: sticky; top: 24px; border-top: 2px solid var(--ink-primary); padding-top: 14px; }
}
.guide-rail h2 { font-size: 15px; font-family: var(--font-sans); font-weight: 650; letter-spacing: 0; }
.guide-rail ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.guide-toc-mobile { border: 1px solid var(--rule-hairline); border-radius: 8px; padding: 12px 16px; margin: 18px 0; }
@media (min-width: 960px) { .guide-toc-mobile { display: none; } }

/* ---------- Calculator workbench (spec §3.3) ---------- */
.workbench { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 26px 0; }
@media (min-width: 900px) { .workbench { grid-template-columns: 5fr 7fr; align-items: start; } }
.kpi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi {
  background: var(--bg-surface); border: 1px solid var(--rule-hairline); border-radius: 8px;
  padding: 12px 14px;
}
.kpi .kpi-label { font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-secondary); }
.kpi .kpi-value { font-family: var(--font-mono); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.1; }
.table-scroll { overflow-x: auto; }
.scope-pill {
  display: inline-block; background: var(--bg-specimen);
  border: 1px solid var(--ink-ochre); color: var(--ink-primary);
  border-radius: 6px; padding: 8px 14px; font-size: 12.5px; font-weight: 650;
  letter-spacing: 0.05em; margin: 18px 0 6px;
}

/* ---------- Settle grammar (spec §5) ---------- */
.settle-rule, .settle-geometry, .settle-actions { opacity: 1; transform: none; }
@keyframes settle-scale-x { from { opacity: 0; transform: scaleX(0.90); } to { opacity: 1; transform: scaleX(1); } }
@keyframes settle-rise { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes settle-rise-sm { from { opacity: 0; transform: translate3d(0, 4px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@media (prefers-reduced-motion: no-preference) {
  body[data-motion="settle"] .settle-rule { transform-origin: left center; animation: settle-scale-x 210ms cubic-bezier(0.22, 1, 0.36, 1) 0ms both; }
  body[data-motion="settle"] .settle-geometry { animation: settle-rise 240ms cubic-bezier(0.22, 1, 0.36, 1) 60ms both; }
  body[data-motion="settle"] .settle-actions { animation: settle-rise-sm 240ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both; }
}
body[data-motion="none"], body[data-motion="none"] *, body[data-motion="none"] *::before, body[data-motion="none"] *::after {
  animation: none !important; transition: none !important;
}
@media print { .site-footer, .nav-drawer { display: none !important; } }
/* ---------- Stage 3 treatments (spec §3) ---------- */
.kpi-strip{display:flex;flex-wrap:wrap;gap:14px 22px;align-items:baseline;border:1px solid var(--border-strong,#55624A);border-radius:10px;padding:14px 18px;margin:20px 0 6px;background:var(--surface-plate,#F8FAF4)}
.kpi-strip .plate-label{flex-basis:100%}
.kpi{display:flex;flex-direction:column;gap:2px}
.kpi-v{font-size:1.35rem;font-weight:600;color:var(--ink-primary,#172F33)}
.kpi-k{font-size:.82rem;color:var(--ink-secondary,#46533C)}
table.schedule{border-collapse:collapse;width:100%;margin:14px 0 6px;font-size:.95rem}
table.schedule th,table.schedule td{border:1px solid var(--border-hairline,#D8E2CB);padding:7px 10px;text-align:left}
table.schedule caption{text-align:left;font-weight:600;padding:6px 0;color:var(--ink-primary,#172F33)}
table.schedule tr.be-row{background:var(--surface-sunken,#E7EFDB);font-weight:600}
.plate-note{font-size:.9rem;color:var(--ink-secondary,#46533C);margin:6px 0 18px}
.formula-box.specimen{border-left:3px solid var(--accent-primary,#3D5650)}
.doc-ledger{display:flex;flex-wrap:wrap;gap:8px 28px;border:1px solid var(--border-hairline,#D8E2CB);border-radius:10px;padding:12px 18px;margin:16px 0}
.doc-ledger dt{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-muted,#55624A)}
.doc-ledger dd{margin:2px 0 0;font-weight:600}
.sig-plate.readiness{margin-top:26px}
