/* Soft Orbit: a calm, dark home for personal memory. */
:root {
  color-scheme: dark;
  --background: #19161f;
  --surface: #282230;
  --surface-raised: #332b3d;
  --text: #faf5fd;
  --muted: #c5b9cf;
  --accent: #cba8f2;
  --peach: #f3b9a6;
  --button-text: #261a32;
  --border: #574b63;
  --input-border: #92839e;
  --notice: #392f45;
  --danger: #ffb4b9;
  --danger-text: #40191f;
  --focus: #f3c9a7;
  --radius: 1.25rem;
  --space: 1.25rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--background); color: var(--text); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
header, footer { background: var(--surface); }
.header-inner, main, footer {
  width: min(100%, 68rem);
  margin-inline: auto;
  padding: 1.25rem;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
nav form { margin: 0; }
main { min-height: 65vh; padding-block: 2rem 3rem; }
footer { padding-block: 1.5rem; border-top: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.2rem; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.15em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, main:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin-top: 0; max-width: 26ch; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p, li { max-width: 75ch; }
.intro { font-size: 1.2rem; }
.eyebrow, .hint { color: var(--muted); }
.eyebrow { font-weight: 650; }
.card { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-block: 1rem; min-width: 0; }
.card > :first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: var(--space); }
.manual-setup summary { cursor: pointer; font-weight: 650; }
.manual-setup[open] summary { margin-bottom: 1rem; }
.steps { padding-left: 1.5rem; }
.steps li { padding-left: 0.5rem; margin-block: 1.25rem; }
.notice { padding: 1rem; background: var(--notice); border: 1px solid var(--border); border-radius: var(--radius); }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  max-width: 100%;
  font: inherit;
  font-weight: 650;
  padding: 0.55rem 1rem;
  color: var(--button-text);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.providers { list-style: none; margin: 1.5rem 0 0.5rem; padding: 0; display: grid; gap: 0.75rem; max-width: 24rem; }
.providers .button { display: flex; width: 100%; }
.divider { margin-block: 1rem 0.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.actions form { margin: 0; }
.danger { background: var(--danger); color: var(--danger-text); border-color: var(--danger); }
.link-button { background: none; border: none; color: var(--accent); padding: 0; font-weight: 400; text-decoration: underline; text-underline-offset: 0.2em; }
label { display: block; font-weight: 650; margin-block: 0.75rem 0.4rem; }
input[type="text"], input[type="email"], textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--input-border);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font: inherit;
  margin-bottom: 1rem;
}
textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9rem; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-panel { margin-block: 1rem; min-width: 0; }
.copy-status { color: var(--muted); padding-inline: 0.5rem; }
.hint { font-size: 0.9rem; }
dt { font-weight: 650; }
dd { margin-inline: 0; margin-bottom: 0.75rem; }
.memory-text { white-space: pre-wrap; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 1rem; top: -10rem; padding: 0.75rem; background: var(--surface); z-index: 1; }
.skip-link:focus { top: 0.5rem; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.passkey-sign-in { max-width: 24rem; margin-block: 1.5rem 0.5rem; }
.passkey-sign-in button { width: 100%; }
/* The passkey script shows these by setting display; they start hidden. */
.passkey-message { display: none; }
.passkey-list { list-style: none; margin: 1rem 0; padding: 0; }
.passkey-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 0.75rem; border-bottom: 1px solid var(--border); }
.passkey-list form { margin: 0; }

