/* 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; }
}
