/* eoi-tax.org — "ledger reading room". Spec: docs/design/eoi-tax-DESIGN.md. Figma: 96djhfAFwtx7XjjOP54Bqf */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #16202e; --graphite: #3d4450; --slate: #6b7280; --hairline: #e3e2dd; --rule: #cfcdc6;
  --paper: #ffffff; --canvas: #f6f5f1; --shade: #eeede7;
  --green: #1f6b52; --green-tint: #e3f0ea; --amber: #8a5a00; --amber-tint: #f8edd6;
  --brick: #9b2c2c; --brick-tint: #f6e3e1; --link: #1d4e89;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-card: 6px; --r-ctl: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--graphite); font: 16px/1.6 var(--sans); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--paper); padding: 8px 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 56px; }
.brand { font: 600 20px/1 var(--serif); color: var(--ink); text-decoration: none; margin-right: auto; }
.top nav { display: flex; gap: 24px; }
.top nav a { color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: none; }
.top nav a:hover { color: var(--green); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: var(--r-ctl);
  background: var(--paper); padding: 6px 10px; color: var(--slate); }
.search input { border: 0; outline: 0; background: transparent; font: 14px var(--sans); color: var(--ink); width: 160px; }
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-tint); }
.search.big { border: 1.5px solid var(--ink); padding: 14px 18px; gap: 12px; max-width: 720px; color: var(--ink); }
.search.big input { font-size: 17px; width: 100%; }

/* page heading */
.crumbs { font-size: 13px; color: var(--slate); margin: 24px 0 8px; }
.crumbs a { color: var(--slate); }
.crumbs span { margin: 0 4px; color: var(--rule); }
h1 { font: 600 36px/1.15 var(--serif); color: var(--ink); margin: 0 0 12px; letter-spacing: -0.005em; text-wrap: balance; max-width: 22em; }
h2 { font: 600 22px/1.3 var(--serif); color: var(--ink); margin: 0 0 14px; }
h3 { font: 600 16px/1.4 var(--sans); color: var(--ink); margin: 20px 0 6px; }
h3:first-of-type { margin-top: 0; }
p { margin: 0 0 12px; }
.notice { font-size: 14px; color: var(--slate); max-width: 72ch; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; margin: 24px 0 64px; }
.main { display: grid; gap: 24px; min-width: 0; }
main > .main { margin: 24px 0 64px; }
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 24px; min-width: 0; }
.card > p, .card > .notes, .card > .fine { max-width: 72ch; }
aside .card { position: sticky; top: 76px; padding: 20px; }
aside h2 { font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--slate); }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.toc a { color: var(--graphite); text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }

/* labels, pills, chips */
.label { font: 500 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--slate); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--mono); text-transform: uppercase;
  letter-spacing: .05em; padding: 5px 10px 5px 9px; border-radius: 999px; margin: 0; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--green-tint); color: var(--green); }
.pill.none { background: var(--amber-tint); color: var(--amber); }
.pill.bad { background: var(--brick-tint); color: var(--brick); }
.chip { display: inline-block; font: 500 11px/1.4 var(--mono); background: var(--green-tint); color: var(--green);
  padding: 1px 6px; border-radius: var(--r-ctl); margin-right: 8px; vertical-align: 1px; }
.tag { display: inline-block; font: 500 10.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em;
  background: var(--shade); color: var(--graphite); padding: 2px 6px; border-radius: var(--r-ctl); }

