:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --surface: #fffdf8;
  --ink: #212a24;
  --muted: #4e5950;
  --line: #dcded3;
  --green: #27523d;
  --green-dark: #193c2b;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font: 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, figure, fieldset { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.038em; }
h1 { font-size: clamp(2.65rem, 5.8vw, 5.1rem); }
h2 { font-size: clamp(1.95rem, 3.4vw, 3.05rem); }
h3 { font-size: 1.12rem; line-height: 1.3; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #5e7149; outline-offset: 4px; }
.wrap { width: min(100% - 80px, 1232px); margin-inline: auto; }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { inset: 10px auto auto 10px; width: auto; height: auto; padding: .6rem 1rem; clip-path: none; background: white; z-index: 5; }

.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 78px; display: flex; align-items: center; gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.17rem; font-weight: 750; text-decoration: none; white-space: nowrap; letter-spacing: -.045em; }
.brand-light { font-weight: 460; }
.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a, .search-open { color: var(--muted); font-size: .88rem; font-weight: 620; text-decoration: none; }
.main-nav a:hover, .main-nav a.current { color: var(--green); text-decoration: underline; text-underline-offset: 5px; }
.search-open { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 40px; padding: 8px 15px; background: var(--surface); }
.search-open:hover { border-color: var(--green); color: var(--green); }

