/* Momo — momowrite.com
   1:1 Pixel-Faithful Momo macOS App Affect UI styles (Light & Dark).
   Strict CSP safe, zero external dependencies. */

:root {
  /* Exact hex pairs from MoUI/AffectPalette.swift */
  --af-shell: #eff0f0;
  --af-stage: #e7e8e9;
  --af-sheet: #ffffff;
  --af-card: #ffffff;
  --af-pill-bg: #e5e6e7;
  --af-pill-hover: #dcdde0;
  --af-pill-dark: #5f6168;
  --af-pill-dark-fg: #ffffff;
  --af-hairline: rgba(15, 23, 42, 0.08);
  --af-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 26px -14px rgba(15, 23, 42, 0.14);
  --af-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --af-crew-bg: #fbfbfc;
  --af-crew-node: #ffffff;
  --af-crew-link: rgba(74, 158, 255, 0.42);
  --af-crew-link-busy: rgba(59, 130, 246, 0.72);
  --af-fg: rgba(0, 0, 0, 0.88);
  --af-fg-2: rgba(0, 0, 0, 0.61);
  --af-muted: rgba(0, 0, 0, 0.45);
  --af-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --af-shell: #252829;
    --af-stage: #2a2d2e;
    --af-sheet: #1e2021;
    --af-card: #2e3031;
    --af-pill-bg: #3a3d3e;
    --af-pill-hover: #45494a;
    --af-pill-dark: #8e9099;
    --af-pill-dark-fg: #111113;
    --af-hairline: rgba(255, 255, 255, 0.09);
    --af-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 14px 32px -12px rgba(0, 0, 0, 0.6);
    --af-card-shadow: 0 6px 20px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --af-crew-bg: #18191b;
    --af-crew-node: #26292a;
    --af-crew-link: rgba(110, 180, 247, 0.38);
    --af-crew-link-busy: rgba(110, 180, 247, 0.78);
    --af-fg: rgba(255, 255, 255, 0.90);
    --af-fg-2: rgba(255, 255, 255, 0.62);
    --af-muted: rgba(255, 255, 255, 0.45);
  }
}

:root[data-theme="dark"] {
  --af-shell: #252829;
  --af-stage: #2a2d2e;
  --af-sheet: #1e2021;
  --af-card: #2e3031;
  --af-pill-bg: #3a3d3e;
  --af-pill-hover: #45494a;
  --af-pill-dark: #8e9099;
  --af-pill-dark-fg: #111113;
  --af-hairline: rgba(255, 255, 255, 0.09);
  --af-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 14px 32px -12px rgba(0, 0, 0, 0.6);
  --af-card-shadow: 0 6px 20px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --af-crew-bg: #18191b;
  --af-crew-node: #26292a;
  --af-crew-link: rgba(110, 180, 247, 0.38);
  --af-crew-link-busy: rgba(110, 180, 247, 0.78);
  --af-fg: rgba(255, 255, 255, 0.90);
  --af-fg-2: rgba(255, 255, 255, 0.62);
  --af-muted: rgba(255, 255, 255, 0.45);
}

/* Real MomoIcon & BrandMark alignment */
.mo-ic { display: inline-block; flex: none; vertical-align: middle; }
.mo-brand-mark { display: inline-block; flex: none; vertical-align: middle; object-fit: contain; }
:root[data-theme="dark"] .mo-mono-mark { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mo-mono-mark { filter: invert(1); }
}

/* ==========================================================================
   Upgrade Hero Stage Pane 0 (.momo-app) to 1:1 Momo Floating-Sheet Shell
   ========================================================================== */
.momo-app {
  background: var(--af-shell);
  color: var(--af-fg);
}
.app-sidebar {
  border-right: 0;
  background: var(--af-shell);
  padding: 14px 12px 12px;
  gap: 10px;
}
.app-main {
  padding: 8px 8px 8px 0;
  gap: 8px;
}
.app-toolbar {
  height: 36px;
  padding: 0 6px;
  border-bottom: 0;
  background: transparent;
}
.app-crumb {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--af-sheet);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: var(--af-fg);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
}
.app-crumb span { color: var(--af-muted); font-weight: 400; }
.app-body {
  gap: 8px;
}
.app-doc, .sim-subview {
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  box-shadow: var(--af-shadow);
}
.app-comments {
  background: transparent;
  padding: 6px 8px 8px 6px;
}
.cm-card {
  background: var(--af-card);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--af-card-shadow);
}
.side-file.active, .side-nav-btn.active {
  background: var(--af-pill-bg);
  color: var(--af-fg);
  font-weight: 500;
}
.mode-tabs {
  border-radius: 999px;
  background: var(--af-pill-bg);
  border: 0;
  padding: 3px;
}
.mode-tabs button { border-radius: 999px; }
.tb-icon-btn {
  border-radius: 50%;
  background: var(--af-sheet);
  border-color: var(--af-hairline);
}
.doc-callout {
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
}
.doc-callout.callout-tip {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}
.doc-mark {
  background: #fef08a;
  border-bottom: 0;
  color: #1d1d1f;
  border-radius: 3px;
  padding: 1px 4px;
}

/* ==========================================================================
   Core Real Momo Affect Window Chrome (.af-win)
   ========================================================================== */
.af-win {
  position: relative;
  border: 1px solid var(--af-hairline);
  border-radius: 16px;
  background: var(--af-shell);
  color: var(--af-fg);
  box-shadow: var(--shot-shadow);
  overflow: hidden;
  font-size: 13px;
}
.stage-pane.live-pane .af-win {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 556px;
}
.af-flow-win { background: var(--af-stage); }

