/* Water Wheel public theme. Per-site values (colours, fonts, widths, shapes) are injected as CSS variables
   by waterwheel/theme.py; the values below are fallbacks. */
:root {
  --accent: #2f6fed;
  --bg: #ffffff; --surface: #f6f7f9; --surface-2: #eef0f4; --border: #e2e5ea;
  --text: #16181d; --muted: #5c6370; --link: var(--accent);
  --good: #137a3e; --bad: #b42318; --warn-bg: #fff7e6; --warn-border: #f5c26b;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-heading: var(--font); --base-size: 17px; --heading-weight: 800; --btn-radius: 8px; --radius-sm: 8px;
  --on-accent: #fff; --accent-soft: #eef3fe; --surface-2: #eef0f4;
  --header-bg: var(--bg); --header-text: var(--text); --header-muted: var(--muted); --header-border: var(--border); --mark: var(--accent);
  --measure: 800px; --wide: 1200px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --surface: #171a20; --surface-2: #1e222a; --border: #2a2f39; --text: #e8eaee;
          --muted: #9aa1ad; --good: #4ade80; --bad: #f87171; --warn-bg: #2a2212; --warn-border: #7a5a1c;
          --shadow: none; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--base-size)/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; font-family: var(--font-heading); font-weight: var(--heading-weight); }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--header-border); background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--header-text); text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { color: var(--mark); }
.brand img { display: block; max-height: 36px; width: auto; }
.site-nav { flex: 1; min-width: 0; align-self: stretch; display: flex; }
.nav-spacer { flex: 1; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.nav-list.ready { overflow: visible; }
.nav-item { display: flex; flex: 0 0 auto; }
.nav-item[hidden], .nav-drop-item[hidden], .nav-more-li[hidden] { display: none; }
.nav-item > a, .nav-more > summary { display: flex; align-items: center; gap: 4px; padding: 0 10px; color: var(--header-muted); text-decoration: none; font-size: .95rem; white-space: nowrap; position: relative; }
.nav-item > a:hover, .nav-more > summary:hover, .nav-more[open] > summary { color: var(--header-text); }
.nav-item > a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--mark); border-radius: 2px; }
.nav-item > a[aria-current] { color: var(--header-text); }
.nav-more-li { display: flex; flex: 0 0 auto; position: relative; }
.nav-more { display: flex; }
.nav-pop > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-pop > summary::-webkit-details-marker { display: none; }
.nav-more > summary svg { transition: transform .15s; }
.nav-more[open] > summary svg { transform: rotate(180deg); }
.nav-dropdown { position: absolute; top: calc(100% + 1px); right: 0; min-width: 260px; max-height: 70vh; overflow-y: auto; list-style: none; margin: 0; padding: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(16,24,40,.14); z-index: 20; }
.nav-dropdown a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .95rem; }
.nav-dropdown a:hover, .nav-dropdown a[aria-current] { background: var(--surface); color: var(--accent); }
.nav-count { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.nav-mobile { display: none; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-spacer, .brand { flex: 1; }
  .brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav-mobile { display: block; }
  .nav-mobile > summary { display: flex; align-items: center; gap: 6px; padding: 8px 10px; margin-right: -10px; color: var(--header-text); font-size: .95rem; font-weight: 600; }
  .nav-mobile .i-close, .nav-mobile[open] .i-open { display: none; }
  .nav-mobile[open] .i-close { display: block; }
  .mobile-panel { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 60px); overflow-y: auto; background: var(--bg); color: var(--text);
    border-bottom: 1px solid var(--border); box-shadow: 0 16px 30px rgba(16,24,40,.16); padding: 16px 16px 20px; }
  .mobile-search { display: flex; gap: 8px; margin-bottom: 18px; }
  .mobile-search input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--btn-radius); background: var(--bg); color: var(--text); font: inherit; }
  .mobile-search button { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--btn-radius); padding: 0 16px; font: inherit; font-weight: 700; }
  .mobile-h { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
  .mobile-list { list-style: none; margin: 0 0 14px; padding: 0; }
  .mobile-list a { display: block; padding: 11px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
  .mobile-list a[aria-current] .m-label { color: var(--accent); }
  .m-label { display: block; font-weight: 700; }
  .m-desc { display: block; color: var(--muted); font-size: .88rem; line-height: 1.4; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .mobile-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; font-size: .92rem; }
  .mobile-links a { color: var(--muted); }
}
.header-inner { position: relative; }
@media (max-width: 860px) { .header-inner { position: static; } .site-header .wrap { position: static; } }
.search-link { color: var(--header-muted); display: flex; padding: 8px; }

/* home & archives */
.hero { padding: 48px 0 24px; }
.hero-band .hero { background: var(--accent-soft); border-bottom: 1px solid var(--border); padding: 56px 0 40px; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 8px; max-width: 46rem; }
.section-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 40px 0 16px; }
.archive-header { padding: 40px 0 8px; }
.archive-header h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 4px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-ph { display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 14px 18px; text-decoration: none;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 28%, var(--bg))); }
.card-ph span { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.05rem; color: var(--accent); opacity: .85; }
.cards-border .card, .cards-border .offer-card { box-shadow: none; }
.cards-flat .card, .cards-flat .offer-card { box-shadow: none; border-color: transparent; background: var(--surface); }
.grid-featured.single { grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid-featured.single .card { flex-direction: row; }
  .grid-featured.single .card-img, .grid-featured.single .card-ph { flex: 0 0 55%; }
  .grid-featured.single .card-img img { height: 100%; }
  .grid-featured.single .card-body { padding: 28px 32px; justify-content: center; }
  .grid-featured.single .card-title { font-size: 1.6rem; }
  .grid-featured.single .card-excerpt { font-size: 1.02rem; }
  .grid-featured.single .card .meta { margin-top: 8px; }
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 1.12rem; margin: 0; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { margin: 0; color: var(--muted); font-size: .95rem; }
.card .meta { margin: auto 0 0; font-size: .85rem; color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); text-decoration: none; }
.topic-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-list a { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); }
.topic-list .count { color: var(--muted); font-size: .85em; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 32px 0; color: var(--muted); }

