:root {
  --bg: #eef2f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --ink: #131721;
  --muted: #5d6475;
  --line: rgba(19, 23, 33, 0.12);
  --accent: #cf3d38;
  --accent-deep: #972320;
  --accent-soft: rgba(207, 61, 56, 0.12);
  --blue: #173d7a;
  --shadow: 0 22px 50px rgba(34, 49, 78, 0.14);
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(23, 61, 122, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eff3f9 40%, #e7edf6 100%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header,
.hero,
.workspace,
.content-grid,
.examples-section,
.faq-section,
.site-footer {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.brand,
h1, h2, h3, strong {
  font-family: "Archivo", sans-serif;
}

.brand { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 18px; color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  padding: 20px 0 28px;
}

.hero-copy,
.hero-summary,
.panel,
.content-card,
.examples-grid article,
.faq-list,
.site-footer {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-copy,
.hero-summary,
.panel,
.content-card,
.examples-grid article,
.faq-list {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 0.98; }
.lede, .notice, p, li, small { line-height: 1.65; }
.lede { font-size: 1.06rem; max-width: 62ch; }
.notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
}

.hero-summary {
  display: grid;
  align-content: start;
  gap: 8px;
  background: linear-gradient(180deg, rgba(19, 23, 33, 0.96), rgba(23, 61, 122, 0.95));
  color: white;
}
.hero-summary strong { font-size: 3.1rem; line-height: 0.95; }

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel { background: var(--surface-strong); }
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-heading h2 { margin: 0; font-size: 1.4rem; }

.status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(23, 61, 122, 0.1);
  color: var(--blue);
  font-weight: 800;
  font-size: 0.84rem;
}
.status-pill--soft { background: var(--accent-soft); color: var(--accent-deep); }

.toggle-row,
.example-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-pill,
.example-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}

.choice-pill { padding: 4px; }
.choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill span,
.example-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 700;
}

.choice-pill input:checked + span {
  background: var(--ink);
  color: white;
  border-radius: 999px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field { display: grid; gap: 8px; margin: 16px 0; }
.field span { font-weight: 700; }
input, select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
}

.form-message { color: var(--muted); margin: 12px 0 18px; }
.form-message[data-state="error"] { color: var(--accent-deep); }

.button {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 800;
}
.button--primary { background: var(--accent); border-color: transparent; color: white; }
.button--ghost { background: transparent; }

.result-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}
.result-label { display: block; color: var(--muted); margin-bottom: 8px; }
.result-hero strong { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 0.95; }
.formula-tag {
  min-width: 180px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(23, 61, 122, 0.08);
}
.formula-tag strong { display: block; font-size: 1.6rem; margin-top: 5px; }

.result-grid,
.content-grid,
.examples-grid {
  display: grid;
  gap: 18px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}
.result-grid article {
  padding: 18px;
  border-radius: 22px;
  background: #fbfcfe;
  border: 1px solid var(--line);
}
.result-grid strong {
  display: block;
  font-size: 1.45rem;
  margin-top: 8px;
}

.review-card {
  border-radius: 24px;
  padding: 20px;
  background: var(--accent-soft);
}

.content-grid,
.examples-section,
.faq-section { margin-top: 26px; }
.content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid--faq { grid-template-columns: repeat(2, minmax(0, 1fr)); }

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  vertical-align: top;
}

.examples-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plain-list { margin: 0; padding-left: 18px; }

.faq-list { padding: 12px 18px; }
.faq-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 18px 0;
  font-weight: 800;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.faq-answer {
  display: none;
  padding: 0 0 14px;
  color: var(--muted);
}
.faq-answer.is-open { display: block; }

.site-footer {
  margin: 28px auto 36px;
  padding: 22px 28px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 960px) {
  .hero,
  .workspace,
  .content-grid,
  .content-grid--faq,
  .examples-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: start; gap: 14px; }
  .field-grid,
  .result-grid { grid-template-columns: 1fr; }
  .result-hero { flex-direction: column; align-items: start; }
  .formula-tag { width: 100%; }
}
