:root {
  --accent: #1f4e8c;
  --accent-strong: #163b6b;
  --accent-soft: #e8eff8;
  --ink: #141820;
  --ink-2: #475063;
  --ink-3: #7b8394;
  --line: #e3e7ee;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ok: #1d7a4f;
  --warn: #a35b00;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 24, 32, .04), 0 12px 32px -12px rgba(20, 40, 80, .14);
  --serif: 'Fraunces', 'New York', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(246, 248, 251, .85); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: .93rem; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.lang { font-size: .85rem; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; text-decoration: none; color: var(--ink-2); background: #fff; }
@media (max-width: 860px) { .nav { display: none; } .lang { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 20px; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; transition: transform .12s ease, background .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(31, 78, 140, .6); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }

/* Hero */
.hero { position: relative; padding: 56px 0 28px; text-align: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 560px; background: radial-gradient(closest-side, rgba(31, 78, 140, .16), transparent 70%), radial-gradient(closest-side at 70% 30%, rgba(111, 163, 232, .18), transparent 70%); z-index: -1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); margin-bottom: 18px; }
.pill b { color: var(--ok); }
.hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); max-width: 860px; margin: 0 auto .35em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--ink-2); max-width: 640px; margin: 0 auto 22px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.chips li.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.chips svg { width: 15px; height: 15px; }

/* Generator */
.tool { padding: 18px 0 64px; }
.tool-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
@media (max-width: 920px) { .tool-card { grid-template-columns: 1fr; } }
.tool-form { padding: 28px; border-right: 1px solid var(--line); }
@media (max-width: 920px) { .tool-form { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 18px; } }
.tool-form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.tool-form legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
label.f { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
label.f span { display: block; margin-bottom: 5px; }
label.f small { font-weight: 400; color: var(--ink-3); }
input, select, textarea { width: 100%; font: 400 .97rem var(--sans); color: var(--ink); background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31, 78, 140, .25); border-color: var(--accent); background: #fff; }
.hint { font-size: .84rem; color: var(--warn); background: #fff7ec; border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; }
.hint:empty { display: none; }
.tool-actions { display: flex; flex-direction: column; gap: 8px; }
.tool-actions p { margin: 0; text-align: center; }

.tool-preview { background: linear-gradient(180deg, #eef2f8, #f6f8fb); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 920px) { .tool-preview { padding: 18px 12px; } }
.preview-label { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--ink-3); }
.doc { background: #fff; border-radius: 6px; box-shadow: 0 2px 10px rgba(20, 24, 32, .08); padding: 7% 7.5%; font-size: .78rem; line-height: 1.55; color: #1b1f27; aspect-ratio: 210 / 297; overflow: hidden; }
@media (max-width: 520px) { .doc { aspect-ratio: auto; font-size: .74rem; } }
.doc__parties { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.doc__right { text-align: right; margin-top: 28px; }
.doc__title { font-family: 'Times New Roman', Times, serif; text-transform: uppercase; text-align: center; font-size: 1.25rem; letter-spacing: .02em; margin: 6px 0 2px; }
.doc__title::after { content: ''; display: block; width: 46px; height: 2px; background: var(--accent); margin: 6px auto 0; }
.doc__period { text-align: center; color: #4a5160; margin-bottom: 12px; }
.doc__table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.doc__table td { padding: 5px 4px; border-bottom: 1px solid #e3e7ee; }
.doc__table td:last-child { text-align: right; white-space: nowrap; }
.doc__table .is-total td, .doc__table .is-due td { font-weight: 700; }
.doc__text { text-align: justify; }
.doc__meta { color: #4a5160; }
.doc__sign { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 16px; }
.doc__sigbox { width: 44%; height: 52px; border: 1px solid #d5dae3; border-radius: 3px; font-size: .68rem; color: #8a91a0; padding: 3px 6px; }

/* Sections */
section { scroll-margin-top: 80px; }
.band { padding: 72px 0; }
.band-white { background: #fff; border-block: 1px solid var(--line); }
.center { text-align: center; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 12px; }
.feature .ico svg { width: 20px; height: 20px; }
.feature p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--ink-2); margin: 0; font-size: .93rem; }

/* Article */
.prose h2 { margin-top: 1.6em; font-size: clamp(1.45rem, 3vw, 1.9rem); }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .93rem; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #f0f3f8; font-weight: 600; }
.table-scroll { overflow-x: auto; }
.note { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; font-size: .93rem; }

/* Pricing (fake door) */
.pricing { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; align-items: stretch; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; }
.plan.pro { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 99px; padding: 4px 10px; }
.plan .price { font-family: var(--serif); font-size: 2.4rem; font-weight: 600; margin: 4px 0; }
.plan .price small { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plan li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--ink-2); font-size: .95rem; }
.plan li::before { content: ''; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-5' fill='none' stroke='%231f4e8c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.toggle input { width: 40px; height: 22px; appearance: none; background: var(--line); border-radius: 99px; position: relative; padding: 0; border: 0; cursor: pointer; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { left: 21px; }
.save { color: var(--ok); font-weight: 600; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-2); }

/* IRL calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }
.calc form { padding: 28px; }
.calc .result { padding: 28px; background: linear-gradient(180deg, #eef2f8, #f6f8fb); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.calc .result .big { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; color: var(--accent); }
.calc [data-indices] { font-size: .82rem; color: var(--ink-3); margin: -4px 0 12px; }
.inline-lead { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inline-lead input[type=email] { flex: 1 1 200px; }

/* CTA band & footer */
.cta { background: var(--accent); color: #fff; border-radius: 26px; padding: 40px 28px; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); }
.cta .btn-ghost { border: 0; }
footer { padding: 48px 0 40px; color: var(--ink-3); font-size: .88rem; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr; } }
footer a { color: var(--ink-2); text-decoration: none; display: block; margin-bottom: 6px; }
footer h3 { font-size: .85rem; color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Dialog */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(460px, 100% - 32px); box-shadow: 0 30px 80px -20px rgba(10, 20, 40, .45); color: var(--ink); }
dialog::backdrop { background: rgba(15, 22, 36, .45); backdrop-filter: blur(2px); }
.dlg { padding: 26px; position: relative; }
.dlg h2 { font-size: 1.55rem; padding-right: 28px; }
.dlg .x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f0f3f8; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.radios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.radios label { flex: 1 1 auto; }
.radios input { position: absolute; opacity: 0; width: 1px; }
.radios span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .9rem; cursor: pointer; }
.radios input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.radios input:focus-visible + span { outline: 2px solid rgba(31, 78, 140, .35); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--ink-2); margin: 4px 0 14px; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 2px; }
[data-status] { min-height: 1.2em; font-size: .88rem; color: var(--warn); margin: 8px 0 0; }
.done { text-align: center; padding: 10px 0; }
.done .ok { width: 56px; height: 56px; border-radius: 50%; background: #e7f5ee; color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; font-size: 1.6rem; }
