:root {
  --ink: #14241c;
  --ink-soft: #4a5d4e;
  --paper: #f7f4ef;
  --paper-deep: #d4dcce;
  --surface: #fdfbf7;
  --surface-tint: #efeae2;
  --mist: rgba(20, 36, 28, 0.06);
  --line: rgba(20, 36, 28, 0.1);
  --accent: #c87a53;
  --accent-ink: #fdfbf7;
  --signal: #4a5d4e;
  --pine: #1c2e24;
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  background: var(--paper);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(212, 220, 206, 0.9) 0%, transparent 55%),
    radial-gradient(700px 480px at 96% 8%, rgba(200, 122, 83, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #fdfbf7 0%, #f7f4ef 42%, #e8ebe3 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
}

.brand-mark-link {
  display: inline-flex;
  line-height: 0;
}

.brand a.brand-name {
  color: inherit;
  text-decoration: none;
}

.brand-mark-img {
  display: block;
  width: 50px;
  height: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-aside {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand-parent {
  color: inherit;
  text-decoration: none;
}

.brand-parent:hover {
  color: var(--accent);
}

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4.5rem;
}

.hero {
  max-width: 36rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
}

.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 38ch;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  animation: rise 0.8s var(--ease) 0.08s both;
}

@media (min-width: 900px) {
  .workspace {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: start;
  }
}

.inputs,
.results {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1.25rem;
  padding: 0;
}

.results {
  padding: 0 0 0 0;
}

@media (min-width: 900px) {
  .results {
    padding-left: 2rem;
    border-left: 1px solid var(--line);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(74, 93, 78, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 93, 78, 0.1);
}

.primary {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  margin-top: 0.35rem;
  background: var(--pine);
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.primary:hover {
  transform: translateY(-1px);
  background: #24382e;
}

.primary:active {
  transform: translateY(0);
}

.results-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.total {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

.results-note {
  margin: 0.65rem 0 1.4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.streams {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  gap: 0;
}

.streams li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.streams li:last-child {
  border-bottom: 1px solid var(--line);
}

.streams strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.cta {
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.35rem;
  background: var(--pine);
  color: var(--surface);
}

.cta h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cta p {
  margin: 0 0 1rem;
  color: rgba(253, 251, 247, 0.78);
  font-size: 0.94rem;
  line-height: 1.6;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #2a1810;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.cta-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.cta-fine {
  margin: 0.85rem 0 0 !important;
  font-size: 0.74rem !important;
  color: rgba(253, 251, 247, 0.5) !important;
}

.content-block {
  margin-top: 3.25rem;
  max-width: 40rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  animation: rise 0.8s var(--ease) 0.15s both;
}

.content-block h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.content-block p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.content-block p:last-child {
  margin-bottom: 0;
}

.plain-list {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.plain-list li {
  margin-bottom: 0.55rem;
  line-height: 1.6;
}

.plain-list strong {
  color: var(--ink);
  font-weight: 600;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--ink);
  line-height: 1.45;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 500;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0.7rem 0 0;
  line-height: 1.7;
}

.faq-item a {
  color: var(--accent);
  font-weight: 600;
}

.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.foot a {
  color: var(--ink-soft);
}

.results.is-live .total {
  animation: pop 0.45s var(--ease);
}

@keyframes pop {
  from {
    opacity: 0.45;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .inputs {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .brand-aside {
    display: none;
  }

  .results {
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
