/* FlagSage. Inter only. Brand palette from CONTEXT.md (November 8, 2026). */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --accent: #3B3BF0;
  --accent-hover: #2B2BDB;
  --accent-ink: #ffffff;
  --grad-a: #4F4FFF;
  --grad-b: #2B2BDB;
  --ink: #121218;
  --muted: #4B4B5C;
  --faint: #6E6E80;
  --soft: #ECECFE;
  --alt: #F5F5FB;
  --line: #E1E1EE;
  --bg: #ffffff;
  --card: #ffffff;
  --ok: #0F7B4A;
  --ok-soft: #E3F5EC;
  --warn: #8A5A00;
  --warn-soft: #FFF3D6;
  --bad: #B42318;
  --bad-soft: #FDE8E6;
  --info-soft: #ECECFE;
  --shadow-sm: 0 1px 2px rgba(18,18,24,.06), 0 1px 3px rgba(18,18,24,.05);
  --shadow: 0 2px 6px rgba(18,18,24,.05), 0 12px 32px -8px rgba(43,43,219,.16);
  --shadow-lg: 0 24px 64px -16px rgba(43,43,219,.28), 0 4px 12px rgba(18,18,24,.06);
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --w: 1160px;
  --w-text: 720px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #9C9CFF;
    --accent-hover: #B4B4FF;
    --accent-ink: #0E0E2A;
    --ink: #EDEDF5;
    --muted: #B4B4C6;
    --faint: #9090A4;
    --soft: #1D1D3D;
    --alt: #15151E;
    --line: #2A2A3A;
    --bg: #0D0D13;
    --card: #15151E;
    --ok: #5FD39A;
    --ok-soft: #10291D;
    --warn: #F0C060;
    --warn-soft: #2B2210;
    --bad: #FF8A80;
    --bad-soft: #2F1513;
    --info-soft: #1D1D3D;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 2px 6px rgba(0,0,0,.4), 0 12px 32px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 64px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.022em; margin: 0 0 .5em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin: .25em 0; }
code, kbd { font-family: var(--font); font-feature-settings: "tnum", "zero"; background: var(--alt); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.tnum { font-variant-numeric: tabular-nums; }
.he { unicode-bidi: isolate; direction: rtl; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--w-text); }
@media (max-width: 600px) { .container { padding: 0 16px; } body { font-size: 16.5px; } }

