/* Papo de Dono — interface de trabalho.
   Direção: "pauta de estúdio". Superfície branca, tinta azul-marinho (herdada do F&M), um ponto vermelho
   de "no ar" reservado à marca e ao momento da gravação. Geist para a interface; Newsreader só para a voz
   narrativa (briefing do Hoje e nomes de pessoas em destaque). */

:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.975 0.004 255);
  --surface-2: oklch(0.952 0.007 255);
  --line: oklch(0.912 0.008 255);
  --line-strong: oklch(0.84 0.012 255);
  --ink: oklch(0.235 0.028 255);
  --ink-2: oklch(0.4 0.022 255);
  --muted: oklch(0.505 0.018 255);
  --brand: oklch(0.365 0.075 250);          /* ≈ #1F3B5B */
  --brand-hover: oklch(0.31 0.07 250);
  --brand-soft: oklch(0.955 0.018 250);
  --on-brand: oklch(0.99 0 0);
  --focus: oklch(0.58 0.15 250);
  --tally: oklch(0.6 0.21 25);              /* luz de "no ar" */
  --ok: oklch(0.48 0.11 155);   --ok-soft: oklch(0.952 0.035 155);
  --warn: oklch(0.5 0.1 65);    --warn-soft: oklch(0.955 0.05 85);
  --bad: oklch(0.52 0.18 27);   --bad-soft: oklch(0.958 0.028 27);
  --rec: oklch(0.52 0.17 25);   --rec-soft: oklch(0.958 0.026 25);
  /* facetas de tags = 3 primeiras cores categóricas validadas (dataviz) */
  --f-interest: #2a78d6; --f-need: #eb6834; --f-offer: #1baf7a;
  --chart-grid: oklch(0.93 0.006 255);
  --s1: var(--f-interest); --s2: var(--f-need); --s3: var(--f-offer);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --t-xs: 0.75rem; --t-sm: 0.8125rem; --t-base: 0.9375rem; --t-md: 1.0625rem; --t-lg: 1.25rem; --t-xl: 1.5rem;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow-pop: 0 6px 8px -4px oklch(0.2 0.03 255 / 0.12), 0 0 0 1px oklch(0.2 0.03 255 / 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-drop: 10; --z-sticky: 20; --z-toast: 60;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(0.185 0.018 255); --surface: oklch(0.215 0.02 255); --surface-2: oklch(0.255 0.022 255);
    --line: oklch(0.3 0.02 255); --line-strong: oklch(0.38 0.022 255);
    --ink: oklch(0.95 0.006 255); --ink-2: oklch(0.83 0.012 255); --muted: oklch(0.72 0.016 255);
    --brand: oklch(0.8 0.085 250); --brand-hover: oklch(0.86 0.07 250); --brand-soft: oklch(0.29 0.045 250);
    --on-brand: oklch(0.2 0.03 255); --focus: oklch(0.75 0.13 250); --tally: oklch(0.66 0.2 25);
    --ok: oklch(0.78 0.12 155); --ok-soft: oklch(0.29 0.05 155);
    --warn: oklch(0.83 0.12 80); --warn-soft: oklch(0.3 0.05 80);
    --bad: oklch(0.76 0.14 27); --bad-soft: oklch(0.3 0.06 27);
    --rec: oklch(0.76 0.15 25); --rec-soft: oklch(0.3 0.06 25);
    --f-interest: #3987e5; --f-need: #d95926; --f-offer: #199e70;
    --chart-grid: oklch(0.28 0.02 255);
    --shadow-pop: 0 8px 16px -6px oklch(0 0 0 / 0.5), 0 0 0 1px oklch(1 0 0 / 0.08);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.185 0.018 255); --surface: oklch(0.215 0.02 255); --surface-2: oklch(0.255 0.022 255);
  --line: oklch(0.3 0.02 255); --line-strong: oklch(0.38 0.022 255);
  --ink: oklch(0.95 0.006 255); --ink-2: oklch(0.83 0.012 255); --muted: oklch(0.72 0.016 255);
  --brand: oklch(0.8 0.085 250); --brand-hover: oklch(0.86 0.07 250); --brand-soft: oklch(0.29 0.045 250);
  --on-brand: oklch(0.2 0.03 255); --focus: oklch(0.75 0.13 250); --tally: oklch(0.66 0.2 25);
  --ok: oklch(0.78 0.12 155); --ok-soft: oklch(0.29 0.05 155);
  --warn: oklch(0.83 0.12 80); --warn-soft: oklch(0.3 0.05 80);
  --bad: oklch(0.76 0.14 27); --bad-soft: oklch(0.3 0.06 27);
  --rec: oklch(0.76 0.15 25); --rec-soft: oklch(0.3 0.06 25);
  --f-interest: #3987e5; --f-need: #d95926; --f-offer: #199e70;
  --chart-grid: oklch(0.28 0.02 255);
  --shadow-pop: 0 8px 16px -6px oklch(0 0 0 / 0.5), 0 0 0 1px oklch(1 0 0 / 0.08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-base)/1.5 var(--font);
  font-feature-settings: 'ss01'; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: var(--r-sm); z-index: var(--z-toast); }
