/* MPAS Team System — styling per the approved mockups:
   forest green chrome, warm beige canvas, cream cards,
   amber = waiting on client, red = deadline risk. */

/* THEMIS — palette from the METRON by MPAS brand style book (v3.0, 31 Aug 2026).
   Ink #171717 · Warm Cream #F4EFE7 · Oxblood #6D1F2A · Stone #E8E0D6 · Soft Grey #666666 · Soft Oxblood #8D3A46.
   Token names kept from the old theme so every screen re-colours without edits:
   --green is now Ink (primary), --amber is Soft Oxblood (waiting), --red is Oxblood (deadline). */
@font-face { font-family: "Playfair Display"; font-weight: 500; font-display: swap; src: url("fonts/playfair-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url("fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
:root {
  --green: #171717;        /* Ink — primary */
  --green-mid: #333333;
  --green-soft: #E8E0D6;   /* Stone */
  --green-text: #666666;   /* Soft Grey */
  --beige: #F4EFE7;        /* Warm Cream — the page field */
  --cream: #FBF8F3;        /* cards, a shade lighter than the field */
  --line: #D9CFC2;
  --line-soft: #E8E0D6;    /* Stone */
  --ink: #171717;
  --muted: #666666;
  --faint: #8F8A82;
  --sand: #E8E0D6;         /* Stone */
  --sand-ink: #4A453F;
  --amber: #8D3A46;        /* Soft Oxblood — waiting / attention */
  --amber-bg: #F0E1E2;
  --red: #6D1F2A;          /* Oxblood — deadline / decision */
  --red-bg: #E7CDD0;
  --red-soft: #F4E7E8;
  --pin-bg: #E8E0D6;
  --pin-line: #D9CFC2;
  --pin-ink: #171717;
  --sage: #8F8A82;
  --ox: #6D1F2A;
  --ox-soft: #8D3A46;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--beige);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.loading { padding: 48px; color: var(--muted); text-align: center; }

/* ── Chrome ── */
.topbar {
  background: var(--green);
  padding: 12px 22px;
  display: flex; align-items: center; gap: 18px;
  position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--beige); font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 17px; letter-spacing: .4px; }
.brand span { font-weight: 500; opacity: .75; font-family: "Inter", sans-serif; font-size: 13px; margin-left: 4px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--green-text); text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 6px;
}
.nav a.active { background: var(--green-mid); color: var(--beige); }
.nav a:hover { color: var(--beige); }
.topbar .who { margin-left: auto; color: var(--green-text); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.topbar .who button { background: transparent; border: 1px solid var(--green-mid); color: var(--green-text); }
.topbar .who button:hover { color: var(--beige); border-color: var(--beige); }

/* ── Layout ── */
.page { max-width: 1060px; margin: 0 auto; padding: 20px 22px 60px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.page-head h1 { font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-weight: 600; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 12.5px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--cream); border-radius: 8px; padding: 10px 14px; }
.stat .label { font-size: 11.5px; color: var(--muted); }
.stat .value { font-size: 21px; font-weight: 600; }
.stat .value.amber { color: var(--amber); }
.stat .value.red { color: var(--red); }
.stat .value.green { color: var(--green); }

/* ── Cards & rows ── */
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 8px;
}
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; }
.row .meta { font-size: 12px; color: var(--muted); }
.row .meta.amber { color: var(--amber); }
.section-label { font-size: 12px; font-weight: 600; margin: 18px 0 8px; }
.section-label.red { color: var(--red); }
.section-label.muted { color: var(--muted); }

