/* Page system v2 — memory family. Owned by one rebuild stream; shared primitives live in system.css.
   Every rule is scoped to `.v2.mem`, so nothing here reaches a page that has not opted in.
   Colour and type are LUMEN tokens only; this file owns space, hierarchy and the unboxing
   of panels the older layers (clarity, lumen-revamp, executive) still paint. */

/* Page header: the shared page_header / answer_header, unboxed ----------------- */
.v2.mem { max-width: 1180px; }
.v2.mem :is(.page-header, .os-hero) {
  position: relative; margin: 0; padding: var(--v2-5) 0 var(--v2-6); border: 0; border-bottom: var(--v2-rule);
  border-radius: 0; background: none; box-shadow: none; overflow: visible; min-height: 0;
}
.v2.mem :is(.page-header, .os-hero)::before, .v2.mem :is(.page-header, .os-hero)::after { display: none; }
.v2.mem .page-header-copy { max-width: none; padding: 0; }
.v2.mem .page-header h1 { margin: var(--v2-2) 0 0; font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.05; letter-spacing: -.02em; }
.v2.mem .page-header p { max-width: 68ch; margin: var(--v2-4) 0 0; font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.5;
  color: var(--lm-matte-2); text-wrap: pretty; }
.v2.mem .os-hero-lede { max-width: 68ch; font-size: var(--v2-text); color: var(--lm-matte-2); }

/* Related links under the header: one quiet line, not a button tray. */
.v2.mem .mem-links { display: flex; flex-wrap: wrap; gap: var(--v2-1) var(--v2-5); margin: var(--v2-4) 0 0; }
.v2.mem .mem-links a { color: var(--lm-matte-2); font-size: var(--v2-meta); text-decoration: underline dotted; text-underline-offset: 3px; }
.v2.mem .mem-links a:hover { color: var(--lm-matte); }

/* Now facts sit under the header rule with their own breathing room. */
.v2.mem .v2-now { margin-top: var(--v2-5); }
.v2.mem .v2-now-fact small { font-size: var(--v2-meta); }