.skip:focus { left: 8px; }
#view { outline: none; min-height: 60vh; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; }
kbd { font: 500 11px/1 var(--font); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--bg); }

/* ---------- topo ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 28px;
  height: 56px; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { position: relative; width: 22px; height: 22px; border-radius: 6px; background: oklch(0.365 0.075 250); }
.brand-mark::after { content: ''; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--tally);
  box-shadow: 0 0 0 2px oklch(0.365 0.075 250); }
.mainnav { display: flex; gap: 2px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.mainnav a { display: flex; align-items: center; padding: 0 10px; font-size: var(--t-sm); font-weight: 500; color: var(--muted);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cmd-trigger { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; min-width: 220px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); color: var(--muted); cursor: pointer; font-size: var(--t-sm); }
.cmd-trigger span { flex: 1; text-align: left; }
.cmd-trigger:hover { border-color: var(--muted); color: var(--ink-2); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 6px; background: var(--bg);
  border-radius: var(--r); box-shadow: var(--shadow-pop); z-index: var(--z-drop); }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.menu-who span { font-size: var(--t-xs); color: var(--muted); }
.menu-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--r-sm); cursor: pointer; text-align: left; font-size: var(--t-sm); }
.menu-item:hover { background: var(--surface-2); }
a.menu-item { text-decoration: none; color: inherit; }

/* barra de abas (celular) */
.tabbar { display: none; }
@media (max-width: 860px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .mainnav, .cmd-trigger, .btn-capture { display: none; }
  .top-actions .menu { display: none; }
  .tabbar { position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky); display: grid; grid-template-columns: repeat(5, 1fr);
    align-items: center; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg); border-top: 1px solid var(--line); }
  .tabbar > a, .tab-more > summary { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500;
    color: var(--muted); text-decoration: none; padding: 6px 0; list-style: none; cursor: pointer; }
  .tab-more > summary::-webkit-details-marker { display: none; }
  .tabbar > a.on { color: var(--ink); }
  .tab-capture { justify-self: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand);
    display: grid; place-items: center; cursor: pointer; }
  .tab-more { position: relative; }
  .tab-more-pop { position: absolute; right: 8px; bottom: calc(100% + 10px); width: 240px; padding: 6px; background: var(--bg);
    border-radius: var(--r); box-shadow: var(--shadow-pop); display: grid; }
  .tab-more-pop a, .tab-more-pop button { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border: 0; background: none;
    text-decoration: none; text-align: left; font-size: var(--t-base); border-radius: var(--r-sm); cursor: pointer; }
  .tab-more-pop a.on { background: var(--surface-2); }
  body.logado { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- página ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }
@media (max-width: 860px) { .page { padding: 20px 16px 32px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: var(--t-xl); letter-spacing: -0.015em; }
.page-head p { color: var(--muted); font-size: var(--t-sm); margin-top: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; margin-bottom: 12px; }
.back:hover { color: var(--ink); }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-size: var(--t-sm); font-weight: 550; cursor: pointer;
  white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ok { color: var(--ok); }
.btn-ok:hover { background: var(--ok-soft); border-color: var(--ok); }
.btn-bad { color: var(--bad); }
.btn-bad:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--t-xs); }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.input, select.input, textarea, .form select { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink); font-size: var(--t-base); transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select.input, .form select { padding-right: 28px; }
.input:hover, textarea:hover { border-color: var(--muted); }
.input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px oklch(0.58 0.15 250 / .18); }
::placeholder { color: var(--muted); opacity: 1; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font-size: var(--t-sm); font-weight: 550; color: var(--ink-2); padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: var(--t-xs); color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.form-err { color: var(--bad); font-size: var(--t-sm); background: var(--bad-soft); padding: 9px 12px; border-radius: var(--r-sm); }
.more-fields > summary { cursor: pointer; font-size: var(--t-sm); color: var(--brand); font-weight: 550; padding: 2px 0; width: fit-content; }
.more-fields[open] > summary { margin-bottom: 12px; }
.more-fields { display: grid; gap: 12px; }

/* chips de escolha (radio/checkbox estilizado, input continua acessível) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); background: var(--bg); transition: all .15s; }
.chip input:hover + span { border-color: var(--muted); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* segmentado (abas pequenas) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 8px; flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; font-size: var(--t-sm); font-weight: 500; color: var(--muted);
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .on, .seg [aria-selected="true"], .seg [aria-current] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px oklch(0.2 0.03 255 / .12); }
.seg .n { margin-left: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* pílulas de status */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--t-xs);
  font-weight: 550; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-bad { background: var(--bad-soft); color: var(--bad); }
