:root {
  --ink: #182132;
  --muted: #5b677c;
  --line: #e3e8f0;
  --bg: #f6f8fc;
  --paper: #ffffff;
  --brand: #2457d6;
  --brand-dark: #1740a6;
  --good: #187a53;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(24, 33, 50, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.wrap { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.wrap-narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .8em; }
.section-sub { color: var(--muted); max-width: 720px; }

.site-header {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { font-size: 1.3rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.brand span { color: var(--brand); }
.nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .93rem; font-weight: 600; }
.nav a:hover { color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }

.hero { padding: 76px 0 60px; background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.hero-note { color: var(--muted); font-size: .9rem; }

.hero-visual { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.hero-visual .mini-sheet { border: 1px dashed #c9d3e3; border-radius: 8px; padding: 18px; background: #fff; }
.mini-sheet h3 { font-size: .95rem; margin-bottom: 14px; }
.mini-row { display: flex; justify-content: space-between; border-bottom: 1px solid #eef1f6; padding: 7px 4px; font-size: .9rem; color: var(--muted); }
.mini-row b { color: var(--ink); }
.mini-tag { display: inline-block; background: #eef3ff; color: var(--brand); font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 3px 14px rgba(24, 33, 50, .04);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .93rem; flex: 1; }
.card .card-link { font-weight: 700; font-size: .9rem; margin-top: 8px; }
.card-icon {
  width: 42px; height: 42px; border-radius: 12px; background: #eef3ff;
  color: var(--brand); font-weight: 800; display: grid; place-items: center;
  margin-bottom: 14px; font-size: 1.05rem;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

.link-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; margin-top: 22px; padding-left: 0; list-style: none; }
.link-list li { border-bottom: 1px solid var(--line); padding: 9px 0; font-size: .94rem; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { color: var(--muted); margin: 10px 0 0; font-size: .94rem; }

.cta { background: #eef3ff; padding: 56px 0; text-align: center; }
.cta p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.footer-inner .brand { font-size: 1.05rem; }
.footer-inner a:last-child { margin-left: auto; }

.breadcrumb { font-size: .85rem; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a { color: var(--muted); }
.tool-page { padding-bottom: 40px; }
.page-intro { max-width: 760px; margin: 14px 0 28px; }

.tool-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 26px; align-items: start; }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 86px; box-shadow: var(--shadow); }
.panel-head h2 { font-size: 1.15rem; margin-bottom: .2em; }
.panel-head p { color: var(--muted); font-size: .86rem; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd8e6; border-radius: 8px;
  font: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #b9cdf8; border-color: var(--brand); }
.field .hint { font-size: .78rem; color: var(--muted); margin: 4px 0 0; }
.check-field { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; }
.check-field input { width: 17px; height: 17px; accent-color: var(--brand); }
.tool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.tool-actions .btn { padding: 10px 8px; font-size: .85rem; }
.tool-actions .span-2 { grid-column: span 2; }

.preview-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.preview-head h2 { font-size: 1.15rem; margin: 0; }
.preview-head span { color: var(--muted); font-size: .85rem; }
.print-root { display: flex; flex-direction: column; gap: 24px; }
.sheet { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; overflow: hidden; }
.sheet svg { display: block; width: 100%; height: auto; }

.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.prose h2 { font-size: 1.35rem; }
.prose p, .prose li { color: var(--muted); }
.notice { background: #eef7f2; border-left: 4px solid var(--good); padding: 14px 18px; border-radius: 8px; color: #1c4e3b; }

.ad-slot { display: none; margin-top: 18px; min-height: 90px; background: #f2f5fa; border: 1px dashed var(--line); border-radius: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: .82rem; }
.ad-slot.show { display: flex; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: #182132; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .card-grid, .steps, .link-list { grid-template-columns: repeat(2, 1fr); }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-panel { position: static; }
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { width: min(100% - 28px, 1140px); }
  .header-inner { min-height: 58px; gap: 12px; }
  .nav { display: none; }
  .card-grid, .steps, .link-list, .tool-actions { grid-template-columns: 1fr; }
  .tool-actions .span-2 { grid-column: auto; }
  .section { padding: 42px 0; }
  .hero { padding: 48px 0 36px; }
}

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; }
  .site-header, .site-footer, .no-print, .breadcrumb, .page-intro, .section, .cta, .toast, .preview-head { display: none !important; }
  main.wrap { width: 100%; max-width: none; margin: 0; padding: 0; }
  .tool-layout { display: block; }
  .print-root { display: block; }
  .sheet { border: 0; box-shadow: none; margin: 0; width: 100%; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheet svg { width: 100%; height: auto; }
}
