:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --text: #182333;
  --muted: #607085;
  --line: #dfe5ec;
  --brand: #1e5aa8;
  --brand-dark: #113c73;
  --accent: #0f7b63;
  --accent-soft: #e4f3ee;
  --warn: #8a5a00;
  --warn-soft: #fff5dc;
  --max: 1180px;
  --read: 780px;
  --radius: 8px;
  --shadow: 0 14px 32px rgba(24, 35, 51, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid rgba(30, 90, 168, .35); outline-offset: 3px; }
.wrap { width: min(var(--max), calc(100% - 36px)); margin-inline: auto; }
.reading { max-width: var(--read); }

.topbar {
  background: #172331;
  color: #dbe5f0;
  font-size: .88rem;
  padding: 8px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; align-items: center; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; font-size: 1.22rem; }
.logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--brand);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}
nav { display: flex; align-items: center; gap: 21px; font-weight: 680; font-size: .95rem; }
.nav-cta { background: var(--brand); color: #fff; padding: 9px 14px; border-radius: var(--radius); }
.nav-cta:hover { color: #fff; background: var(--brand-dark); }
.menu-btn { display: none; border: 0; background: transparent; font-size: 1.45rem; cursor: pointer; color: var(--text); }

.hero { padding: 72px 0 44px; border-bottom: 1px solid var(--line); background: #fff; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .75fr); gap: 46px; align-items: start; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: #075f4b;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: .84rem;
  font-weight: 800;
}
.hero h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.7rem);
  line-height: 1.03;
  letter-spacing: 0;
  margin: 18px 0 18px;
  max-width: 880px;
}
.hero p { font-size: 1.12rem; color: var(--muted); max-width: 720px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 780;
  border: 1px solid var(--line);
  background: #fff;
}
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: .92rem; }

