:root {
  --ink: #082844;
  --body: #355466;
  --muted: #536d7d;
  --accent: #006d82;
  --accent-bright: #08a9bf;
  --paper: #ffffff;
  --canvas: #f3f8fa;
  --line: #d4e2e7;
  --soft: #eaf4f7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, Arial, sans-serif;
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
body.quiz-active { overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-150%); background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 3px; font-weight: 750; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }

.header { position: absolute; z-index: 5; top: 0; left: 50%; transform: translateX(-50%); height: 78px; display: flex; align-items: center; justify-content: center; text-align: center; }
.wordmark { color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .16em; text-decoration: none; }
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 24px 70px; background: #06233d; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background-image: url("./reef-hero-2172.webp"); background-image: image-set(url("./reef-hero-2172.avif") type("image/avif"), url("./reef-hero-2172.webp") type("image/webp")); background-position: center 53%; background-size: cover; }
.hero::after { background: linear-gradient(90deg, rgba(3, 23, 43, .8), rgba(3, 23, 43, .48) 45%, rgba(3, 23, 43, .16)), linear-gradient(0deg, rgba(3, 23, 43, .42), transparent 45%); }
.hero-inner { width: min(var(--max), 100%); margin-inline: auto; text-align: center; }
.hero-copy { max-width: 680px; margin-inline: auto; }
.hero h1 { max-width: 660px; margin: 0 auto 22px; color: #fff; font: 400 clamp(48px, 7vw, 82px)/.99 var(--serif); letter-spacing: -.045em; text-wrap: balance; }
.hero .intro { max-width: 520px; margin: 0 auto 29px; color: rgba(255, 255, 255, .9); font-size: 17px; line-height: 1.62; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 13px 19px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s, transform .18s; }
.button:hover { background: #00586a; border-color: #00586a; }
.hero .button { padding: 15px 21px; background: var(--accent-bright); border-color: var(--accent-bright); font-size: 14px; }
.hero .button:hover { background: #078ca2; border-color: #078ca2; }

.home-content { background: #fff; }
.home-explainer { padding: 74px 0; border-bottom: 1px solid var(--line); }
.section-label { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.home-content h2, .content-main h1 { margin: 0 0 18px; font: 400 clamp(34px, 5vw, 52px)/1.08 var(--serif); letter-spacing: -.035em; }
.home-content p { color: var(--body); }
.text-link { color: var(--accent); font-weight: 750; text-underline-offset: 4px; }
.home-guides { padding: 70px 0 82px; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.home-section-head h2 { margin: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-card { padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.guide-card h2, .guide-card h3 { margin: 0 0 9px; font: 400 24px/1.2 var(--serif); }
.guide-card h2 a, .guide-card h3 a { text-decoration-color: #a9c8d0; text-underline-offset: 4px; }
.guide-card p { margin: 0; color: var(--body); font-size: 13px; }

.site-footer { background: #fff; border-top: 1px solid var(--line); }
.footer-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 20px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 12px; }
.footer-inner nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-inner a { color: var(--body); font-size: 12px; text-underline-offset: 3px; }
.quiz-active .home-content, .quiz-active .site-footer, .quiz-active .header { display: none; }

.quiz-panel { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; padding: 86px 24px 64px; background: #06233d; }
.quiz-panel::before, .quiz-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.quiz-panel::before { background-image: url("./reef-hero-2172.webp"); background-image: image-set(url("./reef-hero-2172.avif") type("image/avif"), url("./reef-hero-2172.webp") type("image/webp")); background-position: 50% center; background-size: cover; transform: scale(1.04); transition: background-position .7s ease; }
.quiz-panel::after { background: rgba(3, 24, 44, .66); }
.quiz-panel[data-step="0"]::before { background-position: 18% center; }
.quiz-panel[data-step="1"]::before { background-position: 38% center; }
.quiz-panel[data-step="2"]::before { background-position: 61% center; }
.quiz-panel[data-step="3"]::before { background-position: 82% center; }
.quiz-panel[data-step="4"]::before { background-position: 63% center; }
.quiz-wrap { width: min(780px, 100%); margin-inline: auto; }
.home-link { min-height: 44px; padding: 0 4px 14px; border: 0; background: none; color: #fff; font-size: 12px; font-weight: 750; cursor: pointer; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.quiz { min-height: 0; padding: 0 30px; border: 1px solid rgba(213, 228, 233, .9); border-radius: 4px; background: rgba(255, 255, 255, .97); box-shadow: 0 18px 50px rgba(7, 42, 66, .16); backdrop-filter: blur(8px); }
.quiz-top { display: flex; justify-content: space-between; padding: 22px 0 10px; color: var(--muted); font-size: 11px; }
.progress { height: 3px; background: #dce9ed; }
.progress span { display: block; height: 3px; background: var(--accent); transition: width .2s; }
.quiz-body { padding: 28px 0 22px; }
.step-title { margin: 0 0 7px; color: var(--ink); font: 400 clamp(28px, 4vw, 36px)/1.12 var(--serif); letter-spacing: -.025em; }
.step-help { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.options { border-top: 1px solid var(--line); }
.option { width: 100%; min-height: 58px; display: grid; grid-template-columns: 1fr 22px; gap: 16px; align-items: center; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.option:hover { background: #f1f7f8; }
.option-copy strong { display: block; font-size: 14px; }
.option-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.radio { width: 18px; height: 18px; position: relative; border: 1px solid #7f98a6; border-radius: 50%; }
.option.selected .radio { border-color: var(--accent); }
.option.selected .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.slider-wrap { padding: 10px 0 6px; }
.gallon-num { margin: 14px 0 0; color: var(--accent); font: 54px/1 var(--serif); }
.gallon-label { color: var(--muted); font-size: 12px; }
.range { width: 100%; margin: 23px 0 8px; accent-color: var(--accent); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.tank-entry { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 15px 0 0; color: var(--body); font-size: 12px; }
.tank-entry input { width: 108px; min-height: 40px; padding: 7px 9px; border: 1px solid #9bb1bc; border-radius: 3px; background: #fff; color: var(--ink); }
.quiz-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 21px; border-top: 1px solid var(--line); }
.back { min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.back:disabled { visibility: hidden; }
.quiz-next { min-width: 128px; }

.results { padding: 24px 0 28px; }
.results-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.results-header h2 { margin: 8px 0 7px; font: 400 32px/1.1 var(--serif); letter-spacing: -.025em; }
.results-header p { max-width: 570px; margin: 0; color: var(--muted); font-size: 12px; }
.edit-link { min-height: 44px; padding: 8px 2px; border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; cursor: pointer; }
.product-list { display: flex; flex-direction: column; gap: 30px; padding-top: 23px; }
.product-row { display: flex; flex-direction: column; min-height: 0; }
.product-visual { width: 100%; height: clamp(320px, 55vw, 610px); position: relative; overflow: hidden; margin: 0; background: transparent; }
.product-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 36px; }
.photo-credit { position: absolute; z-index: 1; right: 10px; bottom: 10px; max-width: calc(100% - 20px); margin: 0; padding: 4px 7px; border-radius: 2px; background: rgba(255, 255, 255, .94); color: #355466; font-size: 10px; line-height: 1.35; }
.photo-credit a { color: #005c6e; text-underline-offset: 2px; }
.rank-1 .product-visual { height: clamp(360px, 62vw, 680px); }
.rank-1 .product-visual img { padding: 44px; }
.image-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--muted); font: 14px var(--serif); text-align: center; }
.rank-marker { display: grid; grid-template-columns: auto auto minmax(32px, 1fr); align-items: center; gap: 9px; margin: 0 0 13px; color: var(--muted); }
.rank-marker::after { content: ""; height: 1px; background: var(--line); }
.rank-index { color: var(--accent); font: 600 17px/1 var(--serif); }
.rank-title { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.rank-1 .rank-title { color: var(--accent); }
.rank-1 .product-copy { max-width: 820px; padding: 23px 0 14px; }
.product-name { margin: 0 0 7px; font: 400 26px/1.12 var(--serif); letter-spacing: -.025em; }
.rank-1 .product-name { margin-bottom: 9px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.03em; }
.product-reason { margin: 0; color: var(--body); font-size: 12px; line-height: 1.6; }
.rank-1 .product-reason { max-width: 720px; font-size: 15px; line-height: 1.65; }
.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 17px; }
.amazon-link { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 750; text-decoration: none; }
.amazon-link:hover { background: #00586a; }
.spec-link { color: var(--accent); font-size: 11px; font-weight: 700; text-underline-offset: 4px; }
.rank-2, .rank-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 30%); grid-template-areas: "rank rank" "copy visual"; align-items: center; column-gap: clamp(22px, 5vw, 64px); padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rank-2 .rank-marker, .rank-3 .rank-marker { grid-area: rank; margin-bottom: 15px; }
.rank-2 .product-copy, .rank-3 .product-copy { grid-area: copy; max-width: 660px; }
.rank-2 .product-visual, .rank-3 .product-visual { grid-area: visual; height: auto; min-height: 170px; max-height: 250px; aspect-ratio: 1; }
.rank-2 .product-visual img, .rank-3 .product-visual img { padding: 16px; }
.reef-note, .result-note, .affiliate-disclosure { margin: 17px 0 0; padding: 13px 15px; border-left: 3px solid var(--accent); background: #eaf5f7; color: var(--body); font-size: 11px; line-height: 1.6; }
.empty-result { padding: 24px 0; color: var(--body); font-size: 13px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 10px 15px; border-radius: 3px; background: var(--ink); color: #fff; font-size: 12px; transition: opacity .18s, transform .18s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.content-page { background: #fff; }
.content-header { border-bottom: 1px solid var(--line); background: #fff; }
.content-header .header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.content-header .wordmark { color: var(--ink); }
.content-header nav { display: flex; gap: 20px; }
.content-header nav a { color: var(--body); font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
.content-main { min-height: 65vh; padding: 58px 0 80px; }
.breadcrumbs { margin-bottom: 28px; color: var(--muted); font-size: 12px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #8ca0aa; }
.breadcrumbs a { text-underline-offset: 3px; }
.page-intro { max-width: 760px; margin-bottom: 36px; }
.page-intro .lede, .article .lede { color: var(--body); font-size: 18px; line-height: 1.65; }
.article { max-width: 760px; }
.article h2 { margin: 42px 0 12px; font: 400 31px/1.18 var(--serif); letter-spacing: -.02em; }
.article h3 { margin: 28px 0 8px; font-size: 17px; }
.article p, .article li { color: var(--body); }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 8px; }
.callout { margin: 28px 0; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--soft); }
.callout p { margin: 0; }
.comparison-table { width: 100%; margin: 24px 0 30px; border-collapse: collapse; font-size: 13px; }
.comparison-table th, .comparison-table td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table th { background: var(--soft); color: var(--ink); }
.source-list { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.source-list h2 { margin-top: 0; font-size: 24px; }
.source-list a { color: var(--accent); overflow-wrap: anywhere; text-underline-offset: 3px; }
.updated { color: var(--muted); font-size: 12px; }
.content-main .guide-grid { margin-top: 30px; }

@media (max-width: 850px) {
  .compact-grid { grid-template-columns: 1fr; }
  .home-section-head { align-items: start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .header { height: 68px; }
  .wordmark { font-size: 13px; }
  .hero { min-height: 100svh; padding: 104px 16px 66px; }
  .hero::before, .quiz-panel::before { background-image: url("./reef-hero-1280.webp"); background-image: image-set(url("./reef-hero-1280.avif") type("image/avif"), url("./reef-hero-1280.webp") type("image/webp")); }
  .hero::before { background-position: 58% center; }
  .hero::after { background: linear-gradient(90deg, rgba(3, 23, 43, .79), rgba(3, 23, 43, .38)), linear-gradient(0deg, rgba(3, 23, 43, .62), transparent 70%); }
  .hero h1 { max-width: 8em; font-size: clamp(38px, 10.25vw, 44px); line-height: 1.02; }
  .hero .intro { max-width: 330px; font-size: 15px; }
  .home-explainer, .home-guides { padding: 54px 0; }
  .guide-grid { grid-template-columns: 1fr; }
  .quiz-panel { padding: 70px 16px 40px; }
  .quiz { padding: 0 18px; }
  .quiz-top { padding-top: 18px; }
  .quiz-body { padding: 23px 0 18px; }
  .tank-entry { justify-content: flex-start; }
  .results-header { align-items: flex-start; gap: 12px; }
  .results-header h2 { font-size: 28px; }
  .rank-1 .product-visual { height: clamp(290px, 82vw, 430px); }
  .rank-1 .product-visual img { padding: 24px; }
  .rank-1 .product-copy { padding-top: 17px; }
  .rank-1 .product-name { font-size: 32px; }
  .rank-2, .rank-3 { grid-template-columns: minmax(0, 1fr) minmax(94px, 31%); gap: 13px; padding: 18px 0; }
  .rank-2 .product-visual, .rank-3 .product-visual { min-height: 0; max-height: none; }
  .rank-2 .product-visual img, .rank-3 .product-visual img { padding: 8px; }
  .rank-2 .product-name, .rank-3 .product-name { font-size: 20px; }
  .rank-2 .product-reason, .rank-3 .product-reason { font-size: 11px; line-height: 1.5; }
  .rank-2 .product-actions, .rank-3 .product-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
  .content-header .header-inner { min-height: 68px; }
  .content-header nav { gap: 12px; }
  .content-header nav a { font-size: 12px; }
  .content-main { padding: 42px 0 60px; }
  .content-main h1 { font-size: 40px; }
  .page-intro .lede, .article .lede { font-size: 16px; }
  .comparison-table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