.home { padding-top: 38px; }
.hero { display: grid; grid-template-columns: .98fr 1.02fr; min-height: 450px; border-radius: 22px; overflow: hidden; background: #e8ecdf; }
.hero-copy { padding: clamp(36px, 5.4vw, 83px); align-self: center; }
.hero-copy h1 { color: #203c2d; text-wrap: balance; }
.hero-copy p, .guide-intro p { max-width: 37ch; margin: 22px 0 27px; font-size: 1.01rem; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.hero-art, .feature-art, .guide-art { position: relative; background: #d9d1bd; }
.hero-art img, .feature-art img, .guide-art img { height: 100%; object-fit: cover; }
.hero-art img { position: absolute; inset: 0; object-position: 55% 50%; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .9rem; padding: 11px 17px; min-height: 46px; border-radius: 7px; text-decoration: none; font-size: .88rem; font-weight: 680; }
.primary { color: #fff; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.section { margin-block: 54px 0; scroll-margin-top: 22px; }
.section.compact { margin-top: 37px; }
.section-heading { margin-bottom: 22px; }
.category-grid, .topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.category-card { min-height: 151px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color .18s, background .18s, transform .18s; }
.category-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--pastel); }
.category-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.category-top .icon-arrow { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); color: var(--accent); }
.category-card:hover .icon-arrow { background: var(--surface); }
.category-card p, .topic-card p { margin-top: 4px; color: var(--muted); font-size: .88rem; line-height: 1.52; }
.palette-home { --pastel: #e4eddf; --accent: #355d45; }
.palette-tech { --pastel: #e4ecf4; --accent: #3c5879; }
.palette-pet { --pastel: #f3e7d7; --accent: #79541e; }
.palette-auto { --pastel: #e8e7f2; --accent: #544b75; }
.palette-garden { --pastel: #e4ecd7; --accent: #4c602f; }
.palette-baby { --pastel: #f4e3e1; --accent: #815358; }
.palette-health { --pastel: #e0eeea; --accent: #3b655f; }

.featured { display: grid; grid-template-columns: 1fr 1fr; min-height: 290px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.feature-art img { position: absolute; inset: 0; object-position: center 58%; }
.feature-copy { align-self: center; padding: clamp(24px, 3.8vw, 51px); }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; color: var(--green); text-decoration: none; font-size: .71rem; font-weight: 750; }
.feature-copy h3 { margin-block: 9px 10px; font: 500 clamp(1.75rem, 3.1vw, 2.75rem)/1.12 var(--serif); letter-spacing: -.035em; }
.feature-copy h3 a { text-decoration: none; }
.feature-copy p { color: var(--muted); margin-bottom: 16px; }
.text-link { color: var(--green); font-size: .92rem; font-weight: 720; text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--green-dark); }
.home-about { padding: clamp(24px, 3.8vw, 51px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.home-about p { max-width: 64ch; margin-block: 10px 16px; color: var(--muted); }
.site-footer { margin-top: 62px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; min-height: 92px; gap: 16px; }
.footer-inner > a:last-child { color: var(--muted); font-size: .85rem; text-underline-offset: 4px; }

.subpage { padding-top: 29px; min-height: calc(100vh - 235px); }
.breadcrumbs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { text-underline-offset: 3px; }
.category-hero { display: flex; align-items: center; gap: 24px; padding: clamp(25px, 5vw, 58px); border-radius: 15px; background: var(--pastel); }
.category-hero h1 { color: var(--accent); font-size: clamp(2.6rem, 5vw, 4.5rem); }
.category-hero p { margin-top: 9px; color: var(--muted); }
.category-hero .category-icon { width: 66px; height: 66px; padding: 9px; border-radius: 16px; background: var(--surface); }
.topic-card { scroll-margin-top: 20px; min-height: 130px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.topic-card:target { border-color: var(--green); background: #edf2e8; }
.topic-card .text-link { display: inline-block; margin-top: 11px; }
.other-categories { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 35px; color: var(--green); font-size: .87rem; }
.other-categories span { color: var(--muted); font-weight: 700; }
.other-categories a { text-underline-offset: 3px; }
.prose { max-width: 840px; }
.prose h1 { margin-block: 24px 20px; }
.prose h2 { margin-block: 26px 9px; font-size: 1.8rem; }
.prose p, .prose ul { max-width: 68ch; color: var(--muted); }
.prose ul { margin-block: 0; padding-inline-start: 1.4em; }
.prose li + li { margin-top: .65rem; }
.prose a { text-underline-offset: 4px; }

.shop-hero { padding: clamp(24px, 5vw, 58px); border-radius: 15px; background: #e8ecdf; }
.shop-hero h1 { color: var(--green-dark); }
.shop-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.shop-jumps a { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--accent); font-size: .84rem; font-weight: 680; text-decoration: none; }
.shop-jumps a:hover { border-color: var(--accent); }
.shop-jumps .icon { width: 22px; height: 22px; }
.shop-disclosure { margin-top: 12px; color: var(--muted); font-size: .85rem; }
.shop-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.shop-section-heading > .text-link { margin-left: auto; flex-shrink: 0; }
.product-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.product-card { display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 20px; border: 1px solid #dce1da; background: #fff; }
.product-card:target { outline: 2px solid var(--green); outline-offset: 3px; }
.product-card-media { padding: 12px; background: #e8ece6; }
.product-card-media img { width: 100%; height: auto; aspect-ratio: 1; padding: 8px; object-fit: contain; background: #fff; }
.product-card-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.product-card-brand { margin-bottom: 7px; color: #875322; font-size: .76rem; line-height: 1.35; font-weight: 750; letter-spacing: .07em; }
.product-card h3 { color: #202e28; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.025em; }
.product-card-description { margin: 12px 0 16px; color: #4e5a53; font-size: .875rem; line-height: 1.5; }
.product-card-facts { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px; margin: auto 0 12px; padding: 11px 0; border-block: 1px solid #e9ece7; }
.product-card-facts dt { color: #56645c; font-size: .69rem; letter-spacing: .04em; text-transform: uppercase; }
.product-card-facts dd { margin: 3px 0 0; color: #25342d; font-size: .8rem; line-height: 1.4; font-weight: 630; }
.product-card-actions { display: grid; gap: 7px; }
.product-card-button { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 44px; padding: 6px 9px; border: 1px solid; border-radius: 3px; font-size: .84rem; font-weight: 690; text-align: center; text-decoration: none; }
.product-card-button .icon { width: 14px; height: 14px; }
.product-card-guide { list-style: none; cursor: pointer; border-color: #6c8575; color: var(--green-dark); }
.product-card-guide::-webkit-details-marker { display: none; }
.product-card-guide .icon { transform: rotate(45deg); }
.product-card-guide:hover, .product-card-actions details[open] .product-card-guide { background: #eef3ee; }
.product-card-actions details p { padding: 9px 2px 2px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.product-card-asin { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.product-card-disclosure { color: var(--muted); font-size: .84rem; }
.product-card-buy { border-color: #a0521e; background: #a0521e; color: #fff; }
.product-card-buy:hover { border-color: #843d13; background: #843d13; }
.shop-more { margin-top: 14px; }
.shop-more > summary { width: fit-content; margin-inline: auto; padding-inline: 16px; gap: 6px; }
.shop-more > summary .icon { transform: none; }
.shop-more[open] > summary .icon { transform: rotate(180deg); }
.shop-more[open] .shop-more-label, .shop-more:not([open]) .shop-less-label { display: none; }
.shop-more > .product-cards { margin-top: 14px; }

.guide-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch; gap: 36px; border-radius: 15px; overflow: hidden; background: #e8ecdf; }
.guide-intro { padding: clamp(23px, 4.9vw, 62px); align-self: center; }
.guide-intro h1 { color: #203c2d; font-size: clamp(2.45rem, 4.55vw, 4.4rem); }
.guide-art img { position: absolute; inset: 0; }
.guide-art figcaption { position: absolute; right: 9px; bottom: 9px; padding: 2px 6px; border-radius: 3px; color: #322c25; background: #fffdf0ee; font-size: .7rem; }
.drainage { margin-top: 30px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.drainage h2 { font-size: clamp(1.65rem, 2.5vw, 2.3rem); }
.drain-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin-top: 15px; border: 0; }
.drain-options label { position: relative; }
.drain-options input { position: absolute; opacity: 0; }
.drain-options span { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 40px; cursor: pointer; font-size: .85rem; font-weight: 600; }
.drain-options input:focus-visible + span { outline: 3px solid #5e7149; outline-offset: 2px; }
.drain-options input:checked + span { border-color: var(--green); background: var(--green); color: white; }
.drain-answer, .table-note, .empty { margin-top: 11px; color: var(--muted); font-size: .9rem; }
.comparison-cards { max-width: 856px; }
.comparison-cards .product-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.source-note { margin-top: 13px; font-size: .84rem; color: var(--muted); }
.source-note a { text-underline-offset: 3px; }

.search-dialog { width: min(550px, 100% - 28px); max-height: 78vh; margin-top: min(12vh, 95px); padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 90px #0c1f2144; }
.search-dialog::backdrop { background: #18201975; }
.search-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.search-heading h2 { font-size: 1.7rem; }
.close { line-height: 1; font-size: 1.6rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: inherit; background: var(--paper); }
.search-dialog input { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid #9ba99b; border-radius: 6px; }
.search-results { padding: 0; margin: 10px 0 0; list-style: none; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results a { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 9px 2px; color: var(--green-dark); text-decoration: none; font-size: .91rem; font-weight: 650; }
.search-results a:hover { text-decoration: underline; }
.search-results small, .search-empty { color: var(--muted); font-size: .78rem; font-weight: 500; }

.icon { position: relative; display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; vertical-align: middle; }
.icon img { width: 100%; height: 100%; object-fit: contain; }
.icon-brand { width: 32px; height: 32px; }
.category-icon { width: 50px; height: 50px; padding: 5px; border-radius: 13px; background: var(--pastel); }
.icon-search::before, .icon-search::after, .icon-arrow::before, .icon-arrow::after,
.icon-down::before, .icon-down::after { content: ''; position: absolute; }
.icon-search::before { width: 11px; height: 11px; border: 1.65px solid currentColor; border-radius: 50%; transform: translate(-1px,-1px); }
.icon-search::after { width: 6px; height: 1.65px; border-radius: 2px; background: currentColor; transform: translate(4.5px,4.5px) rotate(45deg); }
.icon-arrow::before, .icon-down::before { width: 9px; height: 1.5px; border-radius: 2px; background: currentColor; }
.icon-arrow::before { transform: rotate(-45deg); }
.icon-arrow::after { width: 7px; height: 7px; border-top: 1.5px solid; border-right: 1.5px solid; border-radius: 0 1px 0 0; transform: translate(1px,-1px); }
.icon-down::before { transform: rotate(90deg) translateX(-1px); }
.icon-down::after { width: 6px; height: 6px; border-bottom: 1.5px solid; border-right: 1.5px solid; transform: translateY(1px) rotate(45deg); }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 44px); }
  .hero { min-height: 365px; }
  .hero-copy { padding: 33px; }
  .category-grid, .topic-grid, .product-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-hero { gap: 0; }
  .guide-intro { padding: 26px; }
}

@media (max-width: 570px) {
  .wrap { width: calc(100% - 30px); }
  .topbar-inner { min-height: 59px; gap: 12px; }
  .brand { font-size: 1.04rem; gap: 6px; }
  .icon-brand { width: 27px; height: 27px; }
  .main-nav { gap: 12px; }
  .main-nav a { font-size: .76rem; }
  .main-nav .nav-guides { display: none; }
  .search-open { padding: 5px 9px; font-size: .76rem; gap: 3px; }
  .home { padding-top: 16px; }
  .hero, .featured, .guide-hero { grid-template-columns: 1fr; }
  .hero { border-radius: 13px; }
  .hero-copy { padding: 28px 22px 30px; }
  .hero-art { min-height: 210px; }
  .hero-copy p, .guide-intro p { margin-block: 13px 19px; font-size: .94rem; }
  .section { margin-top: 33px; }
  .section-heading { margin-bottom: 13px; }
  .category-grid, .topic-grid { gap: 9px; }
  .category-card { min-height: 145px; padding: 12px; }
  .category-card h3 { font-size: .98rem; }
  .category-card p, .topic-card p { font-size: .79rem; }
  .category-icon { width: 42px; height: 42px; padding: 4px; }
  .feature-art { min-height: 195px; }
  .feature-copy { padding: 19px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
  .site-footer { margin-top: 39px; }
  .subpage { padding-top: 14px; }
  .category-hero { padding: 21px 16px; gap: 11px; }
  .category-hero .category-icon { width: 50px; height: 50px; padding: 6px; border-radius: 12px; }
  .category-hero h1 { font-size: 2.34rem; }
  .category-hero p { font-size: .86rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; padding: 13px; }
  .shop-jumps { margin-top: 15px; }
  .shop-section-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
  .shop-section-heading > .text-link { grid-column: 2; margin-left: 0; }
  .product-cards, .comparison-cards .product-cards { grid-template-columns: 1fr; gap: 12px; }
  .guide-art { min-height: 190px; }
  .drainage { margin-top: 16px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media (max-width: 420px) {
  .topbar-inner { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding-block: 8px; }
  .topbar-inner > .brand { grid-column: 1 / -1; justify-self: start; }
  .main-nav { gap: clamp(10px, 4vw, 20px); margin-left: 0; }
  .main-nav a { padding-block: 6px; }
}
