/* ShowerSpeakerPro Astro — anti-AI human layout + preview-safe media
   Bathroom-tech teal/cyan. No invented CDN URLs. Hero/media = CSS frames only. */
:root {
  --bg: #eef7f9;
  --bg-tint: #e2f1f5;
  --ink: #0c1a24;
  --muted: #3d5563;
  --accent: #0e7490;
  --accent-deep: #0d4f6e;
  --accent-soft: #c5e4ec;
  --card: #ffffff;
  --border: #b7d3dc;
  --media-fallback: #d5e6eb;
  --disclosure-bg: #fff8e8;
  --disclosure-border: #e6d4a8;
  --measure: 48rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(12, 26, 36, 0.06), 0 8px 24px rgba(13, 79, 110, 0.06);
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 12rem, var(--bg) 100%);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.05rem;
}

/* ---- Links: look like links ---- */
a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration: underline; color: var(--accent); }
.prose a { text-decoration: underline; text-decoration-color: rgba(13, 79, 110, 0.35); }
.prose a:hover { text-decoration-color: var(--accent); }

.site-header,
.site-footer,
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-soft);
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-family: var(--font-ui);
  max-width: calc(var(--measure) + 4rem);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--accent-deep);
  font-size: 1.1rem;
}
.brand:hover { color: var(--accent); text-decoration: none; }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.site-header nav a {
  margin-left: 0;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink);
}
.site-header nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer {
  border-top: 2px solid var(--accent-soft);
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--font-ui);
  max-width: calc(var(--measure) + 4rem);
  margin-top: 2.5rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}
.site-footer nav a { text-decoration: none; color: var(--muted); }
.site-footer nav a:hover { color: var(--accent-deep); text-decoration: underline; }

.pilot-banner {
  background: #eef2ff;
  border-bottom: 1px solid #c7d2fe;
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  text-align: center;
  color: #3730a3;
  font-family: var(--font-ui);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  font-family: var(--font-ui);
}
.skip-link:focus { left: 0; }

/* ---- Disclosure ---- */
.affiliate-disclosure {
  background: var(--disclosure-bg);
  border: 1px solid var(--disclosure-border);
  border-left: 4px solid #c4a35a;
  padding: 0.85rem 1rem;
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  line-height: 1.5;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---- Prose / measure ---- */
.prose :is(h1, h2, h3, h4) {
  font-family: var(--font-ui);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.prose h1 { font-size: clamp(1.65rem, 2.5vw, 2.05rem); margin: 0 0 0.75rem; }
.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent-soft);
}
.prose h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: var(--accent-deep); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  margin: 1.25rem 0;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--bg-tint);
  color: var(--accent-deep);
  font-weight: 650;
}
.prose tr:nth-child(even) td { background: rgba(255, 255, 255, 0.65); }

.lede { color: var(--muted); font-size: 1.05rem; }

/* ---- Images: proportioned; object-fit only inside frames ---- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  background-color: var(--media-fallback);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

/* Muted broken-image fallback (no replacement URL) */
img:-moz-broken,
img:not([src]),
img[src=""],
img[src="#"] {
  opacity: 0.55;
  min-height: 4rem;
  outline: 1px dashed var(--border);
  background:
    repeating-linear-gradient(
      -45deg,
      var(--media-fallback),
      var(--media-fallback) 8px,
      #c9dde3 8px,
      #c9dde3 16px
    );
}

figure {
  margin: 1.35rem 0;
  padding: 0;
  background: var(--media-fallback);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
figure img {
  width: 100%;
  height: auto;
  margin: 0;
  background: transparent;
}
figcaption {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  background: var(--card);
  border-top: 1px solid var(--border);
}

/* Hero / media frames — aspect-ratio boxes; cover ONLY inside */
.hero-frame,
.media-frame,
.post-hero,
.card-thumb,
.related-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--accent-deep) 0%, #15627a 45%, var(--media-fallback) 100%);
  border: 1px solid var(--border);
}
.hero-frame--square,
.media-frame--square { aspect-ratio: 1 / 1; }
.hero-frame--portrait,
.media-frame--portrait { aspect-ratio: 3 / 4; }

.hero-frame img,
.media-frame img,
.post-hero img,
.card-thumb img,
.related-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

/* Home inline hero (existing WP upload URL in homeHtml — do not invent new src) */
.home-body > div[style*="position:relative"][style*="border-radius"] {
  aspect-ratio: 21 / 9;
  min-height: 220px;
  max-height: 380px;
}
.home-body > div[style*="position:relative"] img[style*="object-fit"] {
  /* cover already inline; keep contained to frame */
  max-width: none;
}

