:root {
  --navy: #1B365D;
  --navy-2: #152A4A;
  --accent: #2B6CB0;
  --accent-2: #3182CE;
  --ink: #1A202C;
  --muted: #4A5568;
  --line: #D6DEE8;
  --paper: #F7F4EE;
  --white: #FFFFFF;
  --header-bg: #E8EEF4;
  --total-bg: #F7FAFC;
  --warn: #9B2C2C;
  --ok: #276749;
  --gold: #B7791F;
  --shadow: 0 10px 30px rgba(27, 54, 93, 0.08);
  --radius: 16px;
  --max: 1120px;
  --sans: "Segoe UI", "PT Sans", "Noto Sans", "Liberation Sans", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 18px;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: 8px 12px;
}
.skip:focus { left: 8px; z-index: 50; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
header.site {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
header.site .bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; background: #fff; }
.brand span { font-size: 16px; }
nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-items: center; }
nav.main a {
  color: #E8EEF4; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 10px; border-radius: 8px;
}
nav.main a:hover, nav.main a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: 15px; border: 0; border-radius: 999px;
  padding: 10px 16px; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--accent-2); color: #fff !important; }
.btn-ghost { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); }
.btn-navy:hover { background: var(--navy-2); }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.lang { display: flex; gap: 2px; font-size: 13px; font-weight: 700; }
.lang a { color: #C5D0DC; text-decoration: none; padding: 4px 7px; border-radius: 6px; }
.lang a[aria-current="true"] { background: #fff; color: var(--navy); }
hero, .hero {
  background:
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 48px 0 56px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 19px; color: #D6DEE8; margin: 0 0 24px; max-width: 40rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card {
  background: #fff; color: var(--ink); border-radius: 20px; padding: 8px;
  box-shadow: var(--shadow);
}
.hero-card img { display: block; width: 100%; border-radius: 14px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: #9AE6B4; margin: 0 0 10px; }
.section { padding: 56px 0; }
.section h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; margin: 0 0 12px; color: var(--navy); letter-spacing: -0.02em; }
.section .sub { color: var(--muted); margin: 0 0 28px; max-width: 44rem; }
.grid-3, .grid-2, .grid-4 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 19px; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.price {
  background: var(--white); border: 2px solid var(--navy); border-radius: 20px; padding: 28px;
}
.price .amt { font-size: 36px; font-weight: 800; color: var(--navy); }
.price .amt small { font-size: 16px; font-weight: 600; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 16px 0 0; }
.checklist li { padding: 6px 0 6px 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.cta-band {
  background: var(--navy); color: #fff; border-radius: 24px; padding: 32px;
  display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; margin: 0 0 8px; }
.article { display: grid; grid-template-columns: 1fr 280px; gap: 36px; align-items: start; padding: 40px 0 64px; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px 40px; box-shadow: var(--shadow); }
.prose h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; color: var(--navy); margin: 0 0 12px; letter-spacing: -0.02em; }
.prose .meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.prose h2 { font-size: 24px; color: var(--navy); margin: 32px 0 10px; }
.prose h3 { font-size: 19px; color: var(--navy); margin: 24px 0 8px; }
.prose p, .prose li { font-size: 17px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0 24px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--header-bg); color: var(--navy); }
.prose blockquote {
  margin: 20px 0; padding: 12px 16px; border-left: 4px solid var(--accent);
  background: var(--total-bg); color: var(--ink);
}
.disclaimer, .note, .warn {
  border-radius: 12px; padding: 14px 16px; font-size: 15px; margin: 20px 0;
}
.disclaimer, .note { background: #FFF8E8; border: 1px solid #F0D78C; }
.warn { background: #FFF5F5; border: 1px solid #FEB2B2; color: var(--warn); }
aside.toc { position: sticky; top: 88px; }
aside.toc .box, .side-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px;
}
aside.toc h2, .side-card h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; color: var(--muted); }
aside.toc ol { margin: 0; padding-left: 1.1em; font-size: 14px; }
aside.toc a { color: var(--navy); text-decoration: none; }
aside.toc a:hover { text-decoration: underline; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.crumbs a { color: var(--muted); }
footer.site { background: var(--navy-2); color: #C5D0DC; padding: 40px 0 28px; font-size: 14px; }
footer.site a { color: #E8EEF4; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 28px; }
footer.site h2 { color: #fff; font-size: 15px; margin: 0 0 10px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 0 0 6px; }
.legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; font-size: 12px; color: #9AA8B6; }
/* Generator */
.gen-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; padding: 28px 0 56px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 16px; background: #fff; }
legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fields .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.item-row { display: grid; grid-template-columns: 2.4fr .7fr .7fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: end; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.preview {
  background: #fff; border-radius: 16px; padding: 18px; border: 1px solid var(--line);
  position: sticky; top: 88px;
}
.preview h2 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.muted { color: var(--muted); }
.tag { display: inline-block; background: var(--header-bg); color: var(--navy); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 10px; font-size: 14px; margin: 0; }
dl.kv dt { color: var(--muted); }
.template-list .card { display: flex; flex-direction: column; gap: 10px; }
.template-list .card .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.related { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
@media (max-width: 900px) {
  .hero-grid, .article, .gen-layout, .grid-3, .grid-4, footer.site .cols, .fields, .related { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  nav.main { display: none; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .prose { padding: 22px 18px; }
  aside.toc { position: static; }
  .hero { padding: 28px 0 32px; }
}
.mobile-only { display: none; }
@media (max-width: 900px) {
  .mobile-only { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 12px; }
  .mobile-only a { color: #E8EEF4; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 8px; background: rgba(255,255,255,.1); border-radius: 8px; }
}
code, .mono { font-family: ui-monospace, "DejaVu Sans Mono", Consolas, monospace; font-size: 0.92em; }
.figure { margin: 18px 0 24px; }
.figure img { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.dl-row a.btn { text-decoration: none; }
