:root {
  --bg: #0a0f1a;
  --bg-soft: #111b2e;
  --surface: #f7f9fc;
  --card: #ffffff;
  --text: #102033;
  --muted: #53657d;
  --line: #dbe3ee;
  --brand: #1f6feb;
  --brand-2: #0ea5a4;
  --success: #137a52;
  --warn: #a56600;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(16, 32, 51, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, pre, textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  background: linear-gradient(180deg, #09101c 0%, #0f1728 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.site-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(31,111,235,0.28);
}
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
}
.menu-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 8px 10px;
}

.hero {
  background:
    radial-gradient(circle at top right, rgba(31,111,235,0.2), transparent 35%),
    radial-gradient(circle at left center, rgba(14,165,164,0.18), transparent 28%),
    linear-gradient(180deg, #0f1728 0%, #101a2d 68%, #152338 100%);
  color: #fff;
  padding: 68px 0 56px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.84);
  font-size: 0.82rem;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.05;
  margin: 0 0 16px;
  max-width: 900px;
}
.hero p {
  font-size: 1.08rem;
  max-width: 760px;
  color: rgba(255,255,255,0.84);
  margin: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  align-items: start;
}
.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(8px);
}
.hero-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.84);
}

.section { padding: 56px 0; }
.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 2.2vw, 2.4rem);
  line-height: 1.15;
}
.section-intro {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 760px;
}
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tool-card {
  padding: 24px;
}
.tool-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}
.tool-card p {
  margin: 0 0 14px;
  color: var(--muted);
}
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef4ff;
  color: #24456a;
  font-size: 0.78rem;
  font-weight: 600;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.trust-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.trust-item strong { display: block; margin-bottom: 6px; }
.muted { color: var(--muted); }

.page-hero {
  background: linear-gradient(180deg, #0f1728 0%, #17253b 100%);
  color: #fff;
  padding: 42px 0 34px;
}
.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.breadcrumbs a { color: rgba(255,255,255,0.78); }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.1; }
.page-hero p { margin: 0; max-width: 820px; color: rgba(255,255,255,0.82); }

.byline {
  margin-top: 14px;
  color: rgba(255,255,255,0.68);
  font-size: 0.92rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}
.tool-shell {
  padding: 24px;
}
.tool-shell h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.tool-shell textarea,
.tool-shell input,
.tool-shell select {
  width: 100%;
  border: 1px solid #cdd8e7;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.97rem;
  background: #fcfdff;
  color: var(--text);
}
.tool-shell textarea {
  min-height: 250px;
  resize: vertical;
  line-height: 1.5;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), #1257be); color: #fff; }
.btn-secondary { background: #edf3fb; color: #204061; }
.btn-ghost { background: transparent; border: 1px solid #cbd7e6; color: #27425f; }
.output-shell {
  padding: 24px;
  position: sticky;
  top: 96px;
}
.output-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-ok { background: #e8f7ee; color: var(--success); }
.status-warn { background: #fff3db; color: var(--warn); }
.status-error { background: #fde8e8; color: var(--danger); }
.output-box, .explain-box {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 14px;
  padding: 16px;
}
.output-box pre,
.explain-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.sidebar-list,
.faq-list,
.plain-list {
  margin: 0;
  padding-left: 18px;
}
.sidebar-list li,
.faq-list li,
.plain-list li { margin-bottom: 10px; }

.callout {
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #eff8ff 0%, #f7fbff 100%);
  border: 1px solid #d2e5fb;
}
.callout strong { display: block; margin-bottom: 6px; }

.faq-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.faq-item:first-child { border-top: 0; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--muted); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.faq-answer {
  display: none;
  padding-top: 12px;
}
.faq-item.is-open .faq-answer {
  display: block;
}
.faq-icon {
  color: var(--muted);
  transition: transform 160ms ease;
}
.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.card-grid {
  display: grid;
  gap: 18px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.hero-actions .btn {
  text-decoration: none;
}
.mini-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}
.tool-shell label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.tool-shell .field-group + .field-group {
  margin-top: 16px;
}
.output-box {
  min-height: 260px;
}
.result-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.stack {
  display: grid;
  gap: 16px;
}
.hub-list {
  display: grid;
  gap: 12px;
}
.hub-item {
  padding: 18px;
}
.hub-item h3,
.guide-card h3 {
  margin: 0 0 8px;
}
.guide-card {
  padding: 22px;
}
.guide-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #eff8ff;
  color: #24456a;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.check-list {
  margin: 0;
  padding-left: 18px;
}
.check-list li {
  margin-bottom: 8px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table thead {
  background: #f4f8fd;
  color: #27425f;
}
.tool-intro {
  margin-bottom: 18px;
}
.inline-code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef4ff;
  color: #24456a;
}
.legal-grid {
  display: grid;
  gap: 20px;
}

.footer {
  background: #0e1727;
  color: rgba(255,255,255,0.76);
  padding: 40px 0;
  margin-top: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 20px;
}
.footer h4 { margin: 0 0 10px; color: #fff; }
.footer a { color: rgba(255,255,255,0.82); display: block; margin-bottom: 8px; }
.footer p { margin: 0; }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero-grid,
  .tool-layout,
  .grid-3,
  .grid-2,
  .trust-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 10px;
  }
  .site-nav.is-open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .site-header-inner { align-items: flex-start; flex-wrap: wrap; }
  .output-shell { position: static; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