/* Sections ------------------------------------------------------------------- */
/* Lists here draw their own hairlines; the generic sibling rule would double them. */
.v2.mem .v2-section > * + * { border-top: 0; padding-top: 0; }
.v2.mem .v2-section > .mem-fold { border-top: var(--v2-hair); }
.v2.mem .v2-section:first-of-type { padding-top: var(--v2-6); }
.v2.mem .v2-section-head small { color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem .v2-section-head a { font-size: var(--v2-meta); color: var(--lm-matte-2); }
.v2.mem h4 { margin: var(--v2-5) 0 var(--v2-2); font: 600 var(--v2-meta)/1.4 var(--font-body); color: var(--lm-matte-2); }
.v2.mem h4 small { font-weight: 400; color: var(--lm-matte-3); margin-left: var(--v2-2); }
.v2.mem .mem-quiet { margin: var(--v2-2) 0 0; max-width: 70ch; color: var(--lm-matte-2); }

/* Rows: a heading line, one meta line, optional quote. Hairlines, never panels. */
.v2.mem .mem-stack > * + * { border-top: var(--v2-hair); }
.v2.mem .mem-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--v2-4); }
.v2.mem .mem-row-head > div { min-width: 0; }
.v2.mem .mem-row-head h3 { margin: var(--v2-1) 0 0; font: 650 1.125rem/1.35 var(--font-body); color: var(--lm-matte); }
.v2.mem .mem-meta { margin: 0; color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem .mem-meta time { color: var(--lm-matte); font-weight: 600; }
.v2.mem .mem-out { flex: 0 0 auto; color: var(--lm-matte-2); font-size: var(--v2-meta); white-space: nowrap; }
.v2.mem .mem-out:hover { color: var(--lm-matte); }

.v2.mem .mem-items { margin: var(--v2-3) 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.v2.mem .mem-items > li { display: grid; gap: var(--v2-1); padding: var(--v2-3) 0; border-top: var(--v2-hair); max-width: 82ch; }
.v2.mem .mem-items > li:first-child { border-top: 0; padding-top: var(--v2-1); }
.v2.mem .mem-items > li > b { max-width: none; font-weight: 600; line-height: 1.45; color: var(--lm-matte); text-wrap: pretty; }
.v2.mem .mem-items > li > small a { color: var(--lm-matte-2); }
.v2.mem .mem-items > li > b > a { color: var(--lm-matte); text-decoration: none; }
.v2.mem .mem-items > li > b > a:hover { color: var(--lm-key); text-decoration: underline; text-underline-offset: 3px; }
.v2.mem .mem-items > li > small { color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem .mem-items > li > p { margin: 0; color: var(--lm-matte-2); }
.v2.mem .mem-items > li > .mem-why { font-size: var(--v2-meta); color: var(--lm-matte-3); }
.v2.mem .mem-items > li > a { justify-self: start; }
.v2.mem q, .v2.mem blockquote.mem-q { display: block; margin: var(--v2-1) 0 0; padding: 0 0 0 var(--v2-3); border-left: 2px solid var(--lm-seam-strong);
  background: none; color: var(--lm-matte-2); font-style: normal; quotes: "“" "”"; }

/* Folds: "Show N more" is a plain line with a count, opened in place. */
.v2.mem details.mem-fold, .v2.mem details.mem-more { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem :is(.mem-fold, .mem-more) > summary { border: 0; border-radius: 0; background: none; box-shadow: none; display: flex; align-items: center; gap: var(--v2-2); min-height: 44px; padding: 0; cursor: pointer;
  color: var(--lm-matte-2); font-weight: 600; list-style: none; }
.v2.mem :is(.mem-fold, .mem-more) > summary::-webkit-details-marker { display: none; }
.v2.mem :is(.mem-fold, .mem-more) > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; color: var(--lm-matte-3); }
.v2.mem :is(.mem-fold, .mem-more)[open] > summary::before { content: "−"; }
.v2.mem :is(.mem-fold, .mem-more) > summary:hover { color: var(--lm-matte); }
.v2.mem .mem-more > summary { flex-wrap: wrap; column-gap: var(--v2-3); }
.v2.mem .mem-more > summary b { font-weight: 600; white-space: nowrap; }
.v2.mem .mem-more > summary span { font-weight: 400; color: var(--lm-matte-3); font-size: var(--v2-meta); }
@media (max-width: 640px) { .v2.mem .mem-more > summary span { flex-basis: 100%; padding: 0 0 var(--v2-2) 28px; } }
.v2.mem .mem-fold { border-top: var(--v2-hair); }
.v2.mem .mem-fold[hidden] { display: none; }

/* Empty states lose their glow panel. */
.v2.mem .empty-state { margin: 0; padding: var(--v2-5) 0; border: 0; background: none; box-shadow: none; text-align: left; justify-items: start; }
.v2.mem .empty-state::before, .v2.mem .empty-state::after { display: none; }
.v2.mem .empty-state .empty-mark { display: none; }
.v2.mem .empty-state p { max-width: 68ch; margin: var(--v2-2) 0 0; color: var(--lm-matte-2); }

/* Meeting dossiers ------------------------------------------------------------ */
.v2.mem .mem-dossier { padding: var(--v2-5) 0; }
.v2.mem .mem-dossier .mem-more { margin-top: var(--v2-3); }
.v2.mem .mem-dossier .mem-more[open] { padding-bottom: var(--v2-3); }
.v2.mem .mem-people { display: flex; flex-wrap: wrap; gap: var(--v2-2) var(--v2-5); margin: 0; }
.v2.mem .mem-people small { color: var(--lm-matte-3); font-size: var(--v2-meta); }

/* Meetings -------------------------------------------------------------------- */
.v2.mem .mem-tabs { display: flex; gap: var(--v2-5); margin: var(--v2-6) 0 0; padding: 0; border-bottom: var(--v2-hair); }
.v2.mem .mem-tabs a { display: flex; align-items: center; min-width: 0; min-height: 44px; padding: 0 var(--v2-1);
  border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--lm-matte-2); font-weight: 600; text-decoration: none; }
.v2.mem .mem-tabs a::after { display: none; }
.v2.mem .mem-tabs a.is-active { color: var(--lm-matte); border-bottom-color: var(--lm-key); }

/* Weekly columns: one series on one scale, the count printed on each column. On a
   phone the same weeks turn into rows so every count stays legible. */
.v2.mem .mem-weeks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--v2-2); align-items: end;
  height: 190px; margin: 0; padding: 0; list-style: none; }
