:root {
  --ink: #1b2430;
  --amber: #f2a516;
  --amber-soft: #fdf1d8;
  --cream: #faf7f0;
  color-scheme: light;
}

body {
  margin: 0;
  background: #fff;
  font-family: "Geist Variable", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.site-header {
  background: var(--ink);
  color: var(--cream);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.site-header nav a {
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  color: rgb(250 247 240 / 0.7);
  text-decoration: none;
}

.site-header nav a:hover {
  background: rgb(250 247 240 / 0.1);
  color: var(--cream);
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid rgb(250 247 240 / 0.08);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), #f7c45e 60%, transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.75rem 1rem 2.25rem;
}

.hero-gauge {
  position: absolute;
  right: max(-3rem, calc(50% - 39rem));
  top: 50%;
  width: 15rem;
  height: 15rem;
  transform: translateY(-46%);
  opacity: 0.22;
}

.hero h1 {
  margin: 0.5rem 0 0.5rem;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-title {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-top: 0.75rem;
}

.hero-title h1 {
  margin: 0;
  max-width: 46rem;
}

.hero .tile {
  background: var(--amber);
  color: var(--ink);
}

.hero .crumbs,
.hero .meta,
.hero .lead {
  color: rgb(250 247 240 / 0.7);
}

.hero .meta {
  margin: 0.75rem 0 0;
}

.hero .lead {
  margin: 0;
  max-width: 40rem;
}

.tile {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  box-sizing: border-box;
  border-radius: 0.75rem;
  background: var(--amber-soft);
  color: #a86b00;
}

.guide,
.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.guide {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.crumbs {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.crumbs a {
  color: inherit;
}

.guide h1 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.guide h2 {
  position: relative;
  padding-left: 0.875rem;
  margin: 2.25rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.guide article h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: var(--amber);
}

.guide h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.guide p,
.guide ul,
.guide ol {
  margin: 0.75rem 0;
}

.guide ul,
.guide ol {
  padding-left: 1.25rem;
}

.guide ul {
  list-style: disc;
}

.guide article li::marker {
  color: var(--amber);
}

.guide ol {
  list-style: decimal;
}

.guide article a,
.more a,
.crumbs a,
.site-footer a {
  text-decoration: underline;
}

.guide li + li {
  margin-top: 0.25rem;
}

.guide a {
  color: inherit;
  text-underline-offset: 3px;
}

.meta,
.lead {
  color: var(--muted-foreground);
}

.meta {
  margin-top: 0;
  font-size: 0.875rem;
}

.lead {
  font-size: 1.0625rem;
}

.note {
  margin: 1.25rem 0;
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--amber-soft);
  font-size: 0.9375rem;
}

.table-wrap {
  margin: 1rem 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.table-wrap th,
.table-wrap td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-wrap th {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
}

.table-wrap tbody tr:nth-child(even) td {
  background: rgb(27 36 48 / 0.025);
}

.table-wrap tbody tr:hover td {
  background: var(--amber-soft);
}

.bar-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.price-bar {
  display: inline-block;
  width: calc(var(--w) * 4rem);
  min-width: 3px;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7c45e, var(--amber));
}

.pill {
  display: inline-block;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: #e3f4e6;
  color: #1f6b33;
  font-size: 0.8125rem;
  font-weight: 500;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap .num {
  text-align: right;
  white-space: nowrap;
}

.cta {
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: 1rem;
  background: var(--ink);
  color: var(--cream);
}

.cta h2 {
  padding-left: 0;
}

.cta-gauge {
  position: absolute;
  right: -1.5rem;
  bottom: -2.5rem;
  width: 9rem;
  height: 9rem;
  opacity: 0.35;
}

.cta h2,
.more h2 {
  margin: 0 0 0.5rem;
  padding-left: 0;
  font-size: 1.0625rem;
}

.cta p {
  position: relative;
  max-width: 30rem;
  margin: 0 0 1rem;
  color: rgb(250 247 240 / 0.75);
  font-size: 0.9375rem;
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  position: relative;
  background: var(--amber);
  color: var(--ink) !important;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.more {
  margin-top: 2rem;
}

.more ul {
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.guide .guide-list {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.guide .guide-list li + li {
  margin-top: 0;
}

.guide-list a {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.guide-list a:hover {
  border-color: var(--amber);
  box-shadow: 0 6px 20px -8px rgb(27 36 48 / 0.25);
  transform: translateY(-1px);
}

.card-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--cream);
}

.card-media {
  position: relative;
}

.card-media .tile {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
  border-radius: 0.625rem;
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 2px 8px rgb(27 36 48 / 0.3);
}

.card-body {
  padding: 1rem 1.125rem 1.125rem;
}

.cover {
  margin: 1.5rem 0 0.5rem;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 1rem;
  background: var(--cream);
}

.cover figcaption {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: right;
}

.cover figcaption a {
  color: inherit;
}

.guide-list strong {
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.guide-list span {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.site-footer {
  padding-bottom: 2rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer a {
  color: inherit;
}

.chart {
  margin: 1.25rem 0;
  padding: 1rem 1rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.chart-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.chart-ranges button {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.chart-ranges button:hover {
  border-color: var(--amber);
  color: var(--ink);
}

.chart-ranges button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.chart-canvas {
  position: relative;
  height: 20rem;
}

.chart:not(.ready) .chart-ranges,
.chart:not(.ready) .chart-canvas {
  display: none;
}

.chart .table-wrap {
  margin: 0.75rem 0 0;
}

.chart figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (max-width: 480px) {
  .chart {
    padding: 0.75rem 0.5rem 0.5rem;
  }
  .chart-canvas {
    height: 16rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }
  .hero-gauge {
    width: 10rem;
    height: 10rem;
    right: -3rem;
  }
  .hero-title .tile {
    display: none;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 0.5rem;
  }
}

.calc {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--cream);
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.875rem;
}

.calc label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.calc input,
.calc select {
  width: 100%;
  box-sizing: border-box;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.calc input:focus,
.calc select:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.calc small {
  color: var(--muted-foreground);
  font-weight: 400;
}

.calc-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

.calc-result div {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: #fff;
}

.calc-result span {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.calc-result output {
  font-size: 1.375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
