/* kibi.dog: direction C (chocolate, red, cream). Same tokens as design/system/tokens.json.
   Red = brand and action, never alert; alerts are amber. No blue. */

@font-face {
  font-family: "Bagel Fat One";
  src: url("/assets/bagel-fat-one-latin.f9063685d9.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/assets/caveat-bold-latin.dc794d3499.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F8EFE3;
  --surface: #FFFAF3;
  --surface-2: #F0E3D2;
  --separator: #E6D6C2;
  --border: #9C8573;
  --text: #33201A;
  --text-2: #6B5246;
  --brand: #D8352B;
  --primary: #C62A22;
  --primary-edge: #A3211B;
  --on-primary: #FFF6EC;
  --primary-text: #A8221B;
  --primary-soft: #F8DCD3;
  --note: #8E3F2B;
  --done: #3A6B4A;
  --done-bg: #DDEBDD;
  --alert: #8A4A00;
  --alert-bg: #FBE3B5;
  --hero-red: #C62A22;
  --hero-choc: #33201A;
  --cream: #FFF6EC;
  --cream-soft: #FFD9C9;
  --honey: rgba(242, 184, 75, .30);
  --radius-card: 26px;
  --radius-tile: 14px;
  --display: "Bagel Fat One", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2C1C15;
    --surface: #3A271E;
    --surface-2: #4A3428;
    --separator: #5A4134;
    --border: #A08A78;
    --text: #F6EBDD;
    --text-2: #D6C4B3;
    --brand: #FF6A5C;
    --primary: #F25A4F;
    --primary-edge: #C9443A;
    --on-primary: #2A140E;
    --primary-text: #FF8E82;
    --primary-soft: #4E2A22;
    --note: #FFB8A8;
    --done: #9DD3AE;
    --done-bg: #24382A;
    --alert: #FFC56B;
    --alert-bg: #4A3310;
    --hero-red: #7E241C;
    --hero-choc: #160D09;
    --honey: rgba(242, 184, 75, .20);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--sans);
  overflow-wrap: break-word;
}
img, svg, picture { max-width: 100%; height: auto; }
picture { display: block; }
a { color: var(--primary-text); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--primary-text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font: 700 1.375rem/1.25 var(--rounded); margin-top: 1.8em; }
h3 { font: 700 1.125rem/1.3 var(--rounded); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }

.display { font-family: var(--display); font-weight: 400; letter-spacing: .005em; line-height: 1.08; }
h1.display { font-size: clamp(2.1rem, 7vw, 3.2rem); margin-bottom: .35em; }
h2.display { font-size: clamp(1.6rem, 5vw, 2.1rem); }
.brand { color: var(--brand); }
.hand { font-family: var(--hand); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--note); transform: rotate(-4deg); display: inline-block; margin: .6em 0 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; padding: 10px 16px; background: var(--surface); color: var(--text); border-radius: 12px; z-index: 10; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1060px; }
.center { text-align: center; }

