/* ParrotPal Label: the light, plain-reading world for parrotpal.com's food and protein guides.
   Built from the UK food label people already read: black ink on white, ruled panels, per-portion tiles,
   protein as the big number in ParrotPal green. Made for older eyes: body text 19px and nothing a visitor reads under 16px (sizes cluster at 16 / 19 / 23 plus display),
   near-black text only (no grey reading copy), state shown by a mark as well as a colour.
   Shared by every label page; page-only styles stay in the page. */
:root {
  --paper: #ffffff;
  --ink: #111111;          /* all reading text */
  --ink-2: #333333;        /* secondary text, still 12.6:1 on white */
  --rule: #111111;         /* label rules */
  --rule-soft: #d9d9d4;    /* row dividers inside a panel */
  --tint: #f3f4f0;         /* table heads, quiet panels */
  --green: #047857;        /* protein and the one next step (5.9:1 with white text) */
  --green-ink: #065f46;    /* green text on white (7.6:1) */
  --green-tint: #e7f5ef;
  --focus: #1d4ed8;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --col: 720px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 19px; line-height: 1.6; -webkit-font-smoothing: antialiased; caret-color: var(--green); }
::selection { background: #bfe8d6; color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: var(--green-ink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
svg { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }
.col { max-width: var(--col); margin: 0 auto; padding: 0 20px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--rule); }
.bar .col { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 23px; }
.brand img { width: 32px; height: 32px; }
.btn-line { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 8px; font-size: 19px; line-height: 1.25; text-align: center; font-weight: 800; color: var(--ink); text-decoration: none; background: var(--paper); }
.btn-line:hover { background: var(--tint); color: var(--ink); }
.btn-line svg, .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* headings and reading text */
.page { padding: 34px 0 20px; }
h1 { font-size: clamp(34px, 8.6vw, 54px); font-weight: 800; line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(27px, 6.6vw, 36px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; margin: 56px 0 14px; }
h3 { font-size: 23px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; margin: 30px 0 8px; }
p { margin: 0 0 18px; max-width: 64ch; text-wrap: pretty; }
.lede { font-size: 23px; line-height: 1.5; margin-top: 16px; }
.meta { font-size: 19px; color: var(--ink-2); margin-top: 10px; }
ul.plain { margin: 0 0 18px; padding-left: 1.2em; }
ul.plain li { margin: 0 0 10px; }
.note { font-size: 19px; color: var(--ink-2); line-height: 1.55; }

/* the one primary action per screen */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 20px; border-radius: 10px; background: var(--green); color: #fff; font-size: 23px; line-height: 1.25; text-align: center; font-weight: 800; text-decoration: none; border: 2px solid var(--green); }
.btn:hover { background: #036149; color: #fff; }
.btn-line.wide { display: flex; justify-content: center; width: 100%; min-height: 56px; margin-top: 12px; }

/* the label panel: the world's signature component */
.label { border: 2px solid var(--rule); border-radius: 6px; margin: 22px 0; background: var(--paper); break-inside: avoid; }
.label-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 3px 3px 0 0; }
.label-head h3 { margin: 0; color: #fff; font-size: 24px; }
.label-head span { font-size: 19px; font-weight: 700; color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 2px solid var(--rule); }
.tile { padding: 10px 6px 12px; text-align: center; border-right: 2px solid var(--rule); }
.tile:last-child { border-right: 0; }
.tile small { display: block; font-size: 16px; font-weight: 700; line-height: 1.2; }
.tile b { display: block; margin-top: 4px; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile em { display: block; margin-top: 2px; font-size: 16px; font-style: normal; font-weight: 600; }
.tile.total { background: var(--green); color: #fff; }
.rows { list-style: none; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 14px 16px; border-bottom: 1px solid var(--rule-soft); }
.row:last-child { border-bottom: 0; }
.row .slot { grid-column: 1 / -1; font-size: 16px; font-weight: 800; text-transform: none; }
.row .food { font-size: 19px; line-height: 1.45; }
.row .g { font-size: 23px; font-weight: 800; color: var(--green-ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .swap { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
.swap { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 8px; font-size: 16px; font-weight: 800; background: var(--paper); }
.swap:hover, .swap[aria-expanded="true"] { background: var(--tint); }
.swap svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.options { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 10px; }

/* ONE chosen-state grammar for every pressable choice on every label page (sort, filter, units, swaps, answers):
   at rest a 2px ink border and an empty ring; chosen = green tint + green border + a white tick in a green circle.
   Never a black fill, never colour alone. Markup: <button class="chip" aria-pressed="false"><span class="tick">TICK</span>Label</button>
   (.option is the full-width row version; a <label class="chip"> wrapping a radio/checkbox works the same way). */
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px 8px 10px; border: 2px solid var(--ink); border-radius: 8px; font-size: 19px; font-weight: 800; line-height: 1.25; text-align: left; color: var(--ink); background: var(--paper); }
.option { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; min-height: 56px; padding: 10px 14px; text-align: left; border: 2px solid var(--ink); border-radius: 8px; font-size: 19px; line-height: 1.35; background: var(--paper); }
.chip:hover, .option:hover { background: var(--tint); }
.chip[aria-pressed="true"], .option[aria-pressed="true"], .chip:has(input:checked) { border-color: var(--green); background: var(--green-tint); color: var(--ink); }
.tick { flex: none; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: var(--paper); }
.tick svg { width: 15px; height: 15px; opacity: 0; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
[aria-pressed="true"] > .tick, .chip:has(input:checked) > .tick { background: var(--green); border-color: var(--green); }
[aria-pressed="true"] > .tick svg, .chip:has(input:checked) > .tick svg { opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option b { font-weight: 800; color: var(--green-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.label-foot { max-width: none; margin: 0; padding: 12px 16px; border-top: 2px solid var(--rule); font-size: 19px; color: var(--ink-2); }

/* ruled table, like the back of a pack */
table.ruled { width: 100%; border-collapse: collapse; margin: 16px 0 10px; border: 2px solid var(--rule); font-variant-numeric: tabular-nums; }
table.ruled caption { caption-side: top; text-align: left; font-size: 19px; font-weight: 800; padding-bottom: 8px; }
table.ruled th, table.ruled td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: top; font-size: 19px; }
table.ruled thead th { background: var(--ink); color: #fff; font-size: 16px; }
table.ruled td.num, table.ruled th.num { text-align: right; white-space: nowrap; width: 1%; }
table.ruled td.num { font-weight: 800; }
table.ruled tr:last-child td { border-bottom: 0; }

/* jump links */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.jump a { display: inline-grid; place-items: center; min-width: 56px; min-height: 48px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 8px; font-size: 19px; font-weight: 800; color: var(--ink); text-decoration: none; }
.jump a:hover { background: var(--tint); }

/* hand-off panel */
.next { margin: 40px 0; padding: 24px 20px; border: 2px solid var(--rule); border-radius: 6px; background: var(--green-tint); }
.next h2 { margin-top: 0; }

/* questions */
.faq { border-top: 2px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: 23px; font-weight: 800; line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 6px; }

.small { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.foot { margin-top: 40px; padding: 18px 20px; border: 2px solid var(--rule); border-radius: 6px; font-size: 16px; line-height: 1.6; }
.foot p { margin-bottom: 10px; max-width: none; }
.foot p:last-child { margin-bottom: 0; }

.site-foot { margin-top: 50px; padding: 30px 0 40px; border-top: 2px solid var(--rule); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0; }
.site-foot nav a { font-size: 19px; font-weight: 700; color: var(--ink); }
.site-foot .legal { font-size: 16px; color: var(--ink-2); line-height: 1.55; }

@media (max-width: 560px) {
  table.ruled th, table.ruled td { padding: 12px 10px; }
  table.ruled thead th { font-size: 16px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { border-bottom: 2px solid var(--rule); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile.total { grid-column: 1 / -1; border-bottom: 0; }
  .tile.total b { font-size: 34px; }
}
@media print {
  .label-head { background: #fff !important; color: #111 !important; border-bottom: 2px solid #111; }
  .label-head h3, .label-head span { color: #111 !important; }
  .bar, .no-print, .swap, .options, .jump, .next, .faq, .site-foot, .btn, .btn-line, .chip, .chips { display: none !important; }
  h2:has(+ .faq) { display: none !important; }
  .row { padding: 6px 12px; }
  .tile { padding: 4px 4px 6px; }
  body { font-size: 12pt; }
  .page { padding-top: 0; }
  h2 { margin-top: 20px; }
  .label { margin: 10px 0; }
  table.ruled thead th { background: #fff !important; color: #111 !important; border-bottom: 2px solid #111; }
  .tile.total { background: #fff !important; color: #111 !important; outline: 3px solid #111; outline-offset: -3px; }
  a { color: #111; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