/* ---- Browse-by-category: guard run-on links ---- */
.home-categories,
.home-body h2 + div[style*="grid-template-columns"] {
  display: grid !important;
  gap: 1rem 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: 0 0 1.5rem;
}
.home-body h2 + div[style*="grid-template-columns"] > a,
.home-categories a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
  min-width: 0;
  text-decoration: none;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.home-body h2 + div[style*="grid-template-columns"] > a:hover,
.home-categories a:hover {
  text-decoration: none;
}
.home-body h2 + div[style*="grid-template-columns"] > a + a,
.home-categories a + a {
  /* spacing from grid gap — prevent inline run-on if markup flattens */
  margin-top: 0;
}
.home-body h2 + div[style*="grid-template-columns"] br,
.home-categories br {
  display: none !important;
}

/* ---- Cards ---- */
.card-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  gap: 0.85rem;
}
.card-list li,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.card-list a,
a.card-title {
  font-family: var(--font-ui);
  font-weight: 650;
  text-decoration: none;
  color: var(--accent-deep);
  font-size: 1.05rem;
}
.card-list a:hover,
a.card-title:hover {
  text-decoration: underline;
  color: var(--accent);
}
.card-list p,
.card-dek {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---- TOC / comparison cues (style existing body TOC; no new voice) ---- */
.tmpl002-toc-wrap,
.kb-table-of-content,
.prose .tmpl002-toc-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-deep);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.tmpl002-toc-wrap h4,
.kb-table-of-content h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tmpl002-toc-wrap ol,
.tmpl002-toc-wrap ul,
.kb-table-of-content-list {
  margin: 0;
  padding-left: 1.15rem;
}
.toc-item { margin-bottom: 0.3rem; }
.toc-item a { text-decoration: none; }
.toc-item a:hover { text-decoration: underline; }

/* FAQ block — single calm panel (layout cue; bodies may still ship one block) */
.faq-block,
.prose .faq,
.prose [data-faq] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--card);
  margin: 1.75rem 0;
}
.faq-block h2,
.prose .faq > h2 {
  border-bottom: none;
  margin-top: 0;
}

.related-links {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
}
.related-links ul,
.related-links-list {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.related-links-item--thumb a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
}
.related-links a { text-decoration: none; }
.related-links a:hover { text-decoration: underline; }
.related-links .related-thumb {
  aspect-ratio: 16 / 9;
  margin-bottom: 0.15rem;
}
.related-links-label {
  font-weight: 650;
  color: var(--accent-deep);
  font-size: 0.98rem;
}

/* ---- Anti-AI UI chrome (Track A) ---- */
.org-byline {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.research-chip {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.research-chip a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(13, 79, 110, 0.35);
  text-underline-offset: 0.15em;
  color: var(--accent-deep);
  width: fit-content;
}
.research-chip a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}
.research-chip__subline {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.45;
}

.chrome-only-stub {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
  background: var(--bg-tint);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 0 1.15rem;
  line-height: 1.5;
}

.model-string-chips {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-ui);
}
.model-string-chips__heading {
  margin: 0 0 0.75rem !important;
  font-size: 1.05rem !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  color: var(--accent-deep);
}
.model-string-chips__list {
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}
.model-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.3;
}
.model-chip__role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.model-chip__model {
  font-weight: 650;
  color: var(--ink);
}

.home-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
}
.home-cta {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.home-cta--primary {
  background: var(--accent-deep);
  color: #fff !important;
  text-decoration: none;
  border: 1px solid var(--accent-deep);
}
.home-cta--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: underline;
  color: #fff !important;
}
.home-cta--secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent-deep);
}
.home-cta--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.affiliate-disclosure a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* residual empty chrome handled above */

/* Hide dead “upcoming” / empty teaser chrome if present in imported markup */
.upcoming-reviews,
.dead-teaser,
[data-teaser="upcoming"],
.review-teaser--empty {
  display: none !important;
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-header nav { gap: 0.5rem 0.85rem; }
  .home-body > div[style*="position:relative"][style*="border-radius"] {
    aspect-ratio: 16 / 10;
    max-height: none;
  }
}


.home-all-articles {
  font-family: var(--font-ui);
  margin: 1.5rem 0 2rem;
  font-weight: 650;
}
.home-all-articles a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Pilot chrome removed from BaseLayout — hide if residual markup appears */
.pilot-banner { display: none !important; }
