/* admin.curling.cam and ops.curling.cam share this sheet.

   The look (design brief, 19 Oct 2026): calm, warm and editorial, like a
   well-run theatre programme. Brass on a warm paper canvas, lots of space,
   nothing shouts. Eleven colours and no others; no gradients. Type is the
   device's own system face (San Francisco on Apple devices), with Inter as
   the fallback elsewhere, self-hosted so no phone fetches a font from a
   third party. JetBrains Mono only for claim codes and camera addresses.
   Phone first (375 px), nothing scrolls sideways, one job per screen, one
   primary button per screen, 8 px grid, nothing to tap under 44 px.
   House rules kept: colour never carries meaning alone, no emoji. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/web/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/web/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/web/fonts/jbmono-latin.woff2) format("woff2"); }

:root {
  --ink: #1a1714; --ink-soft: #4a4439; --muted: #7c756b;
  --canvas: #f4f1eb; --surface: #fafaf7; --surface-2: #efebe3; --line: #e5dfd5;
  --accent: #956428; --accent-dark: #744c1c; --accent-tint: #f0e9dc; --red: #cc2229;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 56px; display: grid; gap: 24px; align-content: start; }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, .title { font-size: 32px; font-weight: 700; letter-spacing: -.022em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
h3 { font-size: 16px; font-weight: 600; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dim { color: var(--muted); }
.soft { color: var(--ink-soft); }
.small { font-size: 14px; }
a { color: var(--accent-dark); }

/* the thin header: app name, avatar, menu */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px;
          height: 52px; padding: 0 16px 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar .brand { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-dark); display: grid; place-items: center;
          font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.burger { width: 44px; height: 44px; min-height: 0; min-width: 0; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--ink); border-radius: 8px; }
.burger span { display: block; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
.burger[aria-expanded="true"] { background: var(--accent-tint); }
.menu { position: fixed; top: 52px; left: 0; right: 0; z-index: 6; max-height: calc(100vh - 52px); overflow: auto; background: var(--surface); border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 32px rgba(26, 23, 20, .08); padding: 8px 16px 16px; display: grid; gap: 2px; }
.menu .eyebrow { padding: 12px 12px 4px; }
.menu a, .menu button { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink);
                        font: inherit; font-weight: 500; text-decoration: none; text-align: left; width: 100%; justify-content: flex-start; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu a.on { background: var(--accent-tint); color: var(--accent-dark); }

/* the top of a screen: what club, which job, the headline number */
.head { display: grid; gap: 8px; }
.head .sub { color: var(--muted); font-size: 15px; }
/* the rock beside the page title (Gareth's pick, 19 Oct 2026): a photograph
   of the equipment at icon size, red or yellow by the job */
h1[data-rock] { display: flex; align-items: center; gap: 12px; }
h1[data-rock]::before { content: ""; flex: none; width: 44px; height: 35px; background: url(/web/rock-red.png) center / contain no-repeat; }
h1[data-rock="yellow"]::before { background-image: url(/web/rock-yellow.png); }
.big { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.big small { font-size: 18px; font-weight: 500; letter-spacing: 0; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent-dark); text-decoration: none; font-weight: 500; font-size: 15px; }
.back::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; }

/* cards and lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; box-shadow: 0 1px 1px rgba(26, 23, 20, .03); }
.stack { display: grid; gap: 8px; }
a.card, .card.tap { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; color: inherit; text-decoration: none; padding: 14px 16px; }
a.card:hover, .card.tap:hover { background: var(--accent-tint); }
.card .name { font-weight: 500; font-size: 17px; }
.card .shows { color: var(--ink-soft); font-size: 14px; }
/* a long web address has no spaces to break at; without this it sets the
   card's minimum width and runs off the side of a phone */
.card .name, .card .shows { overflow-wrap: anywhere; }
.card .state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .state.err { color: var(--red); }
/* the chevron is locked to its row, so it must be locked to its column too:
   grid places row-locked items before auto-placed ones and would put it first */
a.card > :not(.chev), .card.tap > :not(.chev) { grid-column: 1; }
.chev { grid-column: 2; grid-row: 1 / span 3; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.off { background: var(--red); }
.dot.idle { background: var(--muted); }
.list { list-style: none; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li:last-child { padding-bottom: 0; }
.list .who { flex: 1 1 200px; }
.list li.keyrow .who { flex: 1 1 90px; }
.list .who b { display: block; font-weight: 500; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 24px 16px; text-align: center; color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status.ok::before { background: var(--accent); }
.status.warn::before { background: var(--muted); }
.status.bad::before { background: var(--red); }
.status.bad { color: var(--red); }

/* forms */
label { display: block; font-size: 14px; font-weight: 500; color: var(--ink-soft); margin: 0 0 6px; }
.field + .field { margin-top: 0; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 16px;
}
textarea { min-height: 96px; line-height: 1.45; }
input[type="checkbox"] { width: 24px; height: 24px; min-height: 0; padding: 0; accent-color: var(--accent); }
input[type="file"] { padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.code { font-family: var(--mono); letter-spacing: .2em; text-transform: uppercase; }
/* a line to copy and run as it is (the box install command): mono by the same rule as codes */
pre.codeblock { font-family: var(--mono); font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); user-select: all; -webkit-user-select: all; }
.addr, input.addr { font-family: var(--mono); font-size: 14px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 16px; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* buttons: one brass button per screen, outlines for the rest, red only to destroy */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { background: var(--surface-2); }
.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover, button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.danger, button.danger { color: var(--red); border-color: var(--red); background: transparent; }
.danger:hover, button.danger:hover { background: var(--surface-2); }
.wide { width: 100%; }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 180px; }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }

/* messages */
.msg { display: none; border-radius: 8px; padding: 12px 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 15px; }
.msg.show { display: block; }
.msg.error { border-color: var(--red); color: var(--red); background: var(--surface); }
.msg.ok { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-dark); }
.msg.info { background: var(--surface-2); }
.link-box, code { font-family: var(--mono); font-size: 14px; }
.link-box { word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
[hidden] { display: none !important; }

/* tables and the change log */
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 14px; border-top: 0; }
.log li { display: block; padding: 12px 0; }
.log .when { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.log .what { font-weight: 500; }
.log .by { color: var(--muted); font-size: 14px; margin-left: 8px; }
.log .detail { color: var(--ink-soft); font-size: 14px; overflow-wrap: anywhere; margin-top: 4px; }
