/* Hartwell's Grocery — paper-cream market identity: produce green,
   circular red, price-tag yellow, clipboard brown. Deliberately NOT
   the navy/sky company palette. */
:root {
  --paper: #faf6ec;
  --paper-deep: #f1ead6;
  --surface: #fffdf6;
  --leaf: #2e7d32;
  --leaf-dark: #1b5e20;
  --ink: #2b2b26;
  --muted: #6f6a58;
  --line: #ddd3b8;
  --red: #bf3b16;
  --tag-yellow: #ffd94d;
  --tag-ink: #4a3800;
  --board: #8a6844;
  --board-dark: #6e5233;
  --radius: 12px;
  --shadow: 0 10px 24px rgba(43, 43, 38, 0.10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
h1, h2, h3, h4, .brand, .dir-sign, .shelf-sign h3, button, input, .live-pill {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- storefront ---------- */
.store-header { background: var(--surface); border-bottom: 2px solid var(--line); }
.awning {
  height: 18px;
  background: repeating-linear-gradient(90deg, var(--leaf) 0 34px, var(--surface) 34px 68px);
  border-bottom: 3px solid var(--leaf-dark);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.08em; font-size: 1.15rem; }
.brand span { color: var(--red); }
.header-phone { margin: 0; color: var(--muted); font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 0.95rem; }
.header-phone strong { color: var(--ink); }
.header-status { margin: 0 0 0 auto; color: var(--muted); font-family: "Segoe UI", system-ui, Arial, sans-serif; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.open-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); display: inline-block; }

.hero { padding: 36px 0 4px; }
.eyebrow { color: var(--red); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.78rem; font-weight: 700; margin: 0; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.hero h1 { font-size: 2rem; margin: 10px 0 12px; line-height: 1.2; max-width: 820px; }
.hero-lede { color: var(--muted); max-width: 760px; font-size: 1.05rem; }
.hero-instruction { background: #fff3cf; border: 1.5px dashed var(--red); border-radius: 10px; padding: 12px 16px; max-width: 760px; }

.pitch-strip {
  margin: 20px 0 0; background: var(--leaf-dark); color: #f2f7e8;
  border-radius: 10px; padding: 14px 18px; font-weight: 600; text-align: center;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
}

.section-title { color: var(--ink); font-size: 1.4rem; margin: 0 0 4px; }
.section-note { color: var(--muted); margin: 0 0 16px; }

/* ---------- walk the store ---------- */
.walk-section { padding: 30px 0 6px; }
.directory { display: flex; gap: 10px; flex-wrap: wrap; }
.dir-stop {
  flex: 1 1 150px; cursor: pointer; text-align: center;
  background: var(--surface); border: 2px solid var(--line); border-top: 8px solid var(--leaf);
  border-radius: 0 0 var(--radius) var(--radius); padding: 12px 8px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.dir-stop:hover { border-color: var(--leaf); }
.dir-stop.is-here { background: var(--leaf-dark); border-color: var(--leaf-dark); color: #fff; }
.dir-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--paper-deep);
  color: var(--leaf-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.dir-stop.is-here .dir-num { background: var(--tag-yellow); color: var(--tag-ink); }
.dir-sign { font-weight: 800; letter-spacing: 0.1em; font-size: 0.95rem; }
.dir-here { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; color: var(--tag-yellow); min-height: 0.9rem; }

.shelf {
  margin-top: 14px; background: var(--surface); border: 1.5px solid var(--line);
  border-bottom: 10px solid var(--board);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.shelf-sign { border-bottom: 2px dashed var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.shelf-sign-kicker { margin: 0; color: var(--red); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.shelf-sign h3 { margin: 4px 0 2px; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--leaf-dark); }
.shelf-blurb { margin: 0; color: var(--muted); }
.shelf-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.shelf-empty { color: var(--muted); margin: 0; }

/* ---------- item cards (shelf + circular) ---------- */
.item-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.sale-flag {
  align-self: flex-start; background: var(--red); color: #fff;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; padding: 3px 9px; border-radius: 3px;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
}
.item-card h4 { margin: 4px 0 0; font-size: 1.05rem; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.item-price { margin: 0; font-weight: 800; color: var(--red); font-size: 1.3rem; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.item-loc { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; flex: 1; }
.add-btn {
  font: inherit; font-family: "Segoe UI", system-ui, Arial, sans-serif;
  font-weight: 700; cursor: pointer; border-radius: 8px; padding: 9px 12px;
  background: var(--leaf); color: #fff; border: 1.5px solid var(--leaf);
}
.add-btn:hover:not(:disabled) { background: var(--leaf-dark); }
.add-btn:disabled { background: #e7efdd; color: var(--leaf-dark); border-color: var(--line); cursor: default; }

/* ---------- service desk + side stack ---------- */
.desk-section { padding: 26px 0 6px; }
.desk-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.desk-panel {
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.desk-header { display: flex; align-items: flex-start; gap: 14px; border-bottom: 2px dashed var(--line); padding-bottom: 14px; }
.desk-header h2 { margin: 0; font-size: 1.2rem; }
.desk-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.live-pill { margin: 0 0 0 auto; background: #e7efdd; color: var(--leaf-dark); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
.chip {
  border: 1.5px solid var(--leaf); background: transparent; color: var(--leaf-dark);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-family: "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.chip:hover { background: #e7efdd; }

.text-form { display: flex; gap: 10px; }
.text-form input {
  flex: 1; font: inherit; font-family: "Segoe UI", system-ui, Arial, sans-serif;
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; min-width: 0; background: #fff;
}
.button {
  font: inherit; font-family: "Segoe UI", system-ui, Arial, sans-serif;
  font-weight: 700; border-radius: 10px; padding: 11px 18px; cursor: pointer; border: 1.5px solid transparent;
}
.button-primary { background: var(--leaf); color: #fff; }
.button-primary:hover { background: var(--leaf-dark); }
.button-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.button-secondary:hover { border-color: var(--leaf); }
.desk-actions { padding-top: 16px; }

.tag-stack { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; }
.tag-hint { color: var(--muted); border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; }
.tag-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 14px; background: var(--paper); }
.tag-card.tag-policy { border-color: var(--red); background: #fdf0ea; }
.tag-card.tag-miss { border-color: var(--board); background: #f7f0e2; }
.tag-q { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; font-style: italic; }
.tag-a { margin: 10px 0 0; }
.tag-card .tag-a:first-of-type { margin-top: 0; }

.shelf-tag {
  display: flex; align-items: center; gap: 12px;
  background: var(--tag-yellow); color: var(--tag-ink);
  border: 2px dashed #c9a227; border-radius: 8px; padding: 10px 14px;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
}
.tag-hole { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid #c9a227; flex: none; }
.tag-name { margin: 0; font-weight: 800; font-size: 1rem; }
.tag-price { margin: 0; font-weight: 800; font-size: 1.45rem; color: var(--red); line-height: 1.1; }
.tag-loc { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.07em; }

/* ---------- side stack: receipt + clipboard ---------- */
.side-stack { display: grid; gap: 20px; }

.receipt-paper {
  background: #fff; color: #222; border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 20px 18px 16px;
  font-family: Consolas, "Courier New", monospace;
}
.receipt-store { text-align: center; font-weight: 700; letter-spacing: 0.12em; margin: 0; font-size: 1.02rem; }
.receipt-sub { text-align: center; margin: 2px 0 12px; color: #555; font-size: 0.86rem; }
.receipt-empty { text-align: center; color: #777; font-size: 0.9rem; margin: 0 0 10px; }
.receipt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.receipt-line { border-top: 1px dashed #bbb; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.line-name { font-weight: 700; }
.line-where { color: #666; font-size: 0.8rem; width: 100%; order: 3; }
.line-price { margin-left: auto; font-weight: 700; }
.remove-btn {
  font: inherit; font-family: Consolas, "Courier New", monospace; font-size: 0.78rem;
  background: none; border: none; color: #999; cursor: pointer; text-decoration: underline; padding: 0;
}
.remove-btn:hover { color: var(--red); }
.receipt-total {
  border-top: 2px solid #222; margin: 14px 0 0; padding-top: 10px;
  display: flex; justify-content: space-between; font-size: 1.02rem;
}
.receipt-foot { color: #666; font-size: 0.8rem; text-align: center; margin: 10px 0 0; }
.receipt-barcode {
  height: 34px; margin-top: 12px;
  background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 5px, #222 5px 6px, transparent 6px 11px, #222 11px 14px, transparent 14px 17px);
}
.receipt-thanks { text-align: center; font-size: 0.78rem; letter-spacing: 0.1em; color: #555; margin: 8px 0 0; }

.clipboard {
  background: var(--board); border-radius: 6px; padding: 14px 14px 18px;
  box-shadow: var(--shadow); position: relative;
}
.clip {
  width: 110px; height: 22px; margin: 0 auto 10px;
  background: #c8c8c8; border: 2px solid #9a9a9a; border-radius: 6px;
}
.clipboard h2, .clipboard .demo-label, .clipboard .tally-sub, .clipboard .clip-note { color: #fdf6e3; }
.clipboard {
  background-image: linear-gradient(var(--board), var(--board));
}
.clipboard .demo-label { color: #ffd94d; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.11em; margin: 0; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.clipboard h2 { margin: 4px 0 6px; font-size: 1.15rem; }
.tally-sub { margin: 14px 0 8px; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.07em; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.tally-list { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 7px; background: #fffdf2; border-radius: 4px; }
.tally-list li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5ddc4; padding-bottom: 5px; font-family: Consolas, "Courier New", monospace; }
.tally-list li:last-child { border-bottom: none; padding-bottom: 0; }
.tally-miss strong { color: var(--red); font-size: 1.05rem; }
.tally-list strong { color: var(--leaf-dark); font-size: 1.05rem; }
.demo-ask-note { background: #ffd94d; color: var(--tag-ink); border-radius: 6px; padding: 8px 12px; font-size: 0.9rem; margin: 10px 0 0; font-family: "Segoe UI", system-ui, Arial, sans-serif; font-weight: 600; }
.clip-note { font-size: 0.88rem; margin: 14px 2px 0; color: #f3e9d2; }

/* ---------- circular band ---------- */
.ad-band { padding: 26px 0 6px; }
.ad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ad-grid .item-card { background: var(--surface); }

/* ---------- price + notes + footer ---------- */
.price-section { padding: 26px 0 8px; }
.price-card {
  background: var(--leaf-dark); color: #eef4e8; border-radius: var(--radius);
  padding: 26px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: center;
}
.price-card h2 { margin: 0 0 8px; font-size: 1.35rem; }
.price-card p { margin: 0; color: #cfe0c3; }
.price-block { text-align: right; }
.price-line { font-size: 1.1rem; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.price-line strong { color: #fff; }
.price-card .audit-line { margin-top: 8px; color: #ffd94d; font-size: 0.94rem; }

.notes-section { padding: 26px 0 46px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.notes-grid h2 { color: var(--ink); font-size: 1.25rem; margin: 0 0 10px; }
.notes-grid ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
.notes-grid p { margin: 0; color: var(--muted); }

.site-footer { background: var(--ink); padding: 20px 0 28px; color: #b9bfae; font-size: 0.9rem; }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--red); outline-offset: 2px;
}

/* ---------- view toggle + owner admin ---------- */
.view-toggle { display: flex; gap: 8px; margin: 20px 0 0; flex-wrap: wrap; }
.view-btn {
  font: inherit; font-family: "Segoe UI", system-ui, Arial, sans-serif; font-weight: 700;
  cursor: pointer; border-radius: 999px; padding: 9px 18px;
  background: transparent; color: var(--leaf-dark); border: 1.5px solid var(--leaf);
}
.view-btn:hover { background: #e7efdd; }
.view-btn.is-active { background: var(--leaf-dark); border-color: var(--leaf-dark); color: #fff; }

.admin-panel { padding: 26px 0 6px; }
.admin-wrap {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.admin-label {
  color: var(--red); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.11em;
  margin: 0; font-family: "Segoe UI", system-ui, Arial, sans-serif;
}
.admin-wrap h2 { margin: 4px 0 6px; font-size: 1.3rem; }
.admin-sub { margin: 0; color: var(--muted); max-width: 720px; }
.admin-headline {
  display: flex; align-items: center; gap: 16px; margin: 18px 0 14px;
  background: #e7efdd; border: 1.5px solid var(--leaf); border-radius: 10px; padding: 14px 18px;
}
.headline-num {
  margin: 0; font-size: 2.3rem; font-weight: 800; line-height: 1; color: var(--leaf-dark);
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
}
.headline-label { margin: 0; font-weight: 700; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 10px; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.stat-num { font-size: 1.55rem; font-weight: 800; color: var(--red); font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.stat-label { font-size: 0.82rem; color: var(--muted); font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.admin-insight {
  background: #fff3cf; border: 1.5px dashed var(--red); border-radius: 10px;
  padding: 12px 16px; font-weight: 600; margin: 14px 0 4px;
}
.admin-h3 { margin: 18px 0 10px; font-size: 1.05rem; }
.qlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qlog-row { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.qlog-q { margin: 0 0 6px; font-weight: 700; }
.yours-badge {
  background: var(--tag-yellow); color: var(--tag-ink); font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.07em; padding: 2px 8px; border-radius: 999px; margin-left: 8px;
  text-transform: uppercase; font-family: "Segoe UI", system-ui, Arial, sans-serif; white-space: nowrap;
}
.qlog-a { margin: 0; color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.qlog-status {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; font-family: "Segoe UI", system-ui, Arial, sans-serif; white-space: nowrap;
}
.status-answered, .status-info { background: #e7efdd; color: var(--leaf-dark); }
.status-miss { background: #f7e3d8; color: var(--red); }
.status-policy { background: #fdf0ea; color: var(--red); border: 1px solid var(--red); }
.status-note { background: var(--paper-deep); color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.admin-card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 16px; }
.admin-card .admin-h3 { margin-top: 0; }
.admin-note { color: var(--muted); font-size: 0.9rem; margin: 10px 0 0; }
.admin-foot { color: var(--muted); font-size: 0.88rem; margin: 16px 0 0; }

@media (max-width: 700px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-cols { grid-template-columns: 1fr; }
  .admin-headline { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 900px) {
  .desk-grid, .price-card, .notes-grid { grid-template-columns: 1fr; }
  .ad-grid { grid-template-columns: repeat(2, 1fr); }
  .price-block { text-align: left; }
  .header-status { margin-left: 0; }
  .hero h1 { font-size: 1.6rem; }
  .dir-stop { flex-basis: 30%; }
}

@media (max-width: 480px) {
  .ad-grid { grid-template-columns: 1fr; }
  .text-form { flex-direction: column; }
  .dir-stop { flex-basis: 44%; }
}
