/* ==========================================================================
   Sarah's Pet Grooming — Editorial & Interactive Toolkit Stylesheet
   Palette harmonized with /images/logo.webp (Mulberry Plum + Deep Forest + Warm Linen)
   ========================================================================== */

:root {
  --bg-page: #faf8f4;
  --bg-surface: #ffffff;
  --bg-subtle: #f2efe9;
  --bg-sage: #edf3f0;
  --bg-plum-tint: #f6eff5;
  --bg-amber-tint: #fdf6ea;
  --bg-danger-tint: #fdf0ee;

  --ink-900: #182220;
  --ink-700: #31403d;
  --ink-500: #566662;
  --ink-400: #73837f;

  --plum-700: #5c3b58;
  --plum-600: #70496c;
  --plum-500: #875a82;
  --sage-700: #2b594c;
  --sage-600: #386f5f;
  --amber-700: #9a5b13;
  --danger-700: #a63228;

  --border-light: #e4dfd6;
  --border-strong: #cbbfb0;

  --shadow-sm: 0 2px 8px rgba(24, 34, 32, 0.05);
  --shadow-md: 0 10px 28px rgba(24, 34, 32, 0.08);
  --shadow-lg: 0 18px 42px rgba(24, 34, 32, 0.11);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--ink-900);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--plum-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--sage-700);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus {
  left: 12px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink-900);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p {
  color: var(--ink-700);
  margin-bottom: 1.15rem;
}

/* Top Trust Bar */
.top-bar {
  background: var(--ink-900);
  color: #e8e5df;
  font-size: 0.82rem;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar a {
  color: #f2d5ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo img {
  height: 52px;
  width: auto;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-desktop a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  background: var(--bg-plum-tint);
  color: var(--plum-700);
}

.nav-desktop a.nav-cta {
  background: var(--plum-600);
  color: #ffffff;
  margin-left: 4px;
}

.nav-desktop a.nav-cta:hover {
  background: var(--plum-700);
  color: #ffffff;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--ink-900);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(24, 34, 32, 0.55);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: var(--bg-surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}

.mobile-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-close {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-900);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-list a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink-900);
  font-size: 1rem;
}

.mobile-nav-list a.active,
.mobile-nav-list a:hover {
  background: var(--bg-plum-tint);
  color: var(--plum-700);
}

@media (min-width: 1024px) {
  .nav-desktop { display: block; }
  .menu-toggle { display: none; }
}

/* Breadcrumbs */
.breadcrumbs-bar {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
  font-size: 0.86rem;
}

.breadcrumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--ink-400);
}

.breadcrumbs a {
  color: var(--plum-600);
  font-weight: 500;
}

/* Buttons & Badges */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-plum-tint);
  color: var(--plum-700);
  margin-bottom: 14px;
}

.eyebrow-sage {
  background: var(--bg-sage);
  color: var(--sage-700);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--plum-600);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--plum-700);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink-900);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--plum-600);
  color: var(--plum-700);
  background: var(--bg-plum-tint);
}

.btn-sage {
  background: var(--sage-600);
  color: #ffffff;
}
.btn-sage:hover {
  background: var(--sage-700);
  color: #ffffff;
}

/* Hero & Page Headers */
.hero-editorial {
  padding: 56px 0 64px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

@media (min-width: 920px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--ink-700);
  margin: 18px 0 26px;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.trust-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.metric-item strong {
  display: block;
  font-size: 1.25rem;
  color: var(--ink-900);
  font-family: var(--font-serif);
}

.metric-item span {
  font-size: 0.84rem;
  color: var(--ink-500);
}

.hero-media-card {
  background: var(--bg-surface);
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.hero-media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.hero-media-caption {
  padding: 12px 6px 4px;
  font-size: 0.85rem;
  color: var(--ink-500);
  margin: 0;
}

.page-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 44px 0 40px;
}

.page-hero p {
  font-size: 1.08rem;
  max-width: 68ch;
  margin-top: 14px;
  margin-bottom: 0;
}

/* Sections & Grids */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-surface {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-header p {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 1.04rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card h3 {
  margin-bottom: 10px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-link-footer {
  margin-top: auto;
  padding-top: 16px;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--plum-600);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Article Cards */
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--ink-500);
  margin-bottom: 10px;
}

.tag-pill {
  background: var(--bg-sage);
  color: var(--sage-700);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-card h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.article-card h3 a {
  color: var(--ink-900);
}

.article-card h3 a:hover {
  color: var(--plum-600);
}

.article-card p {
  font-size: 0.94rem;
  margin-bottom: 16px;
}

/* Interactive Tool Panels */
.tool-shell {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .tool-shell { padding: 36px; }
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 960px) {
  .tool-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 36px;
    align-items: start;
  }
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-900);
  margin-bottom: 7px;
}

.form-field .field-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-500);
  margin-bottom: 7px;
}