/* ---------- Icons ---------- */
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.18em; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 650; font-size: .97rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 18px -6px rgba(59,59,240,.6); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: #fff; color: #2B2BDB; }
.btn-light:hover { background: #F0F0FF; color: #2B2BDB; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.04rem; border-radius: 14px; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: .9rem; }
.btn-danger { background: var(--card); color: var(--bad); border-color: var(--line); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.icon-arrow { transition: transform .15s; }
.btn:hover .icon-arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.16rem; letter-spacing: -0.03em; margin-right: auto; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: block; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav > a, .nav-group > button {
  color: var(--muted); text-decoration: none; font-weight: 560; font-size: .95rem; padding: 10px 12px; border-radius: 10px;
  background: none; border: 0; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
}
.site-nav > a:hover, .nav-group > button:hover, .site-nav > a[aria-current="page"] { color: var(--ink); background: var(--alt); }
.nav-group { position: relative; }
.nav-drop {
  position: absolute; top: calc(100% + 8px); left: -12px; min-width: 320px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; display: none;
}
.nav-group.open .nav-drop { display: grid; }
.nav-drop a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.nav-drop a:hover { background: var(--alt); }
.nav-drop a b { display: block; font-weight: 640; font-size: .95rem; }
.nav-drop a span { display: block; color: var(--faint); font-size: .84rem; line-height: 1.35; }
.nav-drop .fn { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-weight: 750; font-size: .85rem; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; }
.site-nav > .menu-only { display: none; }
@media (max-width: 1120px) { .site-nav > a, .nav-group > button { padding: 10px 9px; font-size: .92rem; } }

@media (max-width: 960px) {
  .header-inner { height: 60px; }
  /* AINS rule (November 8, 2026): the logo stays beside the name on phones, slightly smaller. */
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; }
  .brand { gap: 9px; min-width: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; padding: 0;
  }
  .nav-toggle .icon { width: 22px; height: 22px; }
  .site-nav {
    display: none; position: fixed; top: 60px; left: 0; right: 0; height: calc(100vh - 60px); height: calc(100dvh - 60px); background: var(--bg); flex-direction: column; align-items: stretch;
    padding: 12px 16px 40px; overflow-y: auto; gap: 0; border-top: 1px solid var(--line);
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-nav { display: flex; }
  .site-nav > a, .nav-group > button { font-size: 1.05rem; padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); width: 100%; justify-content: space-between; color: var(--ink); }
  .nav-group > button .icon { display: none; }
  .nav-group > button { pointer-events: none; color: var(--faint); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 0; padding: 18px 8px 6px; min-height: 0; }
  .nav-drop { position: static; display: grid; box-shadow: none; border: 0; padding: 0; min-width: 0; background: transparent; }
  .nav-drop a { padding: 10px 8px; min-height: 44px; }
  .nav-cta { margin: 20px 0 0; }
  .site-nav > .menu-only { display: flex; }
}

/* ---------- Trust bar + breadcrumbs ---------- */
.crumbs { font-size: .86rem; color: var(--faint); padding-top: 22px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.trust {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--alt); padding: 16px 18px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; font-size: .88rem; margin: 28px 0;
}
.trust div { min-width: 0; }
.trust dt { color: var(--faint); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 2px; }
.trust dd { margin: 0; color: var(--ink); font-weight: 560; overflow-wrap: anywhere; }
.trust dd a { font-weight: 600; }
.trust .pill { margin-top: 2px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr 1fr; } }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--accent); white-space: nowrap; line-height: 1.5; }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-plain { background: var(--alt); color: var(--muted); border: 1px solid var(--line); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Sections ---------- */
.sec { padding: 88px 0; }
.sec-tight { padding: 56px 0; }
.sec-alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.head { max-width: 760px; margin-bottom: 40px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
.head p { color: var(--muted); font-size: 1.1rem; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.26rem); color: var(--muted); line-height: 1.55; max-width: 680px; }
@media (max-width: 700px) { .sec { padding: 60px 0; } .sec-tight { padding: 40px 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 600px at 85% -10%, #7A7AFF 0%, transparent 60%), linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%); }
@media (prefers-color-scheme: dark) { .hero { background: radial-gradient(1200px 600px at 85% -10%, #3D3DCC 0%, transparent 60%), linear-gradient(135deg, #24248F 0%, #12125A 100%); } }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 84px; padding-bottom: 96px; }
.hero h1 { color: #fff; max-width: 620px; }
.hero .lead { color: rgba(255,255,255,.86); }
.hero .eyebrow { color: #fff; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .86rem; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 18px; }
.hero-note { font-size: .9rem; color: rgba(255,255,255,.78); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; padding-top: 52px; padding-bottom: 64px; gap: 40px; } }

/* Hero preview card */
.preview { background: var(--card); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 40px 80px -20px rgba(10,10,60,.55); padding: 22px; position: relative; border: 1px solid rgba(255,255,255,.4); }
.preview-top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--faint); font-weight: 600; margin-bottom: 14px; }
.preview-top .dots { display: flex; gap: 6px; }
.preview-top .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.preview h3 { font-size: 1.02rem; margin-bottom: 12px; }
.pv-countries { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; font-weight: 600; background: var(--alt); }
.pv-chip b { font-variant-numeric: tabular-nums; color: var(--accent); }
.pv-q { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 4px; font-size: .9rem; }
.pv-q .rid { font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .04em; display: flex; justify-content: space-between; gap: 8px; }
.pv-q b { font-weight: 640; line-height: 1.35; }
.pv-q small { color: var(--faint); }
.pv-foot { font-size: .76rem; color: var(--faint); display: flex; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; flex-wrap: wrap; }
.float-tag { position: absolute; background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px 12px; font-size: .8rem; font-weight: 650; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); }
.float-tag.t1 { top: -16px; right: 24px; }
.float-tag.t2 { bottom: -18px; left: -14px; }
.float-tag .icon { color: var(--accent); }
@media (max-width: 600px) { .float-tag.t2 { left: 10px; } .float-tag.t1 { right: 10px; } }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-sm); position: relative; min-width: 0; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); margin-bottom: .8em; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
a.card .more { color: var(--accent); font-weight: 650; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }

.flag-card .num { position: absolute; top: 18px; right: 20px; font-size: .78rem; font-weight: 750; color: var(--faint); font-variant-numeric: tabular-nums; }
.flag-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.flag-ico .icon { width: 24px; height: 24px; }
.flag-card ul { list-style: none; padding: 0; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.flag-card li { display: flex; gap: 8px; margin: 4px 0; }
.flag-card li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: .62em; flex: none; }

/* Problem panel */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.myths { display: grid; gap: 12px; }
.myth { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--card); display: grid; gap: 6px; }
.myth .m { display: flex; gap: 10px; align-items: flex-start; font-weight: 640; text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 2px; color: var(--muted); }
.myth .f { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.myth .m .icon { color: var(--bad); margin-top: .2em; }
.myth .f .icon { color: var(--ok); margin-top: .2em; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; counter-reset: s; list-style: none; padding: 0; }
.steps li { margin: 0; }
.steps .card { height: 100%; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: .92rem; margin-bottom: 14px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.mini { border: 1px solid var(--line); border-radius: 12px; background: var(--alt); padding: 14px; margin: 0 0 18px; font-size: .84rem; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row b { font-weight: 640; }
.mini-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: flex; margin: 8px 0 4px; }
.mini-bar i { display: block; height: 100%; }

/* Boundary band */
.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .boundary { grid-template-columns: 1fr; } }
.bcol { border-radius: var(--r); padding: 24px; border: 1px solid var(--line); background: var(--card); }
.bcol h3 { display: flex; gap: 10px; align-items: center; }
.bcol ul { list-style: none; padding: 0; margin: 0; }
.bcol li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bcol li:first-child { border-top: 0; }
.bcol .icon { margin-top: .22em; }
.bcol.yes .icon { color: var(--ok); }
.bcol.no .icon { color: var(--bad); }

/* Country grid */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cchip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; min-height: 48px; transition: border-color .15s, background .15s; }
.cchip:hover { border-color: var(--accent); color: var(--ink); background: var(--soft); }
.cchip .fl { font-size: 1.25rem; line-height: 1; }
.cchip small { margin-left: auto; color: var(--faint); font-weight: 600; font-size: .74rem; letter-spacing: .04em; }
.region-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 28px 0 12px; }

