/* ── Design Tokens ── */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --font-display: 'Source Serif 4', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 780px;
  --content-wide: 1080px;
}

/* ── Light Mode ── */
:root, [data-theme="light"] {
  --color-bg:             #f5f3ef;
  --color-surface:        #ffffff;
  --color-surface-offset: #eae7e1;
  --color-divider:        #d6d2cb;
  --color-border:         #c8c3bb;
  --color-text:           #1e2a2a;
  --color-text-muted:     #5e6b6b;
  --color-text-faint:     #9ba5a5;
  --color-primary:        #1a5f6a;
  --color-primary-hover:  #134a53;
  --color-primary-active: #0e3a42;
  --color-accent:         #c45a2c;
  --color-accent-hover:   #a34820;
  --color-hero-bg:        #1a3c47;
  --color-hero-text:      #f0edea;
  --color-hero-muted:     #a8bfc6;
  --color-card-icon:      #1a5f6a;
  --color-check:          #3a7d45;
  --color-check-bg:       #e8f3ea;
  --color-step-num:       #1a5f6a;
  --color-step-line:      #d6d2cb;
  --color-warning-bg:     #fdf4ee;
  --color-warning-border: #e8c9b0;
  --color-warning-icon:   #c45a2c;

  --shadow-sm: 0 1px 3px rgba(30, 42, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(30, 42, 42, 0.08);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --color-bg:             #141e21;
  --color-surface:        #1a2729;
  --color-surface-offset: #1e2e31;
  --color-divider:        #2a3a3d;
  --color-border:         #354546;
  --color-text:           #d5dede;
  --color-text-muted:     #8a9a9a;
  --color-text-faint:     #5e6e6e;
  --color-primary:        #5dafb8;
  --color-primary-hover:  #7dc4cb;
  --color-primary-active: #9dd5da;
  --color-accent:         #e07a50;
  --color-accent-hover:   #ea9470;
  --color-hero-bg:        #0f1f24;
  --color-hero-text:      #d5dede;
  --color-hero-muted:     #7a9da5;
  --color-card-icon:      #5dafb8;
  --color-check:          #6daa45;
  --color-check-bg:       #1e2e22;
  --color-step-num:       #5dafb8;
  --color-step-line:      #2a3a3d;
  --color-warning-bg:     #2a2018;
  --color-warning-border: #4a3828;
  --color-warning-icon:   #e07a50;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141e21;
    --color-surface:        #1a2729;
    --color-surface-offset: #1e2e31;
    --color-divider:        #2a3a3d;
    --color-border:         #354546;
    --color-text:           #d5dede;
    --color-text-muted:     #8a9a9a;
    --color-text-faint:     #5e6e6e;
    --color-primary:        #5dafb8;
    --color-primary-hover:  #7dc4cb;
    --color-primary-active: #9dd5da;
    --color-accent:         #e07a50;
    --color-accent-hover:   #ea9470;
    --color-hero-bg:        #0f1f24;
    --color-hero-text:      #d5dede;
    --color-hero-muted:     #7a9da5;
    --color-card-icon:      #5dafb8;
    --color-check:          #6daa45;
    --color-check-bg:       #1e2e22;
    --color-step-num:       #5dafb8;
    --color-step-line:      #2a3a3d;
    --color-warning-bg:     #2a2018;
    --color-warning-border: #4a3828;
    --color-warning-icon:   #e07a50;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

/* ── Layout ── */
.page-wrapper { width: 100%; overflow-x: hidden; }

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow { max-width: var(--content-default); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-3) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-width: 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.site-logo svg { width: 28px; height: 28px; flex-shrink: 0; }

.site-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.nav-link.active {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* Mobile nav */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.mobile-nav-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

@media (max-width: 639px) {
  .site-nav { display: none; }
  .mobile-nav-toggle { display: flex; }

  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-3) var(--space-5);
    gap: var(--space-1);
    box-shadow: var(--shadow-md);
  }
}

/* ── Town Banner ── */
.town-banner {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.town-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ── Page Views ── */
.page-view { display: none; }
.page-view.active { display: block; }

/* ── Hero ── */
.hero {
  background: var(--color-hero-bg);
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(26, 95, 106, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(196, 90, 44, 0.08), transparent);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-hero-muted);
  margin-bottom: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-hero-text);
  max-width: 20ch;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: var(--text-base);
  color: var(--color-hero-muted);
  max-width: 56ch;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-hero-bg);
  background: var(--color-hero-text);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.hero-cta:hover { opacity: 0.9; }
