@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --spruce: #1f3b34;
  --spruce-2: #2c5047;
  --spruce-ink: #e6efec;
  --paper: #f2f4f3;
  --surface: #ffffff;
  --ink: #1a2420;
  --muted: #5d6b66;
  --line: #d9dfdc;
  --amber: #b8801c;
  --amber-bg: #fbf3e2;
  --moss: #3d7a4e;
  --moss-bg: #e7f2ea;
  --brick: #a23a2a;
  --brick-bg: #f9e8e5;
  --focus: #2f7dd1;
  --radius-sm: 4px;
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 'Public Sans', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--spruce-2); }

/* ── Frame ───────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.nav {
  background: var(--spruce);
  color: var(--spruce-ink);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { font: 700 26px/1 'Barlow Condensed', sans-serif; letter-spacing: .01em; color: #fff; padding: 0 6px; }
.brand small { display: block; font: 500 13px/1.4 'Public Sans', sans-serif; color: #b9ccc6; letter-spacing: 0; margin-top: 4px; }
.biz-switch label { display: block; font-size: 12px; color: #b9ccc6; margin: 0 6px 4px; }
.biz-switch select {
  width: 100%; background: var(--spruce-2); color: #fff; border: 1px solid #45685e;
  border-radius: var(--radius-sm); padding: 8px 10px; font: inherit;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 10px; border-radius: var(--radius-sm);
  color: var(--spruce-ink); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--spruce-2); }
.nav a[aria-current='page'] { background: #fff; color: var(--spruce); }
.nav .who { margin-top: auto; font-size: 13px; color: #b9ccc6; padding: 0 6px; word-break: break-all; }

main { padding: 28px 36px 64px; max-width: 1400px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
h1 { font: 600 34px/1.05 'Barlow Condensed', sans-serif; margin: 0; letter-spacing: .005em; }
h2 { font: 600 22px/1.2 'Barlow Condensed', sans-serif; margin: 28px 0 10px; }
.sub { color: var(--muted); margin: 4px 0 0; }

/* ── Controls ────────────────────────────────────────────────── */
button, .btn {
  font: 600 14px/1 'Public Sans', sans-serif; border-radius: var(--radius-sm); padding: 10px 14px;
  border: 1px solid var(--spruce); background: var(--spruce); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--spruce-2); }
button.quiet, .btn.quiet { background: var(--surface); color: var(--spruce); border-color: var(--line); }
button.quiet:hover { border-color: var(--spruce); background: var(--surface); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: none; color: var(--spruce-2); padding: 4px; text-decoration: underline; font-weight: 500; }
button.danger { background: var(--surface); color: var(--brick); border-color: #e3c2bc; }

label.field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: 15px/1.3 'Public Sans', sans-serif; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0;
}
input:focus, select:focus { border-color: var(--spruce-2); }
input.money, input.qty { text-align: right; width: 110px; }
input.qty { width: 80px; }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }

/* ── Tables ──────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; font-weight: 600; color: var(--muted); background: #f8faf9; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: #f6f9f8; }
tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: none; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.open { background: var(--amber-bg); color: #7a5410; }
.pill.paid { background: var(--moss-bg); color: var(--moss); }
.pill.credit { background: #e8eef7; color: #2f5a8f; }
.owed { color: #8a5d0f; font-weight: 600; }

/* ── Attention list on Today ─────────────────────────────────── */
.attention { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.attention a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 18px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.attention a:last-child { border-bottom: none; }
.attention a:hover { background: #f6f9f8; }
.attention strong { font-size: 16px; }
.attention .amt { font: 600 24px/1 'Barlow Condensed', sans-serif; align-self: center; grid-row: span 2; }
.attention span { color: var(--muted); font-size: 14px; }

/* ── The balance strip (Receive payment) ─────────────────────── */
.balance-strip {
  position: sticky; bottom: 0; margin-top: 18px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: var(--radius); border: 2px solid var(--brick); background: var(--brick-bg);
  transition: background-color .25s, border-color .25s;
}
.balance-strip .verdict { font: 700 30px/1 'Barlow Condensed', sans-serif; color: var(--brick); min-width: 220px; }
.balance-strip .math { display: flex; gap: 22px; color: var(--ink); font-size: 14px; }
.balance-strip .math b { display: block; font-size: 17px; }
.balance-strip.ok { border-color: var(--moss); background: var(--moss-bg); }
.balance-strip.ok .verdict { color: var(--moss); }
.balance-strip.over { border-color: var(--amber); background: var(--amber-bg); }
.balance-strip.over .verdict { color: #7a5410; }
.balance-strip button { margin-left: auto; }

.notice { padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; }
.notice.error { background: var(--brick-bg); color: var(--brick); border: 1px solid #e3c2bc; }
.notice.ok { background: var(--moss-bg); color: var(--moss); border: 1px solid #c2dcc9; }

dialog.panel { max-width: min(560px, calc(100vw - 32px)); width: 100%; border: 1px solid var(--line); color: var(--ink); }
dialog::backdrop { background: rgba(26, 36, 32, .45); }
.pill:not(.open):not(.paid):not(.credit):not(.print):not(.void) { background: #eef1f0; color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }

/* ── Print views ─────────────────────────────────────────────── */
.print-only { display: none; }
.sheet { background: #fff; color: #000; padding: 36px 44px; max-width: 8.5in; margin: 0 auto 24px; border: 1px solid var(--line); }
.sheet header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.sheet .title { font: 700 30px/1 'Barlow Condensed', sans-serif; }
.sheet .copy { font-size: 12px; color: #444; margin-top: 4px; }
.sheet .logo { display: block; max-width: 220px; max-height: 100px; margin-bottom: 8px; }
.sheet .biz { font-weight: 700; }
.sheet .addr { font-size: 13px; color: #333; }
.sheet .thanks { margin-top: 36px; text-align: center; font: italic 700 20px/1.2 'Barlow Condensed', sans-serif; }
.logo-preview { width: 180px; height: 80px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 6px; background: #fff; }
.logo-preview img { max-width: 170px; max-height: 72px; }
.sheet table th { background: #fff; color: #000; border-bottom: 2px solid #000; }
.sheet .sig { margin-top: 48px; display: flex; gap: 40px; }
.sheet .sig div { flex: 1; border-top: 1px solid #000; padding-top: 6px; font-size: 13px; }

@media print {
  body { background: #fff; }
  .nav, .page-head, .no-print, .toolbar { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .sheet { border: none; margin: 0; padding: 0.4in 0.5in; break-after: page; }
  .sheet:last-child { break-after: auto; }
}

/* ── Phone ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; padding: 12px 16px; gap: 10px; }
  .nav ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .nav ul ul, .nav .nav-block { display: contents; }
  .nav .nav-group[hidden] { display: contents; }
  .nav .nav-block > button.nav-section, .nav .nav-fold { display: none; }
  .nav a { white-space: nowrap; }
  .nav .who { display: none; }
  main { padding: 18px 16px 48px; }
  .balance-strip .verdict { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.qbo-step { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.qbo-step h3 { font: 600 18px/1.2 'Barlow Condensed', sans-serif; margin: 0 0 4px; }

/* Customers and price list */
tr.muted td { color: var(--muted); }
.tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #eef1f0; color: var(--muted); font-size: 12px; font-weight: 600; }
.branch { padding-left: 14px; }
td.branch { padding-left: 34px; }
.branch-mark { color: var(--muted); margin: 0 6px 0 -18px; display: inline-block; width: 12px; }
tr.branch-row td { border-top-color: transparent; }
.price-grid input.money { width: 6.5em; }
.price-grid tr.group th { text-align: left; background: transparent; padding-top: 16px; }
input.saved { outline: 2px solid var(--moss); outline-offset: 1px; transition: outline-color .6s; }

/* Banking, reconcile, chart of accounts */
dialog.panel.wide { max-width: min(860px, calc(100vw - 32px)); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
dialog h3 { font: 600 18px/1.2 'Barlow Condensed', sans-serif; margin: 22px 0 8px; }
.row + .row { margin-top: 12px; }
label.field.grow { min-width: 200px; }
label.field.grow input { width: 100%; }
table.split select { max-width: 320px; }
table.split input:not(.money) { width: 100%; }
.small { font-size: 13px; }
button.link.left { text-align: left; padding: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.thumbs figure { margin: 0; width: 220px; }
.thumbs img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.thumbs figcaption { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; word-break: break-all; }
.practice-banner { background: var(--amber-bg); color: #6b4a0e; border: 1px solid #ecd7a9; border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 16px; font-weight: 600; }

.acct-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-tabs a { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 170px; }
.acct-tabs a span { font-size: 13px; color: var(--muted); }
.acct-tabs a.on { border-color: var(--spruce); box-shadow: inset 0 -3px 0 var(--spruce); }
.reg-sum { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
table.register td { vertical-align: top; }

.rec-strip { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(6, auto); gap: 6px 20px; align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: var(--radius); padding: 12px 16px; }
.rec-strip.ok { border-left-color: var(--moss); }
.rec-strip div { display: grid; gap: 2px; }
.rec-strip span, .rec-strip label { font-size: 12px; color: var(--muted); font-weight: 600; }
.rec-strip strong { font-size: 17px; }
.rec-strip .verdict strong { font: 700 24px/1 'Barlow Condensed', sans-serif; color: var(--amber); }
.rec-strip.ok .verdict strong { color: var(--moss); }
.rec-strip input.money { width: 120px; }
.rec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
table.rec tr.ticked td { background: var(--moss-bg); }
table.rec td { padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 980px) { .rec-cols { grid-template-columns: 1fr; } .rec-strip { grid-template-columns: repeat(3, auto); } }

strong.neg { color: var(--brick); }

/* Statement upload and review */
.stmt-check { margin-top: 14px; border: 1px solid var(--line); border-left: 5px solid var(--brick); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
.stmt-check.ok { border-left-color: var(--moss); }
.stmt-check ul { margin: 6px 0 12px; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.stmt-check li::before { display: inline-block; width: 1.4em; font-weight: 700; }
.stmt-check li.good::before { content: '✓'; color: var(--moss); }
.stmt-check li.bad::before { content: '✕'; color: var(--brick); }
.stmt-check li.bad { color: var(--brick); }
.stmt-check li.note::before { content: '·'; color: var(--muted); }
.stmt-check li.note { color: var(--muted); }
.bank-review { margin-bottom: 16px; }
.bank-lines { display: grid; gap: 10px; }
.bank-line { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; }
.bank-line .bl-head { display: flex; gap: 14px; align-items: baseline; }
.bank-line .bl-head .num { margin-left: auto; }
.bank-line select { max-width: 340px; }
.bank-line .thumbs img { max-height: 120px; width: auto; }

/* Customer ledger */
.tiles { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.tiles > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 2px; min-width: 200px; }
.tiles span { font-size: 13px; color: var(--muted); font-weight: 600; }
.tiles strong { font: 700 26px/1.1 'Barlow Condensed', sans-serif; }
table.summary tr.on td { background: var(--moss-bg); }
table.summary tr.month td { font-size: 14px; }
.flag { color: var(--brick); font-weight: 600; }

.details dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 8px 0 0; }
.details dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.details dd { margin: 2px 0 0; }
dialog textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; }

button.back { background: none; border: none; color: var(--spruce-2); padding: 0 0 6px; font-weight: 600; font-size: 14px; }
button.back:hover { background: none; text-decoration: underline; }
@media print { button.back { display: none; } }

@media print { .sheet.skip-print { display: none !important; } }

label.field input, label.field textarea, label.field select { font-weight: 400; color: var(--ink); }

.notice.flash { display: flex; gap: 12px; align-items: flex-start; }
.notice.flash > span { flex: 1; }
.notice.flash .close { background: none; border: none; color: inherit; font-size: 20px; line-height: 1; padding: 0 2px; opacity: .6; }
.notice.flash .close:hover { opacity: 1; background: none; }
.notice.flash.fading { opacity: 0; transition: opacity .4s; }
@media (prefers-reduced-motion: reduce) { .notice.flash.fading { transition: none; } }

/* Guided loan entries */
fieldset.choices { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
fieldset.choices legend { font-weight: 600; margin-bottom: 6px; }
label.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--spruce-2); background: var(--paper); }
label.choice input { margin-top: 3px; }
label.choice strong { display: block; font-weight: 600; color: var(--ink); }
label.choice { font-weight: 400; color: var(--ink); }
label.choice .sub { display: block; }
.preview { margin-top: 12px; padding: 10px 14px; background: var(--moss-bg); border-left: 3px solid var(--moss); border-radius: var(--radius-sm); }
.preview:empty { display: none; }
.preview h3 { margin: 0 0 4px; font-size: 14px; }
.preview ul { margin: 0; padding-left: 18px; }
.flag-text { color: var(--amber); }
p.tip { margin: 6px 0 0; }

td.nowrap { white-space: nowrap; }

/* Customer drill-down: transactions under their month */
table.summary tr.tx td { font-size: 14px; background: var(--surface); }
table.summary tr.tx td:first-child { padding-left: 44px; }
.tx-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.tx-links:empty { display: none; }
dl.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 4px 0 12px; }
dl.facts dt { font-size: 12px; color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
details.acct-lines { margin-top: 14px; }
details.acct-lines summary { cursor: pointer; font-weight: 600; color: var(--muted); }

/* Reports */
table.gl tr.group th { text-align: left; background: #f3f6f5; padding-top: 14px; }
table.gl td { font-size: 14px; }
h2 .tag { vertical-align: middle; }
label.radio { display: inline-flex; gap: 4px; align-items: baseline; margin: 4px 0; cursor: pointer; }

button.link.drill { color: inherit; text-decoration: none; font: inherit; padding: 0; }
button.link.drill:hover, button.link.drill:focus-visible { text-decoration: underline; color: var(--moss, #2f5d50); }

th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink, #1a2421); text-decoration: underline; }
th.sortable .arrow { font-size: 10px; }

/* Menu sections and placeholders */
.nav .nav-block { margin-top: 6px; }
.nav .nav-group { display: grid; gap: 2px; margin: 2px 0 0; padding: 0; list-style: none; }
.nav .nav-group[hidden] { display: none; }
.nav button.nav-section {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; padding: 4px 10px;
  font: 700 11px/1.4 'Public Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8fb0a6;
}
.nav button.nav-section:hover { color: #fff; background: var(--spruce-2); }
.nav .nav-fold { display: flex; justify-content: flex-end; margin: -4px 0 2px; }
.nav button.nav-fold-btn { background: none; border: 0; cursor: pointer; padding: 4px 10px; font: 600 12px/1.4 'Public Sans', sans-serif; color: #8fb0a6; text-decoration: underline; text-underline-offset: 2px; }
.nav button.nav-fold-btn:hover { color: #fff; }
.nav button.nav-section .chev { font-size: 15px; letter-spacing: 0; transition: transform .15s; }
.nav button.nav-section[aria-expanded='true'] .chev { transform: rotate(90deg); }
.nav .soon { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.12); color: #cfe0da; }
.nav a[aria-current='page'] .soon { background: #eef1f0; color: var(--muted); }
.panel.planned ul { line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; color: inherit; text-decoration: none; }
.card:hover { border-color: var(--spruce); }
.card strong { font-size: 17px; margin-right: 6px; }
.card p { margin: 8px 0 0; }

/* Report tabs, grouped */
.report-tabs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.report-tabs .tab-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.report-tabs .tab-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.report-tabs a { padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink, #1a2421); text-decoration: none; font-weight: 500; }
.report-tabs a:hover { background: #eef1f0; }
.report-tabs a[aria-current='page'] { background: var(--spruce); color: #fff; }

/* Order status filter and pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: var(--spruce); }
.chip.on { background: var(--spruce); border-color: var(--spruce); color: #fff; }
.chip .count { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: #eef1f0; color: var(--muted); }
.chip.on .count { background: rgba(255,255,255,.2); color: #fff; }
.pill.print { background: #fde8e4; color: #9a3b2b; }
.pill.void { background: #eef1f0; color: var(--muted); text-decoration: line-through; }

/* Chart of accounts groups */
h2.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
h2.group-head .fold { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
h2.group-head .caret { display: inline-block; width: 1em; color: var(--muted); }
h2.group-head .group-total { font: 500 14px/1 'Public Sans', sans-serif; color: var(--muted); }
table.coa tr.type-row td { background: #f6f9f8; }
button.link.sub { color: var(--muted); text-decoration: none; padding: 0; }
button.link.sub:hover { text-decoration: underline; color: var(--spruce); }

/* Incoming orders: the email beside the order it became */
.split:not(table) { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
@media (max-width: 1500px) { .split:not(table) { grid-template-columns: 1fr; } }
.email-pane { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.email-body { white-space: pre-wrap; word-break: break-word; font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f7f8f7; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 10px 0 0; }
.email-frame { width: 100%; min-height: 480px; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-top: 10px; }
.email-pane .attach { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.incoming-lines td.from-email { max-width: 260px; font-size: 13px; color: var(--muted); }
.incoming-lines tr.unsure td { background: #fff8e6; }
.incoming-lines .learn { display: block; color: var(--ink, inherit); font-size: 13px; margin-top: 4px; }
textarea.code { width: 100%; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.can-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.can-total { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; }
.can-total .amt { font: 600 26px/1.1 'Barlow Condensed', sans-serif; margin: 4px 0; }
.can-total span { color: var(--muted); font-size: 13px; }
.split > .panel { margin-top: 0; }

/* Search box in the menu and its drop-down */
.search-input { width: 100%; background: var(--spruce-2); color: #fff; border: 1px solid #45685e; border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; }
.search-input::placeholder { color: #b9ccc6; }
.search-drop { position: fixed; z-index: 50; width: 440px; max-height: 70vh; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px 0; }
.search-head { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 4px; }
.search-item { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; cursor: pointer; }
.search-item .sub { font-size: 13px; }
.search-item:hover, .search-item.on { background: #eef4f1; }
.search-pad { padding: 6px 14px; }
.search-more { display: block; padding: 10px 14px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.search-form .row { align-items: end; }
@media print { .search-drop { display: none !important; } }

/* Prime cost report */
table.prime td.pc-ok { color: var(--moss); background: var(--moss-bg); }
table.prime td.pc-watch { color: var(--amber); background: var(--amber-bg); }
table.prime td.pc-over { color: var(--brick); background: var(--brick-bg); }
table.prime tr.pc-total td { border-top: 2px solid var(--line, #d9dedc); }
table.prime th .small { font-weight: 600; }
table.prime td.pc-warn { color: #9a4a12; background: #fbe8d9; }
table.prime td.pc-alert { color: var(--brick); background: var(--brick-bg); }
.sheet-preview { margin: 10px 0; }
.sheet-preview .table-wrap { max-height: 420px; overflow: auto; border: 1px solid #d6dedb; border-radius: 6px; }
table.sheet { font-size: 13px; border-collapse: collapse; }
table.sheet td { padding: 3px 8px; border-bottom: 1px solid #e6ebe9; white-space: nowrap; }
table.sheet tr:first-child td { font-weight: 600; background: #f2f4f3; position: sticky; top: 0; }
.tag.warn { background: #f7ecd6; color: #6b4a0e; }
.people-pick { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.people-pick fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; display: grid; gap: 4px; }
.people-pick legend { font-weight: 600; }
.confirm-email { margin: 10px 0; }
.confirm-email textarea, dialog textarea { width: 100%; }
.add-person input[type=search] { width: 100%; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; margin: 8px 0 12px; }
.sales-board { margin-bottom: 8px; }
.sales-board .tiles .tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius); }
.sales-board .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.sales-board .tile > span:first-child { font-size: 13px; color: var(--muted); font-weight: 600; }
.sales-board .tile strong { font-size: 24px; }
.sales-board .delta { display: flex; gap: 8px; align-items: baseline; font-size: 13px; flex-wrap: wrap; }
.sales-board .up { color: #1d6b48; font-weight: 600; }
.sales-board .down { color: #a23a2a; font-weight: 600; }
.week-bars { display: flex; gap: 14px; align-items: flex-end; height: 170px; padding: 10px 4px 0; border-bottom: 1px solid var(--line); }
.week-bars .wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.week-bars .pair { display: flex; gap: 2px; align-items: flex-end; height: 140px; }
.week-bars .bar { width: 14px; border-radius: 4px 4px 0 0; }
.legend { display: flex; gap: 16px; align-items: center; font-size: 13px; margin-bottom: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
.tag.ok { background: #e3f1ea; color: #1d6b48; }
.ideas { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.ideas .tag { margin-left: 8px; }
.store-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }
.store-chart { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.week-bars.mini { height: 100px; gap: 6px; padding-top: 6px; }
.week-bars.mini .pair { height: 70px; }
.week-bars.mini .bar { width: 9px; }
.week-bars.mini .small { font-size: 10px; }

/* Shipping: the stage steps on an order, the pickup calendar, standing orders */
ol.stages { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; counter-reset: st; }
ol.stages li { counter-increment: st; padding: 4px 12px; border-radius: 999px; background: #eef1f0; color: var(--muted); font-size: 13px; font-weight: 600; }
ol.stages li::before { content: counter(st) '. '; }
ol.stages li.done { background: var(--moss-bg); color: var(--moss); }
ol.stages li.now { background: var(--spruce); color: #fff; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-day.other { background: transparent; opacity: .6; }
.cal-today { outline: 2px solid var(--focus); outline-offset: -2px; }
.cal-num { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-week { display: grid; gap: 8px; }
.cal-week .panel { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-item { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: var(--radius-sm); border-left: 3px solid var(--muted); background: #eef1f0; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-week .cal-item { white-space: normal; font-size: 14px; padding: 6px 8px; }
.cal-item .cal-stage { color: var(--muted); font-size: 11px; }
.cal-item.planned { background: transparent; border: 1px dashed var(--muted); border-left-width: 3px; }
.cal-item.packing { border-left-color: var(--brick); background: var(--brick-bg); }
.cal-item.to_pack { border-left-color: var(--amber); background: var(--amber-bg); }
.cal-item.ready, .cal-item.pickup_set { border-left-color: #2f5a8f; background: #e8eef7; }
.cal-item.shipped { border-left-color: var(--moss); background: var(--moss-bg); }
.standing { padding: 10px 0; border-top: 1px solid var(--line); }
.standing:first-of-type { border-top: none; }
.standing.muted { opacity: .6; }
@media (max-width: 700px) { .cal-month { grid-template-columns: 1fr; } .cal-dow, .cal-day.other { display: none; } .cal-day { min-height: 0; } }
.nowrap { white-space: nowrap; }
.pull-sizes { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.pull-sizes strong { font: 700 26px/1.1 'Barlow Condensed', sans-serif; }
.tickbox { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 3px; vertical-align: middle; }
@media print { main > .print-only, main > div > h2.print-only { display: block; } .pull-block { border: none; padding: 0; break-inside: avoid; } .pull-block a { color: inherit; text-decoration: none; } }
input.line-note { width: 100%; min-width: 140px; }
@media print { tr.no-print { display: none; } }
/* Ticking several rows and acting on them all */
th.pick, td.pick { width: 30px; padding-right: 0; }
.select-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 14px; margin-bottom: 10px; background: var(--spruce); color: #fff; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.select-bar button.quiet { background: #fff; }
.select-bar button.link { color: #fff; }
.bank-line .bl-head label.pick { margin-right: 6px; }
.batch-print { display: none; }
@media print { body.printing-batch > *:not(.batch-print) { display: none !important; } body.printing-batch .batch-print { display: block; } body.printing-batch .batch-print .sheet:last-child { break-after: auto; } }
.select-bar button:not(.quiet):not(.danger):not(.link) { background: #fff; color: var(--spruce); border-color: #fff; box-shadow: inset 0 0 0 2px var(--amber); }

.chips.flow .step { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #eef1f0; color: var(--muted); font-size: 12px; font-weight: 700; }
.chips.flow .chip.on .step { background: rgba(255,255,255,.25); color: #fff; }
.from-email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 12px; padding: 8px 12px; background: #e8eef7; border-radius: var(--radius); font-size: 14px; }
.from-email-line .btn { margin-left: auto; }
a.mail-mark { text-decoration: none; color: #2f5a8f; }
@media print { html, body, .shell, main { min-height: 0 !important; height: auto !important; } }
.chip.new-chip { text-decoration: none; border-style: dashed; }
td.what { min-width: 160px; }
.cal-month .cal-item { white-space: normal; }
.cal-item .cal-stage { display: block; }
.step-cell > div { margin-top: 6px; }
.canning-grid th:first-child, .canning-grid td:first-child { min-width: 11em; }

/* Calendar events (production schedule) */
.cal-num { display: flex; justify-content: space-between; align-items: center; }
.cal-add { border: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1; padding: 0 4px; cursor: pointer; opacity: 0; }
.cal-day:hover .cal-add, .cal-week .cal-add, .cal-add:focus { opacity: 1; }
.cal-week h3 { display: flex; justify-content: space-between; }
.cal-item.ev { border-left-color: #6b6b6b; background: #f0f0f0; }
.cal-item.ev.done { opacity: .55; }
.cal-item.ev-brewing, .chip.ev-brewing.on { border-left-color: #8a5a1f; background: #f6ecdf; }
.cal-item.ev-transfer, .chip.ev-transfer.on { border-left-color: #5b4b8a; background: #ece8f6; }
.cal-item.ev-carbonating, .chip.ev-carbonating.on { border-left-color: #1f7a8a; background: #e2f2f4; }
.cal-item.ev-canning, .chip.ev-canning.on { border-left-color: #a03a5a; background: #f6e4ea; }
.cal-item.ev-kegging, .chip.ev-kegging.on { border-left-color: #4b6b2f; background: #e9f1e1; }
.cal-item.ev-cleaning, .chip.ev-cleaning.on { border-left-color: #7a7a7a; background: #efefef; }
.cal-item.ev-delivery, .chip.ev-delivery.on { border-left-color: #2f5a8f; background: #e8eef7; }
.chip.ev-chip.on { border-left-width: 4px; border-left-style: solid; color: var(--ink); }
.chip.ev-pickup.on { border-left: 4px solid #2f5a8f; }
.chip.ev-chip { color: var(--ink); background: var(--surface); }
.chip.ev-chip:not(.on) { opacity: .5; text-decoration: line-through; border-left: 4px solid transparent; }
.chip.ev-pickup.on { background: #e8eef7; color: var(--ink); }
.chip.ev-other.on { border-left: 4px solid #6b6b6b; background: #f0f0f0; color: var(--ink); }

/* The phone "Calendar" app (/calendar/): no menu */
.cal-only { max-width: 1100px; margin: 0 auto; padding: 10px 12px 40px; }
.cal-only-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.cal-only main { padding: 0; max-width: none; }
.qr-box svg { width: 150px; height: 150px; background: #fff; }
@media (max-width: 700px) {
  /* phones: the month is a list of the days that have something, plus today */
  .cal-month .cal-day:not(:has(.cal-item)):not(.cal-today) { display: none; }
  .cal-add { opacity: 1; }
}
.cal-dow-sm { display: none; }
@media (max-width: 700px) { .cal-dow-sm { display: inline; } }

/* Business logo at the top of the menu */
.nav-logo { background: #fff; border-radius: var(--radius-sm); padding: 8px; margin: 0 6px 12px; display: flex; justify-content: center; }
.nav-logo img { max-width: 100%; max-height: 72px; object-fit: contain; display: block; }
.cal-logo img { max-height: 40px; max-width: 140px; object-fit: contain; display: block; }

.cal-by { font-size: .85em; font-style: italic; }
button.quiet.on { background: var(--spruce, #1f3b34); color: #fff; }
.pill.new { background: #fbf3e2; color: #6b4a0f; }

/* ── Home page cards ── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; min-width: 0; }
.dash-card.wide { grid-column: 1 / -1; }
.dash-card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.dash-card > header h3 { margin: 0; font-size: 0.95rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.dash-edit { display: flex; gap: 4px; }
.dash-edit button { padding: 2px 8px; }
.dash-big { font-size: 1.8rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-big.owed { color: var(--brick); } .dash-big.warn { color: var(--amber); }
.dash-list { display: grid; margin-top: 8px; }
.dash-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; align-items: center; }
.dash-row:first-child { border-top: none; }
a.dash-row:hover { background: var(--paper); }
.dash-row.warn > div:first-child > div:first-child { color: var(--brick); }
.dash-row.pending { opacity: .6; }
.dash-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dash-bank { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.dash-bank:hover { border-color: var(--spruce-2); }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.dash-tile { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.dash-tile:hover { border-color: var(--spruce-2); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* This week: one calendar strip, days butted together with shared borders. */
.dash-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.dash-day { border-left: 1px solid var(--line); padding: 0 0 6px; min-height: 96px; display: grid; gap: 4px; align-content: start; font-size: .85rem; background: var(--surface); }
.dash-day:nth-child(7n+1) { border-left: none; }
.dash-day:nth-child(n+8) { border-top: 1px solid var(--line); }
.dash-day:nth-child(7n+6), .dash-day:nth-child(7n) { background: var(--paper); }
.dash-day > :not(.dash-dayname) { margin: 0 6px; }
.dash-dayname { font-weight: 600; font-size: .78rem; color: var(--muted); text-align: center; padding: 4px 0; border-bottom: 1px solid var(--line); background: var(--paper); text-transform: uppercase; letter-spacing: .03em; }
.dash-day.today { background: #f4f8f6; }
.dash-day.today .dash-dayname { background: var(--spruce); color: var(--spruce-ink); border-bottom-color: var(--spruce); }
.dash-day .cal-item { font-size: .8rem; }
.dash-card:has(.dash-week) { grid-column: span 2; }
.dash-search-out { margin-top: 10px; }
.dash-card input[type=search] { width: 100%; font-size: 1rem; padding: 9px 11px; }
.dash-search-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-search-cols h4 { margin: 0 0 4px; font-size: .85rem; color: var(--muted); }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 3px 10px; font-size: .85rem; cursor: pointer; color: inherit; }
.chip:hover { border-color: var(--spruce-2); }
.dash-hidden { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
@media (max-width: 760px) {
  .dash-card:has(.dash-week) { grid-column: 1 / -1; }
  .dash-week { grid-template-columns: 1fr; }
  .dash-day { min-height: 0; grid-template-columns: 74px 1fr; border-left: none; border-top: 1px solid var(--line); padding: 0; }
  .dash-day:first-child { border-top: none; }
  .dash-dayname { grid-row: 1 / span 9; border-bottom: none; border-right: 1px solid var(--line); text-align: left; padding: 6px; }
  .dash-day > :not(.dash-dayname) { margin: 4px 6px; }
  .dash-search-cols { grid-template-columns: 1fr; }
}
.dash-card .up, .dash-row .up { color: #1d6b48; font-weight: 600; }
.dash-card .down { color: var(--brick); font-weight: 600; }
.dash-card .warn { color: var(--amber); }

.dash-day.can-add { cursor: pointer; }
.dash-day.can-add:hover { background: #eef4f1; }
.dash-dayname { position: relative; }
.dash-add { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: inherit; font-weight: 700; font-size: 1rem; line-height: 1; padding: 0 4px; cursor: pointer; opacity: 0; }
.dash-day:hover .dash-add, .dash-add:focus { opacity: 1; }
.dash-day button.cal-item { text-align: left; width: calc(100% - 12px); border: none; font: inherit; cursor: pointer; }
.dash-empty { color: var(--muted); }
@media (max-width: 760px) { .dash-add { opacity: 1; } }

/* Screen lock */
body.locked { background: var(--paper); }
.lock-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.lock-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; width: min(420px, 100%); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.lock-card h1 { margin: 6px 0 8px; font-size: 1.5rem; }
.lock-brand { font-weight: 700; letter-spacing: .04em; color: var(--spruce); text-transform: uppercase; font-size: .85rem; }
.lock-card .field { display: grid; margin: 10px 0; }
.lock-card input[type=password] { font-size: 1.1rem; padding: 10px 12px; }
.lock-card button[type=submit] { width: 100%; padding: 10px; font-size: 1rem; }
.lock-msg { color: var(--brick); min-height: 1.2em; margin: 4px 0; }

/* Settings tabs */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.settings-tabs a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; background: var(--surface); font-size: .92rem; }
.settings-tabs a:hover { border-color: var(--spruce-2); }
.settings-tabs a.on { background: var(--spruce); border-color: var(--spruce); color: var(--spruce-ink); font-weight: 600; }
.people-grid select { min-width: 110px; }
.people-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; margin: 8px 0 12px; }

.person-bizs { display: grid; gap: 8px; }
.person-biz { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 6px; }
.person-biz .feature-grid { margin-top: 6px; }

/* Setup: tabs across the top, and the pages under a tab. Menu counts. */
.setup-strip { margin-bottom: 4px; }
.setup-strip .settings-tabs { margin-bottom: 10px; }
.setup-pages { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 16px; font-size: .92rem; }
.setup-pages a { text-decoration: none; color: var(--muted); padding: 2px 0; border-bottom: 2px solid transparent; }
.setup-pages a:hover { color: inherit; }
.setup-pages a.on { color: inherit; font-weight: 600; border-bottom-color: var(--spruce); }
.nav a[data-route] { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-count { background: #fff; color: var(--spruce); border-radius: 999px; min-width: 1.5em; padding: 0 6px; font-size: .78rem; font-weight: 700; text-align: center; line-height: 1.5; }
.nav a[aria-current='page'] .nav-count { background: var(--spruce); color: #fff; }
.nav-item.nav-apart { margin-top: 10px; padding-top: 8px; border-top: 1px solid #45685e; }

/* Calendar drag and drop */
.cal-item[draggable="true"] { cursor: grab; }
.cal-item.dragging { opacity: .4; }
.cal-day.cal-drop, .cal-week .panel.cal-drop { outline: 2px dashed #2f5a8f; outline-offset: -2px; background: #e8eef7; }

/* A pickup that isn't on an order yet: same blue as order pickups */
.cal-item.ev-pickup { border-left-color: #2f5a8f; background: #e8eef7; }
.field[hidden] { display: none; }

tr.sub-row td { background: var(--paper); }

/* Seasonal beers: the year in twelve cards. */
.seas-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.seas-year .panel { margin: 0; padding: 12px 14px; min-height: 130px; display: flex; flex-direction: column; gap: 5px; }
.seas-year h3 { margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.seas-year .cal-add { opacity: 1; font-size: 18px; }
.seas-year .panel.seas-now { border-color: var(--spruce); box-shadow: inset 0 3px 0 var(--spruce); }
.seas-item { white-space: normal; font-size: 14px; padding: 6px 8px; cursor: pointer; }
.seas-item.seas-planned { border-left-color: var(--moss); background: var(--moss-bg); }
.seas-item.seas-idea { background: transparent; border: 1px dashed var(--muted); border-left-width: 3px; }
.seas-item.cont { opacity: .6; }
.seas-item:hover, .seas-item:focus-visible { outline: 2px solid var(--spruce); outline-offset: 1px; }
.seas-item .cal-stage { display: block; white-space: normal; }
.seas-tag { margin-left: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.seas-brews { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.seas-loose { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
@media (max-width: 1150px) { .seas-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .seas-year { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .seas-year { grid-template-columns: 1fr; } .seas-year .panel { min-height: 0; } }
@media print { .seas-year { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .seas-year .panel { break-inside: avoid; min-height: 0; } .seas-year .cal-add { display: none; } }

/* Setup → People: count grid, filter chips, access pills */
.people-grid { margin: 12px 0; }
.people-grid th, .people-grid td { padding: 6px 10px; }
.people-grid td.num, .people-grid th.num { text-align: center; }
.people-grid .link.on { text-decoration: underline; font-weight: 700; }
.grid-n { min-width: 40px; padding: 3px 8px; background: var(--surface); color: var(--spruce); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; }
.grid-n:hover:not(:disabled) { border-color: var(--spruce); }
.grid-n.on { background: var(--spruce); color: var(--spruce-ink); border-color: var(--spruce); }
.grid-n:disabled { color: var(--muted); background: transparent; border-color: transparent; cursor: default; }
.people-filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; background: #fbfcfb; }
.people-filters > summary { cursor: pointer; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.chip-title { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 64px; }
.chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--spruce); color: var(--spruce-ink); border-color: var(--spruce); }
.access-pills { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.access-pill { background: none; border: 0; padding: 0; text-align: left; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.access-pill:hover { text-decoration: underline; }
.access-pill.dim { color: var(--muted); }
.access-pill.dim strong { font-weight: 500; }
.people-group h3 { margin: 16px 0 6px; }
.people-bulk { margin: 4px 0 6px; }
@media (max-width: 760px) { .chip-title { min-width: 0; flex-basis: 100%; } }
@media (max-width: 760px) {
  .people-group .table-wrap { overflow: visible; }
  .people-group thead { display: none; }
  .people-group table, .people-group tbody { display: block; }
  .people-group tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .people-group td { border: 0; padding: 0; }
  .people-group td:first-child { grid-row: span 4; padding-top: 4px; }
  .people-group td.row { flex-wrap: wrap; }
}
