/* Food Ratings design system: tokens and primitives shared by the map app, the secondary pages
   and the landing page. Tomato red, white and charcoal (food-ratings-redesign/handoff). */

:root {
    --rr-brand: #bd3e2a;
    --rr-brand-hover: #9e3020;
    --rr-ink: #20242c;
    --rr-muted: #66707c;
    --rr-border: #e6e7e9;
    --rr-surface: #ffffff;
    --rr-canvas: #f5f6f8;
    --rr-soft: #fff1e9;
    --rr-dark: #232b3b;
    --rr-focus: #c7662f;
    --rr-radius: 12px;
    --rr-shadow: 0 14px 50px rgba(32, 36, 44, .07);
    --rr-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Food Ratings' own rating labels (not official FSA artwork); white text passes WCAG AA on each. */
    --rr-five: #263c64;
    --rr-four: #416599;
    --rr-three: #935600;
    --rr-two: #a44114;
    --rr-one: #b22637;
    --rr-zero: #721b29;
    --rr-unrated: #687486;
    --rr-unknown: #4b5563;
    --rr-you: #0b7bc1;
}

:focus-visible { outline: 3px solid var(--rr-focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

.rr-skip {
    position: absolute; left: 10px; top: -100px; z-index: 3000; padding: 12px 16px;
    background: #fff; color: var(--rr-ink); border-radius: 8px; box-shadow: var(--rr-shadow);
}
.rr-skip:focus { top: 10px; }

/* Brand badge: the pin and "Food Ratings" in one image (images/brand/foodratings-badge.png). Each
   place sets only its height. */
.rr-brand { display: inline-flex; flex: none; align-items: center; text-decoration: none; }
.rr-brand img { display: block; width: auto; height: 36px; }

/* SpaceTent credit (_common/credit.gohtml) at the foot of every page. */
.rr-credit { margin: 0; color: var(--rr-muted); font-size: 12.5px; line-height: 1.6; text-align: center; }
.rr-credit a { color: inherit; }

.rr-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
    padding: 11px 18px; border: 1px solid var(--rr-brand); border-radius: 9px; background: var(--rr-brand);
    color: #fff; font: inherit; font-size: 14px; font-weight: 650; line-height: 1.2; text-decoration: none;
    white-space: nowrap; cursor: pointer;
}
.rr-button:hover { background: var(--rr-brand-hover); border-color: var(--rr-brand-hover); color: #fff; }
.rr-button:disabled { opacity: .45; cursor: default; }
.rr-button.secondary { background: #fff; color: var(--rr-ink); border-color: #d6dae0; }
.rr-button.secondary:hover { background: var(--rr-canvas); color: var(--rr-ink); }

.rr-tag {
    display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 5px; background: var(--rr-soft);
    color: #944522; font-size: 11px; font-weight: 650; letter-spacing: .6px; line-height: 1.5; text-transform: uppercase;
}

.rr-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Rating badge: always shows a number or scheme code; the colour only supports it. */
.rr-score {
    display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 48px; border-radius: 10px;
    background: var(--rr-unrated); color: #fff; font-size: 24px; font-weight: 750; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.rr-score--r5, .rr-pin--r5, .rr-score--pass, .rr-pin--pass { background: var(--rr-five); }
.rr-score--r4, .rr-pin--r4 { background: var(--rr-four); }
.rr-score--r3, .rr-pin--r3 { background: var(--rr-three); }
.rr-score--r2, .rr-pin--r2, .rr-score--improve, .rr-pin--improve { background: var(--rr-two); }
.rr-score--r1, .rr-pin--r1 { background: var(--rr-one); }
.rr-score--r0, .rr-pin--r0 { background: var(--rr-zero); }
.rr-score--unrated, .rr-pin--unrated { background: var(--rr-unrated); }
.rr-score--unknown, .rr-pin--unknown { background: var(--rr-unknown); }
.rr-score--sm { flex-basis: 26px; width: 26px; height: 28px; border-radius: 6px; font-size: 14px; }
.rr-score--lg { flex-basis: 52px; width: 52px; height: 56px; border-radius: 12px; font-size: 30px; }

/* Data freshness pill (class from present.Freshness). */
.status-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-decoration: none;
    background: #eef1f8; color: #263c64;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
a.status-pill:hover { filter: brightness(.97); }
.status-pill.is-success { background: #eef1f8; color: #263c64; }
.status-pill.is-warning { background: #fff4e0; color: #7a4a00; }
.status-pill.is-danger { background: #fdecee; color: #8f1f2d; }
.status-pill.is-secondary { background: #eef0f3; color: #4b5563; }

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