:root {
  --bg: #fbf7ef;
  --panel: rgba(15, 15, 15, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --ink: #fffaf3;
  --ink-dark: #121212;
  --muted: rgba(255, 250, 243, 0.72);
  --muted-dark: #5d5750;
  --line: rgba(255, 255, 255, 0.13);
  --forest: #111111;
  --moss: #f1593d;
  --gold: #ffc30b;
  --gold-soft: #ffe08a;
  --rose: #f1593d;
  --shadow: 0 24px 80px rgba(10, 10, 10, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

@font-face {
  font-family: "Chillax-Medium";
  src: url("https://kirkhillcoop.org/wp-content/uploads/2025/06/Chillax-Medium.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "GeneralSans-Regular";
  src: url("https://kirkhillcoop.org/wp-content/uploads/2025/06/GeneralSans-Regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "GeneralSans-Semibold";
  src: url("https://kirkhillcoop.org/wp-content/uploads/2025/06/GeneralSans-Semibold.otf") format("opentype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "GeneralSans-Regular", "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
  background: #121212;
  min-height: 100vh;
}

body::before {
  content: none;
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-card,
.panel,
.metric {
  background: rgba(18, 18, 18, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.brandbar {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.7rem 0.2rem;
}

.brandbar__home img {
  width: 54px;
  height: auto;
  display: block;
}

.hero-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 430px);
  gap: 1.4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-copy {
  min-width: 0;
}

.hero-form {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-card::after {
  content: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--forest);
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2 {
  font-family: "Chillax-Medium", "Trebuchet MS", sans-serif;
  line-height: 0.98;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  max-width: 9ch;
}

.hero p {
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 62ch;
  color: var(--muted);
}

.hero-note {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 195, 11, 0.1);
  border: 1px solid rgba(255, 195, 11, 0.22);
  color: var(--gold-soft) !important;
}

.hero-note--secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ink) !important;
}

.hero-note--important {
  display: block;
  margin-top: 0.35rem;
  background: rgba(241, 89, 61, 0.16);
  border-color: rgba(241, 89, 61, 0.55);
  color: #ffd8cf !important;
  box-shadow: inset 0 0 0 1px rgba(241, 89, 61, 0.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.pill {
  border: 0;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: var(--moss);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}

.pill:hover,
.pill:focus-visible {
  transform: translateY(-1px);
  background: #e04e34;
}

.panel {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
}

.results-layout {
  display: block;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-heading p,
.disclaimer,
.muted {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 1.25rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.field-grid--single {
  grid-template-columns: 1fr;
}

label,
legend {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-dark);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.95rem;
  font: inherit;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mobile-details {
  margin-top: 0.5rem;
}

.mobile-details summary {
  display: none;
}

.mobile-details__content {
  display: grid;
  gap: 0.7rem;
}

.mobile-details__content p {
  margin: 0;
}

.ppa-play {
  display: grid;
  gap: 0.8rem;
}

.ppa-play__panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ppa-play__panel input[type="range"] {
  padding: 0;
  background: transparent;
  accent-color: var(--gold);
}

.button {
  border: 0;
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--moss);
  color: white;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.button--warn {
  background: rgba(241, 89, 61, 0.14);
  color: #ffb19c;
}

.status {
  min-height: 1.4rem;
  color: var(--forest);
  font-weight: 700;
}

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

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  padding: 1rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: none;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong {
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
}

.metric__subtext {
  margin-top: 0.2rem;
}

.formula {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 195, 11, 0.35);
}

.formula code {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.96rem;
  line-height: 1.6;
  white-space: normal;
}

.comparison-block {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

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

.comparison-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison-card--muted {
  opacity: 0.75;
}

.comparison-card__label {
  display: block;
  color: var(--gold);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.comparison-card strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.comparison-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.comparison-card__subtle {
  margin-top: 0.55rem !important;
  font-size: 0.92rem;
}

.comparison-card__range {
  margin-top: 0.65rem !important;
  color: var(--gold-soft) !important;
  font-size: 0.88rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-legend__swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.chart-legend__swatch--actual {
  background: var(--moss);
}

.chart-legend__swatch--p50 {
  background: var(--gold);
}

.stats-callouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.stats-details {
  margin-top: 1rem;
}

.spec-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: rgba(255, 255, 255, 0.03);
}

.spec-table th,
.spec-table td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-table th {
  color: var(--gold-soft);
  font-weight: 700;
}

.spec-table td {
  color: var(--ink);
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.1rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 1rem 0;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--gold-soft);
}

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

.faq-item__answer {
  padding: 0 0 1rem;
}

.faq-item__answer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.history-chart {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.75rem;
}

.history-chart svg {
  width: 100%;
  min-width: 860px;
  height: auto;
  display: block;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.chart-axis-label {
  fill: rgba(255, 250, 243, 0.72);
  font-size: 12px;
  font-family: "GeneralSans-Regular", "Avenir Next", sans-serif;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line--actual {
  stroke: var(--moss);
}

.chart-line--p50 {
  stroke: var(--gold);
}

.chart-point--actual {
  fill: var(--moss);
}

.chart-point--p50 {
  fill: var(--gold);
}

.disclaimer {
  padding: 1rem 1.15rem;
  background: rgba(241, 89, 61, 0.13);
  border-radius: var(--radius-md);
  border: 1px solid rgba(241, 89, 61, 0.24);
}

.footer-note {
  margin-top: 1.2rem;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  margin: 2rem auto 0;
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  color: var(--muted);
}

.site-footer img {
  width: 58px;
  height: auto;
  display: block;
}

@media (max-width: 980px) {
  .hero-grid,
  .metrics,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .stats-callouts {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-form {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .mobile-details summary {
    display: block;
    cursor: pointer;
    color: var(--gold-soft);
    font-weight: 700;
    list-style: none;
  }

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

  .mobile-details summary::after {
    content: " +";
  }

  .mobile-details[open] summary::after {
    content: " -";
  }

  .page {
    width: min(100% - 1rem, 100%);
    padding-top: 0.6rem;
  }

  .hero-card,
  .panel {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .actions,
  .hero-actions {
    align-items: stretch;
  }

  .button,
  .pill {
    width: 100%;
    justify-content: center;
  }

  .mobile-details:not([open]) .mobile-details__content {
    display: none;
  }
}