.v2.mem .mem-weeks li { display: grid; grid-template-rows: auto 1fr auto; height: 100%; min-width: 0; text-align: center; }
.v2.mem .mem-weeks b { align-self: end; padding-bottom: var(--v2-1); font: 600 var(--v2-meta)/1.3 var(--font-body); font-feature-settings: "tnum" 1; color: var(--lm-matte-2); }
.v2.mem .mem-weeks i { align-self: end; height: var(--h); min-height: 2px; border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--lm-key) 50%, transparent); }
.v2.mem .mem-weeks li:last-child i { background: var(--lm-key); }
.v2.mem .mem-weeks span { padding-top: var(--v2-2); white-space: nowrap; font-size: var(--v2-meta); color: var(--lm-matte-3); }
.v2.mem .mem-weeks span.is-minor { visibility: hidden; }

/* Reused meeting classes: strip the old cards, chips and stretched-link overlay. */
.v2.mem :is(.meeting-row, .meeting-claim, .meeting-series-card) { position: static; margin: 0; padding-inline: 0; border-left: 0; border-right: 0;
  border-bottom: 0; border-radius: 0; background: none; box-shadow: none; min-height: 0; }
.v2.mem :is(.meeting-row, .meeting-claim, .meeting-series-card)::before { display: none; }
.v2.mem .mem-items > :is(.meeting-row, .meeting-claim, .meeting-series-card) > b { font: 600 1rem/1.45 var(--font-body); }
.v2.mem :is(.meeting-row, .meeting-claim, .meeting-series-card) small { font-size: var(--v2-meta) !important; text-transform: none; letter-spacing: 0; }
.v2.mem .meeting-series-main { display: inline; color: var(--lm-matte); }
.v2.mem .meeting-series-main::after { display: none; }
.v2.mem .mem-tags { display: flex; flex-wrap: wrap; gap: 2px var(--v2-3); }
.v2.mem .mem-tags .meeting-tag { display: inline; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  color: var(--lm-matte-2); font-size: var(--v2-meta) !important; text-decoration: underline dotted; text-underline-offset: 3px; }
.v2.mem .mem-tags .meeting-tag:hover { color: var(--lm-matte); background: none; }
.v2.mem .mem-cols { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); column-gap: var(--v2-6); }
.v2.mem .mem-items.mem-cols > li { border-top: 0; border-bottom: var(--v2-hair); padding: var(--v2-3) 0; }

/* Audience and topic links read as one wrapped line of "label count" pairs. */
.v2.mem .mem-inline { display: flex; flex-wrap: wrap; gap: var(--v2-2) var(--v2-5); margin: 0; max-width: 100ch; }
.v2.mem .mem-inline a { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--lm-matte); text-decoration: none; font-size: var(--v2-text); }
.v2.mem .mem-inline a::after, .v2.mem .mem-inline a::before { display: none; }
.v2.mem .mem-inline a b { display: inline; margin-left: var(--v2-1); font: 600 var(--v2-meta)/1 var(--font-body); color: var(--lm-matte-3);
  font-feature-settings: "tnum" 1; }
.v2.mem .mem-inline a:hover { color: var(--lm-key); }
.v2.mem .meeting-overview { display: block; padding: var(--v2-7) 0 0; margin: 0; border: 0; background: none; box-shadow: none; }
.v2.mem .meeting-overview .v2-section-head + h4 { margin-top: 0; }
.v2.mem .meeting-filter-state { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--v2-2) var(--v2-4);
  margin: 0 0 var(--v2-4); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem .meeting-filter-state p { margin: 0; }
