:root {
  --bg: #f5efe5;
  --bg-strong: #f0e1cb;
  --surface: rgba(255, 252, 246, 0.92);
  --surface-strong: #fffaf2;
  --ink: #1e2024;
  --muted: #5e616b;
  --line: rgba(32, 35, 41, 0.12);
  --accent: #cf6b2d;
  --accent-deep: #9f4412;
  --forest: #2f5c4b;
  --shadow: 0 20px 50px rgba(41, 34, 19, 0.12);
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(207, 107, 45, 0.16), transparent 30%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 45%, #f7f0e7 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, .result-hero strong, .panel-metric strong {
  font-family: "Space Grotesk", sans-serif;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  padding: 18px 0 30px;
}

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

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.78rem;
}

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

.hero-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  background: linear-gradient(180deg, rgba(47, 92, 75, 0.95), rgba(30, 42, 39, 0.95));
  color: #f4efe7;
}

.panel-metric strong { display: block; font-size: 3rem; margin: 8px 0 4px; }
.panel-list { margin: 0; padding-left: 20px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  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.45rem; }

.status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(47, 92, 75, 0.1);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.84rem;
}
.status-pill--soft { background: rgba(207, 107, 45, 0.1); color: var(--accent-deep); }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field span, legend { font-weight: 700; }

input, select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  padding: 14px 15px;
}

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

.unit-toggle {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.choice-pill,
.example-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  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: 600;
}

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

.example-row { margin: 4px 0 10px; }
.example-chip { padding: 0 14px; color: var(--muted); }

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

.button {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 700;
}
.button--primary { background: var(--accent); color: white; border-color: transparent; }
.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.96; }
.annual-box {
  min-width: 180px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(47, 92, 75, 0.08);
}
.annual-box strong { display: block; font-size: 2rem; margin: 6px 0; }

.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: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
}
.result-grid strong {
  display: block;
  font-size: 1.6rem;
  margin: 8px 0 5px;
  font-family: "Space Grotesk", sans-serif;
}

.review-card {
  border-radius: 24px;
  padding: 20px;
  background: rgba(207, 107, 45, 0.08);
}

.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)); }
.content-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.content-card th,
.content-card td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 0;
  vertical-align: top;
}

.section-heading h2,
.content-card h2,
.examples-grid h3 { margin-top: 0; }
.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: 700;
  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;
  border-radius: 24px;
  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; }
  .annual-box { width: 100%; }
}
