/* Spec 004 T134: plain, readable screens for a desktop browser. System fonts, no colour carries meaning on its own.
   T272 (Josh, 2026-11-18, look D): the Legacy Supply Co brand, dark. Looks only: no label, button, field or screen moved.
   Contrast on the ground and the panel: text 13.4:1 or more, muted text 8.7:1 or more, amber 9.7:1 or more, the warning
   red 6.3:1 or more, dark text on amber 10.8:1. A refusal or warning keeps its words and its border as well as its red.
   T301 (Session 38 "For Josh" 2): a field's edge (inputs, selects, text areas) is #7a848d, 4.7:1 on the ground and 4.2:1
   on the panel (WCAG 1.4.11 asks 3:1); panels and table lines keep #464e55. */
:root {
  color-scheme: dark;
  --ground: #14181a;
  --panel: #1d2226;
  --line: #464e55;
  --field-line: #7a848d; /* T301 */
  --head: #262c31;
  --ink: #e9ebea;
  --muted: #b8c0c8;
  --accent: #ffbe45;
  --on-accent: #14181a;
  --bad: #ff7b72;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--ground);
  border-top: 4px solid var(--accent);
}

/* The header: the LS mark, the wordmark above the existing heading, and "Sign out everywhere" at the right. */
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 12px 24px;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.brand-mark { grid-column: 1; grid-row: 1 / 3; display: block; width: 44px; height: 44px; }
.wordmark {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.2;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.top h1 { grid-column: 2; grid-row: 2; align-self: start; font-size: 0.9rem; font-weight: 500; color: var(--muted); line-height: 1.3; }
.top #sign-out { grid-column: 3; grid-row: 1 / 3; }

h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 16px 0 8px; }

main { max-width: 960px; padding: 16px 24px 48px; }

.status { min-height: 1.5em; margin: 8px 24px; font-weight: 600; }
.status.bad { color: var(--bad); }

form { display: grid; gap: 10px; max-width: 520px; margin: 0 0 16px; }
label { display: grid; gap: 4px; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea {
  font: inherit;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--field-line);
  border-radius: 8px;
}
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 20px; height: 20px; accent-color: var(--accent); }
label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; }

/* Buttons: the main action filled amber; secondary ones outlined. */
button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  justify-self: start;
}
button[type="button"], button[value="cancel"] { background: transparent; color: var(--ink); border-color: var(--muted); }
button[type="button"]:hover, button[value="cancel"]:hover { border-color: var(--accent); }
button.yes { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button:disabled { opacity: 0.6; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The screen buttons: outlined on the panel colour; the current one filled amber. */
nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
nav button[type="button"] { background: var(--panel); color: var(--ink); border-color: var(--line); }
nav button[type="button"]:hover { border-color: var(--accent); }
nav button[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.result { white-space: pre-wrap; }
.refusal { border-left: 4px solid var(--bad); padding-left: 12px; }
.refusal strong { display: block; color: var(--bad); }

table { border-collapse: separate; border-spacing: 0; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }
th + th, td + td { border-left: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--head); font-weight: 600; }
td { background: var(--panel); }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0; }
dt { font-weight: 600; color: var(--muted); }
dd { margin: 0; }

a { color: var(--accent); }

.password {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
}

dialog { color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
dialog menu { display: flex; gap: 8px; padding: 0; margin: 8px 0 0; }

/* T202: the read-back before a risky action, and the name beside a carried id */
.confirm-panel { border-left: 4px solid var(--accent); }
.confirm-panel strong { display: block; font-size: 1.1rem; }
.warning { border-left: 4px solid var(--bad); padding-left: 8px; font-weight: 600; color: var(--bad); }
.hint { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
small.carried { display: block; color: var(--ink); font-size: 0.85rem; margin-top: 2px; }

/* The authenticator QR code stays on a white tile with a quiet margin, so a phone can scan it. */
#enrol-qr { display: block; box-sizing: content-box; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink); background: var(--head); border-radius: 4px; padding: 1px 6px; }