.tone-info { background: var(--brand-soft); color: var(--brand); }
.tone-rec { background: var(--rec-soft); color: var(--rec); }
.tone-mute { background: var(--surface-2); color: var(--muted); }

/* ---------- linhas (listas densas, sem cartões) ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row-main { min-width: 0; display: grid; gap: 2px; }
.row-title { font-weight: 550; overflow-wrap: anywhere; }
.row-meta { font-size: var(--t-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row.leaving { opacity: 0; transform: translateX(12px); transition: opacity .22s var(--ease), transform .22s var(--ease); }
.person-link { color: var(--ink); text-decoration: none; font-weight: 550; background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s var(--ease); }
.person-link:hover { background-size: 100% 1px; }
.arrow-sep { color: var(--muted); margin: 0 2px; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; }
}

/* tabela densa */
.tbl-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.tbl th { text-align: left; font-weight: 550; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: var(--t-xs); }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface); }
.tbl .strong { font-weight: 550; color: var(--ink); font-size: var(--t-base); }
.tbl .sub { color: var(--muted); display: block; font-size: var(--t-xs); }

/* ---------- vazio / carregando ---------- */
.empty { padding: 28px 4px; color: var(--muted); display: grid; gap: 6px; justify-items: start; }
.empty-t { color: var(--ink-2); font-weight: 550; }
.empty .btn { margin-top: 6px; }
.skel { display: grid; gap: 12px; padding: 32px; max-width: 1240px; margin: 0 auto; }
.skel-row { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite; }
.skel-row:nth-child(3n+1) { width: 60%; } .skel-row:nth-child(3n+2) { width: 85%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- diálogos ---------- */
dialog { color: var(--ink); }
dialog::backdrop { background: oklch(0.2 0.03 255 / 0.36); }
.dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--bg);
  box-shadow: var(--shadow-pop); overflow: auto; }
.dlg[open] { animation: pop .2s var(--ease); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 4px 20px; }
.dlg-head h2 { font-size: var(--t-md); }
.dlg-body { padding: 12px 20px 20px; }
.dlg.wide { width: min(760px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
/* captura: painel lateral no desktop, folha inferior no celular */
.dlg.sheet { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(440px, 100vw); border-radius: 0; }
.dlg.sheet[open] { animation: slide-in .24s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
@media (max-width: 640px) {
  .dlg.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; height: auto; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .dlg.sheet[open] { animation: slide-up .24s var(--ease); }
  .dlg { width: calc(100vw - 16px); }
}
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }

/* paleta */
.palette { width: min(620px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--bg);
  box-shadow: var(--shadow-pop); overflow: hidden; }
.palette[open] { animation: pop .16s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-in input { flex: 1; height: 54px; border: 0; background: none; font-size: var(--t-md); color: var(--ink); outline: none; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow: auto; }
.pal-list li[role=option] { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); }
.pal-list li[aria-selected="true"] { background: var(--surface-2); color: var(--ink); }
.pal-t { flex: 1; display: grid; font-weight: 500; min-width: 0; }
.pal-t small { font-weight: 400; font-size: var(--t-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sec { font-size: var(--t-xs); color: var(--muted); padding: 10px 10px 4px; font-weight: 550; }
.pal-empty { padding: 18px 10px; color: var(--muted); }
.pal-mini { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); background: var(--bg); border-radius: var(--r-sm);
  font-size: var(--t-xs); padding: 4px 8px; cursor: pointer; color: var(--ink-2); }
.pal-mini .ico { width: 14px; height: 14px; }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); background: var(--surface); }
.pal-foot kbd { margin-right: 2px; }
.mono-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 650; flex: none; }

