:root {
  --ink: #0f1b2d;
  --muted: #51607a;
  --brand: #0e7c86;
  --brand-dark: #0a5c64;
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e1e7ef;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid #7cc4cb; outline-offset: 2px; border-radius: 4px; }
.container { width: min(1080px, 92%); margin-inline: auto; }
.narrow { width: min(760px, 92%); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.site-header nav a:hover { color: var(--ink); }
@media (max-width: 620px) { .site-header nav a:nth-child(n+3) { display: none; } }

.hero { background: linear-gradient(180deg, #e9f6f7 0%, var(--bg) 100%); padding: 72px 0 56px; }
.hero-inner { max-width: 760px; }
.badge { display: inline-block; margin: 0 0 1rem; padding: .35rem .8rem; border-radius: 999px; background: #d6eef0; color: var(--brand-dark); font-size: .85rem; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--brand); }
h2 { font-size: 1.6rem; margin: 0 0 1.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; }

.section { padding: 56px 0; }
.section.alt { background: #eef2f7; }

.btn { display: inline-block; border: 0; border-radius: 10px; padding: .75rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn[disabled] { background: #b9c4d0; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand-dark); border: 1px solid var(--line); padding: .4rem .9rem; }
.btn-ghost:hover { background: #f1f5f9; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.gate, .tool { max-width: 820px; }
.check { display: flex; gap: .7rem; align-items: flex-start; margin: 1rem 0 1.25rem; cursor: pointer; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; }

.tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: .7rem 1rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }

label { display: block; font-weight: 600; margin: 0 0 .35rem; }
textarea, select { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c7d1de; border-radius: 10px; padding: .7rem .8rem; }
textarea { resize: vertical; min-height: 140px; }
textarea:focus, select:focus { border-color: var(--brand); outline: 3px solid #cfe9ec; }
.counter { margin: .3rem 0 1rem; text-align: right; color: var(--muted); font-size: .85rem; }
.counter.over { color: var(--danger); font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.result-wrap { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.result { white-space: pre-wrap; word-wrap: break-word; background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; min-height: 3rem; }
.result.error { background: #fdecea; border-color: #f4c7c3; color: var(--danger); }
.result.busy { color: var(--muted); }
.ai-note { color: var(--muted); font-size: .85rem; margin: .75rem 0 0; }
.notice { background: #fff6e0; border: 1px solid #f1d58a; border-radius: 10px; padding: .8rem 1rem; }

.steps { list-style: none; counter-reset: s; display: grid; gap: 1rem; padding: 0; margin: 0; grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .35rem; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.steps span { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid3 p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }

details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .75rem; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .6rem 0 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 2rem 0; color: var(--muted); }
.foot p { margin: .25rem 0; }
.small { font-size: .85rem; }

.legal { padding: 48px 0 72px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal p, .legal li { color: #2c3a50; }
.legal .updated { color: var(--muted); font-size: .9rem; }
