/* PoupIQ — "Dynamic Product Discovery" design system.
   Light, warm, editorial. System fonts only, no third-party requests.
   Tokens first, then base, layout, components, pages. */

:root {
  /* Colour */
  --ivory: #faf7f1;
  --paper: #ffffff;
  --sand: #f2e9dc;
  --blush: #fbe6dc;
  --sage: #e4ece3;
  --mist: #e1ecee;
  --sand-2: #efe2cf;
  --ink: #252b30;
  --muted: #5c666b;
  --line: #e6dccb;
  --line-strong: #d3c5ae;
  --coral: #f1774b;          /* brand accent: fills and shapes */
  --sage-accent:#7E9C90; /* decorative only, never for text */
  --coral-ink: #b8431b;      /* accent for text/links on light surfaces (>= 5:1) */
  --coral-soft: #fdeee6;
  --focus: #252b30;

  /* Type */
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  --step-4: clamp(2rem, 1.5rem + 1.9vw, 3.15rem);

  /* Space, shape, depth */
  --gutter: clamp(18px, 4vw, 40px);
  --max: 1200px;
  --measure: 68ch;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(37, 43, 48, .06), 0 6px 18px rgba(37, 43, 48, .06);
  --shadow-hover: 0 2px 4px rgba(37, 43, 48, .08), 0 12px 28px rgba(37, 43, 48, .1);
  --header: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--coral-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0; font-weight: 700;  text-wrap: balance; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

.container { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name b { color: var(--coral-ink); font-weight: 700; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; }
.nav-list a:hover { background: var(--sand); }
.nav-list a[aria-current="page"] { background: var(--coral-soft); color: var(--coral-ink); }
.nav-group { position: relative; }
.nav-sub { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; margin: 0; padding: 8px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.nav-sub a { display: flex; width: 100%; border-radius: var(--radius-sm); font-weight: 500; }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }

/* ---------- Buttons, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: #f58a63; box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: var(--step--1); font-weight: 700; letter-spacing: .01em; }
.pill-coral { background: var(--coral-soft); color: var(--coral-ink); }
.eyebrow, .kicker { font-size: var(--step--1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-ink); margin: 0 0 12px; }
.meta { color: var(--muted); font-size: var(--step--1); margin: 0 0 .6em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ivory); border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; right: -120px; top: -140px; width: 520px; height: 520px; border-radius: 50%; background: var(--blush); opacity: .75; }
.hero::after { content: ""; position: absolute; right: 8%; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: var(--sand); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(22px, 3vw, 42px); }
.hero h1 { font-size: var(--step-4); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--coral-ink); white-space: nowrap; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 44ch; margin-bottom: 22px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.topic-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); }
.topic-panel h2 { font-size: var(--step-1); margin-bottom: 4px; }
.topic-panel > p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
.topic-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.topic-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); color: var(--ink); text-decoration: none; font-weight: 700; min-height: 56px; }
.topic-list a:hover { border-color: var(--coral); background: var(--coral-soft); }
.topic-list small { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ---------- Sections and cards ---------- */
.section { padding-block: clamp(40px, 6vw, 80px); }
.section-tint { background: var(--sand); }
.section-head { max-width: 62ch; margin-bottom: clamp(22px, 3vw, 36px); }
.section-head h2 { font-size: var(--step-3); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: var(--step-1); margin: 0; }
.section-head p.eyebrow { color: var(--coral-ink); font-size: var(--step--1); margin: 0 0 10px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: clamp(14px, 2vw, 24px); }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--line-strong); }
.card-top { position: relative; height: 124px; padding: 14px 16px; background: var(--sand); display: flex; align-items: flex-start; overflow: hidden; }
.card-top::before { content: ""; position: absolute; right: -26px; bottom: -48px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.card[data-v="1"] .card-top::before { right: auto; left: -34px; bottom: -58px; width: 130px; height: 130px; }
.card[data-v="2"] .card-top::before { right: 28px; top: -62px; bottom: auto; width: 120px; height: 120px; }
.card[data-motif="feeder"] .card-top { background: var(--blush); }
.card[data-motif="water"] .card-top { background: var(--mist); }
.card[data-motif="pin"] .card-top { background: var(--sage); }
.card[data-motif="brush"] .card-top { background: var(--sand-2); }
.card-top .pill { position: relative; z-index: 2; background: rgba(255, 255, 255, .88); }
.art { display: block; }
.art .a { fill: var(--coral); }
.art .b { fill: var(--ink); }
.art .c { fill: var(--paper); }
.art .ring { fill: none; stroke: var(--ink); stroke-width: 2.5; opacity: .3; }
.art .bristle path { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.art .whisker { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.art-card { position: absolute; z-index: 1; right: 14px; bottom: 8px; width: 132px; height: auto; }
.card[data-v="1"] .art-card { right: auto; left: auto; right: 22px; }
.card[data-v="2"] .art-card { right: 30px; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card h2, .card h3 { font-size: var(--step-1); margin-bottom: 10px; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole card is the link */
.card h2 a:focus-visible, .card h3 a:focus-visible { outline-offset: -3px; }
.card p.summary { color: var(--muted); font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 14px; }
.card .card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: var(--step--1); }
.card .more { color: var(--coral-ink); font-weight: 800; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (min-width: 1100px) { .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.trust-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--sand); margin-bottom: 14px; }
.trust-icon .art-icon { width: 30px; height: auto; }
.trust-item:nth-child(2) .trust-icon { background: var(--blush); }
.trust-item:nth-child(3) .trust-icon { background: var(--sage); }
.trust-item:nth-child(4) .trust-icon { background: var(--mist); }
.trust-item h3 { font-size: var(--step-1); margin-bottom: 8px; }
.trust-item p { color: var(--muted); font-size: .95rem; margin: 0; }
.note-line { margin-top: clamp(20px, 3vw, 32px); color: var(--muted); font-size: .98rem; }

/* ---------- Page header (listings, institutional) ---------- */
.page-header { background: var(--ivory); border-bottom: 1px solid var(--line); padding-block: clamp(28px, 5vw, 56px); }
.page-header h1 { font-size: clamp(1.85rem, 1.4rem + 1.5vw, 2.7rem); max-width: 26ch; margin-bottom: 12px; }
.page-header .lede { font-size: 1.08rem; color: var(--muted); max-width: 60ch; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: var(--step--1); color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--coral-ink); }
.crumbs a + a::before, .crumbs a + span::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs span { color: var(--ink); }
.page-body { padding-block: clamp(28px, 5vw, 56px); }
.prose-card { max-width: 720px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.5vw, 36px); box-shadow: var(--shadow); }
.prose-card p { font-size: var(--step-0); }
.prose-card p:last-child { margin-bottom: 0; }
.status-card { max-width: 720px; margin-top: 20px; padding: 18px 22px; border-radius: var(--radius); background: var(--sand); border: 1px solid var(--line); }
.status-card .kicker { margin-bottom: 4px; }
.status-card h2 { font-size: var(--step-1); margin-bottom: 6px; }
.status-card p { margin: 0; color: var(--muted); }
.subhead { font-size: var(--step-2); margin: clamp(28px, 4vw, 44px) 0 18px; }
.page-body > .card-grid + .subhead { margin-top: 44px; }

/* ---------- Article ---------- */
.article-header { background: var(--ivory); border-bottom: 1px solid var(--line); padding-block: clamp(20px, 3vw, 34px) clamp(22px, 3vw, 32px); }
.article-header h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.45rem); max-width: 30ch; margin-bottom: 12px; }
.article-header .lede { font-size: 1.08rem; line-height: 1.55; color: var(--muted); max-width: 64ch; margin-bottom: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: var(--step--1); margin: 0 0 14px; }
.basis-note { max-width: 64ch; padding: 8px 14px; border-left: 3px solid var(--coral); background: rgba(255, 255, 255, .7); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; }
.basis-note strong { color: var(--ink); }
.article-layout { display: grid; grid-template-columns: 230px minmax(0, var(--measure)); gap: clamp(24px, 4.5vw, 64px); padding-block: clamp(18px, 2.5vw, 30px) clamp(32px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(var(--header) + 20px); font-size: .92rem; }
.toc summary { cursor: pointer; font-weight: 800; padding: 10px 0; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc li a:hover { color: var(--ink); border-left-color: var(--coral); }
.article-body { min-width: 0; font-size: 1.04rem; line-height: 1.7; }
.article-body section { margin-bottom: clamp(24px, 3.5vw, 40px); }
.article-body h2 { font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem); margin-bottom: 12px; }
.article-body p { margin-bottom: 1.1em; }
.article-body ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .45em; padding-left: .2em; }
.article-body li::marker { color: var(--coral); }
.article-body .intro { font-size: 1.12rem; color: var(--ink); line-height: 1.6; }