/* seletor de pessoa */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: var(--z-drop); list-style: none; margin: 0; padding: 4px;
  background: var(--bg); border-radius: var(--r); box-shadow: var(--shadow-pop); max-height: 260px; overflow: auto; }
.picker-list li[role=option] { display: grid; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.picker-list li[role=option] span { font-size: var(--t-xs); color: var(--muted); }
.picker-list li[aria-selected="true"] { background: var(--surface-2); }
.picker-empty { padding: 10px; color: var(--muted); font-size: var(--t-sm); }

/* toasts */
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 860px) { .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r);
  background: var(--ink); color: var(--bg); font-size: var(--t-sm); font-weight: 500; box-shadow: var(--shadow-pop); animation: pop .2s var(--ease); transition: opacity .3s, transform .3s; }
.toast a { color: inherit; font-weight: 650; white-space: nowrap; }
.toast.tone-bad { background: var(--bad); color: oklch(0.99 0 0); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- HOJE ---------- */
.today-head { display: grid; gap: 14px; padding: 8px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.today-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.today-date { font-size: var(--t-sm); color: var(--muted); }
.greeting { font-family: var(--serif); font-weight: 500; font-size: 2.125rem; letter-spacing: -0.015em; line-height: 1.15; }
.briefing { font-family: var(--serif); font-size: 1.3125rem; line-height: 1.5; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.briefing a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; font-weight: 500; }
.briefing a:hover { text-decoration-color: currentColor; }
@media (max-width: 640px) { .greeting { font-size: 1.75rem; } .briefing { font-size: 1.125rem; } }
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 8px 56px; align-items: start; }
@media (max-width: 1040px) { .today-grid { grid-template-columns: 1fr; } }
.block { padding-top: 24px; scroll-margin-top: 72px; }
.block-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.block-h h2 { font-size: var(--t-md); letter-spacing: -0.01em; }
.block-h .count { font-size: var(--t-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.block-h .why { font-size: var(--t-xs); color: var(--muted); margin-left: auto; }
.block.urgent .block-h h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tally); margin-right: 8px; vertical-align: 2px; }
.all-clear { margin-top: 28px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-sm); display: flex; gap: 8px; align-items: baseline; }
.all-clear .ico { color: var(--ok); align-self: center; }
.side-block { padding-top: 24px; }
.side-block h2 { font-size: var(--t-sm); color: var(--muted); font-weight: 550; margin-bottom: 10px; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agenda li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.agenda .dt { display: grid; justify-items: center; line-height: 1.05; padding: 6px 0; border-radius: var(--r-sm); background: var(--surface-2); }
.agenda .dt b { font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.agenda .dt small { font-size: 11px; color: var(--muted); text-transform: lowercase; }
.load { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.load li { display: grid; gap: 6px; }
.load-top { display: flex; justify-content: space-between; font-size: var(--t-sm); }
.load-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 8px; gap: 2px; background: none; }
.bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand); min-width: 2px; }
.bar i.late { background: var(--bad); }
.bar i.track { background: var(--surface-2); flex: 1; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--bg); display: grid; place-items: center;
  cursor: pointer; color: transparent; flex: none; transition: all .15s; padding: 0; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.done { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.check .ico { width: 14px; height: 14px; }
.task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 640px) { .task-row { grid-template-columns: auto minmax(0, 1fr); } .task-row .row-actions { grid-column: 2; } }
.late-t { color: var(--bad); font-weight: 550; }

