:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-deep: #e9e4d8;
  --ink: #171a18;
  --muted: #666b66;
  --line: #cbc8bc;
  --line-dark: #9ea098;
  --accent: #087e69;
  --accent-dark: #056150;
  --accent-soft: #d7ebe4;
  --white: #fffef9;
  --warning: #aa4b24;
  --shadow: 0 18px 45px rgb(24 31 27 / 8%);
  --radius: 14px;
  --max: 1180px;
  font-family: "Geist", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  padding: 0 clamp(20px, 4vw, 56px) 70px;
  border-bottom: 1px solid var(--line);
}

.topbar,
.hero-grid,
main,
footer {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--accent);
  top: 3px;
  left: 3px;
}

.topbar-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  padding: 11px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px) scale(0.98);
}

.button:focus-visible,
a:focus-visible,
input:focus-visible + .check-control,
.choice-card:has(input:focus-visible) {
  outline: 3px solid rgb(8 126 105 / 28%);
  outline-offset: 3px;
}

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

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--ink);
  background: transparent;
}

.button-secondary:hover,
.button-quiet:hover {
  background: var(--ink);
  color: var(--white);
}

.button-quiet {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--line-dark);
  background: transparent;
  font-size: 0.82rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: end;
  padding-top: clamp(70px, 10vw, 130px);
}

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 790;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.65rem, 6.4vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 760;
}

.hero-lede {
  max-width: 650px;
  margin: 28px 0 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.55;
}

.budget-card {
  padding: 28px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.budget-label,
.budget-currency {
  margin: 0;
  color: #b9beb9;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.budget-value {
  margin: 10px 0 5px;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 720;
  color: #f5f0e5;
}

.budget-rule {
  height: 1px;
  background: #3c423e;
  margin: 26px 0 18px;
}

.budget-details {
  margin: 0;
  display: grid;
  gap: 14px;
}

.budget-details div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.budget-details dt {
  color: #aeb4af;
  font-size: 0.8rem;
}

.budget-details dd {
  margin: 0;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px max(20px, calc((100vw - var(--max)) / 2));
  background: rgb(244 241 232 / 94%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-copy strong {
  color: var(--ink);
}

.progress-track {
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  background: #d8d4c9;
}

.progress-track::-webkit-progress-bar {
  background: #d8d4c9;
}

.progress-track::-webkit-progress-value {
  background: var(--accent);
  transition: width 260ms ease;
}

.progress-track::-moz-progress-bar {
  background: var(--accent);
  transition: width 260ms ease;
}

main {
  padding: 0 clamp(20px, 4vw, 56px);
}

.section {
  padding-block: clamp(80px, 10vw, 140px);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading h2,
.safety-note h2 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.choice-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.choice-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-dark);
  box-shadow: var(--shadow);
}

.choice-card:has(input:checked) {
  border: 2px solid var(--accent);
}

.choice-card > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-visual {
  position: relative;
  min-height: 225px;
  overflow: hidden;
  background: #e5e3dc;
}

.choice-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 8px;
  background: rgb(23 26 24 / 88%);
  color: white;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.choice-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  line-height: 1.48;
}

.choice-topline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
}

.choice-topline strong {
  font-size: 1.05rem;
}

.choice-content a,
.item-meta a {
  color: var(--accent-dark);
  font-weight: 760;
  text-underline-offset: 4px;
}

.resolved-check {
  width: fit-content;
  margin-top: 18px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--accent-soft);
  cursor: pointer;
  font-weight: 700;
}

.check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-control {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--line-dark);
  background: var(--white);
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.check-control::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 150ms ease;
}

.check-input:checked + .check-control {
  background: var(--accent);
  border-color: var(--accent);
}