.v2.mem :is(.meeting-replay-signals, .meeting-replay-delta) { margin: 0; color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem :is(.meeting-replay-signals, .meeting-replay-delta, .meeting-replay-evidence) { display: block; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem .meeting-replay-signals span { display: inline; margin: 0; padding: 0; border: 0; background: none; }
.v2.mem .meeting-replay-signals span::before { display: none; }
.v2.mem .meeting-replay-evidence > summary { justify-content: flex-start; }
.v2.mem .meeting-replay-signals .is-risk { color: var(--lm-matte); font-weight: 600; }

/* Walk-in briefs ---------------------------------------------------------------- */
.v2.mem .mem-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.08; letter-spacing: -.02em; }
.v2.mem .v2-entity-meta b { color: var(--lm-key); font-weight: 600; }
.v2.mem .wb-list > li > b { font-size: 1.125rem; }
.v2.mem .wb-counts { color: var(--lm-matte-2); }
.v2.mem .wb-counts b { color: var(--lm-matte); font-feature-settings: "tnum" 1; }
.v2.mem .wb-counts b.is-owed, .v2.mem .wb-due.is-overdue { color: var(--lm-key); }
.v2.mem .wb-owed .v2-section-head h2 { color: var(--lm-matte); }
.v2.mem .wb-due { font-style: normal; }
.v2.mem :is(.wb-line, .wb-person, .wb-ask) { margin: 0; padding-left: 0; border-left: 0; background: none; box-shadow: none; border-radius: 0; }
.v2.mem .wb-ask a { color: var(--lm-matte); }
.v2.mem .v2-rail .mem-items > li { max-width: none; }
.v2.mem .v2-entity-actions a { min-height: var(--v2-tap); display: inline-flex; align-items: center; }

/* Tables: rows on hairlines, no painted row or viewport. Wide tables scroll inside
   their own viewport (LUMEN's), never the page. */
.v2.mem .lumen-table-viewport { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem table { width: 100%; margin: 0; border-collapse: collapse; border: 0; background: none; box-shadow: none; }
.v2.mem :is(thead, tbody, tr) { background: none !important; box-shadow: none; }
.v2.mem th { padding: var(--v2-2) var(--v2-4) var(--v2-2) 0; border: 0; border-bottom: var(--v2-rule); background: none;
  color: var(--lm-matte-2); font: 600 var(--v2-meta)/1.35 var(--font-body); text-align: left; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.v2.mem td { padding: var(--v2-3) var(--v2-4) var(--v2-3) 0; border: 0; border-bottom: var(--v2-hair); background: none;
  vertical-align: top; color: var(--lm-matte); font-size: var(--v2-text); }
.v2.mem tr:last-child td { border-bottom: 0; }
.v2.mem :is(th, td):last-child { padding-right: 0; }
.v2.mem :is(th, td).is-num { text-align: right; font-feature-settings: "tnum" 1; }
.v2.mem td a { color: var(--lm-matte); font-weight: 600; text-decoration: none; }
.v2.mem td a:hover { color: var(--lm-key); text-decoration: underline; text-underline-offset: 3px; }
.v2.mem td small, .v2.mem td.dim { color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem .lumen-table-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.v2.mem .lumen-table-toolbar { padding-inline: 0 !important; }
.v2.mem.mem .lumen-instrumented-table thead th { position: static; min-height: 0; padding: var(--v2-2) var(--v2-4) var(--v2-2) 0;
  background: none; backdrop-filter: none; color: var(--lm-matte-2); font-size: var(--v2-meta); }
.v2.mem.mem .lumen-instrumented-table :is(th, td) { padding-left: 0; padding-right: var(--v2-4); white-space: normal; text-overflow: clip; overflow: visible; }
.v2.mem.mem .lumen-instrumented-table :is(th, td):last-child { padding-right: 0; }
.v2.mem.mem .lumen-instrumented-table td :is(a, b, span) { white-space: normal; text-overflow: clip; overflow: visible; max-width: none; }
.v2.mem.mem .lumen-instrumented-table [data-tanstack-sort] { min-height: var(--v2-tap); padding: 0; font-size: var(--v2-meta); background: none; }
.v2.mem.mem .lumen-instrumented-table [data-tanstack-sort] i { width: 12px; height: 12px; flex-basis: 12px; color: var(--lm-matte-3); filter: none; }
.v2.mem.mem .lumen-instrumented-table tbody tr:is(:hover, :focus-within) { background: none; box-shadow: none; }
.v2.mem.mem .lumen-instrumented-table td > small { font-size: var(--v2-meta); color: var(--lm-matte-2); }

/* Row verbs: quiet text buttons on one line under the row, never a button tray. */
.v2.mem .mem-verbs { display: flex; flex-wrap: wrap; gap: var(--v2-1) var(--v2-4); margin-top: var(--v2-1); }
.v2.mem.mem .mem-verb { min-height: var(--v2-tap); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--lm-matte-2); font: 600 var(--v2-meta)/1 var(--font-body); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.v2.mem.mem .mem-verb:hover { color: var(--lm-matte); }
.v2.mem.mem .mem-verb:disabled { color: var(--lm-matte-3); text-decoration: none; cursor: default; }
.v2.mem .mem-pre { margin: 0 0 var(--v2-3); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--lm-matte-2); font: inherit; }
.v2.mem .is-contradicted > b::before { content: "Contradicted · "; color: var(--lm-key); font-weight: 600; }

/* Memory observatory ------------------------------------------------------------ */
/* Where memory lives: ranked bars, label and count on one line, bar under it. */
.v2.mem .mem-bars { list-style: none; margin: var(--v2-4) 0 0; padding: 0; display: grid; gap: var(--v2-4); max-width: 760px; }
.v2.mem .mem-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-1) var(--v2-4); align-items: baseline; }
.v2.mem .mem-bars .mem-bar-label { font-size: var(--v2-text); color: var(--lm-matte); min-width: 0; }
.v2.mem .mem-bars b { font: 700 var(--v2-text)/1.2 var(--font-num); font-feature-settings: "tnum" 1; color: var(--lm-matte); }
.v2.mem .mem-bars i { grid-column: 1 / -1; display: block; height: 6px; width: var(--w); min-width: 3px; border-radius: 3px; background: var(--lm-lamp-aqua); opacity: .8; }
.v2.mem .observatory-field-card { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem .observatory-field-card::before, .v2.mem .observatory-field-card::after { display: none; }
.v2.mem .observatory-field-card[open] > summary { margin-bottom: var(--v2-3); }
.v2.mem .observatory-field-actions { display: flex; flex-wrap: wrap; gap: var(--v2-1) var(--v2-4); margin-top: var(--v2-3); }
.v2.mem .observatory-field-actions .mem-verb { writing-mode: horizontal-tb; white-space: nowrap; min-width: 0; width: auto; height: auto; }
.v2.mem .observatory-legend { margin: var(--v2-4) 0 var(--v2-3); }
.v2.mem .observatory-legend :is(span, small, em, i) { font-size: var(--v2-meta); }
.v2.mem .mem-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--v2-6); }
.v2.mem .mem-duo .studio-plot { min-height: 300px; margin-top: var(--v2-4); background: none; border: 0; box-shadow: none; }