/* answer box */
.answer { border-radius: var(--r-card); padding: 24px; background: var(--green-tint); }
.answer.none { background: var(--amber-tint); }
.answer.bad { background: var(--brick-tint); }
.answer .pill { background: var(--paper); margin-bottom: 14px; }
.answer .lead { font-size: 19px; line-height: 1.5; color: var(--ink); max-width: 40em; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.tile { background: var(--paper); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 4px; }
.tile .label { font-size: 11px; }
.big { font: 500 26px/1.1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-note { font-size: 13px; color: var(--slate); }
.answer dl { margin: 6px 0 10px; display: grid; }
.answer dl div { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(22, 32, 46, .08); font-size: 14px; }
.answer dt { color: var(--slate); }
.answer dd { margin: 0; font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.answer dd .detail { font-family: var(--sans); }
.answer .fine { color: var(--graphite); }

/* tables */
.scroll { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--hairline); border-radius: var(--r-ctl); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; }
thead th { background: var(--shade); color: var(--slate); font: 500 11px/1.3 var(--mono); text-transform: uppercase;
  letter-spacing: .05em; text-align: left; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; text-align: left; background: var(--paper); }
thead th { background: var(--shade); padding-top: 10px; padding-bottom: 10px; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 500; color: var(--ink); }
tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; }
.detail { display: block; font-weight: 400; color: var(--slate); font-size: 13px; }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { color: var(--ink); font-weight: 500; }
td.num.muted, .muted, .na { color: var(--slate); font-weight: 400; }
td.num .detail { font-family: var(--sans); }
.mono { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
tr.group th { color: var(--slate); font-weight: 600; border-bottom: 0; padding-bottom: 2px; }
table.countries th[scope="row"] a { font-weight: 500; }
tr[hidden] { display: none; }
sup { font-size: 11px; line-height: 0; margin-left: 2px; font-weight: 400; font-family: var(--mono); }
sup a { text-decoration: none; padding: 0 1px; }

/* notes and sources */
.notes { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; color: var(--graphite); display: grid; gap: 6px; }
.notes li { padding-left: 32px; position: relative; }
.notes .mark { position: absolute; left: 0; font: 500 12px var(--mono); color: var(--slate); }
.notes li:target { background: var(--amber-tint); border-radius: 4px; }
.fine { font-size: 13px; color: var(--slate); }
.src { font-size: 13px; color: var(--slate); margin: 14px 0 0; }
.src .label { margin-right: 6px; }
.alert { background: var(--amber-tint); border-radius: var(--r-card); padding: 12px 14px; font-size: 14px; color: var(--graphite); }
.docs { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
dl { margin: 0; }

/* FAQ */
.faq-item { border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 0; font: 600 16px/1.4 var(--sans); color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 22px/1 var(--sans); color: var(--ink); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 16px; max-width: 68ch; }

/* home */
.home h1 { font-size: 44px; line-height: 1.1; margin-top: 64px; max-width: 18em; letter-spacing: -0.01em; }
.hero-lead { font-size: 19px; line-height: 1.5; color: var(--graphite); max-width: 36em; margin-bottom: 24px; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); margin: 16px 0 0; }
.chip-link { border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 3px 10px; background: var(--paper);
  color: var(--ink); text-decoration: none; font-weight: 500; }
.chip-link:hover { border-color: var(--green); color: var(--green); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 32px; font: 500 12px/1.4 var(--mono); text-transform: uppercase;
  letter-spacing: .04em; color: var(--graphite); margin: 28px 0 8px; }
.title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.title-row h2 { margin: 0; }
.segmented { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r-ctl); overflow: hidden; }
.segmented button { font: 500 13px var(--sans); border: 0; background: var(--paper); color: var(--ink); padding: 6px 12px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--rule); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.mini-card { display: grid; gap: 8px; border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 12px 14px; text-decoration: none; }
.mini-card:hover { border-color: var(--green); }
.mini-name { font-weight: 600; color: var(--ink); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* footer */
.bottom { background: var(--ink); color: rgba(255, 255, 255, .72); font-size: 14px; padding: 40px 0; }
.bottom .footer-brand { font: 600 18px/1.2 var(--serif); color: var(--paper); margin-bottom: 10px; }
.bottom p { max-width: 70ch; }
.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }
.bottom a { color: var(--paper); text-decoration: none; font-weight: 500; }
.bottom a:hover { text-decoration: underline; color: var(--paper); }

@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 16px; }
  aside { display: none; }
  .top .wrap { gap: 16px; }
  .top .search { display: none; }
  .top nav { gap: 14px; }
  h1 { font-size: 28px; }
  .home h1 { font-size: 32px; margin-top: 36px; }
  .card, .answer { padding: 16px; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--paper); border-radius: var(--r-card); }
  .tile { grid-template-columns: 1fr auto; grid-template-areas: "l v" "n v"; align-items: center; border-radius: 0; padding: 12px 14px; }
  .tile + .tile { border-top: 1px solid var(--hairline); }
  .tile .label { grid-area: l; } .tile .big { grid-area: v; font-size: 20px; } .tile-note { grid-area: n; font-size: 12px; }
  .answer dl div { grid-template-columns: 1fr; gap: 2px; }
  th, td { padding: 10px 10px; }
  tbody th[scope="row"] { box-shadow: 4px 0 6px -4px rgba(22, 32, 46, .18); min-width: 140px; }
  .hero-lead { font-size: 17px; }
}
@media (max-width: 480px) { .top nav a:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
td.art { font: 13px/1.5 var(--mono); color: var(--graphite); }
thead th:first-child { position: sticky; left: 0; z-index: 2; }
@media (max-width: 900px) { thead th:first-child { box-shadow: 4px 0 6px -4px rgba(22, 32, 46, .18); } }