.select-input,
.text-input,
.textarea-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--ink-900);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-input:focus,
.text-input:focus,
.textarea-input:focus {
  outline: none;
  border-color: var(--plum-600);
  box-shadow: 0 0 0 3px rgba(112, 73, 108, 0.16);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 540px) {
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

.check-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-900);
}

.check-tile input {
  margin-top: 3px;
  accent-color: var(--plum-600);
  width: 16px;
  height: 16px;
}

.result-panel {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
}

.result-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.price-highlight {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--plum-700);
  line-height: 1.15;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-list li {
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
}

.spec-list li strong {
  display: block;
  color: var(--ink-900);
  margin-bottom: 3px;
}

/* Long-Form Editorial Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 48px 0 72px;
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 48px;
    align-items: start;
  }
}

.prose {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .prose { padding: 44px 48px; }
}

.prose h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-light);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.65rem;
  margin-bottom: 0.65rem;
}

.prose p {
  font-size: 1.03rem;
  line-height: 1.78;
  margin-bottom: 1.2rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.35rem 1.35rem;
  color: var(--ink-700);
}

.prose li {
  margin-bottom: 0.55rem;
  line-height: 1.7;
}

.prose li strong {
  color: var(--ink-900);
}

.prose figure {
  margin: 28px 0;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.prose figure img {
  border-radius: var(--radius-sm);
  width: 100%;
}

.prose figcaption {
  font-size: 0.85rem;
  color: var(--ink-500);
  margin-top: 10px;
  text-align: center;
}

/* Callout Boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 24px 0;
  border-left: 4px solid var(--plum-600);
  background: var(--bg-plum-tint);
}

.callout-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-900);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout-tip {
  background: var(--bg-sage);
  border-left-color: var(--sage-600);
}

.callout-warn {
  background: var(--bg-amber-tint);
  border-left-color: var(--amber-700);
}

.callout-vet {
  background: var(--bg-danger-tint);
  border-left-color: var(--danger-700);
}

/* Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  color: var(--ink-900);
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-700);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

/* Sidebar Widgets */
.sidebar-sticky {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-900);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.toc-list a {
  color: var(--ink-700);
  display: block;
  padding: 4px 0;
  border-left: 2px solid var(--border-light);
  padding-left: 10px;
}

.toc-list a:hover {
  color: var(--plum-600);
  border-left-color: var(--plum-600);
}

/* Author Bio Box (E-E-A-T Signal) */
.author-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 36px;
  align-items: center;
}

@media (min-width: 640px) {
  .author-box {
    grid-template-columns: 84px 1fr;
  }
}

.author-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--plum-600);
}

.author-box h4 {
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.author-role {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--plum-700);
  margin-bottom: 8px;
}

.author-box p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Accordion / FAQ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--plum-600);
  border-color: var(--plum-600);
  color: #ffffff;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-trigger:hover {
  background: var(--bg-page);
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--plum-600);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-panel {
  display: none;
  padding: 0 22px 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.faq-item.open .faq-panel {
  display: block;
}

/* Diagram Container */
.diagram-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 26px 0;
}

.diagram-box svg {
  margin: 0 auto;
}

.diagram-caption {
  font-size: 0.85rem;
  color: var(--ink-500);
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--ink-900);
  color: #dcd8d0;
  padding: 60px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.1fr 0.9fr; }
}

.site-footer h3,
.site-footer h4 {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.site-footer p {
  color: #c4bfb5;
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.9rem;
}

.footer-links a {
  color: #dcd8d0;
}

.footer-links a:hover {
  color: #f3c6ec;
}

.footer-disclaimer {
  padding: 22px 0 14px;
  font-size: 0.82rem;
  color: #a6a198;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  color: #a6a198;
}

.footer-bottom a {
  color: #dcd8d0;
  text-decoration: underline;
}

/* Cookie / Privacy Notice Banner */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--ink-900);
  color: #f4f2ed;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-banner.visible {
  display: flex;
}

.cookie-banner p {
  color: #e4e0d8;
  font-size: 0.85rem;
  margin: 0;
  flex: 1 1 320px;
}

.cookie-banner a {
  color: #f3c6ec;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #ffffff;
}

.cookie-btn-accept {
  background: var(--plum-500);
  border-color: var(--plum-500);
}

@media print {
  .top-bar, .site-header, .breadcrumbs-bar, .sidebar-sticky, .site-footer, .cookie-banner, .no-print {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .prose, .tool-shell, .result-panel { border: none; box-shadow: none; padding: 0; }
}