/* Second Brain graph -------------------------------------------------------------- */
.v2.mem .mem-status code { font: inherit; color: var(--lm-matte); overflow-wrap: anywhere; }
.v2.mem .brain-scope-fold > summary span { overflow-wrap: anywhere; }
.v2.mem .brain-scope { margin: 0; padding: var(--v2-3) 0 var(--v2-4); border: 0; background: none; box-shadow: none; display: grid; gap: var(--v2-4); }
.v2.mem .brain-scope > header { order: 2; margin: 0; }
.v2.mem .brain-classes { border: 0; border-radius: 0; padding: 0; background: none; }
.v2.mem .brain-classes legend { padding: 0 0 var(--v2-1); font-size: var(--v2-meta); color: var(--lm-matte-2); }
.v2.mem .brain-classes label { font-size: var(--v2-text); min-height: var(--v2-tap); }
.v2.mem .brain-stage { gap: var(--v2-6); padding-top: var(--v2-6); }
.v2.mem :is(.brain-field-card, .brain-concept, .brain-panels) { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem .brain-field-card .v2-section-head { margin-bottom: var(--v2-3); }
.v2.mem .brain-legend { margin: var(--v2-3) 0; font-size: var(--v2-meta); }
.v2.mem .brain-concept { padding-top: 0; }
.v2.mem .brain-concept :is(h3), .v2.mem .brain-panels h3 { font-size: var(--v2-meta); color: var(--lm-matte-2); }
.v2.mem :is(.brain-facts, .brain-metrics, .brain-neighbours, .brain-notes, .brain-communities, .brain-bridges) { font-size: var(--v2-text); }
.v2.mem .brain-metrics div { border: 0; border-top: var(--v2-hair); border-radius: 0; padding: var(--v2-2) 0 0; }
.v2.mem :is(.brain-notes, .brain-evidence) small, .v2.mem .brain-chip { font-size: var(--v2-meta); }
.v2.mem .brain-tabs { gap: var(--v2-4); margin-bottom: var(--v2-4); }
.v2.mem .brain-tabs [role="tab"] { min-height: 44px; padding: 0 var(--v2-1); border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; box-shadow: none; color: var(--lm-matte-2); font-weight: 600; }
.v2.mem .brain-tabs [role="tab"][aria-selected="true"] { color: var(--lm-matte); border-bottom-color: var(--lm-key); }
.v2.mem .brain-footer { display: flex; flex-wrap: wrap; gap: var(--v2-2) var(--v2-4); padding-top: var(--v2-5); font-size: var(--v2-meta); }
@media (max-width: 1100px) { .v2.mem .brain-stage { grid-template-columns: minmax(0, 1fr); } .v2.mem .brain-concept { position: static; max-height: none; } }

/* Receipt book ------------------------------------------------------------------ */
.v2.mem .mem-figure { margin: var(--v2-4) 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
.v2.mem .mem-figure .lumen-operating-chart { min-height: 240px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.v2.mem .mem-source { margin: var(--v2-2) 0 0; color: var(--lm-matte-3); font-size: var(--v2-meta); }
.v2.mem .v2-note code { font: inherit; color: var(--lm-matte); overflow-wrap: anywhere; }
.v2.mem .v2-now-fact b.is-bad { color: var(--lm-key); }
.v2.mem td > small { display: block; margin-top: 2px; }
.v2.mem .mem-receipt > summary { align-items: baseline; padding: var(--v2-2) 0; }
.v2.mem .mem-receipt > summary b { white-space: normal; flex: 1 1 420px; min-width: 0; font-weight: 600; color: var(--lm-matte); line-height: 1.45; }
.v2.mem .mem-receipt > summary span { flex: 1 1 100%; padding-left: 28px; }
.v2.mem .mem-receipt > :not(summary) { margin-left: 28px; }
.v2.mem .mem-receipt p { margin: var(--v2-2) 0 0; max-width: 78ch; }
.v2.mem .mem-hash { color: var(--lm-matte-3); font-size: var(--v2-meta); overflow-wrap: anywhere; }
.v2.mem .profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-4) var(--v2-5); max-width: 760px;
  margin: 0; padding: var(--v2-3) 0 var(--v2-5); border: 0; background: none; box-shadow: none; }
.v2.mem .profile-form > :is(label:has(textarea), button) { grid-column: 1 / -1; }
.v2.mem .profile-form > button { justify-self: start; }

/* Evidence log (pulse) and journal ------------------------------------------------ */
.v2.mem .mem-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v2.mem td b { font-weight: 600; }
.v2.mem td.okc { color: var(--lm-matte); }
.v2.mem td.errc { color: var(--lm-key); font-weight: 600; }
.v2.mem td.errc small, .v2.mem td.okc small { font-weight: 400; color: var(--lm-matte-2); }
.v2.mem .mem-actions { white-space: nowrap; }
.v2.mem .mem-actions .inline-action { display: inline; margin: 0 0 0 var(--v2-3); }
.v2.mem .mem-items > li.is-failed > b > a { color: var(--lm-key); }
.v2.mem .mem-steps { margin: 0 0 var(--v2-3); padding-left: var(--v2-5); color: var(--lm-matte-2); }
.v2.mem .mem-steps li { margin: var(--v2-1) 0; }
.v2.mem .mem-steps li.errc b { color: var(--lm-key); }
.v2.mem .failure-diagnosis { margin: var(--v2-2) 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
.v2.mem .pulse-stability .lumen-operating-chart { min-height: 280px; }
.v2.mem .v2-note b { color: var(--lm-matte); font-weight: 600; }
.v2.mem .mem-prose { max-width: 76ch; padding-top: var(--v2-6); margin: 0; border: 0; background: none; box-shadow: none; }
.v2.mem .mem-prose :is(p, li) { font-size: var(--v2-text); line-height: 1.6; color: var(--lm-matte); }
.v2.mem .mem-prose :is(h1, h2, h3, h4) { margin: var(--v2-6) 0 var(--v2-3); padding: 0 0 var(--v2-2); border-bottom: var(--v2-hair);
  font: 650 1.125rem/1.35 var(--font-body); color: var(--lm-matte); }
.v2.mem .mem-prose > :first-child { margin-top: 0; }
.v2.mem .mem-prose :is(strong, b) { color: var(--lm-matte); }
.v2.mem .mem-prose code { font: inherit; color: var(--lm-matte-2); overflow-wrap: anywhere; }
.v2.mem .mem-prose table { display: block; overflow-x: auto; }
.v2.mem .mem-prose .mem-fold { margin-top: var(--v2-5); }

/* Long tables: one table (so sort and filter see every row), rows past the eighth
   hidden until "Show N more" is ticked. A filtered table shows all its matches. */
.v2.mem .mem-clip:not(:has(.mem-clip-more input:checked)) table:not(.is-filtered) > tbody > tr:nth-child(n+9) { display: none; }
.v2.mem .mem-clip-more { margin: 0; border-top: var(--v2-hair); }
.v2.mem .mem-clip-more label { display: inline-flex; align-items: center; gap: var(--v2-2); min-height: 44px; cursor: pointer;
  color: var(--lm-matte-2); font-weight: 600; }
.v2.mem .mem-clip-more label::before { content: "+"; display: inline-grid; place-items: center; width: 20px; color: var(--lm-matte-3); }
.v2.mem .mem-clip-more label:hover { color: var(--lm-matte); }
.v2.mem .mem-clip-more input:focus-visible + label { outline: 2px solid var(--lm-key); outline-offset: 2px; }
.v2.mem .mem-clip-more .when-open, .v2.mem .mem-clip-more input:checked + label .when-closed { display: none; }
.v2.mem .mem-clip-more input:checked + label .when-open { display: inline; }
.v2.mem .mem-clip-more input:checked + label::before { content: "−"; }
.v2.mem .mem-clip:has(table.is-filtered) .mem-clip-more { display: none; }
/* Row verbs inside tables keep the quiet text form over the old button paint. */
.v2.mem.mem .mem-verb { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-width: 0; }

/* Status lines, search and inline forms ---------------------------------------- */
.v2.mem .mem-status { margin: var(--v2-4) 0 0; padding: 0; border: 0; background: none; color: var(--lm-matte-2); max-width: 75ch; }
.v2.mem .mem-status b { color: var(--lm-key); }
.v2.mem .mem-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--v2-3); max-width: 720px; margin: 0; padding: 0; border: 0; background: none; }
.v2.mem .mem-search .field { flex: 1 1 280px; margin: 0; }
.v2.mem .mem-search output { flex-basis: 100%; color: var(--lm-matte-3); font-size: var(--v2-meta); }
.v2.mem .mem-tools .mem-more { margin-top: var(--v2-4); border-top: var(--v2-hair); }
.v2.mem .mem-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-4) var(--v2-5); max-width: 760px; padding: var(--v2-3) 0 var(--v2-5); }
.v2.mem .mem-form > p, .v2.mem .mem-form .wide, .v2.mem .mem-form-actions { grid-column: 1 / -1; }
.v2.mem .mem-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-3); }
.v2.mem .mem-form-actions small { color: var(--lm-matte-2); font-size: var(--v2-meta); }