.tool-panel, .panel, .card, .page-card, .article, .side-card, .toc, .search-results {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tool-panel { padding: 22px; box-shadow: var(--shadow); }
.tool-panel h2, .tool-panel h3 { margin-top: 0; }
.searchbox { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.searchbox input { width: 100%; border: 0; padding: 14px; font: inherit; outline: none; min-width: 0; }
.searchbox button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; font-weight: 780; cursor: pointer; }
.search-results { display: none; margin-top: 12px; padding: 8px; }
.search-results.open { display: grid; gap: 6px; }
.search-results a { display: block; padding: 10px; border-radius: 6px; }
.search-results a:hover { background: #f1f5f9; }
.quick-links { display: grid; gap: 8px; margin-top: 18px; }
.quick-links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.quick-links a:last-child { border-bottom: 0; }
.tag { color: var(--accent); font-size: .8rem; font-weight: 800; white-space: nowrap; }

.section { padding: 52px 0; }
.section.article-section { padding-top: 14px; }
.section h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.18; letter-spacing: 0; margin: 0 0 10px; }
.section-lead { color: var(--muted); max-width: 760px; margin: 0 0 28px; }
.grid-2, .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { padding: 22px; box-shadow: 0 6px 18px rgba(24, 35, 51, .04); }
.card h3 { margin: 0 0 7px; font-size: 1.08rem; line-height: 1.3; }
.card p { color: var(--muted); margin: 0; }
.card .link, .text-link { display: inline-block; color: var(--brand); font-weight: 780; margin-top: 14px; }
.panel { padding: 30px; }
.panel.dark { background: #172331; color: #fff; border-color: #172331; }
.panel.dark p { color: #d2deea; }
.panel.soft { background: var(--surface-soft); }

.article-list { display: grid; gap: 12px; }
.article-item {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 18px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.article-item h3 { margin: 0 0 4px; line-height: 1.35; }
.meta { color: var(--muted); font-size: .9rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 7px 10px; font-size: .88rem; font-weight: 700; }
.no-top { margin-top: 0 !important; }
.mt-18 { margin-top: 18px; }

.article-hero { padding: 52px 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.article-hero h1 { font-size: clamp(2rem, 4.2vw, 4rem); line-height: 1.08; letter-spacing: 0; max-width: 930px; margin: 12px 0; }
.article-hero .dek { font-size: 1.12rem; color: var(--muted); max-width: 830px; margin: 0 0 12px; }
.breadcrumb { font-size: .88rem; color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--read)) minmax(260px, 1fr); gap: 32px; align-items: start; }
.article-layout > * { min-width: 0; }
.article { padding: clamp(22px, 4vw, 42px); }
.article { overflow-wrap: break-word; }
.article h2 { font-size: 1.58rem; line-height: 1.28; margin: 42px 0 12px; }
.article h3 { font-size: 1.18rem; margin: 28px 0 8px; line-height: 1.32; }
.article p, .article li { color: #33465e; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; margin-top: 8px; }
.article li + li { margin-top: 6px; }
.article a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.answer-box, .callout, .warning-box, .source-box {
  border-radius: var(--radius);
  padding: 18px;
  margin: 22px 0;
}
.answer-box { background: var(--accent-soft); border: 1px solid #bfdfd4; }
.callout { background: #eef4ff; border-left: 4px solid var(--brand); }
.warning-box { background: var(--warn-soft); border-left: 4px solid var(--warn); }
.source-box { background: #f7f9fb; border: 1px solid var(--line); }
.ad-placeholder {
  border: 1px dashed #aeb9c5;
  background: #fbfcfd;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: #6c7a8b;
  font-size: .82rem;
  margin: 28px 0;
}
.toc { padding: 18px; margin: 24px 0; background: #f8fafc; }
.toc strong { display: block; margin-bottom: 8px; }
.toc a { display: block; color: var(--brand); margin: 7px 0; font-weight: 650; }
.sidebar { position: sticky; top: 94px; display: grid; gap: 14px; }
.side-card { padding: 19px; }
.side-card h3 { margin: 0 0 10px; }
.side-card a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 680; }
.side-card a:last-child { border-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 680px; background: #fff; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f2f5f8; color: #25364b; font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }

.page { padding: 48px 0; }
.page-card { padding: clamp(24px, 4vw, 44px); max-width: 900px; }
.page-card.wide { max-width: none; }
.page-card h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.1; letter-spacing: 0; margin: 0 0 16px; }
.page-card h2 { margin-top: 34px; line-height: 1.25; }
.legal p, .legal li, .page-card p, .page-card li { color: #40536a; }
.placeholder { display: inline-block; background: #fff5dc; border: 1px solid #e4c46d; border-radius: 6px; padding: 1px 5px; color: #704a00; font-weight: 800; }
.contact-form { display: grid; gap: 14px; margin: 20px 0 8px; }
.contact-form label { display: grid; gap: 6px; font-weight: 750; color: var(--text); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.hidden-field { display: none; }

.newsletter {
  background: #172331;
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.newsletter p { color: #d2deea; margin-bottom: 0; }
.newsletter form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 6px; min-width: min(430px, 100%); }
.newsletter input { border: 1px solid transparent; border-radius: var(--radius); padding: 12px; font: inherit; min-width: 0; }
.newsletter button { border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; padding: 0 15px; font-weight: 780; }

footer { margin-top: 52px; background: #172331; color: #c8d4e1; padding: 42px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 26px; }
.footer-grid h4 { color: #fff; margin: 0 0 10px; }
.footer-grid a { display: block; margin: 8px 0; }
.copyright { border-top: 1px solid #314255; margin-top: 28px; padding-top: 18px; color: #9fb0c2; font-size: .88rem; }

@media (max-width: 980px) {
  .hero-grid, .article-layout, .newsletter, .split { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: 68px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .nav.open nav { display: flex; }
  .menu-btn { display: block; }
  .nav-cta { text-align: center; }
}

@media (max-width: 700px) {
  .wrap { width: min(var(--max), calc(100% - 24px)); }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: 2.35rem; }
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .article-item { grid-template-columns: 1fr; }
  .topbar .wrap { justify-content: center; }
  .topbar .hide-sm { display: none; }
  .searchbox, .newsletter form { grid-template-columns: 1fr; }
  .searchbox button, .newsletter button { min-height: 42px; }
  .newsletter { padding: 22px; }
  .article { padding: 20px; }
  .article-hero { padding-top: 36px; }
}
