:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;
  --ok: #047857;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 40;
}
header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 62px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
nav.top { display: flex; gap: 22px; flex-wrap: wrap; }
nav.top a { color: var(--ink-soft); font-size: 14.5px; font-weight: 500; }
nav.top a:hover { color: var(--accent); text-decoration: none; }
nav.top a.on { color: var(--accent); }

.hero { padding: 52px 0 32px; }
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 700;
}
.hero p.lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 8px; max-width: 680px; }
.hero .meta { color: var(--muted); font-size: 14px; margin-top: 14px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.card-body { padding: 18px; }

.tool { margin: 22px 0 8px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}

label.fld { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.01em; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
textarea { resize: vertical; min-height: 68px; }

table.items { width: 100%; border-collapse: collapse; font-size: 14px; }
table.items th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--line);
}
table.items td { padding: 6px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.items td input { padding: 7px 9px; font-size: 14px; }
table.items td.num { width: 92px; }
table.items td.act { width: 34px; text-align: center; }
.rm {
  border: none; background: none; color: #94a3b8; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.rm:hover { color: #dc2626; background: #fef2f2; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 9px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 7px 13px; font-size: 13px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.hint { font-size: 12.5px; color: var(--muted); }
.hint a { color: var(--muted); text-decoration: underline; }

.totals { margin-top: 12px; display: flex; justify-content: flex-end; }
.totals table { font-size: 14.5px; min-width: 280px; }
.totals td { padding: 4px 0; }
.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals tr.grand td { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 700; font-size: 17px; }

.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 15px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 16px 0;
}

section.blk { padding: 34px 0 8px; border-top: 1px solid var(--line); margin-top: 30px; }
section.blk h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 14px; font-weight: 680; }
section.blk h3 { font-size: 16px; margin: 22px 0 8px; font-weight: 650; }
section.blk p, section.blk li { color: var(--ink-soft); font-size: 15.3px; }
section.blk ul { padding-left: 20px; }
section.blk li { margin-bottom: 7px; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; font-weight: 620; font-size: 15.3px; list-style: none; position: relative; padding-right: 26px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: -2px; color: var(--muted); font-size: 20px; font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 9px 0 0; color: var(--ink-soft); font-size: 14.8px; }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.links-grid a {
  display: block; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; color: var(--ink-soft); background: #fff;
}
.links-grid a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; background: var(--accent-soft); }

footer.site { border-top: 1px solid var(--line); margin-top: 56px; padding: 34px 0 40px; background: var(--bg-soft); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px; }
footer.site h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 6px; }
footer.site a { color: var(--ink-soft); font-size: 13.8px; }
footer.site .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media print {
  header.site, footer.site, nav, .tool, .actions, .crumbs, section.blk, .notice, .btn { display: none !important; }
  body { font-size: 11pt; }
}
