:root {
  --ink: #1d2125; --muted: #5d656d; --line: #d9dde1; --bg: #f3f4f5; --card: #fff;
  --steel: #16253d; --accent: #ea620e; --accent-dark: #c24f08;
  --red: #c62828; --red-bg: #fdecea; --amber: #a86400; --amber-bg: #fff4dc; --blue: #3b5873; --blue-bg: #e9f0f6;
  --green: #2e7d32; --green-bg: #e8f5e9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
/* light drafting-paper background behind the browsing pages (the sign-in pages have their own blueprint).
   It stays put while the page scrolls on desktop; phones scroll it, because fixed backgrounds stutter there. */
body:not(.login-bg) { background: #f3f5f7 url("/static/paper-bg.webp") center top / cover no-repeat fixed; }
@media (max-width: 720px), (hover: none) { body:not(.login-bg) { background-attachment: scroll; background-size: auto 100vh; background-repeat: repeat-y; } }
a { color: #1f5f99; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 0.4em 0 0.4em; }
h2 { font-size: 1.25rem; margin: 1.2em 0 0.5em; }
h3 { font-size: 1rem; margin: 1.2em 0 0.4em; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 48px; }
main.wide { max-width: 1200px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.ok { color: var(--green); } .wait { color: var(--amber); } .bad { color: var(--red); }

/* header + footer */
.top { background: #fff; color: var(--steel); border-bottom: 4px solid var(--accent); box-shadow: 0 1px 3px rgba(22,37,61,.08); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; }
.brand img { height: 48px; width: auto; display: block; }
.top nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top nav a { color: var(--steel); text-decoration: none; font-weight: 600; }
.top nav a:hover { color: var(--accent-dark); text-decoration: underline; }
.top nav a.btn { color: #fff; text-decoration: none; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; padding: 20px 0 32px; }
footer p { margin: 0.3em 0; max-width: 70ch; }

/* buttons */
button, .btn { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid #b8bec4; background: #fff; color: var(--ink); padding: 8px 14px; }
button:hover { background: #f0f2f4; }
.btn, button.primary, .postform button[type=submit].btn { background: var(--accent); border-color: var(--accent-dark); color: #fff; font-weight: 600; text-decoration: none; display: inline-block; }
.btn:hover, button.primary:hover { background: var(--accent-dark); }
.btn.alt { background: var(--steel); border-color: var(--steel); }
.btn.big { padding: 11px 20px; font-size: 1.05rem; }
.btn.block { display: block; width: 100%; text-align: center; }
button.danger { color: var(--red); border-color: #e3a6a6; }
button.danger:hover { background: var(--red-bg); }
button.small { padding: 4px 10px; font-size: 0.875rem; }
.link { margin-left: 8px; }
form.inline { display: inline; }

/* board */
.intro { border: 1px solid var(--line); border-radius: 10px; padding: 28px 26px; margin: 20px 0 16px;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.35) 100%), #fff url("/static/blueprint.webp") center / cover no-repeat; }
.intro h1 { margin-top: 0; }
.intro p { max-width: 62ch; margin: 0.5em 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; align-items: center; }
.filters input[type=search] { flex: 1 1 240px; }
.filters select { flex: 0 1 auto; max-width: 100%; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #b8bec4; border-radius: 6px; padding: 8px 10px; background: #fff; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.count { color: var(--muted); font-size: 0.875rem; margin: 4px 0 10px; min-height: 1em; }
.cards { display: grid; gap: 10px; }
.card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: inherit; text-decoration: none; }
.card:hover { border-color: #9aa3ab; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.card.hot { border-left: 5px solid var(--red); }
.card h2 { font-size: 1.1rem; margin: 2px 0 4px; color: #123a5e; }
.card .info { min-width: 0; flex: 1; }
.card .snip { margin: 0 0 6px; color: #3a4148; font-size: 0.95rem; overflow-wrap: anywhere; }
.where { color: var(--muted); font-size: 0.875rem; margin: 0; }
.thumb { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; flex: none; background: #e4e7ea; }
.thumb.none { display: flex; align-items: center; justify-content: center; color: #8a939b; font-size: 0.8rem; }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }
.cat { color: var(--muted); }
.badge { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 4px; padding: 2px 7px; }
.badge.u-breakdown { background: var(--red-bg); color: var(--red); }
.badge.u-soon { background: var(--amber-bg); color: var(--amber); }
.badge.u-planned { background: var(--blue-bg); color: var(--blue); }
.badge.example { background: #eef0f3; color: #4a5568; border: 1px dashed #9aa3af; }
/* board layout: on phones and laptops the filters sit in a bar above the jobs;
   on wide screens they move into a left sidebar with a "type of work" list */
body.board-page .wrap { max-width: 1240px; }
.board { margin-top: 18px; }
.fl, .factions { display: contents; }
.fl > span, .side-h, .catlist { display: none; }
.board .filters { margin-top: 0; }
@media (max-width: 1099px) {
  body.board-page .wrap { max-width: 980px; }
}
@media (min-width: 1100px) {
  .board { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
  .sidebar { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; display: grid; gap: 12px; }
  .board .filters { display: block; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; }
  .side-h { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
  .fl { display: grid; gap: 3px; margin: 0 0 10px; }
  .fl > span { display: block; font-size: 0.85rem; font-weight: 600; color: var(--steel); }
  .fl input, .fl select { width: 100%; }
  .fl.cat-select { display: none; }
  .factions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
  .factions button { background: var(--steel); border-color: var(--steel); color: #fff; font-weight: 600; flex: 1; }
  .factions button:hover { background: #22375a; }
  .factions .link { margin-left: 0; font-size: 0.9rem; }
  .catlist { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 10px 10px; }
  .catlist .side-h { padding: 0 6px; }
  .catlist ul { list-style: none; margin: 0; padding: 0; }
  .catlist a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.92rem; line-height: 1.3; }
  .catlist a:hover { background: #f0f2f4; }
  .catlist a.on { background: #fff1e6; color: var(--accent-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
  .catlist .n { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: right; }
  .catlist a.on .n { color: var(--accent-dark); }
  .results .count { margin-top: 0; }
}
.empty { background: var(--card); border: 1px dashed #b8bec4; border-radius: 10px; padding: 28px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; }

/* post page */
.crumbs { margin: 16px 0 0; font-size: 0.9rem; }
.post .where { margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #e4e7ea; }
.docs { padding-left: 20px; }
.credit { font-size: 0.75rem; color: var(--muted); margin: 4px 0 0; }
.credit a { color: var(--muted); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.box h3 { margin-top: 0; }
.box p { margin: 0.45em 0; overflow-wrap: anywhere; }
.facts .muted { display: inline-block; min-width: 72px; }
.report summary { cursor: pointer; color: var(--muted); font-size: 0.875rem; }
.report form { margin-top: 8px; display: grid; gap: 8px; }
.report label { display: grid; gap: 4px; font-size: 0.875rem; }

/* notices */
.notice { background: var(--blue-bg); border: 1px solid #c6d6e4; border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.notice.warn { background: var(--amber-bg); border-color: #f0d79b; }
.notice.done { background: var(--green-bg); border-color: #b9dcbb; }
.notice ul { margin: 0; padding-left: 20px; }
.notice.big p { margin: 0.4em 0; }
.copyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.copyrow input { flex: 1 1 260px; font-size: 0.875rem; }

/* forms */
.lead { max-width: 62ch; }
.postform { max-width: 720px; }
fieldset { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 12px 16px 16px; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.postform label, .narrowform label { display: grid; gap: 4px; margin: 10px 0; font-weight: 600; }
.postform label input, .postform label select, .postform label textarea { font-weight: 400; width: 100%; }
.label { font-weight: 600; margin: 12px 0 4px; }
.radios { display: grid; gap: 6px; }
.postform label.radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.postform label.radio input { width: auto; margin-top: 4px; }
.postform label.radio:has(input:checked) { border-color: var(--accent); background: #fff7f0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.row.other-town { grid-template-columns: 1fr 90px; }
.err { color: var(--red); font-weight: 400; font-size: 0.875rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.narrowform { max-width: 360px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.postform label.thumbpick { display: grid; gap: 4px; font-weight: 400; margin: 0; width: 110px; font-size: 0.875rem; }
.thumbpick img, .thumbpick .pdf { width: 110px; height: 90px; object-fit: cover; border-radius: 6px; background: #e4e7ea; }
.thumbpick .pdf { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.75rem; overflow: hidden; padding: 4px; overflow-wrap: anywhere; }
.thumbpick input { width: auto !important; }
.status .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* accounts and shops */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; margin-bottom: 8px; }
.postform label.checkopt { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 2px 0; }
.postform label.checkopt input { width: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.tag { font-size: 0.8rem; background: var(--blue-bg); color: var(--blue); border-radius: 4px; padding: 2px 8px; text-decoration: none; }
/* code work: badges are dark steel so they stand apart from the blue type-of-work tags */
.tag.code { background: var(--steel); color: #fff; font-weight: 600; }
.codegroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 18px; }
.codegroup-h { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--steel); margin: 8px 0 2px; }
.postform label.checkopt.code { align-items: flex-start; margin: 3px 0; line-height: 1.3; }
.postform label.checkopt.code input { margin-top: 3px; }
.postform label.checkopt.code .muted { font-size: 0.85rem; }
.card-codes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.card-codes .tags { margin: 0; }
details.codework > summary { cursor: pointer; font-weight: 700; padding: 2px 0; }
details.codework[open] > summary { margin-bottom: 6px; }
.warnbox { background: var(--amber-bg); border-color: #f0d79b; }
.btn.small-btn { padding: 4px 10px; font-size: 0.875rem; }
.login-card .narrowform { max-width: none; }
.login-card .radios { margin-bottom: 4px; }
.login-card label.radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; border: 1px solid #a3abb3; border-radius: 8px; padding: 8px 10px; cursor: pointer; background: rgba(255,255,255,.78); text-shadow: none; }
.login-card .muted { color: #3f4850; }
@media (max-width: 480px) {
  body .login-card { border-width: 24px; border-image-width: 24px; padding: 0 4px 2px; }
  body .card-logo img { height: 52px; }
}
.login-card label.radio input { width: auto; margin-top: 4px; }
.login-card label.radio:has(input:checked) { border-color: var(--accent); background: #fff7f0; }
.narrowform label input { width: 100%; }
body.login-bg .login-card { max-width: 460px; }

/* notification bell */
.top nav a.bell { position: relative; display: inline-flex; align-items: center; padding: 2px; }
.top nav a.bell svg { display: block; }
.top nav a.bell .pill { position: absolute; top: -6px; right: -10px; font-size: 0.7rem; }
.note-ico { display: inline-block; width: 1.2em; color: var(--accent-dark); }
.alerts-table { border-collapse: collapse; width: 100%; max-width: 720px; background: var(--card); }
.alerts-table th, .alerts-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.alerts-table td.c, .alerts-table th.c { text-align: center; width: 70px; }
.alerts-table input { width: 18px; height: 18px; }
.pushbox .actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pushbox [data-push-status] { font-weight: 600; }

/* private messages */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pill { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; line-height: 1.5; text-align: center; vertical-align: 1px; }
.convlist { display: grid; gap: 8px; max-width: 760px; }
.conv { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: inherit; text-decoration: none; }
.conv:hover { border-color: #9aa3ab; }
.conv.unread { border-left: 4px solid var(--accent); }
.conv.unread .conv-subj { font-weight: 700; }
.conv-top { display: flex; justify-content: space-between; gap: 10px; }
.conv-subj { margin: 2px 0; color: #123a5e; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.convhead h1 { margin-bottom: 0; }
.convhead p { margin-top: 2px; }
.thread { display: grid; gap: 10px; max-width: 760px; margin: 16px 0; }
.msg { display: grid; justify-items: start; }
.msg.mine { justify-items: end; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 85%; padding: 9px 13px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.msg.mine .bubble { background: #fff1e6; border-color: #f5c9a6; }
.msg-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.replyform { max-width: 760px; display: grid; gap: 8px; }
.replyform textarea { width: 100%; }
.replyrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.convtools { max-width: 760px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.convtools .report { flex: 1; min-width: 220px; }
.adminconvs { display: grid; gap: 12px; margin-top: 14px; }

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.how section { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px 10px; }
.how li, .plain li { margin: 6px 0; }
pre { background: var(--steel); color: #fff; padding: 10px 14px; border-radius: 6px; overflow-x: auto; }

/* admin sign-in: blueprint wallpaper behind a white card */
body.login-bg { background: #eef1f7 url("/static/blueprint.webp") center / cover no-repeat fixed; min-height: 100vh; display: flex; flex-direction: column; }
body.login-bg main { flex: 1; display: flex; align-items: center; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
body.login-bg footer { background: rgba(255,255,255,.92); border-top-color: transparent; }
/* sign-in page footer: a brushed metal banner (public/banner-plate.webp) across the bottom.
   On wide screens the plate keeps its shape (aspect-ratio) and everything inside is sized to the banner's width (cqw units);
   on narrow screens the three parts stack on a metal card instead. */
body.login-bg footer.cta-foot { background: none; border-top: none; padding: 0 10px 18px; font-size: 1rem; color: var(--steel); }
.banner { container-type: inline-size; position: relative; max-width: 1600px; margin: 0 auto; }
.banner p, .banner h2 { max-width: none; }
.bn-icon { color: var(--steel); flex: none; filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)); }
.bn-side { display: flex; gap: 14px; align-items: flex-start; }
.bn-text h2 { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--steel); line-height: 1.1; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.bn-text p { margin: .25em 0 .6em; color: #1f2b38; line-height: 1.3; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.bn-btn { display: inline-flex; align-items: center; gap: .45em; color: #fff; font-weight: 700; text-decoration: none; border-radius: 6px;
  padding: .45em 1.3em; box-shadow: 0 3px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.2); }
.bn-btn.orange { background: linear-gradient(#f07a24, #d65a06); border: 1px solid #b44b04; }
.bn-btn.orange:hover { background: linear-gradient(#e46c16, #c24f08); }
.bn-btn.navy { background: linear-gradient(#2a3d5e, #16253d); border: 1px solid #0d1726; }
.bn-btn.navy:hover { background: linear-gradient(#22344f, #101c2f); }
.bn-chev { width: .6em; height: .9em; }
.bn-mid { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.bn-gear { display: block; height: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.bn-title { margin: 0; font-weight: 900; font-style: italic; color: var(--steel); letter-spacing: -.01em; line-height: 1; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 2px 3px rgba(0,0,0,.15); }
.bn-ribbon { margin: .2em 0 0; }
.bn-ribbon span { display: inline-block; background: linear-gradient(#f07a24, #d65a06); color: #fff; font-weight: 900; font-style: italic; text-transform: uppercase;
  letter-spacing: .02em; padding: .12em .9em; transform: skewX(-14deg); box-shadow: 0 2px 4px rgba(0,0,0,.25); white-space: nowrap; }
.bn-tab { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; color: #fff; font-weight: 600; }
.bn-tab li { display: flex; align-items: center; gap: .4em; white-space: nowrap; }
.bn-check { width: 1.05em; height: 1.05em; flex: none; }

@media (min-width: 960px) {
  .banner { aspect-ratio: 1600 / 312; background: url("/static/banner-plate.webp") center / 100% 100% no-repeat; }
  .bn-inner { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.05fr 1fr; align-items: center;
    padding: 2.4cqw 4.6cqw 5.6cqw; font-size: 1.05cqw; }
  .bn-icon { width: 6.6cqw; height: auto; margin-top: .3cqw; }
  .bn-right .bn-icon { width: 7.2cqw; margin-top: 1cqw; }
  .bn-text h2 { font-size: 2.15cqw; }
  .bn-text p { font-size: 1.12cqw; }
  .bn-btn { font-size: 1.25cqw; }
  .bn-mid { padding: 0 1cqw; }
  /* the thin slanted lines between the three parts */
  .bn-mid::before, .bn-mid::after { content: ""; position: absolute; top: 8%; bottom: 8%; width: 1px; background: rgba(40,50,60,.45); transform: skewX(-14deg);
    box-shadow: 1px 0 0 rgba(255,255,255,.6); }
  .bn-mid::before { left: 0; } .bn-mid::after { right: 0; }
  .bn-gear { width: 9.6cqw; }
  .bn-title { font-size: 3.4cqw; margin-top: .1cqw; position: relative; z-index: 1; }
  .bn-ribbon { position: relative; z-index: 1; margin-top: .3cqw; }
  .bn-ribbon span { font-size: 1.7cqw; }
  .bn-gear-bottom { margin-top: .3cqw; }
  /* keep the icons clear of the slanted dividers */
  .bn-left { padding-right: 1.6cqw; }
  .bn-right { padding-left: 2.6cqw; }
  /* both sides get the same height text block, so the headings and buttons line up across the banner */
  .bn-text p { min-height: 3.9em; }
  .bn-inner { align-items: center; }
  .bn-tab { position: absolute; left: 26%; right: 26%; bottom: 3.6%; height: 13%; font-size: 1.05cqw; gap: 1.2cqw; }
  .bn-tab li + li::before { content: "|"; color: rgba(255,255,255,.7); margin-right: 1.2cqw; }
}
@media (max-width: 959px) {
  .banner { border: 26px solid transparent; border-image: url("/static/plate.webp") 56 fill / 26px stretch; filter: drop-shadow(0 8px 18px rgba(20,30,70,.3));
    max-width: 560px; padding: 0 4px; }
  .bn-inner { display: grid; gap: 16px; margin-bottom: 16px; }
  .bn-mid { order: -1; }
  .bn-gear { width: 150px; }
  .bn-title { font-size: 1.9rem; white-space: normal; }
  .bn-ribbon span { font-size: 0.95rem; }
  .bn-icon { width: 54px; height: auto; }
  .bn-text h2 { font-size: 1.3rem; }
  .bn-text p { font-size: 0.95rem; }
  .bn-tab { flex-direction: column; align-items: stretch; gap: 6px; background: #3a3d41; border-radius: 6px; padding: 10px 12px; border-bottom: 3px solid var(--accent); font-size: 0.92rem; }
}
/* the card is a brushed metal plate: border-image keeps the four screwed corners the same size however tall the form gets,
   and stretches the brushed middle to fit */
.login-card { border: 34px solid transparent; border-image: url("/static/plate.webp") 56 fill / 34px stretch;
  background: none; filter: drop-shadow(0 10px 22px rgba(20,30,70,.35));
  padding: 0 8px 4px; width: 100%; max-width: 420px; color: #16202b; }
.login-card h1 { margin-top: 0; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.card-logo { display: block; text-align: center; margin: -6px 0 10px; }
.card-logo img { height: 64px; width: auto; display: inline-block; filter: drop-shadow(0 1px 0 rgba(255,255,255,.55)); }
.login-card label { text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.login-card input, .login-card select, .login-card textarea { background: #fff; border-color: #8f979f; box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
.login-card .notice { background: rgba(255,255,255,.85); }
.login-card a { color: #0f4c85; }
.login-card pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* admin */
.adminhead { display: flex; justify-content: space-between; align-items: center; }
.stats { color: var(--muted); }
.settings { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 0; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; }
.tabs a.on { background: var(--card); color: var(--ink); border-color: var(--line); margin-bottom: -1px; }
table.admin { width: 100%; border-collapse: collapse; background: var(--card); font-size: 0.9rem; }
table.admin th, table.admin td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.admin td form { margin: 0 2px 4px 0; }

@media (max-width: 720px) {
  h1 { font-size: 1.4rem; }
  .cols, .how, .row { grid-template-columns: 1fr; }
  .row.other-town { grid-template-columns: 1fr 80px; }
  .thumb { width: 84px; height: 84px; }
  .intro { padding: 20px 18px; background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.8)), #fff url("/static/blueprint.webp") center / cover no-repeat; }
  .filters select, .filters button { flex: 1 1 45%; }
  .top nav { gap: 12px; font-size: 0.95rem; }
  .brand img { height: 40px; }
  table.admin, table.admin tbody, table.admin tr, table.admin td { display: block; }
  table.admin thead { display: none; }
  table.admin tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  table.admin td { border: none; padding: 3px 8px; }
}

/* contact page: emails on the left, the form on the right (stacked on phones) */
.contact-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 12px; }
.contact-grid h2 { margin-top: 0; }
.contactform { max-width: 520px; }
.contactform textarea, .contactform select { width: 100%; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }

/* message attachments: photo thumbnails, PDF links, and the add-files control with previews */
.msg-files { display: grid; gap: 6px; max-width: 85%; margin-top: 4px; }
.msg.mine .msg-files { justify-items: end; }
.msg-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.msg.mine .msg-photos { justify-content: flex-end; }
.msg-photos a { display: block; line-height: 0; }
.msg-photos img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #e4e7ea; }
.msg-photos a:only-child img { width: auto; height: auto; max-width: min(320px, 70vw); max-height: 320px; object-fit: contain; }
.msg-doc { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; color: inherit; overflow-wrap: anywhere; }
.msg-doc:hover b { text-decoration: underline; }
.doc-icon { flex: none; display: inline-grid; place-items: center; width: 34px; height: 40px; border-radius: 4px; background: #b3261e; color: #fff; font-size: 0.7rem; font-weight: 700; }
.seen { color: var(--muted); font-weight: 600; }
.clip { white-space: nowrap; }
.msg-attach { display: grid; gap: 6px; }
.attach-btn { display: inline-flex; align-items: center; gap: 6px; width: fit-content; cursor: pointer; padding: 6px 12px; border: 1px dashed #9aa3ab; border-radius: 8px; background: #fff; font-weight: 600; font-size: 0.92rem; }
.attach-btn:hover { border-color: var(--accent); }
.attach-btn::before { content: "+"; font-size: 1.15rem; line-height: 1; color: var(--accent); }
.attach-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.attach-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.attach-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-preview:empty { display: none; }
.attach-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); max-width: 100%; }
.attach-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; }
.attach-chip .doc-icon { width: 30px; height: 36px; }
.attach-chip .small { overflow-wrap: anywhere; }
.attach-x { border: 0; background: none; font-size: 1.25rem; line-height: 1; padding: 2px 6px; cursor: pointer; color: var(--muted); }
.attach-x:hover { color: #b3261e; }
.replyform.dropping { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 8px; }
@media (hover: none) { .kbd-hint { display: none; } }
@media (max-width: 520px) { .msg-photos img { width: 120px; height: 90px; } .msg-files { max-width: 100%; } }

/* privacy policy and terms */
.legal { max-width: 760px; }
.legal h2 { margin-top: 1.6em; }
.legal li { margin: 0.35em 0; }

/* shop reviews: stars, summary, list, owner replies, and the star picker */
.stars { display: inline-flex; gap: 1px; vertical-align: -1px; line-height: 1; }
.star { color: #cfd4d9; font-size: 1rem; }
.star.full { color: #e8a317; }
.star.half { background: linear-gradient(90deg, #e8a317 50%, #cfd4d9 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.lg .star { font-size: 1.5rem; }
.rating { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; font-size: 0.95rem; }
.card .rating { font-size: 0.9rem; }
.reviews { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 820px; }
.review-summary { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.review-summary .big { display: grid; justify-items: start; gap: 2px; }
.review-summary .big b { font-size: 2.2rem; line-height: 1; }
.bars { display: grid; gap: 3px; min-width: 220px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px; font-size: 0.85rem; }
.bar-row meter { width: 100%; height: 10px; }
.review-write { margin: 10px 0 16px; }
.review-write > summary { cursor: pointer; font-weight: 600; color: var(--accent-dark, #b5541c); }
.reviewform { max-width: 620px; }
.reviewform h3 { margin-top: 8px; }
.review-list { display: grid; gap: 12px; margin-top: 12px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.review-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.review-tags:empty { display: none; }
.tag.ok { background: #e3f3e6; color: #1f6b33; border-color: #b8dcc0; }
.review .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; border: 0; padding: 0; background: none; border-radius: 0; box-shadow: none; }
.review-reply { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: #fff8f2; border-radius: 0 8px 8px 0; }
.review-act { margin-top: 8px; }
.review-act > summary { cursor: pointer; color: var(--muted); }
.review-act form { margin-top: 6px; display: grid; gap: 6px; max-width: 520px; }
.review-act textarea { width: 100%; }
.star-pick { border: 0; padding: 0; margin: 10px 0; }
.star-pick legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { cursor: pointer; font-size: 2rem; line-height: 1; color: #cfd4d9; padding: 0 2px; margin: 0; display: inline; }
.star-row label:hover, .star-row label:hover ~ label, .star-row input:checked ~ label { color: #e8a317; }
.star-row input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.box.dim { opacity: 0.65; }
