/* Brand: Hunslet red #d63850, dark grey #3c3c3c, light grey #c8c8c8, black and white (Murray & Hunslet brand guide, 2023).
   Links and small red text use --brand-text, a darker red, so they stay readable (6.3:1 on white). */
:root { --ink:#1f1f1f; --muted:#595959; --line:#c8c8c8; --brand:#d63850; --brand-text:#b8203a; --grey:#3c3c3c; --accent:#d63850; --warn:#8a5200; --bad:#a61b1b; }
* { box-sizing: border-box; }
body { margin:0; font:400 16px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:#f5f5f5; }
a { color:var(--brand-text); }
:focus-visible { outline:3px solid var(--grey); outline-offset:2px; }
.topbar { display:flex; flex-wrap:wrap; gap:.75rem 1.5rem; align-items:center; justify-content:space-between; padding:.9rem 1.25rem; background:#fff; color:var(--grey); border-bottom:4px solid var(--brand); }
.topbar a, .topbar button.link { color:var(--grey); text-decoration:none; margin-right:1rem; }
.topbar nav a:hover, .topbar button.link:hover { color:var(--brand-text); text-decoration:underline; }
.brand { display:flex; align-items:center; gap:1rem; margin-right:0; }
.brand img { display:block; height:1.75rem; width:auto; }
.brand .product { font-size:.95rem; letter-spacing:.12em; text-transform:uppercase; color:var(--grey); }
main { max-width:64rem; margin:0 auto; padding:1rem; }
h1 { font-size:1.75rem; font-weight:400; text-transform:uppercase; letter-spacing:.06em; }
h2 { font-weight:500; }
.site-footer { max-width:64rem; margin:2rem auto 1rem; padding:.75rem 1rem 0; border-top:1px solid var(--line); font-size:.85rem; color:var(--muted); }
table.data { width:100%; border-collapse:collapse; background:#fff; }
table.data th, table.data td { padding:.5rem .6rem; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.card { background:#fff; border:1px solid var(--line); border-radius:.5rem; padding:1rem; max-width:34rem; }
.card input, .card select { width:100%; padding:.6rem; font:inherit; margin-top:.2rem; }
.card input[type=checkbox] { width:auto; }
button, .button { font:inherit; padding:.6rem 1rem; border:1px solid var(--line); border-radius:.4rem; background:#fff; cursor:pointer; text-decoration:none; color:var(--ink); display:inline-block; }
button.primary, .button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
button.link { background:none; border:0; padding:0; text-decoration:underline; cursor:pointer; color:inherit; }
.inline-form { display:inline; }
.messages { list-style:none; padding:0; }
.messages li { padding:.6rem .8rem; border-radius:.4rem; background:#e8f3ee; margin-bottom:.5rem; }
.messages li.error { background:#fbeaea; color:var(--bad); }
.messages li.warning { background:#fff4e0; color:var(--warn); }
.warning { color:var(--warn); font-weight:600; }
.notice.warn { background:#fff4e0; border:1px solid #f0c36d; border-radius:.5rem; padding:.6rem .9rem; margin:.8rem 0; }
.notice.warn ul { margin:.3rem 0 .3rem 1.2rem; padding:0; }
.errorlist { color:var(--bad); padding-left:1rem; }
.note { color:var(--muted); }
.tiles { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(14rem,1fr)); gap:.75rem; }
.tiles a { display:block; padding:1rem; background:#fff; border:1px solid var(--line); border-radius:.5rem; text-decoration:none; color:var(--ink); font-weight:600; }
.badge { display:inline-block; padding:.05rem .5rem; border-radius:1rem; background:#e8eef2; font-size:.85rem; }
.badge.off { background:#fbeaea; color:var(--bad); }
.secret { font:1.2rem ui-monospace, Consolas, monospace; background:#fff4e0; padding:.4rem .6rem; border-radius:.3rem; }
.filters { display:flex; flex-wrap:wrap; gap:.5rem; margin:.75rem 0; }
.filters input, .filters select { padding:.5rem; font:inherit; }
.field { margin-bottom:.9rem; }
.field small { display:block; }
dl.details { display:grid; grid-template-columns:12rem 1fr; gap:.4rem 1rem; background:#fff; border:1px solid var(--line); border-radius:.5rem; padding:1rem; }
dl.details dt { font-weight:600; color:var(--muted); }
dl.details dd { margin:0; }
.card.wide { max-width:44rem; }
.card.action { display:inline-block; margin:0 .5rem .5rem 0; padding:.6rem .8rem; }
.card.action input { width:18rem; max-width:100%; }
button.danger { background:#fff; color:var(--bad); border:2px solid var(--bad); font-weight:600; }
.badge.status-planned { background:#e8eef2; }
.badge.status-allocated { background:#dcecf8; }
.badge.status-in_progress { background:#fff1cc; }
.badge.status-submitted { background:#e6dcf5; }
.badge.status-returned { background:#fde0cc; }
.badge.status-closed { background:#dcf0e4; }
.badge.status-cancelled { background:#ececec; color:#666; text-decoration:line-through; }
table.calendar { width:100%; table-layout:fixed; border-collapse:collapse; background:#fff; }
table.calendar th { padding:.4rem; background:#eef2f4; border:1px solid var(--line); }
table.calendar td { vertical-align:top; height:7.5rem; padding:.25rem; border:1px solid var(--line); overflow:hidden; }
table.calendar td.outside { background:#f6f7f8; color:var(--muted); }
table.calendar td.today { outline:2px solid var(--accent); outline-offset:-2px; }
.daynum { font-size:.8rem; color:var(--muted); }
.entry { display:block; font-size:.78rem; padding:.1rem .3rem; margin:.15rem 0; border-radius:.25rem; border-left:4px solid var(--line); text-decoration:none; color:var(--ink); background:#e8eef2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.entry.status-allocated { background:#dcecf8; }
.entry.status-in_progress { background:#fff1cc; }
.entry.status-submitted { background:#e6dcf5; }
.entry.status-returned { background:#fde0cc; }
.entry.status-closed { background:#dcf0e4; }
.entry.status-cancelled { background:#ececec; text-decoration:line-through; }
.entry.priority-high { border-left-color:var(--warn); }
.entry.priority-urgent { border-left-color:var(--bad); }
.more { font-size:.78rem; }
.visit-card { display:grid; gap:.15rem; padding:1rem; margin-bottom:.6rem; background:#fff; border:1px solid var(--line); border-radius:.5rem; text-decoration:none; color:var(--ink); font-size:1.05rem; }
ol.items { padding-left:1.4rem; }
ol.items li { padding:.5rem 0; border-bottom:1px solid var(--line); }
ol.items li:last-child { border-bottom:0; }
fieldset { border:1px solid var(--line); border-radius:.4rem; margin:.5rem 0; }
.card textarea { width:100%; padding:.6rem; font:inherit; }
.panel { background:#fff; border:1px solid var(--line); border-radius:.5rem; padding:.75rem 1rem; margin:1rem 0; }
.panel table { width:100%; border-collapse:collapse; }
.panel td, .panel th { padding:.35rem .4rem; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.panel h3 { margin:1rem 0 .3rem; font-size:1rem; }
tr.disagree { background:#fff4e0; }
.defect-open { border-left:4px solid var(--bad); padding-left:.5rem; }
.photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(12rem,1fr)); gap:.75rem; }
figure.photo { margin:0; } figure.photo img { width:100%; height:auto; border-radius:.4rem; border:1px solid var(--line); }
figure.photo figcaption { font-size:.9rem; } figure.photo.void img { opacity:.45; }