.af-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 540px;
}
.af-shell-3col {
  grid-template-columns: 186px minmax(0, 1fr) 264px;
}

/* Left Sidebar */
.af-side {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--af-shell);
}
.af-flow-win .af-side { background: color-mix(in srgb, var(--af-shell) 92%, var(--af-stage)); }
.af-traffic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
}
.af-traffic-row .traffic { padding: 0; }
.af-side-tog { color: var(--af-muted); font-size: 13px; }
.af-brand-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 6px 8px;
}
.af-brand-row span {
  font-family: var(--brand-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--af-fg);
}
.af-nav-list { display: flex; flex-direction: column; gap: 2px; }
.af-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--af-fg-2);
}
.af-nav-item.active {
  background: var(--af-pill-bg);
  color: var(--af-fg);
  font-weight: 600;
}
.af-ni { width: 14px; text-align: center; color: var(--af-muted); font-size: 12px; }
.af-cnt { margin-left: auto; font-size: 11.5px; color: var(--af-muted); }
.af-sec-lbl {
  margin-top: 8px;
  padding: 0 9px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--af-muted);
}
.af-doc-i { padding: 4.5px 9px; font-size: 12px; }
.af-doc-i.indent { padding-left: 22px; }
.af-doc-ic {
  width: 11px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid var(--af-hairline);
  background: var(--af-sheet);
  flex: none;
}
.af-side-foot {
  margin-top: auto;
  padding: 10px 6px 2px;
  display: flex;
  justify-content: flex-end;
}
.af-running-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  font-size: 11px;
  color: var(--af-fg-2);
}
.af-running-pill i { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: block; }