/* Stats band */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }
.fact b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fact p { color: var(--muted); font-size: .94rem; margin: 6px 0 4px; }
.fact cite { font-style: normal; font-size: .8rem; }

/* Paper sample */
.paper { background: #fff; color: #121218; border-radius: 6px; box-shadow: var(--shadow-lg); padding: 30px; border: 1px solid #E1E1EE; position: relative; font-size: .88rem; }
.paper-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #121218; padding-bottom: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.paper-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.paper-brand img { width: 22px; height: 22px; border-radius: 6px; }
.paper .fic { background: #FFF3D6; color: #8A5A00; font-weight: 700; font-size: .74rem; padding: 4px 9px; border-radius: 6px; letter-spacing: .03em; text-transform: uppercase; height: fit-content; }
.paper h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: #4B4B5C; margin: 16px 0 8px; }
.paper table { font-size: .84rem; }
.paper .ptable th { background: #F5F5FB; color: #121218; }
.paper .ptable td, .paper .ptable th { border-color: #E1E1EE; }
.paper-foot { display: flex; justify-content: space-between; color: #6E6E80; font-size: .74rem; margin-top: 16px; border-top: 1px solid #E1E1EE; padding-top: 10px; gap: 8px; flex-wrap: wrap; }
.paper ul { margin: 0; padding-left: 1.1em; }
.paper .gap { color: #8A5A00; }

/* ---------- Article / prose ---------- */
.page-head { padding: 12px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 860px; margin-top: 18px; }
.page-head .lead { margin-bottom: 0; }
.answer { border-left: 4px solid var(--accent); background: var(--soft); padding: 18px 22px; border-radius: 0 var(--r) var(--r) 0; font-size: 1.08rem; margin: 24px 0; color: var(--ink); }
.answer p:last-child { margin: 0; }
.answer .lbl { display: block; font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; padding-bottom: 80px; }
.layout > article { min-width: 0; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; gap: 24px; } .aside { order: -1; } }
.aside { position: sticky; top: 92px; display: grid; gap: 16px; }
@media (max-width: 1000px) { .aside { position: static; } }
.toc { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--card); font-size: .9rem; }
.toc b { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--accent); }
@media (max-width: 1000px) { .toc { display: none; } .toc.toc-mobile { display: block; } }
.cta-box { border-radius: var(--r); padding: 20px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; }
.cta-box h3 { color: #fff; font-size: 1.05rem; }
.cta-box p { color: rgba(255,255,255,.85); font-size: .9rem; }
.cta-box .btn { width: 100%; }
.cta-box .btn + .btn { margin-top: 8px; }

.prose { max-width: var(--w-text); }
.prose h2 { margin-top: 2.2em; padding-top: .2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink); }
.prose > section:first-child h2 { margin-top: 1em; }

.tablewrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--r); -webkit-overflow-scrolling: touch; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
caption { text-align: left; padding: 12px 14px; font-weight: 650; color: var(--muted); font-size: .86rem; caption-side: top; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { background: var(--alt); font-weight: 680; font-size: .82rem; color: var(--muted); white-space: nowrap; border-top: 0; }
tbody th { font-weight: 640; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.rule { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin: 14px 0; background: var(--card); }
.rule-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.rule-id { font-size: .76rem; font-weight: 750; letter-spacing: .04em; color: var(--faint); font-variant-numeric: tabular-nums; }
.rule h3 { margin: 0 0 6px; font-size: 1.08rem; }
.rule p { margin-bottom: .6em; }
.rule .meta { font-size: .84rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rule .meta a { font-weight: 600; }

.qlist { list-style: none; padding: 0; counter-reset: q; }
.qlist li { counter-increment: q; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.qlist li::before { content: counter(q); width: 26px; height: 26px; border-radius: 8px; background: var(--soft); color: var(--accent); font-weight: 750; font-size: .8rem; display: grid; place-items: center; margin-top: 2px; }

.faq details { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--card); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 640; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 18px 16px; color: var(--muted); }

.note { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--alt); display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; margin: 18px 0; }
.note > .icon { color: var(--accent); margin-top: .2em; }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.note.warn > .icon { color: var(--warn); }
.note p:last-child { margin: 0; }

.srcs { list-style: none; padding: 0; font-size: .92rem; }
.srcs li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin: 0; }
.srcs a { font-weight: 600; overflow-wrap: anywhere; }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; background: var(--card); }
.related a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Tools ---------- */
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 80px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); min-width: 0; }
@media (max-width: 600px) { .panel { padding: 20px 16px; border-radius: var(--r); } }
.panel > h2 { font-size: 1.35rem; }
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 24px; flex-wrap: wrap; }
.stepper li { margin: 0; flex: 1 1 0; min-width: 0; }
.stepper button { width: 100%; text-align: left; border: 0; background: none; padding: 10px 0 0; border-top: 3px solid var(--line); font: inherit; font-size: .82rem; font-weight: 650; color: var(--faint); cursor: pointer; min-height: 44px; }
.stepper button[aria-current="step"] { border-top-color: var(--accent); color: var(--ink); }
.stepper button.done { border-top-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--muted); }
.stepper button[disabled] { cursor: default; }

