/* ---------- tokens (shared design system) ---------- */
:root {
  --page: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --ink: #0e1116;
  --ink-2: #4b5563;
  --muted: #8b93a1;
  --hairline: #e6e8ee;
  --border: rgba(14, 17, 22, 0.10);
  --accent: #2a78d6;
  --accent-2: #1baf7a;
  --accent-weak: #e3eefc;
  --good: #0ca30c;
  --good-text: #067d06;
  --danger: #d03b3b;
  --grad: linear-gradient(135deg, #2a78d6 0%, #1baf7a 100%);
  --ring: rgba(42, 120, 214, 0.22);
  --glow-a: rgba(42, 120, 214, 0.12);
  --glow-b: rgba(27, 175, 122, 0.10);
  --head-bg: rgba(255, 255, 255, 0.78);
  --card-shadow: 0 1px 2px rgba(14, 17, 22, 0.04), 0 10px 30px rgba(14, 17, 22, 0.06);
  --card-shadow-hover: 0 2px 4px rgba(14, 17, 22, 0.05), 0 16px 40px rgba(14, 17, 22, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0d10;
    --surface: #15181d;
    --surface-2: #1c2027;
    --ink: #f4f6f8;
    --ink-2: #b9c0cc;
    --muted: #7e8694;
    --hairline: #262b33;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #4c93ea;
    --accent-2: #22c58b;
    --accent-weak: #14283f;
    --good: #22c55e;
    --good-text: #34d399;
    --danger: #ef6a6a;
    --grad: linear-gradient(135deg, #4c93ea 0%, #22c58b 100%);
    --ring: rgba(76, 147, 234, 0.30);
    --glow-a: rgba(76, 147, 234, 0.20);
    --glow-b: rgba(34, 197, 139, 0.13);
    --head-bg: rgba(11, 13, 16, 0.72);
    --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 34px rgba(0, 0, 0, 0.45);
    --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 44px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(760px 480px at 10% -120px, var(--glow-a), transparent 70%),
    radial-gradient(640px 440px at 92% -140px, var(--glow-b), transparent 70%),
    var(--page);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.025em; font-weight: 800; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 20px; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { -webkit-tap-highlight-color: transparent; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--head-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.head-row { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 19px; font-weight: 800; color: #fff; border-radius: 11px;
  background: var(--grad);
  box-shadow: 0 3px 10px var(--ring);
}

/* ---------- hero ---------- */
.hero { padding: 52px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.hero-copy { max-width: 580px; }
.hero-art { flex: 0 0 auto; width: 224px; filter: drop-shadow(0 12px 30px var(--glow-a)); }
.hero-art svg { display: block; width: 100%; height: auto; }
.ha-gs { stop-color: var(--accent); }
.ha-track { stroke: var(--accent-weak); }
.ha-arc { stroke: var(--accent); }
.ha-badge { fill: var(--good); }
.ha-badge-check { stroke: #fff; }
.ha-coin { fill: var(--accent-weak); stroke: var(--accent); }
.glc-bubble { fill: var(--surface); stroke: var(--ink-2); }
.glc-letter { fill: var(--ink-2); font-family: "Inter", system-ui, sans-serif; }
.glc-bubble-2 { fill: var(--accent-weak); stroke: var(--accent); }
.glc-letter-2 { fill: var(--accent); font-family: "Inter", system-ui, sans-serif; }
.sub { color: var(--ink-2); font-size: 18px; max-width: 640px; margin: 0 0 18px; }
.badge-lex {
  display: inline-block; margin: 6px 0 0; font-size: 13px; font-weight: 600;
  color: var(--good-text);
}
.badge-privacy {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-weak);
  border-radius: 999px; padding: 7px 15px; margin: 0 0 8px;
}

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px; padding: 4px;
  width: max-content; max-width: 100%;
  margin: 0 0 18px;
}
.tab {
  border: 0; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 9px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px var(--ring); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 24px; margin: 0 0 22px;
  box-shadow: var(--card-shadow);
}

/* ---------- converter ---------- */
.style-wrap { margin: 0 0 16px; }
.style-label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; width: max-content; max-width: 100%; }
select {
  font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.io-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.io-label { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.io-count { font-size: 12px; color: var(--muted); }
textarea {
  width: 100%; min-height: 240px; resize: vertical;
  font: inherit; font-size: 16px; line-height: 1.55; color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 13px; padding: 14px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
textarea[readonly] { background: var(--surface); }

.io-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
  border-radius: 11px; padding: 11px 18px; border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px var(--ring); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--ring); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- FAQ ---------- */
.faq { margin: 40px 0 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 15px 19px; margin-bottom: 10px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.15s ease;
}
.faq details:hover { border-color: var(--accent); }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
  font-weight: 700; font-size: 15px;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq p { color: var(--ink-2); font-size: 15px; margin: 12px 0 2px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--hairline); margin-top: 48px; padding: 26px 0 34px; }
.foot-note { color: var(--muted); font-size: 13px; max-width: 640px; }
.foot-meta { color: var(--muted); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 30px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-art { width: 158px; align-self: center; }
  .conv-grid { grid-template-columns: 1fr; }
  textarea { min-height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