/* Shared shell and page hierarchy. */
body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 100% 0%, #3a293f 0, transparent 45rem),
    radial-gradient(ellipse at 0% 90%, #302337 0, transparent 40rem);
}
.site-header, main, .site-footer { width: min(100% - 4rem, 80rem); margin-inline: auto; }
.site-header { padding-top: 2rem; position: relative; z-index: 2; background: transparent; }
.header-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space);
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--surface);
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; width: fit-content; color: var(--text); font-weight: 700; font-size: 1.65rem; letter-spacing: -0.05em; text-decoration: none; }
.brand-mark { width: 2.3rem; height: 2.3rem; color: var(--peach); flex-shrink: 0; }
.primary-nav { gap: 0.4rem; justify-content: center; }
.primary-nav a { color: var(--muted); font-weight: 600; text-decoration: none; padding: 0.55rem 1rem; border-radius: 2rem; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); background: #51405f; }
.account-menu { justify-self: end; position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; list-style: none; min-height: 2.75rem; font-weight: 600; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary::after { content: "⌄"; color: var(--muted); padding-inline: 0.15rem; }
.account-avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: var(--button-text); background: var(--peach); }
.account-menu nav { position: absolute; top: calc(100% + 1rem); right: 0; width: 15rem; padding: 0.6rem; display: grid; gap: 0.1rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface-raised); box-shadow: 0 1rem 3rem #100c1980; }
.account-menu nav a, .account-menu nav button { display: block; width: 100%; text-align: left; padding: 0.6rem 0.8rem; border-radius: 0.6rem; color: var(--text); text-decoration: none; }
.account-menu nav a:hover, .account-menu nav a[aria-current="page"], .account-menu nav button:hover { background: #51405f; }
.account-menu .link-button { min-height: 2.75rem; font: inherit; }
.sign-in-link { justify-self: end; grid-column: 3; }
main { padding: 3rem 0 4rem; position: relative; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2rem; background: transparent; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
summary:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.035em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.75rem); margin: 0 0 1rem; max-width: 27ch; font-weight: 700; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
.intro { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); margin-top: 0; }
.eyebrow { font-size: 0.85rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.75rem; }
.card { padding: clamp(1.25rem, 2.6vw, 2rem); margin-block: 1.25rem; }
.card > :last-child { margin-bottom: 0; }
.cards > .card { margin: 0; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space); align-items: start; margin-top: 2rem; }
.dashboard > * { min-width: 0; }
.dashboard .card { margin: 0 0 var(--space); }
.memory-welcome { background: linear-gradient(135deg, #382c45, var(--surface)); }
.feature-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: #4a385d; color: var(--accent); font-size: 1.65rem; margin-bottom: 1.5rem; }
.feature-icon.peach { color: var(--peach); background: #49353d; }
.link-list { list-style: none; padding: 0; margin-bottom: 0; }
.link-list li { border-top: 1px solid var(--border); }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; color: var(--text); text-decoration: none; }
.link-list a::after { content: "↗"; color: var(--accent); flex-shrink: 0; }
.link-list a:hover { color: var(--accent); }
.connection-labels { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 1.25rem; }
.connection-labels span { padding: 0.3rem 0.75rem; border: 1px solid var(--border); border-radius: 2rem; color: var(--muted); font-size: 0.9rem; }
.account-state { background: #26212d; }
.account-state h2 { font-size: 1.1rem; }
.manual-setup section { padding-block: 1rem; border-top: 1px solid var(--border); }
.notice { padding: 1rem 1.25rem; border-color: var(--input-border); border-radius: 1rem; }
button, .button { gap: 0.5rem; padding: 0.65rem 1.25rem; border-radius: 0.95rem; }
button:hover, .button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.65; cursor: wait; }
.secondary { color: var(--accent); border-color: var(--input-border); }
.memory-text { font-size: 1.1rem; }
code { font-size: 0.9em; color: #e0c6f7; }
.key-list { padding-left: 1.25rem; }
.key-list li { padding-block: 0.35rem; }
@media (max-width: 65rem) {
  .header-inner { grid-template-columns: auto 1fr; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .account-menu, .sign-in-link { grid-column: 2; grid-row: 1; }
}
@media (max-width: 46rem) {
  .site-header, main, .site-footer { width: calc(100% - 2rem); }
  .site-header { padding-top: 1rem; }
  .header-inner { padding: 0.85rem 1rem; gap: 0.6rem; border-radius: 1.2rem; }
  .brand { font-size: 1.4rem; }
  .brand-mark { width: 1.9rem; height: 1.9rem; }
  .account-label { font-size: 0.9rem; }
  .primary-nav { justify-content: space-between; gap: 0.1rem; }
  .primary-nav a { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
  main { padding-block: 2rem 3rem; }
  .dashboard { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .site-footer { display: block; }
  .site-footer nav { margin-top: 0.75rem; }
}
@media (forced-colors: active) {
  .primary-nav a[aria-current="page"] { outline: 2px solid Highlight; }
}

/* Four views, one memory library. All content styling is scoped to the browser. */
main.memory-browser { width: min(100% - 4rem, 100rem); max-width: none; color-scheme: dark; padding-top: 1.5rem; }
.memory-browser { --library-surface: #25222e; --library-raised: #302b3a; --library-border: #574e66; --library-text: #faf5fd; --library-muted: #c5bdcf; color: var(--library-text); }
.memory-browser h1 { font-size: clamp(1.8rem, 2.5vw, 2.3rem); margin: 0 0 0.25rem; }
.memory-browser h2 { font-size: 1.3rem; margin: 0; letter-spacing: -0.025em; }
.memory-browser h3 { font-size: 1.05rem; }
.memory-browser p { max-width: none; }
.memory-page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.memory-page-heading p { margin: 0; }
.memory-eyebrow, .detail-eyebrow { color: #c4a2e4; font-size: 0.7rem; letter-spacing: 0.12em; font-weight: 650; }
.memory-page-heading .memory-eyebrow { margin-bottom: 0.7rem; }
.memory-muted { color: var(--library-muted); font-size: 0.88rem; }
.memory-private { color: var(--library-muted); font-size: 0.85rem; white-space: nowrap; padding-bottom: 0.35rem; }
.memory-private span { color: #b6e4c9; margin-right: 0.3rem; }
.memory-view-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.3rem; }
.memory-view-actions { display: flex; align-items: center; gap: 1rem; }
.memory-browser #memory-fullscreen { min-width: 9rem; }
html.memory-fullscreen-open { overflow: hidden; }
main.memory-browser[data-fullscreen="true"] { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100dvh; max-width: none; margin: 0; padding: 1.2rem; overflow: auto; background: var(--background); }
.memory-browser[data-fullscreen="true"] .memory-view-row { position: sticky; top: 0; z-index: 3; padding-block: 0.75rem; background: var(--background); }
.memory-browser[data-fullscreen="true"] .memory-stage { max-height: 65vh; }
.memory-browser[data-fullscreen="true"] .memory-graphic { height: max(28rem, 55vh); }
.memory-browser[data-fullscreen="true"] .memory-detail { top: 5.5rem; }
.memory-view-switch { display: flex; padding: 0.3rem; border: 1px solid var(--library-border); background: #211d29; border-radius: 1rem; gap: 0.25rem; }
.memory-browser button { font: inherit; min-height: 2.75rem; cursor: pointer; }
.memory-view-switch button { background: transparent; color: var(--library-muted); border: 1px solid transparent; border-radius: 0.75rem; padding: 0.6rem 1rem; font-size: 0.88rem; }
.memory-view-switch button span { font-size: 1.05rem; margin-right: 0.35rem; }
.memory-view-switch button[aria-pressed="true"] { color: #fbf5ff; background: #564267; border-color: #a084b6; }
.memory-browser [id] { scroll-margin-top: 1.5rem; }
.memory-filters { display: grid; grid-template-columns: minmax(15rem, 1fr) repeat(3, minmax(8rem, auto)) auto; align-items: end; gap: 0.75rem; margin: 0; }
.memory-filters label { min-width: 0; margin: 0; color: var(--library-muted); font-size: 0.75rem; font-weight: 550; }
.memory-filters input, .memory-filters select { display: block; width: 100%; min-width: 0; margin: 0.4rem 0 0; min-height: 2.9rem; padding: 0.7rem 0.85rem; border: 1px solid #8e819b; background: #231f2b; color: var(--library-text); border-radius: 0.75rem; font: inherit; font-size: 0.9rem; }
.memory-filters input::placeholder { color: #b6aabd; }
.memory-browser .memory-secondary, .memory-browser .memory-graph-tools button { color: var(--library-text); border: 1px solid #8e819b; background: transparent; border-radius: 0.7rem; padding: 0.5rem 0.85rem; font-size: 0.85rem; text-decoration: none; }
.memory-browser .memory-primary { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1rem; background: #cba8f2; color: #261a32; border: 1px solid #cba8f2; border-radius: 0.75rem; text-decoration: none; font-size: 0.9rem; font-weight: 650; }
.memory-browser .memory-text-button { padding: 0.25rem 0.4rem; min-height: 2.5rem; border: none; background: none; color: #dfc5fb; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 0.2em; }
.memory-browser button:disabled { opacity: 0.45; cursor: default; }
.memory-filter-summary { min-height: 3.2rem; display: flex; align-items: center; gap: 1rem; color: var(--library-muted); font-size: 0.8rem; }
.memory-explorer-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem); gap: 1.2rem; align-items: start; }
.memory-explorer-main { min-width: 0; }
.memory-visual, .memory-detail, .memory-list-section { border: 1px solid var(--library-border); border-radius: 1.1rem; background: var(--library-surface); min-width: 0; }
.memory-visual { padding: 1.2rem; }
.memory-breadcrumbs { gap: 0.4rem; min-height: 2.5rem; margin: -0.4rem 0 0.3rem; }
.memory-browser .memory-breadcrumb { background: transparent; padding: 0.3rem; border: none; min-height: 2.75rem; color: var(--library-muted); font-size: 0.85rem; border-radius: 0.3rem; }
.memory-breadcrumb[aria-current="page"] { color: var(--library-text); font-weight: 650; }
.breadcrumb-separator { color: #a28daf; font-size: 0.8rem; }
.memory-scope-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; }
.memory-scope-row h2 { margin-bottom: 0.25rem; }
.memory-graph-tools { display: flex; gap: 0.3rem; }
.memory-browser .memory-graph-tools button { min-width: 2.5rem; padding: 0.35rem 0.6rem; }
.memory-visual > p { margin: 0.5rem 0 0.8rem; font-size: 0.83rem; }
.memory-stage { min-width: 0; min-height: 23rem; max-height: 43rem; overflow: auto; overscroll-behavior: contain; border-radius: 0.75rem; }
.memory-stage:focus-visible { outline: 3px solid var(--focus, #f3c9a7); outline-offset: 4px; }
.memory-stage.is-panning { cursor: grabbing; user-select: none; }
.memory-graphic { display: block; width: 100%; min-width: 620px; height: 28rem; touch-action: pan-y; }
.memory-stage:has(.memory-graphic) { background: #1e1b26; border: 1px solid #55495f; }
.memory-graph-pagination, .memory-list-pagination { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.8rem; }
.memory-graph-pagination:empty { display: none; }
.memory-browser .tone-0 { --topic: #afe8cc; --topic-surface: #29463f; --topic-stroke: #72b69a; }
.memory-browser .tone-1 { --topic: #b7d6fb; --topic-surface: #2c3c54; --topic-stroke: #7fa4d8; }
.memory-browser .tone-2 { --topic: #f4c1ad; --topic-surface: #50392f; --topic-stroke: #d89a7e; }
.memory-browser .tone-3 { --topic: #debefb; --topic-surface: #443153; --topic-stroke: #b28bd4; }
.memory-browser .tone-4 { --topic: #eee0a4; --topic-surface: #494329; --topic-stroke: #bdb173; }
.memory-browser .tone-5 { --topic: #f5bace; --topic-surface: #4f2f42; --topic-stroke: #c48aa4; }
.atlas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: 0.8rem; padding: 0.2rem; }
.memory-stage[data-atlas-zoom="0"] .atlas-grid { zoom: 0.5; }
.memory-stage[data-atlas-zoom="1"] .atlas-grid { zoom: 0.67; }
.memory-stage[data-atlas-zoom="2"] .atlas-grid { zoom: 0.8; }
.memory-stage[data-atlas-zoom="4"] .atlas-grid { zoom: 1.25; }
.memory-stage[data-atlas-zoom="5"] .atlas-grid { zoom: 1.5; }
.memory-stage[data-atlas-zoom="6"] .atlas-grid { zoom: 2; }
.memory-stage[data-atlas-zoom="7"] .atlas-grid { zoom: 2.5; }
.atlas-topic { background: var(--topic-surface); border: 1px solid var(--topic-stroke); border-radius: 0.9rem; padding: 1rem; min-width: 0; }
.memory-browser .atlas-topic-heading { display: flex; align-items: start; flex-direction: column; width: 100%; background: none; border: none; padding: 0; color: var(--library-text); text-align: left; gap: 0.4rem; }
.topic-symbol { font-size: 1.9rem; line-height: 1; color: var(--topic); }
.topic-label { font-size: 1.25rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.topic-count { color: var(--topic); font-size: 2rem; font-weight: 600; letter-spacing: -0.05em; line-height: 1.1; }
.atlas-children { margin-top: 1.1rem; display: grid; gap: 0.45rem; }
.memory-browser .atlas-child { width: 100%; min-height: 2.8rem; display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.65rem; background: #10131d50; border: 1px solid transparent; border-radius: 0.5rem; color: #f9f5fc; font-size: 0.85rem; text-align: left; font-weight: 450; }
.atlas-child:hover, .atlas-child:focus-visible { border-color: var(--topic); }
.child-count { color: var(--topic, var(--library-muted)); font-size: 0.8rem; flex-shrink: 0; }
.memory-browser .atlas-more { background: none; border: none; padding: 0.3rem 0; color: var(--topic); text-align: left; font-size: 0.78rem; }
.topic-snippet { font-size: 0.85rem; color: #f9f5fc; line-height: 1.7; }
.graph-node { cursor: pointer; outline: none; }
.topic-rect, .mind-node, .wheel-segment { fill: var(--topic-surface); stroke: var(--topic-stroke); stroke-width: 1.5; }
.graph-node:hover > .topic-rect, .graph-node:hover > .mind-node, .graph-node:hover > .wheel-segment,
.graph-node:focus-visible > .topic-rect, .graph-node:focus-visible > .mind-node, .graph-node:focus-visible > .wheel-segment,
.graph-node.is-selected > .topic-rect, .graph-node.is-selected > .mind-node, .graph-node.is-selected > .wheel-segment { stroke: #fff6d8; stroke-width: 4; }
.graph-label { fill: #fff9ff; font-size: 21px; font-weight: 650; }
.graph-count { fill: var(--topic); font-size: 30px; font-weight: 600; }
.graph-subtitle { fill: #f0ebf4; font-size: 16px; }
.memory-browser[data-view="mindmap"] .memory-stage { background: #101e30; }
.mindmap-graphic { min-width: 740px; }
.mind-link { stroke: var(--topic-stroke); stroke-width: 2.5; fill: none; }
.mind-node { fill: #192b40; }
.mind-label { fill: #f4f6fd; font-size: 16px; font-weight: 550; }
.mind-count { fill: #c6d4e6; font-size: 14px; }
.mind-toggle { cursor: pointer; }
.mind-toggle circle { fill: #274963; stroke: #badcf4; stroke-width: 1.5; }
.mind-toggle text { fill: #ffffff; font-size: 19px; }
.mind-toggle:focus-visible circle { stroke: #fff6d8; stroke-width: 4; }
.radial-layout { display: grid; grid-template-columns: minmax(500px, 1fr) minmax(140px, 0.4fr); min-width: 720px; align-items: center; }
.radial-layout .memory-graphic { min-width: 500px; }
.wheel-label { fill: #fff9ff; font-size: 21px; font-weight: 600; }
.wheel-count { fill: #fff9ff; font-size: 25px; font-weight: 600; }
.wheel-small { fill: #fff9ff; font-size: 18px; }
.wheel-outer { opacity: 0.9; }
.wheel-center { fill: #221d2c; }
.wheel-center-label { fill: #e1d6eb; font-size: 18px; }
.wheel-total { fill: #fbf6ff; font-size: 34px; font-weight: 650; }
.wheel-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; padding: 0.7rem; }
.memory-browser .wheel-legend-item { color: #fbf6ff; background: var(--topic-surface); border: 1px solid var(--topic-stroke); border-radius: 0.6rem; padding: 0.45rem 0.65rem; text-align: left; display: flex; gap: 0.6rem; justify-content: start; font-size: 0.85rem; }
.wheel-legend-item .child-count { margin-left: auto; }
.legend-dot { color: var(--topic); font-weight: 650; }
.memory-list-section { margin-top: 1rem; padding: 1.2rem; }
.memory-list-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; padding-bottom: 0.75rem; }
.memory-list-heading .memory-muted { font-size: 0.78rem; }
.memory-result-list { display: grid; }
.memory-browser .memory-result { width: 100%; display: flex; justify-content: space-between; align-items: start; gap: 0.85rem; padding: 1rem 0.25rem; text-align: left; background: none; color: var(--library-text); border: none; border-top: 1px solid var(--library-border); border-radius: 0; font-weight: 400; }
.memory-result[aria-pressed="true"] { background: #403349; border-radius: 0.5rem; padding-inline: 0.7rem; }
.memory-result-copy { min-width: 0; display: grid; gap: 0.3rem; }
.memory-result-title { font-size: 0.94rem; font-weight: 600; line-height: 1.5; }
.memory-result-preview { color: var(--library-muted); font-size: 0.8rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.memory-result-meta { display: grid; justify-items: end; gap: 0.45rem; flex-shrink: 0; padding-top: 0.1rem; }
.memory-kind { display: inline-block; padding: 0.2rem 0.55rem; border: 1px solid #a48bb8; border-radius: 2rem; font-size: 0.7rem; color: #e7d4f7; width: fit-content; line-height: 1.5; }
.kind-fact { color: #c3ddfa; border-color: #829ebd; }
.kind-preference { color: #f4d0bb; border-color: #bf9780; }
.kind-decision { color: #c9eddb; border-color: #83ac99; }
.memory-date { color: var(--library-muted); font-size: 0.72rem; }
.memory-detail { position: sticky; top: 1.2rem; padding: 1.5rem; min-height: 25rem; }
.detail-eyebrow { display: block; margin-bottom: 1.5rem; }
.memory-detail .detail-heading { font-size: clamp(1.25rem, 1.7vw, 1.65rem); line-height: 1.3; margin: 1rem 0 1.3rem; overflow-wrap: anywhere; }
.memory-full-text { font-size: 1rem; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 1.4rem; max-height: 30rem; overflow: auto; padding-right: 0.4rem; }
.memory-detail-meta { border-top: 1px solid var(--library-border); padding-block: 1rem; color: var(--library-muted); font-size: 0.8rem; }
.memory-detail-meta p { margin: 0.4rem 0; }
.memory-related { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--library-border); }
.memory-related h3 { margin: 0 0 0.7rem; }
.memory-browser .memory-related-link { width: 100%; background: none; color: #e3c9fc; border: none; border-bottom: 1px solid var(--library-border); border-radius: 0; font-size: 0.82rem; text-align: left; padding: 0.7rem 0; font-weight: 450; justify-content: start; }
.memory-empty { min-height: 22rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.empty-symbol { color: #e1c2fb; font-size: 3rem; }
.memory-load-status { color: var(--library-muted); padding-block: 1rem; }
.memory-browser :is(button, a, input, select, .memory-full-text):focus-visible { outline: 3px solid var(--focus, #f3c9a7); outline-offset: 3px; }
@media (max-width: 75rem) {
  .memory-filters { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, auto)); }
  .memory-search-submit { grid-column: 4; }
  .memory-explorer-layout { grid-template-columns: minmax(0, 1fr) 19rem; }
  .memory-view-actions .memory-muted { display: none; }
}
@media (max-width: 62.5rem) {
  .memory-explorer-layout { grid-template-columns: minmax(0, 1fr); }
  .memory-detail { position: static; min-height: 12rem; }
  .memory-page-heading { align-items: start; }
  .memory-private { display: none; }
}
@media (max-width: 46rem) {
  main.memory-browser { width: calc(100% - 2rem); }
  .memory-page-heading { margin-bottom: 1.3rem; }
  .memory-eyebrow { font-size: 0.6rem; letter-spacing: 0.08em; }
  .memory-view-row { display: block; }
  .memory-view-actions { justify-content: end; margin-top: 0.5rem; }
  .memory-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-view-switch button { padding: 0.65rem 0.3rem; font-size: 0.82rem; }
  .memory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .memory-filters .memory-search { grid-column: 1 / -1; }
  .memory-search-submit { grid-column: auto; }
  .memory-visual, .memory-list-section { padding: 0.8rem; }
  .memory-stage { max-height: 32rem; }
  .memory-scope-row { gap: 0.5rem; }
  .memory-scope-row h2 { font-size: 1.1rem; }
  .memory-graph-tools { gap: 0.2rem; }
  .memory-browser .memory-graph-tools button { min-width: 2.3rem; padding-inline: 0.35rem; }
  .memory-breadcrumbs { gap: 0.2rem; }
  .atlas-grid { grid-template-columns: minmax(0, 1fr); }
  .memory-result { flex-direction: column; }
  .memory-result-meta { display: flex; align-items: center; }
  .memory-graph-pagination, .memory-list-pagination { flex-wrap: wrap; }
  .memory-graph-pagination .memory-muted, .memory-list-pagination .memory-muted { order: -1; flex-basis: 100%; text-align: center; }
  .memory-detail { padding: 1.1rem; }
}
@media (forced-colors: active) {
  .graph-node > rect, .graph-node > path, .mind-toggle circle { stroke: ButtonText; fill: Canvas; }
  .memory-graphic text { fill: CanvasText; }
  .mind-link { stroke: CanvasText; }
  .memory-view-switch button[aria-pressed="true"], .atlas-child:focus-visible { outline: 2px solid Highlight; }
}
