/* Abacus Collab — brand stylesheet.
   Self-hosted (served same-origin by src/assets.js) so pages make zero third-party requests
   AND so the Content-Security-Policy can forbid 'unsafe-inline' for styles. The palette, type
   (Playfair Display + Inter), and logo match the Abacus Tech Design brand. Foundation ported
   from abacus-secureshare; checklist/status-specific styles land in later tickets. */

/* Self-hosted brand fonts (variable woff2, one file per family). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url('/assets/fonts/playfair-display.woff2') format('woff2'); }

:root {
  --bg: #f7f4f0; --bg-2: #f3ece2;
  --surface: #ffffff; --surface-2: #faf7f3;
  --ink: #2d1f14; --ink-2: #5c4033; --muted: #8b6b52;
  --line: #e7dccd; --line-2: #dccbb6;
  --accent: #e07830; --accent-dark: #c45d1a; --accent-light: #f49352; --accent-ink: #ffffff;
  --ok: #16a34a; --warn: #d97706; --danger: #c0392b;
  --r: 12px; --r-sm: 9px; --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(45,31,20,.05), 0 1px 1px rgba(45,31,20,.04);
  --shadow: 0 18px 50px -12px rgba(45,31,20,.18), 0 4px 12px rgba(45,31,20,.06);
  --shadow-accent: 0 8px 24px -6px rgba(224,120,48,.5);
  --ring: 0 0 0 3px rgba(224,120,48,.28);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: linear-gradient(180deg, #faf8f5 0%, #f3ece2 100%) fixed;
  color: var(--ink);
  font: 400 16px/1.6 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 40px 20px 72px; }
/* Wider container for operator tables (later tickets). */
.wrap.wide { max-width: 1190px; }

header.brand { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; }
header.brand img.logo { height: 60px; width: auto; display: block; }
header.brand .divider { width: 1px; height: 42px; background: var(--line-2); }
header.brand .product { font-size: 17px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
        padding: 32px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }

h1 { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; font-weight: 700;
     font-size: 28px; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 10px; color: var(--ink); }
h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
     color: var(--muted); margin: 0 0 16px; }
p.lead { color: var(--ink-2); font-size: 16px; margin: 0 0 22px; }
a { color: var(--accent-dark); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

label.field { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 18px 0 7px; }
input[type=text], input[type=password], input[type=number], input[type=email], textarea {
  width: 100%; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; font: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #b3a18c; }
input:hover, textarea:hover { border-color: #cdb593; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
textarea { min-height: 170px; resize: vertical;
           font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent) 45%, var(--accent-dark));
  color: var(--accent-ink); border: 0; border-radius: var(--r-sm);
  padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-accent); transition: transform .12s, box-shadow .12s, filter .12s;
}
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.04);
  box-shadow: 0 12px 30px -6px rgba(224,120,48,.6); text-decoration: none; }
button:active, .btn:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-accent); }
button.ghost, .btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); border-color: #cdb593; filter: none; }
button.danger { background: linear-gradient(135deg, #d6553f, #c0392b); box-shadow: 0 8px 24px -6px rgba(192,57,43,.5); }
button.danger:hover { box-shadow: 0 12px 30px -6px rgba(192,57,43,.6); }

.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; line-height: 1.55; }
.err { background: rgba(192,57,43,.08); border: 1px solid rgba(192,57,43,.3); color: #a3271b;
       border-radius: var(--r-sm); padding: 11px 14px; margin: 0 0 18px; font-size: 14px; }
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
/* Form button rows + standalone action links (e.g. the dashboard "Sign out" form, back links). */
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: rgba(22,163,74,.14); color: #15803d; }
.badge.pending { background: rgba(139,107,82,.14); color: #6b4d38; }
.badge.muted { background: rgba(100,116,139,.16); color: #475569; }

/* Checklist (ticket #5). Two boolean columns per item; exactly one is interactive per role. */
table.checklist th.cbx-col, table.checklist td.cbx-col { width: 104px; text-align: center; }
table.checklist td.cbx-item { width: auto; }
tr.cbx-section th { text-transform: none; font-size: 13px; font-weight: 700; letter-spacing: 0;
  color: var(--ink-2); background: var(--surface-2); padding-top: 16px; }
tr.cbx-section:hover { background: var(--surface-2); }
.cbx-form { margin: 0; display: inline-flex; }
.cbx { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  padding: 0; border-radius: var(--r-sm); font-size: 15px; font-weight: 700; line-height: 1;
  background: var(--surface); color: var(--ok); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
button.cbx { cursor: pointer; }
button.cbx:hover { transform: none; filter: none; background: var(--surface-2); border-color: #cdb593;
  box-shadow: var(--shadow-sm); }
.cbx.on { background: rgba(22,163,74,.14); border-color: rgba(22,163,74,.5); color: #15803d; }
.cbx.ro { cursor: default; color: var(--muted); background: var(--surface-2); }
.cbx.ro.on { color: #15803d; background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.35); }
.cbx-link { font-size: 12px; font-weight: 600; white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

/* Weekly-status archive (ticket #6). The rendered markdown body (src/status/render.js — raw HTML
   disabled) gets its own typography here; note the global h2 is a small uppercase label, so .status-body
   restores real content-heading sizes. */
.status-list { list-style: none; margin: 8px 0 0; padding: 0; }
.status-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px;
  justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.status-list li:last-child { border-bottom: 0; }
.status-body { color: var(--ink-2); line-height: 1.65; }
.status-body > :first-child { margin-top: 0; }
.status-body > :last-child { margin-bottom: 0; }
.status-body h2, .status-body h3, .status-body h4 { font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink); text-transform: none; letter-spacing: -.005em; line-height: 1.25; margin: 24px 0 10px; }
.status-body h2 { font-size: 21px; font-weight: 700; }
.status-body h3 { font-size: 17px; font-weight: 700; }
.status-body h4 { font-size: 15px; font-weight: 600; }
.status-body p { margin: 0 0 14px; }
.status-body ul, .status-body ol { margin: 0 0 14px; padding-left: 22px; }
.status-body li { margin: 4px 0; }
.status-body a { font-weight: 500; }
.status-body code { font-size: 13px; }
.status-body pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; overflow-x: auto; margin: 0 0 14px; }
.status-body pre code { background: none; border: 0; padding: 0; font-size: 13px; }
.status-body blockquote { margin: 0 0 14px; padding: 4px 16px; border-left: 3px solid var(--line-2);
  color: var(--muted); }
.status-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
