/* CycleBrief public site: shipping-manifest system.
   Forms are printed in one blue ink; entries are typed in blue-black. Red is reserved for dates you can miss. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --paper: #f5f6f4;      /* carbon-copy paper */
  --sheet: #ffffff;      /* form sheet */
  --ink: #18212d;        /* typed entries */
  --ink-2: #4a5563;      /* secondary entries */
  --form: #2b5797;       /* printed form ink: labels, frames */
  --rule: #b7c5da;       /* printed form lines */
  --rule-soft: #dde4ee;
  --stamp: #b42318;      /* deadlines only */
  --canary: #f4eaa8;     /* new today */
  --canary-ink: #5c4a00;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --cond: "wdth" 66;
  --norm: "wdth" 100;
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: var(--norm);
  color: var(--ink); background: var(--paper);
  font-size: 17px; line-height: 1.55;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--form); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--form); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
img, svg { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, .code { font-family: var(--mono); font-size: .86em; letter-spacing: 0; }

/* Type scale (perfect fourth from 17px) */
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.05; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-variation-settings: var(--cond); font-size: clamp(2.5rem, 6.4vw, 4.4rem); font-weight: 850; line-height: .98; }
h2 { font-variation-settings: var(--cond); font-size: clamp(1.75rem, 3.4vw, 2.35rem); font-weight: 820; }
h3 { font-size: 1.12rem; font-weight: 720; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 66ch; }
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

.page { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; }
section.sec { padding: 64px 0 8px; }
section.sec > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: end; margin-bottom: 28px; }
section.sec > header p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { section.sec > header { grid-template-columns: 1fr; gap: 10px; } }

/* Masthead: the form's printed header */
.mast { background: var(--sheet); border-bottom: 1.5px solid var(--form); position: sticky; top: 0; z-index: 20; }
.mast .page { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 850; font-size: 1.32rem; font-variation-settings: var(--cond); letter-spacing: .005em; }
.brand svg { width: 24px; height: 24px; color: var(--form); }
.mast nav { display: flex; align-items: center; gap: 4px; }
.mast nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; font-size: .95rem; border-radius: 2px; }
.mast nav a:hover, .mast nav a[aria-current="page"] { background: var(--paper); }
.mast nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--form); }
.mast .menu { display: none; }
@media (max-width: 900px) {
  .mast nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sheet); border-bottom: 1.5px solid var(--form); flex-direction: column; align-items: stretch; padding: 8px 20px 16px; }
  .mast nav.open { display: flex; }
  .mast .menu { display: inline-flex; font: inherit; background: none; border: 1px solid var(--rule); padding: 8px 12px; border-radius: 2px; color: var(--ink); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1rem; padding: 13px 22px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 3px; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: #26354a; border-color: #26354a; }
.btn.line { background: transparent; color: var(--ink); }
.btn.line:hover { background: var(--sheet); }
.btn.sm { padding: 8px 14px; font-size: .9rem; }
.mast nav a.btn { padding: 9px 16px; font-size: .92rem; margin-left: 8px; color: #fff; background: var(--ink); }
.mast nav a.btn:hover { background: #26354a; }
@media (max-width: 900px) { .mast nav a.btn { margin: 8px 0 0; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Form sheet: boxes with printed labels and typed entries */
.sheet { background: var(--sheet); border: 1.5px solid var(--form); }
.boxes { display: grid; grid-template-columns: repeat(12, 1fr); }
.box { grid-column: span 12; padding: 10px 14px 12px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); min-width: 0; }
.box > .lbl { display: block; color: var(--form); font-size: .78rem; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.box > .val { display: block; color: var(--ink); font-weight: 600; }
.box.s3 { grid-column: span 3; } .box.s4 { grid-column: span 4; } .box.s5 { grid-column: span 5; }
.box.s6 { grid-column: span 6; } .box.s7 { grid-column: span 7; } .box.s8 { grid-column: span 8; } .box.s9 { grid-column: span 9; }
.box.end { border-right: 0; }
@media (max-width: 640px) { .box[class*=" s"] { grid-column: span 12; border-right: 0; } }

/* Ledger: tables of entries */
.ledger { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1.5px solid var(--form); font-size: .95rem; }
.ledger caption { text-align: left; padding: 0 0 10px; color: var(--ink-2); font-size: .9rem; caption-side: top; }
.ledger th { text-align: left; color: var(--form); font-weight: 600; font-size: .8rem; padding: 10px 12px; border-bottom: 1.5px solid var(--form); vertical-align: bottom; white-space: nowrap; }
.ledger td { padding: 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.code, .ledger td.date { font-family: var(--mono); font-size: .84rem; white-space: nowrap; color: var(--ink-2); }
.ledger td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger th.num { text-align: right; }
.ledger a { color: var(--ink); text-decoration-color: var(--rule); }
.ledger a:hover { text-decoration-color: var(--form); }
.ledger tr.new td:first-child { box-shadow: inset 4px 0 0 var(--canary); }
@media (max-width: 720px) {
  .ledger.stack thead { display: none; }
  .ledger.stack tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); }
  .ledger.stack td { display: block; padding: 2px 0; border: 0; }
  .ledger.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--form); font-family: "Archivo", sans-serif; font-size: .78rem; }
}

/* Marks */
.kind { display: inline-block; font-size: .78rem; font-weight: 650; padding: 1px 7px; border: 1px solid currentColor; border-radius: 2px; white-space: nowrap; }
.kind.tariff { color: var(--ink); background: var(--canary); border-color: #c9b54a; }
.kind.customs { color: var(--form); }
.kind.adcvd { color: #5b4a8b; }
.kind.controls, .kind.trade-policy { color: var(--ink-2); }
.stamp { display: inline-block; color: var(--stamp); border: 1.5px solid var(--stamp); padding: 1px 8px; font-family: var(--mono); font-size: .8rem; font-weight: 500; border-radius: 2px; white-space: nowrap; }
.new-mark { background: var(--canary); color: var(--canary-ink); font-size: .76rem; font-weight: 650; padding: 1px 6px; border-radius: 2px; }
.up { color: var(--stamp); } .down { color: #1f6b5e; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 64px; padding-bottom: 24px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 3.9rem); }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 26px; }
.hero .who { color: var(--ink-2); font-size: .92rem; margin-top: 18px; }
@media (max-width: 960px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; } }

.entry .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-bottom: 1.5px solid var(--form); }
.entry .head b { font-variation-settings: var(--cond); font-size: 1.25rem; font-weight: 820; }
.entry .head span { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.entry .headline { font-size: 1.12rem; font-weight: 650; line-height: 1.4; }
.entry ol { list-style: none; margin: 0; padding: 0; }
.entry li { display: grid; grid-template-columns: 92px 1fr; gap: 4px 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); font-size: .93rem; }
.entry li:last-child { border-bottom: 0; }
.entry li .kind { align-self: start; justify-self: start; margin-top: 2px; }
.entry a { color: var(--ink); text-decoration-color: var(--rule); }
.entry a:hover { text-decoration-color: var(--form); }
.entry li .meta { grid-column: 2; color: var(--ink-2); font-size: .82rem; }
.entry .foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1.5px solid var(--form); font-size: .88rem; }

/* Signup */
.signup { display: flex; gap: 8px; flex-wrap: wrap; max-width: 520px; }
.signup input[type=email] { flex: 1 1 240px; font: inherit; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--sheet); color: var(--ink); min-width: 0; }
.signup .note { flex-basis: 100%; font-size: .85rem; color: var(--ink-2); margin: 4px 0 0; }
.signup-msg { font-size: .95rem; margin-top: 8px; }

/* Two-column ledger of capabilities */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--form); }
.pairs > div { padding: 22px 28px 24px 0; border-bottom: 1px solid var(--rule); }
.pairs > div:nth-child(odd) { padding-right: 36px; border-right: 1px solid var(--rule); }
.pairs > div:nth-child(even) { padding-left: 36px; }
.pairs h3 { margin-bottom: 6px; }
.pairs p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; } .pairs > div, .pairs > div:nth-child(odd), .pairs > div:nth-child(even) { padding: 18px 0; border-right: 0; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--form); background: var(--sheet); counter-reset: s; }
.steps li { padding: 20px 22px 24px; border-right: 1px solid var(--rule); counter-increment: s; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: "Step " counter(s); display: block; color: var(--form); font-size: .8rem; font-weight: 600; margin-bottom: 8px; }
.steps h3 { margin-bottom: 6px; } .steps p { margin: 0; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .steps li { border-right: 0; border-bottom: 1px solid var(--rule); } }

