:root {
  --ink: #0b241e;
  --muted: #60716c;
  --line: #dce6e1;
  --line-strong: #c9d8d1;
  --paper: #f5f3eb;
  --surface: #fffefa;
  --green: #0b4a3c;
  --green-deep: #062f27;
  --mint: #c9f5df;
  --mint-soft: #ebfaf2;
  --orange: #f4783b;
  --orange-soft: #fff0e7;
  --shadow: 0 18px 60px rgba(7, 43, 34, .08);
  --font-sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: .6rem;
  color: #fff;
  background: var(--green);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.concept-boundary {
  position: relative;
  z-index: 20;
  color: #d8eee7;
  background: var(--green-deep);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.concept-boundary-inner {
  min-height: 38px;
  padding: .5rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-size: .75rem;
}
.concept-boundary p { margin: 0; }
.concept-boundary strong { color: #fff; }
.concept-label, .local-label {
  flex: none;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  font-size: .75rem;
}
.concept-label { display: flex; align-items: center; gap: .45rem; color: var(--mint); }
.concept-label i { width: 7px; height: 7px; border-radius: 50%; background: #54dda6; box-shadow: 0 0 0 4px rgba(84,221,166,.13); }
.local-label { color: #a8c7bd; }

.app-shell { min-height: calc(100vh - 38px); display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 38px);
  padding: 2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #d9ece6;
  background:
    radial-gradient(circle at 20% 0%, rgba(46,145,111,.28), transparent 34%),
    var(--green-deep);
  border-right: 1px solid rgba(255,255,255,.08);
}
.app-brand { display: block; text-decoration: none; padding: 0 .55rem 2rem; }
.app-brand img { display: block; width: 116px; height: auto; filter: brightness(0) invert(1); }
.app-brand span { display: block; margin-top: .55rem; color: #8db3a7; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.side-nav p { margin: .4rem .75rem .55rem; color: #769d91; font-size: .75rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 43px;
  padding: 0 .8rem;
  margin: .18rem 0;
  border-radius: .68rem;
  color: #b8d3ca;
  text-decoration: none;
  font-size: .83rem;
  font-weight: 600;
}
.side-nav a span { width: 18px; text-align: center; color: #75aa98; }
.side-nav a:hover, .side-nav a:focus-visible { color: #fff; background: rgba(255,255,255,.07); }
.side-nav a.is-active { color: #fff; background: rgba(201,245,223,.13); box-shadow: inset 2px 0 0 var(--mint); }
.side-nav a.is-active span { color: var(--mint); }
.privacy-card { display: flex; gap: .65rem; padding: .85rem; border-radius: .8rem; background: rgba(201,245,223,.08); border: 1px solid rgba(201,245,223,.1); }
.privacy-card > span { color: var(--mint); font-size: .75rem; }
.privacy-card strong { display: block; color: #fff; font-size: .75rem; }
.privacy-card p { margin: .23rem 0 0; color: #8fb1a7; font-size: .75rem; line-height: 1.45; }
.quiet-links { margin: 1rem .7rem 0; display: flex; flex-wrap: wrap; gap: .45rem .85rem; }
.quiet-links a { color: #7fa397; font-size: .75rem; text-decoration: none; }
.quiet-links a:hover { color: #fff; }

.main { min-width: 0; padding: 2rem clamp(1.4rem, 4vw, 4.5rem) 2.4rem; overflow: hidden; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; max-width: 1240px; margin: 0 auto 1.8rem; }
.topbar .eyebrow, .panel-kicker { margin: 0 0 .45rem; color: var(--green); font-size: .75rem; line-height: 1; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.topbar h1 { margin: 0; max-width: 720px; font: 800 clamp(2rem, 3.2vw, 3.4rem)/1.02 var(--font-display); letter-spacing: -.055em; }
.topbar > div > p:last-child { max-width: 750px; margin: .8rem 0 0; color: var(--muted); font-size: .91rem; line-height: 1.65; }
.home-link { flex: none; margin-top: .2rem; padding: .72rem .95rem; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(255,255,255,.5); color: var(--green); font-size: .75rem; font-weight: 700; text-decoration: none; }
.home-link:hover { background: var(--surface); }

.plan-controls {
  max-width: 1240px;
  margin: 0 auto 1rem;
  padding: .85rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.control-label { display: block; margin: 0 0 .55rem .2rem; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.scenario-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.scenario-button, .currency-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: .7rem;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
  background: transparent;
}
.scenario-button { padding: 0 .9rem; color: var(--muted); }
.scenario-button span { margin-right: .35rem; color: var(--green); }
.scenario-button:hover { color: var(--green); background: #fff; }
.scenario-button.is-active { color: #fff; background: var(--green); box-shadow: 0 8px 22px rgba(11,74,60,.16); }
.scenario-button.is-active span { color: var(--mint); }
.currency-control > div { display: flex; padding: 3px; gap: 2px; border-radius: .65rem; background: #e5ebe7; }
.currency-button { min-width: 51px; padding: 0 .6rem; color: #778680; }
.currency-button.is-active { color: var(--green); background: #fff; box-shadow: 0 2px 10px rgba(10,47,39,.08); }

.plan-hero {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.8rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 90% 20%, rgba(71,168,131,.28), transparent 30%),
    linear-gradient(120deg, #073b30, #0b4c3e);
  border-radius: 1.35rem 1.35rem .35rem .35rem;
  box-shadow: var(--shadow);
}
.plan-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -95px; bottom: -150px; border: 1px solid rgba(201,245,223,.16); border-radius: 50%; box-shadow: 0 0 0 40px rgba(201,245,223,.035), 0 0 0 80px rgba(201,245,223,.02); }
.plan-identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; }
.plan-avatar { width: 50px; height: 50px; display: grid; place-items: center; flex: none; border-radius: 16px; color: var(--green-deep); background: var(--mint); font: 800 1rem var(--font-display); }
.plan-identity p { margin: 0; }
.plan-identity > div > p:first-child { color: #83cbb2; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.plan-identity h2 { margin: .28rem 0 .48rem; font: 750 clamp(1.35rem, 2vw, 2rem)/1.12 var(--font-display); letter-spacing: -.035em; }
.household { display: flex; flex-wrap: wrap; gap: .35rem .75rem; color: #bad8cf; font-size: .75rem; }
.household strong { color: #fff; }
.plan-status { position: relative; z-index: 1; display: flex; align-items: center; gap: .5rem; margin-top: .2rem; padding: .55rem .75rem; border: 1px solid rgba(201,245,223,.18); border-radius: 99px; color: #c7eadf; background: rgba(255,255,255,.06); font-size: .75rem; font-weight: 700; }
.plan-status i { width: 7px; height: 7px; border-radius: 50%; background: #70e6b5; }
.plan-summary { position: relative; z-index: 1; grid-column: 1 / -1; max-width: 760px; margin: .4rem 0 0 66px; color: #c4ddd5; font-size: .81rem; line-height: 1.58; }

.budget-grid {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  padding: 1.1rem 1.35rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: .8rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 1.1rem 1.1rem;
  box-shadow: 0 16px 40px rgba(8,46,37,.06);
}
.budget-grid article { min-width: 0; padding: .2rem .5rem; }
.budget-grid article > span, .budget-grid small { display: block; }
.budget-grid article > span { color: var(--muted); font-size: .75rem; font-weight: 600; }
.budget-grid strong { display: block; margin: .2rem 0 .1rem; font: 800 clamp(1.45rem, 2.1vw, 2rem) var(--font-display); letter-spacing: -.045em; }
.budget-grid small { color: #8b9994; font-size: .75rem; }
.budget-operator { color: #a7b4af; font: 600 1.1rem var(--font-display); }
.budget-focus { padding: .65rem .8rem !important; border-radius: .75rem; background: var(--orange-soft); }
.budget-focus strong { color: #c64f1a; }

.content-grid { max-width: 1240px; margin: 0 auto 1.25rem; display: grid; grid-template-columns: 1.03fr .97fr; gap: 1.25rem; }
.panel, .next-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1.15rem; box-shadow: 0 10px 36px rgba(8,46,37,.045); }
.panel { padding: 1.25rem; }
.panel-header { padding: .15rem .15rem 1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.panel-header h2, .next-heading h2 { margin: 0; font: 800 1.15rem var(--font-display); letter-spacing: -.035em; }
.panel-header > span { padding: .38rem .55rem; border-radius: 99px; color: var(--muted); background: #f1f4f1; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.option-list, .benefit-list { display: grid; }
.option-row, .benefit-row { display: grid; align-items: center; gap: .85rem; padding: 1rem .15rem; border-bottom: 1px solid var(--line); }
.option-row:last-child, .benefit-row:last-child { border-bottom: 0; }
.option-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
.row-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: .7rem; color: var(--green); background: var(--mint-soft); font-size: .75rem; font-weight: 800; }
.row-copy { min-width: 0; }
.row-copy > span { display: block; margin-bottom: .18rem; color: var(--green); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.row-copy strong { display: block; font-size: .79rem; }
.row-copy small { display: block; margin-top: .23rem; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.option-price { text-align: right; }
.option-price strong { display: block; font: 800 1rem var(--font-display); }
.option-price span { color: var(--orange); font-size: .75rem; font-weight: 700; }
.benefit-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.benefit-rank { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--green); font-size: .75rem; font-weight: 800; }
.benefit-amount { text-align: right; }
.benefit-amount strong { display: block; font: 800 .88rem var(--font-display); }
.benefit-amount span { display: block; margin-top: .18rem; color: var(--orange); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.verification-note { margin: .6rem .1rem 0; padding: .7rem .8rem; display: flex; gap: .55rem; color: #6f5a4e; background: #fff7ec; border-radius: .7rem; font-size: .75rem; line-height: 1.45; }
.verification-note span { width: 17px; height: 17px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; background: var(--orange); font-size: .75rem; font-weight: 800; }

.next-panel { max-width: 1240px; margin: 0 auto 1.25rem; padding: 1.4rem; display: grid; grid-template-columns: .72fr 1.28fr; gap: 2rem; }
.next-heading > p:last-child { margin: .6rem 0 0; max-width: 340px; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.next-list { counter-reset: steps; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.next-list li { counter-increment: steps; min-height: 74px; padding: .8rem .85rem .8rem 2.7rem; position: relative; display: flex; align-items: center; color: #41514c; background: #f5f6f2; border: 1px solid #e8ece7; border-radius: .75rem; font-size: .75rem; line-height: 1.48; }
.next-list li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: .8rem; top: .8rem; color: var(--green); font-size: .75rem; font-weight: 800; }

.safety-boundary { max-width: 1240px; margin: 0 auto; padding: .9rem 1.1rem; display: flex; align-items: baseline; gap: .9rem; color: #675c50; background: rgba(255,255,255,.45); border: 1px dashed #cbbfaf; border-radius: .85rem; font-size: .75rem; line-height: 1.55; }
.safety-boundary strong { flex: none; color: var(--ink); font-size: .75rem; }
.safety-boundary p { margin: 0; }
.app-footer { max-width: 1240px; margin: 1.25rem auto 0; display: flex; justify-content: space-between; gap: 1rem; color: #81908b; font-size: .75rem; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar { padding-inline: .9rem; }
  .content-grid { grid-template-columns: 1fr; }
  .next-panel { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 740px) {
  .concept-boundary-inner { padding: .55rem .8rem; justify-content: flex-start; }
  .concept-boundary p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .local-label { display: none; }
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; padding: .75rem 1rem; flex-direction: row; align-items: center; }
  .app-brand { padding: 0; display: flex; align-items: center; gap: .65rem; }
  .app-brand img { width: 84px; }
  .app-brand span { margin: 0; font-size: .75rem; }
  .side-nav, .sidebar-bottom { display: none; }
  .main { padding: 1.35rem .9rem 1.5rem; }
  .topbar { display: block; margin-bottom: 1.25rem; }
  .topbar h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
  .home-link { display: none; }
  .plan-controls { display: block; padding: .7rem; }
  .scenario-control { overflow: hidden; }
  .scenario-tabs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .scenario-button { padding: .45rem .35rem; height: auto; min-height: 54px; line-height: 1.25; }
  .scenario-button span { display: block; margin: 0 0 .18rem; }
  .currency-control { margin-top: .7rem; display: flex; align-items: center; justify-content: space-between; }
  .currency-control .control-label { margin: 0; }
  .plan-hero { padding: 1.25rem; display: block; }
  .plan-status { width: fit-content; margin: 1rem 0 0 62px; }
  .plan-summary { margin: .75rem 0 0; }
  .budget-grid { grid-template-columns: repeat(3, 1fr); gap: .2rem; padding: .8rem .45rem; }
  .budget-operator { display: none; }
  .budget-grid article { padding: .45rem !important; }
  .budget-grid strong { font-size: 1.2rem; }
  .budget-grid article > span { min-height: 29px; }
  .content-grid { gap: .85rem; margin-bottom: .85rem; }
  .panel { padding: .9rem; }
  .next-panel { padding: 1rem; margin-bottom: .85rem; }
  .next-list { grid-template-columns: 1fr; }
  .safety-boundary { display: block; }
  .safety-boundary p { margin-top: .35rem; }
  .app-footer { display: block; line-height: 1.6; }
  .app-footer span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
