/* WorkMindr product UI — shared tokens, shell, and primitives. */

:root {
  --bg: #09090b;
  --surface: #111113;
  --surface-raised: #18181b;
  --panel: var(--surface);
  --panel-2: var(--surface-raised);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;

  --blue: #c7d2fe;
  --orange: #fbbf24;
  --coral: #fda4af;
  --green: #6ee7b7;
  --purple: #ddd6fe;
  --gray: #a1a1aa;

  --accent: var(--blue);
  --accent-ink: #09090b;
  --accent-soft: rgba(199, 210, 254, 0.12);
  --ok: var(--green);
  --warn: var(--orange);
  --danger: var(--coral);
  --success: var(--green);
  --warning: var(--orange);
  --focus: rgba(199, 210, 254, 0.28);

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --title: 26px;
  --section: 16px;
  --body: 15px;
  --meta: 13px;
  --caption: 12px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --nav-h: 56px;
  --wm-rail: 228px;
  --wm-rail-open: 228px;
  --wm-dock: 0px;
  --content: 960px;
  --content-wide: 1120px;

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.38);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { color-scheme: dark; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(199, 210, 254, 0.28); color: var(--text); }

@media (min-width: 1024px) {
  html.wm-has-shell {
    --wm-rail-now: var(--wm-rail);
  }
  html.wm-has-shell body {
    padding-left: calc(var(--wm-rail-now) + var(--safe-l));
  }
}
@media (max-width: 1023px) {
  html.wm-has-shell {
    --wm-dock: calc(56px + var(--safe-b));
  }
  html.wm-has-shell body {
    padding-bottom: var(--wm-dock);
  }
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ shell */

html.wm-has-shell .wm-shell,
html.wm-has-shell .wm-menu,
html.wm-has-shell .live-menu,
html.wm-has-shell .product-nav,
html.wm-has-shell .rail > .logo,
html.wm-has-shell .rail-cta {
  display: none !important;
}

.wm-rail {
  display: none;
}
.wm-dock,
.wm-sheet {
  display: none;
}

@media (min-width: 1024px) {
  .wm-rail {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--wm-rail-now, var(--wm-rail));
    padding: calc(14px + var(--safe-t)) 10px 16px calc(10px + var(--safe-l));
    background: #0c0c0e;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    transition: none;
  }
  .wm-rail-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 8px;
    margin-bottom: 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }
  .wm-rail-brand:hover { text-decoration: none; color: var(--text); }
  .wm-rail-mark {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 750;
  }
  .wm-rail-word {
    opacity: 1;
    transform: none;
  }
  .wm-rail-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
  }
  .wm-rail a.wm-item,
  .wm-rail button.wm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    width: 100%;
    text-align: left;
  }
  .wm-rail a.wm-item:hover,
  .wm-rail button.wm-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
  }
  .wm-rail a.wm-item.on,
  .wm-rail a.wm-item[aria-current="page"] {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
  }
  .wm-rail-label {
    margin: 16px 10px 4px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .wm-item svg {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .wm-item svg [data-fill] { fill: currentColor; stroke: none; }
  .wm-item-label {
    opacity: 1;
    transform: none;
  }
  .wm-rail-more {
    margin-top: auto;
    border-top: 1px solid var(--line);
  }
  .wm-rail-more > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    cursor: pointer;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 550;
  }
  .wm-rail-more > summary::-webkit-details-marker { display: none; }
  .wm-rail-more[open] > summary { color: var(--text); }
  .wm-rail-foot {
    margin-top: 0;
    padding: 4px 0 8px;
    border-top: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .wm-rail-secondary { margin-top: auto; padding-top: 8px; }
  .wm-rail-secondary .wm-item { color: var(--muted); min-height: 36px; }
}

@media (max-width: 1023px) {
  .wm-dock {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: calc(56px + var(--safe-b));
    padding: 4px 6px calc(6px + var(--safe-b));
    background: rgba(14, 16, 22, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .wm-dock a,
  .wm-dock button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 550;
    text-decoration: none;
    cursor: pointer;
  }
  .wm-dock a.on,
  .wm-dock a[aria-current="page"],
  .wm-dock button[aria-expanded="true"] { color: var(--text); }
  .wm-dock svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .wm-dock svg [data-fill] { fill: currentColor; stroke: none; }
  .wm-sheet-dim {
    display: none;
    position: fixed;
    z-index: 54;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
  }
  .wm-sheet-dim.is-open { display: block; }
  .wm-sheet {
    display: none;
    position: fixed;
    z-index: 55;
    left: 10px;
    right: 10px;
    bottom: calc(var(--wm-dock) + 8px);
    max-height: min(40vh, 280px);
    overflow-y: auto;
    padding: 10px 10px 8px;
    background: #18181b;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  }
  .wm-sheet.is-open { display: block; }
  .wm-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    margin: 2px auto 8px;
  }
  .wm-sheet-title {
    margin: 0 8px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .wm-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }
  .wm-sheet a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 8px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
  }
  .wm-sheet a svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--muted);
  }
  .wm-sheet a svg [data-fill] { fill: currentColor; stroke: none; }
  .wm-sheet a:hover { background: rgba(255, 255, 255, 0.04); text-decoration: none; }
}