/* FAQ */
.faq { border-top: 1.5px solid var(--form); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--form); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }

/* Forms */
.field { display: block; color: var(--form); font-size: .82rem; font-weight: 600; margin: 14px 0 5px; }
.inp, select.inp { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink); border-radius: 0; background: var(--sheet); color: var(--ink); }

/* Breadcrumb + article */
.crumbs { font-size: .88rem; color: var(--ink-2); padding: 28px 0 0; }
.crumbs a { color: var(--ink-2); }
.doc-head { padding: 18px 0 28px; border-bottom: 1.5px solid var(--form); margin-bottom: 28px; }
.doc-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9rem; color: var(--ink-2); margin-top: 12px; }
.facts b { color: var(--ink); font-weight: 650; }
.block { margin: 0 0 40px; }
.block > h2 { font-size: 1.6rem; margin-bottom: 14px; }
.callout { background: var(--sheet); border: 1.5px solid var(--form); padding: 18px 20px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.index-list { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--form); }
.index-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.index-list .date { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); padding-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); text-decoration: none; border-radius: 2px; font-size: .93rem; }
.chips a:hover { border-color: var(--form); }

/* Footer */
footer.foot { margin-top: 88px; background: var(--sheet); border-top: 1.5px solid var(--form); padding: 36px 0 44px; font-size: .9rem; color: var(--ink-2); }
footer.foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
footer.foot h4 { margin: 0 0 8px; color: var(--form); font-size: .82rem; font-weight: 600; }
footer.foot ul { list-style: none; margin: 0; padding: 0; }
footer.foot li { margin: 4px 0; }
footer.foot a { color: var(--ink); text-decoration: none; }
footer.foot a:hover { text-decoration: underline; }
footer.foot .fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: none; }
@media (max-width: 760px) { footer.foot .cols { grid-template-columns: 1fr 1fr; } }

@media print { .mast, footer.foot, .signup, .no-print { display: none !important; } body { background: #fff; } }
@media (max-width: 520px) {
  .entry li { grid-template-columns: 1fr; }
  .entry li .meta { grid-column: 1; }
  .entry .head { flex-direction: column; gap: 2px; }
}

.promo-bar { background: var(--canary); color: var(--canary-ink); border-bottom: 1px solid #c9b54a; font-size: .92rem; }
.promo-bar .page { padding-top: 9px; padding-bottom: 9px; }
.promo-bar a { color: var(--ink); font-weight: 650; }
