/* 10&5 Hospitality: plain CSS, light and dark. */

:root {
  --paper: #f5f1ea;
  --surface: #ffffff;
  --sunk: #efe9df;
  --ink: #1d1a1c;
  --muted: #655f63;
  --rule: #e2dbcf;
  --accent: #7a2437;
  --accent-ink: #ffffff;
  --accent-soft: #f4e2e5;
  --pass: #1c7247;
  --pass-soft: #dcefe3;
  --fail: #b0271f;
  --fail-soft: #f8e0dd;
  --na: #5b6370;
  --na-soft: #e7e9ec;
  --mid: #8a5a00;
  --mid-soft: #fbecc8;
  --shadow: 0 1px 2px rgb(29 26 28 / 0.05), 0 8px 24px rgb(29 26 28 / 0.06);
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121012;
    --surface: #1c191c;
    --sunk: #161416;
    --ink: #eeeae4;
    --muted: #a39ca0;
    --rule: #2f2a2e;
    --accent: #e48a9c;
    --accent-ink: #1d1a1c;
    --accent-soft: #3a1e25;
    --pass: #5fc98f;
    --pass-soft: #163326;
    --fail: #f17d73;
    --fail-soft: #3d1b19;
    --na: #aab2bd;
    --na-soft: #272b31;
    --mid: #f0c060;
    --mid-soft: #3a2f14;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

a { color: inherit; }
a:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--serif); font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { display: block; width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 700px) { .wrap { padding-left: 24px; padding-right: 24px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.meta { color: var(--muted); font-size: 0.9rem; }
.eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin-top: 10px; }

/* Masthead */
.masthead { background: var(--accent); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .masthead { background: #0b0a0b; color: var(--ink); border-bottom: 1px solid var(--rule); } }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand__mark {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: #f5f1ea; color: #7a2437; font: 800 0.82rem/1 var(--serif); letter-spacing: -0.03em;
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font: 700 1.15rem/1.2 var(--serif); }
.brand__tag { font-size: 0.8rem; opacity: 0.8; }
.nav { display: flex; gap: 4px; }
.nav__link { text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 6px 10px; border-radius: 8px; opacity: 0.85; }
.nav__link:hover { opacity: 1; background: rgb(255 255 255 / 0.12); }
.nav__link[aria-current="page"] { opacity: 1; background: rgb(255 255 255 / 0.18); }

.demo-notice { margin: 0; background: var(--mid-soft); color: var(--ink); font-size: 0.88rem; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.demo-notice strong { color: var(--mid); }

main { padding-top: 28px; padding-bottom: 48px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions--top { margin: 0 0 20px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  font: 600 0.92rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { border-color: var(--muted); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button--primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.button--quiet { background: transparent; }

/* Intro and page heads */
.intro { margin-bottom: 28px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 280px; }
.page-head .meta { margin-top: 6px; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; color: var(--accent); font-weight: 600; }

/* Cards and panels */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card, .panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; min-width: 0;
}
.panel { margin: 0 0 18px; }
fieldset.panel { margin-inline: 0; }
/* A legend otherwise sits on the fieldset's top border. */
fieldset.panel > legend { float: left; width: 100%; }
fieldset.panel > legend + * { clear: both; }
.panel__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; padding: 0; }
.card__title { font: 700 1.3rem/1.2 var(--serif); }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.restaurant-card { display: flex; flex-direction: column; gap: 14px; }
.restaurant-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }

/* Scores */
.score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.score__value { font: 800 2rem/1 var(--sans); letter-spacing: -0.02em; }
.score__label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.score--high, .score--high .score__value { color: var(--pass); }
.score--mid, .score--mid .score__value { color: var(--mid); }
.score--low, .score--low .score__value { color: var(--fail); }

.score-chip { display: inline-block; font-weight: 800; font-size: 0.9rem; padding: 3px 9px; border-radius: 999px; background: var(--na-soft); color: var(--na); white-space: nowrap; }
.score-chip--high { background: var(--pass-soft); color: var(--pass); }
.score-chip--mid { background: var(--mid-soft); color: var(--mid); }
.score-chip--low { background: var(--fail-soft); color: var(--fail); }

.trend { list-style: none; display: flex; align-items: flex-end; gap: 6px; height: 48px; margin: 0; padding: 0; }
.trend__bar { flex: 1; height: max(4px, var(--h)); border-radius: 4px 4px 2px 2px; background: var(--na); opacity: 0.85; }
.trend__bar--high { background: var(--pass); }
.trend__bar--mid { background: var(--mid); }
.trend__bar--low { background: var(--fail); }

.dept-chips { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; }
.dept-chip { display: flex; justify-content: space-between; gap: 8px; font-size: 0.88rem; padding: 6px 10px; border-radius: 8px; background: var(--sunk); }
.dept-chip strong { color: var(--na); }
.dept-chip--high strong { color: var(--pass); }
.dept-chip--mid strong { color: var(--mid); }
.dept-chip--low strong { color: var(--fail); }

/* Visit list */
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when score" "links missed";
  gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule);
}
.visit-row:first-child { border-top: 0; padding-top: 0; }
.visit-row__when { grid-area: when; display: flex; flex-direction: column; min-width: 0; }
.visit-row .score-chip { grid-area: score; justify-self: end; }
.visit-row__missed { grid-area: missed; justify-self: end; }
.visit-row__links { grid-area: links; display: flex; gap: 14px; font-size: 0.9rem; font-weight: 600; }
.visit-row__links a { color: var(--accent); text-decoration: none; }
.visit-row__links a:hover { text-decoration: underline; }
@media (min-width: 700px) {
  .visit-row { grid-template-columns: minmax(0, 1fr) 70px 80px auto; grid-template-areas: "when score missed links"; }
  .visit-row__missed { justify-self: start; }
}

/* Visit details */
/* Cells draw their own right and bottom rules, so a short last row leaves no
   gray gap; the container clips the outer edge. */
.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); margin: 0 0 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.details > div { padding: 10px 14px; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); margin: 0 -1px -1px 0; }
.details dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.details dd { margin: 2px 0 0; font-weight: 600; }