/* ── Pills & buttons ── */
.pill { font-size: 11px; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.sand { background: var(--sand); color: var(--sand-ink); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: #791F1F; }
.pill.gray { background: #EDE9DD; color: var(--muted); }

button, .btn {
  font-family: inherit; font-size: 13px; padding: 7px 15px; border-radius: 6px;
  cursor: pointer; border: 1px solid transparent;
}
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
/* "someone is looking at this client" badges, sitting inline beside a name */
.presence.inline { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 4px; }
.presence.inline .who-dot { width: 17px; height: 17px; font-size: 8.5px; }
button.primary { background: var(--green); color: var(--beige); border: none; }
button.primary:hover:not(:disabled) { background: var(--green-mid); }
button.quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.quiet:hover { color: var(--ink); border-color: var(--muted); }
button.danger { background: transparent; color: var(--red); border: 1px solid var(--red-bg); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--green-mid); outline-offset: 1px;
}

/* ── Forms ── */
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
label.field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
input, select, textarea {
  font-family: inherit; font-size: 13px; color: var(--ink);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
textarea { resize: vertical; min-height: 60px; }
form .actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.error { background: var(--red-soft); border: 1px solid var(--red-bg); color: #791F1F; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }
.notice { background: var(--green-soft); border: 1px solid #B5CDBB; color: var(--green); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--cream); border-radius: 8px; overflow: hidden; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 9px 12px; }
td { padding: 8px 12px; border-top: 1px solid var(--line-soft); }
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: #F8F4EA; }
tr.risk td { background: var(--red-soft); }
td.amber { color: var(--amber); }

/* ── Pinned note ── */
.pinned {
  background: var(--pin-bg); border: 1px solid var(--pin-line); border-radius: 8px;
  padding: 10px 14px; color: var(--pin-ink); font-size: 12.5px; margin-bottom: 8px;
}
.pinned .by { font-weight: 600; }

/* ── Sign-in ── */
.signin { max-width: 360px; margin: 10vh auto; padding: 0 20px; }
.signin .brandmark { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 24px; color: var(--green); margin-bottom: 4px; }
.signin .card { padding: 18px; }
.signin form { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 640px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .page { padding: 14px 14px 60px; }
  .row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: border-color .15s; }
}

/* ── v0.2: logo, watermark, compliance panel ── */
.logo { height: 26px; width: auto; display: block; border-radius: 5px; }
.signin .logo.big { height: 46px; margin: 0 auto 10px; }
.watermark {
  position: fixed; right: 26px; bottom: 20px;
  width: 300px; max-width: 38vw;
  opacity: 0.05; pointer-events: none; user-select: none; z-index: 0;
}
.page { position: relative; z-index: 1; }
details.compliance summary {
  cursor: pointer; font-weight: 500; font-size: 13px; color: var(--ink);
  list-style-position: inside;
}
details.compliance[open] summary { margin-bottom: 10px; }
details.compliance summary::marker { color: var(--muted); }

/* v0.2.1: wordmark logo fitting */
.topbar .logo { background: var(--cream); padding: 4px 9px; border-radius: 7px; height: 22px; }
.signin .logo.big { height: 60px; }
.watermark { width: 340px; }

/* v0.2.2: brand palette pass */
.watermark { opacity: 0.25; }
.pill.sand { background: var(--sand); color: var(--sand-ink); }
.nav a.active { background: var(--green-mid); }

/* v0.4.1: queue filter chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip {
  background: var(--cream); border: 1px solid var(--line); border-radius: 16px;
  padding: 5px 13px; font-size: 12px; color: var(--muted); cursor: pointer;
}
.chip.active { background: var(--green); color: var(--beige); border-color: var(--green); }
.chip:hover:not(.active) { color: var(--ink); border-color: var(--muted); }

/* v0.6: task notes */
details.tasknotes { margin-top: 8px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
details.tasknotes summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style-position: inside; }
details.tasknotes[open] summary { margin-bottom: 4px; }
.tnote { font-size: 12.5px; padding: 3px 0; }

/* v1.2: sticky table headings so column names survive scrolling */
table { border-collapse: separate; border-spacing: 0; overflow: visible; }
table tr:first-child th {
  position: sticky; top: 50px; z-index: 4;
  background: var(--cream);
  box-shadow: inset 0 -1px 0 var(--line-soft);
}
table tr:first-child th:first-child { border-top-left-radius: 8px; }
table tr:first-child th:last-child { border-top-right-radius: 8px; }
@media (max-width: 640px) { table tr:first-child th { top: 46px; } }

/* v1.5: branded dialogs and presence */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(44, 51, 47, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  width: 100%; max-width: 430px; overflow: hidden;
}
.modal-head {
  background: var(--green); padding: 10px 18px;
  display: flex; align-items: center; gap: 9px;
  color: var(--beige); font-size: 13px; font-weight: 500;
}
.modal-head i { font-size: 16px; color: var(--green-text); }
.modal-body { padding: 16px 18px; }
.themis-bar { background: var(--pin-bg); border-bottom: 1px solid var(--pin-line); color: var(--pin-ink); font-size: 12.5px; padding: 7px 22px; display: flex; align-items: center; gap: 9px; }
.themis-bar .mark { width: 17px; height: 17px; border-radius: 2px; flex: 0 0 17px; }
.themis-bar a { color: inherit; font-weight: 600; }
.error.themis-inline { display: flex; align-items: flex-start; gap: 10px; }
.error.themis-inline .mark { width: 22px; height: 22px; border-radius: 2px; flex: 0 0 22px; margin-top: 1px; }
.error.themis-inline .quiet { color: var(--muted); }
.modal-head img.mark { width: 22px; height: 22px; border-radius: 2px; }
.modal-head .who { font-family: "Inter", sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--beige); }
.modal-head .ctx { margin-left: auto; font-family: "Inter", sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #B9AFA3; }
.modal-say { margin: 10px 0 0; font-family: "Playfair Display", Georgia, serif; font-size: 14px; line-height: 1.4; color: var(--ink); }
.modal-heading { margin: 0 0 8px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.modal-text { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-detail {
  background: var(--beige); border-radius: 6px; padding: 9px 12px;
  font-size: 12.5px; color: var(--sand-ink); line-height: 1.7; margin-top: 10px;
}
.modal-actions { padding: 0 18px 16px; display: flex; gap: 8px; justify-content: flex-end; }
button.danger-solid { background: var(--red); color: var(--cream); border: none; }
button.danger-solid:hover { background: #8d2626; }

.presence { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: middle; }
.who-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500; color: var(--beige);
  border: 1.5px solid #6FBF8E;
  text-transform: capitalize;
}

/* v1.6: clickable stat cards + presence name bubbles */
button.stat {
  text-align: left; width: 100%; font-family: inherit; cursor: pointer;
  border: 1px solid transparent; transition: border-color .12s, background .12s;
}
button.stat:hover { border-color: var(--line); }
button.stat.active { background: var(--green); border-color: var(--green); }
button.stat.active .label { color: var(--green-text); }
button.stat.active .value, button.stat.active .value.amber, button.stat.active .value.red { color: var(--beige); }
button.linkish {
  background: none; border: none; padding: 0; font-size: inherit; color: var(--green);
  text-decoration: underline; cursor: pointer;
}

.who-wrap { position: relative; display: inline-flex; }
.who-bubble {
  position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  background: var(--cream); color: var(--ink); border: 1px solid var(--line);
  font-size: 16px; font-weight: 500; padding: 7px 14px; border-radius: 8px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s;
  box-shadow: 0 4px 14px rgba(44,51,47,.18); z-index: 50;
}
.who-bubble::before {
  content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px; background: var(--cream);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.who-wrap:hover .who-bubble, .who-wrap:focus-visible .who-bubble { opacity: 1; }

/* v1.7: profile page */
a.mename { color: var(--beige); text-decoration: none; border-bottom: 1px dotted var(--green-text); }
a.mename:hover { border-bottom-color: var(--beige); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; color: var(--beige); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.swatch:hover:not(:disabled) { border-color: var(--ink); }
.swatch.chosen { border-color: var(--ink); box-shadow: 0 0 0 2px var(--cream) inset; }
.swatch:disabled { opacity: .32; cursor: not-allowed; }
.sig-editor {
  min-height: 110px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; padding: 10px 12px; font-size: 13px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.sig-editor:focus { outline: 2px solid var(--green-mid); outline-offset: 1px; }
.sig-editor img { max-width: 220px; height: auto; }

/* v1.9: nav badge */
.nav a .badge {
  display: inline-block; margin-left: 6px; min-width: 17px; padding: 1px 5px;
  background: var(--amber); color: var(--cream); border-radius: 9px;
  font-size: 10.5px; font-weight: 600; text-align: center; vertical-align: 1px;
}

/* v2.0: team calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-head { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0 4px; }
.cal-cell { min-height: 58px; background: var(--beige); border-radius: 6px; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.empty { background: transparent; }
.cal-cell.wknd { background: #F2ECE8; }
.cal-cell.today { outline: 2px solid var(--green-mid); outline-offset: -2px; }
.cal-day { font-size: 11px; color: var(--muted); }
.cal-chip {
  font-size: 10px; font-weight: 600; color: var(--cream); background: var(--c);
  border: 1.5px solid var(--c); border-radius: 8px; padding: 1px 6px; width: fit-content;
}
.cal-chip.pending { background: transparent; color: var(--c); }
.cal-chip.working { background: var(--cream); color: var(--c); border-style: dashed; }
@media (max-width: 640px) { .cal-cell { min-height: 44px; } .cal-chip { font-size: 9px; padding: 0 4px; } }

/* v2.1: email centre */
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.picklist { max-height: 460px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 6px; }
/* Table-style columns: tick · client · where the send actually goes, no lines
   between rows. The name column is fixed so rows align; the address column
   shows in full (several addresses comma-separated) and the list scrolls
   sideways if a narrow window can't fit it. Scoped to .picklist — .pick
   elsewhere is unchanged. */
.picklist .pick { display: grid; grid-template-columns: 16px 230px auto; width: max-content; min-width: 100%; border-bottom: none; }
.picklist .pick .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picklist .pick .meta { white-space: nowrap; }
/* The Email centre gives the client list half the width; the report-send page keeps 5/7. */
.two-col.emails { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.pick { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 13px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.pick:last-child { border-bottom: none; }
.pick:hover { background: var(--beige); }
.pick.off { color: var(--faint); cursor: default; }
.pick input { width: auto; }
.mailpreview { background: #fff; border: 1px solid var(--line-soft); border-radius: 6px; padding: 14px 16px; font-family: Calibri, Arial, sans-serif; font-size: 14px; line-height: 1.5; color: #1f1f1f; }
.mailpreview img { max-width: 100%; height: auto; }

/* v2.2: search bars, calendar extras, people */
.searchbar {
  display: flex; align-items: center; gap: 8px; background: var(--cream);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px;
}
.searchbar i { color: var(--muted); font-size: 16px; }
.searchbar input { flex: 1; border: none; background: transparent; padding: 4px 2px; font-size: 13.5px; }
.searchbar input:focus { outline: none; }
.searchbar button { padding: 2px 8px; font-size: 14px; line-height: 1; }

.cal-cell.bankhol { background: #DCE8F2; }
.cal-cell.closed { background: repeating-linear-gradient(135deg, var(--sand) 0 6px, #F2ECE8 6px 12px); }
.bh-label { font-size: 9.5px; color: #3F6B7A; display: block; line-height: 1.2; margin-top: 1px; }
.bh-key { display: inline-block; width: 12px; height: 12px; background: #DCE8F2; border-radius: 3px; vertical-align: -2px; margin-right: 2px; }
.cl-key { display: inline-block; width: 12px; height: 12px; background: repeating-linear-gradient(135deg, var(--sand) 0 3px, #F2ECE8 3px 6px); border-radius: 3px; vertical-align: -2px; margin-right: 2px; }
.cal-event {
  display: block; width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 5px; border: none;
}
.cal-event.closure { background: var(--sand-ink); color: var(--cream); }
.cal-event.event { background: var(--green); color: var(--beige); }
.cal-chip.sick { background: var(--amber); border-color: var(--amber); }

/* v2.2.1: legend + labelled filter rows */
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 12px; border-radius: 6px; font-style: normal; font-size: 10px; flex: none; }
.lg-solid { background: var(--green); }
.lg-outline { border: 1.5px solid var(--green); background: transparent; }
.lg-swap { border: 1.5px dashed var(--green); color: var(--green); background: var(--cream); }
.lg-bh { background: #DCE8F2; border-radius: 3px; }
.lg-closed { background: repeating-linear-gradient(135deg, var(--sand) 0 3px, #F2ECE8 3px 6px); border-radius: 3px; }
.lg-event { background: var(--green); border-radius: 3px; }
.lg-sick { background: var(--amber); }

.filter-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.filter-label { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; min-width: 84px; padding-top: 7px; }
.filter-row .chips { margin-bottom: 4px; }

/* v2.21: an HMRC item opened from its queue task */
.card.hmrc-focus { outline: 2px solid var(--amber, #b8862f); outline-offset: 1px; }


/* ── THEMIS brand layer (v3.0) — editorial chrome per the style sheet ── */
.topbar { background: var(--beige); border-bottom: 1px solid var(--ink); padding: 12px 22px; }
.topbar .logo { display: none; }
.brand { color: var(--ink); font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 19px; letter-spacing: .22em; text-transform: uppercase; display: flex; align-items: baseline; gap: 10px; padding-right: 14px; border-right: 1px solid var(--ox); }
.brand .by { font-family: "Inter", sans-serif; font-weight: 500; font-size: 9px; letter-spacing: .32em; color: var(--ox); opacity: 1; margin: 0; }
.nav a { color: var(--muted); font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 8px 8px; border-radius: 0; border-bottom: 2px solid transparent; }
.nav a.active { background: transparent; color: var(--ink); border-bottom-color: var(--ox); }
.nav a:hover { color: var(--ink); }
.nav .badge { background: var(--ox); color: var(--beige); }
.topbar .who { color: var(--muted); }
.topbar .who button { border-color: var(--line); color: var(--muted); }
.topbar .who button:hover { color: var(--ink); border-color: var(--ink); }
.topbar .who .mename { color: var(--ink); }
.page-head h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 24px; letter-spacing: 0; }
.section-label { font-family: "Inter", sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ox); }
.section-label.muted { color: var(--ox); }
.section-label.red { color: var(--ox); }
.stat { border: 1px solid var(--line-soft); border-radius: 4px; }
.stat .label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 24px; }
.stat .value.green { color: var(--ink); }
.card, .stat, table, .pinned, .notice, .error { border-radius: 4px; }
.pill { border-radius: 2px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; }
.pill.green { background: var(--sand); color: var(--ink); }
.pill.sand { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.pill.amber { background: transparent; color: var(--ox-soft); border: 1px solid var(--ox-soft); }
.pill.red { background: var(--ox); color: var(--beige); }
.pill.gray { background: transparent; color: var(--muted); border: 1px solid var(--line-soft); }
button, .btn, input, select, textarea { border-radius: 3px; }
button.primary { background: var(--ink); color: var(--beige); }
button.primary:hover:not(:disabled) { background: var(--ox); }
button.danger { color: var(--ox); border-color: var(--ox); }
button.danger:hover { background: var(--ox); color: var(--beige); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: var(--ox); }
th { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
td { border-top: 1px solid var(--line-soft); }
tr.rowlink:hover td { background: var(--beige); }
tr.risk td { background: var(--red-soft); }
.notice { background: var(--sand); border-color: var(--line); color: var(--ink); }
.error { background: var(--red-soft); border-color: var(--red-bg); color: var(--ox); }
.watermark { display: none; }
details.compliance summary { font-weight: 500; }
/* Sign-in is the ink "cover" page; the interior is cream. */
body.cover { background: var(--ink); }
.signin { max-width: 380px; margin: 14vh auto; }
.signin .brandmark { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 34px; letter-spacing: .22em; text-transform: uppercase; color: var(--beige); text-align: center; margin-bottom: 6px; }
.signin .brandrule { width: 220px; height: 1px; background: var(--ox); margin: 8px auto 6px; position: relative; }
.signin .brandrule::after { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 9px; background: var(--ox); }
.signin .brandby { font-family: "Inter", sans-serif; font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: #B9AFA3; text-align: center; margin-bottom: 26px; }
.signin .card { padding: 20px; }
.signin .logo.big { display: none; }
/* THEMIS speaking: the rule callout from the style sheet */
.themis { border-left: 2px solid var(--ox); padding: 6px 0 6px 16px; margin: 14px 0 18px; display: flex; gap: 14px; align-items: flex-start; }
.themis .mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 2px; }
.themis .label { font-family: "Inter", sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ox); margin-bottom: 3px; }
.themis .say { font-family: "Playfair Display", Georgia, serif; font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.themis .say p { margin: 0 0 6px; }
.themis .say ul.facts { list-style: none; margin: 6px 0 8px; padding: 0 0 0 2px; }
.themis .say ul.facts li { font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.5; color: var(--ink); padding: 1px 0 1px 12px; border-left: 2px solid var(--line); margin: 3px 0; }
.themis .say ul.facts .when { color: var(--muted); }
.themis .say .quiet { color: var(--muted); font-family: "Inter", sans-serif; font-size: 12.5px; }
.themis .say a { color: var(--ox); }
.greeting { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 26px; margin: 0; }


/* ── The sign-in overture: THEMIS greets you before asking for anything ── */
.overture { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; z-index: 40; pointer-events: auto; animation: ovClear 0s linear 2.9s forwards; }
.overture .theta { width: 104px; height: 104px; opacity: 0; transform: scale(.94); animation: ovIn 1s cubic-bezier(.2,.7,.3,1) forwards, ovOut .6s ease 2.3s forwards; }
.overture .hello { font-family: "Playfair Display", Georgia, serif; font-size: 26px; letter-spacing: .04em; color: var(--beige); opacity: 0; animation: ovIn 1s cubic-bezier(.2,.7,.3,1) .75s forwards, ovOut .6s ease 2.3s forwards; }
.signin.waiting { opacity: 0; animation: ovIn 1s ease 2.75s forwards; }
@keyframes ovIn { to { opacity: 1; transform: none; } }
@keyframes ovOut { to { opacity: 0; } }
@keyframes ovClear { to { visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) {
  .overture { display: none; }
  .signin.waiting { opacity: 1; animation: none; }
}
