/* Can Cats Eat It? — vet-pamphlet-meets-friendly-cat design system */

:root {
  --paper: #faf9f6;
  --card: #ffffff;
  --ink: #22262e;
  --ink-soft: #5b616e;
  --line: #e5e2da;
  --brand: #e0643c;
  --brand-deep: #b84a28;
  --brand-soft: #fbe9e2;
  --safe-ink: #1e7a46;
  --safe-bg: #e5f4ea;
  --caution-ink: #8a5a08;
  --caution-bg: #fdf1d7;
  --danger-ink: #b3261e;
  --danger-bg: #fde8e6;
  --mascot-fur: #343a46;
  --mascot-fur-2: #262b35;
  --mascot-inner: #f2b8a2;
  --mascot-eye: #fdfdf9;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(34, 38, 46, 0.08);
  --font:
    ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181d;
    --card: #1e2129;
    --ink: #eceef2;
    --ink-soft: #a3a9b5;
    --line: #30343d;
    --brand: #f0764c;
    --brand-deep: #f79471;
    --brand-soft: #35251f;
    --safe-ink: #4cc47f;
    --safe-bg: #15301f;
    --caution-ink: #e5b567;
    --caution-bg: #322817;
    --danger-ink: #ff8f86;
    --danger-bg: #38201e;
    --mascot-fur: #48505f;
    --mascot-fur-2: #363d4a;
    --mascot-inner: #c98d78;
    --mascot-eye: #f4f4ee;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 0.9em;
}

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button {
  font: inherit;
}

[hidden] {
  display: none;
}

.recent-searches[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.skip-link:focus {
  left: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-deep);
  margin: 0 0 0.5em;
}

.text-link {
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.8rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
}

.brand-mark__head {
  fill: var(--mascot-fur);
}

.brand-mark__ear {
  fill: var(--mascot-fur-2);
}

.brand-mark__eye {
  fill: var(--paper);
}

.brand-mark__nose {
  fill: var(--brand);
}

.brand-mark__mouth,
.brand-mark__whisker {
  stroke: var(--paper);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
}

.brand-mark__whisker {
  stroke: var(--mascot-fur);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-header nav a:hover {
  color: var(--ink);
  background: var(--line);
}

.nav-emergency {
  color: var(--danger-ink) !important;
  background: var(--danger-bg);
  border: 1px solid transparent;
}

.nav-emergency:hover {
  background: var(--danger-bg) !important;
  border-color: var(--danger-ink);
}

/* Layout */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.section-rule {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 40px;
}

/* Hero */
.lookup {
  padding-top: 40px;
}

.lookup__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.lookup__intro h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  max-width: 14em;
}

.lookup__lede {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 34em;
}

.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}

.trust-line span {
  color: var(--safe-ink);
  font-weight: 800;
}

/* Mascot */
.lookup__mascot {
  justify-self: center;
  text-align: center;
}

.mascot {
  width: min(230px, 56vw);
  height: auto;
  overflow: visible;
}

.mascot-caption {
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
}

.m-body,
.m-head,
.m-paw {
  fill: var(--mascot-fur);
}

.m-ear-outer {
  fill: var(--mascot-fur-2);
}

.m-ear-inner {
  fill: var(--mascot-inner);
}

.m-eye-white {
  fill: var(--mascot-eye);
}