/* Header */
.site-header { background: var(--bg); border-bottom: 2px dashed color-mix(in srgb, var(--text) 14%, transparent); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1060px; margin: 0 auto; padding: 12px 16px 4px; }
.brand { color: var(--brand); display: inline-flex; }
.wordmark { height: 34px; width: auto; display: block; }
.nav { max-width: 1060px; margin: 0 auto; padding: 0 10px 8px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.nav li { margin: 0; }
.nav a { display: inline-block; padding: 8px 8px; min-height: 44px; line-height: 28px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: 12px; }
.nav a:hover { background: var(--surface-2); }
@media (max-width: 440px) {
  .nav { padding: 0 8px 6px; }
  .nav ul { gap: 0; }
  .nav a { padding: 8px 5px; font-size: .9rem; }
}
.nav a[aria-current="page"] { color: var(--primary-text); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border-radius: 999px; font: 700 1.0625rem/1.2 var(--sans); text-decoration: none; text-align: center; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: inset 0 -2px 0 var(--primary-edge); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-on-color { background: var(--cream); color: #A8221B; box-shadow: inset 0 -2px 0 #E9CDB4; }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: .95rem; background: var(--primary); color: var(--on-primary); }
.btn-glyph { width: 22px; height: 22px; flex: none; }
.btn-lang { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); min-width: 240px; }

/* Landing */
.hero { color: var(--cream); padding: 28px 0 40px; }
.hero-red { background: var(--hero-red); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: end; max-width: 1060px; }
.hero h1 { color: var(--cream); }
.hero p { font-size: 1.125rem; }
.hero .hand { color: var(--cream-soft); }
.hero-plan { font-size: .95rem !important; color: var(--cream); margin-top: .9em; }
.hero-pose { width: 150px; justify-self: end; margin-top: -12px; }
@media (min-width: 760px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner { grid-template-columns: 1.6fr 1fr; gap: 32px; }
  .hero-pose { width: 260px; justify-self: center; }
}
.features { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 28px 0; }
@media (min-width: 700px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature, .card { background: var(--surface); border-radius: var(--radius-card); padding: 16px 18px; }
.feature h3 { margin-top: .2em; }
.feature ul { padding-left: 1.1em; margin: 0; }
.feature p:last-child { margin-bottom: 0; }
.card-icon { width: 46px; height: 46px; border-radius: 15px; background: var(--primary-soft); padding: 6px; margin-bottom: 8px; }
.card-icon img { width: 34px; height: 34px; display: block; }
.where { background: var(--honey); border-radius: var(--radius-card); padding: 16px 18px; }
.where h2 { margin-top: 0; }
.where p { margin: 0; }
.docs-teaser { margin: 40px 0 24px; }

/* Docs */
.page-head { margin: 28px 0 16px; }
.lead { font-size: 1.15rem; color: var(--text-2); }
.kicker { font-weight: 700; font-size: .95rem; color: var(--primary-text); margin: 0 0 .3em; display: block; }
.crumb { margin: 18px 0 0; font-size: .95rem; }
.doc-grid { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 24px; }
@media (min-width: 560px) { .doc-grid { grid-template-columns: 1fr 1fr; } }
.doc-grid li, .doc-list li { margin: 0; }
.doc-card { display: block; height: 100%; background: var(--surface); border-radius: var(--radius-card); padding: 14px 16px 16px; color: var(--text); text-decoration: none; }
.doc-card:hover { box-shadow: 0 0 0 2px var(--separator); }
.doc-card .doc-title { display: block; font: 700 1.1rem/1.3 var(--rounded); }
.doc-card .doc-sub { display: block; color: var(--text-2); font-size: .97rem; margin-top: .25em; }
.doc-art { margin: -4px -6px 10px; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.doc-art img { width: 100%; display: block; }
.doc-list { list-style: none; padding: 0; margin: 0 0 24px; background: var(--surface); border-radius: var(--radius-card); }
.doc-list li + li { border-top: 2px dashed color-mix(in srgb, var(--text) 14%, transparent); }
.doc-row { display: flex; gap: 12px; align-items: center; background: none; border-radius: 0; padding: 12px 16px; }
.doc-row:hover { box-shadow: none; background: var(--surface-2); }
.row-icon { flex: none; width: 52px; height: 52px; border-radius: 15px; background: var(--primary-soft); padding: 6px; }
.row-icon img { width: 40px; height: 40px; display: block; }

.need { background: var(--surface); border-radius: var(--radius-card); padding: 14px 18px; margin-bottom: 16px; }
.need h2 { margin: 0 0 .3em; font-size: 1.05rem; color: var(--primary-text); }
.need ul { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step { margin: 0; background: var(--surface); border-radius: var(--radius-card); overflow: hidden; }
.step-art { background: var(--surface-2); }
.step-art img { width: 100%; max-height: 260px; object-fit: contain; display: block; margin: 0 auto; }
.step-text { display: flex; gap: 12px; padding: 14px 16px 16px; align-items: flex-start; }
.step-text p { margin: 0; }
.step-num, .numbered > li::before {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--cream); font: 400 1.35rem/1 var(--display); transform: rotate(-6deg);
}
.numbered { list-style: none; padding: 0; counter-reset: n; display: grid; gap: 8px; }
.numbered > li { counter-increment: n; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 22px; padding: 12px 14px; margin: 0; }
.numbered > li::before { content: counter(n); }
@media (prefers-color-scheme: dark) { .step-num, .numbered > li::before { color: #2A140E; } }

.vet-box { background: var(--alert-bg); box-shadow: inset 0 0 0 2px var(--alert); border-radius: 22px; padding: 14px 18px; margin: 18px 0; }
.vet-box h2, .vet-box h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 .4em; font-size: 1.15rem; color: var(--text); }
.vet-box ul { margin: 0; }
.vet-box .warn { width: 24px; height: 24px; color: var(--alert); flex: none; }

.sheet-head { display: flex; gap: 16px; align-items: center; }
.sheet-head h1 { margin: 0; }
.sheet-icon { flex: none; width: 84px; height: 84px; border-radius: 24px; background: var(--primary-soft); padding: 12px; transform: rotate(-3deg); }
.sheet-icon img { width: 60px; height: 60px; display: block; }
.signs { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .signs { grid-template-columns: 1fr 1fr; } }
.signs li { background: var(--surface); border-radius: 22px; padding: 12px 14px; margin: 0; font-weight: 600; }
.dash { display: block; width: 26px; height: 5px; border-radius: 3px; background: var(--brand); transform: rotate(-4deg); margin-bottom: 8px; }
.spread { list-style: none; padding: 0; margin: 0 0 .6em; }
.spread li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread-label { font-weight: 700; }
.chip { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: .95rem; background: var(--surface-2); }
.chip-yes { background: var(--alert-bg); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--alert) 55%, transparent); }
.chip-no { background: var(--done-bg); color: var(--done); }
.checks { list-style: none; padding: 14px 18px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--done); font-weight: 800; }
.general { margin-top: 32px; }

.food-cat h2 { display: flex; gap: 10px; align-items: center; }
.cat-glyph { width: 26px; height: 26px; flex: none; }
.food-cat-safe .cat-glyph { color: var(--done); }
.food-cat-caution .cat-glyph { color: var(--alert); }
.food-cat-toxic .cat-glyph { color: var(--text); }
.food-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 620px) { .food-list { grid-template-columns: 1fr 1fr; } }
.food { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 22px; padding: 12px 14px; margin: 0; }
.food h3 { margin: 0 0 .15em; font-size: 1.05rem; }
.food p { margin: 0; font-size: .97rem; }
.food .how { color: var(--text-2); margin-top: .3em; }
.food-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); padding: 4px; }
.food-toxic .food-icon { background: var(--alert-bg); }
.food-icon img { width: 40px; height: 40px; display: block; }
.note { margin-top: 18px; }