.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field > label, .field > .lbl, fieldset > legend { font-weight: 640; font-size: .95rem; }
.field .hint, fieldset .hint { color: var(--faint); font-size: .86rem; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: 8px; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 46px; width: 100%; min-width: 0;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; border-color: var(--accent); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
.err { color: var(--bad); font-size: .88rem; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .93rem; font-weight: 560; background: var(--bg); user-select: none; }
.seg input:checked + span { background: var(--soft); border-color: var(--accent); color: var(--accent); font-weight: 650; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 46px; cursor: pointer; font-size: .93rem; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.tool-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.ctab { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px; background: var(--alt); }
.ctab > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ctab > h3 .fl { font-size: 1.4rem; }

.picker { display: grid; gap: 10px; }
.picked { display: flex; flex-wrap: wrap; gap: 8px; min-height: 10px; }
.picked button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); background: var(--soft); color: var(--accent); border-radius: 999px; min-height: 40px; padding: 0 8px 0 14px; font: inherit; font-weight: 640; font-size: .92rem; cursor: pointer; }
.picked button .icon { width: 16px; height: 16px; }

.result-sec { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.result-sec > h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.result-sec > h3 .count { font-size: .78rem; background: var(--soft); color: var(--accent); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.rq { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: var(--card); }
.rq > b { display: block; font-weight: 640; line-height: 1.4; margin-bottom: 4px; }
.rq p { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.rq .meta { font-size: .8rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rq.gap { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.rq.gap > b { color: var(--warn); }
.result-banner { border-radius: var(--r); padding: 18px 20px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); margin-bottom: 18px; }
.result-banner b { display: block; margin-bottom: 4px; }
.sticky-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); padding: 14px 0; border-top: 1px solid var(--line); margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; z-index: 5; }

/* Ledger */
.entries { display: grid; gap: 10px; }
.entry { display: grid; grid-template-columns: 1.4fr 1fr 1fr .9fr auto; gap: 10px; align-items: end; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); }
.entry .field { margin: 0; }
.entry .field label { font-size: .78rem; color: var(--faint); font-weight: 650; }
.entry .note-f { grid-column: 1 / -2; }
.entry .x { align-self: center; }
.entry.flag { border-color: var(--warn); background: var(--warn-soft); }
.entry.planned { border-style: dashed; }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr 1fr; } .entry .cfield { grid-column: 1 / -1; } .entry .note-f { grid-column: 1 / -1; } .entry .x { grid-column: 1 / -1; justify-self: start; } }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--bad); border-color: var(--bad); }
.totals td.num b { font-size: 1.05rem; }
.timeline { display: grid; gap: 6px; margin: 12px 0 6px; }
.tl-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; font-size: .82rem; }
.tl-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tl-bar { position: relative; height: 22px; background: var(--alt); border-radius: 6px; border: 1px solid var(--line); overflow: hidden; }
.tl-bar i { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.tl-bar i.pl { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 55%, transparent) 0 4px, transparent 4px 8px); border: 1px solid var(--accent); }
.tl-bar i.gp { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--warn) 60%, transparent) 0 4px, transparent 4px 8px); }
.tl-months { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: .7rem; color: var(--faint); }
.tl-months div { display: grid; grid-template-columns: repeat(12, 1fr); }
@media (max-width: 600px) { .tl-row, .tl-months { grid-template-columns: 70px 1fr; } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }

/* Packages */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
@media (max-width: 1060px) { .plans { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; }
.plan .state { margin-bottom: 12px; }
.plan h3 { font-size: 1.15rem; }
.plan .price { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 10px; }
.plan .price small { font-size: .82rem; font-weight: 600; color: var(--faint); letter-spacing: 0; display: block; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: .9rem; }
.plan li { display: flex; gap: 8px; padding: 5px 0; color: var(--muted); }
.plan li .icon { color: var(--ok); margin-top: .22em; }
.plan li.no .icon { color: var(--faint); }
.plan .btn { margin-top: auto; width: 100%; }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--alt); border-top: 1px solid var(--line); padding: 64px 0 36px; font-size: .92rem; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand p { color: var(--muted); max-width: 320px; font-size: .9rem; }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 12px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 34px; }
.site-footer li a:hover { color: var(--accent); }
.foot-legal { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; color: var(--faint); font-size: .84rem; display: grid; gap: 8px; }
.foot-legal p { margin: 0; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt0 { margin-top: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .88rem; }
.stack > * + * { margin-top: 16px; }
.kbd-list { columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .kbd-list { columns: 1; } }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-right: 6px; vertical-align: 1px; }
.noscript { border: 1px solid var(--warn); background: var(--warn-soft); padding: 14px 16px; border-radius: 12px; }
.hidden { display: none !important; }
.gl dt { font-weight: 700; margin-top: 18px; }
.gl dd { margin: 4px 0 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
@media print {
  @page { margin: 16mm; }
  :root { --ink: #000; --muted: #333; --faint: #555; --line: #ccc; --bg: #fff; --card: #fff; --alt: #f6f6f6; --soft: #eee; --accent: #2B2BDB; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .site-header, .site-footer, .no-print, .aside, .stepper, .tool-nav, .sticky-actions, .crumbs, .skip-link, .hero-btns { display: none !important; }
  .panel, .card, .rq, .rule { box-shadow: none; break-inside: avoid; }
  .layout { display: block; }
  a { color: #000; }
  .print-only { display: block !important; }
  .tablewrap { overflow: visible; border: 0; }
}
.print-only { display: none; }

/* Printable checklists */
.checks-print { list-style: none; padding: 0; }
.checks-print li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.checks-print .box { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; flex: none; margin-top: .2em; }
.nav-drop a b { color: var(--ink); }
.trust .pill { white-space: normal; }
@media (max-width: 420px) { .trust { grid-template-columns: 1fr; } }