.m-pupil {
  fill: #1a1d24;
  transition: transform 0.25s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.m-glint {
  fill: #ffffff;
}

.m-lid {
  stroke: var(--mascot-fur-2);
  stroke-width: 3;
  opacity: 0;
}

.m-nose {
  fill: var(--brand);
}

.m-mouth,
.m-whiskers,
.m-brow {
  stroke: var(--mascot-fur-2);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.m-whiskers {
  stroke: var(--ink-soft);
  stroke-width: 1.8;
}

.m-brow {
  opacity: 0;
}

.m-tail {
  stroke: var(--mascot-fur);
  stroke-width: 14;
  stroke-linecap: round;
}

.m-ear {
  transition: transform 0.3s ease;
  transform-box: fill-box;
}

.m-ear--left {
  transform-origin: 80% 90%;
}

.m-ear--right {
  transform-origin: 20% 90%;
}

.m-head-group {
  transform-origin: 120px 120px;
  transition: transform 0.3s ease;
}

.m-eye {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease;
  animation: mascot-blink 6.5s infinite;
}

.m-eye--right {
  animation-delay: 0.12s;
}

.m-tail-group {
  transform-origin: 196px 176px;
  animation: mascot-tail 4.5s ease-in-out infinite;
}

[data-mascot-state="curious"] .m-head-group {
  transform: rotate(-6deg);
}

[data-mascot-state="curious"] .m-pupil {
  transform: scale(1.25);
}

[data-mascot-state="happy"] .m-eye {
  transform: scaleY(0.45);
  animation: none;
}

[data-mascot-state="happy"] .m-ear--left {
  transform: rotate(6deg);
}

[data-mascot-state="happy"] .m-ear--right {
  transform: rotate(-6deg);
}

[data-mascot-state="wary"] .m-ear--left {
  transform: rotate(-22deg);
}

[data-mascot-state="wary"] .m-ear--right {
  transform: rotate(22deg);
}

[data-mascot-state="wary"] .m-eye {
  transform: scaleY(0.62);
  animation: none;
}

[data-mascot-state="wary"] .m-pupil {
  transform: scaleX(0.5);
}

[data-mascot-state="wary"] .m-brow {
  opacity: 1;
}

[data-mascot-state="alarmed"] .m-ear--left {
  transform: rotate(-40deg) scaleY(0.85);
}

[data-mascot-state="alarmed"] .m-ear--right {
  transform: rotate(40deg) scaleY(0.85);
}

[data-mascot-state="alarmed"] .m-pupil {
  transform: scale(1.65);
}

[data-mascot-state="alarmed"] .m-brow {
  opacity: 1;
}

[data-mascot-state="alarmed"] .m-tail {
  stroke-width: 20;
}

[data-mascot-state="alarmed"] .m-tail-group {
  animation-duration: 1.1s;
}

.mascot.is-reacting .m-head-group {
  animation: mascot-pop 0.45s ease;
}

@keyframes mascot-blink {
  0%,
  91%,
  100% {
    transform: scaleY(1);
  }
  93%,
  95% {
    transform: scaleY(0.08);
  }
}

@keyframes mascot-tail {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(14deg);
  }
}

@keyframes mascot-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

/* Search */
.search-workbench {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.search-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.combobox {
  position: relative;
  flex: 1;
}

.combobox input {
  width: 100%;
  font: inherit;
  font-size: 1.12rem;
  padding: 14px 44px 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.combobox input:focus {
  outline: none;
  border-color: var(--brand);
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: var(--line);
  color: var(--ink-soft);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.search-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 0 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.search-button:hover {
  background: var(--brand-deep);
}

.search-button:active {
  transform: scale(0.97);
}

.search-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
}

.search-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  max-height: 330px;
  overflow: auto;
}

.suggestion-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.suggestion-button:hover,
.suggestion-button[aria-selected="true"] {
  background: var(--brand-soft);
}

.suggestion-button > span:first-child {
  display: flex;
  flex-direction: column;
}

.suggestion-button small {
  color: var(--ink-soft);
  text-transform: capitalize;
}

.suggestion-verdict {
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
}

.suggestion-verdict[data-verdict="safe"],
.status-word[data-verdict="safe"] {
  color: var(--safe-ink);
  background: var(--safe-bg);
}

.suggestion-verdict[data-verdict="caution"],
.status-word[data-verdict="caution"] {
  color: var(--caution-ink);
  background: var(--caution-bg);
}

.suggestion-verdict[data-verdict="danger"],
.status-word[data-verdict="danger"] {
  color: var(--danger-ink);
  background: var(--danger-bg);
}

.quick-searches,
.recent-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-searches > span,
.recent-searches > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-searches a,
.recent-searches a {
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.quick-searches a:hover,
.recent-searches a:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.recent-clear {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}

.data-status {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 12px 2px;
}

/* Result */
.result-region {
  margin-top: 10px;
  outline: none;
}

.result-region.has-result [data-result-idle] {
  display: none;
}

.result-idle {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.result-idle__key {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-idle__key li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.result-idle__key small {
  display: block;
  color: var(--ink-soft);
}

.state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  flex: none;
}

.state-icon--safe {
  color: var(--safe-ink);
  background: var(--safe-bg);
}

.state-icon--caution {
  color: var(--caution-ink);
  background: var(--caution-bg);
}

.state-icon--danger {
  color: var(--danger-ink);
  background: var(--danger-bg);
}

.result-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.result-sheet.is-entering {
  animation: result-enter 0.35s ease;
}

@keyframes result-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.verdict-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
}

.result-sheet[data-verdict="safe"] .verdict-bar {
  background: var(--safe-bg);
  color: var(--safe-ink);
}

.result-sheet[data-verdict="caution"] .verdict-bar {
  background: var(--caution-bg);
  color: var(--caution-ink);
}

.result-sheet[data-verdict="danger"] .verdict-bar {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.verdict-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  font-size: 1.5rem;
  font-weight: 900;
  flex: none;
}

.verdict-bar p {
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.verdict-bar strong {
  font-size: 1.16rem;
  letter-spacing: -0.01em;
}

.verdict-bar small {
  opacity: 0.85;
  font-weight: 600;
}

.share-button {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.share-button:active {
  transform: scale(0.96);
}

.share-button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
}

.result-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-heading h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  margin-bottom: 0.35em;
}

.result-emoji {
  font-size: 0.9em;
}

.result-summary {
  font-size: 1.05rem;
  max-width: 60em;
  margin-bottom: 0.4em;
}

.review-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.answer-grid > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.answer-grid h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-bottom: 0.7em;
}

.answer-grid p,
.answer-grid ul {
  margin: 0;
  font-size: 0.95rem;
}

.answer-grid ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emergency-callout {
  border: 1.5px solid var(--danger-ink);
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.emergency-callout p {
  margin: 0 0 10px;
  color: var(--ink);
}

.emergency-callout strong {
  color: var(--danger-ink);
}

.hotline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hotline {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--card);
  border: 1.5px solid var(--danger-ink);
  color: var(--danger-ink);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  line-height: 1.3;
  transition: transform 0.15s ease;
}

.hotline:hover {
  transform: translateY(-1px);
}

.hotline strong {
  font-size: 0.82rem;
}

.hotline span {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hotline small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.emergency-open {
  font-weight: 700;
}

.already-ate {
  background: var(--brand-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.already-ate h3 {
  margin-bottom: 0.4em;
  font-size: 1rem;
}

.already-ate p {
  margin: 0;
  font-size: 0.95rem;
}

.sources-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.sources-panel summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}

.sources-panel ol {
  margin: 12px 0 4px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sources-panel small {
  display: block;
  color: var(--ink-soft);
}

.related-foods {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.related-foods strong {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.related-foods a {
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.related-foods a:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.no-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.no-result__worried {
  margin-top: 14px;
  color: var(--ink-soft);
}

.noscript-note {
  background: var(--caution-bg);
  color: var(--caution-ink);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* Emergency strip */
.emergency-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
}

.emergency-strip h2 {
  font-size: 1.6rem;
}

.emergency-strip p {
  color: var(--ink-soft);
}

.emergency-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Popular */
.popular > div p {
  color: var(--ink-soft);
  max-width: 46em;
}

.food-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin: 20px 0 16px;
}

.food-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.food-links a:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.food-links small {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Method + FAQ */
.method-preview ol {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.method-preview li {
  display: flex;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.method-preview li > span {
  font-weight: 900;
  color: var(--brand);
  font-size: 1.3rem;
}

.method-preview p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.faq > div {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  background: var(--card);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 8px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-inner > div {
  max-width: 34em;
}

.footer-inner p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-inner nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.footer-inner nav a:hover {
  color: var(--brand-deep);
}

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px 26px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

/* Dialogs */
.legal-dialog,
.emergency-dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink);
  max-width: 640px;
  width: calc(100vw - 40px);
  max-height: 82vh;
  padding: 0;
  box-shadow: var(--shadow);
}

.legal-dialog::backdrop,
.emergency-dialog::backdrop {
  background: rgba(20, 22, 27, 0.55);
}

.legal-dialog__header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.legal-dialog__header h2 {
  margin: 0;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  flex: none;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

.legal-dialog__body {
  padding: 16px 24px 24px;
  overflow: auto;
}

.emergency-dialog .legal-dialog__header {
  border-bottom-color: var(--danger-ink);
}

.emergency-dialog .eyebrow {
  color: var(--danger-ink);
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Prose / info pages */
.prose h3 {
  margin-top: 1.4em;
}

.info-main {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 32px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  font-weight: 700;
}

.info-article h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.info-deck {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 40em;
}

.info-article h2 {
  margin-top: 1.6em;
  font-size: 1.25rem;
}

.info-article ul,
.info-article ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-register {
  list-style: decimal;
}

.source-register li {
  margin-bottom: 10px;
}

.source-register strong {
  display: block;
  font-size: 0.85rem;
}

.source-register p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.emergency-page .hotline-row {
  margin: 8px 0 20px;
}

.not-found {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 48px;
  text-align: center;
}

.error-code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 900;
  color: var(--brand-soft);
  display: block;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  .error-code {
    color: var(--line);
  }
}

/* Scan */
.scan-main {
  max-width: 920px;
  padding-top: 40px;
}

.scan-workbench {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow);
}

.scan-intro {
  max-width: 44rem;
}

.scan-intro h1 {
  font-size: clamp(1.9rem, 4.8vw, 3.1rem);
  max-width: 12em;
}

.scan-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 42rem;
}

.scan-form {
  margin-top: 28px;
}

.scan-form > label,
.scan-device label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.scan-entry-row input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.scan-entry-row input:focus-visible,
.scan-device select:focus-visible,
.scan-action:focus-visible,
.scan-upload:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand) 32%, transparent);
  outline-offset: 2px;
}

.scan-actions {
  display: flex;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.scan-action,
.scan-upload {
  display: inline-flex;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.scan-action:hover,
.scan-upload:hover {
  border-color: var(--brand);
}

.scan-action--primary {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
}

.scan-upload {
  position: relative;
  overflow: hidden;
}

.scan-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.scan-privacy,
.scan-camera__instruction {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.scan-camera {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.scan-camera__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #15171d;
  aspect-ratio: 4 / 3;
}

.scan-camera__viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-camera__guide {
  position: absolute;
  inset: 28% 9%;
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgb(0 0 0 / 38%);
  pointer-events: none;
}

.scan-device {
  max-width: 420px;
  margin-top: 18px;
}

.scan-device select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.scan-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--danger-ink);
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--ink);
  font-weight: 700;
}

.scan-result,
.scan-scope {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
}

.scan-result h2,
.scan-scope h2 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.scan-result__body,
.scan-scope__copy {
  min-width: 0;
}

.scan-result__body > :first-child,
.scan-scope__copy > :first-child {
  margin-top: 0;
}

[data-product-result],
[data-product-error],
.product-empty {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}

[data-product-result] h3,
[data-product-error] h3 {
  margin-bottom: 12px;
}

.product-result > header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.product-result > header p {
  margin: 5px 0 0;
}

.product-gtin {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-warning,
.product-ingredients {
  margin-top: 18px;
  padding: 16px;
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--paper) 82%, var(--card));
}

.product-warning--found {
  border-left-color: var(--danger-ink);
  background: var(--danger-bg);
}

.product-warning--clear {
  border-left-color: var(--safe-ink);
  background: var(--safe-bg);
}

.product-warning--missing {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

.product-warning h3,
.product-ingredients h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.product-warning p,
.product-ingredients p {
  margin: 8px 0 0;
}

.product-warning ul {
  margin: 10px 0;
  padding-left: 20px;
}

.product-warning code {
  font-weight: 800;
}

.product-source,
.product-assurance,
.product-disclaimer {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.product-disclaimer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

/* Directory */
.directory-tools {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
}

.directory-tools label {
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.directory-filter {
  display: flex;
  gap: 8px;
}

.directory-filter input {
  flex: 1;
  font: inherit;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.directory-filter input:focus {
  outline: none;
  border-color: var(--brand);
}

.directory-filter button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  cursor: pointer;
}

.directory-verdicts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.directory-verdicts button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.directory-verdicts button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.directory-status {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.directory-letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.directory-letter-nav a {
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  color: var(--ink-soft);
}

.directory-letter-nav a:hover {
  border-color: var(--brand);
  color: var(--ink);
}

.directory-group {
  margin: 22px 0;
}

.directory-group__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.directory-group__heading small {
  color: var(--ink-soft);
  font-weight: 600;
}

.directory-group__links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.directory-group__links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.directory-group__links a:hover {
  border-color: var(--brand);
}

.directory-group__links small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-transform: capitalize;
}

.status-word {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Motion + responsive */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .m-tail-group,
  .m-eye,
  .mascot.is-reacting .m-head-group,
  .result-sheet.is-entering {
    animation: none;
  }

  .m-ear,
  .m-head-group,
  .m-pupil,
  .m-eye,
  .search-button,
  .hotline,
  .food-links a,
  .quick-searches a,
  .recent-searches a,
  .related-foods a {
    transition: none;
  }
}

@media (max-width: 900px) {
  .lookup__hero {
    grid-template-columns: 1fr;
  }

  .lookup__mascot {
    order: -1;
  }

  .mascot {
    width: min(170px, 44vw);
  }

  .emergency-strip {
    grid-template-columns: 1fr;
  }

  .result-idle {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .search-row {
    flex-direction: column;
  }

  .search-button {
    padding: 13px 22px;
    justify-content: center;
  }

  .verdict-bar {
    flex-wrap: wrap;
  }

  .share-button {
    margin-left: 0;
  }

  .header-inner {
    padding: 10px 14px;
  }

  main {
    padding: 0 14px 56px;
  }

  .scan-main {
    padding-top: 28px;
  }

  .scan-workbench {
    padding: 20px 16px;
    border-left-width: 4px;
  }

  .scan-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scan-action,
  .scan-upload {
    width: 100%;
  }

  .scan-result,
  .scan-scope {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 380px) {
  .lookup {
    padding-top: 24px;
  }

  .lookup__hero {
    gap: 12px;
    margin-bottom: 16px;
  }

  .mascot {
    width: 96px;
  }

  .mascot-caption {
    margin-top: 0;
    padding: 3px 8px;
    font-size: 0.78rem;
  }

  .brand small {
    display: none;
  }

  .site-header nav a {
    padding: 7px 7px;
    font-size: 0.85rem;
  }

  .site-header nav {
    gap: 4px;
  }

  .verdict-symbol {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .result-body {
    padding: 16px;
  }

  .hotline {
    width: 100%;
  }
}

/* Print */
@media print {
  .site-header,
  .search-workbench,
  .quick-searches,
  .recent-searches,
  .emergency-strip,
  .popular,
  .method-preview,
  .faq,
  .site-footer,
  .share-button {
    display: none;
  }

  .scan-actions,
  .scan-camera {
    display: none;
  }

  .sources-panel {
    border: none;
  }
}
