/* Brand: Revolve palette (warm off-white, report red, teal for interactive). Lyticore workspace swaps the accent to its magenta. */
:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --line: #e7e3da;
  --text: #141414;
  --muted: #6d675c;
  --accent: #e63b2e;
  --accent-soft: #fdeeec;
  --teal: #0e7c86; --teal-soft: #e3f0f1;
  --green: #1f7a4d; --green-soft: #e7f2ec;
  --amber: #8a6d00; --amber-soft: #f6f0d8;
  --red: #b3261e;   --red-soft: #fbe9e7;
  --grey: #8b867d;  --grey-soft: #f0ede6;
  --radius: 12px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
body[data-ws="lyticore"] { --accent: #f4027d; --accent-soft: #fde6f1; }
body[data-ws="hertz"] { --accent: #2563eb; --accent-soft: #e8eefc; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14.5px; line-height: 1.5; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 10px; }
h3 { font-size: 13.5px; font-weight: 650; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.rail { background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail .brand { padding: 2px 10px 14px; }
.rail .brand .logos { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rail .brand .logos img { display: block; height: 30px; width: auto; }
.rail .brand .logos img.lyticore { height: 26px; }
.rail .brand .logos img.hertz { height: 24px; }
.rail .brand .name { margin-top: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.rail .brand .name .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.logo-row { display: flex; align-items: center; gap: 22px; }
.logo-row img { height: 30px; width: auto; }
.logo-row img.lyticore { height: 26px; }
.logo-row img.hertz { height: 22px; }
.logo-row { flex-wrap: wrap; gap: 16px; }
.logo-row .sep { width: 1px; height: 28px; background: var(--line); }
.rail nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.rail nav a:hover { background: var(--bg); text-decoration: none; }
.rail nav a.active { background: var(--accent-soft); color: var(--accent); }
.rail nav .sub a { padding: 5px 10px 5px 22px; font-size: 13px; color: var(--muted); font-weight: 450; }
.rail nav .sub a.active { color: var(--accent); background: transparent; }
.rail .ws { margin-bottom: 14px; }
.rail .ws select { width: 100%; }
.rail .foot { margin-top: 22px; padding: 10px; font-size: 12px; color: var(--muted); }
main { padding: 26px 32px 60px; max-width: 1240px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); }

/* cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card + .card { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.kpi { padding: 14px 16px; }
.kpi .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi .value { font-size: 22px; font-weight: 650; margin-top: 2px; }

/* badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--grey-soft); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.grey { background: var(--grey-soft); color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.rag { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.rag.green { background: var(--green); } .rag.amber { background: var(--amber); } .rag.red { background: var(--red); } .rag.grey { background: var(--grey); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--teal); border-bottom-color: var(--teal); }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* forms */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
textarea.tall { min-height: 160px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-soft); border-color: var(--teal); }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 550; cursor: pointer; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(0.95); }
.btn.approve { background: var(--green); border-color: var(--green); color: #fff; }
.btn.reject { background: #fff; border-color: var(--red); color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.danger { border-color: var(--red); color: var(--red); }
form.inline { display: inline; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); }
.check input { width: auto; }

/* decision card */
.dcard { border-left: 4px solid var(--accent); }
.dcard .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dcard .title { font-weight: 650; font-size: 15px; }
.dcard .meta { font-size: 12.5px; color: var(--muted); }
.dcard .evidence { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.dcard .evidence dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0; }
.dcard .evidence dt { color: var(--muted); }
.dcard .evidence dd { margin: 0; }
.dcard .draft { white-space: pre-wrap; font-size: 13px; background: #fffdf5; border: 1px dashed var(--line); padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.dcard .actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.dcard .actions input[type=text] { flex: 1; min-width: 220px; }
.dcard.p1 { border-left-color: var(--red); } .dcard.p2 { border-left-color: var(--amber); }

/* misc */
.prose { max-width: 760px; }
.prose h1, .prose h2, .prose h3 { margin-top: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.prose h2 { font-size: 16px; } .prose h3 { font-size: 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose table td, .prose table th { padding: 6px 8px; }
.prose code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.diff { font-family: var(--mono); font-size: 12px; white-space: pre; overflow-x: auto; background: var(--bg); border-radius: 8px; padding: 10px 12px; line-height: 1.4; }
.diff .add { color: var(--green); } .diff .del { color: var(--red); } .diff .hdr { color: var(--muted); }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.flash { background: var(--accent-soft); color: var(--accent); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.agent-tile { display: block; color: inherit; }
.agent-tile:hover { text-decoration: none; border-color: var(--accent); }
.agent-tile .name { font-weight: 650; font-size: 15px; }
.agent-tile .stats { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.agent-tile .stats b { color: var(--text); font-weight: 600; }
.capture { display: flex; gap: 8px; margin-bottom: 18px; }
.capture input { flex: 1; }
.spec-section { margin-bottom: 18px; }
.spec-section h3 { margin-bottom: 4px; }
.spec-section .body { white-space: pre-wrap; }
.versions a { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); color: inherit; }
.versions a.active { color: var(--accent); font-weight: 600; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; }
.timeline { padding: 0; margin: 0; }
.login { max-width: 460px; margin: 120px auto; }
.progress { height: 8px; background: var(--grey-soft); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 16px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
}
