:root {
  color-scheme: light;
  --green: #132c2a;
  --dark: #102321;
  --ink: #192b28;
  --muted: #495d56;
  --paper: #f3f5ef;
  --white: #fff;
  --line: #cbd4c8;
  --lime: #d8f479;
  font: 100%/1.6 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: #245447; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #a96113;
  outline-offset: 4px;
}
.wrap { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; z-index: 1; left: 1rem; top: -8rem; background: white; padding: .7rem; }
.skip:focus { top: .5rem; }
.site-header, footer { background: var(--dark); color: white; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 4.4rem; padding-block: .75rem; }
.bar nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.bar a { color: #edf4eb; text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; font-size: 1.16rem; letter-spacing: -.025em; }
.uk { color: var(--lime); }
.brand-mark { width: 1.2rem; height: 1.2rem; border: 2px solid var(--lime); border-right-width: 6px; transform: skewY(-14deg); margin-right: .25rem; }
.hero { background: var(--green); color: #f7faf1; overflow: hidden; }
.hero-inner { min-height: 29rem; padding-block: 4rem; display: grid; grid-template-columns: 1.22fr 1fr; align-items: center; gap: 2rem; }
.eyebrow, .category { font-size: .875rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--lime); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 5.5vw, 4.85rem); margin-bottom: 1.15rem; }
h2 { font-size: clamp(1.45rem, 3vw, 2.15rem); margin-bottom: .9rem; }
h3 { font-size: 1.2rem; margin-bottom: .55rem; }
.hero-copy, .intro { max-width: 39rem; font-size: 1.12rem; }
.hero-copy { color: #dde8dc; margin-bottom: 1.6rem; }
.button, .reset { font: inherit; font-weight: 750; min-height: 2.8rem; cursor: pointer; }
.button { background: var(--lime); color: var(--dark); border: 1px solid #91aa46; border-radius: .35rem; padding: .65rem 1.1rem; display: inline-block; text-decoration: none; }
.button:hover { background: #c9e565; }
.drawing { aspect-ratio: 1.28; position: relative; border: 1px solid #698778; background-image: linear-gradient(#94b7a32b 1px, transparent 1px), linear-gradient(90deg,#94b7a32b 1px, transparent 1px); background-size: 22px 22px; }
.plan { position: absolute; inset: 21% 18% 23% 17%; border: 5px double #d8f479; }
.plan i, .plan b, .plan em { position: absolute; display: block; }
.plan i { inset: 0 60% 0 0; border-right: 4px double #d8f479; }
.plan b { inset: 0 0 55% 40%; border-bottom: 4px double #d8f479; }
.plan em { inset: 108% 0 auto; border-top: 1px dashed #a6c2ac; }
.drawing::before { content: ""; position: absolute; inset: 12% 9%; border: 1px dashed #94b7a378; }
.directory, .tool, .info { padding-block: 3rem 4rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: .55rem; padding: 1.25rem; }
.card:hover { border-color: #578573; }
.card p { color: var(--muted); }
.category { color: #416b58; margin-bottom: .6rem; }
.card-link { color: #245447; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; margin-top: auto; }
.ad { display: grid; place-content: center; text-align: center; min-height: 6rem; padding: 1rem; margin-top: 1.5rem; border: 1px dashed #9baa9e; border-radius: .4rem; color: #45574f; font-size: .875rem; }
.ad span { display: block; }
.crumb { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.tool h1, .info h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.intro, .muted { color: var(--muted); }
.workbench { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.panel, .result-panel { border-radius: .55rem; padding: clamp(1rem, 3vw, 1.85rem); }
.panel { background: var(--white); border: 1px solid var(--line); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.wide { grid-column: 1 / -1; }
label { display: block; font-weight: 650; margin-bottom: .25rem; }
label small { font-size: .875rem; font-weight: 400; }
.input { position: relative; display: flex; align-items: center; }
.input span { flex-shrink: 0; color: var(--muted); margin-left: .5rem; font-size: .875rem; }
input, select { min-width: 0; width: 100%; border: 1px solid #7d9388; color: var(--ink); background: white; border-radius: .3rem; font: inherit; min-height: 2.75rem; padding: .45rem .55rem; }
select { appearance: none; padding-right: 2.25rem; background-image: linear-gradient(45deg, transparent 50%, #245447 50%), linear-gradient(135deg, #245447 50%, transparent 50%); background-position: right 1.15rem center, right .85rem center; background-size: .3rem .3rem; background-repeat: no-repeat; }
[aria-invalid="true"] { border: 2px solid #a52a22; }
.actions { display: flex; gap: .65rem 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.reset { background: transparent; color: #245447; border: 0; text-decoration: underline; text-underline-offset: .2em; }
.error { color: #90251e; margin: .8rem 0 0; }
.error:empty { margin: 0; }
.result-panel { background: var(--green); color: #f6faef; overflow-wrap: anywhere; }
.result-label { font-weight: 650; margin-bottom: .3rem; }
.result-amount { color: var(--lime); font-size: clamp(1.85rem, 5vw, 3.2rem); line-height: 1.1; font-weight: 800; margin-bottom: 1rem; }
.result-panel dl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .45rem .65rem; }
.result-panel dd { margin: 0; font-weight: 700; text-align: right; }
.result-note { font-size: .9rem; color: #d8e3d5; margin: 0; }
.guide, .related { margin-top: 2.7rem; }
.guide, .info { max-width: 48rem; }
.example { padding: 1rem 1.2rem; background: #e4ecdc; border-left: 4px solid #648339; margin-bottom: 1.5rem; }
.example p { margin-bottom: 0; }
.guide ul { padding-left: 1.25rem; }
@media (max-width: 52rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { min-height: 0; gap: 1.4rem; }
}
@media (max-width: 39rem) {
  .wrap { width: min(72rem, calc(100% - 2rem)); }
  .hero-inner, .workbench { grid-template-columns: 1fr; }
  .hero-inner { padding-block: 2.75rem; }
  .drawing { max-height: 9rem; }
}
@media (max-width: 29rem) {
  .cards, .fields { grid-template-columns: 1fr; }
}
