/* TigerrBD — one stylesheet for the site and the admin portal. The site's values come from Admin → Design
   as CSS variables (design.py); the admin portal always uses the originals below. */
:root {
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --size-body: 15px; --size-wordmark: 30px; --size-title: 30px; --size-heading: 22px; --size-headline: 19px;
  --size-label: 11px; --size-section: 11px;
  --ink: #000; --paper: #fff; --on-ink: #fff; --muted: #6b6b6b; --faint: #a3a3a3; --line: #e4e4e4; --wash: #f6f5f3; --accent: var(--v2-accent, #8c1c13); --signal: #4a5a6a;
  --page-width: 1400px; --gutter: 40px; --column-gap: 48px; --section-space: 28px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: var(--size-body); line-height: var(--v2-leading, 1.5); color: var(--ink); background: var(--paper); }
a { color: inherit; }
.wrap { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); }
.hint { color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.hint a { color: var(--ink); }
.empty { color: var(--muted); padding: 24px 0; border-bottom: 1px solid var(--line); margin: 0; }
.flash { border: 1px solid var(--ink); padding: 10px 14px; margin: 18px 0 0; }
.announce { background: var(--wash); padding: 10px var(--gutter); text-align: center; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- header and menu */
header .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 22px 0 0; border-bottom: 1px solid var(--ink); }
.wordmark { font-family: var(--serif); font-size: var(--size-wordmark); font-weight: 500; letter-spacing: var(--wordmark-tracking, .2em); text-transform: uppercase; text-decoration: none; line-height: 1; padding-bottom: 16px; }
nav.main { display: flex; align-items: flex-end; gap: 2px; }
nav.main a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-family: var(--sans); font-size: calc(var(--size-label) + 1px); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--muted); background: none; border: 1px solid transparent; border-bottom: 0; }
nav.main a.on { color: var(--ink); border-color: var(--ink); background: var(--paper); margin-bottom: -1px; padding-bottom: 1px; }
nav.main .navbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; }
nav.main .signout { display: flex; margin-left: 16px; }
@media (max-width: 1260px) {   /* between a phone and a wide desktop the menu did not fit beside the wordmark (and the feedback icon) */
  header .top { flex-wrap: wrap; justify-content: center; }
  .wordmark { width: 100%; text-align: center; padding-bottom: 10px; }
  nav.main { width: 100%; justify-content: center; }
  nav.main a { padding: 0 12px; letter-spacing: .14em; }
  nav.main a.has-dot { --dot-room: 8px; }
  nav.main .dot { --dot-pad: 12px; }
  nav.main .signout { margin-left: 8px; }
}

.foot { display: none; justify-content: center; margin-top: 48px; padding: 16px 0 28px; border-top: 1px solid var(--line); }
.foot .navbtn { min-height: 44px; padding: 0 12px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; }

