/* Poppy Appeal Volunteer Rota
   Palette from the poppy and its field: poppy red, leaf green, memorial stone.
   Type: Libre Caslon for headings (English, civic, memorial), Atkinson Hyperlegible for everything people read and tap.
   The one bold idea: every place on a shift is a poppy, filled red when someone takes it. */

@font-face { font-family: "Libre Caslon"; src: url("fonts/caslon-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --poppy: #c8102e;
  --poppy-deep: #9a0c23;
  --leaf: #2f4a3b;
  --leaf-light: #e3ebe5;
  --stone: #f3f2ee;
  --stone-dark: #e4e1d9;
  --paper: #ffffff;
  --ink: #1c2420;
  --muted: #5b635e;
  --rule: #d5d2c9;
  --free: #d9d4c8;
  --serif: "Libre Caslon", Georgia, "Times New Roman", serif;
  --sans: "Atkinson", "Segoe UI", Arial, sans-serif;
  --r: 4px;
  font-size: 112.5%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--sans); line-height: 1.55; }

.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
main.wrap { padding: 2.5rem 0 5rem; min-height: 65vh; }

a { color: var(--poppy-deep); text-underline-offset: .18em; }
a:hover { color: var(--poppy); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { max-width: 66ch; margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .88rem; margin: .3rem 0 0; }

/* ---------- Poppies ---------- */
.poppy { width: 1.2rem; height: 1.2rem; display: inline-block; vertical-align: middle; color: var(--free); --eye: #c9c3b5; --petal-back: #cdc7ba; }
.poppy.on { color: var(--poppy); --eye: var(--ink); --petal-back: #a90d26; }
.poppies { display: inline-flex; gap: .2rem; align-items: center; vertical-align: middle; }
.poppies.big .poppy { width: 1.65rem; height: 1.65rem; }
.poppies .more { font-size: .8rem; color: var(--muted); margin-left: .2rem; }

/* ---------- Header and footer ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; flex-wrap: wrap; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: var(--ink); }
.brand-poppy { width: 1.9rem; height: 1.9rem; }
.site-nav { display: flex; align-items: center; gap: .4rem 1.3rem; flex-wrap: wrap; }
.site-nav > a, .site-nav .linklike { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-nav > a:hover, .site-nav .linklike:hover { color: var(--poppy-deep); text-decoration: underline; }
.site-nav > a.btn { color: var(--paper); text-decoration: none; }

.site-footer { background: var(--leaf); color: #d7e2da; font-size: .88rem; padding: 2rem 0; }
.site-footer p { margin: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; align-items: baseline; }
.footer-inner nav { display: flex; gap: 1.2rem; }
.site-footer a { color: #ffffff; }

/* ---------- Buttons and forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 2px solid var(--poppy); background: var(--poppy); color: var(--paper);
  padding: .7rem 1.4rem; border-radius: var(--r); font: inherit; font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none; min-height: 2.9rem;
}
.btn:hover { background: var(--poppy-deep); border-color: var(--poppy-deep); color: var(--paper); }
.btn-small { padding: .4rem .9rem; font-size: .9rem; min-height: 2.3rem; }
.btn-quiet { background: var(--paper); color: var(--leaf); border-color: var(--leaf); }
.btn-quiet:hover { background: var(--leaf); color: var(--paper); border-color: var(--leaf); }
.btn-danger { background: transparent; color: var(--poppy-deep); border-color: var(--poppy-deep); }
.btn-danger:hover { background: var(--poppy-deep); color: var(--paper); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--poppy-deep); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
form.inline { display: inline; margin: 0; }

label { display: block; font-weight: 700; margin: 1.1rem 0 .35rem; }
label.check { font-weight: 400; display: flex; gap: .7rem; align-items: flex-start; }
label.check input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--poppy); }

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search],
input[type=number], input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: .6rem .75rem; min-height: 2.9rem;
  border: 1.5px solid #b9b5aa; border-radius: var(--r); background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-light); outline: none; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0 1rem; }
.form-actions { margin-top: 1.6rem; display: flex; gap: 1rem 1.4rem; align-items: center; flex-wrap: wrap; }
.days { display: flex; flex-wrap: wrap; gap: .5rem; }
.days label { margin: 0; font-weight: 400; display: flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--paper); cursor: pointer; }
.days input { accent-color: var(--poppy); }

.branch-picker .branch-filter { margin-bottom: .45rem; }
.branch-count:empty { display: none; }

.errors { border-left: 4px solid var(--poppy); background: #fbeeee; padding: .9rem 1.1rem; margin-bottom: 1.2rem; border-radius: 0 var(--r) var(--r) 0; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.flash { padding: .9rem 1.1rem; margin-bottom: 1.5rem; border-radius: 0 var(--r) var(--r) 0; border-left: 4px solid; background: var(--paper); }
.flash-success { border-color: var(--leaf); background: var(--leaf-light); }
.flash-error { border-color: var(--poppy); background: #fbeeee; }
.flash-info { border-color: var(--muted); }

/* ---------- Surfaces ---------- */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.5rem 1.75rem; margin-bottom: 1.5rem; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { font-size: 1.25rem; }

/* Single-task pages (log in, sign up, account): a centred sheet of paper. */
.sheet { max-width: 38rem; margin-inline: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 2.2rem 2.5rem 2.5rem; }
.sheet + .sheet { margin-top: 1.5rem; }
.sheet h1 { font-size: 2.1rem; }
.sheet .after { text-align: center; margin: 1.5rem 0 0; max-width: none; }
.form-narrow { max-width: 38rem; margin-inline: auto; }

/* ---------- Home ---------- */
.home main.wrap { padding-top: 0; }
.hero { margin-inline: calc(50% - 50vw); background: var(--paper); border-bottom: 1px solid var(--rule); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; padding: 4.5rem 0 4rem; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.1rem); line-height: 1.04; max-width: 12ch; margin-bottom: .45em; }
.hero .lead { font-size: 1.25rem; max-width: 34ch; }
.finder { margin-top: 2rem; max-width: 30rem; }
.finder label { margin-top: 0; }
.finder .btn { margin-top: .8rem; width: 100%; }
.finder .after { margin-top: .9rem; font-size: .95rem; }

.tray { margin: 0; background: var(--leaf); border-radius: 10px; padding: 2rem 2rem 1.6rem; color: #e8efe9; box-shadow: inset 0 0 0 6px #284032; }
.tray-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
.tray-grid .poppy { width: 100%; height: auto; aspect-ratio: 1; color: #436452; --petal-back: #3b5a49; --eye: #36513f; }
.tray-grid .poppy.on { color: var(--poppy); --petal-back: #a90d26; --eye: #14110f; }
.tray p { margin: 1.1rem 0 0; font-size: .95rem; max-width: none; }
.tray strong { color: var(--paper); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 3.5rem 0 1rem; }
.how h2 { font-size: 1.25rem; margin-bottom: .35em; }
.how p { color: var(--muted); }
.how .step { border-top: 3px solid var(--ink); padding-top: 1rem; }
.how .n { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--poppy); display: block; margin-bottom: .5rem; }

/* ---------- Shift board ---------- */
.board-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.board-head h1 { margin-bottom: .2em; }
.board-head p { margin: 0; color: var(--muted); }
.filters { display: flex; gap: .8rem 1.2rem; align-items: end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.board-head .filters { margin-bottom: 0; }
.filters label { margin: 0 0 .3rem; font-size: .85rem; }
.filters select, .filters input:not([type=checkbox]) { width: auto; min-width: 11rem; }
.filters label.check { align-self: center; margin: 1.2rem 0 0; font-size: .95rem; }

.day { display: grid; grid-template-columns: 8.5rem 1fr; gap: 2rem; padding: 1.8rem 0; border-top: 1px solid var(--rule); }
.day:first-of-type { border-top: 0; padding-top: .4rem; }
.day-date { margin: 0; font-family: var(--serif); position: sticky; top: 1rem; align-self: start; }
.day-date .num { display: block; font-size: 3.6rem; line-height: .9; font-weight: 700; }
.day-date .dow { display: block; font-family: var(--sans); font-weight: 700; font-size: 1rem; margin-top: .45rem; }
.day-date .mon { display: block; font-family: var(--sans); font-weight: 400; font-size: .95rem; color: var(--muted); }

.slots { display: grid; gap: .65rem; }
.slot {
  display: grid; grid-template-columns: 9.2rem minmax(0, 1fr) auto; gap: .5rem 1.4rem; align-items: center;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem 1.2rem;
}
.slot-time { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.slot-time { white-space: nowrap; }
.slot-time small { font-family: var(--sans); }
.slot-time small { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); margin-top: .15rem; }
.slot-where strong { display: block; font-size: 1.05rem; }
.places { display: flex; align-items: center; gap: .6rem; margin: .3rem 0 .15rem; font-size: .92rem; font-weight: 700; }
.slot.full .places { color: var(--muted); font-weight: 400; }
.slot-where .meta { display: block; font-size: .88rem; color: var(--muted); }
.slot-action form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.slot-action select { width: auto; min-height: 2.5rem; padding: .35rem .6rem; }
.slot-action input[type=text] { width: 12rem; min-height: 2.5rem; padding: .35rem .6rem; }
.slot-action input[hidden] { display: none; }
.status { font-weight: 700; font-size: .95rem; }
.slot.full { background: transparent; }
.slot.full .slot-time, .slot.full strong { color: var(--muted); }
.slot.full .status { color: var(--muted); }
.slot.mine { background: var(--leaf-light); border-color: #b9cbbd; }
.slot.mine .status { color: var(--leaf); }
.slot.mine .status a { color: var(--leaf); font-weight: 400; font-size: .88rem; display: block; }

.empty { text-align: center; padding: 3rem 1.5rem; }
.empty .poppy { width: 3rem; height: 3rem; margin-bottom: 1rem; }
.empty p { margin-inline: auto; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .85rem; font-weight: 700; color: var(--muted); background: var(--stone); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.inactive td { color: var(--muted); }
td .poppies { margin-right: .4rem; }

/* ---------- Organiser area ---------- */
.admin-tabs { display: flex; gap: 0 1.6rem; border-bottom: 1px solid var(--rule); margin: -1rem 0 1.4rem; flex-wrap: wrap; overflow: visible; }
.check-ok { color: var(--leaf); font-weight: 700; }
.check-bad { color: var(--poppy-deep); font-weight: 700; }
.admin-tabs a { padding: .9rem 0 .7rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--poppy); }
.managing { color: var(--muted); font-size: .92rem; margin-bottom: 1.6rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; margin-bottom: 2.2rem; }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.1rem 1.25rem; }
.stat .n { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1.05; display: block; }
.stat .l { color: var(--muted); font-size: .9rem; }
.bar-meter { height: 8px; background: var(--stone-dark); border-radius: 4px; overflow: hidden; margin-top: .6rem; }
.bar-meter span { display: block; height: 100%; background: var(--poppy); }

details.panel > summary { cursor: pointer; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "+"; font-family: var(--sans); font-size: 1.5rem; color: var(--poppy); }
details.panel[open] > summary::after { content: "\2212"; }
details.panel[open] > summary { margin-bottom: .8rem; }

.rota-day { margin: 2.5rem 0 1rem; font-size: 1.6rem; }
.rota-shift { margin-bottom: 1.4rem; break-inside: avoid; }
.rota-shift > header { display: flex; justify-content: space-between; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .55rem; }
.rota-shift h3 { margin: 0; font-family: var(--sans); font-size: 1.05rem; }
.gap { color: var(--poppy-deep); font-weight: 700; font-size: .92rem; }
.done { color: var(--leaf); font-weight: 700; font-size: .92rem; }
details.add-by-hand { margin-top: .5rem; }
details.add-by-hand summary { cursor: pointer; color: var(--poppy-deep); font-size: .92rem; }
details.add-by-hand form { margin-top: .5rem; background: var(--paper); border: 1px dashed var(--rule); border-radius: var(--r); padding: 0 1rem 1rem; }
details.add-by-hand .form-row { align-items: end; }
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; margin: 0 0 1rem; }

.pager { display: flex; gap: 1.2rem; align-items: center; margin: 1.2rem 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; margin-top: 2rem; }

/* ---------- Bottom notices (cookies, add to phone) ---------- */
.notice {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  width: min(44rem, calc(100% - 1.5rem)); display: flex; align-items: center; gap: .8rem 1.2rem; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--leaf);
  border-radius: var(--r); padding: 1rem 1.2rem; box-shadow: 0 8px 28px rgba(28, 36, 32, .18);
}
.notice[hidden] { display: none; }
.notice p { margin: 0; flex: 1 1 12rem; font-size: .95rem; }
.notice-install { border-top-color: var(--poppy); }
.notice-install .poppy { width: 2rem; height: 2rem; flex: none; }

/* ---------- Add-to-phone guide ---------- */
.guide-device { border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-top: 1.4rem; }
.guide-device.yours h2::after { content: "Your phone"; font-family: var(--sans); font-size: .75rem; font-weight: 700; background: var(--leaf-light); color: var(--leaf); padding: .2rem .5rem; border-radius: 3px; margin-left: .6rem; vertical-align: middle; }
.guide-steps { padding-left: 0; list-style: none; counter-reset: step; }
.guide-steps li { counter-increment: step; position: relative; padding: 0 0 .9rem 2.6rem; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--poppy); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }

/* ---------- Falling poppies (home page) ---------- */
.poppy-fall { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.poppy.falling { position: absolute; top: 0; will-change: transform, opacity; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .15)); }

/* ---------- Site stats ---------- */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 9rem; padding: .5rem 0 0; border-bottom: 1px solid var(--ink); }
.chart .col { flex: 1; background: var(--poppy); min-height: 2px; border-radius: 2px 2px 0 0; position: relative; }
.chart .col.zero { background: var(--stone-dark); }
.chart-axis { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.meter-cell { min-width: 9rem; }
.meter-cell .bar-meter { margin-top: .25rem; }
.stat .sub { display: block; font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.attention li { margin-bottom: .3rem; }

/* ---------- Sign up as volunteer / organiser ---------- */
fieldset.choice { border: 0; padding: 0; margin: 1.2rem 0 .4rem; display: grid; gap: .6rem; }
fieldset.choice legend { font-weight: 700; padding: 0; margin-bottom: .45rem; }
.choice-card { margin: 0; font-weight: 400; display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--rule); border-radius: var(--r); cursor: pointer; background: var(--paper); }
.choice-card input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--poppy); flex: none; }
.choice-card strong { display: block; }
.choice-card span { font-size: .95rem; color: var(--muted); }
.choice-card span strong { color: var(--ink); font-size: 1rem; }
.choice-card:has(input:checked) { border-color: var(--poppy); background: #fdf3f4; }
.requests .request { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1.5rem; flex-wrap: wrap; padding: .9rem 0; border-top: 1px solid var(--rule); }
.requests .request:first-of-type { border-top: 0; }
.requests .actions { display: flex; gap: .6rem; }

.county-quick { display: flex; gap: .4rem; align-items: center; }
.county-quick input { min-height: 2.3rem; padding: .3rem .5rem; width: 10rem; }

.bulk-bar { display: flex; align-items: center; gap: .6rem 1.4rem; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; padding: .6rem .9rem; position: sticky; top: 0; z-index: 5; }
.bulk-bar + .table-wrap { border-radius: 0 0 var(--r) var(--r); }
.bulk-bar label.check { margin: 0; font-weight: 700; }
.bulk-count { color: var(--muted); font-size: .92rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.delete-matching { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; margin-top: 1.5rem; border-left: 4px solid var(--poppy-deep); }
.delete-matching p { margin: .2rem 0 0; }

.danger-zone { border-left: 4px solid var(--poppy-deep); }

.import-notes { border-left: 4px solid var(--khaki, #6e6a3f); }
.import-notes ul { margin: 0; padding-left: 1.2rem; }

.group-book { margin: 0; border-radius: 0; border-bottom: 0; border-left: 4px solid var(--leaf); }
.group-book[hidden] { display: none; }
.slot-where .covered { display: block; font-size: .88rem; color: var(--leaf); font-weight: 700; margin-top: .15rem; }

/* ---------- Who's collecting (wall chart) ---------- */
.board-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.board-top h1 { margin-bottom: .2em; }
.board-top .lead { margin: 0; }
.eyebrow { font-weight: 700; color: var(--poppy); text-transform: none; letter-spacing: .02em; margin: 0 0 .3rem; }
.board-actions { display: flex; gap: .6rem; }
.board-day { margin: 2rem 0 0; break-inside: avoid; }
.board-day h2 { display: flex; align-items: baseline; gap: .5rem; font-size: 1.35rem; margin-bottom: .6rem; }
.board-day h2 .num { font-size: 2.2rem; line-height: 1; }
.board-day h2 .mon { color: var(--muted); font-family: var(--sans); font-weight: 400; font-size: 1rem; }
table.board { table-layout: fixed; min-width: 36rem; }
table.board th, table.board td { border: 1px solid var(--rule); padding: .7rem .8rem; }
table.board thead th { background: var(--leaf); color: #fff; font-size: .95rem; border-color: var(--leaf); }
table.board .board-time { width: 7.5rem; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); background: var(--stone); white-space: nowrap; }
table.board thead .board-time { background: var(--leaf); color: #fff; font-family: var(--sans); font-size: .95rem; }
.board td { vertical-align: top; }
.board-names { list-style: none; margin: .45rem 0 0; padding: 0; }
.board-names li { margin: .15rem 0; }
.board-names li.is-group { font-weight: 700; color: var(--leaf); }
.board-names .you { background: var(--leaf); color: #fff; font-size: .72rem; font-weight: 700; padding: .05rem .4rem; border-radius: 3px; vertical-align: middle; }
.board-names .count { color: var(--muted); font-size: .85rem; }
.board-need { display: inline-block; margin-top: .4rem; font-size: .85rem; font-weight: 700; color: var(--poppy-deep); }
.board-open { background: #fffafa; }
.board-full { background: var(--paper); }
.board-mine { box-shadow: inset 4px 0 0 var(--leaf); }
.board-none { color: var(--rule); text-align: center; background: var(--stone); }
.board-note { margin-top: 2rem; }

.email-allowance { display: flex; align-items: center; gap: .7rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: .7rem 1rem; }
.email-allowance .poppy { width: 1.5rem; height: 1.5rem; }
.email-allowance.none-left strong { color: var(--poppy-deep); }
.email-compose h2 { margin-top: 1.8rem; font-size: 1.2rem; }
.email-compose h2:first-of-type { margin-top: 0; }
.template-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.template-pick { padding: .5rem .9rem; border: 1.5px solid var(--rule); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--paper); font-weight: 700; font-size: .92rem; }
.template-pick:hover { border-color: var(--ink); color: var(--ink); }
.template-pick.current { border-color: var(--poppy); background: #fdf3f4; }
.email-compose textarea { font-family: var(--sans); line-height: 1.5; }
.email-compose .choice-card { margin-bottom: .5rem; }
.email-compose code { background: var(--stone); padding: 0 .3rem; border-radius: 3px; font-size: .85rem; }
pre.email-body { white-space: pre-wrap; font-family: var(--sans); background: var(--stone); padding: 1rem; border-radius: var(--r); margin: .5rem 0 1rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.invite-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.5rem; align-items: start; margin-top: 1rem; }
.invite-edit h2, .invite-actions h2 { font-size: 1.2rem; }
.invite-edit textarea { font-family: var(--sans); line-height: 1.5; }
.invite-link code { background: var(--stone); padding: .3rem .5rem; border-radius: 3px; font-size: .85rem; word-break: break-all; }
.invite-actions .btn { width: 100%; }
.invite-actions .hint { margin: .35rem 0 1rem; }
.invite-more { display: flex; flex-wrap: wrap; gap: .5rem; }
.invite-more .btn { width: auto; flex: 1 1 auto; }
.paste-help { background: var(--leaf-light); border: 1px solid #b9cbbd; border-left: 4px solid var(--leaf); border-radius: var(--r); padding: .9rem 1.1rem; margin: 0 0 1rem; }
.paste-help[hidden] { display: none; }
.paste-help p { margin: 0 0 .55rem; font-size: .95rem; }
.paste-help-title { font-weight: 700; font-size: 1.05rem !important; color: var(--leaf); }
.invite-status { font-weight: 700; color: var(--leaf); min-height: 1.5em; margin: .8rem 0 .4rem; }
.tip-box { background: var(--stone); border-radius: var(--r); padding: .7rem .9rem; font-size: .9rem; margin: .5rem 0 0; }
.invite-preview { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
/* Show the email exactly as an inbox would: undo the site's own table styling inside the preview. */
.invite-preview table { width: auto; border-collapse: separate; background: none; }
.invite-preview table[width="100%"] { width: 100%; }
.invite-preview table[width="560"] { width: 100%; max-width: 560px; }
.invite-preview td, .invite-preview th { padding: 0; border-bottom: 0; vertical-align: top; text-align: left; }
.invite-preview td[valign="middle"] { vertical-align: middle; }
@media (max-width: 900px) { .invite-layout { grid-template-columns: 1fr; } }

.cal-menu { position: relative; display: inline-block; margin: .3rem 0; }
.cal-menu summary { cursor: pointer; list-style: none; font-size: .9rem; font-weight: 700; color: var(--leaf); padding: .3rem .7rem; border: 1.5px solid var(--leaf); border-radius: var(--r); background: var(--paper); white-space: nowrap; }
.cal-menu summary::-webkit-details-marker { display: none; }
.cal-menu summary::before { content: "+ "; }
.cal-menu[open] summary { background: var(--leaf); color: #fff; }
.cal-menu > div { margin-top: .35rem; min-width: 14rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: .2rem 0; }
.cal-menu > div a { display: block; padding: .55rem .9rem; color: var(--ink); text-decoration: none; font-size: .95rem; }
.cal-menu > div a:hover { background: var(--stone); }
.shift-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.cancel-card { background: var(--stone); border-radius: var(--r); padding: 1rem 1.2rem; margin: 0 0 1rem; }
.cancel-card p { margin: 0; }

.login-facts { list-style: none; padding: 0; margin: 0 0 1rem; }
.login-facts li { padding: .3rem 0; border-bottom: 1px solid var(--stone-dark); }

.admin-site { display: flex; align-items: center; gap: .2rem 1.3rem; flex-wrap: wrap; background: var(--leaf); border-radius: var(--r); padding: .55rem 1rem; margin: -1rem 0 1rem; }
.admin-site a { color: #e3ebe5; text-decoration: none; font-weight: 700; font-size: .92rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.admin-site a:hover { color: #fff; }
.admin-site a[aria-current=page] { color: #fff; border-bottom-color: var(--poppy); }
.admin-site-label { color: #fff; font-family: var(--serif); font-weight: 700; margin-right: .4rem; }
.admin-site .badge { display: inline-block; background: var(--poppy); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; margin-left: .2rem; }
.branch-return { margin: -.4rem 0 1.2rem; font-size: .92rem; color: var(--muted); }
.branch-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--poppy); border-radius: var(--r); padding: .7rem 1rem; margin: 0 0 .6rem; }
.branch-bar .eyebrow { display: block; font-size: .8rem; margin: 0; }
.branch-bar strong { font-family: var(--serif); font-size: 1.3rem; }
.branch-bar .county { color: var(--muted); margin-left: .5rem; }
.branch-bar-actions { display: flex; gap: 1.2rem; font-size: .92rem; }
.admin-site + .branch-bar + .admin-tabs, .branch-bar + .admin-tabs { margin-top: 0; }

/* ---------- Help ---------- */
.help-head { max-width: 46rem; margin: 0 auto 2rem; }
.help-tabs { display: flex; gap: 0 1.6rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.help-tabs a { padding: .6rem 0; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.help-tabs a:hover { color: var(--ink); }
.help-tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--poppy); }
.guide-text { max-width: 46rem; margin: 0 auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 2rem 2.5rem 2.5rem; }
.guide-text h2 { margin-top: 2.2rem; font-size: 1.45rem; scroll-margin-top: 1rem; }
.guide-text h2:first-of-type { margin-top: 1.2rem; }
.guide-text ol, .guide-text ul { padding-left: 1.3rem; max-width: 66ch; }
.guide-text li { margin-bottom: .45rem; }
.guide-text .tip { background: var(--leaf-light); border-left: 4px solid var(--leaf); padding: .8rem 1rem; border-radius: 0 var(--r) var(--r) 0; }
.guide-text .example { background: var(--stone); border-radius: var(--r); padding: .9rem 1.1rem; margin: 0 0 1rem; }
.poppy-key { display: flex; align-items: center; gap: .7rem; }
.faq #faq-search { margin: .5rem 0 .5rem; }
.faq-section h2 { font-size: 1.2rem; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { cursor: pointer; padding: .85rem 2rem .85rem 0; font-weight: 700; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: .2rem; top: .7rem; color: var(--poppy); font-size: 1.3rem; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item div { padding: 0 0 .6rem; }
.faq-item[hidden], .faq-section[hidden] { display: none; }
.still-stuck { margin-top: 2.5rem; background: var(--stone); }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0; }
  .how { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2.5rem; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wrap { width: min(1100px, 100% - 1.5rem); }
  main.wrap { padding-top: 1.5rem; }
  .sheet { padding: 1.5rem 1.25rem 1.75rem; }
  .guide-text { padding: 1.25rem 1.1rem 1.6rem; }
  .brand span { font-size: 1rem; }
  .day { grid-template-columns: 1fr; gap: .9rem; padding: 1.4rem 0; }
  .day-date { position: static; display: flex; align-items: baseline; gap: .6rem; }
  .day-date .num { font-size: 2.4rem; }
  .day-date .dow, .day-date .mon { display: inline; margin: 0; }
  .slot { grid-template-columns: 1fr; gap: .5rem; padding: 1rem; }
  .slot-time small { display: inline; margin-left: .4rem; }
  .slot-action form { justify-content: flex-start; }
  .slot.full .slot-action { display: none; }
  .slot-action form .btn { flex: 1; }
  .slot-action input[type=text] { width: 100%; }
  .filters select, .filters input:not([type=checkbox]) { min-width: 0; width: 100%; }
  .filters > div { flex: 1 1 100%; }
}

@media print {
  .board-page main.wrap { width: 100%; }
  table.board th, table.board td { padding: .35rem .45rem; font-size: 9.5pt; }
  table.board thead th { background: #2f4a3b !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .board-open { background: #fff !important; }
  .site-header, .site-footer, .notice, .poppy-fall, .admin-tabs, .board-actions, .filters, .toolbar, .no-print, details.add-by-hand, .btn, .managing { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .table-wrap { border: 0; }
  main.wrap { padding: 0; }
  .poppy.on { fill: #000; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
