/* RestaurantRollup — one stylesheet, two self-hosted typefaces, no external requests.
   The product is a weekly sheet read against a baseline, so it is set like one: cream stock, ledger
   green, ruled columns, green bars carrying each row, and a double rule under every footed total.
   Sibling tracks use condensed faces, UI faces or Courier; this one is a slab sheet — see docs/identity.md. */
@font-face {
  font-family: "Bitter";
  src: url("/fonts/bitter-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-var-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1c2320;          /* the ink the book is written in */
  --ink-soft: #566058;     /* 6.1:1 on --paper */
  --paper: #faf7ef;        /* ledger cream */
  --paper-2: #f2eee1;
  --card: #fffdf8;
  --rule: #d9d3c0;         /* hairline rules */
  --accent: #1e5c46;       /* ledger green: 7.3:1 on --paper */
  --accent-strong: #164837;
  --bar: #e7efe6;          /* the green bar that carries a row */
  --watch: #7a5410;
  --watch-bg: #f8edd6;
  --alert: #952116;
  --alert-bg: #f8e2dc;
  --display: "Bitter", Georgia, "Times New Roman", serif;
  --text: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; /* raw export dumps only */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--text);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; }
h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 .3rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
/* Figures are figures of the book: slab, tabular, right-aligned by the cell. */
.mono { font-family: var(--mono); font-size: .92em; }
.grid .num, .grid .num .v, .grid .num .d, .stat-v, .sheet-foot .total { font-family: var(--display); font-variant-numeric: tabular-nums; }
.wrap { white-space: pre-wrap; word-break: break-word; }
.dim { color: var(--ink-soft); }
.lede { color: var(--ink-soft); margin: .2rem 0 1.2rem; max-width: 62ch; }
.fine { color: var(--ink-soft); font-size: .875rem; max-width: 80ch; }
.center { text-align: center; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .6rem 1rem; background: var(--card); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.chip { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; padding: .1rem .55rem; font-size: .8rem; }
.tabs { display: flex; gap: .1rem; flex-wrap: wrap; }
.tabs a { padding: .35rem .55rem; border-radius: 2px; text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.tabs a:hover { color: var(--ink); }
.tabs a.here { background: var(--bar); color: var(--accent-strong); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.who .name { color: var(--ink-soft); }
.btn {
  display: inline-block; border: 1px solid var(--rule); background: var(--card); color: var(--ink);
  padding: .45rem .85rem; border-radius: 3px; text-decoration: none; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--ink-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: transparent; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }

main { padding: 1.4rem 1rem 3rem; }
main.app { max-width: 1180px; margin: 0 auto; }
main.site { max-width: 1080px; margin: 0 auto; }
section.narrow { max-width: 620px; margin: 0 auto; }
section.wide { max-width: 1180px; margin: 0 auto; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.picker { margin: 0; }
.row2 { display: flex; gap: .8rem; flex-wrap: wrap; }
.row2 > label { flex: 1 1 180px; }

/* the ruled head band of a sheet: the week, on a line */
.sheet-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: .35rem .7rem; margin: 1rem 0 0; background: var(--card);
  font-family: var(--display); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.sheet-head .dim { font-family: var(--text); font-weight: 600; letter-spacing: .1em; }

/* cards, stats, forms */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 3px; padding: 1rem 1.1rem; margin: 1rem 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.cols .card { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin: 1rem 0; }
.stat {
  background: var(--card); border: 1px solid var(--rule); border-bottom: 3px double var(--ink);
  border-radius: 3px; padding: .7rem .9rem; display: flex; flex-direction: column;
}
.stat-v { font-size: 1.3rem; }
.stat-l { color: var(--ink-soft); font-size: .85rem; }
.stat-h { color: var(--ink-soft); font-size: .78rem; }
.stat-alert { border-color: var(--alert); background: var(--alert-bg); }
.stack { display: flex; flex-direction: column; gap: .7rem; }
.stack.row { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
label { display: block; font-size: .9rem; color: var(--ink-soft); }
label.check { display: flex; align-items: center; gap: .5rem; }
input, select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--rule); border-radius: 3px;
  background: var(--card); color: var(--ink); font: inherit; margin-top: .2rem;
}
textarea { font-family: var(--mono); font-size: .85rem; }
.hidden-source textarea { height: 3.2rem; color: var(--ink-soft); }
button, .btn { font-family: inherit; }
.flash { border-radius: 3px; padding: .6rem .8rem; margin: 0 0 1rem; border: 1px solid var(--accent); background: var(--bar); }
.flash.err { border-color: var(--alert); background: var(--alert-bg); }
.flash.warn { border-color: var(--watch); background: var(--watch-bg); }
.demobar, .drybar { padding: .5rem .9rem; font-size: .9rem; }
.demobar { background: var(--ink); color: var(--paper); }
.demobar a { color: #cfe6d6; }
.drybar { background: var(--watch-bg); border-bottom: 1px solid var(--rule); color: #4a3410; }

/* tables — the sheet itself: a ruled head, green bars, ink figures */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 3px; }
.tablewrap.sheet { border-top: 0; border-radius: 0; }
table.grid { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.grid th, table.grid td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.grid th { background: var(--card); border-bottom: 2px solid var(--ink); font-family: var(--text); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
table.grid tbody tr:nth-child(odd) { background: var(--bar); }
table.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; white-space: nowrap; }
.grid .num .v { display: block; }
.grid .num .d { display: block; font-size: .8rem; font-family: var(--text); color: var(--ink-soft); }
.f-ok .d { color: var(--ink-soft); }
.f-watch { background: var(--watch-bg); }
.f-watch .d, .f-watch .v { color: var(--watch); }
.f-alert { background: var(--alert-bg); }
.f-alert .d, .f-alert .v { color: var(--alert); }
.f-unknown .v { color: var(--ink-soft); }
.vendor { text-transform: capitalize; color: var(--ink-soft); }
.badge { display: inline-block; font-size: .72rem; padding: .05rem .45rem; border-radius: 2px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink-soft); }
.badge.ok { background: var(--bar); border-color: var(--accent); color: var(--accent-strong); }
.badge.watch { background: var(--watch-bg); border-color: var(--watch); color: var(--watch); }
.badge.alert { background: var(--alert-bg); border-color: var(--alert); color: var(--alert); }
.badge.dry_run, .badge.preview { background: var(--watch-bg); border-color: var(--watch); color: var(--watch); }
.badge.sent { background: var(--bar); border-color: var(--accent); color: var(--accent-strong); }
.mailbody { white-space: pre-wrap; font-size: .9rem; background: var(--paper-2); border-radius: 3px; padding: .8rem; margin: 0; }
.inline { display: flex; gap: .4rem; align-items: center; }
.inline select, .inline input { width: auto; margin: 0; }

/* marketing */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.2rem; align-items: start; padding: 1.8rem 0 1rem; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--accent); margin: 0 0 .5rem; }
.hero h1 { font-size: 2.7rem; line-height: 1.1; }
.hero-shot { border: 1px solid var(--rule); border-top: 2px solid var(--ink); background: var(--card); }
.hero-shot .sheet-head { margin: 0; border-top: 0; }
.hero-shot .mini { width: 100%; border-collapse: collapse; }
.hero-shot .mini th, .hero-shot .mini td { padding: .45rem .6rem; border-bottom: 1px solid var(--rule); text-align: right; font-size: .85rem; }
.hero-shot .mini th { font-family: var(--text); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.hero-shot .mini td:not(:first-child) { white-space: nowrap; }
.hero-shot .mini th:first-child, .hero-shot .mini td:first-child { text-align: left; }
.hero-shot .mini td { font-family: var(--display); font-variant-numeric: tabular-nums; }
.hero-shot .mini tbody tr:nth-child(odd) { background: var(--bar); }
.hero-shot .mini tbody tr:last-child td { border-bottom: 0; }
.hero-shot .sheet-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .5rem .6rem; border-top: 1px solid var(--ink); font-size: .85rem; color: var(--ink-soft);
}
.hero-shot .sheet-foot .total { font-size: 1.05rem; font-weight: 600; color: var(--ink); border-bottom: 3px double var(--ink); padding-bottom: .1rem; }
.hero-shot .fine { margin: 0; padding: .5rem .6rem; border-top: 1px solid var(--rule); }
.cta-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.ticks { margin: 0; padding-left: 1.1rem; }
.ticks li { margin: .3rem 0; }
.band { background: var(--paper-2); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 3px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.price-card { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--rule); border-top: 2px solid var(--accent); border-radius: 3px; padding: 1rem 1.2rem; margin: 1.5rem 0; background: var(--card); }
.faq dl { margin: 0; }
.faq dt { font-family: var(--display); font-weight: 600; margin-top: .9rem; }
.faq dd { margin: .2rem 0 0; color: var(--ink-soft); }
.legal h2 { margin-top: 1.4rem; }

/* audit form — used on a phone in a kitchen */
fieldset.section { border: 1px solid var(--rule); border-radius: 3px; padding: .8rem 1rem 1rem; margin: 0 0 1rem; background: var(--card); }
fieldset.section legend { font-family: var(--display); font-weight: 600; padding: 0 .4rem; }
.audit-item { border-top: 1px solid var(--rule); padding: .7rem 0; }
.audit-item:first-of-type { border-top: 0; }
.audit-label { font-weight: 500; margin-bottom: .35rem; }
.audit-answer { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio { display: inline-flex; align-items: center; gap: .35rem; }
.radio input { width: auto; }
.note, .photo input { margin-top: .35rem; }
.shot img { border: 1px solid var(--rule); border-radius: 3px; }

/* the pack sheet: the head band sits on the table */
.tablewrap.sheet .grid th:first-child, .tablewrap.sheet .grid td:first-child { padding-left: .7rem; }
.printsheet .sheet-head { margin-bottom: 0; }

.foot { border-top: 1px solid var(--rule); background: var(--card); margin-top: 2rem; }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--ink-soft); font-size: .85rem; }
.foot-links a { color: var(--ink-soft); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  h1 { font-size: 1.75rem; }
  main { padding: 1rem .6rem 2.5rem; }
  .topbar { gap: .4rem; padding: .5rem .6rem; }
  .who { width: 100%; margin-left: 0; }
  table.grid { font-size: .85rem; }
  table.grid th, table.grid td { padding: .45rem .45rem; }
}

@media print {
  .topbar, .foot, .noprint, .cta-row, .picker { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .tablewrap { border: 0; }
  table.grid th { background: #fff; }
  .f-watch, .f-alert { background: #fff !important; }
  .printsheet h1 { font-size: 1.3rem; }
}