/* ---------- EMPRESÁRIOS ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters .input, .filters select { width: auto; height: 34px; font-size: var(--t-sm); }
.filters .q { flex: 1 1 260px; min-width: 200px; }
.filters .result-n { margin-left: auto; font-size: var(--t-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.tagline { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--t-xs);
  color: var(--ink-2); background: var(--bg); white-space: nowrap; text-decoration: none; }
a.tag:hover { border-color: var(--muted); }
.tag[data-f]::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.tag[data-f="INTEREST"]::before { background: var(--f-interest); }
.tag[data-f="NEED"]::before { background: var(--f-need); }
.tag[data-f="OFFER"]::before { background: var(--f-offer); }
.lvl { display: inline-flex; gap: 2px; vertical-align: middle; }
.lvl i { width: 5px; height: 12px; border-radius: 1px; background: var(--line-strong); }
.lvl i.on { background: var(--brand); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 760px) {
  .tbl.responsive thead { display: none; }
  .tbl.responsive tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 4px; border-bottom: 1px solid var(--line); gap: 4px 12px; }
  .tbl.responsive td { border: 0; padding: 0; }
  .tbl.responsive td.hide-m { display: none; }
  .tbl.responsive td:first-child { grid-column: 1 / -1; }
}

/* ---------- FICHA ---------- */
.person-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.big-av { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 20px; }
.person-name { font-family: var(--serif); font-weight: 500; font-size: 2rem; letter-spacing: -0.015em; line-height: 1.15; }
.person-sub { color: var(--ink-2); margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.fact { display: grid; gap: 2px; font-size: var(--t-sm); }
.fact > span:first-child { font-size: var(--t-xs); color: var(--muted); }
.fact select { height: 30px; padding: 0 26px 0 8px; font-size: var(--t-sm); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .person-head { grid-template-columns: auto 1fr; }
  .person-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .person-name { font-size: 1.625rem; }
  .big-av { width: 48px; height: 48px; font-size: 16px; }
}
.ficha-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 8px 48px; align-items: start; }
@media (max-width: 1040px) { .ficha-grid { grid-template-columns: 1fr; } }
.sec { padding-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: var(--t-md); letter-spacing: -0.01em; }
.sec-h p { font-size: var(--t-xs); color: var(--muted); }
/* facetas: base do matching */
.facets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .facets { grid-template-columns: 1fr; } }
.facet { padding: 14px 16px 16px 0; display: grid; gap: 10px; align-content: start; }
.facet + .facet { padding-left: 16px; border-left: 1px solid var(--line); }
@media (max-width: 760px) { .facet + .facet { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }
.facet h3 { font-size: var(--t-sm); display: flex; align-items: center; gap: 8px; }
.facet h3::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.facet[data-f="INTEREST"] h3::before { background: var(--f-interest); }
.facet[data-f="NEED"] h3::before { background: var(--f-need); }
.facet[data-f="OFFER"] h3::before { background: var(--f-offer); }
.facet .q { font-size: var(--t-xs); color: var(--muted); font-weight: 400; }
.facet-empty { font-size: var(--t-sm); color: var(--muted); }
.matches { display: grid; gap: 6px; margin-top: 2px; }
.match { font-size: var(--t-xs); color: var(--muted); line-height: 1.5; }
.match b { color: var(--ink-2); font-weight: 550; }
.match a { color: var(--ink); }
/* árvore de indicações */
.tree-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow-x: auto; }
.tree { display: block; min-width: 520px; width: 100%; height: auto; }
.tree text { font-family: var(--font); fill: var(--ink); font-size: 13px; }
.tree .t-sub { fill: var(--muted); font-size: 11px; }
.tree .edge { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.tree .edge.pending { stroke-dasharray: 4 4; }
.tree .node rect { fill: var(--bg); stroke: var(--line-strong); }
.tree .node.me rect { fill: var(--brand); stroke: var(--brand); }
.tree .node.me text { fill: var(--on-brand); }
.tree .node.me .t-sub { fill: var(--on-brand); opacity: .8; }
.tree a .node rect { transition: stroke .15s; }
.tree a:hover .node rect, .tree a:focus-visible .node rect { stroke: var(--brand); }
.tree .dot { stroke: var(--bg); stroke-width: 2; }
.tree-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }
.tree-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tree-legend i { width: 8px; height: 8px; border-radius: 50%; }
/* linha do tempo */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 92px 20px minmax(0, 1fr); gap: 0 10px; padding: 0 0 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 111px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-when { font-size: var(--t-xs); color: var(--muted); text-align: right; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); margin-top: 1px; }
.tl-dot .ico { width: 12px; height: 12px; }
.tl-dot.k-PODCAST { background: var(--rec-soft); color: var(--rec); }
.tl-dot.k-REFERRAL_GIVEN, .tl-dot.k-REFERRAL_RECEIVED { background: var(--brand-soft); color: var(--brand); }
.tl-body { display: grid; gap: 2px; font-size: var(--t-sm); min-width: 0; }
.tl-body strong { font-weight: 550; }
.tl-body p { color: var(--ink-2); overflow-wrap: anywhere; }
.tl-body .by { font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 520px) {
  .timeline li { grid-template-columns: 20px minmax(0, 1fr); }
  .timeline li::before { left: 9.5px; }
  .tl-when { grid-column: 2; text-align: left; order: 3; padding: 0; }
}
.kv { display: grid; gap: 10px; font-size: var(--t-sm); margin: 0; }
.kv div { display: grid; gap: 1px; }
.kv dt { font-size: var(--t-xs); color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv a { color: var(--brand); }
.side-card { padding: 16px 0; border-top: 1px solid var(--line); }
.side-card:first-child { border-top: 0; padding-top: 26px; }
.side-card h2 { font-size: var(--t-sm); font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.notes { white-space: pre-wrap; font-size: var(--t-sm); color: var(--ink-2); }
.lgpd { font-size: var(--t-xs); color: var(--muted); background: var(--surface); padding: 10px 12px; border-radius: var(--r-sm); }

/* editor de tags na edição */
.tag-editor { display: grid; gap: 10px; }
.tag-editor .tagline { min-height: 24px; }
.tag-x { border: 0; background: none; padding: 0; margin-left: 2px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.tag-x:hover { color: var(--bad); }
.dup-box { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.dup-box p { font-size: var(--t-sm); }
.dup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dup-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border-radius: var(--r-sm); padding: 8px 10px; font-size: var(--t-sm); flex-wrap: wrap; }

/* ---------- INDICAÇÕES ---------- */
.ref-new { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 28px; background: var(--surface); }
.ref-new h2 { font-size: var(--t-md); margin-bottom: 14px; }
.ref-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.ref-pair .arrow { padding-top: 34px; color: var(--muted); }
@media (max-width: 760px) { .ref-pair { grid-template-columns: 1fr; } .ref-pair .arrow { display: none; } }
.ref-who { display: grid; gap: 4px; }
.ref-who b { font-weight: 550; }

/* ---------- PODCAST ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(214px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--surface); border-radius: var(--r); min-height: 140px; display: flex; flex-direction: column; transition: background .15s, box-shadow .15s; }
.col.drop { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 6px; font-size: var(--t-sm); font-weight: 600; }
.col-h span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.col-h.rec::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tally); margin-right: 6px; }
.col-h.rec { justify-content: flex-start; }
.col-h.rec span { margin-left: auto; }
.col-list { display: grid; gap: 8px; padding: 6px 8px 10px; }
.ep { background: var(--bg); border-radius: var(--r-sm); padding: 10px 11px; display: grid; gap: 6px; cursor: grab; box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .15s, opacity .15s; }
.ep:hover { box-shadow: 0 0 0 1px var(--line-strong); }
.ep.dragging { opacity: .45; }
.ep-name { font-weight: 550; font-size: var(--t-sm); }
.ep-meta { font-size: var(--t-xs); color: var(--muted); display: grid; gap: 2px; }
.ep-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ep select { height: 26px; font-size: var(--t-xs); padding: 0 20px 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); max-width: 120px; }
.ep-refs { font-size: var(--t-xs); color: var(--muted); }
.ep-refs.need { color: var(--warn); font-weight: 550; }
.col-empty { font-size: var(--t-xs); color: var(--muted); padding: 8px 4px; }
@media (max-width: 760px) {
  .board { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .col { min-height: 0; }
  .ep { cursor: default; }
}

/* ---------- PAINEL ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: 16px 18px 16px 0; display: grid; gap: 4px; }
.kpi + .kpi { padding-left: 18px; border-left: 1px solid var(--line); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi, .kpi + .kpi { padding: 14px 12px; border-left: 0; border-bottom: 1px solid var(--line); } .kpi:nth-child(odd) { border-right: 1px solid var(--line); padding-left: 0; } }
.kpi-l { font-size: var(--t-xs); color: var(--muted); }
.kpi-v { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-d { font-size: var(--t-xs); color: var(--muted); }
.kpi-d.bad { color: var(--bad); font-weight: 550; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 48px; }
@media (max-width: 960px) { .charts { grid-template-columns: 1fr; } }
.chart { padding-top: 28px; min-width: 0; }
.chart h2 { font-size: var(--t-md); }
.chart .sub { font-size: var(--t-xs); color: var(--muted); margin: 2px 0 14px; }
.chart svg { display: block; max-width: 100%; overflow: visible; }
.chart svg text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart svg .lbl { fill: var(--ink-2); font-size: 12px; }
.chart svg .val { fill: var(--ink); font-size: 12px; font-weight: 550; }
.chart svg .grid { stroke: var(--chart-grid); stroke-width: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--t-xs); color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; }
.hbar { display: grid; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; font-size: var(--t-sm); }
.hbar-row .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar-row .track { height: 14px; position: relative; }
.hbar-row .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--series, var(--f-interest)); min-width: 2px; }
.hbar-row .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.tip { position: fixed; z-index: var(--z-toast); pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: var(--r-sm);
  font-size: var(--t-xs); line-height: 1.5; box-shadow: var(--shadow-pop); }
.tip b { font-weight: 600; }
.data-table summary { font-size: var(--t-xs); color: var(--brand); cursor: pointer; margin-top: 10px; width: fit-content; }

/* ---------- IMPORTAR ---------- */
.steps { display: grid; gap: 0; counter-reset: s; max-width: 820px; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--t-sm);
  background: var(--surface-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.step.done .step-n { background: var(--ok); color: var(--bg); }
.step h2 { font-size: var(--t-md); margin-bottom: 4px; }
.step p { color: var(--muted); font-size: var(--t-sm); margin-bottom: 12px; max-width: 62ch; }
.drop-zone { display: grid; place-items: center; gap: 6px; padding: 28px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; font-size: var(--t-sm); }
.drop-zone.over, .drop-zone:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--ink-2); }
.drop-zone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-zone b { color: var(--ink); }
.report-n { display: flex; gap: 28px; flex-wrap: wrap; margin: 4px 0 14px; }
.report-n div { display: grid; }
.report-n b { font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.report-n span { font-size: var(--t-xs); color: var(--muted); }
.issues { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: var(--t-sm); }
.issues li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); }
.issues.err li { background: var(--bad-soft); }
.issues.warn li { background: var(--warn-soft); }
.issues li span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .issues li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- USUÁRIOS ---------- */
.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.qr-box canvas, .qr-box img, .qr-box svg { width: 176px; height: 176px; background: #fff; padding: 8px; border-radius: var(--r-sm); image-rendering: pixelated; }
.secret { font: 500 var(--t-sm)/1.4 ui-monospace, 'Cascadia Mono', monospace; word-break: break-all; background: var(--surface-2); padding: 8px 10px; border-radius: var(--r-sm); }
@media (max-width: 560px) { .qr-box { grid-template-columns: 1fr; } }

/* ---------- LOGIN ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: oklch(0.3 0.065 250); color: oklch(0.97 0.01 250); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .brand { color: inherit; }
.login-art .brand-mark { background: oklch(0.97 0.01 250 / .14); }
.login-art .brand-mark::after { box-shadow: none; }
.login-quote { font-family: var(--serif); font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.015em; max-width: 16ch; font-weight: 400; }
.login-art svg { position: absolute; right: -40px; bottom: 80px; width: 380px; opacity: .5; }
.login-art svg line { stroke: oklch(0.97 0.01 250 / .35); stroke-width: 1.2; }
.login-art svg circle { fill: oklch(0.97 0.01 250 / .75); }
.login-art svg circle.hot { fill: var(--tally); }
.login-foot { font-size: var(--t-sm); opacity: .75; }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-form form { width: min(360px, 100%); }
.login-form h1 { font-size: var(--t-xl); margin-bottom: 4px; }
.login-form .lead { color: var(--muted); font-size: var(--t-sm); margin-bottom: 24px; }
.code-input { letter-spacing: 0.35em; font-variant-numeric: tabular-nums; font-size: var(--t-lg) !important; text-align: center; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { padding: 24px 20px 28px; gap: 28px; }
  .login-art svg { display: none; }
  .login-quote { font-size: 1.625rem; }
  .login-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* links do briefing (botões que rolam até o bloco) */
.briefing .jump { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
  text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; font-weight: 500; }
.briefing .jump:hover { text-decoration-color: currentColor; }
.briefing strong { color: var(--ink); font-weight: 500; }
.match .person-link { font-weight: 500; }
/* rótulos .sr dentro de áreas roláveis não podem alargar a página */
.board, .tbl-wrap, .filters, .row, .ep { position: relative; }
@media (max-width: 860px) {
  .top-actions .btn-capture, .top-actions .cmd-trigger { display: none; }
  .block-h .why { display: none; }
}
.sec-h { flex-wrap: wrap; }
@media (max-width: 760px) {
  .person-head { grid-template-columns: 1fr; }
  .person-head .big-av { display: none; }
}

/* ---------- guia "Como usar" ---------- */
.guide-head { max-width: 72ch; margin-bottom: 8px; }
.guide-head h1 { font-size: var(--t-xl); letter-spacing: -0.015em; }
.guide-lead { font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); margin-top: 10px; text-wrap: pretty; }
.guide-head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.guide-sec { margin-top: 44px; }
.start-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.start-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.start-check .ico { width: 14px; height: 14px; }
.start-row.is-done .start-check { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.start-row.is-done .row-title { color: var(--muted); }
@media (max-width: 640px) { .start-row { grid-template-columns: auto minmax(0, 1fr); } .start-row .row-actions { grid-column: 2; } }

.cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cycle-step { position: relative; padding: 18px 18px 20px 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.cycle-step + .cycle-step { padding-left: 18px; border-left: 1px solid var(--line); }
.cycle-n { font-family: var(--serif); font-size: 1.625rem; line-height: 1; color: var(--line-strong); font-variant-numeric: lining-nums tabular-nums; }
.cycle-step h3 { font-size: var(--t-base); color: var(--ink); margin-top: 6px; }
.cycle-step p { font-size: var(--t-sm); line-height: 1.5; }
.cycle-who { margin-top: auto !important; padding-top: 8px; font-size: var(--t-xs) !important; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cycle-step.mine .cycle-n { color: var(--brand); }
.you { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cycle-go { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-sm); font-weight: 500; color: var(--brand); text-decoration: none; }
.cycle-go .ico { width: 15px; height: 15px; transition: transform .18s var(--ease); }
.cycle-go:hover .ico { transform: translateX(3px); }
@media (max-width: 1040px) {
  .cycle { grid-template-columns: 1fr; }
  .cycle-step, .cycle-step + .cycle-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px; padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .cycle-step > :not(.cycle-n) { grid-column: 2; }
  .cycle-n { grid-row: 1 / span 5; }
  .cycle-step h3 { margin-top: 0; }
}

.routines { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); column-gap: 32px; }
.routine { padding: 18px 0 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; }
.routine h3 { font-size: var(--t-base); }
.routine ol { margin: 10px 0 16px; padding-left: 18px; font-size: var(--t-sm); color: var(--ink-2); display: grid; gap: 6px; }
.routine ol li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.routine .btn { margin-top: auto; }

.guide-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 56px; }
@media (max-width: 900px) { .guide-two { grid-template-columns: 1fr; } }
.auto, .keys { margin: 0; border-top: 1px solid var(--line); }
.auto div, .keys div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.auto dt { font-size: var(--t-sm); font-weight: 550; }
.auto dd { margin: 3px 0 0; font-size: var(--t-sm); color: var(--muted); }
.keys div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.keys dt { font-size: var(--t-sm); font-weight: 500; white-space: nowrap; }
.keys dd { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.gloss { border-top: 1px solid var(--line); }
.gloss details { border-bottom: 1px solid var(--line); }
.gloss summary { padding: 11px 0; font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.gloss details p { padding: 0 0 12px; font-size: var(--t-sm); color: var(--ink-2); max-width: 62ch; }

/* ---------- tour de primeiro acesso ---------- */
:root { --z-tour: 50; }
.tour-veil { position: fixed; inset: 0; z-index: var(--z-tour); }
.tour-spot { position: fixed; z-index: var(--z-tour); pointer-events: none; border-radius: var(--r);
  box-shadow: 0 0 0 2px var(--focus), 0 0 0 100vmax oklch(0.16 0.03 255 / 0.5);
  transition: top .22s var(--ease), left .22s var(--ease), width .22s var(--ease), height .22s var(--ease); }
.tour-spot.round { border-radius: 50%; }
.tour-card { position: fixed; z-index: calc(var(--z-tour) + 1); width: min(340px, calc(100vw - 24px)); padding: 16px 18px 14px;
  background: var(--bg); border-radius: var(--r); box-shadow: var(--shadow-pop); outline: none;
  animation: tour-in .2s var(--ease); }
.tour-card[data-lado="sheet"] { top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; width: auto; }
.tour-step { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-card h2 { font-size: var(--t-md); margin-top: 4px; }
.tour-d { font-size: var(--t-sm); color: var(--ink-2); margin-top: 6px; line-height: 1.55; text-wrap: pretty; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; }
.tour-nav { display: flex; gap: 6px; }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tour-spot { transition: none; }
  .tour-card { animation: none; }
  .cycle-go .ico { transition: none; }
}
