:root {
  color-scheme: dark;
  --bg: #041923;
  --card: #0b2533;
  --surface: #102f3f;
  --field: #071f2c;
  --ink: #eef8fb;
  --mute: #adcad5;
  --line: #2a4d5d;
  --line-strong: #628695;
  --accent: #85dbe7;
  --on-accent: #08252d;
  --accent-2: #153d4c;
  --neutral: #183644;
  --neutral-ink: #c4dce5;
  --info: #a5d5f7;
  --info-2: #1a3d54;
  --warn: #ffca82;
  --warn-2: #49321d;
  --bad: #ffb9bf;
  --bad-2: #47272f;
  --good: #8fe2b8;
  --good-2: #163c32;
  --header-bg: #052431;
  --header-ink: #eef8fb;
  --header-muted: #b5d0da;
  --header-accent: #9ce3ed;
  --header-line: #386375;
  --shadow: 0 12px 30px rgba(0, 10, 18, .14);
  --wall: radial-gradient(ellipse at 90% 0, #10394a, transparent 53%);
  --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3f6;
  --card: #ffffff;
  --surface: #f2f7f9;
  --field: #ffffff;
  --ink: #102834;
  --mute: #4e6673;
  --line: #d4e1e7;
  --line-strong: #6c8997;
  --accent: #005578;
  --on-accent: #ffffff;
  --accent-2: #e5f3f8;
  --neutral: #e9f0f3;
  --neutral-ink: #304e5d;
  --info: #205e8a;
  --info-2: #e5f1fc;
  --warn: #784708;
  --warn-2: #fcf0da;
  --bad: #952b42;
  --bad-2: #fce9ec;
  --good: #11613f;
  --good-2: #e5f5ec;
  --header-bg: #073c54;
  --header-ink: #f2fbfe;
  --header-muted: #c4dce5;
  --header-accent: #b8eef4;
  --header-line: #57889a;
  --shadow: 0 12px 26px rgba(19, 58, 79, .07);
  --wall: radial-gradient(ellipse at 90% 0, #dbeef3, transparent 53%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--wall), var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .16em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

body > header {
  position: relative;
  z-index: 5;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  color: var(--header-ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  padding: 13px clamp(14px, 3vw, 40px);
  min-height: 61px;
}
header .brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 7px;
  color: var(--header-ink);
  font-weight: 650;
  letter-spacing: .01em;
}
header .brand span { color: var(--header-accent); }
header .sp { flex: 1 1 auto; }
header a { color: var(--header-ink); }
header :focus-visible { outline-color: var(--header-accent); }
.badge {
  display: inline-block;
  border: 1px solid var(--header-line);
  border-radius: 20px;
  padding: 2px 9px;
  color: var(--header-muted);
  font-size: 12px;
}
svg.wf-icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -.19em;
  flex: 0 0 auto;
}
.wf-brand-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--header-line);
  border-radius: 8px;
  background: rgba(111, 204, 221, .09);
  color: var(--header-accent);
}
.wf-brand-icon svg.wf-icon { width: 19px; height: 19px; }
.wf-icon-label {
  display: inline-flex;
  align-items: center;
  gap: .44em;
  min-width: 0;
}
.wf-theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--header-line);
  border-radius: 9px;
  padding: 2px;
  background: var(--header-bg);
  color: var(--header-ink);
}
.wf-theme button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--header-muted);
  font-size: 12px;
}
.wf-theme button:hover { background: rgba(111, 204, 221, .11); }
.wf-theme button[aria-pressed="true"] {
  background: var(--header-accent);
  color: #0b2e3c;
}
.wf-agents { position: relative; }
.wf-agents summary {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 5px 9px;
  border: 1px solid var(--header-line);
  border-radius: 8px;
  color: var(--header-ink);
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}
.wf-agents summary::-webkit-details-marker { display: none; }
.wf-agents summary:hover, .wf-agents[open] summary { background: rgba(111, 204, 221, .11); }
.wf-agent-links {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  display: grid;
  gap: 2px;
  width: min(250px, calc(100vw - 28px));
  max-height: min(65vh, 400px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.wf-agent-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}
.wf-agent-links a:hover, .wf-agent-links a[aria-current="page"] {
  background: var(--accent-2);
  color: var(--accent);
}
.wf-agent-links a[aria-current="page"] { font-weight: 700; }
.wf-agent-links a:focus-visible { outline-color: var(--accent); outline-offset: -2px; }

main { max-width: 1180px; margin: 26px auto; padding: 0 clamp(13px, 2vw, 24px); }
.card {
  min-width: 0;
  margin-bottom: 18px;
  padding: clamp(13px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
h1 { margin: 0 0 5px; font-size: clamp(22px, 2.5vw, 29px); line-height: 1.17; letter-spacing: -.025em; }
h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.28; letter-spacing: -.014em; }
h3 { margin: 16px 0 6px; font-size: 15px; line-height: 1.35; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
textarea, select, input:not([type]), input[type="text"], input[type="number"],
input[type="search"], input[type="email"], input[type="date"], input[type="password"] {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
textarea, input[type="text"], input[type="number"] { width: 100%; }
textarea { min-height: 190px; resize: vertical; }
textarea::placeholder, input::placeholder { color: var(--mute); }
input[type="file"] { max-width: 100%; color: var(--ink); font: inherit; }
input::file-selector-button {
  margin-inline-end: 8px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
button, .btn {
  display: inline-block;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button.ghost, .btn.ghost { border-color: var(--line-strong); background: var(--field); color: var(--accent); }
button:not(:disabled):hover, .btn:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--mute); font-size: 12px; letter-spacing: .03em; }
tr.sel { background: var(--accent-2); }
tbody tr { cursor: pointer; }
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--neutral);
  color: var(--neutral-ink);
  font-size: 12px;
  white-space: nowrap;
}
.pill.ready, .pill.complete, .pill.met, .band.go { background: var(--good-2); color: var(--good); }
.pill.analysing, .pill.assessing, .pill.interviewing, .pill.unclear, .band.mid { background: var(--warn-2); color: var(--warn); }
.pill.error, .pill.not_met, .band.no { background: var(--bad-2); color: var(--bad); }
.band { padding: 14px 16px; border-radius: 8px; font-weight: 600; }
.bar {
  display: inline-block;
  width: min(140px, 100%);
  height: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--neutral);
  vertical-align: middle;
}
.bar i { display: block; height: 100%; background: var(--accent); }
blockquote {
  margin: 6px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.flag { color: var(--warn); font-size: 13px; }
.audit {
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--neutral-ink);
  font: 12.5px/1.55 "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
}
.audit div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
summary { cursor: pointer; }
.spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 340px;
  max-height: 60vh;
  overflow: auto;
  padding: 4px;
}
.msg { max-width: 78%; padding: 11px 14px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.interviewer { align-self: flex-start; border-top-left-radius: 3px; background: var(--surface); }
.msg.candidate { align-self: flex-end; border-top-right-radius: 3px; background: var(--accent); color: var(--on-accent); }
.composer { display: flex; gap: 10px; margin-top: 14px; }
.composer textarea { min-height: 70px; }
.notice { padding: 14px 16px; border-radius: 8px; background: var(--accent-2); }

@media (max-width: 820px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  main { margin-block: 17px; }
  .wf-agents { position: static; }
  .wf-agent-links { inset-block-start: calc(100% + 5px); inset-inline-end: 13px; }
  .composer { flex-wrap: wrap; }
  .card:has(> table) { overflow-x: auto; }
  .card:has(> table) table { min-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; }
}

/* Shared version: signed-in person, tour, account, sign out (added by workspace.js) */
.wf-user { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-right: 10px; font-size: 13.5px; }
.wf-user a { color: var(--header-ink); text-decoration: none; font-weight: 600; }
.wf-user a:hover { color: var(--header-accent); text-decoration: underline; }
.wf-user button.ghost { min-height: 31px; padding: 4px 11px; border-color: var(--header-line); background: transparent; color: var(--header-ink); font-size: 13px; }