.check-input:checked + .check-control::after {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.item-list {
  border-top: 1px solid var(--line-dark);
}

.item-card {
  display: grid;
  grid-template-columns: 44px 160px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 180ms ease, background-color 180ms ease;
}

.item-card:has(.check-input:checked) {
  opacity: 0.6;
}

.item-card:has(.check-input:checked) h3 {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.item-card-optional {
  background: rgb(255 254 249 / 45%);
}

.item-check {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.item-image {
  width: 160px;
  height: 112px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
}

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

.item-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.item-title-row h3,
.counter-card h3,
.inventory-panel h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: -0.025em;
}

.price {
  flex: 0 0 auto;
  font-weight: 760;
  color: var(--accent-dark);
}

.item-copy > p {
  max-width: 800px;
  margin: 9px 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 0.82rem;
}

.item-meta span {
  font-weight: 720;
}

.section-counter {
  background: var(--paper-deep);
  box-shadow: 0 0 0 100vmax var(--paper-deep);
  clip-path: inset(0 -100vmax);
}

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

.counter-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
}

.counter-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #eeece5;
  border-bottom: 1px solid var(--line);
}

.counter-card > div {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.counter-number {
  margin: 0 0 16px;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.counter-card div > p:not(.counter-number) {
  margin: 12px 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.inline-check {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 720;
}

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

.inventory-panel {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--white);
}

.inventory-panel h3 {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.inventory-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e4e1d8;
  cursor: pointer;
}

.inventory-panel-stop {
  background: #eee4dc;
  border-color: #d5bdae;
}

.inventory-panel-stop ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.inventory-panel-stop li {
  padding: 13px 0 13px 24px;
  border-bottom: 1px solid rgb(170 75 36 / 17%);
  position: relative;
}

.inventory-panel-stop li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 10px;
  height: 1px;
  background: var(--warning);
}

.safety-note {
  margin-block: 50px 90px;
  padding: clamp(28px, 6vw, 54px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  background: var(--ink);
  color: var(--white);
}

.safety-note h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.safety-note p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #bec3be;
  line-height: 1.6;
}

.safety-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #626862;
  color: #f2b66f;
  font-weight: 800;
}

footer {
  padding: 30px clamp(20px, 4vw, 56px) 45px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 320px;
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .budget-card {
    max-width: 560px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading > p {
    max-width: 620px;
  }

  .choice-card {
    grid-template-columns: 1fr;
  }

  .choice-visual {
    min-height: 260px;
  }

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

  .counter-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  }

  .counter-card > img {
    height: 100%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .hero {
    padding-inline: 18px;
    padding-bottom: 50px;
  }

  .topbar {
    min-height: 70px;
  }

  .topbar-actions .button:first-child {
    display: none;
  }

  .hero-grid {
    padding-top: 66px;
    gap: 40px;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 4.2rem);
  }

  .hero-actions {
    display: grid;
  }

  .budget-card {
    padding: 22px;
  }

  .progress-shell {
    padding-inline: 18px;
  }

  main {
    padding-inline: 18px;
  }

  .section {
    padding-block: 74px;
  }

  .choice-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .choice-visual {
    min-height: 220px;
  }

  .item-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding-block: 20px;
  }

  .item-image {
    grid-column: 2;
    width: 100%;
    height: 170px;
  }

  .item-copy {
    grid-column: 2;
  }

  .item-title-row {
    flex-direction: column;
    gap: 6px;
  }

  .counter-card {
    display: flex;
  }

  .counter-card > img {
    height: auto;
    aspect-ratio: 4 / 3;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .safety-note {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: white;
    font-size: 10pt;
  }

  .topbar-actions,
  .hero-actions,
  .progress-shell,
  .toast {
    display: none !important;
  }

  .hero,
  .section,
  .safety-note {
    padding-block: 24px;
  }

  .hero-grid,
  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 20px;
  }

  h1 {
    font-size: 34pt;
  }

  .budget-card {
    color: black;
    background: white;
    border: 1px solid #888;
    box-shadow: none;
  }

  .budget-label,
  .budget-currency,
  .budget-value,
  .budget-details dt {
    color: black;
  }

  .choice-card,
  .item-card,
  .counter-card,
  .inventory-panel,
  .safety-note {
    break-inside: avoid;
  }

  .section-counter {
    background: white;
    box-shadow: none;
  }

  .safety-note {
    color: black;
    background: white;
    border: 2px solid black;
  }

  .safety-note p {
    color: #333;
  }
}