/* legacy top bar kept in markup for tests; hidden once the shell mounts */
.wm-shell {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.wm-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: calc(var(--nav-h) + var(--safe-t));
  padding: var(--safe-t) 24px 0;
  max-width: 1360px;
  margin: 0 auto;
}
.wm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  flex: none;
}
.wm-brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--blue);
}
.wm-brand:hover { text-decoration: none; color: var(--text); }
.wm-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.wm-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}
.wm-nav a.on, .wm-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}
.wm-menu, .wm-more { display: none; }

/* ------------------------------------------------------------------ page header */

.top {
  padding: 28px 28px 0;
  max-width: 1360px;
  margin: 0;
  background: transparent;
  border: 0;
  position: static;
}

.top-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.brand { display: none; }
.top-links { display: none; }

.page-name {
  margin: 0;
  font-size: var(--title);
  font-weight: 620;
  letter-spacing: -0.04em;
  color: var(--text);
  text-transform: none;
  line-height: 1.15;
}

.page-lead {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.5;
}

.today-date { font-size: var(--meta); color: var(--muted); }

.glance, .glance-wrap { display: none !important; }
.wm-backstage { display: none !important; }
.chips-right { display: none; }

.orgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}

.org, .wm-chip, .org-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.org:hover, .org-chip:hover { color: var(--text); border-color: var(--line-strong); }
.org[aria-selected="true"],
.org-chip.on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--text);
}

.daybar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
  font-size: var(--meta);
  color: var(--muted);
}

.pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.pill.open { color: var(--green); border-color: rgba(79, 212, 164, 0.35); background: rgba(79, 212, 164, 0.08); }
.pill.closed { color: var(--orange); border-color: rgba(224, 176, 92, 0.4); background: rgba(224, 176, 92, 0.08); }
.pill.warn { color: var(--orange); border-color: rgba(224, 176, 92, 0.4); }
.pill.danger { color: var(--coral); border-color: rgba(224, 120, 128, 0.45); }

/* ------------------------------------------------------------------ layout */

.wm-page,
.layout,
.proj-wrap,
.continue-wrap,
.kb-wrap,
.history-wrap,
.meeting-wrap,
.cap-wrap,
.rec-wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0;
  padding: 12px 28px calc(32px + var(--wm-dock));
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}
@media (min-width: 1280px) {
  .layout:has(> .col:nth-child(3)) {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr) minmax(0, 0.92fr);
  }
}

.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card, .panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  min-width: 0;
}

