/* ==========================================================================
   BOSIA Discovery — Design System (fundação reutilizável)
   Layout: sidebar-editorial  |  Paleta: Midnight Blue
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bosia-bg, #0a0e17);
  color: var(--bosia-text, #e8eefc);
  font-family: var(--bosia-font, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--bosia-accent, #4f8cff); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.15rem; }
::selection { background: rgba(79, 140, 255, .28); }

/* ---------- Tokens locais ---------- */
:root {
  --ink: var(--bosia-text, #e8eefc);
  --ink-2: var(--bosia-muted, #8b9cc0);
  --muted: var(--bosia-muted, #8b9cc0);
  --bg: var(--bosia-bg, #0a0e17);
  --bg-2: var(--bosia-bg-2, #0e1420);
  --panel: var(--bosia-panel, #121a2a);
  --panel-2: color-mix(in srgb, var(--panel) 72%, #000);
  --line: var(--bosia-border, #22304a);
  --line-2: var(--bosia-border-2, #2e3f5e);
  --brand: var(--bosia-accent, #4f8cff);
  --ok: var(--bosia-ok, #2fd46e);
  --fail: var(--bosia-fail, #ff5c66);
  --warn: var(--bosia-warn, #ffb648);
  --radius: var(--bosia-radius, 12px);
  --radius-sm: calc(var(--radius) * .6);
  --radius-lg: calc(var(--radius) * 1.35);
  --sans: var(--bosia-font, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 40px -32px rgba(0,0,0,.9);
  --ring: 0 0 0 3px rgba(79, 140, 255, .28);
  --space: 8px;
}

/* ---------- Estrutura ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px 24px;
  background:
    radial-gradient(120% 50% at 0% 0%, rgba(79, 140, 255, .10), transparent 60%),
    var(--bg-2);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(155deg, var(--brand), color-mix(in srgb, var(--brand) 45%, #001));
  color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-name { font-weight: 700; letter-spacing: .1em; font-size: 12px; text-transform: uppercase; }
.brand-sub { display: block; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-top: 1px; }

.side-label {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding: 0 8px; margin-bottom: 6px;
}
.side-ctx {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.02); padding: 12px;
}
.side-ctx .company { font-weight: 700; font-size: 13px; line-height: 1.35; }
.side-ctx .process { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.side-ctx .ctx-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.side-switch {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;
  font-size: 11.5px; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer;
}
.side-switch:hover { text-decoration: underline; }

.stage-nav { display: grid; gap: 2px; }
.stage-item {
  display: grid; grid-template-columns: 22px minmax(0,1fr); grid-template-rows: auto auto;
  align-items: center; column-gap: 9px; row-gap: 1px;
  padding: 7px 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none;
  border: 1px solid transparent;
}
.stage-item:hover { background: rgba(255,255,255,.035); color: var(--ink); text-decoration: none; }
.stage-item.is-current {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  color: var(--ink);
}
.stage-item .num {
  grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line-2); background: var(--panel);
}
.stage-item.is-current .num { color: #fff; border-color: var(--brand); background: var(--brand); }
.stage-item.is-done .num { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 48%, transparent); }
.stage-item .stage-name { grid-column: 2; font-size: 12.5px; line-height: 1.2; }
.stage-item .stage-state { grid-column: 2; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.stage-item.is-locked { opacity: .55; cursor: not-allowed; }

.side-links { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-link {
  display: flex; align-items: center; gap: 9px; padding: 8px;
  border-radius: 8px; color: var(--ink-2); font-size: 12.5px; text-decoration: none;
}
.side-link:hover { background: rgba(255,255,255,.035); color: var(--ink); text-decoration: none; }
.side-link .ico { width: 16px; text-align: center; opacity: .85; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.side-foot .user { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11.5px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; color: var(--ink); }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 64px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; min-width: 0; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { opacity: .5; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 24px 56px; }
.page-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .head-main { min-width: 240px; flex: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand);
  margin-bottom: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.page-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.12; letter-spacing: -.015em; font-weight: 600;
}
.page-lede { color: var(--ink-2); font-size: 13px; max-width: 72ch; margin-top: 7px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.preview-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 4px;
  font-size: 11px; letter-spacing: .04em; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  padding: 3px 8px; border-radius: 999px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 7px 13px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: color-mix(in srgb, var(--panel) 76%, var(--brand)); border-color: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 84%, #fff); border-color: color-mix(in srgb, var(--brand) 84%, #fff); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--ink); border-color: var(--line); }
.btn-ok { background: color-mix(in srgb, var(--ok) 15%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 46%, transparent); color: color-mix(in srgb, var(--ok) 86%, #fff); }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 24%, var(--panel)); border-color: var(--ok); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 11.5px; border-radius: 7px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .kbd { font-size: 11px; opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255,255,255,.025);
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.chip-fail { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 38%, transparent); background: color-mix(in srgb, var(--fail) 10%, transparent); }
.chip-brand { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 42%, transparent); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.chip-fact { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, transparent); }
.chip-decl { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 38%, transparent); }
.chip-hyp { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, transparent); border-style: dashed; }
.badge-sev { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; letter-spacing: .03em; }
.sev-alta { color: #fff; background: color-mix(in srgb, var(--fail) 68%, #000); }
.sev-media { color: #1b1405; background: var(--warn); }
.sev-baixa { color: #04180d; background: color-mix(in srgb, var(--ok) 78%, #fff); }

/* ---------- Painéis / cards ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.panel-head .sub { color: var(--muted); font-size: 11.5px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.split-main { display: grid; grid-template-columns: minmax(0,1fr) 336px; gap: 18px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 18px; align-items: start; }
.split-main > *, .split-wide > *, .stack, .panel, .doc-area, .chat-area, .table-wrap { min-width: 0; }

/* ---------- Documento editorial ---------- */
.doc { min-width: 0; }
.doc-body { padding: 22px 26px 28px; }
.doc-title { font-family: var(--serif); font-size: clamp(22px, 2vw, 29px); line-height: 1.16; font-weight: 600; letter-spacing: -.01em; }
.doc-sub { color: var(--ink-2); font-size: 12.5px; margin-top: 6px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.doc-meta .meta-item { font-size: 11.5px; color: var(--muted); }
.doc-meta .meta-item strong { color: var(--ink); font-weight: 600; }
.doc-section { padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.doc-section:last-child { border-bottom: 0; padding-bottom: 4px; }
.doc-section h3 {
  font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25;
  display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
}
.doc-section h3 .sec-num { font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--brand); letter-spacing: .08em; }
.doc-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 14px 0 6px; }
.doc-section p { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); font-size: 13px; }
.doc-section p + p { margin-top: 8px; }
.doc-section .lead { font-size: 14px; color: var(--ink); }
.doc-list { display: grid; gap: 7px; margin-top: 8px; }
.doc-list li { font-size: 12.5px; color: color-mix(in srgb, var(--ink) 84%, var(--muted)); }
.doc-list.tight { gap: 4px; }
.doc-cols { columns: 2; column-gap: 28px; }
.doc-cols li { break-inside: avoid; margin-bottom: 5px; }

.note {
  border-left: 2px solid var(--brand); padding: 8px 12px; margin-top: 10px;
  background: color-mix(in srgb, var(--brand) 6%, transparent); border-radius: 0 8px 8px 0;
  font-size: 12px; color: var(--ink-2);
}
.note.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.note.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 6%, transparent); }
.note strong { color: var(--ink); }

/* ---------- Tabelas ---------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line-2);
  white-space: nowrap; background: color-mix(in srgb, var(--panel) 88%, #000);
  position: sticky; top: 0;
}
.table td { padding: 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); vertical-align: top; }
.table tbody tr:hover { background: rgba(255,255,255,.025); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--ink); }
.table .sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.table-compact td, .table-compact th { padding: 7px 8px; }
.table .actions { text-align: right; white-space: nowrap; }
.row-selected { background: color-mix(in srgb, var(--brand) 9%, transparent) !important; }

/* ---------- Formulários ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.field label .req { color: var(--fail); margin-left: 2px; }
.field .hint { font-size: 11px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  color: var(--ink); padding: 9px 11px; font-size: 12.5px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field.has-error .input, .field.has-error .textarea { border-color: var(--fail); }
.field .error { font-size: 11px; color: var(--fail); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-2); }
.checkline input { margin-top: 3px; accent-color: var(--brand); }

/* ---------- Segmented / tabs ---------- */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; color: var(--ink-2); padding: 5px 10px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.segmented button.is-active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 1px 4px rgba(0,0,0,.35); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  border: 0; background: transparent; color: var(--ink-2); padding: 9px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; min-height: 560px; max-height: calc(100vh - 132px); }
.chat-head { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; flex-wrap: nowrap; }
.chat-head > div { min-width: 0; }
.chat-head .who { white-space: nowrap; }
.chat-head .ctx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .ai-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 18%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--brand); font-size: 12px; font-weight: 800; flex: none;
}
.chat-head .who { font-size: 12.5px; font-weight: 700; }
.chat-head .ctx { font-size: 11px; color: var(--muted); }
.chat-ctx-chips { display: flex; gap: 5px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-ctx-chips .chip { font-size: 11px; padding: 1px 7px; }
.messages { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; scrollbar-width: thin; }
.msg { display: grid; gap: 4px; max-width: 95%; }
.msg .bubble {
  padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.55;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
}
.msg .who { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.msg.user { justify-self: end; }
.msg.user .bubble { background: color-mix(in srgb, var(--brand) 16%, var(--panel)); border-color: color-mix(in srgb, var(--brand) 36%, transparent); }
.msg.ai .bubble { border-left: 2px solid var(--brand); }
.msg .msg-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.msg .msg-actions .chip { font-size: 11px; cursor: pointer; }
.msg .msg-actions .chip:hover { border-color: var(--brand); color: var(--brand); }
.msg .attach { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11px; color: var(--ink-2); border: 1px dashed var(--line-2); padding: 3px 7px; border-radius: 6px; }
.chat-suggestions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.chat-suggestions .chip { cursor: pointer; }
.chat-suggestions .chip:hover { color: var(--ink); border-color: var(--brand); }
.composer { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--bg-2); }
.composer .box {
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
  padding: 8px 10px; display: grid; gap: 6px;
}
.composer textarea { border: 0; background: transparent; resize: none; min-height: 44px; outline: none; font-size: 12.5px; }
.composer .composer-row { display: flex; align-items: center; gap: 6px; }
.composer .composer-row .spacer { flex: 1; }
.composer .hint { font-size: 11px; color: var(--muted); }
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); animation: blink 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

/* ---------- Status / states ---------- */
.processing {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  border-radius: 9px; font-size: 12px; color: var(--ink);
}
.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; color: var(--ink-2); background: rgba(255,255,255,.012);
}
.empty-state .empty-title { font-weight: 700; color: var(--ink); font-size: 13px; margin-bottom: 4px; }
.empty-state p { font-size: 12px; max-width: 46ch; margin: 0 auto 12px; }
.error-state {
  border: 1px solid color-mix(in srgb, var(--fail) 34%, transparent);
  background: color-mix(in srgb, var(--fail) 7%, transparent);
  border-radius: var(--radius); padding: 12px 14px; font-size: 12px;
}
.error-state .t { color: var(--fail); font-weight: 700; margin-bottom: 2px; }
.success-state {
  border: 1px solid color-mix(in srgb, var(--ok) 34%, transparent);
  background: color-mix(in srgb, var(--ok) 7%, transparent);
  border-radius: var(--radius); padding: 12px 14px; font-size: 12px;
}
.success-state .t { color: var(--ok); font-weight: 700; margin-bottom: 2px; }

/* ---------- Stepper / versão / aprovação ---------- */
.journey { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; margin-bottom: 18px; }
.journey-step {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px;
  background: var(--panel); display: grid; gap: 2px; min-width: 0;
}
.journey-step .j-num { font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.journey-step .j-name { font-size: 11px; font-weight: 600; line-height: 1.25; }
.journey-step .j-state { font-size: 11px; color: var(--muted); }
.journey-step.is-done { border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.journey-step.is-done .j-state { color: var(--ok); }
.journey-step.is-current { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.journey-step.is-current .j-state { color: var(--brand); }
.journey-step.is-lock { opacity: .5; }

.approval-box { display: grid; gap: 10px; }
.approval-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.approval-row .label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.approval-row .value { font-size: 12px; color: var(--ink); font-weight: 600; }
.approval-note { font-size: 11px; color: var(--muted); }

/* ---------- Metadados / listas ---------- */
.meta-list { display: grid; gap: 10px; }
.meta-list .meta-row { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 8px; align-items: baseline; font-size: 12px; }
.meta-list .meta-row dt { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.meta-list .meta-row dd { margin: 0; color: var(--ink); }
.source-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb,var(--line) 64%, transparent); }
.source-row:last-child { border-bottom: 0; }
.source-row .s-ico { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 11px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.source-row .s-name { font-size: 11.5px; color: var(--ink); word-break: break-word; }
.source-row .s-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.source-row .s-status { font-size: 11px; white-space: nowrap; }

/* ---------- Lista de empresas / projetos ---------- */
.continue-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--brand) 12%, var(--panel)), var(--panel) 62%);
}
.continue-card .kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.continue-card h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-top: 2px; }
.continue-card p { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.continue-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.continue-meta .m { font-size: 11px; color: var(--muted); }
.continue-meta .m strong { color: var(--ink); font-weight: 600; display: block; font-size: 12px; }

.company-cell { display: grid; gap: 2px; }
.company-cell .name { font-weight: 600; color: var(--ink); font-size: 12.5px; }
.company-cell .desc { color: var(--muted); font-size: 11px; max-width: 46ch; }
.progress-line { width: 110px; height: 5px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.progress-line.ok i { background: var(--ok); }

/* ---------- Fluxograma ---------- */
.flow-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); padding: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.flow-wrap::-webkit-scrollbar { height: 8px; }
.flow-wrap::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.flow-wrap::-webkit-scrollbar-track { background: transparent; }
.flow-legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 4px 0; font-size: 11px; color: var(--muted); }
.flow-legend span { display: inline-flex; align-items: center; gap: 5px; }
.flow-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- Oportunidades (master-detail) ---------- */
.opp-list { display: grid; gap: 8px; }
.opp-item {
  text-align: left; width: 100%; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 11px 12px; display: grid; gap: 5px;
}
.opp-item:hover { border-color: var(--line-2); background: color-mix(in srgb, var(--panel) 90%, #fff); }
.opp-item.is-active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.opp-item .opp-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.opp-item .opp-name { font-weight: 700; font-size: 12.5px; color: var(--ink); }
.opp-item .opp-problem { font-size: 11px; color: var(--ink-2); line-height: 1.45; }
.opp-item .opp-foot { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-box { display: grid; gap: 14px; }
.detail-title { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.18; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 18px; }
.kv { display: grid; gap: 2px; }
.kv .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kv .v { font-size: 12px; color: var(--ink); }

/* ---------- Histórico ---------- */
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; padding: 0 0 16px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; background: var(--panel); border: 2px solid var(--line-2); }
.timeline-item.ok .timeline-dot { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 30%, var(--panel)); }
.timeline-item.current .timeline-dot { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.timeline-item .tl-title { font-size: 12px; font-weight: 600; color: var(--ink); }
.timeline-item .tl-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.diff { display: grid; gap: 6px; font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.diff-row { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 8px; padding: 5px 8px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg-2); }
.diff-row .sign { color: var(--muted); }
.diff-row.add { border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 7%, transparent); }
.diff-row.add .sign { color: var(--ok); }
.diff-row.del { border-color: color-mix(in srgb, var(--fail) 30%, transparent); background: color-mix(in srgb, var(--fail) 7%, transparent); }
.diff-row.del .sign { color: var(--fail); }

/* ---------- PRD TOC ---------- */
.toc { display: grid; gap: 1px; }
.toc a { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 6px; color: var(--ink-2); font-size: 11.5px; text-decoration: none; }
.toc a:hover { background: rgba(255,255,255,.035); color: var(--ink); text-decoration: none; }
.toc a .n { color: var(--muted); font-size: 11px; min-width: 16px; }
.toc a.is-current { color: var(--ink); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.toc a.is-current .n { color: var(--brand); }

/* ---------- Utilitários ---------- */
.muted { color: var(--muted); }
.small { font-size: 11px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.mono { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1220px) {
  .split-wide { grid-template-columns: minmax(0,1fr) 360px; }
  .journey { grid-template-columns: repeat(7, minmax(86px, 1fr)); }
}
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .split-main, .split-wide { grid-template-columns: minmax(0,1fr); }
  .chat { max-height: none; min-height: 0; }
  .chat .messages { max-height: 380px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; overflow: visible;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .sidebar .side-label, .sidebar .side-ctx, .sidebar .stage-nav, .sidebar .side-foot { display: none; }
  .sidebar .brand { flex: 1; }
  .side-links { display: flex; flex-wrap: wrap; border: 0; padding: 0; gap: 4px; }
  .side-link { padding: 6px 8px; }
  .topbar { height: auto; min-height: 58px; padding: 9px 14px; gap: 10px; flex-wrap: wrap; position: static; }
  .page { padding: 18px 14px 44px; }
  .page-title { font-size: 24px; }
  .journey { display: flex; grid-template-columns: none; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .journey-step { flex: 0 0 140px; }
  .grid-2, .grid-3, .form-grid, .kv-grid { grid-template-columns: 1fr; }
  .doc-body { padding: 18px 16px 22px; }
  .doc-cols { columns: 1; }
  .table th { position: static; }
  .table { min-width: 640px; }
  .table-companies { min-width: 0; }
  .table-companies thead { display: none; }
  .table-companies, .table-companies tbody, .table-companies tr, .table-companies td { display: block; width: 100%; }
  .table-companies tbody { display: grid; gap: 10px; }
  .table-companies tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px;
    padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--panel) 70%, transparent);
  }
  .table-companies tbody tr:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }
  .table-companies td { padding: 0; border: 0; min-width: 0; }
  .table-companies td:nth-child(1) { grid-column: 1 / -1; }
  .table-companies td:nth-child(2) { grid-column: 1; }
  .table-companies td:nth-child(3) { grid-column: 2; text-align: right; }
  .table-companies td:nth-child(4) { grid-column: 1 / -1; }
  .table-companies td:nth-child(2)::before, .table-companies td:nth-child(3)::before,
  .table-companies td:nth-child(4)::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  }
  .table-companies td.actions {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px;
    padding-top: 8px; border-top: 1px solid var(--line);
    text-align: left; white-space: normal;
  }
  .table-companies .company-cell .desc { max-width: none; overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
  .page-head { gap: 12px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1 1 auto; }
  .continue-card { grid-template-columns: 1fr; }
  .journey { display: flex; grid-template-columns: none; }
  .journey-step { flex: 0 0 136px; }
  .chat-ctx-chips { padding: 8px 10px; }
  .meta-list .meta-row { grid-template-columns: 1fr; gap: 1px; }
  .btn { min-height: 38px; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .topbar-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .page { padding-left: 10px; padding-right: 10px; }
  .doc-body { padding-left: 12px; padding-right: 12px; }
  .chip { font-size: 11px; }
}

/* ==========================================================================
   Snapshot (docs/preview-visual.html) — sem sobreposição, leitura linear
   ========================================================================== */
.preview-wrap { max-width: 1600px; margin: 0 auto; padding: 0 0 80px; }
.preview-intro { padding: 32px 24px 8px; }
.preview-intro h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
.preview-intro p { color: var(--ink-2); max-width: 78ch; margin-top: 10px; font-size: 13.5px; }
.preview-index {
  margin: 22px 24px 8px; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--panel);
}
.preview-index h2 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.preview-index ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; list-style: none; padding: 0; margin: 0; counter-reset: idx; }
.preview-index li { counter-increment: idx; }
.preview-index a { display: flex; gap: 9px; align-items: baseline; padding: 7px 9px; border-radius: 7px; color: var(--ink-2); font-size: 12px; text-decoration: none; border: 1px solid transparent; }
.preview-index a::before { content: counter(idx, decimal-leading-zero); color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.preview-index a:hover { background: rgba(255,255,255,.035); color: var(--ink); border-color: var(--line); text-decoration: none; }
.preview-screen {
  margin: 30px 24px 0; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg);
  scroll-margin-top: 16px;
}
.preview-screen-label {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-2); font-size: 11px; color: var(--muted);
}
.preview-screen-label .scr-id { font-family: monospace; color: var(--brand); font-size: 11px; border: 1px solid color-mix(in srgb, var(--brand) 36%, transparent); padding: 1px 6px; border-radius: 4px; }
.preview-screen-label .scr-name { color: var(--ink); font-weight: 700; font-size: 12px; }
.preview-screen-label .scr-refs { margin-left: auto; font-size: 11px; }
.preview-screen .app-shell { min-height: 0; }
.preview-screen .sidebar { position: static; height: auto; max-height: none; }
.preview-screen .topbar { position: static; height: auto; min-height: 64px; }
.preview-screen .table th { position: static; }
.preview-screen .chat { max-height: none; }
.preview-screen .messages { max-height: 420px; }
.preview-footer { padding: 28px 24px; color: var(--muted); font-size: 11px; }
@media (max-width: 860px) {
  .preview-intro { padding: 22px 14px 4px; }
  .preview-index { margin: 16px 14px 6px; }
  .preview-screen { margin: 20px 10px 0; }
  .preview-screen .sidebar { position: static; }
}

/* ---------- Áreas alternáveis no mobile (PRD-070) ---------- */
.mobile-area-tabs { display: none; }
@media (max-width: 1080px) {
  .mobile-area-tabs { display: inline-flex; gap: 3px; padding: 3px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); }
  .mobile-area-tabs button { border: 0; background: transparent; color: var(--ink-2); font: 600 11.5px/1 var(--sans); padding: 8px 12px; border-radius: 6px; cursor: pointer; }
  .mobile-area-tabs button.is-active { background: var(--panel); color: var(--ink); }
  .layout-doc .chat-area { display: none; }
  .layout-doc.show-chat .doc-area { display: none; }
  .layout-doc.show-chat .chat-area { display: block; }
}

/* ---------- Fluxo (diagrama HTML sem dependência externa) ---------- */
.flow-canvas { display: flex; align-items: center; gap: 0; min-width: 880px; padding: 10px 6px; }
.flow-node {
  flex: 1 1 0; min-width: 118px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--panel); padding: 9px 10px; display: grid; gap: 2px;
}
.flow-node .fn-step { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.flow-node .fn-name { font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.flow-node .fn-who { font-size: 11px; color: var(--muted); }
.flow-node.start { border-color: color-mix(in srgb, var(--brand) 50%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.flow-node.decision { border-style: dashed; border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.flow-node.end { border-color: color-mix(in srgb, var(--ok) 46%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.flow-arrow { flex: 0 0 22px; text-align: center; color: var(--line-2); font-size: 15px; }
.flow-branch { display: grid; gap: 4px; padding-left: 4px; border-left: 1px dashed var(--line-2); }
.flow-branch .flow-node { min-width: 130px; }
.flow-branch .bl { font-size: 11px; color: var(--warn); letter-spacing: .06em; text-transform: uppercase; padding-left: 6px; }

/* ==========================================================================
   Sprint 1 — Gestão de empresas e base responsiva do workspace
   ========================================================================== */
[hidden] { display: none !important; }

.state-slot { padding: 16px; }
.form-feedback { margin-top: 10px; }
.form-feedback .t { font-weight: 700; }
.form-feedback p { margin: 2px 0 0; }

.skeleton-table, .skeleton-detail { display: grid; gap: 12px; }
.skeleton-line {
  display: block; height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.09), rgba(255,255,255,.035));
  background-size: 200% 100%;
  animation: skeleton-pulse 1.35s ease-in-out infinite;
}
.skeleton-line.lg { height: 26px; width: min(420px, 60%); }
.skeleton-line.sm { width: min(260px, 38%); }
@keyframes skeleton-pulse { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

.empty-state.compact { padding: 16px 14px; text-align: left; }
.empty-state.compact p { margin-bottom: 0; max-width: 60ch; }
.empty-state .btn { margin-top: 2px; }

.workspace-chat { min-height: 460px; }
.workspace-chat .messages { align-content: center; }
.workspace-chat .messages .empty-state { margin: 0; }

/* Diálogo de edição */
.modal {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 90px -40px rgba(0,0,0,.95);
}
.modal::backdrop { background: rgba(3, 7, 14, .72); backdrop-filter: blur(3px); }
.modal-form { display: grid; }
.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--line);
}
.modal-head > div { min-width: 0; flex: 1; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.modal-body { padding: 16px 18px; display: grid; gap: 12px; }
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  padding: 13px 18px 16px; border-top: 1px solid var(--line);
}
.btn[aria-busy="true"] { position: relative; opacity: .82; cursor: progress; }

@media (max-width: 560px) {
  .modal { width: calc(100vw - 16px); max-height: calc(100vh - 24px); }
  .modal-foot .btn { flex: 1 1 auto; }
  .continue-meta { gap: 10px 14px; }
  .workspace-chat { min-height: 380px; }
}

/* ==========================================================================
   Sprint 2 — Investigação real de sites institucionais
   ========================================================================== */
.analysis-panel .panel-body { display: grid; gap: 14px; }
.analysis-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.analysis-form .field { margin: 0; }
.analysis-form .btn { min-height: 38px; }
.analysis-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.analysis-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.analysis-block { min-width: 0; }
.analysis-block-title {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.analysis-list { display: grid; gap: 0; }
.analysis-failures { margin-top: 12px; }
.analysis-summary p { margin: 4px 0 0; color: var(--ink-2); }
.url-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; word-break: break-all; color: var(--ink); text-decoration: none;
}
a.url-mono:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 860px) { .analysis-columns { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .analysis-form { grid-template-columns: 1fr; }
  .analysis-form .btn { width: 100%; }
}