/* Tables: readable cards on phones */
.table-wrap { margin: 24px 0 28px; }
.table-caption { font-size: var(--step--1); font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.table-hint { display: none; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.table-scroll:focus-visible { outline-offset: 2px; }
.article-table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.article-table th { background: var(--sand); color: var(--ink); font-size: var(--step--1); letter-spacing: .04em; text-transform: uppercase; text-align: left; padding: 12px 16px; }
.article-table td { padding: 14px 16px; vertical-align: top; border-top: 1px solid var(--line); }
.article-table td:first-child { font-weight: 700; width: 18%; }
.article-table tbody tr:nth-child(even) td { background: #fdfbf7; }

/* Method, sources, FAQ */
.article-body .secondary, .article-body .method { font-size: .94rem; line-height: 1.6; color: var(--muted); }
.article-body .secondary h2, .article-body .method h2 { font-size: 1.2rem; color: var(--ink); }
.method { background: var(--sand); border-radius: var(--radius); padding: clamp(16px, 2.5vw, 24px); }
.method p:last-child { margin-bottom: 0; }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.source-list li { padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.5; }
.source-list li::marker { content: ""; }
.source-list a { font-weight: 800; }
.source-list span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; }
details.faq { border-top: 1px solid var(--line); padding: 4px 0; }
details.faq:last-of-type { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 700; position: relative; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; color: var(--coral-ink); line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { color: var(--muted); padding-right: 24px; }
.disclosure { margin-top: 12px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.disclosure p { margin: 0; color: var(--muted); font-size: .95rem; }
.related { background: var(--sand); padding-block: clamp(32px, 5vw, 64px); }
.related h2 { font-size: var(--step-2); margin-bottom: 20px; }

/* Product / offer blocks (used when verified products exist) */
.product-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.product-card img { border-radius: var(--radius-sm); margin-bottom: 12px; }
.status-note { background: var(--coral-soft); border-radius: var(--radius-sm); padding: 8px 12px; font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sand); border-top: 1px solid var(--line); padding-top: clamp(32px, 5vw, 56px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); padding-bottom: 32px; }
.footer-grid h2 { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; padding: 5px 0; color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--coral-ink); text-decoration: underline; }
.footer-grid p { color: var(--muted); font-size: .96rem; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-tagline { font-family: var(--font-display); font-weight: 700; color: var(--ink) !important; font-size: 1.1rem !important; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-strong); padding-block: 18px; color: var(--muted); font-size: var(--step--1); }
.footer-base p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero::after { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero::before { width: 360px; height: 360px; right: -140px; top: -120px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 4px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px; box-shadow: var(--shadow-hover); }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { width: 100%; min-height: 48px; border-radius: var(--radius-sm); }
  .nav-sub { display: block; position: static; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 2px 0 6px 14px; padding: 0 0 0 6px; min-width: 0; }
}
@media (max-width: 760px) {
  .table-scroll { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .article-table, .article-table tbody, .article-table tr, .article-table td { display: block; width: 100%; }
  .article-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .article-table tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; padding: 6px 0; box-shadow: var(--shadow); }
  .article-table tbody tr:nth-child(even) td { background: transparent; }
  .article-table td { border: 0; padding: 8px 16px; }
  .article-table td:first-child { width: 100%; font-size: 1.02rem; font-family: var(--font-display); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .article-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: var(--step--1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--coral-ink); margin-bottom: 2px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .article-body { font-size: 1.04rem; }
}
@media (min-width: 1700px) {
  :root { --max: 1320px; --measure: 70ch; }
  html { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .card:hover, .btn-primary:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .toc, .related { display: none; }
  body { background: #fff; }
}
.topic-panel .card-grid { grid-template-columns: 1fr; }
.topic-panel .card:hover { transform: none; }
.gate { padding-block: 12vh; text-align: center; }

/* Section rhythm */
.band-paper { background: var(--paper); border-block: 1px solid var(--line); }

/* Category tiles: topic illustration plus direct links to guides */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: clamp(14px, 2vw, 24px); }
.cat-tile { display: grid; grid-template-columns: 112px minmax(0, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cat-art { display: flex; align-items: center; justify-content: center; background: var(--sand-2); padding: 12px; }
.cat-tile[data-motif="cat"] .cat-art { background: var(--blush); }
.cat-tile[data-motif="dog"] .cat-art { background: var(--sage); }
.cat-tile[data-motif="pin"] .cat-art { background: var(--mist); }
.art-tile { width: 92px; height: auto; }
.cat-body { padding: 16px 18px 14px; min-width: 0; }
.cat-body h2, .cat-body h3 { font-size: var(--step-2); margin-bottom: 6px; }
.cat-body h2 a, .cat-body h3 a { color: var(--ink); text-decoration: none; }
.cat-body h2 a:hover, .cat-body h3 a:hover { color: var(--coral-ink); text-decoration: underline; }
.cat-lede { color: var(--muted); font-size: .93rem; line-height: 1.5; margin-bottom: 10px; }
.cat-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cat-links li { border-bottom: 1px solid var(--line); }
.cat-links li:last-child { border-bottom: 0; }
.cat-links a { display: block; padding: 9px 22px 9px 0; position: relative; font-size: .92rem; font-weight: 700; text-decoration: none; line-height: 1.35; }
.cat-links a::after { content: "→"; position: absolute; right: 2px; top: 9px; color: var(--coral-ink); }
.cat-links a:hover { text-decoration: underline; }
.page-body .tile-grid { margin-bottom: 8px; }

/* Touch-friendly dropdown: opened by JS on touch devices (first tap opens, second follows the link) */
.nav-group.is-open .nav-sub { display: block; }
@media (max-width: 820px) { .nav-group .nav-sub { display: block; } }
@media (max-width: 420px) {
  .cat-tile { grid-template-columns: 88px minmax(0, 1fr); }
  .art-tile { width: 70px; }
  .art-card { width: 112px; }
}

/* Home guide row: at most three columns, so a short row never leaves an empty slot */
.band-paper .card-grid { grid-template-columns: repeat(auto-fit, minmax(max(280px, calc((100% - 48px) / 3)), 1fr)); }
@media (max-width: 640px) { .band-paper .card-grid { grid-template-columns: 1fr; } }

/* Section sub-heading (one clear sentence under a section title) */
.section-head p.section-sub { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--coral-ink); margin: 0 0 10px; }

/* Category group heading on the home page (one line of feeling before its tiles) */
.group-head { margin: 4px 0 16px; }
.group-head h3 { font-size: var(--step-2); margin-bottom: 4px; }
.group-head p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.group-head + .tile-grid + .tile-grid { margin-top: 28px; }

/* Compact hero: the featured guide sits tighter so the next section starts above the fold */
.topic-panel { padding: clamp(14px, 2vw, 20px); }
.topic-panel > p { margin-bottom: 10px; font-size: .9rem; }
.topic-panel .card-top { height: 84px; }
.topic-panel .art-card { width: 96px; }
.topic-panel .card-body { padding: 12px 16px 14px; }
.topic-panel .card h2, .topic-panel .card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.topic-panel .card p.summary { -webkit-line-clamp: 2; margin-bottom: 8px; }