@media (max-width: 640px) {
  .v2.mem :is(.page-header, .os-hero) { padding-top: var(--v2-3); }
  .v2.mem .mem-row-head { flex-direction: column; gap: var(--v2-2); }
  .v2.mem .mem-people { display: grid; gap: var(--v2-2); }
  .v2.mem .mem-tabs { gap: var(--v2-4); }
  .v2.mem .mem-weeks { grid-auto-flow: row; grid-auto-columns: auto; height: auto; gap: var(--v2-1); }
  .v2.mem .mem-weeks li { grid-template-columns: 56px minmax(0, 1fr) 40px; grid-template-rows: none; align-items: center; text-align: left; height: 22px; }
  .v2.mem .mem-weeks span, .v2.mem .mem-weeks span.is-minor { grid-column: 1; grid-row: 1; visibility: visible; padding: 0; }
  .v2.mem .mem-weeks i { grid-column: 2; grid-row: 1; width: var(--h); height: 10px; border-radius: 0 3px 3px 0; align-self: center; }
  .v2.mem .mem-weeks b { grid-column: 3; grid-row: 1; padding: 0; text-align: right; align-self: center; }
  .v2.mem .mem-cols { grid-template-columns: minmax(0, 1fr); }
  .v2.mem :is(.mem-form, .profile-form) { grid-template-columns: minmax(0, 1fr); }
  .v2.mem .mem-receipt > :not(summary) { margin-left: 0; }
  .v2.mem .mem-receipt > summary span { padding-left: 0; }
  .v2.mem .mem-receipt > summary b { flex: 1 1 0; }
  .v2.mem.mem .mem-verb { min-height: 44px; min-width: 44px; }
  .v2.mem.mem .lumen-instrumented-table [data-tanstack-sort] { min-height: 44px; }
  .v2.mem.mem .lumen-table-toolbar { flex-wrap: wrap; }
  .v2.mem.mem .lumen-table-scope { flex-wrap: wrap; white-space: nowrap; }
  .v2.mem td { font-size: var(--v2-text); }
  /* The first column stays put while the rest scrolls; it takes the page colour so
     nothing shows through, and wraps instead of truncating. */
  .v2.mem.mem .lumen-instrumented-table :is(th, td):first-child { width: 140px; max-width: 140px; padding-right: var(--v2-3);
    background: var(--lm-ink); box-shadow: 1px 0 var(--lm-seam); }
  .v2.mem.mem .lumen-instrumented-table tbody tr:hover td:first-child { background: var(--lm-ink); }
}

@media (max-width: 1100px) {
  .v2.mem .mem-duo { grid-template-columns: minmax(0, 1fr); }
}

/* --- Fix pass: plain copy and phone heads ------------------------------- */
@media (max-width: 600px) { .v2.mem .v2-section-head .mem-aside { display: none; } }
/* fields.css gives every .field an empty help row under the input; with its 8px
   gap the label box ran below the input and the button aligned to the box. These
   search rows carry no help line, so the grid ends at the control. */
.v2.mem .mem-search .field { grid-template-areas: "field-label" "field-control"; }
.v2.mem .mem-search .field input { margin: 0; }
.v2.mem .mem-search > button { min-height: 48px; }
.v2.mem .mem-duo > .v2-section { padding-top: var(--v2-6); }
/* Five producer rows need no filter, sort summary or row count. */
.v2.mem #source-attribution .lumen-table-toolbar { display: none; }
/* An older layer paints the meta line of each prior conversation as a panel. */
.v2.mem .dossier-interaction small { display: block; margin: 2px 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
