:root {
  --cream:#f4f4f6; --paper:#fff; --ink:#141b2d; --navy:#1f2a44;
  --muted:#5c6478; --line:#dfe0e6; --gold:#e8b33c;
  --sage:#307c0f; --sage-soft:#edf5e8; --plum:#b71949;
  --plum-soft:#fbeaf0; --amber:#865a0d; --amber-soft:#f9e6b6;
  font-family:ui-rounded,"Avenir Next",Avenir,"Segoe UI",Arial,sans-serif;
  color:var(--ink); background:var(--cream); font-synthesis:none;
}
* { box-sizing:border-box; }
body { margin:0; }
button,input,select { font:inherit; }
button,input,select,a { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.45; }
input:disabled { cursor:default; }
a { color:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,.reader:focus-visible,.delivery-sheet:focus-visible { outline:3px solid #215bb5; outline-offset:3px; }
.menu-item-control:has(input:focus-visible),.category-control:has(input:focus-visible),.checkoff:has(input:focus-visible) { outline:3px solid #215bb5; outline-offset:-3px; }
h1,h2,h3,p { margin:0; }
h1,h2,h3,.brand { font-family:inherit; font-weight:800; }
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; top:8px; left:8px; transform:translateY(-160%); padding:12px; background:var(--paper); z-index:10; }
.skip-link:focus { transform:none; }
.pilot-app { height:100vh; height:100dvh; max-width:960px; margin:auto; display:flex; flex-direction:column; }
.pilot-header { flex-shrink:0; padding:7px 12px 6px; border-bottom:1px solid var(--line); background:var(--paper); display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; }
.masthead { display:contents; }
.brand { display:flex; align-items:center; gap:6px; font-size:21px; line-height:1.1; text-decoration:none; white-space:nowrap; letter-spacing:-.6px; color:var(--navy); }
.brand small,.moon { display:none; }
.outline-toggle,.tools-toggle { border:1px solid #d4d8e1; border-radius:7px; color:var(--navy); background:var(--cream); padding:0 9px; font-size:12px; font-weight:700; white-space:nowrap; min-height:34px; }
.outline-toggle span { margin-left:4px; font-size:16px; }
.outline-toggle[aria-expanded=true] { color:var(--paper); background:var(--navy); }
.date-bar { display:flex; align-items:center; gap:3px; grid-column:1; min-width:0; }
.icon-button { flex-shrink:0; width:29px; min-height:34px; height:34px; border:1px solid var(--line); background:var(--paper); border-radius:6px; color:var(--navy); font-size:18px; }
.date-field { min-width:0; flex:1; }
.date-field input { width:100%; min-width:0; height:34px; min-height:34px; background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:0 3px; color:var(--navy); font-size:13px; font-weight:650; }
.timezone { display:none; }
.search-bar { display:flex; gap:4px; grid-column:2; margin:0; max-width:144px; }
.search-field { display:flex; align-items:center; min-width:0; flex:1; background:var(--paper); border:1px solid var(--line); border-radius:6px; padding:0 6px; }
.search-field>span { display:none; }
.search-field input { width:100%; min-width:0; min-height:34px; border:0; background:none; color:var(--ink); font-size:14px; }
.search-field input::placeholder { color:var(--muted); }
.tools-toggle { background:#f9e6b6; border-color:#e7cf98; font-size:10px; padding:0 5px; white-space:normal; max-width:41px; }
.pilot-tools { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 10px; padding:9px; background:var(--cream); border-radius:7px; align-items:center; font-size:12px; grid-column:1/-1; }
.pilot-tools input { font-size:16px; width:100%; min-height:36px; border:1px solid #c9ced9; border-radius:5px; padding:0 8px; background:var(--paper); }
.pilot-tools p { grid-column:1/-1; color:var(--muted); line-height:1.4; font-size:11px; }
.mode-banner { grid-column:1/-1; font-size:10px; line-height:1.35; color:var(--muted); }
.mode-banner strong { color:var(--navy); }
.mode-banner.research strong { color:var(--plum); }
.workspace { flex:1; min-height:0; position:relative; }
.reader { height:100%; overflow-y:auto; overflow-x:hidden; scroll-snap-type:y proximity; scroll-behavior:auto; overscroll-behavior-y:contain; scrollbar-color:#b6bdcc transparent; scrollbar-width:thin; padding:0 12px; overflow-anchor:none; }
.delivery-sheet { min-height:0; padding:0; border:0; max-width:720px; margin:auto; overflow-wrap:anywhere; position:relative; }
.order-page { min-height:var(--page-height); padding:6px 0 10px; border-bottom:1px solid var(--line); scroll-snap-align:start; }
.order-heading { padding:7px 10px 6px; margin-bottom:5px; border:1px solid #e5cb89; border-radius:11px; background:#f8e4b0; color:var(--navy); }
.sheet-top { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:4px; }
.sheet-number,.eyebrow { font-size:9px; font-weight:800; letter-spacing:.8px; color:#70592c; }
.page-count { font-size:11px; font-weight:750; color:var(--navy); }
.state-tag { border:1px solid #dfc485; background:#fff4; color:var(--navy); border-radius:15px; padding:2px 6px; font-size:9px; font-weight:700; line-height:1.2; white-space:nowrap; }
.state-tag.review { border-color:#d8bd85; color:#674e22; }
.source-button { border:0; color:var(--navy); background:transparent; font-size:10px; min-height:22px; padding:0; text-decoration:underline; text-underline-offset:2px; flex-shrink:0; }
.order-identity { display:flex; align-items:center; justify-content:space-between; gap:9px; margin-bottom:5px; }
.delivery-sheet h2 { font-size:22px; line-height:1.08; margin:0; letter-spacing:-.6px; color:var(--navy); min-width:0; }
.delivery-clock { text-align:right; flex-shrink:0; max-width:44%; }
.meta-label { font-size:10px; color:#665b40; font-weight:650; }
.delivery-clock>.meta-label { display:block; font-size:9px; margin-bottom:3px; }
.compact-time { font-size:20px; line-height:1.05; font-weight:850; letter-spacing:-.6px; color:var(--navy); font-variant-numeric:tabular-nums; }
.delivery-meta { display:grid; grid-template-columns:104px minmax(0,1fr); gap:3px 8px; padding-top:5px; border-top:1px solid #dfc68b; font-size:12px; line-height:1.25; }
.delivery-meta p { margin:0; min-width:0; }
.driver-line { display:flex; flex-wrap:wrap; gap:2px 4px; align-content:flex-start; align-items:baseline; }
.driver-line>.meta-label { width:100%; }
.driver-line strong { font-size:13px; }
.source-assigned { font-size:9px; font-weight:650; color:#66532b; }
.location-line>.meta-label { display:block; margin-bottom:1px; }
.location-line>span+span { font-weight:650; }
.contact-line { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 6px; font-size:12px; }
.guest-line,.event-line { grid-column:1/-1; font-size:11px; color:#665b40; }
.people-inline { color:#665b40; font-size:10px; margin-left:auto; }
.warning-tag { display:inline-block; color:#78531b; font-size:10px; font-weight:700; line-height:1.25; margin:5px 7px 0 0; }
.warning-tag:before { content:'!'; display:inline-grid; place-items:center; width:12px; height:12px; margin-right:3px; font-size:9px; border:1px solid #9f773a; border-radius:50%; }
.menu-group,.menu-fragment { --category-color:#b71949; --category-soft:#fbeaf0; --category-line:#efd4de; }
[data-menu-category=drinks] { --category-color:#a44613; --category-soft:#fcece1; --category-line:#efd6c7; }
[data-menu-category=paper_goods],[data-menu-category=packing] { --category-color:#286c0b; --category-soft:#edf5e8; --category-line:#d7e6cf; }
[data-menu-category=bakery] { --category-color:#84540d; --category-soft:#fcf0d5; --category-line:#e9d8b3; }
[data-menu-category=equipment],[data-menu-category=instruction],[data-menu-category=labels],[data-menu-category=tent_cards] { --category-color:#354b7c; --category-soft:#eaf0fb; --category-line:#d3ddf0; }
.menu-group { margin-top:6px; border:1px solid var(--line); border-radius:8px; background:#fff; overflow:hidden; }
.menu-fragment { border:solid var(--line); border-width:0 1px 1px; background:#fff; }
.menu-fragment.group-start { margin-top:5px; border-top-width:1px; border-radius:8px 8px 0 0; overflow:hidden; }
.menu-fragment.group-end,.menu-fragment.page-last-unit { border-radius:0 0 8px 8px; }
.menu-fragment.group-start.group-end,.menu-fragment.group-start.page-last-unit { border-radius:8px; }
.category-heading { display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:26px; padding:0 8px; background:var(--category-soft); color:var(--category-color); border-bottom:1px solid var(--category-line); }
.category-control { display:flex; flex:1; min-width:0; gap:6px; align-items:center; min-height:26px; font-size:12px; font-weight:750; cursor:pointer; line-height:1.15; padding:3px 0; }
.category-name { font-size:12px; font-weight:750; padding:5px 0; text-transform:capitalize; }
.category-control input { flex-shrink:0; width:17px; height:17px; min-height:17px; margin:0; accent-color:var(--category-color); }
.category-continuation { font-size:9px; font-weight:600; margin-left:5px; }
.category-tally { flex-shrink:0; font-size:10px; font-weight:650; font-variant-numeric:tabular-nums; }
.menu-list { list-style:none; padding:0; margin:0; background:var(--paper); }
.menu-row { padding:0; margin:0; }
.menu-row+.menu-row { border-top:1px solid var(--line); }
.menu-item-control { display:flex; align-items:center; min-height:36px; gap:8px; padding:6px 8px; cursor:pointer; }
.menu-item-control:active { background:#edf0f6; }
.menu-item-control:has(input:disabled) { cursor:default; }
.menu-check { flex-shrink:0; width:21px; height:21px; min-height:21px; margin:0; accent-color:var(--sage); }
.menu-text { flex:1; min-width:0; font-size:14px; line-height:1.25; white-space:pre-wrap; }
.menu-row.done { background:#f1f7ec; }
.menu-row.done .menu-text { color:#42503c; }
.dietary-word { color:var(--plum); font-size:inherit; font-weight:850; }
.source-quantity { color:var(--navy); font-size:inherit; font-weight:850; }
.section-title { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin:7px 0 3px; }
.section-title h3 { font-size:12px; font-weight:750; letter-spacing:.05px; color:var(--navy); }
.section-title span { font-size:10px; color:var(--muted); }
.instruction-panel { padding:3px 8px; border-left:3px solid #c0c8d8; margin-bottom:2px; background:#fff; }
.instruction-panel.dietary { border-color:var(--plum); }
.instruction-line { font-size:14px; line-height:1.3; white-space:pre-wrap; overflow-wrap:anywhere; }
.instruction-line+.instruction-line { border-top:1px solid var(--line); padding-top:5px; margin-top:5px; }
.checkoff-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin-bottom:3px; }
.checkoff { display:flex; gap:6px; align-items:center; border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:5px 7px; font-size:14px; line-height:1.2; min-height:37px; cursor:pointer; }
.checkoff input { width:20px; height:20px; min-height:20px; flex-shrink:0; accent-color:var(--sage); margin:0; }
.checkoff.checked { background:var(--sage-soft); border-color:#cddfc0; }
.workflow { display:flex; align-items:center; gap:7px; margin-top:3px; }
.action-button { min-height:36px; border:1px solid var(--navy); border-radius:7px; background:var(--navy); color:var(--paper); font-size:13px; font-weight:700; padding:4px 9px; flex-shrink:0; }
.secondary-action { background:transparent; color:var(--navy); }
.helper { font-size:11px; color:var(--muted); line-height:1.3; margin-top:3px; }
.raw-text { margin:0; font:14px/1.5 ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; padding:11px; background:var(--paper); border:1px solid var(--line); border-radius:7px; }
.full-source { margin-top:8px; }
.empty-state { min-height:100%; padding:30px 15px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; }
.empty-state>span { font-size:42px; color:#b85016; margin-bottom:12px; }
.empty-state h1,.empty-state h2 { font-size:28px; line-height:1.15; letter-spacing:-.6px; }
.empty-state p { font-size:14px; line-height:1.6; color:var(--muted); margin-top:12px; overflow-wrap:anywhere; }
.empty-state button { margin-top:15px; }
.outline { height:100%; overflow-y:auto; padding:24px 16px 30px; overscroll-behavior:contain; }
.outline-heading { display:flex; gap:12px; justify-content:space-between; align-items:center; }
.outline-heading h1 { font-size:27px; margin-top:7px; color:var(--navy); letter-spacing:-.5px; }
.outline-heading>span { font-size:11px; color:var(--muted); white-space:nowrap; }
.day-summary { font-size:12px; color:var(--muted); line-height:1.6; margin:12px 0 18px; }
.outline-list { display:grid; gap:9px; }
.outline-row { display:grid; grid-template-columns:24px minmax(0,1fr) 16px; gap:8px; align-items:start; text-align:left; width:100%; padding:14px 12px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); }
.outline-row[aria-current=true] { border-color:#e1c57f; background:#fcf1d9; box-shadow:inset 3px 0 0 var(--gold); }
.outline-number { font-size:12px; color:var(--muted); padding-top:3px; }
.outline-name { display:block; font-size:19px; line-height:1.2; font-weight:750; overflow-wrap:anywhere; margin:5px 0; color:var(--navy); letter-spacing:-.3px; }
.outline-time { font-size:14px; color:#b85016; font-weight:750; }
.outline-driver { display:block; font-size:11px; color:var(--muted); margin-top:5px; overflow-wrap:anywhere; }
.outline-warning { display:block; color:var(--plum); font-size:11px; line-height:1.4; margin-top:7px; }
.outline-arrow { color:var(--navy); padding-top:3px; }
.reader-nav { display:flex; align-items:center; justify-content:space-between; gap:4px; border-top:1px solid var(--line); background:var(--paper); padding:5px 10px max(5px,env(safe-area-inset-bottom)); flex-shrink:0; }
.reader-nav button { min-height:42px; border:1px solid #d4d9e3; border-radius:7px; background:transparent; color:var(--navy); font-size:11px; font-weight:650; padding:0 7px; white-space:nowrap; }
.reader-nav .page-nav { min-width:33px; font-size:20px; background:#f9e6b6; border-color:#e8d29f; }
.reader-position { text-align:center; min-width:0; }
.reader-position strong { font-size:11px; color:var(--muted); white-space:nowrap; }
.reader-position span { display:block; font-size:13px; font-weight:750; color:var(--navy); margin-top:2px; line-height:1.3; }
.status { position:fixed; left:50%; bottom:65px; transform:translateX(-50%); padding:10px 14px; background:var(--navy); border-radius:8px; color:var(--paper); max-width:min(570px,calc(100vw - 28px)); width:max-content; box-shadow:0 5px 22px #0002; font-size:12px; line-height:1.5; z-index:20; }
.status.error { background:#922749; }
#source-dialog { width:min(720px,calc(100vw - 24px)); max-height:85dvh; padding:14px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--cream); }
#source-dialog::backdrop { background:#141b2d88; }
.source-heading { display:flex; align-items:center; gap:12px; justify-content:space-between; margin-bottom:10px; }
.source-heading h2 { font-size:20px; }
.source-heading button { min-height:38px; padding:0 12px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--navy); }
@media(min-width:700px) {
  .pilot-app { border-left:1px solid var(--line); border-right:1px solid var(--line); }
  .pilot-header { padding:8px 24px; }
  .search-bar { max-width:290px; }
  .date-bar { max-width:480px; }
  .reader,.outline { padding-left:24px; padding-right:24px; }
  .order-heading { padding:12px 15px; }
  .delivery-sheet h2 { font-size:27px; }
  .compact-time { font-size:24px; }
  .delivery-meta { grid-template-columns:160px minmax(0,1fr); font-size:14px; }
  .menu-text { font-size:16px; }
  .menu-item-control { min-height:39px; }
  .category-control,.category-name { font-size:13px; min-height:29px; }
  .outline-list { grid-template-columns:1fr 1fr; }
  .reader-nav { padding-left:24px; padding-right:24px; }
}
@media(max-width:360px) {
  .pilot-header { padding-left:9px; padding-right:9px; column-gap:5px; }
  .search-bar { max-width:116px; }
  .date-field input { font-size:12px; }
  .icon-button { width:25px; }
  .reader { padding:0 9px; }
  .delivery-sheet h2 { font-size:20px; }
  .compact-time { font-size:18px; }
  .delivery-meta { grid-template-columns:94px minmax(0,1fr); gap:4px 6px; }
  .reader-nav { padding-left:6px; padding-right:6px; gap:3px; }
  .reader-nav button { padding:0 5px; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
.sheet-actions { display:flex; gap:7px; align-items:center; flex-shrink:0; }
.driver-caption { display:flex; align-items:baseline; justify-content:space-between; gap:4px; width:100%; }
.driver-button { border:0; padding:0; min-height:15px; background:transparent; color:var(--navy); font-size:10px; line-height:1.25; font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.pilot-dialog { width:min(560px,calc(100vw - 24px)); max-height:85dvh; overflow:auto; padding:16px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--cream); }
.pilot-dialog::backdrop { background:#141b2d88; }
.dialog-evidence { font-size:14px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; margin-bottom:8px; }
.dialog-field { display:block; font-size:14px; font-weight:700; margin:15px 0 5px; }
#driver-choice { width:100%; min-height:42px; border:1px solid #bfc6d3; border-radius:6px; padding:6px; color:var(--ink); background:var(--paper); font-size:16px; }
.dialog-message { font-size:13px; line-height:1.5; margin:12px 0; overflow-wrap:anywhere; }
.dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:15px; }
.dialog-actions .action-button { min-height:42px; }
.activity-list { list-style:none; margin:12px 0 0; padding:0; }
.activity-entry { padding:11px 0; border-top:1px solid var(--line); font-size:11px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.activity-entry p { font-size:14px; font-weight:700; color:var(--navy); white-space:pre-wrap; margin-bottom:3px; }
.activity-actor { font-weight:700; }
.compact-workflow { margin:0; justify-content:flex-end; gap:3px; min-width:0; }
.compact-workflow .action-button { font-size:12px; padding:4px 6px; }
.compact-workflow .secondary-action { font-size:10px; padding:4px 3px; }
.menu-row.changed{border-left:5px solid #be6500;background:#fff1cf}.menu-row.changed .menu-text:before{content:'UPDATED · ';font-size:.72em;font-weight:800;color:#784400}.revision-notice{padding:10px 14px;background:#fff1cf;border-left:4px solid #be6500;color:#352600}
