/* Food nutrition pages: page-specific styles only (shared look lives in /site.css). */
.food .aka { margin-top: -.25rem; opacity: .8; font-size: .95rem; }
.food h2 { margin-top: 2rem; }
.food .note { font-size: .85rem; opacity: .75; margin-top: .5rem; }
.food .points { padding-left: 1.2rem; }
.food .points li { margin: .35rem 0; }
.food td, .food th { font-variant-numeric: tabular-nums; }
.food tr.group th { text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; opacity: .7; padding-top: .9rem; }
.food thead small { font-weight: 400; opacity: .75; }

/* Macro split bar: protein / carbs / fat share of calories */
.macro-split { margin: 1.25rem 0 0; }
.macro-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(127,127,127,.18); }
.macro-bar span { display: block; height: 100%; min-width: 2px; }
.mb-p { background: #7c5cff; }   /* protein: violet */
.mb-c { background: #e0b400; }   /* carbs: yellow */
.mb-f { background: #ff6b5a; }   /* fat: coral */
.macro-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0; margin: .55rem 0 .2rem; font-size: .9rem; }
.macro-legend li { display: flex; align-items: center; gap: .4rem; }
.macro-legend i { width: .75rem; height: .75rem; border-radius: 3px; display: inline-block; }
.macro-note { font-size: .8rem; opacity: .7; }

/* Index */
.food-jump { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 1rem 0 1.5rem; font-size: .95rem; }
.food-cat { scroll-margin-top: 5rem; }
.food-cat h2 small { font-weight: 400; opacity: .6; font-size: .8em; }
.food-cat .card-grid { list-style: none; padding: 0; }
.food-cat .card a { display: block; text-decoration: none; color: inherit; }
.food-cat .card b { display: block; }
.food-cat .card span { font-size: .85rem; opacity: .75; }

/* Ranked nutrient lists (/food/top/<nutrient>, scripts/food_top.py): diet filter works on radios + CSS, no JS needed */
.top-link { font-size: .95rem; margin: -.5rem 0 1.5rem; }
.toplist .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; }
.toplist .chips label { cursor: pointer; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; font-weight: 600; background: var(--card); min-height: 36px; display: inline-flex; align-items: center; gap: .35rem; }
.toplist .chips small { font-weight: 400; color: var(--muted-fg); }
#f-all:checked ~ .chips [for=f-all], #f-veg:checked ~ .chips [for=f-veg],
#f-ve:checked ~ .chips [for=f-ve], #f-nv:checked ~ .chips [for=f-nv] { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
#f-all:checked ~ .chips [for=f-all] small, #f-veg:checked ~ .chips [for=f-veg] small,
#f-ve:checked ~ .chips [for=f-ve] small, #f-nv:checked ~ .chips [for=f-nv] small { color: inherit; opacity: .8; }
#f-all:focus-visible ~ .chips [for=f-all], #f-veg:focus-visible ~ .chips [for=f-veg],
#f-ve:focus-visible ~ .chips [for=f-ve], #f-nv:focus-visible ~ .chips [for=f-nv] { outline: 2px solid var(--ring); outline-offset: 2px; }
#f-veg:checked ~ .table-wrap tr[data-d=egg], #f-veg:checked ~ .table-wrap tr[data-d=nv],
#f-ve:checked ~ .table-wrap tr[data-d=nv],
#f-nv:checked ~ .table-wrap tr[data-d=veg], #f-nv:checked ~ .table-wrap tr[data-d=egg] { display: none; }
.table.rank td small { color: var(--muted-fg); font-size: .78rem; }
.table.rank .rk { color: var(--muted-fg); font-weight: 700; }
.dt { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .05rem .4rem; border-radius: 4px; border: 1px solid currentColor; vertical-align: middle; white-space: nowrap; }
.dt-veg { color: var(--success); }
.dt-egg { color: var(--carbs); }
.dt-nv { color: var(--danger); }
.top-hub .card a { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: inherit; height: 100%; }
.top-hub .card span { font-size: .9rem; color: var(--muted-fg); }