.hero-cta svg { width: 16px; height: 16px; }

/* ── Shared Section Styles ── */
.section {
  padding: clamp(var(--space-12), 7vw, var(--space-20)) 0;
}
.section--offset { background: var(--color-surface-offset); }

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  letter-spacing: -0.01em;
}

.section-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin: 0;
}

/* ── Intro (Climate page) ── */
.intro { padding: clamp(var(--space-12), 7vw, var(--space-20)) 0; }

.intro-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.65;
  max-width: 62ch;
}
.intro-text strong { color: var(--color-primary); font-weight: 600; }

/* ── Findings Grid (Climate page) ── */
.findings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 640px) { .findings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .findings-grid { grid-template-columns: repeat(3, 1fr); } }

.finding-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.finding-card-icon { width: 40px; height: 40px; color: var(--color-card-icon); flex-shrink: 0; }

.finding-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.finding-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

.finding-stat {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-1);
  font-variant-numeric: tabular-nums;
}

/* ── Why Read (Climate page) ── */
.why-read { padding: clamp(var(--space-12), 7vw, var(--space-20)) 0; background: var(--color-surface-offset); }

.why-read-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .why-read-content { grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
}

.why-read-left .section-heading { margin-bottom: var(--space-5); }
.why-read-left p { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-6); }

.audience-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); }

.audience-item { display: flex; gap: var(--space-3); align-items: flex-start; }

.audience-icon { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }

.audience-item p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; }
.audience-item strong { font-weight: 600; }

/* ── CTA Banner ── */
.cta-banner { padding: clamp(var(--space-12), 7vw, var(--space-20)) 0; text-align: center; }
.cta-banner .section-heading { margin-bottom: var(--space-4); }
.cta-banner p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.cta-buttons, .resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-primary); }

/* ── Checklist (Tick page) ── */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .checklist-grid { grid-template-columns: repeat(2, 1fr); } }

.check-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  position: relative;
}
.check-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-4);
  bottom: var(--space-4);
  width: 3px;
  border-radius: 2px;
  background: var(--color-check);
}

.check-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-check); margin-top: 1px; }
.check-card p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; }
.check-card strong { font-weight: 600; }
.check-card em { font-style: normal; color: var(--color-text-muted); }

/* ── Defense Grid (Tick page) ── */
.defense-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .defense-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .defense-grid { grid-template-columns: repeat(4, 1fr); } }

.defense-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.defense-card-icon { width: 36px; height: 36px; color: var(--color-card-icon); }
.defense-card h3 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; color: var(--color-text); line-height: 1.3; }
.defense-card p { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }

/* ── Steps (Tick page) ── */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 0; max-width: 600px; }

.step-item { display: flex; gap: var(--space-4); padding-bottom: var(--space-6); position: relative; }
.step-item:last-child { padding-bottom: 0; }

.step-marker { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-step-num);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-step-num);
  z-index: 1;
}

.step-line { width: 2px; flex: 1; background: var(--color-step-line); margin-top: var(--space-2); }
.step-item:last-child .step-line { display: none; }

.step-content h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.3;
  padding-top: var(--space-1);
}
.step-content p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

/* ── Warning Callout ── */
.callout-warning {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-top: var(--space-8);
  max-width: 600px;
}
.callout-icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--color-warning-icon); margin-top: 2px; }
.callout-warning p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; }
.callout-warning strong { font-weight: 600; }

/* ── Resource Banner ── */
.resource-banner { padding: clamp(var(--space-10), 6vw, var(--space-16)) 0; text-align: center; }
.resource-banner .section-heading { margin-bottom: var(--space-4); }
.resource-banner p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) 0;
}
.footer-inner { display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-text { font-size: var(--text-xs); color: var(--color-text-faint); line-height: 1.5; }
.footer-links { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-links a { font-size: var(--text-xs); color: var(--color-text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--color-primary); }

/* ── Guide Table (Waste page) ── */
.guide-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.guide-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.guide-table thead {
  background: var(--color-surface-offset);
}

.guide-table th {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

.guide-table td {
  font-size: var(--text-sm);
  color: var(--color-text);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
  line-height: 1.5;
}

.guide-table tbody tr:last-child td { border-bottom: none; }

.guide-table tbody tr:hover { background: color-mix(in srgb, var(--color-primary) 3%, transparent); }

.guide-table a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-xs);
}
.guide-table a:hover { text-decoration: underline; }

.guide-table-divider td {
  background: var(--color-surface-offset);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.guide-table-divider span {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.item-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-card-icon);
}

.item-icon.icon-donate { color: var(--color-accent); }

.item-cell span { font-weight: 500; }

/* Mobile table cards */
@media (max-width: 639px) {
  .guide-table-wrap { border: none; background: transparent; }
  .guide-table { min-width: 0; }
  .guide-table thead { display: none; }
  .guide-table tbody tr {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    padding: var(--space-4);
  }
  .guide-table tbody tr:hover { background: var(--color-surface); }
  .guide-table td {
    display: block;
    border-bottom: none;
    padding: var(--space-1) 0;
  }
  .guide-table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
  }
  .guide-table td:first-child { padding-bottom: var(--space-2); }
  .guide-table td:first-child::before { display: none; }
  .guide-table-divider {
    background: transparent;
    border: none;
    padding: var(--space-4) 0 var(--space-1);
  }
  .guide-table-divider td {
    background: transparent;
    padding: 0;
  }
}

