/* Tariff Preflight — shared styles. No external fonts, images or scripts. */

:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #16212b;
  --ink-2: #44515d;
  --ink-3: #6b7783;
  --line: #e4dfd5;
  --line-2: #d3ccbe;
  --green: #0f5f4d;
  --green-2: #0b4a3c;
  --green-wash: #e7f2ee;
  --amber: #a85d06;
  --amber-wash: #fbf0dc;
  --red: #a3312a;
  --red-wash: #f9e7e4;
  --slate: #4b5a69;
  --slate-wash: #eceff2;
  --violet: #5b4a9e;
  --violet-wash: #eeebf7;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 10px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: #f0ece3; padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 3px solid #f0a431; outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: #fff; padding: 8px 12px; z-index: 50; }
.fine { font-size: 0.86rem; color: var(--ink-3); }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 44em; }
.eyebrow { font: 600 0.78rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin: 0 0 14px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 244, 0.93); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.12rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.top-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 7px 11px; border-radius: 7px; }
.top-nav a:hover { background: #efebe2; color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--green); font-weight: 600; }
.top-nav a:first-child { background: var(--green); color: #fff; font-weight: 600; }
.top-nav a:first-child:hover { background: var(--green-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--sans); padding: 14px 22px; border-radius: 9px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background 0.12s, border-color 0.12s, transform 0.05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #f0ece3; color: var(--ink); }
.btn-small { padding: 9px 14px; font-size: 0.9rem; }
.btn[disabled], .btn.is-locked { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Sections */
section { padding: 72px 0; }
.hero { padding: 72px 0 56px; }
.hero h1 { max-width: 15em; }
.hero .btn-row { margin-top: 28px; }
.promises { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--ink-2); font-size: 0.95rem; }
.promises li { display: flex; align-items: center; gap: 8px; }
.promises li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ink-band { background: #14232c; color: #e9eef0; }
.ink-band h2, .ink-band h3 { color: #fff; }
.ink-band p { color: #c3ced3; }
.ink-band a { color: #8fd6c2; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.step-no { font: 600 0.8rem/1 var(--mono); color: var(--green); display: block; margin-bottom: 14px; letter-spacing: 0.06em; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.fact { padding: 22px 24px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact b { display: block; font: 600 2rem/1.1 var(--serif); letter-spacing: -0.02em; margin-bottom: 6px; }
.fact span { color: var(--ink-2); font-size: 0.95rem; }
.fact sup a { text-decoration: none; }

/* Timeline figure */
.clock-figure { margin: 30px 0 8px; overflow-x: auto; }
.clock-figure svg { min-width: 720px; display: block; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 18px; }
.legend h3 { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; }
.dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dot.g { background: var(--green); }
.dot.a { background: #d28a1a; }
.dot.r { background: var(--red); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--green); }
.plan .price { font: 600 2.6rem/1 var(--serif); letter-spacing: -0.02em; margin: 6px 0 2px; }
.plan .per { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--line); font-size: 0.96rem; }
.plan li:first-child { border-top: 0; }
.plan li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 11px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.plan .btn { width: 100%; }
.tag { display: inline-block; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); background: var(--green-wash); padding: 6px 9px; border-radius: 5px; margin-bottom: 12px; align-self: flex-start; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 600 1.08rem/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--sans); color: var(--ink-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 46em; }

/* Articles (guides, error pages, legal) */
.article { padding: 56px 0 72px; }
.article h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.article h2 { font-size: 1.5rem; margin-top: 1.8em; }
.article h3 { margin-top: 1.5em; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1em; }
.article li { margin-bottom: 0.4em; }
.crumbs { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.quote-cbp { border-left: 4px solid var(--green); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 22px 0; }
.quote-cbp .label { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 8px; }
.quote-cbp .text { font: 600 1.15rem/1.35 var(--mono); }
.quote-cbp .detail { color: var(--ink-2); margin-top: 6px; font-size: 0.96rem; }
.pill { display: inline-block; font: 600 0.75rem/1 var(--sans); padding: 5px 9px; border-radius: 999px; background: var(--slate-wash); color: var(--slate); white-space: nowrap; }
.pill.file { background: var(--red-wash); color: var(--red); }
.pill.entry { background: var(--amber-wash); color: var(--amber); }
.pill.full { background: var(--green-wash); color: var(--green); }
.callout { background: var(--green-wash); border: 1px solid #c8e2d9; border-radius: var(--radius); padding: 20px 22px; margin: 28px 0; }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.note { background: var(--amber-wash); border: 1px solid #efd9ac; border-radius: var(--radius); padding: 16px 20px; margin: 22px 0; font-size: 0.96rem; }
.note p:last-child { margin-bottom: 0; }

table.plain { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 0.95rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.plain th, table.plain td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { font: 600 0.8rem/1.2 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); background: #f5f2eb; }
table.plain tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.error-list { display: grid; gap: 10px; margin: 18px 0 34px; }
.error-list a { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--ink); }
.error-list a:hover { border-color: var(--green); }
.error-list b { font: 600 0.98rem/1.35 var(--mono); display: block; }
.error-list span.sub { color: var(--ink-3); font-size: 0.9rem; }

/* Forms */
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input[type="email"], .field input[type="text"] { flex: 1; min-width: 220px; font: inherit; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; color: var(--ink); }

/* Footer */
.foot { background: #14232c; color: #b9c5cb; padding: 48px 0 32px; font-size: 0.93rem; }
.foot .brand { display: inline-flex; padding: 0; color: #fff; margin-bottom: 10px; }
.foot .fine { color: #8fa0a8; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.foot h2 { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #8fa0a8; margin-bottom: 12px; }
.foot a { color: #dbe3e6; text-decoration: none; display: block; padding: 3px 0; }
.foot a:hover { color: #fff; text-decoration: underline; }
.disclaimer { border-top: 1px solid #2a3b45; padding-top: 22px; color: #8fa0a8; font-size: 0.84rem; max-width: 70em; margin: 0; }

/* Small utilities */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.center-text { text-align: center; margin-top: 22px; }
.btn-row.center { justify-content: center; }
[hidden] { display: none !important; }

/* Section variants */
.band.tight { padding: 34px 0; }
.hero.slim { padding: 56px 0 30px; }
.cta { text-align: center; padding: 64px 0 80px; }
.cta h2 { margin-bottom: 24px; }
.eyebrow.light { color: #8fd6c2; }
.card.dark { background: #1d303a; border-color: #2e434e; color: #dfe7ea; }
.card.dark ol { padding-left: 1.2em; margin: 0 0 14px; }
.card.dark li { margin-bottom: 6px; }
.card.dark .fine { color: #9fb0b8; }
.card.dark code { background: #14232c; color: #cfe9e1; }

/* What gets checked */
.check-list { list-style: none; padding: 0; margin: 0 0 14px; }
.check-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.check-list li:first-child { border-top: 0; }
.check-list a { color: var(--ink); text-decoration: none; }
.check-list a:hover { color: var(--green); text-decoration: underline; }

/* Comparison and limits */
table.compare th:first-child, table.compare td:first-child { width: 26%; }
table.compare tbody th { background: transparent; text-transform: none; letter-spacing: 0; font: 600 0.95rem/1.35 var(--sans); color: var(--ink); }
table.compare td:last-child, table.compare thead th:last-child { background: var(--green-wash); }
.limits { margin-top: 30px; }
.limits ul { padding-left: 1.2em; margin: 0 0 12px; }
.limits li { margin-bottom: 8px; color: var(--ink-2); }

/* Sources, code samples, keys */
.source-list { padding-left: 1.2em; }
.source-list li { margin-bottom: 14px; }
pre.code { background: #14232c; color: #e3ecef; font: 0.95rem/1.6 var(--mono); padding: 16px 20px; border-radius: var(--radius); overflow-x: auto; margin: 0 0 1.2em; }
.key-box { width: 100%; font: 0.9rem/1.5 var(--mono); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; color: var(--ink); resize: vertical; margin-bottom: 14px; word-break: break-all; }

/* Date calculator */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; }
.calc label { display: block; font-weight: 600; margin-bottom: 8px; }
.calc .field input[type="date"] { font: inherit; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; color: var(--ink); min-width: 200px; }
.calc .fine { margin: 10px 0 0; }
.calc-out { margin: 0 0 24px; }
.calc-out .row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.calc-out .row:first-child { border-top: 0; }
.calc-out .row b { font-weight: 600; }
.calc-out .row .when { font: 600 1rem/1.3 var(--mono); white-space: nowrap; }
.calc-out .row.closed { color: var(--ink-3); }
.calc-out .row.closed .when { text-decoration: line-through; }
.calc-out .verdict { background: var(--green-wash); border: 1px solid #c8e2d9; border-radius: var(--radius); padding: 14px 18px; margin-top: 8px; }
.calc-out .verdict.warn { background: var(--amber-wash); border-color: #efd9ac; }
.calc-out .verdict.late { background: var(--red-wash); border-color: #ebc4bf; }

/* The three-clocks drawing */
.tl-open { fill: #cfe5dd; }
.tl-g { fill: var(--green); }
.tl-a { fill: #d28a1a; }
.tl-r { fill: var(--red); }
.tl-tick { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tl-dot { fill: var(--ink); }
.tl-label { font: 600 15px var(--sans); fill: var(--ink); }
.tl-sub { font: 13px var(--sans); fill: var(--ink-3); }
.tl-span { font: 600 14px var(--sans); }
.tl-span.g { fill: var(--green); }
.tl-span.a { fill: var(--amber); }
.tl-span.r { fill: var(--red); }

@media (max-width: 900px) {
  .grid-3, .plans, .legend, .facts { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 52px 0; }
  .top-nav a:not(:first-child) { display: none; }
}

@media print {
  .top, .foot, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
}
