:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1d1f1c;
  --muted: #565b55;
  --line: #dcdcd3;
  --accent: #1f6b4f;
  --accent-ink: #ffffff;
  --accent-soft: #e4f0ea;
  --warn-soft: #fbf3dc;
  --focus: #1a5fd0;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614;
    --surface: #1d201d;
    --ink: #ecede8;
    --muted: #a9aea6;
    --line: #353a34;
    --accent: #6fcf9f;
    --accent-ink: #0d1a13;
    --accent-soft: #1d3127;
    --warn-soft: #2e2a1b;
    --focus: #8ab4ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.trade-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.trade-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.trade-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.trade-nav a:hover { color: var(--accent); }

.hero { padding: 24px 0 8px; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { color: var(--muted); margin: 0; max-width: 720px; }

#tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 16px 0 32px; }
@media (max-width: 860px) { #tool { grid-template-columns: minmax(0, 1fr); } }

.inputs { display: grid; gap: 16px; }
.group { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.group legend { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.group-rates { background: var(--warn-soft); }
.group-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.help { margin: 0; font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit input, .with-unit select { flex: 0 1 130px; }
.unit { font-size: 13px; color: var(--muted); line-height: 1.25; }
.addon { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.addon input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); margin: 0; }
.addon label { font-size: 14px; font-weight: 600; flex: 1; }
.addon-price { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.addon-price input { width: 76px; }

.addons-title { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.jump { display: none; }
@media (max-width: 860px) {
  .jump { display: block; position: sticky; bottom: 0; z-index: 2; margin: 0 -16px; padding: 12px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; text-align: center; box-shadow: 0 -2px 8px rgb(0 0 0 / 0.2); }
}
#quote-total { scroll-margin-top: 12px; }
.form-msg:empty { display: none; }
.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn-quiet { background: transparent; color: var(--accent); justify-self: start; }
.btn:disabled { opacity: 0.6; cursor: wait; }

.results { position: sticky; top: 12px; display: grid; gap: 14px; min-width: 0; }
@media (max-width: 860px) { .results { position: static; } }
.total { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.total-label { width: 100%; font-size: 14px; opacity: 0.9; }
.total-value { font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.total-sub { font-size: 16px; font-weight: 600; }

.math { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.math summary { font-weight: 700; cursor: pointer; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.steps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.step-label { font-weight: 600; }
.step-math { grid-column: 1; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.step-result { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; text-align: right; }
.steps li.strong .step-result { font-weight: 700; }
.steps li.note { color: var(--muted); }
.steps li.note .step-label { font-weight: 500; }

.sheet-heading { margin: 4px 0 -6px; font-size: 16px; }
.quote-sheet { background: #fff; color: #1d1f1c; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: 14px; }
.quote-sheet header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #1d1f1c; padding-bottom: 8px; margin-bottom: 10px; }
.quote-sheet p { margin: 0; }
.q-biz { font-weight: 700; font-size: 16px; }
.q-meta { text-align: right; }
.q-title { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.q-for { margin-bottom: 8px !important; }
.quote-sheet table { width: 100%; border-collapse: collapse; }
.quote-sheet th, .quote-sheet td { text-align: left; padding: 6px 0; border-bottom: 1px solid #e3e3dc; vertical-align: top; }
.quote-sheet thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #565b55; }
.quote-sheet .amt { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-sheet tfoot th, .quote-sheet tfoot td { font-weight: 700; font-size: 16px; border-bottom: 0; }
.quote-sheet tfoot .q-monthly th, .quote-sheet tfoot .q-monthly td { font-size: 14px; font-weight: 500; }
.q-notes { margin-top: 10px !important; white-space: pre-wrap; }
.q-valid { margin-top: 10px !important; color: #565b55; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copy-status { font-size: 14px; color: var(--muted); width: 100%; min-height: 1.2em; }

.content { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding: 8px 0 40px; align-items: start; }
@media (max-width: 860px) { .content { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: 720px; }
.prose h2 { font-size: 22px; margin: 28px 0 8px; }
.prose h3 { font-size: 17px; margin: 18px 0 4px; }
.prose p, .prose li { color: var(--ink); }
.prose code { font-size: 14px; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 8px 0 0; }

.pro { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 18px; position: sticky; top: 12px; }
@media (max-width: 860px) { .pro { position: static; } }
.pro h2 { font-size: 19px; margin: 0 0 6px; }
.pro p { margin: 0 0 10px; font-size: 15px; }
.pro ul { margin: 0 0 12px; padding-left: 18px; font-size: 15px; }
.pro form { display: grid; gap: 10px; }
.pro label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.pro .fine { font-size: 13px; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quote-view { max-width: 720px; padding-top: 32px; padding-bottom: 32px; }
.quote-view .actions { margin-top: 16px; }
.form-msg { color: #b3261e; font-size: 14px; margin: 0; min-height: 1em; }
@media (prefers-color-scheme: dark) { .form-msg { color: #ffb4ab; } }
.thanks { font-weight: 600; color: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 12px 0 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; color: var(--accent); }
.cards span { font-size: 14px; color: var(--muted); }

.site-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 14px; color: var(--muted); }
.site-foot p { margin: 0 0 6px; }

@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  .quote-sheet, .quote-sheet * { visibility: visible; }
  .quote-sheet { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; font-size: 12pt; }
}
