/* portal/public/portal.css — the agency portal (LN-0268, LN-0275, LN-0314). The AI Connect look (Archivo with
   JetBrains Mono labels, hairline panels, 3px corners) in two themes: light by default, dark when the device is
   dark, or whichever the person picks (the Theme menu sets data-theme on <html>). --brand is the agency's chosen
   accent (Team, Appearance); --accent is that colour adjusted so it reads on the current theme. Buttons are flat:
   no glow, so nothing looks "on" unless it is. */
:root {
  --brand: #7DC3FF;
  --page: #F5F6F8; --surface: #FFFFFF; --raised: #FFFFFF;
  --glass: #FFFFFF; --glass-2: #EEF1F5; --hover: #F1F4F8;
  --line: #E1E5EB; --line-2: #C9D0DA;
  --ink: #15181D; --muted: #5B6470; --faint: #6B737E;
  --accent: color-mix(in srgb, var(--brand) 40%, #0E1116); --accent-soft: color-mix(in srgb, var(--brand) 16%, white);
  --on-accent: #FFFFFF;
  --stop: #C2362F; --stop-soft: #FBE9E7; --warn: #A55F00; --warn-soft: #FDF1DC; --ok: #1D6FB0;
  --bar-bg: rgba(255, 255, 255, 0.86); --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #111316; --surface: #181B1F; --raised: #1F2328;
    --glass: #181B1F; --glass-2: #22262C; --hover: #20242A;
    --line: #2C3138; --line-2: #3E454E;
    --ink: #EEF0F2; --muted: #A1A8B1; --faint: #8F97A1;
    --accent: var(--brand); --accent-soft: color-mix(in srgb, var(--brand) 18%, #181B1F); --on-accent: #0B0D10;
    --stop: #F08A82; --stop-soft: #3A2120; --warn: #F2B54A; --warn-soft: #3A2E17; --ok: #7DC3FF;
    --bar-bg: rgba(17, 19, 22, 0.86); --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #111316; --surface: #181B1F; --raised: #1F2328;
  --glass: #181B1F; --glass-2: #22262C; --hover: #20242A;
  --line: #2C3138; --line-2: #3E454E;
  --ink: #EEF0F2; --muted: #A1A8B1; --faint: #8F97A1;
  --accent: var(--brand); --accent-soft: color-mix(in srgb, var(--brand) 18%, #181B1F); --on-accent: #0B0D10;
  --stop: #F08A82; --stop-soft: #3A2120; --warn: #F2B54A; --warn-soft: #3A2E17; --ok: #7DC3FF;
  --bar-bg: rgba(17, 19, 22, 0.86); --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.55 var(--display);
  background: var(--page); min-height: 100vh;
}
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 0.9rem; }
button, select, input, textarea { font: inherit; color: inherit; }
/* Jumps to a section land below the sticky header (LN-0326 audit). */
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar: see-through black with blur, like the site's nav */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--page); }
.bar__in { max-width: 1200px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-wrap: nowrap; align-items: center; gap: 10px 22px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; flex-shrink: 0; }
.brand__mark { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.tabs { display: flex; gap: 2px; flex-shrink: 0; }
.tab { border: 0; background: none; padding: 6px 12px; border-radius: 3px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); background: var(--glass-2); box-shadow: inset 0 -2px 0 var(--accent); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.88rem; flex-wrap: nowrap; flex-shrink: 0; }
.who__me { color: var(--muted); overflow-wrap: anywhere; }
.who__out { color: var(--ink); text-decoration: none; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 10px; background: var(--surface); }
.who__out:hover { border-color: var(--ink); }
.who select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-block: 32px 72px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 22px; }
section { display: grid; gap: 16px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font: 500 0.74rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.counts strong { color: var(--ink); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin-right: 2px; font-variant-numeric: tabular-nums; }
.err { border: 1px solid color-mix(in srgb, var(--stop) 50%, transparent); color: var(--stop); background: color-mix(in srgb, var(--stop) 8%, transparent); border-radius: 6px; padding: 10px 14px; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.input { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 9px 11px; min-width: 0; }
.input:hover { border-color: var(--line-2); }
.input::placeholder { color: var(--faint); }
#q { flex: 1 1 260px; }

/* buttons: the site's glass outline, and the dark gradient one with the accent glow */
.btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 4px; padding: 9px 15px; cursor: pointer; font-weight: 600; font-size: 0.92rem; line-height: 1.2; }
.btn:hover { border-color: var(--muted); background: var(--hover); }
/* the one main action on a screen: solid, no glow */
.btn--primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn:disabled { opacity: 0.45; cursor: default; }

.queue { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.queue__btns { display: flex; flex-wrap: wrap; gap: 8px; }

.tablewrap { overflow-x: auto; background: var(--glass); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font: 500 0.68rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); background: var(--glass-2); white-space: nowrap; }
.table tbody tr:hover td { background: var(--hover); }
.table tr:last-child td { border-bottom: 0; }
.c-tick { width: 40px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.name { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 600; color: var(--ink); text-align: left; }
.name:hover { color: var(--accent); }
.when { font: 400 0.82rem var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 3px; font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line-2); white-space: nowrap; color: var(--muted); }
.pill--new { color: var(--ink); }
.pill--calling { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pill--followed_up { color: var(--faint); border-color: var(--line); }
.pill--booked { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.pill--not_interested { color: var(--faint); border-color: var(--line); }
.pill--opted_out { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 45%, transparent); }

.panel { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: grid; gap: 12px; min-width: 0; box-shadow: var(--shadow); }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notes { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 3px; padding: 10px 12px; font-size: 0.94rem; white-space: pre-wrap; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.94rem; }
.timeline li:first-child { border-top: 0; }
@media (max-width: 560px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.addform { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.field { display: grid; gap: 6px; font: 500 0.7rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); flex: 1 1 200px; min-width: 0; }
.field .input { font: 400 0.95rem var(--display); letter-spacing: 0; text-transform: none; color: var(--ink); }
.field .small, .field .muted { font: 400 0.85rem var(--display); letter-spacing: 0; text-transform: none; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.pager #range { margin-right: auto; }

/* Appearance: the agency's accent */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 9px 14px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.swatch:hover { border-color: var(--line-2); }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch__dot { width: 12px; height: 12px; border-radius: 2px; }

/* Overview (LN-0279): window switch, number tiles, the funnel, cost per code */
.head__btn { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.seg__btn { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font: 500 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.seg__btn + .seg__btn { border-left: 1px solid var(--line-2); }
.seg__btn[aria-pressed="true"] { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 4px; min-width: 0; box-shadow: var(--shadow); }
.tile__label { font: 500 0.66rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tile__value { font: 600 1.9rem var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile__sub { font-size: 0.8rem; color: var(--faint); }
.tile--hi .tile__value { color: var(--accent); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
.funnel { display: grid; gap: 10px; }
.funnel__row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.funnel__label { font: 500 0.7rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.funnel__track { height: 12px; background: var(--glass-2); border-radius: 2px; overflow: hidden; }
.funnel__bar { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.funnel__n { font: 600 0.95rem var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.money { display: flex; align-items: center; gap: 6px; }
.money__sign { font: 500 1rem var(--mono); color: var(--muted); letter-spacing: 0; }
.money .input { width: 100%; font: 500 1rem var(--mono); }
.cpc { display: grid; gap: 4px; padding-top: 6px; }
.cpc b { font: 600 2.4rem var(--mono); letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.tablewrap--flat { background: transparent; border: 0; box-shadow: none; }

/* person actions and adding people */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.mark[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--muted); }
input[type="file"].input { padding: 7px; }
.pill--interviewed { color: var(--ink); border-color: var(--line-2); }
.pill--hired { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.lic { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.lic .k { font: 500 0.68rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.lic__state { width: 4.2em; text-transform: uppercase; }
.lic__note { flex: 1 1 220px; }
.lic__study { flex-basis: 100%; margin: 0; }
.tag { display: block; margin-top: 4px; font: 500 0.66rem var(--mono); letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.pill--coded { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.head__check { font-size: 0.85rem; }

/* LN-0287: add people (type them in, any CSV), Settings (booking, directors' calendars, tiers), reach-out */
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.seg--add { margin: 4px 0 14px; }
.seg__b { background: transparent; border: 0; padding: 8px 14px; color: var(--muted); font: 600 0.88rem var(--display); cursor: pointer; }
.seg__b[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); }
.qrows { display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr 1fr 1.1fr 1.4fr 1fr; gap: 8px; }
@media (max-width: 760px) { .qrow { grid-template-columns: 1fr 1fr; } }
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 12px 0; }
#imp-preview { margin-bottom: 8px; }
.addopts { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.reach { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.reach h3 { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.script summary { cursor: pointer; font-weight: 600; }
.script ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); }
.cal { border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 12px; background: var(--surface); display: grid; gap: 10px; }
.cal__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cal__head select { margin-left: auto; }
.cal__flags { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.wins { display: grid; gap: 8px; }
.win { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 3px; padding: 5px 8px; font: 500 0.72rem var(--mono); letter-spacing: 0.06em; cursor: pointer; }
.day[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.day:disabled { cursor: default; }
.win__t { width: 9em; }
.tiers td:first-child { font-weight: 600; white-space: nowrap; }

/* LN-0289: the onboarding board, hired to coded */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-top: 12px; }
.col { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; }
.col.is-over { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.col__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.col__head h2 { font-size: 0.95rem; font-weight: 700; }
.col__n { font: 500 0.75rem var(--mono); color: var(--muted); }
.col__hint { margin: 0; font: 500 0.66rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.col--coded .col__head h2 { color: var(--accent); }
.col__list { display: grid; gap: 8px; align-content: start; }
.col__empty { margin: 0; color: var(--faint); font-size: 0.85rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 10px; display: grid; gap: 4px; cursor: grab; }
.card.is-drag { opacity: 0.5; }
.col--coded .card { border-left: 2px solid var(--accent); }
.card__name { background: none; border: 0; padding: 6px 0; text-align: left; color: var(--ink); font: 700 0.95rem var(--display); cursor: pointer; }
.card__meta, .card__since { font: 500 0.7rem var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.card__note { font-size: 0.85rem; color: var(--ink); }
.card__study { font: 500 0.7rem var(--mono); color: var(--accent); }
.card__move { margin-top: 4px; padding: 5px 8px; font-size: 0.82rem; }
/* Onboarding, hired to coded (LN-0330) */
.board { grid-auto-columns: minmax(190px, 1fr); }
.col--licensed .col__head h2 { color: var(--ink); }
.board .col__head { flex-direction: column; align-items: flex-start; gap: 2px; }
.board .col__head h2 { white-space: nowrap; }
.col__n--amber { color: var(--warn); }
.card--amber { border-left: 3px solid var(--warn); }
.card__next { font-size: 0.86rem; color: var(--ink); }
.card__nums { font: 500 0.7rem var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.card__flag { font-size: 0.8rem; color: var(--warn); background: var(--warn-soft); border-radius: 3px; padding: 3px 6px; }
.card__badge { justify-self: start; font: 600 0.62rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 1px 5px; }
.ob-stats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .ob-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ob-stats li { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: grid; gap: 2px; }
.ob-stats strong { font: 700 1.25rem var(--display); color: var(--ink); }
.ob-stats strong.is-none { color: var(--faint); font-size: 1rem; }
.ob-stats small { font-size: 0.72rem; color: var(--faint); }
.ob-stats span { font-size: 0.8rem; color: var(--muted); }
.ob-form { margin-top: 12px; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.ob-grid label { display: grid; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.ob-left { margin-top: 12px; }
.ob-left summary { cursor: pointer; font-weight: 600; }
.ob-left__list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 10px; }
.ob-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ob-panel__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.ob-panel .k { font: 500 0.68rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.ob-flags { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.ob-flags li { font-size: 0.82rem; color: var(--warn); background: var(--warn-soft); border-radius: 3px; padding: 3px 6px; }
.mark-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.mark-date .input { padding: 5px 8px; font-size: 0.82rem; }
#obc-rows .input { padding: 5px 8px; font-size: 0.82rem; min-width: 0; width: 100%; }
#imp-preview table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
#imp-preview th, #imp-preview td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
a.btn { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }

/* LN-0294: a director's own desk */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 760px) { .desk { grid-template-columns: minmax(0, 1fr); } }
.desk__wins { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.desk-who { width: auto; }
.desk__next { border-style: dashed; }

/* LN-0299: sources and places */
.lists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin: 10px 0 14px; }
@media (max-width: 760px) { .lists { grid-template-columns: minmax(0, 1fr); } }
.lists .k { font: 500 0.68rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.chips { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 8px; font-size: 0.9rem; }
.chip__x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; }
.places { display: grid; gap: 8px; margin-bottom: 6px; }
.place { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cal__zoom { max-width: 480px; }

/* LN-0303: getting started */
.setup { border-left: 2px solid var(--accent); }
.setup__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.setup__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.setup__list li.is-done span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.setup__tick { width: 18px; height: 18px; border: 1px solid var(--line-2); border-radius: 3px; display: grid; place-items: center; color: var(--accent); font-size: 0.8rem; }
.pilot { border: 0; padding: 0; margin: 0; } .pilot legend { font: 500 0.7rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* inbox, no-show and insights (LN-0307, LN-0308) */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 600 0.7rem/18px var(--mono); text-align: center; }
.btn--warn { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 45%, transparent); }
.inbox { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.inbox__item { background: var(--glass); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: grid; gap: 8px; }
.inbox__item.is-done { opacity: 0.6; }
.inbox__top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.inbox__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox__reply { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox__reply textarea { flex: 1 1 260px; min-height: 44px; resize: vertical; }
.ov-sub { margin: 28px 0 12px; }
.ov-grid--ins { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.plain { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.9rem; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; align-items: end; height: 90px; margin: 10px 0 4px; }
.scale__col { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; font: 500 0.7rem var(--mono); color: var(--muted); }
.scale__bar { align-self: end; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.85; }
.ov-grid--ins .panel { align-content: start; }
.hours .funnel__row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.hours .funnel__n { white-space: nowrap; font-size: 0.8rem; }
/* seven tabs: one row that scrolls sideways on a phone instead of running off the edge */
.tabs { flex-wrap: nowrap; }   /* one line, never scrolls: when the tabs don't fit they fold into the Menu button (fitNav) */
.tab { white-space: nowrap; }
.brand__short { display: none; }
.bar.is-tight .brand__name { display: none; }
.bar.is-tight .brand__short { display: inline; }
.menu-btn { display: none; }
.bar.is-compact .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); color: var(--ink); font: 600 0.92rem var(--display, inherit); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.menu-btn__word { font-size: 0.82rem; color: var(--muted); }
.menu-btn__word::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 0.15s; }
.bar.is-menu .menu-btn__word::after { transform: translateY(1px) rotate(-135deg); }
.bar.is-compact .tabs { display: none; position: absolute; top: calc(100% + 6px); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 6; padding: 8px; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.bar.is-compact.is-menu .tabs { display: grid; }
.bar.is-compact .tab { text-align: left; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); }
.bar.is-compact .tab[hidden] { display: none; }
/* Account: email and role, agency, theme, sign out, behind one round button (LN-0331). */
.acct { position: relative; }
.acct__btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 700 0.9rem var(--display, inherit); cursor: pointer; display: grid; place-items: center; }
.acct__btn:hover, .acct__btn[aria-expanded="true"] { border-color: var(--ink); }
.acct__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 7; width: max-content; min-width: 240px; max-width: min(320px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.acct__menu[hidden], .acct__row[hidden] { display: none; }
.acct__menu .who__me { font-size: 0.85rem; overflow-wrap: anywhere; }
.acct__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.acct__menu .who__out { justify-self: start; }
.tab { flex: none; white-space: nowrap; }

/* the portal assistant (LN-0311): a panel on the right, full width on a phone */
.ask-open { padding: 5px 12px; }
.ask { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) 16px; }
.ask__head { display: flex; align-items: center; gap: 12px; }
.ask__head h2 { flex: 1; }
.ask__log { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 10px; min-height: 0; }
.ask__msg { padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; max-width: 92%; }
.ask__msg--user { justify-self: end; background: var(--glass-2); border: 1px solid var(--line-2); }
.ask__msg--bot { justify-self: start; background: var(--glass); border: 1px solid var(--line); }
.ask__msg--wait { color: var(--muted); font-style: italic; }
.ask__msg .pill { margin-top: 6px; }
.ask__starts { display: flex; flex-wrap: wrap; gap: 6px; }
.starter { border: 1px solid var(--line-2); background: none; border-radius: 14px; padding: 4px 10px; font-size: 0.85rem; color: var(--ink); cursor: pointer; text-align: left; }
.starter:hover { border-color: var(--accent); }
.ask__form { display: flex; gap: 8px; align-items: flex-end; }
.ask__form textarea { flex: 1; resize: none; }

/* usage meter and go-live switches (LN-0310, LN-0311) */
.meter { height: 10px; border-radius: 5px; background: var(--glass-2); overflow: hidden; }
.meter__bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width 0.4s ease; }
.meter--over .meter__bar { background: var(--stop); }
@media (prefers-reduced-motion: reduce) { .meter__bar { transition: none; } }
.sw { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sw__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sw__row p { grid-column: 1 / -1; }
.sw__state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sw-ready li::before { content: "○ "; color: var(--faint); }
.sw-ready li.is-ready::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* briefing-day roster (LN-0311) */
.rb { display: grid; gap: 14px; margin-top: 14px; }
.rb__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.rb__head h2 { margin-right: auto; }
.rb__live { color: var(--accent); }
.yes { color: var(--accent); font-weight: 600; }

/* hand-sent texts, notes and tasks (LN-0311) */
.compose { display: grid; gap: 8px; margin-top: 10px; }
.compose textarea { width: 100%; resize: vertical; }
.team-tools { display: grid; gap: 8px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.task__text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.task--late .when { color: var(--stop); }

/* wording and approvals (LN-0311) */
.wd { display: grid; gap: 18px; margin-top: 14px; }
.wd-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 4; background: var(--page); padding: 8px 0; }
.wd__item { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.wd__top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.wd__code { font: 600 0.78rem var(--mono); color: var(--accent); min-width: 2.6em; }
.wd__top h3 { margin: 0; font-size: 1rem; flex: 1 1 200px; }
.wd blockquote { margin: 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 6px 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.wd ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pill--changes { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 45%, transparent); }
.pill--changed { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.wd__ask { display: flex; flex-wrap: wrap; gap: 8px; }
.wd__ask input { flex: 1 1 240px; }
@media (max-width: 700px) { .wd-bar { position: static; } }

/* sign-out button and sign-in links (LN-0313) */
button.who__out { font: inherit; font-size: 0.9rem; cursor: pointer; }
.setup-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 6px; background: var(--glass); }
.setup-link span { flex: 1 1 100%; }
.setup-link .input { flex: 1 1 260px; font: 500 0.92rem var(--mono); }

/* LN-0314: clearer layout. Header: brand and account on one row, tabs on their own row below on narrower screens. */
.theme { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 4px; padding: 4px 6px; font-size: 0.85rem; }
.k { margin: 6px 0 0; font: 600 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.eyebrow { margin: 0 0 2px; font: 600 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.bad { color: var(--stop); font-weight: 600; }
.head--sub { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.head--sub h2 { font-size: 1.3rem; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.table tr.is-click { cursor: pointer; }

/* Home: the next briefing */
.nb { border-left: 3px solid var(--accent); }
.nb__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 8px 16px; }
.nb__top h2 { font-size: 1.35rem; }
.nb__nums { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 620px) { .nb__nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nb__nums li { background: var(--glass-2); border-radius: 6px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.nb__nums b { font: 600 1.7rem var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.nb__nums span { font-size: 0.82rem; color: var(--muted); }
.nb__nums li.is-hi { background: var(--accent-soft); }
.nb__nums li.is-hi b { color: var(--accent); }
.ov-grid--home { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .ov-grid--home { grid-template-columns: minmax(0, 1fr); } }
.ov-grid--home .panel { align-content: start; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; }
.agenda li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.agenda li:first-child { border-top: 0; }
.agenda li > :nth-child(n+3) { grid-column: 2; }
.agenda li.muted { display: block; }
.outcomes { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.outcomes:empty { display: none; }
.outcomes .btn { padding: 5px 10px; font-size: 0.82rem; }

/* Settings sub-menu: Agency settings, Messages, Team */
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.subnav__b { border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); border-radius: 4px; padding: 6px 12px; font: 600 0.88rem var(--display); cursor: pointer; }
.subnav__b:hover { color: var(--ink); }
.subnav__b.is-on { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }

/* A real on/off switch */
.switch { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); font: 600 0.9rem var(--display); }
.switch:disabled { cursor: default; opacity: 0.55; }
.switch:disabled .switch__track { filter: grayscale(1); }
.switch__track { width: 40px; height: 22px; border-radius: 11px; background: var(--line-2); position: relative; transition: background 0.15s; flex: none; }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch[aria-checked="true"] .switch__track { background: var(--accent); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(18px); }
.switch__word { min-width: 2em; }
.switch[aria-checked="false"] .switch__word { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .switch__track, .switch__knob { transition: none; } }

/* The agency calendar: Monday-first weeks; a list of days on a phone */
.cg-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cg-nav .btn { padding: 6px 12px; }
.cg-range { font-weight: 700; margin-left: 6px; }
.cg-office { width: auto; margin-left: auto; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot--clb, .ev--clb { --c: var(--accent); }
.dot--iv, .ev--iv { --c: #C77700; }
.dot--open, .ev--open { --c: var(--muted); }
.dot { background: var(--c); }
.cg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cg__dow { font: 600 0.7rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.cg__day { min-height: 112px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; color: var(--ink); font: inherit; min-width: 0; }
.cg__day:hover { border-color: var(--line-2); }
.cg__day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cg__day.is-on { background: var(--accent-soft); }
.cg__day.is-past { opacity: 0.6; }
.cg__date { font: 700 0.95rem var(--display); }
.cg__wd { display: none; }
.ev { display: block; font-size: 0.78rem; line-height: 1.3; padding: 2px 6px; border-radius: 3px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); overflow-wrap: anywhere; }
.ev b { font-weight: 600; }
.ev--none { border-left-color: transparent; background: none; color: var(--faint); padding-left: 0; }
@media (max-width: 760px) {
  .cg { grid-template-columns: minmax(0, 1fr); }
  .cg__dow { display: none; }
  .cg__day { min-height: 0; }
  .cg__day.is-past { display: none; }
  .cg__wd { display: inline; margin-right: 6px; color: var(--muted); font-weight: 600; }
  .ev { white-space: normal; }
}
.cg-day { border-left: 3px solid var(--accent); }
.cg-day .agenda li { grid-template-columns: 120px minmax(0, 1fr); }
.win__d { width: 11em; }
.win--off .win__d { width: 11em; }
.cal h3.k { margin-top: 10px; }
.cal > .linkbtn { justify-self: start; }
.ev--quiet { color: var(--muted); background: none; }

/* the person panel as a side drawer (LN-0315): opens over the page, the list stays where it was */
.drawer { position: fixed; z-index: 19; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; border-radius: 0; border-width: 0 0 0 1px; align-content: start;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 18px; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18); background: var(--surface); }
.drawer .panel__head { position: sticky; top: calc(-18px - env(safe-area-inset-top, 0px)); background: var(--surface); padding: 6px 0 8px; z-index: 1; }
.drawer-scrim { position: fixed; inset: 0; z-index: 18; background: rgba(0, 0, 0, 0.25); }
.drawer .lic { margin-top: 0; }
.drawer .timeline li { grid-template-columns: 120px minmax(0, 1fr); }
@media (max-width: 560px) { .drawer .timeline li { grid-template-columns: minmax(0, 1fr); } }

/* hosting a briefing (LN-0315) */
.room { border-left: 3px solid var(--accent); }
.room__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .room__grid { grid-template-columns: minmax(0, 1fr); } }
.room__msgs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.room__m { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; background: var(--glass-2); overflow-wrap: anywhere; }
.room__m--host { background: var(--accent-soft); }
.room__m .linkbtn { justify-self: start; }
.room__reply { display: grid; gap: 6px; }
.room__reply textarea { width: 100%; resize: vertical; }
.act-who { width: auto; }
.act li { grid-template-columns: 140px minmax(0, 1fr); }
@media (max-width: 560px) { .act li { grid-template-columns: minmax(0, 1fr); } }

/* email sequences (LN-0316) */
.seqs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.seq { border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.seq.is-off { opacity: 0.7; }
.seq__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seq__head h3 { margin: 0; font-size: 1.05rem; margin-right: auto; }
.seq__nums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seq__nums li { background: var(--glass-2); border-radius: 4px; padding: 6px 8px; display: grid; min-width: 0; }
.seq__nums b { font: 600 1.15rem var(--mono); }
.seq__nums span { font-size: 0.72rem; color: var(--muted); }
.seq__nums li.is-hi { background: var(--accent-soft); }
.seq__nums li.is-hi b { color: var(--accent); }
.seq__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.88rem; }
.seq__steps li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.seq__add { display: flex; flex-wrap: wrap; gap: 6px; }
.seq__add .input { flex: 1 1 140px; }
.seqs { order: 10; }   /* below the people list: the list is what they work from */

/* Monthly spend per source on Reports (LN-0323). */
.input--money { width: 92px; padding: 5px 8px; font-size: 0.85rem; }
.ov-grid--ins > .panel:first-child { grid-column: 1 / -1; }

/* The monthly results report (LN-0324): only on paper. */
.rp { display: none; }
@media print {
  @page { margin: 14mm; }
  body > *:not(#report) { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .rp { display: block; font: 11pt/1.45 Archivo, system-ui, sans-serif; color: #111; }
  .rp__head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
  .rp h1 { font-size: 18pt; margin: 0; }
  .rp__head p { margin: 2px 0 0; color: #444; }
  .rp__by { font: 600 9pt 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; }
  .rp h2 { font-size: 12pt; margin: 16px 0 6px; }
  .rp__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .rp__stat { border: 1px solid #ccc; border-radius: 6px; padding: 8px 10px; display: grid; break-inside: avoid; }
  .rp__stat b { font-size: 16pt; }
  .rp__stat span { font-size: 9pt; color: #333; }
  .rp__stat small { font-size: 8.5pt; color: #555; }
  .rp__table { width: 100%; border-collapse: collapse; font-size: 9.5pt; break-inside: avoid; }
  .rp__table th, .rp__table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid #ddd; }
  .rp__table th { font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.05em; color: #444; }
  .rp__foot { margin-top: 14px; font-size: 8.5pt; color: #555; }
}

/* System health on the AI Connect page (LN-0326). */
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.health > li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; border-left: 4px solid var(--ok, #2f9e6b); }
.health > li.health__bad { border-left-color: var(--stop); }
.health ul { margin: 6px 0 0; padding-left: 18px; }

/* UI/UX audit fixes (LN-0326). */
.home-mine { display: grid; gap: 16px; }
.home-mine .panel > .btn { justify-self: start; }
@media (max-width: 640px) {
  .brand { font-size: 0.95rem; }
  .who { gap: 8px; }
  .bar__in { padding-block: 8px; gap: 8px 10px; }
  .table th, .table td { padding: 9px 8px; }
  .table td:first-child { white-space: nowrap; }
  .c-office, .c-src, .c-added, .c-conf { display: none; }
  .table .when { white-space: normal; }
  .table th { letter-spacing: 0.04em; font-size: 0.6rem; padding-inline: 6px; }
  .table td { padding-inline: 6px; }
  .tablewrap { -webkit-overflow-scrolling: touch; }
  .table .tag { display: block; margin: 4px 0 0; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; }
  .col { min-height: 0; }
}
@media (pointer: coarse) {
  .tab, .seg__btn, .seg__b, .day, .subnav__b, .linkbtn, .theme, .ask-open, .who__out, .who select { min-height: 40px; }
  .chip__x { min-width: 32px; min-height: 32px; }
  input[type="checkbox"] { width: 22px; height: 22px; }
}