/* article */
.article { padding-bottom: 24px; }
.article-layout { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding: 0 16px; }
.article-main { min-width: 0; }
.article-aside { display: none; }
@media (min-width: 1140px) {
  .article.has-aside .article-layout { max-width: calc(var(--measure) + 360px); display: grid; grid-template-columns: minmax(0, var(--measure)) 260px; gap: 64px; justify-content: center; }
  .article.has-aside .article-aside { display: block; }
  .article.has-aside .prose > .toc { display: none; }
}
.aside-sticky { position: sticky; top: 84px; padding-top: 36px; max-height: calc(100vh - 100px); overflow-y: auto; }
.aside-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.toc-side { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); font-size: .9rem; line-height: 1.4; }
.toc-side li { margin: 0; }
.toc-side a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc-side .toc-l3 a { padding-left: 28px; font-size: .86rem; }
.toc-side a:hover { color: var(--text); }
.toc-side a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.aside-cta { margin-top: 24px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: .9rem; }
.aside-cta p { margin: 0 0 10px; }
.aside-cta .btn { width: 100%; justify-content: center; }
.article-header { padding-top: 32px; }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 8px 0 12px; max-width: 24ch; }
.article-header .lede { max-width: none; }
.crumbs { font-size: .85rem; display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.crumbs a { color: var(--muted); }
.byline { color: var(--muted); font-size: .92rem; margin: 12px 0 0; }
.byline a { color: inherit; }
.hero-image { margin: 24px auto; }
.hero-image img { border-radius: var(--radius); width: 100%; }
.hero-image { margin: 24px 0; }
figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.prose { overflow-wrap: break-word; }
.prose h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; scroll-margin-top: 80px; }
.prose h3 { font-size: 1.22rem; margin: 1.8em 0 .5em; scroll-margin-top: 80px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding: .2em 1.2em; border-left: 3px solid var(--accent); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose thead th { background: var(--surface); font-weight: 700; }
.prose tr:last-child td, .prose tr:last-child th { border-bottom: 0; }
.article-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.share a { margin-left: 10px; }
.related { margin-bottom: 40px; }
.preview-banner { background: var(--warn-bg); border-bottom: 1px solid var(--warn-border); padding: 10px 16px; text-align: center; font-size: .9rem; }

/* components */
.disclosure { font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 1.6em; }
.disclosure-line .disclosure { background: none; border: 0; border-radius: 0; padding: 0; font-size: .84rem; font-style: italic; }
.disclosure-line .disclosure strong { font-weight: 600; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 1.8em; font-size: .95rem; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ul { list-style: none; margin: 8px 0 4px; padding: 0; }
.toc li { margin: .35em 0; }
.toc .toc-l3 { margin-left: 1.2em; font-size: .92em; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--on-accent) !important; border: 0; border-radius: var(--btn-radius); padding: 11px 18px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 7px 12px; font-size: .88rem; }
.cta-block { margin: 1.6em 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cta-note { font-size: .85rem; color: var(--muted); }
.offer-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 1.6em 0; background: var(--bg); box-shadow: var(--shadow); }
.offer-card p { margin: 0; }
.offer-card .badge { position: absolute; top: -11px; left: 16px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.offer-head { display: flex; align-items: center; gap: 12px; }
.offer-head > div { flex: 1; min-width: 0; }
.offer-head > div > * + * { margin-top: 2px; }
.offer-card.compact .offer-head { margin-bottom: 14px; }
.offer-card.compact { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 20px; }
.offer-card.compact .offer-head { margin: 0; }
@media (max-width: 600px) { .offer-card.compact { grid-template-columns: 1fr; } }
.offer-logo { flex: 0 0 48px; width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; background: var(--surface); margin: 0 !important; }
.offer-name { font-weight: 800; font-size: 1.15rem; margin: 0; }
.offer-tagline { margin: 0; color: var(--muted); font-size: .92rem; }
.rating { margin: 0; font-weight: 700; white-space: nowrap; }
.rating span[aria-hidden] { color: #f5a524; }
.offer-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; margin: 14px 0; }
.offer-facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.offer-facts dd { margin: 0; font-size: .95rem; }
.proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin: 1.2em 0; }
.proscons ul { list-style: none; padding: 0; margin: 0; }
.proscons li { padding-left: 1.5em; position: relative; margin: .35em 0; font-size: .95rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 700; }
.pc-title { font-weight: 700; margin: 0 0 4px; }
.proscons.mini { margin: 10px 0 14px; }
.compare th[scope=col] { white-space: nowrap; }
.rating-sm { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.compare-cta td { padding-top: 14px; padding-bottom: 14px; }
.compare-cta .btn { white-space: nowrap; }
.compare td, .compare thead th { min-width: 128px; }
.callout { border-radius: var(--radius); padding: 14px 18px; margin: 1.6em 0; border: 1px solid var(--border); background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin: 0 0 6px; }
.callout-tip { border-left: 4px solid var(--good); }
.callout-warning { border-left: 4px solid var(--warn-border); background: var(--warn-bg); }
.callout-note, .callout-info { border-left: 4px solid var(--accent); }
.faqs { margin-top: 2.5em; }
.faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq div { margin-top: 8px; }

/* signup & forms */
.signup { display: grid; grid-template-columns: 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 32px 0; }
@media (min-width: 760px) { .signup { grid-template-columns: 1fr 1fr; align-items: center; } }
.signup-title { font-weight: 800; font-size: 1.15rem; margin: 0 0 4px; }
.signup-text { margin: 0; color: var(--muted); font-size: .95rem; }
.signup-form, .search-form { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-form input[type=email], .search-form input { flex: 1 1 220px; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--btn-radius); background: var(--bg); color: var(--text); font: inherit; }
.signup-form button, .search-form button { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--btn-radius); padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.signup-status { flex-basis: 100%; margin: 0; font-size: .9rem; min-height: 1.2em; }
.signup-status.ok { color: var(--good); }
.signup-fine { flex-basis: 100%; margin: 0; font-size: .8rem; color: var(--muted); }
.signup-fine a { color: inherit; }
.signup-status.err { color: var(--bad); }
.message { padding: 60px 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 8px 0 32px; font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.footer-grid nav a { color: var(--muted); }
.footer-brand { font-weight: 800; margin: 0; }
.fineprint { color: var(--muted); font-size: .82rem; margin: 12px 0 0; }