/* Scorecard */
.dept__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dept__head .panel__title { margin-bottom: 6px; }
.observation { color: var(--muted); font-style: italic; margin-bottom: 12px; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--rule);
}
.result__text { font-weight: 500; }
.result__note { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; }
.result--fail .result__note { color: var(--fail); }

.pill { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill--pass { background: var(--pass-soft); color: var(--pass); }
.pill--fail { background: var(--fail-soft); color: var(--fail); }
.pill--na, .pill--none { background: var(--na-soft); color: var(--na); }

/* Action Plan */
.overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .overview { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.overview__cell { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.overview__label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.overview__value { font: 800 1.7rem/1.1 var(--sans); }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
@media (min-width: 700px) { .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.summary { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--na); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.summary--high { border-top-color: var(--pass); }
.summary--mid { border-top-color: var(--mid); }
.summary--low { border-top-color: var(--fail); }
.summary__name { font-size: 0.95rem; }
.summary__score { font: 800 1.6rem/1.2 var(--sans); margin: 4px 0; }
.summary__line { font-size: 0.85rem; }

.change { font-weight: 700; font-size: 0.85rem; }
.change--up { color: var(--pass); }
.change--down { color: var(--fail); }
.change--flat, .change--none { color: var(--muted); font-weight: 600; }

.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-item { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--rule); }
.plan-item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 700px) { .plan-item { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; } }
.plan-item__standard { font-weight: 700; }
.plan-item__note { color: var(--muted); margin-top: 4px; }
.plan-item__history { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.plan-item__history > div { background: var(--sunk); border-radius: 8px; padding: 8px 10px; }
.plan-item__history dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.plan-item__history dd { margin: 4px 0 0; font-size: 0.9rem; font-weight: 600; }
.tag { display: inline-block; margin-left: 6px; vertical-align: 2px; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag--repeat { background: var(--fail-soft); color: var(--fail); }

.empty, .draft-notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; }
.empty { background: var(--pass-soft); color: var(--pass); font-weight: 600; }
.draft-notice { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); }

/* Standards */
.dept-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.dept-grid .panel { margin: 0; }
.standard-list { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }

/* Scorecard form */
.field-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); min-width: 0; }
.field--wide { margin-bottom: 10px; }
.field input, .field select, .field textarea, .result__input {
  width: 100%; min-width: 0; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px;
}
.result--form { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .result--form { grid-template-columns: minmax(0, 1fr) auto; } .result--form .result__input { grid-column: 1 / -1; } }
.marks { display: inline-flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; justify-self: start; }
.mark { position: relative; }
.mark input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mark span { display: block; padding: 7px 14px; font-size: 0.85rem; font-weight: 700; color: var(--muted); background: var(--surface); border-left: 1px solid var(--rule); }
.mark:first-child span { border-left: 0; }
.mark input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.mark--pass input:checked + span { background: var(--pass-soft); color: var(--pass); }
.mark--fail input:checked + span { background: var(--fail-soft); color: var(--fail); }
.mark--na input:checked + span { background: var(--na-soft); color: var(--na); }

/* Footer */
.footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; }
.footer__inner { padding-top: 20px; padding-bottom: 32px; display: grid; gap: 8px; }
.footer a { color: var(--accent); font-weight: 600; }

@media print {
  .masthead, .demo-notice, .actions, .crumbs, .footer { display: none; }
  .card, .panel, .summary { box-shadow: none; break-inside: avoid; }
}