/* ---------- type */
.title { font-family: var(--serif); font-size: var(--size-title); font-weight: 400; line-height: 1.1; margin: 36px 0 8px; }
.sub { color: var(--muted); margin: 0 0 24px; max-width: 720px; }
.section { font-family: var(--sans); font-size: var(--size-section); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin: var(--section-space) 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section .count { margin-left: 10px; color: var(--muted); font-weight: 400; }
.heading { font-family: var(--serif); font-size: var(--size-heading); font-weight: 400; line-height: 1.15; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }

/* ---------- forms and buttons */
.f { display: block; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; margin: 18px 0 6px; }
.f input, .f select, .f textarea { margin-top: 6px; }
.f .hint { text-transform: none; letter-spacing: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 8px 12px; min-height: 40px; width: 100%; max-width: 480px; display: block; }
textarea { max-width: none; min-height: 96px; resize: vertical; }
input:disabled, textarea:disabled { background: var(--wash); color: var(--muted); border-color: var(--line); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; display: inline; margin: 0 8px 0 0; }
.check { display: block; margin: 10px 0; }
.paper-mode fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.remote-bar, .remote-type { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.remote-type input { flex: 1 1 220px; width: auto; margin: 0; }
.remote-state { min-height: 1.6em; margin-right: 8px; }
.remote-help { margin-top: 18px; max-width: 760px; }
.remote-msg { min-height: 1.4em; }
.remote-frame { border: 1px solid var(--line); max-width: 1280px; line-height: 0; background: var(--paper); }
.remote-frame img { width: 100%; height: auto; min-height: 120px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.remote-frame img:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 22px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--on-ink); background: var(--ink); border: 1px solid var(--ink); border-radius: 0; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; }
.btn:disabled { opacity: .35; cursor: default; }
.btn.danger-btn { background: var(--accent); border-color: var(--accent); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- sign in */
.auth { max-width: 340px; margin: 14vh auto 0; text-align: center; }
.auth .wordmark { --wm-scale: 1.4; display: block; font-size: calc(var(--size-wordmark) * var(--wm-scale)); padding: 0; margin-bottom: 32px; }
.auth form { text-align: left; }
.auth input { max-width: none; }
.auth .btn { width: 100%; margin-top: 24px; }
.auth .alt { margin-top: 18px; }
.open-coverage { font-size: var(--v2-detail, 13px); color: var(--muted); }   /* the same story where it reads free (opencoverage.py) */
.open-coverage a { color: var(--ink); }
.feed-switches { display: flex; flex-wrap: wrap; gap: 4px 22px; max-width: 760px; }
@media (max-width: 700px) { .admin-table.wraps { display: table; white-space: normal; } }   /* short two-column tables wrap instead of scrolling */
.auth .auth-about { margin-top: 32px; font-size: var(--v2-detail, 13px); color: var(--muted); }   /* what the site is, for visitors and web filters */

/* ---------- dashboards */
.tabs { display: flex; gap: 4px; align-items: flex-end; border-bottom: 1px solid var(--line); margin-top: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab:hover { color: var(--ink); }
.tab.add { font-size: 20px; padding: 0 14px; color: var(--ink); }
.criteria { margin: 24px 0 0; }
.criteria summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.criteria summary::-webkit-details-marker { display: none; }
.criteria summary::before { content: "+"; font-size: 18px; margin-right: 10px; width: 14px; }
.criteria[open] summary::before { content: "–"; }
.criteria summary span:first-child { flex: none; }
.criteria summary .hint { flex: 1; text-transform: none; letter-spacing: 0; text-align: right; }
.criteria summary .load-form { flex: none; margin: 4px 0; }
.highlights { margin-top: 18px; }
.highlights .f { margin: 0 0 4px; }
.highlights ul { margin: 0; padding-left: 20px; }
.highlights li { margin: 4px 0; }
.criteria-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 24px; }
.criteria-grid .f { margin-top: 20px; }
.criteria-actions { margin: 16px 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--column-gap); margin-top: 36px; }
.split.three { grid-template-columns: 1.2fr 1.2fr 1fr; }   /* stories, companies, connections */
.mentions li { align-items: baseline; }
.mentions .n { padding-top: 0; }
.mentions li { cursor: default; }
.mentions .headline a { text-decoration: none; }
.mentions .headline a:hover { text-decoration: underline; }
.mentions .hint { margin-top: 6px; }
.tabs form { display: contents; }
.subheading { font-family: var(--sans); font-size: var(--size-section); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin: 28px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.subheading:first-of-type { margin-top: 14px; }
.empty.small { padding: 12px 0; }
textarea.prompt { min-height: 72px; }
.name-field { max-width: 360px; }
.criteria-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.loadbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.notice { border: 1px solid var(--accent); color: var(--accent); padding: 10px 14px; margin: 16px 0 0; }
.note { border: 1px solid var(--ink); color: var(--ink); padding: 10px 14px; margin: 16px 0 0; }
.stories, .companies, .plain { list-style: none; margin: 0; padding: 0; }
.story, .company, .mentions li { display: flex; gap: 14px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.story:hover .headline, .company:hover .headline { text-decoration: underline; }
.story .n, .company .n, .mentions .n { font-family: var(--serif); font-size: var(--size-headline); color: var(--faint); width: 24px; text-align: right; flex: none; padding-top: 2px; }
.story .body, .company .body, .mentions .body { display: block; min-width: 0; }
.headline { display: block; font-family: var(--serif); font-size: var(--size-headline); line-height: 1.2; }
.story .summary, .company .summary { display: block; margin-top: 4px; }
.meta { display: block; color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); margin-top: 4px; }
.tag { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--ink); padding: 0 6px; margin-left: 8px; vertical-align: middle; }
dialog.card { border: 1px solid var(--ink); padding: 28px; max-width: 640px; width: calc(100% - 32px); background: var(--paper); color: var(--ink); font: inherit; line-height: 1.5; }
dialog.card::backdrop { background: rgba(0, 0, 0, .35); }
.card h2 { font-family: var(--serif); font-size: var(--size-heading); font-weight: 400; line-height: 1.15; margin: 0 0 6px; }
.card .section { margin-top: 22px; }
/* the BD brief: flags on the story row, the brief in the story pop-up */
.bd-flags { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin: 4px 0 0; }
.bd-flag { font-size: var(--v2-label, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--v2-flag-ink, #454545); background: var(--v2-flag-wash, #e9e9e9); padding: 1px 7px; line-height: 1.6; }
.bd-flag.now { color: var(--paper); background: var(--accent); }
.bd-flag.unconfirmed { background: none; border: 1px solid currentColor; color: var(--muted); padding: 0 6px; margin-left: 4px; }
.bd-conf { font-size: var(--v2-label, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bd-who { font-size: var(--size-meta, 13px); color: var(--muted); }
.bd-brief .bd-h { font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 16px 0 4px; }
.bd-brief p { margin: 0 0 6px; }
.bd-brief .bd-none { color: var(--muted); }
.bd-email { border-left: 3px solid var(--line); padding: 8px 12px; background: var(--wash); }
.bd-email .bd-subject { font-weight: 600; margin-bottom: 6px; }
.bd-email .bd-body { white-space: pre-wrap; }
.bd-actions { display: flex; gap: 8px; margin-top: 8px; }
.prompt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.prompt-field textarea { margin-top: 6px; }
.draft-note { display: block; margin-top: 4px; }
.card .excerpt { color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px; margin-top: 12px; }
.card p { margin: 10px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { border: 1px solid var(--line); padding: 4px 10px; font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.card .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }
.card .plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.card .plain .meta { display: inline; }
/* history */
.month-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.month-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-family: var(--serif); font-size: 28px; text-decoration: none; }
.month-link[aria-disabled="true"] { color: var(--faint); pointer-events: none; }
.month-nav .title { margin: 0; text-align: center; flex: 1; }
.calendar a.day { text-decoration: none; display: block; }
.calendar .day.has { background: var(--wash); }
.calendar .day.has:hover .num { text-decoration: underline; }
.calendar .day .count { display: block; font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.day-dashboard { font-family: var(--serif); font-size: calc(var(--size-heading) + 2px); font-weight: 400; margin: 44px 0 0; }
.day-dashboard .hint { font-family: var(--sans); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); margin-left: 12px; }
.day-dashboard + .highlights, .day-dashboard + .split { margin-top: 14px; }

/* connections */
.conn { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px 84px; position: relative; overflow-anchor: none; }   /* a wide gutter for the lines; rows that hide or reorder never shift the screen */
.conn > section { position: relative; z-index: 1; }
.conn-lines { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; z-index: 0; }
.conn-lines path { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .5; }
.conn-lines path.off { opacity: .15; }
.conn-lines path.on { stroke: var(--ink); stroke-width: 1.5; opacity: 1; }
/* Links with a topic or company chosen: what it links to is gathered in one list, placed in view (connections.html script);
   every other line is hidden */
.conn.focus .conn-lines path.off { display: none; }
.conn-people .subheading { margin-top: 24px; }
.conn-people .pair-jump { margin: 0 0 10px; }
.conn-jump { padding: 2px 0 8px; } .conn-jump .linkbtn { min-height: 40px; }   /* phones: under the chosen item, a way to its links */
.conn-people .pair-jump .linkbtn { min-height: 40px; text-align: left; }
.conn-people .people .meta { display: block; }
.conn-list { list-style: none; margin: 0; padding: 0; }
.conn-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 0; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.conn-item .name { font-family: var(--serif); font-size: var(--size-headline); line-height: 1.2; }
.conn-item .badge { font-size: var(--size-label); letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; flex: none; }
.conn-item.on { border-bottom-color: var(--ink); }
.conn-item.on .name { text-decoration: underline; }
.conn-item.linked .badge { border-color: var(--ink); color: var(--ink); }
.conn-item.dim { color: var(--faint); }
.conn-item.dim .badge { color: var(--faint); }
.conn-detail { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--ink); }
.conn-detail .heading { border: 0; padding: 0; }

/* alerts */
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-row .title { margin-bottom: 0; }
.title-row + .sub { margin-top: 8px; }
.mark-read { margin: 28px 0 18px; }
/* unread alerts: a round badge with the count in white, raised at the top right of "Alerts"; placed outside the flow so
   the menu does not move when it appears */
nav.main a.has-dot { position: relative; margin-right: var(--dot-room, 0px); }
/* the badge starts just after the word (the link's padding is --dot-pad), raised; where the padding is too narrow for it,
   --dot-room adds a little space after Alerts only */
nav.main .dot { position: absolute; top: 0; left: calc(100% - var(--dot-pad, 18px) + 4px); min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px;
                background: var(--accent); color: #fff; font-family: var(--sans); font-size: 10px; font-weight: 600; line-height: 16px; letter-spacing: 0;
                text-align: center; text-transform: none; pointer-events: none; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts > li.kind-group { display: block; padding: 0; border: 0; margin-top: 18px; }
.alerts .kind-head { margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-family: var(--sans); font-weight: normal; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; }
.alerts .kind-rows { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.alerts .kind { flex: none; width: 120px; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.alerts li.unread .kind { color: var(--ink); }
.alerts .body { display: block; min-width: 0; }
.alerts .headline a { text-decoration: none; }
.alerts .headline a:hover { text-decoration: underline; }
.alerts li.unread .headline { font-weight: 500; }
.alerts .summary { display: block; margin-top: 4px; }
.switches { border-collapse: collapse; margin-top: 8px; }
.switches th, .switches td { text-align: left; padding: 8px 18px 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.switches thead th { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.switches tbody th { font-family: var(--serif); font-size: var(--size-headline); }
.switches input { margin: 0; }
.days { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 4px 26px; }
.court-watch { margin-top: 18px; max-width: 520px; }
.court-watch textarea { margin-top: 6px; }
.court-watch .hint { display: block; margin-top: 6px; }
.followed-cases { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.followed-cases li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.followed-cases li a { flex: 1 1 240px; }
.msg .tool-status { display: block; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 2px; }
.refresh-every { margin-top: 22px; }
.refresh-every select { display: inline-block; width: auto; margin: 0 10px 0 0; }
.refresh-every .hint { display: block; margin-top: 6px; }
.threshold { margin-top: 20px; max-width: 520px; }
.threshold output { font-family: var(--serif); font-size: var(--size-headline); letter-spacing: 0; text-transform: none; margin-left: 6px; }
.threshold input[type=range] { width: 100%; max-width: none; min-height: 0; padding: 0; border: 0; accent-color: var(--ink); margin: 6px 0 4px; }
.check.inline { margin: 0; }
.criteria-grid.two { grid-template-columns: 2fr 1fr; }
.criteria-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.criteria-grid input[type=text] { min-height: 40px; }
.picker.exclude { margin-top: 20px; }
.picker.exclude p.f { margin: 0 0 8px; }
.picker.exclude p.f .check.inline { margin-left: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: var(--size-body); }

/* story threads: the arrow and the timeline of earlier chapters */
.thread-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 38px; padding: 6px 0; min-height: 36px; background: none; border: 0; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.thread-toggle:hover { color: var(--ink); }
.thread-toggle .arrow { display: inline-block; transition: transform .15s; }
.thread-toggle[aria-expanded="true"] .arrow { transform: rotate(180deg); }
.thread { list-style: none; margin: 0 0 10px 38px; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.thread li { display: flex; gap: 12px; padding: 6px 0; }
.thread .when { flex: none; width: 92px; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.thread .body { min-width: 0; }
.thread .body a { text-decoration: none; }
.thread .body a:hover { text-decoration: underline; }
.thread li.now .body { font-style: italic; color: var(--muted); }
.thread.small { margin-left: 0; margin-top: 6px; }
.card .thread { margin-left: 0; }

/* angle, targets, people */
.tag.angle { border-color: var(--signal); color: var(--signal); }   /* a business angle: slate, never a tag colour */
.approach { color: var(--signal); }
.approach { margin-left: 8px; }
.page-tabs { margin-top: 18px; }   /* the same gap under the menu as the dashboard tabs */
.page-tabs + .title { margin-top: 28px; }
.page-tabs + :not(.title) { margin-top: 26px; }   /* room between a sub-menu and the page's content, whatever comes first */
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.people .body { display: block; }
.people .summary { display: block; margin-top: 2px; }
.target-box { margin-top: 8px; max-width: 520px; }
.target-box select { max-width: 260px; }
.target-box textarea { min-height: 72px; }
.targets { list-style: none; margin: 0; padding: 0; }
.targets li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.target-head .headline a { text-decoration: none; }
.target-head .headline a:hover { text-decoration: underline; }
.target-latest { margin: 8px 0 0; }
.target-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.target-row select { width: auto; max-width: 200px; min-height: 36px; }
.target-row input[type=text] { flex: 1 1 240px; min-height: 36px; max-width: none; }

/* the colour rule: blue client, green potential client, red conflict */
:root { --client: #1a56a6; --target: #1f7a3f; --conflict: #b3261e; }
/* Tag colours (.who-<tag>) come from know.tag_css, inlined by base.html: it follows the Names settings in Admin → Design */
.who-tag { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: 0 6px; margin-left: 8px; vertical-align: middle; }
.scrollbox { max-height: 440px; overflow-y: auto; border-bottom: 1px solid var(--line); }
.scrollbox.short { max-height: 240px; }
.known .row-actions { display: flex; gap: 10px; flex: none; }
.known .edit-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.known .edit-form[hidden] { display: none; }
.known .edit-form input, .known .edit-form select { width: auto; flex: 1 1 140px; min-height: 36px; }
.known .edit-form .btn { min-height: 36px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.add-row input, .add-row select { width: auto; flex: 1 1 150px; min-height: 36px; }
.add-row .btn { min-height: 36px; }
.add-row .btn-pair { display: flex; gap: 8px; flex: none; }
[hidden] { display: none !important; }   /* the hidden attribute always wins, whatever else styles the element */
.linkedin { margin-top: 18px; }
.linkedin summary { cursor: pointer; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; min-height: 40px; display: flex; align-items: center; }
.linkedin summary .hint { text-transform: none; letter-spacing: 0; margin-left: 8px; }
.conflicts { margin-top: 36px; }

/* who I know */
.know-forms, .know-lists { margin-top: 32px; }
.know-add { margin-top: 6px; padding-bottom: 14px; }
.know-add + .know-add { border-top: 1px solid var(--line); padding-top: 4px; }
.known { list-style: none; margin: 0; padding: 0; }
.known li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.known .body { display: block; min-width: 0; }
.known .headline a { text-decoration: none; }
.known .headline a:hover { text-decoration: underline; }
.known .linkbtn.small { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; min-height: 32px; flex: none; }
.known .linkbtn.small:hover { color: var(--ink); }
.filter { max-width: none; margin: 10px 0 4px; }
input[type=file] { border: 0; padding: 6px 0; min-height: 0; }

.email-frame { border: 1px solid var(--line); margin-top: 20px; background: var(--v2-paper, #fff); }
.sort-row { margin: 0 0 8px; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; }
.sort-link { color: var(--muted); text-decoration: none; margin-right: 14px; padding: 8px 0; display: inline-block; }
.sort-link.on { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* company card page */
.back { margin: 24px 0 0; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; }
.back a { text-decoration: none; }
.ticker { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-left: 10px; vertical-align: middle; }
.lede { max-width: 760px; margin: 0 0 8px; }
.card-bar { margin-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card-split { margin-top: 28px; }
.card-facts { grid-template-columns: 170px 1fr; margin: 14px 0 0; }
.card-facts dd { margin-bottom: 6px; }
.card-split .heading + .heading, .card-split ul + .heading, .card-split p + .heading, .card-facts + .heading { margin-top: 36px; }
.disputes { list-style: none; margin: 0; padding: 0; }
.disputes li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.disputes .when { flex: none; width: 78px; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.disputes .body { display: block; min-width: 0; }
.disputes .what { display: block; }
.card-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.sources a { color: var(--muted); }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain .meta { display: inline; }

.slots { list-style: none; margin: 0; padding: 0; }
.slots li { display: flex; align-items: center; gap: 16px; min-height: 48px; border-bottom: 1px solid var(--line); }
.slots .n { font-family: var(--serif); font-size: var(--size-headline); color: var(--faint); width: 24px; text-align: right; }
.slots .line { flex: 1; }
.slots + .hint { margin-top: 14px; }

/* ---------- history calendar */
.month-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.month { font-family: var(--serif); font-size: var(--size-heading); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); margin-top: 14px; }
.calendar .dow { font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar .day { min-height: 76px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: var(--size-headline); }
.calendar .day.off { color: var(--faint); }
.calendar .day.today { background: var(--wash); }
.calendar + .hint { margin-top: 14px; }

/* ---------- admin portal */
body.admin { display: flex; min-height: 100vh; }
.admin-nav { width: 210px; flex: none; border-right: 1px solid var(--line); padding: 28px 22px; display: flex; flex-direction: column; }
.admin-brand { font-family: var(--serif); font-size: 24px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 24px; line-height: 1.1; }
.admin-brand .wordmark { --wm-scale: .8; display: inline-block; font-size: 24px; padding: 0; color: inherit; }   /* the site's wordmark, a little smaller */
.admin-brand span { display: block; font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .2em; color: var(--muted); margin-top: 4px; }
.admin-nav nav a { display: flex; align-items: center; min-height: 36px; font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.admin-nav nav a.on { color: var(--ink); }
.admin-who { margin-top: auto; padding-top: 24px; font-size: var(--v2-detail, 12px); color: var(--muted); }
.admin-who form, .admin-who a { display: block; margin-top: 6px; color: var(--ink); }
.admin-main { flex: 1; min-width: 0; max-width: 1180px; padding: 28px 40px 80px; }
.admin-main .auth { margin-top: 10vh; }
.admin-flash { margin: 0 0 16px; }
.admin-title { font-family: var(--serif); font-size: var(--v2-title, 32px); font-weight: 400; line-height: 1.1; margin: 0 0 10px; }
.count { font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-left: 12px; vertical-align: middle; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.admin-table th { text-align: left; font-weight: 500; font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); }
.admin-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table.compact td { padding: 7px 12px 7px 0; }
.admin-table .num { text-align: right; }
.admin-table a { color: var(--ink); }
.admin-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0; }
.admin-row input { width: auto; flex: 1 1 200px; margin: 0; }
.pill { display: inline-block; font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); padding: 1px 8px; margin-right: 6px; line-height: 1.6; }
.pill.bad { border-color: var(--accent); color: var(--accent); }
.pill.ok { border-color: var(--ink); }
.pill.raj { border-color: var(--ink); color: var(--ink); }
/* Admin → Users: the account holding Raj's profile (practice.holder) */
.raj-profile { max-width: 760px; border: 1px solid var(--ink); padding: 14px 18px; }
.raj-profile .raj-holder { margin: 0 0 8px; font-size: calc(var(--size-body) + 1px); }
.raj-profile .facts { margin: 0 0 8px; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 8px 18px; margin: 18px 0; }
.facts dt { font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.admin-actions .admin-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.admin-pw { max-width: 400px; }
.admin-pw input { max-width: none; }
.admin-delete input { max-width: 260px; display: inline-block; vertical-align: middle; margin-right: 10px; }
.section.danger { color: var(--accent); border-color: var(--accent); }
.back-link { text-decoration: none; font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; }
.code-reveal { border: 1px solid var(--ink); padding: 14px 18px; margin: 14px 0; max-width: 640px; }
.code-block { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--v2-detail, 13px); }
.steps-list { padding-left: 20px; }
.steps-list li { margin: 6px 0; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.service-grid h3 { font-family: var(--serif); font-weight: 400; font-size: var(--v2-heading, 20px); margin: 0 0 6px; }
.email-fields, .design-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; }
.email-fields .f { margin-top: 10px; }
.email-fields input { max-width: none; }
.twostep-setup { display: flex; gap: 28px; flex-wrap: wrap; margin: 12px 0; }
.twostep-qr svg { width: 180px; height: 180px; }
.live-tag { font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--ink); padding: 0 6px; margin-left: 6px; }
.row-actions form { display: inline; }
.row-actions .linkbtn { margin-right: 12px; }

/* design schemes */
.schemes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 8px; }
.scheme { display: flex; flex-direction: column; gap: 6px; }
.scheme .sample { border: 1px solid; padding: 12px 12px 10px; line-height: 1.35; overflow: hidden; min-height: 150px; }
.scheme .sp-mark { text-transform: uppercase; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.scheme .sp-nav { display: flex; gap: 8px; text-transform: uppercase; letter-spacing: .12em; border-bottom: 1px solid; padding-bottom: 5px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; }
.scheme .sp-nav span:first-child { border-bottom: 1px solid; }
.scheme .sp-heading { border-bottom: 1px solid; padding-bottom: 3px; margin-bottom: 6px; line-height: 1.1; }
.scheme .sp-headline { line-height: 1.15; margin-bottom: 3px; }
.scheme .sp-body { margin-bottom: 8px; }
.scheme .sp-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid; padding-top: 8px; }
.scheme .sp-btn { display: inline-block; padding: 3px 7px; text-transform: uppercase; letter-spacing: .12em; line-height: 1.2; }
.scheme .sp-alert { text-transform: uppercase; letter-spacing: .12em; }
.scheme .sp-wash { margin-left: auto; width: 22px; height: 14px; border: 1px solid; }
.scheme .btn { align-self: flex-start; margin-top: 4px; }
.auth .alt { font-size: var(--v2-detail, 13px); }
.auth .alt .linkbtn { font-size: var(--v2-detail, 13px); }

/* design page */
.design-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.design-field { display: flex; flex-direction: column; gap: 6px; font-size: var(--v2-detail, 13px); margin: 8px 0; }
.design-field > span { color: var(--muted); }
.design-field input, .design-field select { margin: 0; max-width: none; }
.color-pair { display: flex; gap: 8px; }
.color-pair input[type=color] { width: 46px; flex: none; padding: 2px 4px; }
.px-field { display: flex; align-items: center; gap: 8px; }
.px-field input { max-width: 110px; }
.design-words summary { cursor: pointer; padding: 10px 0; font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.design-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.design-preview { position: sticky; top: 20px; }
.dp-frame { border: 1px solid var(--line); padding: 20px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--size-body); }
.dp-wordmark { font-family: var(--serif); font-size: var(--size-wordmark); letter-spacing: .2em; text-transform: uppercase; font-weight: 500; line-height: 1; }
.dp-nav { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 20px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dp-label { font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; }
.dp-label.on { border-bottom: 1px solid var(--ink); }
.dp-title { font-family: var(--serif); font-size: var(--size-title); line-height: 1.1; margin-bottom: 14px; }
.dp-heading { font-family: var(--serif); font-size: var(--size-heading); border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.dp-story { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dp-headline { font-family: var(--serif); font-size: var(--size-headline); line-height: 1.2; }
.dp-body { font-size: var(--size-body); }
.dp-muted { color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.dp-accent { color: var(--accent); }
.dp-btn { display: inline-block; padding: 9px 16px; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; }
.dp-btn.ghost { background: transparent; color: var(--ink); }
.dp-section { font-size: var(--size-section); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 16px; }

/* ---------- phones and narrow windows */
@media (max-width: 1000px) {
  .design-layout { grid-template-columns: 1fr; }
  .design-preview { position: static; }
}
@media (max-width: 900px) {
  .criteria-grid, .criteria-grid.two, .criteria-grid.three { grid-template-columns: 1fr; }
  .split { gap: 28px; }
  .split.three { grid-template-columns: 1fr 1fr; }   /* narrow windows: connections go underneath, full width */
  .split.three .mentions { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .split, .split.three { grid-template-columns: 1fr; gap: 36px; }   /* phones only: stories, then companies, then connections */
  .alerts li { flex-direction: column; gap: 2px; }
  .alerts .kind { width: auto; }
  .switches th, .switches td { padding-right: 10px; font-size: var(--v2-detail, 13px); }
  .switches tbody th { font-size: var(--v2-text, 15px); }
}
@media (max-width: 560px) {
  .conn { grid-template-columns: 1fr; gap: 28px; }
  .conn-lines { display: none; }
}
@media (max-width: 700px) {
  .criteria-grid.two { grid-template-columns: 1fr; }
  .month-nav .title { font-size: calc(var(--size-title) * .8); }
}
@media (max-width: 800px) {
  body.admin { flex-direction: column; }
  .admin-nav { width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .admin-brand { margin-bottom: 10px; }
  .admin-nav nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .admin-who { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding-top: 0; }
  .admin-who form, .admin-who a { margin: 0; }
  .admin-main { padding: 20px 16px 60px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .card-facts { grid-template-columns: 1fr; gap: 2px; }
  .card-facts dd { margin-bottom: 10px; }
  .disputes li { flex-direction: column; gap: 2px; }
  .disputes .when { width: auto; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .announce { padding: 8px 16px; }
  header .top { flex-direction: column; align-items: stretch; gap: 0; padding-top: 18px; }
  .wordmark { text-align: center; padding-bottom: 12px; }
  nav.main { gap: 0; overflow-x: auto; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { font-size: var(--size-label); letter-spacing: .1em; padding: 0 7px; min-height: 42px; }
  nav.main .signout { display: none; }   /* on phones, Sign out is at the foot of the page instead */
  .foot { display: flex; }
  .criteria summary .hint { display: none; }
  .criteria summary span:first-child { flex: 1; }
  .title { margin-top: 28px; }
  .tab { padding: 0 12px; }
  .calendar .day { min-height: 52px; padding: 6px; font-size: var(--v2-text, 15px); }
  .calendar .dow { padding: 8px 4px; font-size: var(--v2-label, 11px); letter-spacing: .1em; }
  .auth { margin-top: 10vh; }
}

/* Ask Claude: a thumb tab on the right edge; the chat slides out beside the page content */
:root { --ask-w: min(440px, 50vw); }   /* never more than half the window */
.ask-thumb { position: fixed; right: 0; top: 128px; z-index: 51; writing-mode: vertical-rl; min-width: 40px; padding: 16px 11px; background: var(--ink); color: var(--on-ink); border: 0; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: right .2s; }
html.ask-open .ask-thumb { right: var(--ask-w); }
html.ask-open body { padding-right: var(--ask-w); transition: padding-right .2s; }
.ask-thumb .x { display: none; margin-bottom: 10px; font-size: 14px; letter-spacing: 0; }
html.ask-open .ask-thumb .x { display: inline; }
.ask-thumb .spark { display: block; width: 22px; height: 22px; filter: brightness(0) invert(1); }   /* the Claude Spark (Anthropic's press kit, its file unchanged), drawn white on the black button */
html.ask-open .ask-thumb .spark { display: none; }
.ask-foot { margin: 6px 0 0; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ask-foot .hint { text-transform: none; letter-spacing: 0; }
/* a floating panel: clear of the top and bottom of the window, bordered all round, with a soft shadow */
.ask-drawer { position: fixed; top: 16px; right: 0; bottom: 16px; width: var(--ask-w); max-width: 50vw; z-index: 50; display: flex; flex-direction: column; padding: 12px 18px 12px 18px; background: var(--paper, var(--v2-paper, #fff)); border: 1px solid var(--ink); border-right: 0; box-shadow: -10px 0 28px rgba(0, 0, 0, .1); }
.ask-drawer[hidden] { display: none; }
.ask-drawer .messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ask-drawer .ask-box { flex: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ask-drawer .ask-box textarea { min-height: 44px; max-height: 160px; resize: none; padding: 8px 10px; }
.ask-drawer .ask-box .btn[hidden] { display: none; }
/* like a chat: the member's questions right-aligned in a soft grey bubble, Claude's answers plain on the left */
.ask-drawer .msg { display: flex; padding: 6px 0; border: 0; }
.ask-drawer .msg .who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ask-drawer .msg.user { justify-content: flex-end; }
.ask-drawer .msg.user .text { max-width: 85%; padding: 9px 14px; background: var(--wash); border-radius: 18px 18px 4px 18px; font-family: var(--sans); font-size: var(--size-body); line-height: 1.45; }
.ask-drawer .msg.assistant { flex-direction: column; }   /* (an answer's cards go under it, not squeezed beside it) */
.ask-drawer .msg.assistant .text { max-width: 100%; padding: 4px 0; }
.ask-drawer .messages { padding-top: 4px; }
.messages { list-style: none; margin: 0; padding: 0; }
.msg { padding: 14px 0; border-bottom: 1px solid var(--line); }
.msg .who { display: block; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.msg.user .text { font-family: var(--serif); font-size: var(--size-headline); line-height: 1.3; }
.msg .text p { margin: 0 0 10px; }
.msg .text p:last-child { margin-bottom: 0; }
.msg .text ul, .msg .text ol { margin: 0 0 10px; padding-left: 22px; }
.msg .text .section { margin: 12px 0 6px; }
.msg.thinking .text:empty::after { content: 'Thinking…'; color: var(--muted); }
.ask-box textarea { width: 100%; }
.ask-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.conversations li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.conversations .pick { flex: 1 1 auto; min-width: 0; min-height: 40px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; padding: 0; }
.conversations .pick:hover .headline { text-decoration: underline; }
.conversations .headline, .conversations .meta { display: block; }
@media (max-width: 700px) {
  :root { --ask-w: 100vw; }
  .ask-drawer { max-width: 100vw; top: 8px; bottom: 8px; padding: 8px 12px 10px; border-right: 1px solid var(--ink); }
  html.ask-open body { padding-right: 0; }
  html.ask-open .ask-thumb { right: 0; z-index: 52; }   /* the tab stays on top of the panel to close it */
}

.model-table th { text-align: left; font-weight: normal; font-size: var(--size-body); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 10px 16px 10px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
.model-table th .hint { display: block; max-width: 420px; }
.model-table td { padding: 10px 0; vertical-align: top; }
.model-table select { min-width: 200px; }

.usage-days th, .usage-days td { white-space: nowrap; }

.colour-key { margin-top: 28px; }
.target-add { margin: 0 0 8px; }
.target-heading { margin-top: 30px; }
.target-add + .target-heading { margin-top: 36px; }

/* delete in dark red, archive in dark blue; the library tab */
.btn.danger { color: var(--v2-accent, #8c1c13); border-color: var(--v2-accent, #8c1c13); background: transparent; }
.btn.danger:hover { background: var(--v2-accent, #8c1c13); color: var(--on-ink); }
.btn.archive { color: var(--v2-archive, #1a3d6d); border-color: var(--v2-archive, #1a3d6d); background: transparent; }
.btn.archive:hover { background: var(--v2-archive, #1a3d6d); color: var(--on-ink); }
.tab.library { padding: 0 12px; color: var(--muted); }   /* right after the + */
.tab.library.on, .tab.library:hover { color: var(--ink); }
.tab.archived-tab { font-style: italic; }
.tab.archived-tab .hint { margin-left: 6px; letter-spacing: 0; text-transform: none; }
.archived-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.archived-note .criteria-actions { margin: 0; display: flex; gap: 10px; }
.archived-list .target-row { gap: 10px; }

/* an action Claude proposed in the chat */
.ask-action { margin: 10px 0 4px; padding: 10px 12px 12px; border: 1px solid var(--ink); }
.ask-action .what { display: block; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.ask-action dl { margin: 0 0 8px; }
.ask-action dt { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.ask-action dd { margin: 1px 0 0; white-space: pre-line; }
.ask-action .act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ask-action .done { font-weight: 500; }
.ask-action .file-link { display: inline-block; padding: 8px 0; }   /* a list lookup's Excel file (40px to tap with the line) */
.ask-drawer .msg .table-wrap { overflow-x: auto; margin: 8px 0; }   /* an answer's table: scrolls inside itself, never the page */
.ask-drawer .msg table { border-collapse: collapse; font-size: var(--size-meta, 13px); }
.ask-drawer .msg th, .ask-drawer .msg td { text-align: left; vertical-align: top; padding: 5px 10px 5px 0; border-bottom: 1px solid var(--rule); }
.ask-drawer .msg th { font-weight: 500; }
.ask-action .sources { list-style: none; margin: 6px 0 0; padding: 0; font-size: var(--size-meta, 13px); }
.ask-action .sources li { padding: 6px 0; border-top: 1px solid var(--rule, #e5e5e5); overflow-wrap: anywhere; }
.ask-action .sources .cite-who { display: block; font-weight: 500; }   /* (not .who: that is the hidden You/Claude label) */
.ask-action .sources .from { display: block; color: var(--muted); }

/* right-click menu on a dashboard tab */
.ctx-menu { position: absolute; z-index: 60; min-width: 160px; background: var(--paper); border: 1px solid var(--ink); padding: 4px 0; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.ctx-menu button { display: block; width: 100%; min-height: 40px; padding: 0 16px; background: none; border: 0; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; text-align: left; color: var(--ink); cursor: pointer; }
.ctx-menu button:hover { background: var(--wash); }
.ctx-menu button.archive { color: var(--v2-archive, #1a3d6d); }
.ctx-menu button.danger { color: var(--v2-accent, #8c1c13); }

/* paging within the alert lists */
.pager { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pager button { min-width: 40px; min-height: 40px; background: none; border: 1px solid var(--line); font-size: 16px; color: var(--ink); cursor: pointer; }
.pager button:disabled { color: var(--faint); cursor: default; }
.alerts-section { margin-top: 28px; }

/* ---------- phones (iOS first): no zoom on focus, safe areas, tap targets, the calendar, wide tables */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  header .top { padding-top: calc(22px + env(safe-area-inset-top)); }
  .foot { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
.tab[data-did] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px; }   /* Safari zooms the page on focus below 16px */
  .tab { min-height: 40px; }
  .sort-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0; }
  .calendar .day { padding: 6px 4px; min-height: 60px; }
  .calendar .day .count { letter-spacing: 0; margin-top: 2px; }
  .calendar .day .count .word { display: none; }
  .calendar .dow { padding: 8px 4px; letter-spacing: .06em; }
  .admin-table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
  .ask-drawer { padding-top: 60px; }
}

/* coming up (dates from the news) and reminders */
.coming li .when { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.coming .meta-inline { color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.coming .meta-inline a { color: var(--muted); text-decoration: none; }
.coming .meta-inline a:hover { text-decoration: underline; }
.target-row .next-step { flex: 1 1 160px; }
.target-row .next-at { flex: 0 0 150px; }
.reminder { color: var(--ink); }

/* not relevant: muted chips; search */
.muted-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.muted-list .chip { display: inline-flex; align-items: center; gap: 4px; }
.muted-list .unmute { min-height: 24px; color: var(--muted); }
nav.main .search-tab { padding: 0 10px; }
header.wrap { position: relative; }
.feedback-corner { position: absolute; top: 6px; right: 6px; z-index: 5; background: none; border: 0; color: var(--muted); cursor: pointer;
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }   /* Give feedback, top right of every page */
.feedback-corner:hover, .feedback-corner:focus-visible { color: var(--ink); }
@media (min-width: 1261px) { header .top { padding-right: 46px; } }   /* (the menu sits beside the wordmark here: room for the corner icon) */
.feedback-dialog textarea { width: 100%; }
.feedback-list { list-style: none; padding: 0; margin: 18px 0 0; max-width: 900px; }
.feedback-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.feedback-list li.unread { border-left: 3px solid var(--accent); padding-left: 12px; }   /* a note not read before: like the menu's red dot */
.feedback-new { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--accent); font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.feedback-new .alert-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.feedback-note { white-space: pre-line; overflow-wrap: anywhere; }
.feedback-shot img { display: block; max-width: 100%; border: 1px solid var(--line); margin: 8px 0; }
.feedback-dialog .check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; min-height: 40px; }
.search-form { display: flex; gap: 8px; margin-top: 28px; }
.search-form input { flex: 1 1 auto; }
.search-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.search-list .summary { display: block; margin-top: 2px; color: var(--muted); }
.admin h3.subsection { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; font-weight: 500; margin: 22px 0 8px; }
.known .row-actions .court.on { color: var(--ink); font-weight: 500; }
.known .row-actions .court:not(.on) { color: var(--muted); }
/* Wordmark parts: the editor rows on the Design page, and the parts themselves */
.wm-rows { display: flex; flex-direction: column; gap: 4px; }
.wm-row { display: grid; grid-template-columns: 1.1fr 1.5fr 1.1fr auto .6fr .7fr .9fr .8fr; gap: 10px; align-items: end; }
.wm-row .design-field { margin: 4px 0; }
.wm-row .check-field input { width: 18px; height: 18px; min-height: 0; margin: 0 0 9px; }
.wm-pic { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr 1.6fr .6fr; gap: 10px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--line, #e4e4e4); }
.wm-pic input[type=file] { font-size: 13px; padding: 8px 0; }
@media (max-width: 560px) { .wm-pic { grid-template-columns: 1fr; } }
.wordmark .wm { display: inline-block; line-height: 1; }
.wordmark .wm-img { vertical-align: baseline; object-fit: contain; max-width: 100%; }   /* a picture part: its foot on the words' baseline */
.wordmark .wm-img.wm-before { margin-right: .25em; }
.wordmark .wm-img.wm-after { margin-left: .25em; }
@media (max-width: 900px) { .wm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Contacts: the People table, the upload preview and the Review tab */
.contacts-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.contacts-top .spacer { flex: 1; }
.contacts-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.contacts-filters input[type=search], .contacts-filters input[type=text] { width: auto; flex: 1 1 180px; min-height: 36px; }
.contacts-filters select { width: auto; min-height: 36px; }
.contacts-filters label.check { margin: 0 4px; }
.contacts-table { width: 100%; border-collapse: collapse; font-size: var(--size-body); }
.contacts-table th { text-align: left; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.contacts-table th a { text-decoration: none; }
.contacts-table th a.on { color: var(--ink); border-bottom: 1px solid var(--ink); }
.contacts-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.contacts-table td.name { font-family: var(--serif); font-size: var(--size-headline); line-height: 1.2; }
.contacts-table .flag { display: inline-block; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; padding: 0 6px; margin-left: 8px; vertical-align: middle; }
.contacts-table .hint { display: block; }
.contacts-table td.actions { white-space: nowrap; }
.contacts-table .edit-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.contacts-table .edit-form[hidden] { display: none; }
.contacts-table .edit-form input, .contacts-table .edit-form select, .contacts-table .edit-form textarea { width: auto; flex: 1 1 140px; min-height: 36px; margin: 0; }
.contacts-table .edit-form textarea { flex-basis: 100%; min-height: 60px; }
.contacts-pager { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.map-table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.map-table th { text-align: left; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--ink); }
.map-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.map-table select { width: auto; min-height: 36px; margin: 0; }
.map-table .sample { color: var(--muted); font-size: var(--v2-detail, 13px); }
.preview-table { width: 100%; border-collapse: collapse; font-size: var(--v2-detail, 13px); margin-bottom: 20px; }
.preview-table th, .preview-table td { text-align: left; padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.preview-table th { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.review-list { list-style: none; margin: 0; padding: 0; }
.review-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-card .why { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.review-card .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.review-card .side .lbl { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.review-card .side .nm { font-family: var(--serif); font-size: var(--size-headline); line-height: 1.2; }
.review-card .side dl { margin: 6px 0 0; }
.review-card .side dt { display: inline; color: var(--muted); }
.review-card .side dd { display: inline; margin: 0 0 0 4px; }
.review-card .side dd.diff { font-weight: 500; }
.review-card .side dl div { margin: 2px 0; }
.review-card .act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 700px) {
  .contacts-table thead { display: none; }
  .contacts-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .contacts-table td { display: block; border: 0; padding: 2px 0; }
  .contacts-table td[data-label]:not(.name):not(.actions)::before { content: attr(data-label) ": "; color: var(--muted); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; }
  .contacts-table td:empty { display: none; }
  .review-card .pair { grid-template-columns: 1fr; gap: 10px; }
}
.contacts-table td.muted { color: var(--muted); }

/* A person's page */
.person .title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.person .title-row .title { margin: 0; }
.person .flag.big { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; padding: 3px 8px; text-decoration: none; }
.person .sub { margin: 6px 0 14px; }
.person-facts { margin: 0 0 12px; }
.person-facts div { margin: 3px 0; }
.person-facts dt { display: inline; color: var(--muted); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; margin-right: 8px; }
.person-facts dd { display: inline; margin: 0; }
.person-notes { white-space: pre-line; margin: 0 0 14px; max-width: 640px; }
.person-notes .lbl, .timeline .lbl { display: block; color: var(--muted); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.person-edit { margin: 10px 0 20px; max-width: 760px; }
.person-edit[hidden] { display: none; }
.person-edit .email-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.person-waiting { list-style: none; margin: 0 0 10px; padding: 0; }
.person-waiting li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-row { display: flex; gap: 8px; margin: 0 0 14px; max-width: 640px; }
.note-row input { flex: 1; margin: 0; min-height: 40px; }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.timeline li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: var(--v2-detail, 13px); padding-top: 2px; }
.timeline .what .hint { display: block; }
.timeline .ev-change .lbl, .timeline .ev-merged .lbl { color: var(--accent); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.person .criteria-actions { margin: 0 0 22px; }
.person-research { max-width: 720px; margin: 0 0 18px; padding: 12px 14px; background: var(--wash); }
.person-research p { margin: 4px 0 8px; }
.person-research .lbl { display: block; color: var(--muted); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.person-research .lbl .hint { text-transform: none; letter-spacing: 0; }
.research-settings { max-width: 720px; margin-bottom: 8px; }
.undo-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 10px 14px; background: var(--ink); color: var(--on-ink); }
.undo-bar .btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.undo-bar .left { opacity: .7; margin-left: 4px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; background: var(--wash); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select { width: auto; min-height: 36px; margin: 0; }
.contacts-table th.pick, .contacts-table td.pick { width: 28px; padding-right: 6px; }
.contacts-table td.pick input { width: 18px; height: 18px; min-height: 0; margin: 4px 0 0; }
.pick-hit { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -11px -11px -11px -11px; cursor: pointer; }   /* a 40px tap area round the small box */
.pick-hit input { margin: 0 !important; }
@media (max-width: 700px) { .contacts-table td.pick { display: inline-block; margin-right: 8px; } .contacts-table td.name { display: inline-block; width: calc(100% - 44px); } }
.known li.portfolio-child { padding-left: 22px; border-bottom-style: dashed; }
.known li.portfolio-child .headline::before { content: "↳ "; color: var(--muted); }
.known li.portfolio-child.former { opacity: .6; }
.known .portfolio-head { display: block; margin-top: 4px; }
.lineage { margin: -6px 0 12px; }

/* Contact dashboards: the kind choice, the picker, the matched contacts on a story */
.kind-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 760px; }
.kind-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--ink); }
.kind-card .kind-name { font-family: var(--serif); font-size: var(--size-heading); line-height: 1.1; }
.kind-card .kind-text { color: var(--muted); flex: 1; }
.kind-card .btn { align-self: flex-start; }
/* the welcome page's ready-made dashboard (starter.py): the first square of the kinds' grid */
.ready-card { border-width: 2px; }
.kind-card .ready-label { font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.picker { margin-bottom: 12px; }
.picker-row { display: flex; gap: 8px; margin-top: 6px; }
.picker-row input { flex: 1; margin: 0; }
.picker-row select { width: auto; margin: 0; min-height: 40px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; padding: 0; }
.chips .chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 10px; border: 1px solid var(--muted); color: var(--muted); font-size: var(--v2-detail, 13px); }
.chips .chip.known { border-color: var(--ink); color: var(--ink); }
.chips .chip label.inline { display: inline-flex; align-items: center; gap: 4px; font-size: var(--v2-detail, 12px); }
.chips .chip label.inline input { width: 14px; height: 14px; min-height: 0; margin: 0; }
.chips .chip .x { background: none; border: 0; padding: 0 2px; font: inherit; color: inherit; cursor: pointer; }
.contacts-line { display: block; margin-top: 3px; font-size: var(--v2-detail, 13px); }
.contacts-line sup { color: var(--signal); }
/* "You know": the member's own contacts at a story's or row's companies */
.you-know { display: block; margin-top: 4px; font-size: var(--v2-detail, 13px); line-height: 1.5; }
.you-know .yk-label { font-size: var(--v2-label, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 1px 6px; margin-right: 4px; }
.you-know a { text-decoration: none; }
.you-know a:hover { text-decoration: underline; }
.you-know .yk-role { color: var(--muted); }
.you-know-list li { margin: 4px 0; }
/* the Daily Brief */
.brief-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 4px; }
.brief-head .day-title { margin: 0; font-family: var(--serif); font-size: var(--v2-title, 26px); }
.brief-meta { margin: 0 0 18px; }
.brief-section { margin: 26px 0; }
.brief-section > .heading { margin-bottom: 6px; }
.brief-area { margin: 22px 0 4px; }
/* wide screens: the Daily Brief reads in two columns (shorter lines), each item kept whole */
@media (min-width: 1100px) {
  .brief-section { column-count: 2; column-gap: 48px; }
  .brief-section > .heading { column-span: all; }
  .brief-section .brief-item { break-inside: avoid; }
  .brief-section .brief-area { break-after: avoid; }
  .brief-section .brief-area:first-of-type { margin-top: 0; }
}
.brief-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.brief-item .headline { font-size: var(--size-name, 18px); margin: 4px 0 2px; font-weight: 600; line-height: 1.3; }
.brief-item .headline a { color: var(--ink); text-decoration: none; }
.brief-item .headline a:hover { text-decoration: underline; }
.brief-item .meta { margin: 0 0 6px; font-size: var(--size-meta, 13px); color: var(--muted); }
.brief-item .summary { margin: 0 0 6px; color: var(--v2-detail-ink, #3a3a3a); }
.brief-item .read-at { margin: 0 0 6px; font-size: var(--size-meta, 13px); color: var(--muted); }
.brief-item .read-at a { color: var(--ink); }
.brief-item .read-at .free { font-size: var(--v2-label, 11px); text-transform: uppercase; letter-spacing: .06em; }
.brief-item .bd-flags { margin: 0; }
.brief-contact { margin: 6px 0; font-size: var(--v2-detail, 14px); }
.brief-contact .f { margin-right: 6px; }
.brief-detail { margin-top: 6px; }
.brief-detail > summary { cursor: pointer; font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
@media (max-width: 560px) { .brief-head { flex-wrap: wrap; } }
.press-quote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--ink); font-family: var(--serif); font-size: 1.05em; line-height: 1.45; }
.press-quote .hint { display: block; font-family: var(--sans); font-size: var(--size-meta, 13px); margin-top: 4px; }
.link-line { margin: 4px 0 0; font-size: var(--size-meta, 13px); }
.research-approach, .covered-outlets { margin: 10px 0; }
.research-approach textarea { margin-top: 8px; }
textarea[data-autogrow] { overflow: hidden; resize: none; min-height: 120px; }
.stories .footnote { color: var(--muted); font-size: var(--v2-detail, 13px); padding: 8px 0 0; list-style: none; }
.add-contact { display: inline-block; margin-top: 4px; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; cursor: pointer; }
.add-contact:hover { color: var(--ink); border-color: var(--ink); }

.tag-defs { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.tag-defs li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tag-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-row input[type=text] { width: auto; flex: 1 1 160px; min-height: 36px; margin: 0; }
.tag-row input[type=color] { width: 40px; height: 36px; min-height: 0; padding: 2px; margin: 0; border: 1px solid var(--line); background: none; }
.tag-row .who-tag { margin: 0; min-width: 90px; text-align: center; }

/* Contacts pages: one toolbar, one-line rows, icons, a side panel for editing */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 26px 0 12px; }   /* room under the sub-menu */
.toolbar input[type=search] { width: auto; flex: 1 1 160px; min-height: 36px; margin: 0; }
.toolbar select { width: auto; min-height: 36px; margin: 0; max-width: 150px; }
.toolbar .spacer { flex: 1; }
.toolbar .actions { display: flex; gap: 8px; margin-left: auto; flex: none; }
.toolbar form { display: inline; }
.toolbar .check.inline { margin: 0 4px; }
.add-panel { margin: 0 0 12px; padding: 10px 12px; background: var(--wash); }
.add-panel[hidden] { display: none; }
.add-panel .add-row { margin-top: 0; align-items: center; }
.add-panel .add-row .hint { flex-basis: 100%; }
.add-panel .parent-row { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.add-panel .parent-row[hidden] { display: none; }
.colour-key.hint { margin: 0 0 10px; }
.known.compact li.row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.known.compact .line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; flex: 1; }
.known.compact .line .meta { font-size: var(--v2-detail, 13px); color: var(--muted); }
.known.compact .line .meta .linkbtn { font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; min-height: 0; }
.known.compact li.portfolio-child { padding-left: 20px; }
.known.compact li.portfolio-child .headline::before { content: "↳ "; color: var(--muted); }
.known.compact .edit-form[hidden] { display: none; }
.row-icons { display: inline-flex; gap: 2px; flex: none; align-items: center; }
.row-icons form { display: inline; }
.icon { background: none; border: 0; padding: 6px; margin: 0; cursor: pointer; color: var(--muted); line-height: 0; border-radius: 2px; min-height: 0; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon:hover { color: var(--ink); background: var(--wash); }
.icon.court { color: var(--faint); }
.icon.court.on { color: var(--ink); }
.icon.court.on svg { stroke-width: 2.1; }
.known.compact li.row .row-icons > *, .contacts-table tr .row-icons > * { opacity: 0; transition: opacity .12s; }
.known.compact li.row .row-icons > .bell.on, .contacts-table tr .row-icons > .bell.on { opacity: 1; }   /* a bell that is on always shows */
.known.compact li.row:hover .row-icons > *, .known.compact li.row:focus-within .row-icons > *, .contacts-table tr:hover .row-icons > *, .contacts-table tr:focus-within .row-icons > * { opacity: 1; }
.side-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--paper); border-left: 1px solid var(--ink); box-shadow: -12px 0 30px rgba(0,0,0,.08); z-index: 60; display: flex; flex-direction: column; }
.side-panel[hidden] { display: none; }
.side-panel .tag-defs { max-width: none; }
.side-panel .tag-row { flex-wrap: nowrap; }
.side-panel .tag-row input[type=text] { flex: 1 1 90px; min-width: 0; }
.side-panel .tag-row .who-tag { min-width: 0; flex: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.side-title { font-family: var(--serif); font-size: var(--size-heading); line-height: 1.1; }
.side-body { padding: 14px 18px 24px; overflow-y: auto; }
.side-body .edit-form { display: block; }
.side-body .edit-form .f { display: block; margin: 0 0 10px; }
.side-body .edit-form .check { display: block; margin: 6px 0; }
.side-body textarea { min-height: 80px; }
.count-line { margin: 0 0 6px; }
@media (hover: none), (max-width: 700px) { .known.compact li.row .row-icons > *, .contacts-table tr .row-icons > * { opacity: 1; } }
@media (max-width: 700px) {
  .toolbar .spacer { display: none; }
  .toolbar .actions { margin-left: 0; flex-basis: 100%; }
  .toolbar select { max-width: none; flex: 1 1 40%; }
  .known.compact li.row { align-items: flex-start; }
  .known.compact .line { flex-direction: column; gap: 1px; }
  .contacts-table td.actions { display: block; padding-top: 4px; }
}

.research-every select { width: auto; display: inline-block; margin: 0 0 0 6px; min-height: 36px; vertical-align: middle; }

/* ---------- the arrow on contact rows, and what it opens */
.icon.arrow { width: 24px; height: 30px; margin-right: 2px; color: var(--muted); }
.icon.arrow svg { transition: transform .15s; }
.icon.arrow.open svg { transform: rotate(90deg); }
.known.compact li.row { flex-wrap: wrap; }
.known.compact li.row .icon.arrow { flex: none; }
.expand { flex-basis: 100%; padding: 4px 0 8px 26px; font-size: var(--v2-detail, 13px); }
.expand .lbl { display: block; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.expand .lbl:first-child { margin-top: 2px; }
.expand .lbl .count { font-size: inherit; letter-spacing: 0; margin-left: 4px; }
.expand-list { list-style: none; margin: 0; padding: 0; }
.expand-list li, .known .expand-list li { display: block; justify-content: normal; gap: 0; padding: 4px 0; border-bottom: 1px solid var(--line); }
.expand-list li:last-child { border-bottom: 0; }
.expand-list .name { font-family: var(--serif); font-size: var(--v2-name, 16px); text-decoration: none; }
.expand-list a.name:hover { text-decoration: underline; }
.expand-list .meta { display: inline; color: var(--muted); margin-left: 8px; font-size: var(--v2-detail, 13px); }
.expand-list .story { display: block; margin-top: 1px; }
.expand-list .story a { text-decoration: none; }
.expand-list .story a:hover { text-decoration: underline; }
.expand .empty.small { margin: 2px 0 6px; }
.contacts-table tr.expand-row td { padding: 0; border-bottom: 0; }
.contacts-table tr.expand-row .expand { padding-left: 40px; }
.contacts-table tr.expand-row .expand[hidden] { display: none; }
.contacts-table td.name .icon.arrow { vertical-align: middle; margin: -4px 2px -4px -4px; }
/* the shared pop-up: a company card or a person, loaded in place */
dialog.pop { max-width: 860px; width: calc(100% - 32px); max-height: calc(100vh - 48px); overflow: auto; padding: 22px 26px 18px; }
dialog.pop .pop-body .title { margin-top: 0; }
dialog.pop .pop-open { margin: 0 0 6px; text-align: right; font-size: var(--v2-detail, 13px); }
dialog.pop .pop-open a { text-decoration: none; color: var(--muted); }
dialog.pop .pop-open a:hover { text-decoration: underline; }
dialog.pop .person { margin-top: 0; }
dialog.pop form.actions { margin-top: 14px; }
@media (max-width: 700px) {
  dialog.pop { padding: 16px; width: calc(100% - 16px); }
  .expand { padding-left: 0; }
  .contacts-table tr.expand-row .expand { padding-left: 0; }
}
.timeline li.empty { display: block; }

/* ---------- targets in the news, source links, folded lists */
.targets-news li { margin: 6px 0; }
.targets-news .who-tag { margin-left: 4px; }
.targets-news .meta-inline { display: block; margin-top: 2px; font-size: var(--v2-detail, 13px); }
.targets-news .meta-inline a { text-decoration: none; }
.targets-news .meta-inline a:hover { text-decoration: underline; }
.companies li { position: relative; }
.companies .sources { display: block; margin: -6px 0 8px 38px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; }
.companies .sources a { color: var(--muted); text-decoration: none; margin-right: 12px; border-bottom: 1px solid var(--line); }
.companies .sources a:hover { color: var(--ink); border-color: var(--ink); }
ol.fold li.more { display: block; padding: 8px 0 0 38px; border: 0; }
.show-more { background: none; border: 0; padding: 0; min-height: 36px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.show-more:hover { color: var(--ink); }

/* ---------- welcome page */
.welcome { max-width: 980px; }
.welcome .title { margin-top: 26px; }
.welcome-step { margin-top: 34px; }
.welcome-step .heading .count, .welcome-step .heading .hint { font-family: var(--sans); font-size: var(--v2-detail, 13px); letter-spacing: 0; margin-left: 8px; }
.welcome-step > .hint { max-width: 760px; }
.welcome-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; }
.welcome-box { border: 1px solid var(--line); padding: 16px 18px; }
.welcome-box .subheading { margin-top: 0; }
.welcome-box p, .welcome-box li { font-size: var(--v2-text, 14px); }
.welcome-box .steps { margin: 6px 0 10px; padding-left: 20px; }
.welcome-box .steps li { margin: 4px 0; }
.welcome-file { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.welcome-file input[type=file] { flex: 1 1 200px; min-width: 0; font-size: var(--v2-detail, 13px); }
.welcome .kind-choice { max-width: none; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 14px; }
.welcome-done { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin: 40px 0 20px; padding-top: 20px; border-top: 1px solid var(--ink); }
/* quick tagging */
.tagger { margin-top: 14px; }
.tagger input[type=search] { width: 100%; max-width: none; min-height: 40px; margin: 0; }
.tagger #tagCount { margin: 6px 0; }
.tag-rows { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tag-rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.tag-rows li:last-child { border-bottom: 0; }
.tag-rows .name { font-family: var(--serif); font-size: var(--v2-name, 17px); }
.tag-rows .meta { font-size: var(--v2-detail, 13px); color: var(--muted); flex: 1 1 160px; min-width: 0; }
.tag-rows .tagbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.tagbtn { font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; background: none; border: 1px solid var(--line); color: var(--muted); padding: 0 8px; min-height: 30px; cursor: pointer; }
.tagbtn:hover { border-color: currentColor; }
.tagbtn.on { border-color: currentColor; font-weight: 500; }
.tagbtn:not(.on) { color: var(--muted) !important; }
/* first-view tips */
.tip-card { position: absolute; z-index: 70; background: var(--ink); color: var(--paper); padding: 14px 16px 10px; font-family: var(--sans); font-size: var(--v2-text, 14px); line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.tip-card::before { content: ""; position: absolute; top: -6px; left: var(--arrow, 18px); border: 6px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.tip-card p { margin: 0; }
.tip-card .tip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.tip-card .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); min-height: 34px; }
.tip-card .linkbtn { color: var(--paper); opacity: .8; font-size: var(--v2-detail, 12px); }
.tip-card .tip-count { margin-left: auto; font-size: var(--v2-label, 11px); letter-spacing: .1em; opacity: .7; }
.tip-target { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 700px) {
  .welcome-uploads { grid-template-columns: 1fr; }
  .tag-rows .tagbtns { margin-left: 0; width: 100%; }
}

/* the per-dashboard switches stay inside the screen on a phone: the table scrolls sideways on its own */
@media (max-width: 700px) {
  table.switches { display: block; overflow-x: auto; max-width: 100%; }
  .switches th, .switches td { padding-right: 12px; }
  .switches thead th { letter-spacing: .06em; }
}

/* ---------- Admin → Dev: version and change log */
.admin-version { display: inline-block; margin: -14px 0 22px; font-size: var(--v2-detail, 12px); letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.admin-version:hover { color: var(--ink); }
.admin-version .dirty { color: var(--accent); }
.dev-facts { grid-template-columns: 150px 1fr; max-width: 820px; }
.dev-facts code, .cl-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--v2-detail, 12px); background: var(--wash); padding: 1px 4px; }
.changelog { margin-top: 30px; max-width: 900px; }
.cl-version { border-bottom: 1px solid var(--line); }
.cl-version > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 0; cursor: pointer; list-style: none; }
.cl-version > summary::-webkit-details-marker { display: none; }
.cl-version > summary::before { content: "›"; color: var(--muted); transition: transform .15s; display: inline-block; width: 10px; }
.cl-version[open] > summary::before { transform: rotate(90deg); }
.cl-name { font-family: var(--serif); font-size: var(--v2-heading, 22px); min-width: 92px; }
.cl-version.unreleased .cl-name { color: var(--accent); }
.cl-date { font-size: var(--v2-detail, 12px); letter-spacing: .1em; color: var(--muted); }
.cl-title { flex: 1 1 260px; font-size: var(--v2-text, 15px); }
.cl-count { font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cl-body { padding: 0 0 18px 24px; font-size: var(--v2-text, 14px); line-height: 1.55; }
.cl-body ul { margin: 6px 0; padding-left: 18px; }
.cl-body li { margin: 6px 0; }
.cl-body li li { margin: 3px 0; }
.cl-body p { margin: 8px 0; }
@media (max-width: 700px) {
  .dev-facts { grid-template-columns: 1fr; }
  .cl-body { padding-left: 4px; }
}

/* ---------- phones: the menu and sub-menus stay on one line and scroll sideways; the current tab is
   scrolled into view and a soft fade marks the side that has more (pop.js sets .more-left/.more-right) */
@media (max-width: 700px) {
  nav.main, .tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.main { justify-content: flex-start; }
  nav.main a { padding: 0 9px; }
  nav.main a.has-dot { --dot-room: 12px; }
  nav.main .dot { --dot-pad: 9px; top: 2px; }
  nav.main a.on { border: 0; border-bottom: 2px solid var(--ink); margin-bottom: 0; padding-bottom: 0; background: none; }
  .tab { min-height: 40px; padding: 0 10px; }
  nav.main.more-right, .tabs.more-right { -webkit-mask-image: linear-gradient(to right, var(--v2-ink, #000) 72%, transparent 96%); mask-image: linear-gradient(to right, var(--v2-ink, #000) 72%, transparent 96%); }
  nav.main.more-left, .tabs.more-left { -webkit-mask-image: linear-gradient(to left, var(--v2-ink, #000) 72%, transparent 96%); mask-image: linear-gradient(to left, var(--v2-ink, #000) 72%, transparent 96%); }
  nav.main.more-left.more-right, .tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent 4%, var(--v2-ink, #000) 22%, var(--v2-ink, #000) 78%, transparent 96%); mask-image: linear-gradient(to right, transparent 4%, var(--v2-ink, #000) 22%, var(--v2-ink, #000) 78%, transparent 96%); }
  /* the main menu's arrows (pop.js): over the faded edge, pressing one scrolls the menu that way */
  .has-nav-arrows { position: relative; }
  .nav-arrow { position: absolute; bottom: 0; width: 32px; height: 42px; border: 0; background: none; color: var(--ink); font-size: 24px; line-height: 1;
               padding: 0 0 4px; cursor: pointer; z-index: 2; }
  .nav-arrow.left { left: -6px; }
  .nav-arrow.right { right: -6px; }
}
.nav-arrow { display: none; }
/* Settings → How Claude weighs the news: the early signs ↔ filed disputes slider */
.balance { max-width: 520px; }
.balance input[type=range] { width: 100%; min-height: 40px; padding: 0; border: 0; accent-color: var(--ink); }
.balance-ends { display: flex; justify-content: space-between; margin: 0; color: var(--muted); font-size: var(--size-label); letter-spacing: .08em; text-transform: uppercase; }
.balance-now { margin: 8px 0 0; font-weight: 600; }
.region-boxes { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 0 10px; }
.region-boxes .check { margin: 6px 0; }
/* Two to know today: the day's two most critical developments, first on the Daily Brief (side by side on a wide screen) */
.top-two { margin: 8px 0 30px; }
.top-two > .heading { border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 0; }
.top-two-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.top-two-list > li { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.top-two .where { margin: 0 0 4px; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.top-two .where .flag { color: var(--accent); margin-left: 6px; }
.top-two .headline { font-size: var(--size-name, 18px); font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.top-two .headline a { color: var(--ink); text-decoration: none; }
.top-two .headline a:hover { text-decoration: underline; }
.top-two .why { margin: 0 0 6px; }
.top-two .pitch, .top-two .action { margin: 4px 0 0; color: var(--signal); }
.top-two .pitch .f, .top-two .action .f { margin-right: 6px; color: var(--muted); }
/* Dashboard Connections column: one contact, its stories under it */
.split .mentions .contact-stories { list-style: none; margin: 4px 0 0; padding: 0; }
.split .mentions .contact-stories > li { display: block; padding: 6px 0 0; border: 0; }
.split .mentions .contact-stories > li + li { margin-top: 4px; border-top: 1px dotted var(--line); }
.split .mentions .contact-stories .why { display: block; font-family: var(--sans); font-size: var(--size-summary); color: var(--summary-color, var(--muted)); line-height: 1.45; }
.split .mentions .contact-stories .headline { display: block; }
.split .mentions .more-stories > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-family: var(--sans); font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* History day: the "Jump to" list of its sections */
nav.jump { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 6px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
nav.jump .f { margin: 0 4px 0 0; }
nav.jump a { min-height: 32px; display: inline-flex; align-items: center; }
.day-dashboard { scroll-margin-top: 12px; }
@media (max-width: 700px) { .nav-arrow:not([hidden]) { display: block; } }

/* ---------- phones only: Ask is a small round button in the bottom-right corner (a tab on the
   right edge sat over the row icons and filter arrows); when the panel is open it closes it from
   the top-right corner. */
@media (max-width: 700px) {
  .ask-thumb { writing-mode: horizontal-tb; top: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; min-width: 0; padding: 0;
               border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
  .ask-thumb .spark { width: 26px; height: 26px; }
  html.ask-open .ask-thumb { top: 16px; bottom: auto; right: 16px; font-size: 0; box-shadow: none; }
  html.ask-open .ask-thumb .x { margin: 0; font-size: 18px; }
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }   /* the last row can scroll clear of the button */
}

/* ---------- design review 2026-10-21 */
/* every field reads at body size, even inside a small uppercase label */
input, select, textarea { font-size: var(--size-body); letter-spacing: normal; text-transform: none; font-family: var(--sans); }
@media (max-width: 700px) { input, select, textarea { font-size: 16px; } }   /* phones zoom on focus below 16px */
/* 40px tap areas: buttons and icons grow a little; small text links get an invisible 40px hit area */
.btn.small { min-height: 40px; }
.thread-toggle, .show-more { min-height: 40px; }
.icon { min-width: 36px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.icon.arrow { width: 28px; height: 40px; }
.tab, .flag, .linkbtn.small, .add-contact, .pop-open a, .unmute, .clear-seen, .who-tag + .flag, .known .linkbtn, .contacts-table .who-tag { position: relative; }
.tab::after, .flag::after, .linkbtn.small::after, .add-contact::after, .pop-open a::after, .unmute::after, .clear-seen::after, .contacts-table .who-tag::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 40px; transform: translateY(-50%); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); }
/* "review" flags: neutral ink, so red keeps meaning conflict (and warnings) */
.contacts-table .flag, .person .flag.big { color: var(--ink); border-color: var(--ink); }
/* the alert count dot keeps to the 11px minimum */
nav.main .dot { font-size: 10px; }
.contacts-table td.name > a, .contacts-table th a { position: relative; }
.contacts-table td.name > a::after, .contacts-table th a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 40px; transform: translateY(-50%); }

/* welcome page: the tags as a plain list, and the add-a-tag row */
.tag-list { margin: 6px 0 14px; padding-left: 20px; }
.tag-list li { margin: 3px 0; }
.add-tag-row { max-width: 560px; margin-bottom: 14px; }
.tag-rows .tag-undo { margin-left: 4px; color: var(--muted); }

/* story summaries and notes follow Admin → Design ("Story text") */
.story .summary, .company .summary, .mentions .summary, .alerts .summary, .people .summary { font-size: var(--size-summary, var(--size-body)); color: var(--summary-color, var(--ink)); line-height: var(--summary-leading, 1.5); }

/* The bell on a contact: off is a faint outline, on is a filled bell in ink */
.icon.bell { color: var(--faint); }
.icon.bell.on { color: var(--ink); }
.icon.bell.on svg { fill: currentColor; }
.icon.bell.busy { opacity: .5; }
.person-facts .icon.bell { vertical-align: middle; margin: -8px 0 -8px -8px; }

/* People and company names (Admin → Design → Names): .nm-p marks a person, .nm-c a company.
   Page titles and pop-up headings keep their own weight. */
.nm-p:not(h1):not(h2), .nm-c:not(h1):not(h2) { font-weight: var(--name-weight, 700); }
a.nm-p, a.nm-c, .nm-p a, .nm-c a { text-decoration-line: var(--name-decoration, none); }
a.nm-p:hover, a.nm-c:hover, .nm-p a:hover, .nm-c a:hover { text-decoration-line: underline; }
.dp-name { color: inherit; font-weight: var(--name-weight, 700); text-decoration-line: var(--name-decoration, none); }
.nm-p .who-tag, .nm-c .who-tag, .nm-p .tag, .nm-c .tag, .nm-p .ticker, .nm-c .ticker, .nm-p sup, .nm-c sup, .nm-p .meta, .nm-c .meta { font-weight: normal; }   /* labels inside a name stay light */

/* Research now, on a contact's row: faint until pressed, ink once research has started */
.icon.research-now { color: var(--faint); }
.icon.research-now.on { color: var(--ink); }
.icon.research-now.busy { opacity: .5; }
.known.compact li.row .row-icons > .research-now.on, .contacts-table tr .row-icons > .research-now.on { opacity: 1; }

/* People table: a name stays on one line (location and updated live on the person's page) */
/* The name cell: the arrow, then the name with its tags on the line below, both starting where the name starts */
.contacts-table td.name .name-line { display: flex; align-items: flex-start; }
.contacts-table td.name .name-line > .arrow { flex: none; }
.contacts-table td.name .name-stack { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-top: 2px; }
.contacts-table td.name .name-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; font-family: var(--sans); line-height: 1.6; }
.contacts-table td.name .name-tags .who-tag, .contacts-table td.name .name-tags .flag { margin-left: 0; }
@media (min-width: 701px) { .contacts-table td.name a.nm-p { white-space: nowrap; } }   /* a long name stays on one line */

/* The "review" label (People table) and "N to review" (person page): dark grey on a light grey box, no border or underline */
.contacts-table .flag, .person .flag.big { color: var(--v2-flag-ink, #454545); background: var(--v2-flag-wash, #e9e9e9); border: 0; text-decoration: none; padding: 1px 7px; }
.person .flag.big { padding: 4px 9px; }
.contacts-table .flag:hover, .person .flag.big:hover { background: var(--v2-flag-hover, #dcdcdc); color: var(--v2-ink, #2b2b2b); text-decoration: none; }

/* Email addresses in the People table and on a person's page: underlined only on hover */
.contacts-table a[href^="mailto:"], .person-facts a[href^="mailto:"] { text-decoration: none; }
.contacts-table a[href^="mailto:"]:hover, .person-facts a[href^="mailto:"]:hover { text-decoration: underline; }

/* Tags are a light box with dark text and no border. A member's tags get their colours from
   know.tag_css (the tag colour darkened, on a light tint of it); "followed" and business angles here. */
.who-tag, .tag { border: 0; padding: 1px 7px; }
.who-tag { background: var(--wash); }
.tag { background: var(--v2-badge-wash, #ececec); color: var(--v2-badge-ink, #2b2b2b); }
.tag.angle { color: var(--signal); background: var(--v2-angle-wash, #f3ebdc); background: color-mix(in srgb, var(--signal) 13%, var(--v2-paper, #fff)); }

/* A tag label is a link to the contacts with that tag */
.who-tag[role=link] { cursor: pointer; }
.who-tag[role=link]:hover, .who-tag[role=link]:focus-visible { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .07); outline: none; }

/* A dashboard tab being dragged to a new place */
.tab[data-did] { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tab.dragging { opacity: .55; outline: 1px dashed var(--ink); outline-offset: -4px; cursor: grabbing; }

/* Dashboard entries, in the daily email's layout (Admin → Design → Dashboard entries):
   a grey rank number; a story's headline (underlined only on hover); for a company or a contact, "Name: text" on one
   line (the name bold), its tags on the next line, the suggested approach in slate; grey details. */
.split .story .n, .split .company .n, .split .mentions .n { font-family: var(--sans); font-size: var(--size-meta, 13px); padding-top: 3px; }
.split .story .headline, .split .mentions .headline { font-family: var(--sans); font-size: var(--size-link, var(--size-body)); line-height: 1.4; font-weight: normal;
  text-decoration: none; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.split .mentions .headline a { text-decoration: none; }
.split .story:hover .headline, .split .story:focus-visible .headline, .split .mentions .headline a:hover { text-decoration: underline; }
.split .lead, .targets-news .lead { display: block; font-family: var(--sans); font-size: var(--size-summary); line-height: 1.45; margin-bottom: 2px; }
.split .lead .name, .targets-news .lead .name { font-size: var(--size-name, 16px); }
.split .lead .why { color: var(--summary-color, var(--muted)); }
.split .tags, .targets-news .tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 4px 0 2px; }
.split .tags .who-tag, .split .tags .tag, .targets-news .tags .who-tag { margin-left: 0; }
.split .approach { display: block; margin-left: 0; font-family: var(--sans); font-size: var(--size-summary); line-height: 1.45; margin-top: 4px; }
.split .meta { font-size: var(--size-meta, 13px); }
.split .story .summary { line-height: var(--summary-leading, 1.5); }
.split .company:hover .headline { text-decoration: none; }
.split .company:hover .lead .name { text-decoration: underline; }
.targets-news ul.entries { list-style: none; padding-left: 0; }
.targets-news ul.entries li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.targets-news .link-line { display: block; font-family: var(--sans); font-size: var(--size-link, var(--size-body)); line-height: 1.4; margin-top: 3px; }
.targets-news .link-line a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Design V2 (html.v2): one type scale everywhere. Names are the body font at the name level on every
   page (titles keep the headings font); other list headlines are text; details, labels and colours come
   from the --v2-… values above (each with V1's fixed value as its fallback, so V1 is unchanged). */
html.v2 .nm-p:not(h1):not(h2), html.v2 .nm-c:not(h1):not(h2) { font-family: var(--sans); }
html.v2 .headline.nm-p, html.v2 .headline.nm-c, html.v2 .headline .nm-p, html.v2 .headline .nm-c,
html.v2 .name.nm-p, html.v2 .name.nm-c { font-size: var(--size-name); line-height: 1.3; }
html.v2 .headline:not(.nm-p):not(.nm-c) { font-family: var(--sans); font-size: var(--v2-text); line-height: 1.4; }
html.v2 .summary { font-size: var(--v2-text); color: var(--summary-color, var(--muted)); }
html.v2 .meta, html.v2 .hint { font-size: var(--v2-detail); }
html.v2 .who-tag, html.v2 .tag, html.v2 .flag { font-size: var(--v2-label); }
html.v2 .n { font-family: var(--sans); font-size: var(--v2-detail); }
html.v2 .card h2 { font-size: var(--v2-heading); }
.system-switch { display: flex; gap: 8px; margin: 10px 0 6px; }

/* Dashboard pages are not held to the page width: the blocks flow into more columns as the window grows */
.wrap.wide { max-width: none; }
.split.flow, .split.flow.three { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--column-min, 460px)), 1fr)); align-items: start; }
.split.flow .mentions { grid-column: auto; }
.split.flow .flow-col { min-width: 0; display: flex; flex-direction: column; gap: 40px; }
@media (max-width: 900px) { .split.flow .flow-col { gap: 32px; } }

/* The demo account's banner */
/* The demo account: a small red tag pinned to the top of the page; it opens to say what the demo is */
.demo-tag { position: absolute; top: 10px; left: 16px; z-index: 60; }
.demo-tag summary { list-style: none; cursor: pointer; display: inline-block; background: var(--v2-demo, #b3261e); color: #fff; font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .16em; text-transform: uppercase; padding: 3px 9px; line-height: 1.4; }
.demo-tag summary::-webkit-details-marker { display: none; }
.demo-tag summary::after { content: "▾"; margin-left: 6px; font-size: 9px; vertical-align: 1px; }
.demo-tag[open] summary::after { content: "▴"; }
.demo-note { position: absolute; top: calc(100% + 6px); left: 0; width: min(320px, calc(100vw - 32px)); background: var(--paper); border: 1px solid var(--ink); padding: 12px 14px; font-size: var(--v2-detail, 13px); }
.demo-note p { margin: 0 0 10px; }

/* Names in story headlines and summaries: bold; a click opens the name's pop-up */
.nm-mark { font-weight: var(--name-weight, 700); cursor: pointer; border-radius: 2px; }
.nm-mark:hover, .nm-mark:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; outline: none; }
.split .story .headline .nm-mark { text-decoration: inherit; }
.mention-card h2 { margin: 0 0 4px; }
.mention-card .pop-links { margin: 8px 0 0; font-size: var(--v2-detail, 13px); }
.mention-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; align-items: center; }
.mention-tags .who-tag { margin: 0; border: 0; cursor: pointer; min-height: 30px; padding: 2px 10px; font: inherit; font-size: var(--size-label); letter-spacing: .1em; text-transform: uppercase; }
.mention-tags .who-tag.on { outline: 2px solid currentColor; outline-offset: 1px; }
.mention-newtag { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mention-newtag input[type=text] { flex: 1 1 180px; min-height: 36px; margin: 0; width: auto; }
.mention-newtag input[type=color] { width: 40px; height: 36px; min-height: 0; padding: 2px; margin: 0; border: 1px solid var(--line); background: none; }
.mention-msg { margin-top: 10px; }

/* Story and company rows are blocks acting as buttons (names and tags inside them are their own controls) */
.story[role=button], .company[role=button] { box-sizing: border-box; user-select: text; }
.story[role=button]:focus-visible, .company[role=button]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Settings (the gear): one folding section per subject, summary line with the current state on the right */
.settings { margin-top: 18px; max-width: 860px; }
/* three groups (business development, emails and alerts, your account), each headed like the dashboard's blocks */
.settings-group + .settings-group { margin-top: var(--v2-group-gap, 40px); }
.settings-group > .group-head { font-family: var(--serif); font-weight: normal; font-size: var(--v2-heading, 24px); margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.fold-section { border-bottom: 1px solid var(--line); }
.fold-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; min-height: 48px; font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; }
.fold-section > summary::-webkit-details-marker { display: none; }
.fold-section > summary::before { content: "+"; font-size: 18px; width: 14px; flex: none; }
.fold-section[open] > summary::before { content: "–"; }
.fold-section > summary .hint { flex: 1; text-align: right; text-transform: none; letter-spacing: 0; font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.fold-section[open] { padding-bottom: 18px; }
.fold-section .switches { margin-top: 4px; }
.fold-section .tag-defs { margin-top: 8px; }
.welcome-prefs .pref { margin: 14px 0 0; }
.welcome-prefs .pref h3 { margin: 0 0 4px; }
/* Admin: a section's title and its sub-tabs (Connectors, Usage, Site tools, Member, Dev) */
.admin-tabs { margin: 4px 0 18px; }
.admin-state { margin: 0 0 8px; color: var(--muted); }
/* Tab bars (the dashboards and every sub-menu): plain names on the thin line; the open one with a thicker
   black bar under it, the others a little lighter than the muted grey */
.page-tabs .tab.on, #dashTabs .tab.on { border-bottom-width: 3px; }
.page-tabs .tab:not(.on):not(.add), #dashTabs .tab:not(.on):not(.add) { color: color-mix(in srgb, var(--muted) 72%, var(--paper)); }
.page-tabs .tab:not(.on):hover, #dashTabs .tab:not(.on):hover { color: var(--ink); }

/* Connections views: the time window, Ripples, Storylines, saved views (lenses) */
.window-slider { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 4px 0 18px; max-width: 520px; }
.window-slider label.f { margin: 0; flex: 1 0 100%; }
.window-slider output { text-transform: none; letter-spacing: 0; font-size: var(--v2-text, var(--size-body)); color: var(--ink); margin-left: 4px; }
.window-slider input[type=range] { flex: 1 1 260px; max-width: 420px; min-height: 40px; padding: 0; border: 0; accent-color: var(--ink); }
.window-ends { display: flex; justify-content: space-between; flex: 1 0 100%; max-width: 420px; color: var(--muted); font-size: var(--v2-label, 11px); letter-spacing: .1em; text-transform: uppercase; }
.lens-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 18px; margin: 4px 0 8px; }
.lens-head .hint { margin: 0; }
/* Connections: every view keeps its full name; the tabs wrap onto another line when they don't fit (any width) */
.tabs.wrap-tabs, .tabs.wrap-tabs.more-left, .tabs.wrap-tabs.more-right { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; row-gap: 2px; }
.tabs.wrap-tabs .tab { white-space: normal; text-align: left; }
.ripples { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 28px; align-items: start; }
.ripples.single { grid-template-columns: 1fr; }
.ripple-seeds .seed-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 720px; overflow-y: auto; }
.ripple-seeds .seed-list li { border-bottom: 1px solid var(--line); }
.ripple-seeds .seed-list a { display: block; padding: 10px 8px; text-decoration: none; color: var(--ink); }
.ripple-seeds .seed-list li.on a { background: color-mix(in srgb, var(--ink) 6%, var(--paper)); }
.ripple-seeds .seed-list a:hover .seed-title { text-decoration: underline; }
.ripple-seeds .seed-title { display: block; line-height: 1.35; }
.ripple-title a { color: var(--ink); text-decoration: none; }
.ripple-title a:hover { text-decoration: underline; }
.ripple-fan { margin: 8px 0 4px; }
.ripple-switch { display: flex; gap: 22px; margin: 14px 0 0; border-bottom: 1px solid var(--line); }
.ripple-switch button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 10px 0 8px;
  min-height: 40px; font-family: var(--sans); font-size: var(--v2-label, 12px); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; }
.ripple-switch button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.ripple-switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ripple-fan svg { display: block; width: 100%; overflow: visible; }
.fan-line { stroke: var(--line); stroke-width: 1.2; }
.fan-line.core { stroke: var(--ink); stroke-width: 1.4; }
.fan-line.strength-high { stroke: var(--muted); stroke-width: 1.8; }
.fan-core { fill: var(--ink); }
.fan-node { cursor: pointer; color: var(--ink); }
.fan-node circle { fill: var(--paper); stroke: currentColor; stroke-width: 1.6; }
.fan-node.inner circle { fill: currentColor; }
.fan-node text { fill: currentColor; font-family: var(--sans); font-size: var(--v2-detail, 13px); font-weight: var(--name-weight, 500); }
.fan-node:hover text, .fan-node:focus text { text-decoration: underline; }
.fan-node:focus { outline: none; }
.ripple-rings { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; }
.ripple-rings[hidden] { display: none; }
/* a ripple around one clear dispute: the dispute boxed in the middle, claimant side above, respondent side below, third parties
   at the sides; its lists in three groups */
.ripple-rings.dispute-lists { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ripple-rings.dispute-lists .f { margin: 10px 0 0; }
.fan.dispute .dispute-box rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.fan.dispute .dispute-name { font-family: var(--serif); font-size: var(--v2-dispute-name, 14px); fill: var(--ink); }
.fan.dispute .fan-label { font-family: var(--sans); font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.fan-line.third { stroke: var(--faint); stroke-dasharray: 3 4; }
.fan.dispute .key-dot { fill: var(--ink); stroke: var(--ink); stroke-width: 1.6; }
.fan.dispute .key-ring { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.fan-node.party text { font-weight: 700; }
@media (max-width: 900px) { .ripple-rings.dispute-lists { grid-template-columns: 1fr; gap: 8px; } }
.ripple-rings .entries li, .storyline .entries li { padding: 10px 0; }
.known-people { display: block; margin-top: 4px; font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
.tag.strength-high { background: color-mix(in srgb, var(--ink) 12%, var(--paper)); }
.flash-row { background: color-mix(in srgb, var(--signal) 14%, var(--paper)); transition: background .6s; }
.storylines { display: grid; gap: 34px; margin-top: 8px; }
.storyline { border-top: 1px solid var(--ink); padding-top: 14px; }
.storyline .summary { margin: 6px 0; }
.storyline .tags { margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.storyline-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; margin-top: 10px; }
.storyline .timeline { margin: 8px 0 0; }
.storyline .timeline li { padding: 6px 0; }
.storyline .timeline .meta { display: inline; margin-left: 4px; }
.storyline .timeline li.filing .body a { font-style: italic; }
.chips-line { margin: 8px 0; line-height: 1.8; }
.tag.stage-new { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); }
.tag.momentum { background: color-mix(in srgb, var(--ink) 6%, var(--paper)); }
.lens-results li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lens-results .summary { display: block; margin-top: 4px; color: var(--muted); }
@media (max-width: 860px) {
  .ripples, .ripple-rings, .storyline-grid { grid-template-columns: 1fr; }
  .ripple-seeds .seed-list { max-height: 260px; }
}
@media (max-width: 560px) { .storyline .timeline li { grid-template-columns: 1fr; gap: 2px; } }
.ripples ul.entries, .storyline ul.entries, ul.lens-results { list-style: none; margin: 8px 0 0; padding: 0; }
.ripples ul.entries li { border-bottom: 1px solid var(--line); }
.ripples .flag, .storyline .flag, .lens-results .flag { display: inline-block; font-family: var(--sans); font-size: var(--v2-label, var(--size-label)); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; padding: 0 5px; vertical-align: middle; }
.storyline .tags .tag, .ripples .tags .tag { margin-left: 0; }
.ripples ul.entries .tags { display: block; margin-top: 4px; }
.tabs button.tab { background: none; font-family: inherit; cursor: pointer; }   /* the + tabs are buttons: no browser grey */
@media (max-width: 560px) { .demo-tag { top: 3px; left: 12px; } .demo-tag summary { padding: 1px 7px; } }
.criteria summary .refresh-now { flex: none; margin: 4px 0 4px 4px; }
/* History: the versions of a dashboard's day (morning load, each Refresh) */
.versions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 14px; }
.versions .f { margin: 0; }
.versions .version { color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; padding: 4px 0; min-height: 32px; display: inline-flex; align-items: center; }
.versions .version:hover { color: var(--ink); }
.versions .version.on { color: var(--ink); border-bottom: 3px solid var(--ink); }
/* Card pop-ups: a ✕ that stays at the top right while the card scrolls */
.pop-x-form { position: sticky; top: 0; float: right; z-index: 3; margin: -12px -14px 0 8px; height: 0; }
.pop-x { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: var(--paper); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.pop-x:hover { background: color-mix(in srgb, var(--ink) 7%, var(--paper)); }
dialog.pop .pop-open { padding-right: 40px; min-height: 28px; }   /* room for the ✕ */
/* Storylines: search and filters */
.storyline-filters { margin: 4px 0 18px; }
.storyline-filters input[type=search] { flex: 1 1 100%; max-width: none; }
.storyline-filters .sl-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1 1 100%; }
.storyline-filters .sl-checks .check { margin: 0; }
/* Connections: + New view, and its starting points */
.tab.add .add-label { font-size: var(--size-label); letter-spacing: .14em; text-transform: uppercase; margin-left: 4px; }
dialog.lens-ideas { max-width: 620px; }
.idea-list { list-style: none; margin: 14px 0 0; padding: 0; }
.idea-list li + li { margin-top: 8px; }
.idea { display: block; width: 100%; text-align: left; background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 12px 14px; font: inherit; cursor: pointer; }
.idea:hover, .idea:focus-visible { border-color: var(--ink); }
.idea-kind { display: block; font-size: var(--v2-label, 11px); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.idea-title { display: block; font-weight: var(--name-weight, 500); margin: 2px 0; }
.idea .hint { display: block; }
/* Links: dotted lines to the member's people, in the colour of the tag that matters most */
.conn-lines path.pline { stroke: currentColor; stroke-dasharray: 2 4; stroke-width: 1.3; opacity: .85; }
.conn-lines path.pline:not([class*=" who-"]) { color: var(--faint); }   /* untagged: grey; tagged ones take the tag colour from tag_css */
.conn-lines path.pline.off { opacity: .15; }
.conn-lines path.pline.on { stroke-width: 2; opacity: 1; }
.known-people .conn-person { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--ink); }
.known-people .conn-person .hint { font-size: var(--v2-detail, 13px); }
/* Name suggestions under a list box (suggest.js) */
label.f:has(> textarea[data-suggest]) { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; z-index: 20; list-style: none; margin: 2px 0 0; padding: 0; background: var(--paper); border: 1px solid var(--ink); max-height: 240px; overflow-y: auto; text-transform: none; letter-spacing: 0; font-size: var(--v2-text, var(--size-body)); color: var(--ink); }
.suggest-list li { padding: 8px 12px; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.suggest-list li.on, .suggest-list li:hover { background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
/* Connections → My Contacts: the member's contacts in today's news */
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 8px; align-items: start; }
.today-contacts { list-style: none; margin: 8px 0 0; padding: 0; }
.today-contacts > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.today-contacts .lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.today-contacts .name { font-weight: var(--name-weight, 600); text-decoration: none; color: var(--ink); font-size: var(--size-name, var(--size-body)); }
.today-contacts .tags { display: block; margin-top: 4px; }
.today-contacts .tags .who-tag { margin-left: 0; }
.today-stories { list-style: none; margin: 6px 0 0; padding: 0; }
.today-stories li { padding: 4px 0 4px 12px; border-left: 2px solid var(--line); margin: 4px 0; }
.today-stories .why { display: block; color: var(--muted); font-size: var(--v2-detail, calc(var(--size-body) - 1px)); }
@media (max-width: 760px) { .today-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- admin: Usage → Services meters */
.admin-table.services td { min-width: 110px; }
.admin-table.services td:first-child { min-width: 220px; max-width: 360px; }
.admin-table.services select { max-width: 220px; }
.admin-table.services tr.sub td { border-top: 0; padding-top: 0; }
.meter-num { display: block; white-space: nowrap; }
.meter { display: block; height: 4px; max-width: 120px; margin-top: 5px; background: var(--line); }
.meter > span { display: block; height: 100%; background: var(--ink); }
.meter.near > span { background: var(--v2-flag, #8a5a00); }
.meter.over > span { background: var(--accent); }
.alert-use { display: inline-block; margin: 0 22px 6px 0; vertical-align: top; }
.admin-table.services .svc-note { white-space: normal; }
@media (max-width: 700px) { .admin-table.services, .admin-table.services tbody, .admin-table.services tr, .admin-table.services td { display: block; }
  .admin-table.services thead { display: none; } .admin-table.services td { border: 0; padding: 4px 0; }
  .admin-table.services tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .admin-table.services td[data-label]::before { content: attr(data-label); display: block; font-size: var(--v2-label, 11px); letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted); margin-top: 6px; }
  .admin-table.services td.none { display: none; } }
/* admin Overview → Health: label above the state on phones */
@media (max-width: 700px) { .admin-table.health, .admin-table.health tbody, .admin-table.health tr, .admin-table.health td { display: block; width: auto; }
  .admin-table.health td { border: 0; padding: 2px 0; white-space: normal; } .admin-table.health td:first-child { font-weight: 500; padding-top: 10px; }
  .admin-table.health tr { border-bottom: 1px solid var(--line); padding-bottom: 8px; } .admin-table.health code { word-break: break-all; } }
/* Contacts → Import & Export: the Import button on the left like Export, the file choice beside it */
.admin-row.import-row { flex-wrap: nowrap; }
.admin-row.import-row input[type=file] { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; }
/* Admin: a red dot on Connectors when a connector is broken or past its limit, and the headline on its pages */
.admin-nav .alert-dot, .admin-tabs .alert-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: 2px; }
.connector-alert { margin: 0 0 18px; }
.connector-alert ul { margin: 6px 0 0; padding-left: 18px; }
.connector-alert a { color: inherit; }
/* Settings → Daily email: the sections, in order, with their numbers and ↑ ↓ */
.email-sections { list-style: none; padding: 0; margin: 6px 0 10px; border-top: 1px solid var(--line); }
.email-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.email-sec .sec-on { flex: 1 1 220px; margin: 0; }
.email-sec .sec-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 2 1 260px; }
.email-sec .sec-count { display: inline-flex; align-items: center; gap: 6px; font-size: var(--v2-detail, calc(var(--size-body) - 1px)); color: var(--muted); }
.email-sec .sec-count input { width: 64px; max-width: 64px; margin: 0; padding: 6px 8px; }
.email-sec .sec-handle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: auto;
  cursor: grab; touch-action: none; color: var(--muted); }
.email-sec .sec-handle svg { width: 20px; height: 20px; fill: currentColor; }
.email-sec .sec-handle:hover, .email-sec .sec-handle:focus-visible { color: var(--ink); }
.email-sec.dragging { background: var(--paper); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); position: relative; z-index: 1; }
.email-sec.dragging .sec-handle { cursor: grabbing; }
.email-sec.off .sec-counts { opacity: .45; }
.email-sec .sec-on { order: 1; } .email-sec .sec-counts { order: 2; } .email-sec .sec-handle { order: 3; }
@media (max-width: 560px) { .email-sec .sec-on { flex: 1 1 auto; } .email-sec .sec-handle { order: 2; } .email-sec .sec-counts { order: 3; flex: 1 1 100%; } }
/* History: Restore dashboard under a dashboard's heading when it was deleted, archived or its criteria changed since */
.restore-dash { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; padding: 10px 14px; background: var(--wash); }
.restore-dash .btn { flex: none; background: var(--paper); }
.restore-dash .hint { flex: 1; min-width: 0; margin: 0; }
/* History day: what the day holds as tabs under the date, one shown at a time */
.day-tabs { margin: 6px 0 18px; }
.day-tabs .tab-note, .day-subtabs .tab-note { margin-left: 8px; font-size: var(--v2-label, 11px); letter-spacing: .08em; color: var(--muted); }
.day-pane[hidden] { display: none; }
.day-subtabs { margin: 0 0 16px; }
.email-meta { margin: 0 0 12px; }
.notice.first-run { border-color: var(--line); color: var(--ink); background: var(--wash); }

/* Settings → Morning research: forwarding news to TigerrBD (forwards.py) */
.forward-box { margin: 16px 0 6px; }
.forward-box .forwarded-list { margin: 6px 0 0; }
.forward-box .forwarded-list li { margin: 2px 0; }

/* Newness (2026-10-29): a story the daily email left out as already reported, and History's list of them */
.reported { font-size: var(--v2-label, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.left-out { margin-top: 24px; }
.left-out summary { cursor: pointer; color: var(--muted); padding: 8px 0; min-height: 40px; box-sizing: border-box; }
.left-out .entries { list-style: none; padding: 0; margin: 4px 0 0; }
.left-out .entries li { margin: 0 0 10px; }
.left-out .entries .hint { display: block; }

/* Ask: attachments (2026-10-29) */
.ask-attach { cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; }
.ask-files { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ask-files[hidden] { display: none; }
.ask-files li { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); padding: 2px 4px 2px 8px; font-size: var(--size-label); max-width: 100%; }
.ask-files li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ask-files li button { background: none; border: 0; cursor: pointer; color: var(--muted); min-width: 32px; min-height: 32px; font-size: var(--v2-detail, 13px); }
.msg .files { display: block; color: var(--muted); font-size: var(--size-label); letter-spacing: .04em; margin: 2px 0 4px; }
.ask-drawer.dropping { outline: 2px dashed var(--ink); outline-offset: -6px; }