/* ── Tips Grid (Waste page) ── */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .tips-grid { grid-template-columns: repeat(2, 1fr); } }

.tip-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tip-icon { width: 24px; height: 24px; color: var(--color-card-icon); }

.tip-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.tip-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

/* ── Sources List (Waste page) ── */
.sources-list {
  list-style: decimal;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sources-list li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.sources-list a {
  color: var(--color-primary);
  text-decoration: none;
}
.sources-list a:hover { text-decoration: underline; }

/* ── Info Cards (EMR page) ── */
.info-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 860px) { .info-cards-grid { grid-template-columns: repeat(3, 1fr); } }

.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}

.info-card-icon { width: 24px; height: 24px; color: var(--color-card-icon); flex-shrink: 0; }

.info-card-header h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.hours-table { width: 100%; }
.hours-table td {
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}
.hours-table tr:last-child td { border-bottom: none; }
.hours-table td:first-child { font-weight: 500; }
.hours-table td:last-child { text-align: right; color: var(--color-text-muted); }

.info-detail p {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}
.info-detail p:last-child { margin-bottom: 0; }
.info-detail a { color: var(--color-primary); text-decoration: none; }
.info-detail a:hover { text-decoration: underline; }

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
@media (min-width: 640px) { .calendar-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 860px) { .calendar-grid { grid-template-columns: repeat(6, 1fr); } }

.cal-month {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cal-month.past { opacity: 0.45; }

.cal-date {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.cal-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Accepted Items Grid */
.accepted-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-2);
}
@media (min-width: 640px) { .accepted-grid { grid-template-columns: 1fr 1fr; } }

.accepted-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.accepted-col ul {
  list-style: disc;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.accepted-col li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.accepted-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
  line-height: 1.5;
}
.accepted-note a { color: var(--color-primary); text-decoration: none; }
.accepted-note a:hover { text-decoration: underline; }

/* Rules Columns */
.rules-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 640px) { .rules-columns { grid-template-columns: 1fr 1fr; } }

.rules-col {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.rules-yes { border: 1px solid var(--color-check); }
.rules-yes h3 { color: var(--color-check); }
.rules-no { border: 1px solid var(--color-accent); }
.rules-no h3 { color: var(--color-accent); }

.rules-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.rules-col ul {
  list-style: disc;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rules-col li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Housing Page ── */
.prose p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.prose p:last-child { margin-bottom: 0; }

.prose-list {
  list-style: decimal;
  padding-left: var(--space-6);
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.prose-list li {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
}

/* Definition Cards */
.def-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
@media (min-width: 640px) { .def-cards { grid-template-columns: 1fr 1fr; } }

.def-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.def-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}
.def-badge.workforce {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
}
.def-badge.affordable {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-accent);
}

.def-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.def-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}
.def-card p:last-child { margin-bottom: 0; }

/* Stat Callout */
.stat-callout {
  display: flex;
  align-items: baseline;
  gap: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  flex-wrap: wrap;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.stat-label span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: block;
  margin-top: var(--space-1);
}

/* Inventory Grid */
.inventory-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.inventory-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.inventory-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.inventory-icon {
  width: 24px;
  height: 24px;
  color: var(--color-card-icon);
  flex-shrink: 0;
}

.inventory-header h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.inventory-status {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-left: auto;
}

.inventory-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}
.inventory-card p:last-child { margin-bottom: 0; }

.inventory-card ul {
  list-style: disc;
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.inventory-card li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.inventory-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.sub-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.sub-cat strong {
  font-size: var(--text-sm);
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-1);
}

.sub-cat p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: 0;
}

/* ── Fade-in ── */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