.card h2, .section-title {
  margin: 0 0 12px;
  font-size: var(--section);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.card h3 {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.answer {
  margin: 0 0 14px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.6;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 8px 28px 8px 0;
  max-width: var(--content-wide);
  width: calc(100% - 48px);
}
.hero h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}
.hero p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.hero .hero-meta { margin-top: 10px; font-size: var(--meta); color: var(--muted); font-weight: 500; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rec-list { display: flex; flex-direction: column; gap: 2px; }
.rec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}
.rec-row:hover { background: rgba(255, 255, 255, 0.035); text-decoration: none; }
.rec-row .meeting-time { font-variant-numeric: tabular-nums; font-weight: 650; }
.rec-avail { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.rec-avail .on { color: var(--green); }
.job-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}
.job-status.queued { color: var(--muted); }
.job-status.running, .job-status.processing { color: var(--blue); background: var(--accent-soft); }
.job-status.needs_input { color: var(--orange); }
.job-status.done, .job-status.completed { color: var(--green); }
.job-status.error, .job-status.failed { color: var(--coral); }

.more {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 4px 16px 12px;
}
.more > summary {
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { color: var(--text); }
.more .card { border: 0; background: transparent; padding: 12px 0; box-shadow: none; }
.more .card + .card { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ controls */

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 550; }

input[type="text"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 11px 13px;
  min-height: 44px;
}
textarea { resize: vertical; line-height: 1.55; min-height: 96px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(199, 210, 254, 0.55);
  box-shadow: 0 0 0 3px var(--focus);
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }
.row.actions > button,
.row.actions > a { flex: 1 1 140px; }
.field { margin-bottom: 16px; }

button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
  transition: border-color .12s, filter .12s, background .12s;
}
button:hover:not(:disabled) { border-color: var(--line-strong); }
button:hover:not(:disabled):not(.primary) { background: var(--surface-raised); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

button.primary,
a.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.primary:hover:not(:disabled),
a.primary:hover { filter: brightness(1.05); text-decoration: none; }

button.good, button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
button.warn, button.danger {
  background: transparent;
  border-color: rgba(224, 120, 128, 0.45);
  color: var(--coral);
}
button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
button.small { min-height: 36px; padding: 6px 12px; font-size: 12px; }

.modes { display: flex; gap: 8px; }
.modes button { flex: 1; }
.modes button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--text);
}

/* ------------------------------------------------------------------ states */

.state {
  padding: 22px 8px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
}
.state.error { color: var(--coral); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: wm-spin .7s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes wm-spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%) translateY(12px);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  max-width: min(92vw, 460px);
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(79, 212, 164, 0.4); }
.toast.bad { border-color: rgba(224, 120, 128, 0.5); }

.hint { font-size: var(--caption); color: var(--faint); margin: 8px 0 0; line-height: 1.45; }

.list-row,
.proj-row,
.doc-row,
.job-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: center;
  padding: 13px 10px;
  margin: 0 -10px;
  border-bottom: 0;
  border-radius: 10px;
  cursor: pointer;
}
.meeting-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 4px 16px;
  align-items: start;
  padding: 14px 12px;
  margin: 0 -10px;
  border-radius: 12px;
  cursor: pointer;
}
.meeting-when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-top: 2px;
}
.meeting-time {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  min-width: 0;
  letter-spacing: -0.02em;
}
.meeting-date {
  font-size: 11px;
  color: var(--faint);
  text-transform: lowercase;
}
.meeting-copy {
  min-width: 12rem;
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meeting-when { flex: none; }
.rec-actions { flex: none; display: flex; gap: 8px; align-items: center; }
.rec-actions button, .rec-actions a { white-space: nowrap; width: auto; }
.meeting-title {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}
.meeting-sub {
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.meeting-facts { display: none; }
.list-row:hover,
.meeting-row:hover,
.proj-row:hover,
.doc-row:hover { background: rgba(255, 255, 255, 0.035); }
.list-row:last-child,
.meeting-row:last-child,
.proj-row:last-child,
.doc-row:last-child { border-bottom: 0; }

.job-row.task {
  background: transparent;
  border: 0;
  border-radius: 10px;
  margin: 0 -10px;
  padding: 12px 10px;
  align-items: center;
}
.job-row.task:last-child { border-bottom: 0; }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.memory-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.memory-card .eyebrow {
  font-size: var(--caption);
  color: var(--muted);
  margin-bottom: 6px;
}
.evidence-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.evidence-form select, .evidence-form input { flex: 1 1 140px; }
.tech-details {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--meta);
}
.tech-details summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .top { padding: 20px 16px 0; }
  .top, .wm-page, .layout, .proj-wrap, .continue-wrap, .kb-wrap, .history-wrap, .meeting-wrap, .cap-wrap, .rec-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero { width: calc(100% - 32px); padding: 18px; }
  .page-name { font-size: 24px; }
}

@media (max-width: 767px) {
  .list-row, .meeting-row, .proj-row, .doc-row, .job-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .org, .org-chip { min-height: 40px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .primary, .hero-actions button { width: 100%; }
}

/* ------------------------------------------------- live health (v4.6.0) */

/* The failing states must not be able to read as the healthy one. */
.chip-live.is-ok { color: var(--green); }
.chip-live.is-warn { color: var(--orange); }
.chip-live.is-bad { color: var(--coral); }

.live-health-note {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}
