:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --ink: #171d2c;
  --muted: #515769;
  --line: #d9d6ce;
  --blue: #273aa8;
  --navy: #18225e;
  --lime: #e1fa65;
  --display: 'Bricolage Grotesque', 'Arial', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  font: 16px/1.55 var(--body);
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body, figure, ul, h1, h2, h3, p { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 3px solid #4767e9; outline-offset: 4px; }
.shell { width: min(1176px, 92%); margin-inline: auto; }
.section { padding-block: clamp(38px, 6vw, 78px); }
h1, h2, h3 { font-family: var(--display); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.045em; }
h3 { font-size: 1.35rem; line-height: 1.15; letter-spacing: -.02em; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 6; background: white; padding: .5rem .75rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.12rem; font-weight: 800; letter-spacing: -.025em; text-decoration: none; }
.brand img { flex: none; }
.top nav { display: flex; align-items: center; gap: clamp(.5rem, 3vw, 2.25rem); font-weight: 700; font-size: .86rem; }
.top nav > a { text-decoration: none; }
.top nav > a:hover { text-decoration: underline; }
.menu { position: relative; }
.menu summary { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.menu summary span, .faq summary span { font-size: 1.15em; line-height: 1; }
.menu[open] summary span, .faq [open] summary span { rotate: 180deg; }
.language summary { border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; }
.menu ul { position: absolute; z-index: 4; inset: calc(100% + .45rem) 0 auto auto; min-width: max(100%, 185px); max-height: min(45vh, 360px); overflow: auto; padding: .3rem; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 35px #191c3926; }
.menu li a { display: flex; justify-content: space-between; gap: 1rem; padding: .52rem .7rem; border-radius: 4px; text-decoration: none; }
.menu li a:hover, .menu li a[aria-current] { background: #edf0ff; color: var(--blue); }
.browse ul { inset-inline: 0 auto; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr); align-items: center; gap: clamp(30px, 5vw, 72px); padding-top: clamp(38px, 5.5vw, 68px); padding-bottom: 38px; }
.hero h1 { max-width: 9ch; color: var(--navy); font-size: clamp(3.05rem, 6.7vw, 6.5rem); font-weight: 800; line-height: .94; letter-spacing: -.065em; }
.hero-copy p { max-width: 38ch; margin: 1.3rem 0 1.6rem; font-size: clamp(1rem, 1.8vw, 1.17rem); color: var(--muted); }
.actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .65rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 46px; padding: .62rem .83rem; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-weight: 750; font-size: .91rem; }
.primary { color: white; background: var(--blue); }
.primary:hover { background: var(--navy); }
.outline { color: var(--navy); border-color: #a6acca; }
.outline:hover { background: #e9edfc; }
.hero-frame img { width: 100%; height: auto; aspect-ratio: 1.42; object-fit: cover; object-position: 58% 50%; border-radius: 12px; background: #ddd1ba; }
figcaption { color: var(--muted); font-size: .74rem; margin-top: .42rem; }

.categories { border-top: 1px solid var(--line); }
.categories > p { margin: .55rem 0 1.25rem; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.category { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-height: 50px; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 5px; background: #fffdf8; text-decoration: none; font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.category span { color: var(--blue); }
.category:hover { border-color: var(--blue); color: var(--blue); background: #edf0ff; }

.budget { background: var(--navy); color: white; padding-block: clamp(45px, 7vw, 88px); }
.worksheet { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: start; gap: clamp(1.8rem, 7vw, 6.5rem); }
.currency { margin-bottom: 1rem; color: var(--lime); font-weight: 800; letter-spacing: .08em; font-size: .9rem; }
.budget h2 { max-width: 15ch; color: var(--lime); }
.budget-intro p { max-width: 38ch; margin: 1rem 0; color: #e5e8fc; }
.estimate { display: inline-block; margin-top: .35rem; color: white; }
.paper { padding: clamp(15px, 3.5vw, 32px); background: white; color: var(--ink); border-radius: 12px; }
.paper label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid #e7e7ef; font-weight: 650; }
.paper input { width: clamp(5.6rem, 14vw, 9rem); min-width: 0; padding: .42rem; border: 1px solid #aeb3ca; border-radius: 4px; color: var(--ink); background: #f9f9ff; text-align: end; }
.paper input:invalid { border-color: #983428; background: #fff5f2; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: .95rem 0 .6rem; font-weight: 750; color: var(--navy); }
.total output { font-size: clamp(1.22rem, 3vw, 1.75rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper button { color: var(--blue); background: none; border: none; padding: .2rem 0; text-align: start; text-decoration: underline; text-underline-offset: .22em; }
.help { margin-top: .6rem; color: var(--muted); font-size: .82rem; }

.worked { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1.4rem, 5vw, 4rem); }
.worked p { margin-top: .8rem; }
.worked aside { align-self: start; border-radius: 10px; background: #eeebdf; overflow: hidden; }
.worked aside img { width: 100%; height: auto; }
.worked aside figcaption { padding-inline: 1.15rem; }
.region { padding: 1.1rem 1.15rem 1.25rem; }
.worked aside a { display: inline-block; margin-top: .65rem; font-size: .88rem; font-weight: 700; color: var(--blue); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: clamp(.8rem, 2vw, .97rem); }
th, td { border-bottom: 1px solid var(--line); padding: .56rem .36rem; text-align: right; }
tbody th, thead th:first-child { text-align: left; }
tbody td { white-space: nowrap; font-variant-numeric: tabular-nums; }
tbody tr:last-child { font-weight: 750; background: #ebefcf; }

.faq { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(1rem, 4vw, 3rem); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 48px; padding-block: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-weight: 700; }
.faq details p { padding-bottom: .85rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.1rem; }
.footer p { margin-top: .35rem; color: var(--muted); font-size: .86rem; }

@media (max-width: 840px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero, .worksheet, .worked, .faq { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 1.45rem; }
  .hero h1 { max-width: 10ch; }
  .hero-frame img { aspect-ratio: 1.52; }
  .worked aside { max-width: 520px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 490px) {
  .top nav > a { display: none; }
  .top-inner { min-height: 62px; }
  .brand { font-size: .96rem; gap: .4rem; }
  .brand img { width: 31px; height: 31px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .total { flex-wrap: wrap; }
}