/* Document Outline Sidebar */
.af-doc-head-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 8px;
}
.af-doc-thumb {
  width: 24px;
  height: 28px;
  border-radius: 5px;
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  flex: none;
}
.af-doc-head-tile b { display: block; font-size: 12px; font-weight: 600; line-height: 1.25; }
.af-doc-head-tile small { font-size: 11px; color: var(--af-muted); }
.af-3pill {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  margin: 2px 4px 6px;
  text-align: center;
  font-size: 11px;
  color: var(--af-muted);
}
.af-3pill span { height: 22px; display: grid; place-items: center; border-radius: 999px; }
.af-3pill span.on { background: var(--af-sheet); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.af-outline-item {
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--af-fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.af-outline-item.active { background: var(--af-pill-bg); color: var(--af-fg); font-weight: 600; }
.af-outline-item.sub { padding-left: 20px; font-size: 11.5px; color: var(--af-muted); }
.af-outline-muted { padding: 4px 9px; font-size: 11.5px; line-height: 1.5; color: var(--af-muted); }

/* Liquid Glass Unified Tab Bar & Floating Document Sheet */
.af-right-shell, .af-center-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.af-center-col { padding: 0 8px 8px 0; }
.af-tabbar {
  height: 44px;
  padding: 0 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.af-pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--af-sheet);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  font-size: 12px;
  font-weight: 600;
  color: var(--af-fg);
}
.af-tab-x { color: var(--af-muted); font-weight: 400; }
.af-tab-plus { color: var(--af-muted); font-size: 15px; }
.af-tabbar-end { margin-left: auto; display: flex; gap: 10px; color: var(--af-muted); font-size: 13px; }

.af-sheet {
  flex: 1;
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  box-shadow: var(--af-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.af-sheet-bar {
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.af-sheet-left, .af-sheet-right { display: flex; align-items: center; gap: 8px; }
.af-file-hd { margin-left: 4px; }
.af-file-hd b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.af-file-hd small { font-size: 11px; color: var(--af-muted); }
.af-cir-btn {
  appearance: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border: 1px solid var(--af-hairline);
  border-radius: 50%;
  background: var(--af-sheet);
  color: var(--af-fg);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.af-cir-dark { background: var(--af-fg); color: var(--af-sheet); border-color: transparent; font-weight: 600; }
.af-cir-pin { color: #6b5ce7; border-color: rgba(107, 92, 231, 0.35); }
.af-mode-pill {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  font-size: 11.5px;
}
.af-mode-pill span { padding: 3px 10px; border-radius: 999px; color: var(--af-fg-2); }
.af-mode-pill span.on { background: var(--af-sheet); color: var(--af-fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* Pill Buttons (exact Momo Affect soft gray & dark pills) */
.af-pill-dark {
  appearance: none;
  cursor: pointer;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--af-pill-dark);
  color: var(--af-pill-dark-fg);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.af-pill-dark:hover { opacity: 0.88; }
.af-pill-soft {
  appearance: none;
  cursor: pointer;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--af-pill-bg);
  color: var(--af-fg);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s;
}
.af-pill-soft:hover { background: var(--af-pill-hover); }
.af-pill-soft.done { background: rgba(34, 197, 94, 0.16); color: #15803d; }

/* ==========================================================================
   1:1 Real Bauhaus Vinyl Cover Flow & Radial Crew Graph (projects-flow.webp)
   ========================================================================== */
.af-flow-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
}
.af-flow-center {
  padding: 6px 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.af-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.af-flow-head h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.af-glass-ctrls { display: flex; align-items: center; gap: 6px; }
.af-view-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--af-sheet);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.af-view-seg button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  width: 26px;
  height: 24px;
  border-radius: 999px;
  color: var(--af-muted);
  font-size: 12px;
}
.af-view-seg button.active { background: var(--af-pill-bg); color: var(--af-fg); }

.af-barrel {
  position: relative;
  height: 256px;
  display: grid;
  place-items: center;
}
.af-sleeve {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  position: absolute;
  width: 198px;
  height: 198px;
  text-align: left;
  transition: transform 0.55s var(--ease), opacity 0.4s;
}
.af-vinyl {
  position: absolute;
  top: 7px;
  right: 4px;
  width: 184px;
  height: 184px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #1d2027 0 26%, #090a0d 27% 32%, #191c22 33% 47%, #0c0d11 48% 64%, #1e2128 65% 100%);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
  transition: transform 0.55s var(--ease);
}
.af-vinyl i {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: #c94e2c;
  border: 3px solid #111;
}
.af-sleeve.is-center .af-vinyl { transform: translateX(46px) rotate(22deg); }

/* Exact Bauhaus Vinyl Sleeve Artworks */
.lp-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 34px -10px rgba(0, 0, 0, 0.36);
}
/* LP-03 design-tokens: 3 vertical color blocks + matte charcoal footer */
.lp-art-tokens { background: #242933; color: #fff; }
.lp-tri {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.9fr;
  border-bottom: 2px solid #d95d39;
}
.lp-tri i:nth-child(1) { background: #2d74dc; }
.lp-tri i:nth-child(2) { background: #448d56; }
.lp-tri i:nth-child(3) { background: #c94e2c; }
.lp-corner-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
}
.lp-footer {
  padding: 10px 12px 11px;
  background: #222731;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-kicker { font-size: 7.5px; letter-spacing: 0.08em; color: #d97757; }
.lp-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.lp-meta { font-size: 7px; color: rgba(255, 255, 255, 0.65); margin-top: 2px; }

/* LP-02 notes-api: Cream Bauhaus sleeve */
.lp-art-notes { background: #e5e0d5; color: #1d1d1f; padding: 12px 12px 12px 18px; justify-content: space-between; }
.lp-spine { position: absolute; inset: 0 auto 0 0; width: 9px; background: #94443b; }
.lp-notes-top { font-size: 7.5px; color: #7a7368; }
.lp-notes-code {
  padding: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, #8b4a4b, #5e3841);
  color: rgba(255, 255, 255, 0.88);
  font-size: 7.5px;
  line-height: 1.5;
}
.lp-notes-name { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.lp-notes-meta { font-size: 7px; color: #6e675c; }

/* LP-01 launch-site: Matte black + warm orange sun */
.lp-art-launch { background: #16171a; color: #fff; justify-content: flex-end; }
.lp-sun { position: absolute; top: 24px; right: 20px; width: 72px; height: 72px; border-radius: 50%; background: #c86428; opacity: 0.9; }
.lp-launch-code { position: relative; padding: 0 12px 8px; font-size: 8px; color: rgba(255, 255, 255, 0.45); }

/* LP-04 field-guide: Plum + overlapping Venn circles */
.lp-art-guide { background: #231d2d; color: #fff; justify-content: flex-end; }
.lp-venn { position: absolute; top: 24px; left: 26px; right: 26px; height: 92px; }
.lp-venn i { position: absolute; width: 78px; height: 78px; border-radius: 50%; top: 4px; }
.lp-venn i:nth-child(1) { left: 10px; background: rgba(224, 122, 95, 0.72); }
.lp-venn i:nth-child(2) { right: 10px; background: rgba(154, 134, 214, 0.62); }
.lp-footer-plum { background: rgba(24, 19, 34, 0.88); }

/* LP-05 momo-core: Navy blueprint grid */
.lp-art-core { background: #142238; color: #fff; justify-content: flex-end; }
.lp-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(110, 180, 247, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 180, 247, 0.14) 1px, transparent 1px); background-size: 20px 20px; }
.lp-footer-navy { position: relative; background: rgba(14, 24, 42, 0.92); }

/* Bottom Collector Deck (exact match to projects-flow.webp) */
.af-collector {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
  align-items: end;
  padding-top: 12px;
}
.af-col-lp { font-size: 11px; color: var(--af-muted); }
.af-lp-code { color: #2570b8; font-weight: 600; }
.af-col-name { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin: 3px 0 10px; }
.af-col-arrows { display: flex; gap: 6px; }
.af-col-right {
  border-top: 1px solid var(--af-hairline);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.af-spec-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  font-size: 11.5px;
}
.af-spec-row span { font-family: var(--mono); font-size: 10px; color: var(--af-muted); }
.af-spec-row b { font-weight: 500; color: var(--af-fg); }
.af-col-btns { display: flex; gap: 7px; margin-top: 8px; }

/* Folder Grid Mode */
.af-fgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  align-content: start;
}
.af-fcard {
  appearance: none;
  cursor: pointer;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  background: var(--af-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--af-shadow);
}
.af-fcard.active { border-color: var(--accent); }
.af-fcard-top { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--af-muted); }
.af-fcard b { font-size: 15px; font-weight: 600; }
.af-fcard-sub { font-size: 11.5px; color: var(--af-fg-2); }

/* Right Crew Inspector (exact match to projects-flow.webp) */
.af-insp {
  padding: 8px 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.af-insp-pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.af-insp-title { font-size: 14px; font-weight: 600; }
.af-insp-sub { display: flex; gap: 6px; align-items: center; }
.af-idle-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  font-size: 11px;
  color: var(--af-fg-2);
}
.af-insp-btns { display: flex; gap: 7px; }
.af-crew-card {
  border-radius: 16px;
  background: var(--af-card);
  box-shadow: var(--af-card-shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.af-crew-top { display: flex; flex-direction: column; gap: 6px; }
.af-crew-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.af-crew-ic { color: #3b82f6; }
.af-crew-nums { display: flex; justify-content: space-between; font-size: 11px; color: var(--af-muted); }
.af-crew-nums b { color: var(--af-fg); }
.af-crew-stage {
  border-radius: 12px;
  background: var(--af-crew-bg);
  border: 1px solid var(--af-hairline);
  padding: 8px 6px 10px;
}
.af-crew-svg { width: 100%; max-width: 240px; margin-inline: auto; height: auto; display: block; }
.af-link { fill: none; stroke: var(--af-crew-link); stroke-width: 1.3; }
.af-link-busy { stroke: var(--af-crew-link-busy); stroke-width: 1.9; }
.af-dot-call { fill: #3b82f6; animation: spark-twinkle 1.8s ease-in-out infinite; }
.af-dot-2 { animation-delay: -0.9s; }
.af-tool-node rect, .af-agent-node rect, .af-hub-node rect {
  fill: var(--af-crew-node);
  stroke: var(--af-hairline);
  stroke-width: 1;
}
.af-tool-ic, .af-agent-ic { fill: var(--af-fg-2); font: 500 12px var(--sans); text-anchor: middle; }
.af-tool-lbl, .af-agent-lbl, .af-hub-lbl { fill: var(--af-fg-2); font: 500 9.5px var(--sans); text-anchor: middle; }
.af-hub-letter { fill: var(--af-fg); font: 600 13px var(--sans); text-anchor: middle; }
.af-ok { fill: #22c55e; }
.af-ok-tick { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.af-crew-legend {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 9.5px;
  color: var(--af-muted);
}
.af-act-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.af-act-lbl { font-size: 11px; color: var(--af-muted); }
.af-act-val { font-size: 13px; color: var(--af-muted); }
.af-act-val b { font-size: 18px; color: var(--af-fg); }
.af-act-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--af-pill-bg);
}
.af-act-seg button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--af-fg-2);
}
.af-act-seg button.active { background: var(--af-sheet); color: var(--af-fg); font-weight: 600; }

.insp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.insp-chip {
  appearance: none;
  cursor: pointer;
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--af-pill-bg);
  color: var(--af-fg-2);
  font-size: 11px;
  font-weight: 500;
}
.insp-chip.active { background: var(--af-fg); color: var(--af-sheet); }
.insp-status { font-size: 11px; color: var(--af-muted); padding: 6px 9px; border-radius: 8px; background: var(--af-pill-bg); }

/* ==========================================================================
   1:1 Real Document Prose, Soft Alerts, Pointed Live Cursors & Comments Panel
   ========================================================================== */
.af-prose { padding: 14px 36px 26px; display: flex; flex-direction: column; gap: 12px; }
.af-prose h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.af-prose h4 { font-size: 17px; font-weight: 700; margin-top: 6px; }
.af-prose p { font-size: 13.5px; line-height: 1.75; color: var(--af-fg); }
.af-prose-meta { font-size: 11.5px; color: var(--af-muted); margin-top: -8px; }
.af-txt-green { color: #16a34a; font-weight: 500; }
.af-hl-yellow { background: #fef08a; color: #1d1d1f; padding: 1px 4px; border-radius: 3px; }
.af-hl-pink { background: #fecaca; color: #1d1d1f; padding: 1px 4px; border-radius: 3px; }
.af-hl-warm { background: #fef3c7; color: #1d1d1f; padding: 1px 3px; border-radius: 3px; border-bottom: 1.5px solid #f59e0b; }
.af-ul { text-decoration: underline; text-underline-offset: 3px; }
.af-committed { background: rgba(34, 197, 94, 0.14); padding: 1px 5px; border-radius: 4px; }
.af-center-h { text-align: center; padding: 4px 0; }
.af-center-h p { color: var(--af-fg-2); font-size: 13px; }

/* Exact Momo Soft-Bordered Rounded Alerts (matches alerts.webp!) */
.af-alert {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--af-fg);
}
.af-alert strong { font-size: 13px; font-weight: 600; }
.af-al-note { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.28); }
.af-al-note strong { color: #2563eb; }
.af-al-tip { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.3); }
.af-al-tip strong { color: #16a34a; }
.af-al-imp { background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.3); }
.af-al-imp strong { color: #7c3aed; }
.af-al-warn { background: rgba(245, 158, 11, 0.09); border-color: rgba(245, 158, 11, 0.34); }
.af-al-warn strong { color: #d97706; }
.af-al-caut { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }
.af-al-caut strong { color: #dc2626; }
.af-alerts-stack { display: flex; flex-direction: column; gap: 9px; }
.af-alert-btn { appearance: none; cursor: pointer; transition: transform 0.15s; }
.af-alert-btn.selected { transform: translateX(3px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }

.af-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.af-twocol h5 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.af-bullets { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--af-fg); }
.af-bullets li::before { content: "• "; color: #2563eb; font-weight: 700; }
.af-nums { list-style: decimal; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.af-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--af-hairline);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}
.af-table th, .af-table td { padding: 7px 11px; text-align: left; border-right: 1px solid var(--af-hairline); border-bottom: 1px solid var(--af-hairline); }
.af-table th:last-child, .af-table td:last-child { border-right: 0; }
.af-table tr:last-child td { border-bottom: 0; }
.af-table th { background: var(--af-shell); font-weight: 500; color: var(--af-fg-2); }
.col-slider-row { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--af-muted); }
.col-slider-row input { flex: 1; accent-color: var(--accent); cursor: ew-resize; }
.read-bar-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.math-cap { font-size: 12px; color: var(--af-muted); text-align: center; }
.interactive-mermaid button.mnode { cursor: pointer; font: inherit; }

/* Exact Pointed Speech-Bubble Live Cursors (matches two-agents.webp!) */
.af-live-bubble {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  margin: 4px 6px 2px 4px;
  padding: 5px 10px;
  border-radius: 9px;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  vertical-align: middle;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.af-live-bubble.purple { background: #6b5ce7; }
.af-live-bubble.teal { background: #3b8779; }
.af-live-bubble b { font-size: 11px; font-weight: 600; }
.af-live-bubble span { opacity: 0.92; font-size: 10.5px; }
.af-caret-tip {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 0;
  height: 0;
  border-right: 9px solid transparent;
  border-bottom: 10px solid #6b5ce7;
  transform: rotate(-18deg);
}
.af-live-bubble.teal .af-caret-tip { border-bottom-color: #3b8779; }

/* Exact Right Comments Panel (matches panel-review.webp!) */
.af-comments {
  padding: 12px 12px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.af-cm-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid var(--af-hairline);
  font-size: 12.5px;
  color: var(--af-muted);
}
.af-cm-tabs span.on { color: var(--af-fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--af-fg); padding-bottom: 4px; margin-bottom: -8px; }
.af-more { margin-left: auto; }
.af-cm-banner { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--af-fg); font-weight: 500; }
.af-av { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(107, 92, 231, 0.4); }
.af-av.purple { background: #e8def8; }
.af-av.teal { background: #d1fae5; box-shadow: 0 0 0 1.5px rgba(59, 135, 121, 0.45); }
.af-av.overlap { margin-left: -12px; }
.af-av.sm { width: 16px; height: 16px; }
.af-cm-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  text-align: center;
  font-size: 11px;
  color: var(--af-fg-2);
}
.af-cm-seg span { padding: 4px 0; border-radius: 999px; }
.af-cm-seg span.on { background: var(--af-sheet); color: var(--af-fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.af-cm-card {
  position: relative;
  padding: 12px;
  border-radius: 14px;
  background: var(--af-card);
  box-shadow: var(--af-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.af-cm-glow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #6b5ce7, transparent);
}
.af-cm-q { font-size: 11.5px; color: var(--af-muted); border-left: 2px solid var(--af-hairline); padding-left: 7px; }
.af-anchor-chip {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--af-pill-bg);
  font-size: 10.5px;
  color: var(--af-fg-2);
}
.af-cm-ask { font-size: 12.5px; font-weight: 600; color: var(--af-fg); line-height: 1.45; }
.af-cm-reply {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--af-shell);
  border-left: 2.5px solid #6b5ce7;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--af-fg);
}
.af-cm-rh { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--af-muted); margin-bottom: 3px; }
.af-cm-rh b { color: var(--af-fg); }
.af-cm-file {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--af-shell);
  font-size: 10.5px;
  color: var(--af-fg-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.af-dot-b { width: 6px; height: 6px; border-radius: 50%; background: #2563eb; }
.af-dot-p { width: 6px; height: 6px; border-radius: 50%; background: #6b5ce7; display: inline-block; }
.af-cm-live { font-size: 11px; color: var(--af-muted); }
.af-cm-acts { display: flex; gap: 6px; margin-top: 2px; }
.af-cm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--af-card);
  box-shadow: var(--af-card-shadow);
}
.af-cm-row-t { min-width: 0; flex: 1; }
.af-cm-row-t b { display: block; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-cm-row-t small { font-size: 10.5px; color: var(--af-muted); }
.af-mini-ok { appearance: none; border: 0; border-radius: 999px; background: var(--af-pill-bg); width: 22px; height: 22px; cursor: pointer; font-size: 11px; }
.af-cm-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.af-send-pill {
  appearance: none;
  cursor: pointer;
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--af-pill-bg);
  color: var(--af-fg);
  font-size: 12px;
  font-weight: 500;
}
.af-send-pill:hover { background: var(--af-pill-hover); }
.af-send-pill.done { background: rgba(34, 197, 94, 0.16); color: #15803d; }

/* ==========================================================================
   1:1 Real HTML Pin Picker (web-collab.webp), Code (code-collab.webp) & Whiteboard
   ========================================================================== */
.af-web-stage { padding: 18px 34px 28px; display: flex; flex-direction: column; gap: 14px; }
.af-web-stage h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.af-web-stage > p { font-size: 13.5px; color: var(--af-fg-2); margin-top: -8px; }
.af-web-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; transition: gap 0.25s; }
.af-web-stage.polished .af-web-cards { gap: 20px; }
.af-web-card {
  appearance: none;
  cursor: pointer;
  position: relative;
  text-align: left;
  padding: 18px 16px;
  border: 1.5px solid var(--af-hairline);
  border-radius: 14px;
  background: var(--af-shell);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, box-shadow 0.2s, padding 0.25s;
}
.af-web-card.pinned {
  border-color: #6b5ce7;
  background: color-mix(in srgb, #6b5ce7 7%, var(--af-sheet));
  box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.16);
}
.af-web-card b { font-size: 14px; font-weight: 600; color: var(--af-fg); }
.af-web-card > span:last-child { font-size: 12px; color: var(--af-fg-2); line-height: 1.5; }
.af-pin-pill {
  position: absolute;
  top: -26px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #6b5ce7;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(107, 92, 231, 0.35);
}
.af-pin-pill.inline { position: static; margin-left: auto; }
.af-beta-btn {
  appearance: none;
  cursor: pointer;
  padding: 9px 18px;
  border: 0;
  border-radius: 10px;
  background: #1d1d1f;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
:root[data-theme="dark"] .af-beta-btn { background: #f2f2f5; color: #111; }

.af-code-sheet { padding: 8px 10px 20px; font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.af-cline {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 1px 12px;
  font: inherit;
  color: var(--af-fg);
}
.af-cline:hover { background: var(--af-shell); }
.af-cline.band { background: rgba(107, 92, 231, 0.11); border-left: 2.5px solid #6b5ce7; }
.af-ln { width: 28px; color: var(--af-muted); user-select: none; flex: none; }

/* Embedded Whiteboard (matches whiteboard.webp!) */
.af-embed-board {
  padding: 16px 18px 20px;
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  background: var(--af-sheet);
}
.af-board-badge {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--af-hairline);
  border-radius: 7px;
  font-size: 11px;
  color: var(--af-muted);
  margin-bottom: 10px;
}
.af-embed-board h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.af-wb-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.af-wb-lane-h { font-size: 11px; color: var(--af-muted); margin-bottom: 6px; }
.af-wb-lane-box {
  padding: 10px;
  border: 1px solid var(--af-hairline);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.af-wb-note {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 12px;
  min-height: 54px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  color: #1d1d1f;
  transition: transform 0.15s;
}
.af-wb-note:hover { transform: translateY(-2px); }
.af-wb-after { font-size: 13px; color: var(--af-fg-2); }

/* ==========================================================================
   1:1 Real Bell Popover over Home Cards (matches bell.webp!)
   ========================================================================== */
.af-bell-scene { background: var(--af-sheet); min-height: 360px; display: flex; flex-direction: column; }
.af-bell-topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.af-bell-icons { display: flex; gap: 6px; }
.af-bell-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--af-fg);
}
.af-bell-btn.active { background: var(--af-pill-bg); }
.af-bell-num {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.af-bell-stage { position: relative; flex: 1; min-height: 304px; padding: 8px 16px 24px; }
.af-home-bg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; opacity: 0.72; }
.af-home-card {
  padding: 16px;
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  background: var(--af-sheet);
}
.af-home-card b { display: block; font-size: 15px; font-weight: 700; }
.af-home-card small { font-size: 11px; color: var(--af-muted); }
.af-home-card p { margin-top: 8px; font-size: 11.5px; color: var(--af-fg-2); line-height: 1.5; }
.af-bell-popover {
  position: absolute;
  top: 0;
  right: 14px;
  width: min(310px, calc(100% - 28px));
  padding: 14px;
  border-radius: 16px;
  background: var(--af-card);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16), 0 0 0 1px var(--af-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.af-bell-sec {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--af-muted);
  padding: 2px 4px;
}
.af-bell-row {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 7px 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.14s;
}
.af-bell-row:hover { background: var(--af-shell); }
.af-bell-ic {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--af-shell);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex: none;
}
.af-bell-unread {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}
.af-bell-copy { min-width: 0; flex: 1; }
.af-bell-copy b { display: block; font-size: 12.5px; font-weight: 600; color: var(--af-fg); }
.af-bell-copy small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--af-muted); }
.af-gdot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; }
.af-bell-time { font-size: 10.5px; color: var(--af-muted); white-space: nowrap; }

/* ==========================================================================
   1:1 Real Light/Dark Bauhaus Curtain & Dashed "This Mac" Privacy Card
   ========================================================================== */
.compare-live { position: absolute; inset: 0; font-size: 11px; }
.compare-live img {
  position: static;
  inset: auto;
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.compare-live-light { background: #e7e7e9; color: #1d1d1f; }
.compare-live-dark { background: #2a2a2d; color: #f2f2f5; }
.cl-shell { height: 100%; display: grid; grid-template-columns: 108px minmax(0, 1fr) 124px; }
.cl-side { padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.compare-live-light .cl-side { background: #f1f1f3; }
.compare-live-dark .cl-side { background: #222224; }
.cl-dots { display: flex; gap: 5px; }
.cl-dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.cl-dots i:nth-child(1) { background: #ff5f57; }
.cl-dots i:nth-child(2) { background: #febc2e; }
.cl-dots i:nth-child(3) { background: #28c840; }
.cl-brand { display: flex; align-items: center; gap: 5px; font-family: var(--brand-font); font-weight: 600; font-size: 12px; letter-spacing: -0.03em; margin: 2px 0 4px; }
.cl-item { padding: 4px 7px; border-radius: 6px; font-size: 10px; opacity: 0.72; display: flex; justify-content: space-between; }
.cl-item.on { opacity: 1; font-weight: 600; }
.compare-live-light .cl-item.on { background: #e1e1e5; }
.compare-live-dark .cl-item.on { background: #36363a; }
.cl-stage { padding: 8px 10px; display: flex; flex-direction: column; align-items: center; }
.cl-top-tab { align-self: flex-start; padding: 3px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 600; }
.compare-live-light .cl-top-tab { background: #fff; }
.compare-live-dark .cl-top-tab { background: #1c1c1e; }
.cl-bauhaus { margin: auto; position: relative; display: flex; align-items: center; }
.cl-lp-side { width: 32px; height: 92px; border-radius: 3px; background: #e5e0d5; margin-right: -8px; opacity: 0.85; }
.cl-lp-main { position: relative; z-index: 2; width: 108px; height: 108px; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35); }
.cl-tri { flex: 1; display: grid; grid-template-columns: 1fr 1.3fr 0.9fr; border-bottom: 1.5px solid #d95d39; }
.cl-tri i:nth-child(1) { background: #2d74dc; }
.cl-tri i:nth-child(2) { background: #448d56; }
.cl-tri i:nth-child(3) { background: #c94e2c; }
.cl-lp-foot { padding: 6px 7px; background: #222731; color: #fff; }
.cl-lp-foot b { display: block; font-size: 9.5px; }
.cl-lp-foot small { font-size: 6.5px; opacity: 0.7; }
.cl-lp-disc { width: 42px; height: 96px; border-radius: 0 96px 96px 0; background: #111318; margin-left: -14px; }
.cl-crew { padding: 14px 10px; display: flex; flex-direction: column; gap: 7px; }
.cl-crew b { font-size: 10.5px; }
.cl-pill-dark { width: fit-content; padding: 3px 9px; border-radius: 999px; font-size: 9px; font-weight: 600; }
.compare-live-light .cl-pill-dark { background: #5f6168; color: #fff; }
.compare-live-dark .cl-pill-dark { background: #8e9099; color: #111; }
.cl-crew-box { flex: 1; border-radius: 12px; padding: 9px; display: flex; flex-direction: column; justify-content: space-between; }
.compare-live-light .cl-crew-box { background: #fff; }
.compare-live-dark .cl-crew-box { background: #1c1c1e; }
.cl-crew-box span { font-size: 10px; font-weight: 600; color: #3b82f6; }
.cl-crew-box small { font-size: 9px; opacity: 0.7; }

/* Privacy Card (matches private.webp!) */
.af-priv-card {
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: none;
  background: var(--af-sheet);
  padding: 24px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.af-priv-frame {
  position: relative;
  width: 100%;
  padding: 34px 18px 28px;
  border: 1.5px dashed var(--af-hairline);
  border-radius: 20px;
}
.af-priv-mac {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 0 8px;
  background: var(--af-sheet);
  font-size: 11.5px;
  color: var(--af-muted);
}
.af-table td.mono { white-space: nowrap; }
.af-priv-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: nowrap; }
.af-priv-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; }
.af-priv-ic { font-size: 24px; }
.af-priv-line { width: 26px; height: 1px; background: var(--af-hairline); }
.af-priv-ai-box {
  padding: 14px 22px;
  border: 1px solid var(--af-hairline);
  border-radius: 14px;
  background: var(--af-sheet);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  box-shadow: var(--af-shadow);
}
.af-priv-bot { font-size: 20px; }
.af-local-pill {
  appearance: none;
  cursor: pointer;
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  font-size: 12px;
  font-weight: 500;
}
:root[data-theme="dark"] .af-local-pill { color: #86efac; }

/* Feature Card Micro-Demos */
.feat-art {
  position: relative;
  height: 244px;
  padding: 20px 20px 0;
  overflow: hidden;
  background: radial-gradient(80% 70% at 50% 0%, color-mix(in srgb, var(--fg) 5%, transparent), transparent);
}
.feat-art.tall { height: 274px; }
.mini-win {
  height: 100%;
  border: 1px solid var(--af-hairline);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: var(--af-sheet);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--af-shadow);
}
.af-mini-cm { background: var(--af-shell); }
.af-mini-cm-t { font-weight: 600; color: var(--af-fg); }
.mini-bar {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--af-hairline);
  background: var(--af-shell);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--af-muted);
}
.mini-pills { display: inline-flex; gap: 4px; }
.mini-pills button {
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--af-pill-bg);
  color: var(--af-fg-2);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
}
.mini-pills button.active { background: var(--af-fg); color: var(--af-sheet); }
.mini-dot-live { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.mini-pad { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.mini-stack { justify-content: space-between; }
.mini-skel { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.mini-skel i { display: block; height: 6px; border-radius: 4px; background: var(--af-pill-bg); width: 92%; }
.mini-skel i.w70 { width: 68%; }
.mini-mermaid-pad { justify-content: center; }
.mini-mermaid-svg { width: 100%; height: auto; display: block; }
.mm-edge { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.mm-pulse { fill: var(--accent); animation: spark-twinkle 1.5s ease-in-out infinite; }
.mm-node rect { fill: var(--af-shell); stroke: var(--af-hairline); stroke-width: 1; }
.mm-node.mm-accent rect { fill: var(--accent-soft); stroke: var(--accent); }
.mm-node text { fill: var(--af-fg); font: 500 10.5px var(--mono); text-anchor: middle; }
.mini-math-box { padding: 10px 12px; border: 1px solid var(--af-hairline); border-radius: 9px; background: var(--af-shell); font-family: var(--display); font-size: 15px; text-align: center; }
.mini-code-box { padding: 9px 12px; border: 1px solid var(--af-hairline); border-radius: 9px; background: var(--af-sheet); font-size: 11.5px; line-height: 1.65; color: var(--af-fg-2); }
.shimmer-bar { height: 4px; border-radius: 999px; background: var(--af-pill-bg); overflow: hidden; }
.shimmer-bar i { display: block; width: 45%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6b5ce7, #3b82f6); animation: shimmer-slide 1.8s ease-in-out infinite alternate; }
@keyframes shimmer-slide { from { transform: translateX(-15%); } to { transform: translateX(130%); } }

.live-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translate(-50%, 10px);
  z-index: 30;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--af-fg);
  color: var(--af-sheet);
  font-family: var(--mono);
  font-size: 11.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.live-toast.show { opacity: 1; transform: translate(-50%, 0); }

.af-side-foot-bar {
  margin-top: auto;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--af-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.af-side-utils {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: var(--af-muted);
}
.af-side-foot-bar .af-running-pill { align-self: flex-end; }
.af-doc-thumb {
  width: 24px;
  height: 28px;
  border-radius: 6px;
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  display: grid;
  place-items: center;
  color: var(--af-muted);
  flex: none;
}
.af-col-marks { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.lp-seal {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Radial HTML+SVG Crew Graph (exact match to CrewView.swift) */
.af-crew-canvas {
  position: relative;
  width: 236px;
  height: 196px;
  margin-inline: auto;
}
.af-crew-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cr-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
}
.cr-lbl { font-size: 9.5px; color: var(--af-fg-2); white-space: nowrap; font-weight: 500; }
.cr-lbl.bold { font-weight: 600; color: var(--af-fg); }
.cr-tile {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--af-crew-node);
  border: 1px solid var(--af-hairline);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  color: var(--af-fg-2);
}
.cr-tile.sm { width: 26px; height: 26px; border-radius: 8px; }
.cr-tile.agent { width: 32px; height: 32px; border-radius: 9px; }
.cr-tile.hub { width: 34px; height: 34px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--af-fg); }
.cr-ok {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
}
.cr-grep { left: 29%; top: 21%; }
.cr-read { left: 71%; top: 24%; }
.cr-hub { left: 50%; top: 51%; }
.cr-agent-l { left: 24%; top: 58%; }
.cr-agent-r { left: 76%; top: 58%; }
.cr-edit { left: 23%; top: 82%; }
.cr-bash { left: 73%; top: 84%; }

.af-pill-dark, .af-pill-soft, .af-send-pill, .af-local-pill, .af-al-hd, .af-cm-agent, .af-priv-mac, .af-anchor-chip, .af-cm-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.af-av { display: inline-grid; place-items: center; }
.af-priv-svg { color: var(--af-muted); }
.af-priv-momo { font-family: var(--brand-font); letter-spacing: -0.03em; }

/* Session & Metadata Audit Inspector (#inspector-demo) */
.af-meta-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  margin: 12px 0 10px;
}
.af-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.af-meta-k { color: var(--af-muted); flex: none; }
.af-meta-row code, .af-meta-row span:last-child {
  color: var(--af-fg);
  font-size: 11.5px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.af-resume-box {
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--af-crew-bg);
  border: 1px solid var(--af-hairline);
  margin-bottom: 10px;
}
.af-resume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11.5px;
  color: var(--af-muted);
}
.af-resume-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.af-copy-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--af-hairline);
  border-radius: 999px;
  background: var(--af-sheet);
  color: var(--af-fg);
  font-size: 11px;
  font-weight: 500;
}
.af-copy-btn:hover { background: var(--af-pill-bg); }
.af-resume-cmd {
  display: block;
  font-size: 12px;
  color: var(--af-fg);
  white-space: nowrap;
  overflow-x: auto;
}
.af-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.af-audit-col {
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--af-sheet);
  border: 1px solid var(--af-hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.af-audit-col b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.af-audit-col.ok b { color: #16803d; }
.af-audit-col.no b { color: #c0392b; }
:root[data-theme="dark"] .af-audit-col.ok b { color: #6fd49a; }
:root[data-theme="dark"] .af-audit-col.no b { color: #ff8a7a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .af-audit-col.ok b { color: #6fd49a; }
  :root:not([data-theme="light"]) .af-audit-col.no b { color: #ff8a7a; }
}
.af-audit-col span {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--af-fg-2);
}

@media (max-width: 960px) {
  .af-shell, .af-shell-3col, .af-flow-grid, .af-collector, .af-twocol, .af-wb-lanes, .af-web-cards, .af-audit-grid {
    grid-template-columns: 1fr;
  }
  .af-side { display: none; }
  .af-center-col { padding: 0 8px 8px; }
}

/* Phones: keep the file header, compare card, and privacy diagram crisp on 390px viewports. */
@media (max-width: 520px) {
  .af-sheet-left { min-width: 0; gap: 6px; }
  .af-file-hd { min-width: 0; }
  .af-file-hd small { display: none; }
  .af-sheet-right { gap: 6px; }
  .af-mode-pill span { padding: 3px 7px; }
  .compare-stage { aspect-ratio: auto; min-height: 228px; }
  .cl-shell { grid-template-columns: 78px minmax(0, 1fr) 82px; }
  .cl-side { padding: 8px 6px; gap: 4px; }
  .cl-brand { font-size: 10.5px; }
  .cl-item { font-size: 8.5px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cl-top-tab { font-size: 8.5px; padding: 2px 7px; white-space: nowrap; }
  .cl-lp-side { width: 20px; height: 70px; }
  .cl-lp-main { width: 82px; height: 82px; }
  .cl-lp-disc { width: 28px; height: 74px; }
  .cl-crew { padding: 10px 6px; gap: 5px; }
  .cl-crew b { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cl-crew-box { padding: 6px; }
  .cl-crew-box small { font-size: 7.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .af-priv-frame { padding: 26px 10px 20px; }
  .af-priv-row { gap: 6px; }
  .af-priv-line { width: 14px; flex: none; }
  .af-priv-item { font-size: 11px; }
  .af-priv-ai-box { padding: 10px 12px; font-size: 11px; }
}
