:root {
  --ink: #17211d;
  --muted: #5d6862;
  --green: #087a52;
  --green-dark: #075c41;
  --mint: #eaf8f1;
  --cream: #fbfaf5;
  --line: #dfe6e2;
  --paper: #ffffff;
  --shadow: 0 18px 50px rgba(17, 36, 27, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: var(--green-dark); }
button, input, select { font: inherit; }
.resource-hero {
  padding: 7.8rem 1.5rem 4.8rem;
  background:
    radial-gradient(circle at 85% 18%, rgba(255,255,255,.55) 0 10%, transparent 10.5%),
    linear-gradient(140deg, #eaf8f1 0%, #f8f4e8 100%);
  border-bottom: 1px solid var(--line);
}
.resource-wrap { width: min(1120px, 100%); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.resource-hero h1 {
  max-width: 820px;
  margin: .85rem 0 1rem;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.resource-hero .lede { max-width: 760px; color: #44514b; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 1.5rem; color: var(--muted); font-size: .9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.resource-main { padding: 3.5rem 1.5rem 5rem; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 1.5rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { padding: 1.45rem 1.5rem; border-bottom: 1px solid var(--line); background: #fbfdfc; }
.panel-head h2 { margin: 0; font-size: 1.35rem; }
.panel-head p { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; }
.panel-body { padding: 1.5rem; }
.form-section + .form-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 .2rem; font-size: 1rem; }
.form-section > p { margin: 0 0 1rem; color: var(--muted); font-size: .88rem; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.field label { display: block; margin-bottom: .38rem; font-size: .86rem; font-weight: 700; }
.money-input { position: relative; }
.money-input span { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd8d3;
  border-radius: 10px;
  padding: .7rem .85rem;
  background: #fff;
  color: var(--ink);
}
.money-input input { padding-left: 2.15rem; }
.field input:focus, .field select:focus { outline: 3px solid rgba(8,122,82,.14); border-color: var(--green); }
.results { position: sticky; top: 96px; }
.result-total { padding: 1.75rem; background: var(--ink); color: #fff; }
.result-total p { margin: 0; color: #cbd7d0; font-size: .85rem; }
.result-total strong { display: block; margin-top: .35rem; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.result-total small { display: block; margin-top: .65rem; color: #b9c9c0; }
.result-list { margin: 0; padding: 1.25rem 1.5rem; list-style: none; }
.result-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.result-list li:last-child { border-bottom: 0; }
.result-list span { color: var(--muted); }
.result-list strong { text-align: right; }
.tool-actions { display: flex; gap: .75rem; padding: 0 1.5rem 1.5rem; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .7rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.btn.secondary { background: #fff; color: var(--ink); }
.content-section { margin-top: 4rem; }
.content-section h2 { margin: 0 0 .75rem; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.03em; }
.section-lede { max-width: 760px; color: var(--muted); font-size: 1.05rem; }
.guide-grid, .stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.guide-card, .stat-card { padding: 1.35rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.guide-card h3, .stat-card h3 { margin: 0 0 .5rem; font-size: 1.04rem; }
.guide-card p, .stat-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.stat-card strong { display: block; margin-bottom: .25rem; font-size: clamp(1.8rem,4vw,2.7rem); line-height: 1.1; letter-spacing: -.04em; }
.stat-card .label { color: var(--muted); font-size: .86rem; }
.method { padding: 1.5rem; border-radius: 16px; background: var(--cream); border: 1px solid #ebe5d6; }
.method h3 { margin-top: 0; }
.method ul { padding-left: 1.2rem; }
.method li + li { margin-top: .55rem; }
.data-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.data-panel { padding: 1.4rem; border: 1px solid var(--line); border-radius: 16px; }
.data-panel h3 { margin: 0 0 1rem; }
.bar-row + .bar-row { margin-top: .9rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; font-size: .9rem; }
.bar-track { height: 9px; border-radius: 999px; background: #edf1ef; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--bar,0%); border-radius: inherit; background: var(--green); }
.status-note { margin-top: 1.25rem; padding: .9rem 1rem; border-left: 4px solid var(--green); background: var(--mint); color: #305244; font-size: .92rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.resource-footer { padding: 2rem 1.5rem; background: #101814; color: #cdd8d2; }
.resource-footer .resource-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.resource-footer a { color: #fff; }
.hidden { display: none !important; }

@media (max-width: 850px) {
  .tool-layout, .data-layout { grid-template-columns: 1fr; }
  .results { position: static; }
  .guide-grid, .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .resource-hero { padding-top: 6.5rem; }
  .input-grid, .guide-grid, .stat-grid { grid-template-columns: 1fr; }
  .tool-actions { flex-direction: column; }
  .btn { width: 100%; }
}
@media print {
  .uh-header, .resource-footer, .tool-actions, .content-section { display: none !important; }
  .resource-hero { padding: 1rem 0; background: #fff; }
  .resource-main { padding: 1rem 0; }
  .tool-layout { grid-template-columns: 1.2fr .8fr; }
  .panel { box-shadow: none; }
}
