:root {
  --bg: #f3f6f9;
  --fg: #0f1b2a;
  --muted: #46525f;
  --border: #d3dbe4;
  --accent: #0e5a8a;
  --accent-dk: #0a3f61;
  --accent-soft: #e6f0f7;
  --warm: #b45309;
  --warm-ink: #8a3a06;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 3.5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--accent-dk);
  color: #fff;
  padding: 0.6rem 0.9rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; }
.bar {
  background: var(--accent-dk);
  color: #fff;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
}
.brand, .bar a, .foot a, summary {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  min-width: 2.75rem;
}
.brand { color: #fff; font-weight: 800; text-decoration: none; gap: 0.4rem; }
.brand::before {
  content: "";
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 5px;
  background: linear-gradient(135deg, #fbbf24 0 50%, #fff 50%);
}
.bar a { color: #fff; text-decoration: none; font-weight: 600; }
.desk { display: none; }
.menu { position: relative; }
.menu summary {
  appearance: none;
  list-style: none;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0 0.85rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 14rem;
  background: #fff;
  border-radius: 0.8rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
}
.menu-list a { color: var(--fg); text-decoration: none; padding: 0 0.8rem; border-radius: 0.5rem; }
.hero {
  background: linear-gradient(160deg, var(--accent-dk) 0%, var(--accent) 70%, #1673ad 100%);
  color: #fff;
  padding: 1.1rem 0 4.4rem;
}
.wrap { width: min(100% - 1.5rem, 72rem); margin-inline: auto; }
.crumbs { display: flex; gap: 0.35rem; align-items: center; min-height: 2.75rem; color: #d6e4f0; }
.crumbs a { color: #fff; }
.eyebrow {
  display: inline-block;
  margin: 0 0 0.45rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  padding: 0.15rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
}
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 0.45rem; letter-spacing: -0.02em; max-width: 18ch; }
.lede { margin: 0; color: #e3eef7; max-width: 42rem; }
.sheet { margin-top: -3.2rem; }
.split { display: grid; gap: 0.75rem; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(10, 63, 97, 0.12), 0 2px 6px rgba(10, 63, 97, 0.06);
}
form { padding: 0.9rem 1rem 1rem; }
.step { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; margin: 0 0 0.7rem; }
.step b {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.field { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 700; margin-bottom: 0.75rem; }
input {
  font: inherit;
  color: var(--fg);
  min-height: 3rem;
  padding: 0.4rem 0.7rem;
  border: 2px solid #5c6b7a;
  border-radius: 9px;
  width: 100%;
  background: #fff;
}
fieldset { margin: 0; padding: 0; border: 0; }
legend { font-weight: 700; padding: 0 0 0.35rem; }
.levels { display: grid; gap: 0.5rem; }
.levels label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  font-weight: 700;
  cursor: pointer;
}
.levels label:hover { background: var(--accent-soft); }
.levels input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.levels input:checked + span {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}
.levels input:focus-visible + span { outline: 3px solid #b45309; outline-offset: 2px; }
.levels span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  border-radius: 8px;
  padding: 0 0.4rem;
  color: var(--accent);
  font-weight: 700;
}
.err { min-height: 1.4em; margin: 0.4rem 0 0; color: #8f1d1d; font-weight: 700; }
.result {
  min-height: 11rem;
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  border-top: 6px solid var(--warm);
}
.kicker { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.big { margin: 0.1rem 0; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.05; font-weight: 800; color: var(--accent-dk); font-variant-numeric: tabular-nums; }
.mid { margin: 0.15rem 0 0.6rem; font-weight: 700; }
dl { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.8rem; margin: 0; padding: 0.75rem; background: var(--accent-soft); border-radius: 10px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.cta {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: 0.8rem;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: none;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  width: 100%;
  cursor: pointer;
}
.cta:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.cta:active { background: var(--accent-dk); }
.cta:focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.prose, .chart { margin: 2.2rem 0; }
.prose { max-width: 68ch; }
h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; letter-spacing: -0.01em; margin: 0 0 0.6rem; }
h2::before { content: ""; width: 0.35rem; height: 1.3rem; border-radius: 3px; background: var(--warm); }
.formula, .note { color: var(--muted); }
.chart table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.chart th, .chart td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.chart th { background: var(--accent-dk); color: #fff; font-size: 0.82rem; }
.chart tr:last-child td { border-bottom: 0; }
.faq details { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; padding: 0 0.9rem; margin: 0.6rem 0; }
summary { cursor: pointer; font-weight: 800; }
.foot { background: var(--accent-dk); color: #d6e4f0; padding: 0.4rem 1rem 1.2rem; }
.foot a { color: #fff; text-decoration: none; font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
@media (max-width: 639.98px) {
  .chart thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .chart table, .chart tbody, .chart tr, .chart td { display: block; width: 100%; }
  .chart table { border: 0; background: transparent; }
  .chart tr { margin: 0 0 0.6rem; padding: 0.35rem 0.85rem 0.55rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
  .chart td { border: 0; padding: 0.35rem 0; }
  .chart td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
}
@media (max-width: 1023.98px) {
  .result { order: -1; }
}
@media (min-width: 640px) {
  .levels { grid-template-columns: 1fr 1fr 1fr; }
  h1 { font-size: 2.4rem; max-width: 16ch; }
}
@media (min-width: 1024px) {
  .menu { display: none; }
  .desk { display: flex; gap: 0.2rem; }
  .split { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; gap: 1.25rem; }
  form { grid-column: 1; }
  .result { grid-column: 2; grid-row: 1; position: sticky; top: 1rem; }
}
.scene {
  height: 9.25rem;
  margin: 0 0 0.75rem;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #d7e6f2, #eef3f7);
}
.bath-art { display: block; width: 100%; height: 100%; }
.paint { fill: #f6efe2; transition: fill 0.55s ease; }
.sheen { fill: #fff; opacity: 0; }
.studs { opacity: 0; }
.studs line { stroke: #8d6a45; stroke-width: 4; }
.window { fill: #fff; stroke: #8aa0b3; stroke-width: 2; }
.window-pane { fill: #b9d4ea; }
.planks rect { fill: #d7c4a3; }
.planks path { fill: none; stroke: #b89a72; stroke-width: 2; }
.tiles, .splash, .shower, .vanity-new { opacity: 0; }
.tiles rect { fill: #e7ebef; }
.tiles path { fill: none; stroke: #b7c0c8; stroke-width: 1.5; }
.splash { fill: #d5dde6; }
.tub rect { fill: #f7f4ee; stroke: #8aa0b3; stroke-width: 2; }
.toilet rect { fill: #f7f7f4; stroke: #9aa7b2; stroke-width: 2; }
.vanity-old > rect { fill: #a67c52; }
.vanity-old ellipse { fill: #f4f7f8; stroke: #8d6e4c; stroke-width: 2; }
.mirror-old { fill: #d5e6f2; stroke: #c4a574; stroke-width: 3; }
.faucet-old { fill: #e0b84a; }
.vanity-new > rect { fill: #f7f8f6; stroke: #6e8798; stroke-width: 2; }
.mirror-new { fill: #e7f2f8; stroke: #d5dee6; stroke-width: 3; }
.faucet-new { fill: #d5dde3; }
.shower > rect:first-child { fill: #e8eef2; stroke: #8aa0b3; stroke-width: 2; }
.shower > rect:nth-child(2) { fill: #c5dced; opacity: 0.85; }
.shower circle { fill: #9aa7b2; }
.planks, .tiles, .splash, .tub, .shower, .vanity-old, .vanity-new, .paint {
  transition: opacity 0.45s ease, transform 0.7s ease, fill 0.55s ease;
}
.scene[data-level="cosmetic"] .paint { fill: #f7f1e4; }
.scene[data-level="mid"] .planks,
.scene[data-level="mid"] .vanity-old { opacity: 0; }
.scene[data-level="mid"] .tiles,
.scene[data-level="mid"] .splash,
.scene[data-level="mid"] .vanity-new { opacity: 1; }
.scene[data-level="mid"] .paint { fill: #e7eef5; }
.scene[data-level="full"] .planks,
.scene[data-level="full"] .vanity-old,
.scene[data-level="full"] .tub { opacity: 0; }
.scene[data-level="full"] .tiles,
.scene[data-level="full"] .vanity-new,
.scene[data-level="full"] .shower { opacity: 1; }
.scene[data-level="full"] .paint { fill: #d7e3d4; }
.scene[data-level="full"] .tiles rect { fill: #4e5963; }
.scene[data-level="full"] .tiles path { stroke: #2f3942; }
.scene[data-level="full"] .vanity-new { transform: translate(148px, 4px); }
.scene.refreshing .sheen { animation: sheen 0.8s ease; }
.scene.refreshing .faucet-old { animation: glint 0.7s ease; }
.scene.tiling .splash { animation: tilein 0.65s ease; }
.scene.rebuilding .studs { animation: studs 1.05s ease; }
.scene.rebuilding .shower { animation: rise 0.9s ease; }
@keyframes sheen {
  0% { opacity: 0; transform: translateY(-16px); }
  35% { opacity: 0.45; }
  100% { opacity: 0; transform: translateY(20px); }
}
@keyframes glint {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.35); }
}
@keyframes tilein {
  0% { opacity: 0; transform: scaleY(0.2); transform-origin: bottom; }
  100% { opacity: 1; transform: none; }
}
@keyframes studs {
  0%, 100% { opacity: 0; }
  30%, 62% { opacity: 1; }
}
@keyframes rise {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: none; }
}
@media (min-width: 1024px) {
  .scene { height: 11.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .scene.refreshing .sheen,
  .scene.refreshing .faucet-old,
  .scene.tiling .splash,
  .scene.rebuilding .studs,
  .scene.rebuilding .shower { animation: none; }
}
