@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --green: #006a4e;
  --black: #000000;
  --red: #eb0001;
  --pink-red: #ea0039;
  /* Lighter red text remains readable on dark green brand sections. */
  --red-soft: #ffd0d5;
  --red-focus: #ff9faa;
  --navy: #000066;
  --paper: #fff;
  --line: #dedbd5;
  --muted: #565664;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font: 400 16px/1.7 Poppins, Arial, sans-serif;
}
a { color: var(--green); }
a:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.resource-header, .resource-main, .resource-footer {
  width: min(100% - 40px, 860px);
  margin-inline: auto;
}
.resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}
.resource-brand img { display: block; width: 164px; height: auto; }
.resource-home {
  font-size: 13px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.resource-main { padding-block: 64px 84px; }
.resource-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { max-width: 780px; margin: 0; font-size: clamp(36px, 7vw, 60px); letter-spacing: -.055em; }
.resource-deck { max-width: 720px; margin: 22px 0 34px; color: var(--muted); font-size: 18px; }
.resource-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 38px; }
.resource-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.resource-content { max-width: 720px; }
.resource-content h2 { margin: 42px 0 12px; font-size: clamp(23px, 4vw, 30px); letter-spacing: -.035em; }
.resource-content h2.resource-step-heading { display: flex; align-items: flex-start; gap: 12px; }
.resource-step-icon { width: 22px; height: 22px; margin-top: 5px; flex: none; fill: none; stroke: var(--green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.resource-content h3 { margin: 28px 0 8px; font-size: 19px; }
.resource-content p, .resource-content li { color: #32323c; }
/* Logical sides so lists and callouts mirror in right-to-left languages (Arabic). */
.resource-content ul, .resource-content ol { padding-inline-start: 24px; }
.resource-content li { margin: 0 0 10px; padding-inline-start: 4px; }
/* Brand update: replace yellow accents in guide callouts and the cookie panel with Kitchnow red. */
.resource-callout { margin: 32px 0; padding: 20px 22px; border-inline-start: 5px solid var(--red); background: #fff; }
.resource-callout p { margin: 0; }
.resource-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 18px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.resource-cta:hover { background: var(--pink-red); }
.resource-related { display: grid; gap: 10px; margin-top: 18px; }
.resource-footer { padding: 20px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.resource-footer a { font-weight: 600; }
/* Accessibility update: give static-guide footer links a comfortable 24px minimum target. */
.resource-footer a { display:inline-flex; align-items:center; justify-content:center; min-width:24px; min-height:24px; padding:4px 2px; box-sizing:border-box; }
/* Service pages reuse the accessible guide shell and add a consistent related-service link group. */
.service-related a { display:inline-flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:10px 12px; border:1px solid var(--line); background:#fff; font-weight:600; text-decoration-thickness:1px; text-underline-offset:4px; }
.service-related a:hover { border-color:var(--green); background:#f5f7f4; }
.service-related a:focus-visible { outline:3px solid var(--navy); outline-offset:3px; }
/* Use a dark green CTA on the white service pages so its white label meets normal-text contrast. */
.service-page .resource-cta { background:var(--green); }
.service-page .resource-cta:hover { background:#00553f; }
.resource-analytics-consent {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  inset-inline-start: 20px;
  inset-block-end: 20px;
  width: min(440px, calc(100vw - 40px));
  max-height: min(82vh, 700px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 60px rgb(0 0 0 / 18%);
}
.resource-analytics-consent__accent { height: 6px; background: var(--red); }
.resource-analytics-consent__content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 24px; }
.resource-analytics-consent__eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.resource-analytics-consent h2 { margin: 0 0 10px; color: var(--navy); font-size: 20px; }
.resource-analytics-consent__content > p:not(.resource-analytics-consent__eyebrow) { margin: 0; color: #484852; font-size: 13px; line-height: 1.6; }
.resource-analytics-consent__content > .resource-analytics-consent__intro { margin-top: 10px; }
.resource-analytics-consent__categories { display: grid; gap: 0; margin: 18px 0 0; padding: 0; border: 1px solid var(--line); }
.resource-analytics-consent__categories legend { margin-inline-start: 12px; padding-inline: 6px; color: var(--navy); font-size: 13px; font-weight: 700; }
.resource-analytics-consent__category { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; padding: 12px; border-top: 1px solid #e9e6e1; cursor: pointer; }
.resource-analytics-consent__category:first-of-type { border-top: 0; }
.resource-analytics-consent__category input, .resource-analytics-consent__agreement input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); }
.resource-analytics-consent__category input:focus-visible, .resource-analytics-consent__agreement input:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.resource-analytics-consent__category > span { display: grid; gap: 3px; }
.resource-analytics-consent__category strong { color: var(--navy); font-size: 13px; line-height: 1.4; }
.resource-analytics-consent__category small { color: #484852; font-size: 12px; line-height: 1.5; }
.resource-analytics-consent__always-on { margin-inline-start: 6px; color: var(--green); font-size: 11px; font-weight: 600; }
.resource-analytics-consent__gdpr { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.resource-analytics-consent__gdpr h3 { margin: 0 0 9px; color: var(--navy); font-size: 14px; }
.resource-analytics-consent__agreement { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; color: #484852; font-size: 12px; line-height: 1.5; cursor: pointer; }
.resource-analytics-consent__error { margin: 8px 0 0; color: #a10000; font-size: 12px; line-height: 1.4; }
.resource-analytics-consent__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 10px; margin-top: 0; padding: 12px 24px 18px; border-top: 1px solid var(--line); background: #fff; }
.resource-analytics-consent__button, .resource-privacy-button { min-height: 42px; border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.resource-analytics-consent__button { padding: 9px 14px; }
.resource-analytics-consent__button--primary { background: var(--red); color: #fff; }
.resource-analytics-consent__button--primary:hover { background: var(--pink-red); }
.resource-analytics-consent__button--secondary { border-color: var(--line); background: #fff; color: var(--navy); }
.resource-analytics-consent__button--secondary:hover { background: var(--paper); }
.resource-analytics-consent__button--tertiary { border-color: var(--green); background: #fff; color: var(--green); }
.resource-analytics-consent__button--tertiary:hover { background: #eef7f2; }
.resource-privacy-button { position: fixed; z-index: 999; inset-inline-start: 16px; inset-block-end: 16px; padding: 7px 10px; border-color: var(--line); background: #fff; color: var(--navy); box-shadow: 0 4px 16px rgb(0 0 0 / 12%); font-size: 11px; }
.resource-analytics-consent__button:focus-visible, .resource-privacy-button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
@media (max-width: 600px) {
  .resource-header, .resource-main, .resource-footer { width: min(100% - 32px, 860px); }
  .resource-header { min-height: 72px; }
  .resource-brand img { width: 138px; }
  .resource-main { padding-block: 44px 60px; }
  .resource-deck { font-size: 16px; }
  .resource-analytics-consent { inset-inline-start: 12px; inset-block-end: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .resource-analytics-consent__content { padding: 18px; }
  .resource-analytics-consent__actions { padding: 12px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Cookie inventory disclosure: resource pages read the same JSON data as the React consent panel. */
.cookie-inventory-disclosure {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.cookie-inventory-disclosure summary {
  padding: 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}
.cookie-inventory-disclosure summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
.cookie-inventory {
  display: grid;
  gap: 14px;
  padding: 0 12px 14px;
  color: var(--navy);
}
.cookie-inventory__intro,
.cookie-inventory__status,
.cookie-inventory__error {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.cookie-inventory__error { padding: 12px; color: #8c1512; }
.cookie-inventory__group,
.cookie-inventory__sources { display: grid; gap: 9px; }
.cookie-inventory__group h3,
.cookie-inventory__sources h3 { margin: 0; color: var(--navy); font-size: 14px; line-height: 1.4; }
.cookie-inventory__entries { display: grid; gap: 9px; }
.cookie-inventory__entry { min-width: 0; padding: 11px; border: 1px solid var(--line); background: #fff; }
.cookie-inventory__category {
  margin: 0 0 5px;
  color: var(--green);
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cookie-inventory__entry h4 { margin: 0 0 9px; color: var(--navy); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.cookie-inventory__facts { display: grid; gap: 8px; margin: 0; }
.cookie-inventory__facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: start; }
.cookie-inventory__facts dt { color: var(--navy); font-size: 11px; font-weight: 700; line-height: 1.5; }
.cookie-inventory__facts dd { min-width: 0; margin: 0; color: #484852; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.cookie-inventory__references,
.cookie-inventory__notes { display: grid; gap: 6px; margin: 9px 0 0; padding-inline-start: 18px; color: #484852; font-size: 12px; line-height: 1.55; }
.cookie-inventory__references a { min-height: 24px; color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.cookie-inventory__references a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.cookie-inventory__sources .cookie-inventory__references { margin-top: 0; }
@media (max-width: 480px) {
  .cookie-inventory-disclosure summary { padding: 11px; }
  .cookie-inventory { padding-inline: 10px; }
  .cookie-inventory__facts > div { grid-template-columns: 68px minmax(0, 1fr); gap: 6px; }
}

/* Language support for the static service pages (public/i18n/static-i18n.js).
   - The picker matches the app header picker: visible label, native select, 30px+ target (WCAG 2.5.8),
     3:1 border (WCAG 1.4.11) and a visible focus ring.
   - While a saved translation loads, the English draft is hidden (static-i18n.js always reveals it within 3s).
   - Arabic and Chinese use fonts that cover their scripts; text keeps Poppins for Latin letters. */
html.i18n-loading body { visibility: hidden; }
.resource-header-actions { display: flex; align-items: center; gap: 18px; }
.language-picker { display: inline-flex; flex-direction: column; align-items: stretch; gap: 2px; position: relative; flex: none; }
.language-picker-label { display: inline-flex; align-items: center; gap: 4px; color: #3c403a; font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.language-picker-select {
  min-height: 32px; max-width: 160px; padding-block: 3px; padding-inline: 8px 26px;
  border: 1px solid #6b7068; border-radius: 0; background-color: #fff; color: var(--black);
  font: inherit; font-size: 13px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .language-picker-select { background-position: 8px 55%, 13px 55%; }
.language-picker-select:hover { border-color: var(--green); }
.language-picker-select:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.language-picker-error {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; z-index: 45;
  width: max-content; max-width: min(280px, 80vw); margin: 0; padding: 8px 10px;
  background: #fff; color: #a00010; border: 1px solid #a00010; font-size: 12px; line-height: 1.4;
}
.language-picker-error[hidden] { display: none; }
:root:lang(ar) body { font-family: Poppins, "Noto Sans Arabic", Arial, sans-serif; }
:root:lang(zh-Hans) body { font-family: Poppins, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
/* Tight negative tracking breaks joined Arabic letters and crowds Chinese characters. */
:root:lang(ar) :is(h1, h2, h3), :root:lang(zh-Hans) :is(h1, h2, h3) { letter-spacing: 0; }
/* Longer translated headings and words may wrap instead of pushing the page sideways (WCAG 1.4.10). */
:root:not(:lang(en)) :is(h1, h2, h3) { overflow-wrap: break-word; hyphens: auto; }
/* The "→" arrows in related links point the reading direction. */
[dir="rtl"] .service-related a span[aria-hidden="true"] { display: inline-block; transform: scaleX(-1); }
@media (max-width: 600px) {
  .resource-header { gap: 12px; }
  .resource-header-actions { flex-direction: column; align-items: flex-end; gap: 6px; padding-block: 8px; }
  .language-picker-select { max-width: 150px; }
}