.sources { margin-top: 28px; font-size: .95rem; color: var(--text-2); }
.sources h2 { font-size: 1.05rem; margin-top: 0; color: var(--text); }
.sources ol { padding-left: 1.4em; }
.src-meta { color: var(--text-2); }
.disclaimer { font-weight: 600; color: var(--text); }
.source-list { padding-left: 1.6em; }
.source-list li { margin: .7em 0; }
.source-list .src-meta { display: block; font-size: .92rem; }

.cta { display: grid; grid-template-columns: 1fr; gap: 4px; background: var(--hero-choc); color: var(--cream); border-radius: 28px; padding: 22px 20px; margin: 36px 0 12px; }
.cta h2 { color: var(--cream); margin: 0 0 .3em; }
.cta p { color: var(--cream); }
.cta .cta-small { font-size: .92rem; color: #D6C4B3; margin: .8em 0 0; }
.cta-pose { width: 110px; }
@media (min-width: 620px) { .cta { grid-template-columns: 140px 1fr; gap: 20px; align-items: center; padding: 28px; } .cta-pose { width: 140px; } }

/* Legal and support */
.legal h1 { margin-top: 28px; }
.legal h2 { font-size: 1.25rem; }
.legal .summary h2 { margin-top: 0; }
.legal .summary { background: var(--surface); border-radius: var(--radius-card); padding: 16px 18px; }
.legal .summary ul { margin-bottom: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--separator); }
.legal th { background: var(--surface-2); }
.legal .updated { color: var(--text-2); }
.faq details { background: var(--surface); border-radius: 22px; padding: 4px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 44px; }
.faq details[open] summary { color: var(--primary-text); }
.placeholder { background: var(--alert-bg); padding: 0 4px; border-radius: 4px; }

/* Footer */
.site-footer { margin-top: 48px; padding: 24px 0 40px; border-top: 2px dashed color-mix(in srgb, var(--text) 14%, transparent); color: var(--text-2); font-size: .95rem; }
.footer-nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer-nav a, .lang a { display: inline-block; padding: 8px 0; min-height: 44px; line-height: 28px; }
.lang { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: center; margin-bottom: 8px; }
.lang-label { font-weight: 700; }
.lang a[aria-current="true"] { color: var(--text); font-weight: 700; text-decoration: none; }
.fine { font-size: .9rem; color: var(--text-2); }

/* Root and 404 */
.root, .notfound { padding-top: 48px; padding-bottom: 48px; }
.root .wordmark, .notfound .wordmark { height: 48px; margin: 0 auto 8px; color: var(--brand); }
.root-pose { width: 150px; margin: 0 auto; }
.lang-list { list-style: none; padding: 0; display: grid; gap: 12px; justify-content: center; margin-top: 20px; }
.notfound section { margin: 24px 0; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
