:root {
  --bg: #f3ede2;
  --surface: rgba(255, 250, 243, 0.82);
  --text: #1f1a17;
  --text-soft: #5f5449;
  --accent: #b6542d;
  --accent-deep: #8c3918;
  --shadow: 0 24px 80px rgba(73, 48, 24, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(182, 84, 45, 0.18), transparent 30%),
    radial-gradient(circle at right 10%, rgba(55, 86, 75, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f1e7 0%, #efe5d6 50%, #efe7db 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.4), transparent 45%),
    linear-gradient(180deg, transparent, rgba(121, 75, 35, 0.08));
  pointer-events: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(32, 24, 17, 0.03) 0,
    rgba(32, 24, 17, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(243, 237, 226, 0.72);
  border-bottom: 1px solid rgba(61, 45, 27, 0.08);
}

.site-header__inner,
.page-shell {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand__mark {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #d28e5e);
  box-shadow: 0 0 0 10px rgba(182, 84, 45, 0.12);
}

.brand strong,
.section-heading h2,
.results-panel h2,
.results-hero strong,
.empty-state__figure {
  font-family: serif;
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand small,
.section-heading__eyebrow,
.results-hero__label,
.metric-card span,
.field-shell__label,
.form-actions__hint {
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.empty-state__chips span {
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(61, 45, 27, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
}

.page-shell {
  position: relative;
  padding: 2.2rem 0 4rem;
}

.form-card,
.results-panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(61, 45, 27, 0.08);
  box-shadow: var(--shadow);
}
.results-panel h2,
.section-heading h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
}

.section-heading p,
.results-panel__header p,
.results-note p,
.empty-state p {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.workspace {
  margin-top: 0.5rem;
}

.workspace__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.calculator-form {
  display: grid;
  gap: 1.25rem;
}

.form-card {
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(255, 248, 238, 0.82));
}

.section-heading {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-shell {
  display: grid;
  gap: 0.5rem;
}

.field-shell--wide {
  grid-column: span 2;
}

.field-shell input,
.field-shell select {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(61, 45, 27, 0.12);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--text);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  appearance: none;
}

.field-shell input:focus,
.field-shell select:focus,
.submit-button:focus {
  outline: none;
  border-color: rgba(182, 84, 45, 0.45);
  box-shadow: 0 0 0 4px rgba(182, 84, 45, 0.14);
}

.field-shell input:hover,
.field-shell select:hover {
  transform: translateY(-1px);
}

.switch-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.switch-grid--double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 1rem;
}

.switch-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(61, 45, 27, 0.08);
  background: rgba(255, 252, 247, 0.76);
}

.switch-card input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.switch-card strong {
  display: block;
  font-size: 1rem;
}

.switch-card small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.submit-button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #d87446);
  color: #fff7ef;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 35px rgba(182, 84, 45, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(182, 84, 45, 0.28);
}

.workspace__results {
  position: sticky;
  top: 5.5rem;
}

.results-panel {
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(22, 21, 20, 0.94), rgba(37, 33, 29, 0.98));
  color: #f7efdf;
}

.results-panel .section-heading__eyebrow,
.results-panel__header p,
.results-hero p,
.metric-card span,
.results-note p {
  color: rgba(247, 239, 223, 0.74);
}

.results-hero {
  padding: 1.25rem;
  margin-top: 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(182, 84, 45, 0.24), rgba(68, 112, 97, 0.18));
  border: 1px solid rgba(255, 241, 219, 0.08);
}

.results-hero strong {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height: 0.96;
}

.metric-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.metric-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 249, 238, 0.06);
  border: 1px solid rgba(255, 241, 219, 0.08);
}

.metric-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.1rem;
}

.metric-card--accent {
  background: rgba(239, 210, 183, 0.12);
}

.metric-card--dark {
  background: rgba(0, 0, 0, 0.18);
}

.metric-card--wide {
  grid-column: span 2;
}

.results-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 241, 219, 0.08);
}

.empty-state {
  margin-top: 1.25rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 238, 0.06);
  border: 1px solid rgba(255, 241, 219, 0.08);
}

.empty-state__figure {
  font-size: 2rem;
}

.empty-state__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.empty-state__chips span {
  background: rgba(255, 249, 238, 0.06);
  border-color: rgba(255, 241, 219, 0.08);
  color: #f7efdf;
}

.reveal {
  animation: rise-in 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal--delay-1 {
  animation-delay: 90ms;
}

.reveal--delay-2 {
  animation-delay: 160ms;
}

.reveal--delay-3 {
  animation-delay: 220ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .workspace__results {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header__inner,
  .page-shell {
    width: min(calc(100% - 1.2rem), var(--container));
  }

  .page-shell {
    padding-top: 1rem;
  }

  .form-card,
  .results-panel {
    border-radius: 24px;
  }

  .field-grid,
  .switch-grid--double,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .field-shell--wide,
  .metric-card--wide {
    grid-column: span 1;
  }

  .form-actions {
    align-items: stretch;
  }

  .submit-button {
    width: 100%;
  }
}
