:root {
  color-scheme:dark;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#000000;
  color:#ece8e0;
  font-synthesis:none;
  --muted:#b4aea2;
  --line:#f2640057;
  --panel:#050505;
  --accent:#ff9830;
  --sage:#b4aea2;
  --instrument:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  overscroll-behavior:none;
  -webkit-tap-highlight-color:transparent;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
button,input {
  font:inherit;
}
button {
  min-width:44px;
  min-height:44px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0b0a09;
  color:#ece8e0;
  padding:9px 14px;
  cursor:pointer;
}
button:hover {
  background:#241104;
  border-color:#f2640099;
}
button:disabled {
  opacity:.4;
  cursor:default;
}
button:focus-visible,input:focus-visible,a:focus-visible {
  outline:2px solid #ff9830;
  outline-offset:3px;
}
button.active,button[aria-pressed=true],button.selected {
  background:#241104;
  border-color:#f26400;
}
input {
  min-height:46px;
  padding:10px 14px;
  border:1px solid #f2640099;
  border-radius:9px;
  background:#000000;
  color:#ff9830;
  font-size:16px;
  min-width:0;
}
h1,h2,h3,p {
  margin-top:0;
}
h1 {
  font-family:Georgia,serif;
  font-weight:400;
  letter-spacing:-.04em;
}
h2 {
  font-size:1.18rem;
  font-weight:550;
}
h3 {
  font-size:1rem;
  color:#b4aea2;
  margin-top:26px;
}
.eyebrow {
  font-family:var(--instrument);
  font-size:10px;
  letter-spacing:.19em;
  color:#b4aea2;
}
.atlas {
  height:100dvh;
  width:100%;
  min-width:0;
  padding-top:env(safe-area-inset-top);
  padding-left:env(safe-area-inset-left);
  padding-right:env(safe-area-inset-right);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
header {
  display:flex;
  flex-shrink:0;
  min-width:0;
  gap:16px;
  align-items:center;
  padding:16px 24px;
  border-bottom:1px solid var(--line);
  background:#000000f2;
}
.brand {
  min-width:180px;
}
.brand h1 {
  font-size:32px;
  line-height:1;
  margin:5px 0 0;
}
.search {
  flex:1;
  max-width:680px;
}
.search input {
  width:100%;
}
.neighborhoods {
  display:flex;
  gap:8px;
  padding:12px 24px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  flex-shrink:0;
  border-bottom:1px solid var(--line);
  background:#000000b8;
}
.neighborhoods::-webkit-scrollbar {
  display:none;
}
/* Buttons carry a 44px minimum width, which replaces the flex automatic minimum: without this the
   chips shrink to fit the row and their labels run into each other on phones. The row scrolls instead. */
.neighborhoods button {
  flex-shrink:0;
  white-space:nowrap;
  background:transparent;
  font-size:13px;
  border-color:transparent;
}
.neighborhoods button:hover {
  background:#241104;
  border-color:#f2640099;
}
.neighborhoods button.active {
  color:#ff9830;
  background:#241104;
  border-color:#f2640099;
}
.count {
  margin-left:10px;
  font-size:11px;
  color:#b4aea2;
  font-variant-numeric:tabular-nums;
  font-family:var(--instrument);
}
.workspace {
  position:relative;
  flex:1;
  min-height:0;
  min-width:0;
  display:flex;
}
.universe {
  position:relative;
  flex:1;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:#000000;
}
.universe canvas {
  width:100%;
  height:100%;
  display:block;
  touch-action:none;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
.specimen-mark {
  position:absolute;
  z-index:1;
  top:20px;
  left:24px;
  padding:7px 0 0 10px;
  pointer-events:none;
  user-select:none;
  color:#b4aea2;
  font-family:var(--instrument);
  font-size:10px;
  font-weight:400;
  line-height:1.8;
  letter-spacing:.14em;
}
.specimen-mark::before {
  position:absolute;
  content:"";
  top:0;
  left:0;
  width:17px;
  height:17px;
  border-top:1px solid #f2640070;
  border-left:1px solid #f2640070;
}
.specimen-mark span,.specimen-mark small {
  display:block;
}
.specimen-mark small {
  color:#807a70;
  font-size:10px;
  letter-spacing:.03em;
}
.labels {
  position:absolute;
  inset:0;
  pointer-events:none;
}
.labels button {
  position:absolute;
  pointer-events:auto;
}
/* The brain's words in his console board's language (Fwaz, 2026-11-20): black title cards with small condensed
   white serif type; red only for the open note and its links. A note's title hangs centred under its cross, and a
   folder's card is centred on the end of its branch. */
.star-label {
  transform:translate(-50%,10px);
  max-width:170px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-height:36px;
  padding:5px 9px;
  border:0;
  border-radius:0;
  background:#000000c7;
  box-shadow:none;
  text-align:center;
  color:#ff9830;
  font-family:"Times New Roman",Times,serif;
  font-size:14px;
  font-weight:400;
  letter-spacing:.01em;
}
.hub {
  display:inline-flex;
  align-items:center;
  transform:translate(-50%,-50%);
  min-height:36px;
  padding:4px 10px 3px;
  border:1px solid #ff9830b8;
  border-radius:0;
  background:#000000eb;
  text-shadow:none;
  white-space:nowrap;
  color:#ff9830;
  font-family:"Times New Roman",Times,serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.hub .count {
  margin-left:8px;
  color:#ec1c48;
  font-size:10px;
  font-weight:400;
  letter-spacing:.02em;
}
.hub:hover {
  background:#000000;
  border-color:#ff9830;
}
.star-label:hover {
  background:#000000e6;
}
.hub.selected,.star-label.selected {
  color:#ece8e0;
  background:#000000;
  box-shadow:inset 0 -2px 0 #ec1c48;
}
.map-caption {
  position:absolute;
  bottom:78px;
  left:24px;
  right:20px;
  pointer-events:none;
  color:#b4aea2;
  font-size:12px;
  line-height:1.7;
}
.map-caption small {
  display:block;
  color:#807a70;
  font-size:10px;
}
.map-controls {
  position:absolute;
  bottom:20px;
  left:24px;
  right:16px;
  display:flex;
  flex-wrap:wrap;
  max-width:calc(100% - 48px);
  flex-wrap:wrap;
  gap:6px;
}
.map-controls button {
  flex:0 0 auto;
  min-width:44px;
  min-height:44px;
  background:#0b0a09ed;
  font-size:12px;
}
.navigator {
  width:300px;
  min-width:0;
  min-height:0;
  flex-shrink:0;
  display:flex;
  flex-direction:column;
  background:#000000e8;
  backdrop-filter:blur(16px);
  border-left:1px solid var(--line);
  padding:20px 16px;
  overflow:hidden;
}
.section-heading {
  flex-shrink:0;
  display:flex;
  justify-content:space-between;
  align-items:baseline;
}
.section-heading span {
  font-size:12px;
  color:var(--muted);
}
.hop-controls {
  flex-shrink:0;
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  align-items:center;
  margin-bottom:16px;
}
.hop-controls>span {
  width:100%;
  font-size:11px;
  color:var(--muted);
  margin-bottom:3px;
}
.hop-controls button {
  font-size:11px;
  padding:7px 12px;
}
.note-list {
  flex:1;
  min-height:0;
  min-width:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  list-style:none;
  padding:0;
  margin:0;
  align-content:start;
}
.note-list li {
  min-width:0;
}
.note-list li+li {
  margin-top:7px;
}
.note-list button {
  width:100%;
  min-width:0;
  overflow-wrap:anywhere;
  text-align:left;
  background:#0b0a09;
  padding:13px;
  border:1px solid #f2640057;
}
.note-list button:hover {
  background:#0b0a09;
  border-color:#f2640099;
}
.note-list button.selected {
  background:#241104;
  border-color:#f26400;
}
.note-list button>span {
  display:block;
  font-size:13px;
  line-height:1.5;
}
.note-list small {
  display:block;
  color:#b4aea2;
  font-size:10px;
  margin-top:5px;
}
.note-list p {
  font-size:12px;
  line-height:1.6;
  color:#b4aea2;
  margin:8px 0 0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.pagination {
  flex-shrink:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  margin-top:18px;
}
.pagination button {
  font-size:11px;
  padding:8px;
}
.pagination span {
  font-size:11px;
  color:var(--muted);
}
.empty {
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
}
.preview {
  position:absolute;
  z-index:10;
  right:0;
  top:0;
  bottom:0;
  width:clamp(420px,45vw,660px);
  max-width:100%;
  background:#0b0a09f2;
  backdrop-filter:blur(16px);
  border-left:1px solid #f2640099;
  overflow-y:auto;
  overscroll-behavior:contain;
  box-shadow:-24px 0 80px #00000066;
}
.preview.expanded {
  width:min(900px,85vw);
}
.preview-tools {
  position:sticky;
  top:0;
  background:#0b0a09f2;
  backdrop-filter:blur(16px);
  padding:12px 20px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  z-index:1;
  border-bottom:1px solid var(--line);
}
.preview article {
  padding:28px 30px 80px;
}
.preview h2 {
  font-family:Georgia,serif;
  font-size:30px;
  font-weight:400;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.metadata {
  font-family:var(--instrument);
  font-size:11px;
  color:var(--muted);
  line-height:1.6;
}
.sources {
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
  padding-left:20px;
  overflow-wrap:anywhere;
}
.markdown {
  line-height:1.8;
  font-size:15px;
  overflow-wrap:anywhere;
}
.markdown h1 {
  font-size:26px;
}
.markdown h2 {
  font-size:23px;
}
.markdown a {
  color:#ff9830;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.markdown pre {
  overflow:auto;
  background:#000000;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
}
.markdown code {
  font-size:12px;
}
.markdown table {
  display:block;
  overflow:auto;
  border-collapse:collapse;
  font-size:13px;
}
.markdown td,.markdown th {
  border:1px solid #f2640099;
  padding:8px 12px;
}
.markdown blockquote {
  margin:16px 0;
  border-left:2px solid #f26400;
  padding:0 18px;
  color:#b4aea2;
}
.relationships {
  list-style:none;
  padding:0;
}
.relationships button {
  width:100%;
  margin-bottom:6px;
  text-align:left;
  font-size:13px;
}
.list-mode {
  display:none;
}
.navigator.full {
  width:100%;
  border:0;
  padding:24px max(24px,calc((100% - 940px)/2));
}
.navigator.full .note-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.navigator.full .note-list li {
  margin:0;
}
.navigator.full .note-list button {
  height:100%;
}
footer {
  flex-shrink:0;
  font-size:10px;
  letter-spacing:.03em;
  color:#b4aea2;
  background:#000000;
  border-top:1px solid var(--line);
  padding:8px 24px calc(8px + env(safe-area-inset-bottom));
}
.login {
  max-width:440px;
  margin:14vh auto;
  padding:32px;
}
.login h1 {
  font-size:76px;
  margin:16px 0;
}
.login p {
  color:var(--muted);
  line-height:1.6;
}
.login form {
  display:grid;
  gap:14px;
  margin-top:32px;
}
.login label {
  font-size:13px;
}
.login button {
  margin-top:8px;
  background:#241104;
  color:#807a70;
}
.login [role=alert] {
  font-size:13px;
  color:#b4aea2;
}
.loading {
  padding:20vh 20px;
  text-align:center;
  color:var(--muted);
}
.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:900px) {
  header {
    gap:10px;
    padding:12px 16px;
  }
  .brand {
    min-width:100px;
  }
  .brand .eyebrow {
    display:none;
  }
  .navigator {
    width:240px;
  }
  .map-caption {
    display:none;
  }
  .preview {
    width:min(620px,90vw);
  }
}
@media(max-width:650px) {
  .specimen-mark {
    top:12px;
    left:12px;
  }
  header {
    flex-wrap:wrap;
    padding:10px 12px;
    gap:8px;
  }
  .brand {
    flex:1;
  }
  .brand h1 {
    font-size:28px;
  }
  .search {
    order:4;
    flex-basis:100%;
    max-width:none;
  }
  header button {
    font-size:12px;
    padding:8px 12px;
  }
  .neighborhoods {
    padding:8px 12px;
    gap:5px;
  }
  .neighborhoods button {
    font-size:11px;
    padding:8px;
  }
  .workspace {
    display:flex;
    flex-direction:column;
  }
  .universe {
    min-height:calc(132px + env(safe-area-inset-bottom));
    flex:1 1 0;
  }
  .navigator {
    width:100%;
    height:auto;
    flex:0 1 clamp(148px,34%,180px);
    max-height:calc(100% - 132px - env(safe-area-inset-bottom));
    padding:12px;
    border-left:0;
    border-top:1px solid var(--line);
  }
  .navigator .section-heading,.navigator .hop-controls {
    display:none;
  }
  .note-list {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  .note-list li+li {
    margin:0;
  }
  .note-list button {
    padding:8px;
    min-height:62px;
  }
  .note-list button>span {
    font-size:12px;
  }
  .note-list small {
    font-size:9px;
  }
  .note-list p {
    display:none;
  }
  .pagination {
    margin-top:8px;
  }
  .map-controls {
    bottom:max(10px,env(safe-area-inset-bottom));
    left:10px;
    max-width:calc(100% - 20px);
    right:10px;
    gap:4px;
  }
  .map-controls button {
    padding:6px 10px;
  }
  .star-label {
    font-size:14px;
    max-width:150px;
  }
  .hub {
    font-size:12px;
    padding:4px 8px 3px;
  }
  .preview {
    top:auto;
    bottom:0;
    width:100%;
    height:65%;
    border-left:0;
    border-top:1px solid #f2640099;
    border-radius:16px 16px 0 0;
  }
  .preview.expanded {
    width:100%;
    height:100%;
    border-radius:0;
  }
  .preview article {
    padding:22px 20px calc(40px + env(safe-area-inset-bottom));
  }
  .preview h2 {
    font-size:27px;
  }
  .preview-tools {
    padding:8px 12px;
  }
  .navigator.full {
    flex:1 1 0;
    height:auto;
    max-height:none;
    padding:16px;
  }
  .navigator.full .section-heading,.navigator.full .hop-controls {
    display:flex;
  }
  .navigator.full .note-list {
    grid-template-columns:minmax(0,1fr);
  }
  .navigator.full .note-list p {
    display:-webkit-box;
  }
  .navigator.full .note-list button {
    padding:14px;
  }
  footer {
    padding:6px 12px calc(6px + env(safe-area-inset-bottom));
    font-size:9px;
  }
  .login {
    margin:9vh auto;
  }
}
/* Short viewports may scroll the shell. Controls retain their full touch size. */
@media(max-height:650px) {
  .atlas {
    overflow-y:auto;
    overscroll-behavior-y:contain;
  }
  .workspace {
    flex:1 0 248px;
    min-height:248px;
  }
  .navigator.full {
    padding:12px;
  }
  .navigator.full .hop-controls {
    margin-bottom:8px;
  }
  .navigator.full .hop-controls>span {
    width:auto;
    margin:0;
  }
}
@media(max-width:650px) and (max-height:650px) {
  .workspace {
    flex-basis:calc(280px + env(safe-area-inset-bottom));
    min-height:calc(280px + env(safe-area-inset-bottom));
  }
}
@media(max-height:500px) and (orientation:landscape) {
  header {
    padding:6px 12px;
  }
  .brand h1 {
    font-size:24px;
  }
  .neighborhoods {
    padding:5px 12px;
  }
  .map-caption {
    display:none;
  }
  .preview article {
    padding:16px 16px calc(24px + env(safe-area-inset-bottom));
  }
  .star-label {
    font-size:11px;
  }
}
/* Wide landscape keeps the side preview. Narrow screens retain the bottom sheet. */
@media(min-width:651px) and (max-height:500px) and (orientation:landscape) {
  .navigator:not(.full) {
    width:230px;
    padding:12px;
  }
  .navigator:not(.full) .section-heading,.navigator:not(.full) .hop-controls {
    display:none;
  }
  .preview {
    width:65vw;
  }
  .preview.expanded {
    width:90vw;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important;
  }
}

/* The journal stays mounted while hidden so a workspace switch keeps drafts. */
.atlas [hidden] { display:none!important; }
.atlas.journal-open { overflow:hidden; }
.journal-workspace {
  flex:1;
  min-height:0;
  min-width:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:28px max(24px,calc((100% - 1380px)/2)) calc(24px + env(safe-area-inset-bottom));
  background:radial-gradient(ellipse at 85% 0,#24110455,transparent 65%),#000000;
  scrollbar-gutter:stable;
}
.journal-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}
.journal-heading h2 {
  font:400 clamp(23px,3vw,34px)/1.25 Georgia,serif;
  letter-spacing:-.025em;
  margin:8px 0 10px;
}
.journal-heading p:last-child { margin:0; color:#b4aea2; font-size:14px; line-height:1.65; }
.journal-heading>button { flex-shrink:0; }
.journal-feedback { font-size:14px; line-height:1.65; }
.journal-feedback p { margin:12px 0; }
.journal-feedback p:empty { display:none; }
.journal-error { color:#ece8e0; line-height:1.65; }
.journal-columns { display:grid; grid-template-columns:260px minmax(0,1fr); gap:28px; margin-top:24px; align-items:start; }
.journal-master { position:sticky; top:0; min-width:0; padding:0 18px 20px 0; border-right:1px solid var(--line); }
.journal-master-heading { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.journal-master-heading h3 { margin:0; font-size:14px; }
.journal-master-heading button { font-size:12px; padding:8px 10px; }
.journal-master ul { list-style:none; padding:0; margin:0; display:grid; gap:8px; max-height:60dvh; overflow-y:auto; }
.journal-master li { min-width:0; }
.journal-master li button { display:block; width:100%; text-align:left; padding:14px; overflow-wrap:anywhere; }
.journal-master li span { display:block; font-size:14px; line-height:1.5; }
.journal-master li small { display:block; font-size:11px; line-height:1.6; color:#b4aea2; margin-top:5px; }
.journal-detail { min-width:0; max-width:900px; padding-bottom:20px; }
.journal-detail-heading { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; margin-bottom:16px; }
.journal-detail-heading h3 { margin:0; font:400 28px/1.3 Georgia,serif; color:#ff9830; overflow-wrap:anywhere; }
.journal-detail-heading .eyebrow { margin-bottom:8px; }
.journal-detail-heading button { flex-shrink:0; font-size:13px; }
.journal-muted,.journal-privacy { font-size:13px; color:#b4aea2; line-height:1.7; }
.journal-privacy { border-top:1px solid var(--line); padding-top:16px; margin:24px 0 0; }
.journal-empty { max-width:720px; padding:30px 24px; border:1px solid #f2640099; border-radius:12px; background:#0b0a0999; }
.journal-empty h3 { font:400 26px/1.3 Georgia,serif; color:#ece8e0; margin:18px 0; }
.journal-empty p { line-height:1.8; color:#b4aea2; }
.journal-seal { display:inline-block; font:11px var(--instrument); color:#ff9830; letter-spacing:.13em; border-bottom:1px solid #f26400; padding-bottom:10px; }
.journal-retry { margin-top:16px; }
.journal-form fieldset { min-width:0; border:0; padding:0; margin:0; display:grid; gap:20px; }
.journal-form label { display:grid; min-width:0; gap:8px; color:#ece8e0; font-size:14px; line-height:1.5; }
.journal-form input:not([type=checkbox]),.journal-form textarea,.journal-form select {
  width:100%;
  min-width:0;
  min-height:46px;
  padding:11px 13px;
  border:1px solid #f2640099;
  border-radius:8px;
  background:#000000;
  color:#ff9830;
  font-family:inherit;
  font-size:16px;
  line-height:1.6;
}
.journal-form textarea { resize:vertical; }
.journal-form textarea:focus-visible,.journal-form select:focus-visible { outline:2px solid #ff9830; outline-offset:3px; }
.journal-form input::placeholder,.journal-form textarea::placeholder { color:#b4aea2; opacity:1; }
.journal-form fieldset:disabled { opacity:.65; }
.journal-form .journal-primary { justify-self:start; min-width:180px; background:#241104; color:#807a70; border-color:#ff9830; font-weight:600; }
.journal-form .journal-primary:hover { background:#241104; }
.journal-form .journal-connections { display:block; padding:16px; border:1px solid var(--line); border-radius:8px; }
.journal-connections legend { padding:0 6px; font-size:14px; color:#ece8e0; }
.journal-connections>p { margin:10px 0; }
.journal-note-choices { display:grid; gap:4px; max-height:240px; overflow-y:auto; overscroll-behavior:contain; }
.journal-note-choices label { display:flex; gap:10px; min-height:44px; align-items:center; padding:6px 8px; border-radius:4px; overflow-wrap:anywhere; }
.journal-note-choices label:hover { background:#241104; }
.journal-note-choices input[type=checkbox] { flex:0 0 20px; width:20px; height:20px; min-height:20px; margin:0; accent-color:#ff9830; }
.journal-record h4 { margin:24px 0 10px; font-size:14px; font-weight:600; color:#b4aea2; }
.journal-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:16px; line-height:1.8; color:#ece8e0; }
.journal-question { border-left:2px solid #f26400; padding-left:18px; }
.journal-note-links { display:flex; gap:8px; flex-wrap:wrap; }
.journal-note-links button { text-align:left; max-width:100%; overflow-wrap:anywhere; font-size:13px; }
.journal-timeline { margin-top:28px; }
.journal-timeline ol { list-style:none; margin:0; padding:0 0 0 18px; border-left:1px solid #f2640099; }
.journal-timeline li { position:relative; border:1px solid var(--line); padding:18px 20px; margin:12px 0; background:#0b0a09; border-radius:8px; }
.journal-timeline li::before { content:""; position:absolute; left:-23px; top:22px; width:8px; height:8px; border-radius:50%; background:#241104; }
.journal-entry-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; color:#b4aea2; font-size:12px; line-height:1.6; margin-bottom:12px; }
.journal-entry-meta strong { color:#ff9830; font-weight:600; }
.journal-entry-meta time { font-family:var(--instrument); font-size:11px; }
.journal-timeline .journal-text:last-child { margin-bottom:0; }
.journal-source { padding-top:10px; border-top:1px solid var(--line); }
.journal-source>span { font-size:12px; color:#b4aea2; }
.journal-source p { margin:8px 0 0; font-size:14px; }
.journal-outcome { color:#ff9830; font-size:14px; margin:12px 0 0; }
.journal-entry-form { border-top:1px solid #f2640099; margin-top:28px; padding-top:4px; }
.journal-reauth { max-width:580px; border:1px solid #f26400; border-radius:8px; padding:20px; margin:18px 0; display:flex; gap:12px; align-items:flex-end; }
.journal-reauth label { flex:1; }
.journal-reauth button { flex-shrink:0; }
@media(max-width:900px) {
  .journal-workspace { padding:20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .journal-columns { grid-template-columns:210px minmax(0,1fr); gap:20px; }
  .journal-master { padding-right:14px; }
  .journal-detail-heading { flex-wrap:wrap; }
}
@media(max-width:650px),(max-width:950px) and (max-height:500px) {
  .journal-open header { flex-wrap:wrap; }
  .journal-open .brand { flex:1; min-width:60px; }
  .journal-open header button { font-size:12px; padding:8px 10px; }
  .journal-workspace { padding:18px 12px calc(24px + env(safe-area-inset-bottom)); scrollbar-gutter:auto; }
  .journal-heading { align-items:flex-start; flex-wrap:wrap; gap:14px; }
  .journal-heading h2 { font-size:25px; }
  .journal-columns { display:block; margin-top:16px; }
  .journal-master { position:static; border-right:0; border-bottom:1px solid var(--line); padding:0 0 16px; margin-bottom:24px; }
  .journal-master ul { display:flex; overflow-x:auto; max-height:none; padding-bottom:6px; scroll-snap-type:x proximity; }
  .journal-master li { flex:0 0 215px; scroll-snap-align:start; }
  .journal-master li button { height:100%; }
  .journal-master li span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .journal-detail-heading h3 { font-size:26px; }
  .journal-empty { padding:22px 16px; }
  .journal-form fieldset { gap:18px; }
  .journal-timeline ol { padding-left:12px; }
  .journal-timeline li { padding:16px 14px; }
  .journal-timeline li::before { left:-17px; }
  .journal-reauth { display:grid; }
  .journal-form .journal-primary { width:100%; }
}

.atlas-auth-error { flex-shrink:0; margin:0; padding:10px 16px; color:#ece8e0; font-size:14px; background:#0b0a09; }
@media(max-width:650px) { .atlas header .brand { min-width:60px; } }

/* Phone app (2026-11-19, second pass). Fwaz on the first pass: "the experience is AWFUL on mobile ... make it as
   smooth as possible", then "fix the phone design". One idea: an ordinary iPhone app. Three tabs at the bottom
   (Notes, Brain, Journal). Notes is one plain scrolling list, newest first, with no pages; a note opens full screen
   and Back returns to where you were; the brain has the whole screen on its own tab. Gold marks where you are and
   what you can press; everything else stays quiet. Wide screens keep their layout: these parts are hidden there. */
.tabbar,.screen-title,.brain-status,.phone-foot,.preview-tools .back,.preview-tools .in-brain,.journal-back { display:none; }
@media(max-width:650px) {
  :root { --tabbar:calc(50px + env(safe-area-inset-bottom)); --ink:#ece8e0; --quiet:#b4aea2; --hair:#f2640040; --press:#241104; }
  .atlas { padding-bottom:var(--tabbar); background:#000000; }
  .atlas button { touch-action:manipulation; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }

  /* Title and search */
  header { display:block; padding:8px 16px 4px; border-bottom:0; background:transparent; }
  .atlas header .brand, header>button { display:none; }
  .screen-title { display:block; margin:6px 0 10px; color:var(--ink);
    font:700 32px/1.1 -apple-system,BlinkMacSystemFont,"SF Pro Display",system-ui,sans-serif; letter-spacing:-.02em; }
  .search { display:block; max-width:none; margin:0 0 6px; }
  .search input { display:block; width:100%; min-height:40px; padding:8px 12px 8px 36px; border:0; border-radius:11px;
    color:var(--ink); font-size:16px; -webkit-appearance:none; appearance:none;
    background:#0b0a09 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff9830' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E") no-repeat 11px 50%/17px 17px; }
  .search input::placeholder { color:#807a70; opacity:1; }
  .search input:focus-visible { outline:0; box-shadow:0 0 0 2px #ff983088; }
  .tab-brain .search { display:none; }

  /* Areas: one row of pills that scrolls sideways */
  .neighborhoods { padding:6px 16px 10px; gap:8px; background:transparent; border-bottom:1px solid var(--hair);
    -webkit-mask-image:none; mask-image:none; }
  .neighborhoods button { min-height:36px; padding:6px 14px; border:1px solid #f2640057; border-radius:18px; background:#000000;
    color:#ece8e0; font-size:14px; }
  .neighborhoods button:hover { background:#000000; border-color:#f2640057; }
  .neighborhoods button.active,.neighborhoods button.active:hover { background:#0b0a09; border-color:#ff9830; color:#ff9830; }
  .neighborhoods .count { margin-left:8px; color:#807a70; font-size:12px; }
  .neighborhoods button.active .count { color:#ff9830; }
  .neighborhoods button:active { background:var(--press); }

  /* The list (Notes) and the brain (Brain) share the space between the pills and the tab bar */
  .workspace { display:block; position:relative; flex:1 1 auto; min-height:0; }
  .universe { position:absolute; inset:0; min-height:0; }
  .navigator:not(.full) { display:none; }
  .navigator.full { position:absolute; inset:0; display:block; width:auto; height:auto; max-height:none; padding:0 0 12px;
    border:0; background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; overflow-y:auto; overscroll-behavior:contain; }
  .navigator.full .section-heading { display:flex; padding:16px 16px 6px; }
  .navigator .section-heading h2 { margin:0; color:var(--quiet); font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
  .navigator .section-heading span { color:#807a70; font-size:13px; }
  .navigator.full .hop-controls,.navigator .pagination { display:none; }
  .navigator.full .note-list { display:block; overflow:visible; }
  .note-list li+li { margin:0; }
  .note-list button,.navigator.full .note-list button { display:flex; flex-direction:column; gap:3px; width:100%; height:auto; min-height:0;
    padding:13px 16px 14px; border:0; border-bottom:1px solid var(--hair); border-radius:0; background:transparent; text-align:left; }
  .note-list button:hover,.note-list button.selected { background:transparent; border-color:var(--hair); }
  .note-list button:active,.note-list button.selected:active { background:var(--press); }
  .note-list button>span { color:var(--ink); font-size:17px; font-weight:600; line-height:1.3; }
  .navigator.full .note-list p { order:1; display:-webkit-box; margin:0; color:#b4aea2; font-size:15px; line-height:1.4; -webkit-line-clamp:2; }
  .note-list small { order:2; margin-top:3px; color:#807a70; font-size:12px; }
  .empty { padding:28px 16px; font-size:15px; }
  .phone-foot { display:block; padding:28px 16px 6px; text-align:center; }
  .phone-foot button { min-height:44px; padding:10px 22px; border:1px solid #f2640057; border-radius:22px; background:transparent; color:#b4aea2; font-size:15px; }
  .phone-foot button:active { background:var(--press); }
  .phone-foot p { margin:12px 0 0; color:#807a70; font-size:12px; }

  /* The brain: pinch to zoom, drag to move, tap a cell or its name to open the note */
  .specimen-mark,.map-caption { display:none; }
  .labels .star-label { min-height:34px; max-width:150px; padding:5px 8px; border-radius:0; font-size:14px; }
  .labels .star-label:hover { background:#000000c7; }
  .labels .star-label.selected,.labels .star-label.selected:hover { background:#000000; box-shadow:inset 0 -2px 0 #ec1c48; }
  .map-controls { left:auto; right:14px; bottom:14px; max-width:none; }
  .map-controls button { display:none; }
  .map-controls button.reset { display:inline-flex; align-items:center; min-height:38px; padding:7px 16px; border-radius:19px; font-size:14px;
    background:#000000d9; -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
  .brain-status { display:block; position:absolute; top:42%; left:24px; right:24px; margin:0; color:var(--quiet); font-size:15px;
    line-height:1.5; text-align:center; pointer-events:none; }

  /* A note: the whole screen, sliding in from the right. Back returns; the tab bar stays. */
  .preview,.preview.expanded { position:fixed; z-index:40; inset:0 0 var(--tabbar) 0; width:auto; height:auto; max-width:none;
    padding-top:0; border:0; border-radius:0; background:#000000; box-shadow:none;
    -webkit-backdrop-filter:none; backdrop-filter:none; overflow-y:auto; overscroll-behavior:contain;
    animation:atlas-push .32s cubic-bezier(.2,.8,.2,1) both; }
  /* The bar reaches up under the status bar, as iOS navigation bars do. */
  .preview-tools { top:0; justify-content:space-between; align-items:center; padding:calc(2px + env(safe-area-inset-top)) 6px 2px;
    background:#000000f2; border-bottom:1px solid var(--hair); }
  .preview-tools .wide { display:none; }
  .preview-tools .back,.preview-tools .in-brain { display:inline-flex; align-items:center; gap:2px; min-height:44px; padding:8px; border:0;
    background:transparent; color:#ff9830; font-size:17px; }
  .preview-tools .back:hover,.preview-tools .in-brain:hover { background:transparent; }
  .preview-tools .back:active,.preview-tools .in-brain:active { opacity:.55; }
  .preview-tools .in-brain { color:#b4aea2; font-size:15px; }
  .preview-tools .back svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
  .preview article { padding:18px 20px 36px; }
  .preview .eyebrow { font-size:11px; }
  .preview h2 { margin:10px 0 12px; font-size:30px; line-height:1.2; }
  .preview .metadata { font-size:12px; }
  .markdown { font-size:17px; line-height:1.65; }
  .markdown h1 { font-size:24px; }
  .markdown h2 { font-size:21px; }
  .preview h3 { margin:30px 0 4px; color:var(--quiet); font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
  .relationships { margin:0; }
  .relationships button { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:50px; margin:0;
    padding:12px 2px; border:0; border-bottom:1px solid var(--hair); border-radius:0; background:transparent; color:var(--ink);
    font-size:16px; text-align:left; }
  .relationships button::after { content:"›"; margin-left:12px; color:#807a70; font-size:22px; line-height:1; }
  .relationships button:hover { background:transparent; }
  .relationships button:active { background:var(--press); }
  .receipts { margin-top:28px; padding-top:6px; border-top:1px solid var(--hair); }
  .receipts summary { display:flex; align-items:center; min-height:44px; color:var(--quiet); font-size:15px; cursor:pointer; }

  /* The tab bar */
  .tabbar { display:flex; position:fixed; z-index:50; left:0; right:0; bottom:0; height:var(--tabbar); padding:0 6px env(safe-area-inset-bottom);
    border-top:1px solid #f2640057; background:#000000eb; -webkit-backdrop-filter:blur(20px) saturate(140%); backdrop-filter:blur(20px) saturate(140%); }
  .tabbar button { flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; height:50px;
    min-height:0; padding:0; border:0; border-radius:0; background:transparent; color:#807a70; font-size:12px; font-weight:600; letter-spacing:.01em; }
  .tabbar button:hover { background:transparent; }
  .tabbar button:active { opacity:.55; }
  .tabbar button[aria-current=page] { color:#ff9830; }
  .tabbar svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

  /* The status line stays for screen readers only */
  footer { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; padding:0; border:0; }

  /* Journal: the experiments as a list; one opens on its own with Back */
  .journal-workspace { padding:4px 16px 24px; background:transparent; }
  .journal-heading { flex-wrap:nowrap; align-items:center; gap:12px; padding-bottom:12px; }
  .journal-heading .eyebrow,.journal-heading p { display:none; }
  .journal-heading h2 { margin:0; color:var(--quiet); font:400 16px/1.35 -apple-system,BlinkMacSystemFont,system-ui,sans-serif; letter-spacing:0; }
  .journal-heading>button { min-height:40px; padding:8px 14px; border-radius:20px; font-size:15px; }
  .journal-columns { display:block; margin-top:8px; }
  .journal-master { position:static; margin:0; padding:0; border:0; }
  .journal-master-heading h3 { color:var(--quiet); font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
  .journal-master ul { display:block; max-height:none; overflow:visible; padding:0; }
  .journal-master li { flex:none; }
  .journal-master li button { height:auto; padding:14px 2px; border:0; border-bottom:1px solid var(--hair); border-radius:0; background:transparent; }
  .journal-master li button:active { background:var(--press); }
  .journal-master li span { font-size:17px; font-weight:600; }
  .journal-master li small { font-size:12px; }
  .journal-columns.detail-open .journal-master,.journal-columns:not(.detail-open) .journal-detail { display:none; }
  .journal-workspace:has(.detail-open) .journal-heading { display:none; }
  .journal-back { display:inline-flex; align-items:center; min-height:44px; margin:0 0 8px -6px; padding:8px 6px; border:0; background:transparent;
    color:#ff9830; font-size:17px; }
  .journal-back:hover { background:transparent; }
  .journal-back:active { opacity:.55; }
}
@keyframes atlas-push { from { transform:translateX(100%); } to { transform:none; } }

/* ── Console look (Fwaz, 2026-11-20: a study of how old screen consoles were drawn, to make it look like
   that, then "now infuse this style with everything we've worked on in
   style in the past"). The study: ~/.hermes/skills/creative/fwaz-design/references/screen-console.md. Black is the
   screen and light is the ink. Every colour has one job, and the key on the brain names them: orange frames and
   labels things and marks notes, violet and blue are the brain's shape (the Scope's colours), crimson is only the open
   note and its links (the glitch colour), white is only for titles. Corners are
   square. Labels are condensed capitals, numbers and readouts are monospace, titles are a heavy Mincho serif.
   Something active is filled orange with black text, so being on reads as figure and ground, not as a glow. ── */
:root {
  --screen:#000;
  --orange:#ff9830;
  --chrome:#f26400;
  --chrome-dim:#f2640057;
  --orange-dim:#9c5a24;
  --violet:#6a5cf0;
  --red:#ec1c48;
  --title:#fbf8f2;
  --steel:#b4aea2;
  --display:"Hiragino Mincho ProN","Hiragino Mincho Pro","Yu Mincho",YuMincho,"Noto Serif JP","Times New Roman",serif;
  --condensed:"HelveticaNeue-CondensedBold","Helvetica Neue Condensed Bold","Arial Narrow","Roboto Condensed","Helvetica Neue",Arial,sans-serif;
  --instrument:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
  background:var(--screen);
}
body,.atlas { background:var(--screen); }
.atlas *,.login * { border-radius:0 !important; }
:focus-visible { outline:2px solid var(--orange); outline-offset:2px; }

/* Chrome buttons: condensed capitals in a hairline box; on = filled orange, black text. */
header button,.map-controls button,.hop-controls button,.pagination button,.preview-tools button,.phone-foot button,
.journal-heading>button,.journal-back,.login button,.neighborhoods button,.tabbar button {
  font-family:var(--condensed); font-stretch:condensed; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
}
header button,.map-controls button,.hop-controls button,.pagination button,.phone-foot button,.journal-heading>button,.login button {
  border:1px solid var(--chrome-dim); background:#000; color:var(--orange);
}
header button:hover,.map-controls button:hover,.hop-controls button:hover,.pagination button:hover,.journal-heading>button:hover,.login button:hover {
  border-color:var(--orange); background:#000;
}
header button[aria-pressed=true],.map-controls button[aria-pressed=true],.hop-controls button[aria-pressed=true],
header button:active,.map-controls button:active,.hop-controls button:active,.pagination button:active,.login button:active {
  border-color:var(--orange); background:var(--orange); color:#000;
}

/* Header and search */
header { background:var(--screen); border-bottom:1px solid var(--chrome); }
.brand h1,.screen-title,.login h1 { font-family:var(--display); font-weight:700; color:var(--title); letter-spacing:.01em; }
.eyebrow { font-family:var(--instrument); color:var(--orange); letter-spacing:.14em; text-transform:uppercase; }
.search input { border:1px solid var(--chrome-dim); background-color:#000; color:var(--title); font-family:var(--instrument); }
.search input::placeholder { color:var(--orange-dim); letter-spacing:.06em; text-transform:uppercase; opacity:1; }
.search input:focus-visible { outline:0; border-color:var(--orange); box-shadow:none; }

/* Folders: a row of boxed labels; the open one is filled. */
.neighborhoods { background:var(--screen); border-bottom:1px solid var(--chrome-dim); }
.neighborhoods button { border:1px solid var(--chrome-dim); background:#000; color:var(--orange); }
.neighborhoods button:hover { border-color:var(--orange); background:#000; }
.neighborhoods button.active,.neighborhoods button.active:hover { border-color:var(--orange); background:var(--orange); color:#000; }
.neighborhoods .count { font-family:var(--instrument); font-weight:400; color:var(--steel); letter-spacing:0; }
.neighborhoods button.active .count { color:#000; }

/* The brain's screen: a faint green hex grid over the whole view and orange corner marks, both under the labels. */
.labels {
  background:
    linear-gradient(var(--chrome),var(--chrome)) left 12px top 12px/22px 1px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) left 12px top 12px/1px 22px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) right 12px top 12px/22px 1px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) right 12px top 12px/1px 22px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) left 12px bottom 12px/22px 1px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) left 12px bottom 12px/1px 22px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) right 12px bottom 12px/22px 1px no-repeat,
    linear-gradient(var(--chrome),var(--chrome)) right 12px bottom 12px/1px 22px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24.25' height='42' viewBox='0 0 24.25 42'%3E%3Cpath d='M12.12 0L24.25 7L24.25 21L12.12 28L0 21L0 7ZM12.12 28L12.12 42' fill='none' stroke='%236a5cf0' stroke-opacity='.10' stroke-width='1'/%3E%3C/svg%3E") 0 0/24.25px 42px repeat;
}
/* The readout in the top-left corner: key:value lines, as on a status screen. */
.specimen-mark { top:22px; left:26px; padding:0; color:var(--orange); font-family:var(--instrument); font-size:10px; line-height:1.6;
  letter-spacing:.08em; text-transform:uppercase; }
.specimen-mark::before { display:none; }
.specimen-mark small { color:var(--steel); font-size:10px; letter-spacing:.08em; }
/* The title plate: one big word, its translation underneath, on a rule. */
.map-caption { left:26px; right:auto; bottom:78px; padding-top:6px; border-top:2px solid var(--chrome); }
.map-caption span { display:block; color:var(--title); font-family:var(--display); font-size:34px; font-weight:700; line-height:1.05; letter-spacing:.02em; }
.map-caption small { margin-top:4px; color:var(--orange); font-family:var(--condensed); font-stretch:condensed; font-size:11px; font-weight:700; letter-spacing:.14em; }
/* Folder cards: an orange box with the count in a filled cell; on hover the whole card fills. */
.hub { padding:3px 3px 3px 9px; border:1px solid var(--orange); background:#000; color:var(--orange); font-family:var(--condensed);
  font-stretch:condensed; font-size:13px; font-weight:700; letter-spacing:.08em; }
.hub .count { margin-left:9px; padding:2px 4px 1px; background:var(--orange); color:#000; font-family:var(--instrument); font-size:10px; font-weight:700; }
.hub:hover { background:var(--orange); border-color:var(--orange); color:#000; }
.hub:hover .count { background:#000; color:var(--orange); }
/* Note titles: white title type on black; the open note's title is boxed in red. */
.star-label { color:var(--title); font-family:var(--display); font-weight:600; }
.star-label.selected,.star-label.selected:hover { color:#fff; background:#000; box-shadow:inset 0 0 0 1px var(--red); }
.brain-status { color:var(--orange); font-family:var(--instrument); letter-spacing:.08em; text-transform:uppercase; }

/* Lists of notes */
.navigator { background:#000; border-color:var(--chrome-dim); }
.section-heading h2,.navigator .section-heading h2 { color:var(--orange); font-family:var(--condensed); font-stretch:condensed; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; }
.section-heading span,.navigator .section-heading span { color:var(--steel); font-family:var(--instrument); }
.note-list button>span { color:var(--title); font-family:var(--display); font-weight:600; }
.note-list small { color:var(--orange-dim); font-family:var(--instrument); letter-spacing:.06em; text-transform:uppercase; }
.note-list p,.navigator.full .note-list p { color:var(--steel); }
.note-list button.selected { box-shadow:inset 3px 0 0 var(--red); }

/* An open note */
.preview { background:#000; border-color:var(--chrome); }
.preview h2 { color:var(--title); font-family:var(--display); font-weight:700; }
.preview .eyebrow,.preview .metadata { color:var(--orange); font-family:var(--instrument); letter-spacing:.08em; text-transform:uppercase; }
.preview h3 { color:var(--orange); font-family:var(--condensed); font-stretch:condensed; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.preview-tools { background:#000; border-bottom:1px solid var(--chrome-dim); }
.markdown { color:#e6e2da; }
.markdown h1,.markdown h2,.markdown h3,.markdown h4 { color:var(--orange); font-family:var(--condensed); font-stretch:condensed; font-weight:700;
  letter-spacing:.05em; text-transform:uppercase; }
.markdown a { color:var(--orange); text-decoration-color:#f2640080; }
.markdown pre,.markdown code { background:#0b0a09; font-family:var(--instrument); }
.markdown pre { border:1px solid var(--chrome-dim); }
.markdown blockquote { border-left:2px solid var(--chrome); color:var(--steel); }
.markdown th { color:var(--orange); font-family:var(--condensed); font-stretch:condensed; letter-spacing:.06em; text-transform:uppercase; }
.markdown td,.markdown th { border-color:var(--chrome-dim); }

/* Journal */
.journal-heading h2,.journal-detail-heading h3,.journal-empty h3 { color:var(--title); font-family:var(--display); font-weight:700; }
.journal-seal,.journal-entry-meta time { color:var(--orange); font-family:var(--instrument); }

@media(max-width:650px) {
  .atlas,.preview,.preview.expanded { background:#000; }
  .screen-title { font-size:30px; }
  .search input { border:1px solid var(--chrome-dim); background-color:#000; }
  .search input:focus-visible { border-color:var(--orange); box-shadow:none; }
  .neighborhoods button { border:1px solid var(--chrome-dim); background:#000; color:var(--orange); font-size:13px; }
  .neighborhoods button:hover { border-color:var(--chrome-dim); background:#000; }
  .neighborhoods button.active,.neighborhoods button.active:hover { border-color:var(--orange); background:var(--orange); color:#000; }
  .neighborhoods .count { color:var(--steel); }
  .neighborhoods button.active .count { color:#000; }
  .neighborhoods button:active { background:#241104; }
  .navigator .section-heading h2 { color:var(--orange); font-family:var(--condensed); font-stretch:condensed; letter-spacing:.12em; }
  .note-list button>span { color:var(--title); font-family:var(--display); font-weight:600; }
  .note-list small { color:var(--orange-dim); }
  /* The brain tab: the readout on one line at the top. The title plate stays off the phone so the bottom is one slim
     row (Fwaz, 2026-11-21: "The footer is too big on my phone"); the screen title already names the tab. */
  .specimen-mark { display:block; top:12px; left:16px; right:16px; white-space:nowrap; overflow:hidden; font-size:10px; }
  .specimen-mark .code { display:none; }
  .specimen-mark span,.specimen-mark small { display:inline; margin-right:12px; }
  .map-caption { display:none; }
  .labels { background-position:left 8px top 8px,left 8px top 8px,right 8px top 8px,right 8px top 8px,left 8px bottom 8px,left 8px bottom 8px,
    right 8px bottom 8px,right 8px bottom 8px,0 0; }
  .labels .star-label.selected,.labels .star-label.selected:hover { background:#000; box-shadow:inset 0 0 0 1px var(--red); }
  .map-controls button.reset { border:1px solid var(--orange); background:#000; color:var(--orange); -webkit-backdrop-filter:none; backdrop-filter:none;
    font-family:var(--condensed); font-stretch:condensed; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
  .map-controls button.reset:active { background:var(--orange); color:#000; }
  .preview-tools { background:#000; }
  .preview-tools .back,.preview-tools .in-brain { color:var(--orange); }
  .preview h3 { color:var(--orange); }
  .relationships button::after { color:var(--orange); }
  /* The tab bar: a black strip under an orange rule; the open tab is orange. */
  .tabbar { border-top:1px solid var(--chrome); background:#000; -webkit-backdrop-filter:none; backdrop-filter:none; }
  .tabbar button { color:var(--orange-dim); font-size:11px; letter-spacing:.12em; }
  .tabbar button[aria-current=page] { color:var(--orange); }
  .journal-heading>button { border:1px solid var(--chrome-dim); background:#000; color:var(--orange); }
  .journal-back { color:var(--orange); }
}

/* The key: what each colour on the brain means ("there should be a key for everything"). */
.key { position:absolute; z-index:1; top:96px; left:26px; display:grid; gap:3px; margin:0; padding:6px 0 0; border-top:1px solid var(--chrome-dim);
  pointer-events:none; user-select:none; color:var(--steel); font-family:var(--instrument); font-size:10px; line-height:1.5; letter-spacing:.08em;
  text-transform:uppercase; }
.key span { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.key span::before { content:""; flex:0 0 14px; height:1px; background:var(--chrome); }
.key .k-note::before { content:"+"; height:auto; background:none; color:var(--orange); font-size:14px; font-weight:700; line-height:1; text-align:center; }
.key .k-link::before { height:2px; background:var(--red); box-shadow:0 0 4px #ec1c4899; }
.key .k-shape::before { height:2px; background:repeating-linear-gradient(90deg,var(--violet) 0 2px,transparent 2px 4px); }
@media(max-width:650px) {
  .key { top:30px; left:16px; right:16px; display:flex; gap:12px; padding:0; border-top:0; font-size:9px; }
  .key span { gap:5px; }
  .key span::before { flex-basis:10px; }
  .key .k-note::before { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { .key .k-link::before { box-shadow:none; } }

/* Steering the brain on a phone (Fwaz, 2026-11-21: "can you make the 3d map show relationships better, the gui thing
   isn't even visible so it's difficult to navigate"). Zoom in, zoom out and Reset are boxed buttons in a row at the
   bottom right; one line beside them says what a tap does ("The footer is too big on my phone": one 44px row, no
   title plate). A first tap lights a note: its links show on the brain and a card at the bottom names it, with Open
   and Clear; the zoom buttons move up over the card. The wide layout keeps its own controls and opens a note beside
   the brain, so these parts are hidden there. `state::chrome` mirrors these boxes. */
.brain-hint,.pick { display:none; }
@media(max-width:650px) {
  .map-controls { left:auto; right:12px; bottom:12px; flex-wrap:nowrap; gap:8px; max-width:none; }
  .map-controls button.zoom,.map-controls button.reset { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
    min-width:44px; min-height:44px; padding:0 14px; border:1px solid var(--orange); background:#000; color:var(--orange);
    -webkit-backdrop-filter:none; backdrop-filter:none; font-family:var(--condensed); font-stretch:condensed; font-size:14px;
    font-weight:700; line-height:1; letter-spacing:.08em; text-transform:uppercase; }
  .map-controls button.zoom { width:44px; padding:0; font-family:var(--instrument); font-size:22px; font-weight:400; letter-spacing:0; }
  .map-controls button.zoom:active,.map-controls button.reset:active { background:var(--orange); color:#000; }
  .brain-hint { display:flex; align-items:center; position:absolute; z-index:1; left:16px; bottom:12px; height:44px;
    max-width:calc(100% - 232px); margin:0; pointer-events:none; color:var(--orange);
    font-family:var(--instrument); font-size:10px; line-height:1.4; letter-spacing:.1em; text-transform:uppercase; }
  .universe.picking .brain-hint,.universe.picking .map-caption { display:none; }
  .universe.picking .map-controls { bottom:152px; }
  .pick { display:flex; flex-direction:column; position:absolute; z-index:2; left:12px; right:12px; bottom:12px; height:128px;
    box-sizing:border-box; padding:10px 12px 12px; border:1px solid var(--red); background:#000; }
  .pick-meta { margin:0; overflow:hidden; color:var(--orange); font-family:var(--instrument); font-size:11px; line-height:1.4;
    letter-spacing:.1em; text-transform:uppercase; white-space:nowrap; text-overflow:ellipsis; }
  .pick-title { margin:4px 0 0; overflow:hidden; color:var(--title); font-family:var(--display); font-size:19px; font-weight:700;
    line-height:1.3; white-space:nowrap; text-overflow:ellipsis; }
  .pick-tools { display:flex; gap:8px; margin-top:auto; }
  .pick-tools button { flex:1 1 0; min-width:0; min-height:44px; border:1px solid var(--orange); background:#000; color:var(--orange);
    font-family:var(--condensed); font-stretch:condensed; font-size:14px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
  .pick-tools .pick-open { background:var(--orange); color:#000; }
  .pick-tools button:active { opacity:.7; }
  /* The key a step bigger, so it reads at arm's length. */
  .key { font-size:10px; }
}

/* The brain's words, readable (Fwaz, 2026-11-21: he couldn't see "the colour key" or "the folder and note names" on
   his phone). Each word is a solid black box, so nothing behind it shows through; titles sit under their note's
   cross, or above, right or left of it when that side is taken (state::plan_labels, which sizes every box to match
   these rules). The key is a boxed legend in white type. */
.star-label.above { transform:translate(-50%,calc(-100% - 10px)); }
.star-label.right { transform:translate(16px,-50%); }
.star-label.left { transform:translate(calc(-100% - 16px),-50%); }
.star-label,.star-label:hover,.labels .star-label:hover { background:#000; }
.key { color:var(--title); }
@media(max-width:650px) {
  .labels .star-label { max-width:150px; min-height:0; padding:4px 6px; overflow:visible; white-space:normal;
    font-size:13px; line-height:16px; letter-spacing:0; text-overflow:clip; }
  .labels .star-label span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
    overflow:hidden; overflow-wrap:anywhere; }
  .labels .star-label.one span { -webkit-line-clamp:1; line-clamp:1; }
  .hub { min-height:30px; padding:2px 2px 2px 8px; font-size:13px; line-height:1; }
  .hub .count { margin-left:8px; padding:3px 4px 2px; font-size:11px; }
  .key { top:30px; left:12px; right:auto; gap:10px; padding:4px 8px; border:1px solid var(--chrome-dim); background:#000;
    font-size:11px; line-height:14px; }
  .key span { gap:5px; }
  .key span::before { flex-basis:12px; }
  .specimen-mark { top:10px; left:12px; font-size:10px; }
}
/* Titles are drawn at exactly the size the plan gave them (inline width and height). */
.labels .star-label { max-width:none; min-height:0; }

/* Ovi cuts in (Fwaz, 2026-11-21; atlas-client ovi.rs). Now and then a tap on the brain gets a short line in her voice:
   for 0.9 s the orange chrome flickers crimson, scan lines cross the brain and the names jump, while her words type
   out in a crimson box, one letter a step (the page sets each line's duration and step count). Nothing moves the
   brain or opens a note. "Ovi" in the header mutes her on this device; on a phone it shows on the Brain tab. */
.ovi-says { position:absolute; z-index:4; top:22px; left:50%; translate:-50% 0; display:flex; align-items:center; gap:8px;
  max-width:calc(100% - 32px); box-sizing:border-box; margin:0; padding:4px 10px 4px 4px; border:1px solid var(--red);
  background:#000; box-shadow:0 0 18px #ec1c4840; pointer-events:none; }
.ovi-tag { flex:0 0 auto; padding:3px 6px 2px; background:var(--red); color:#000; font-family:var(--condensed);
  font-stretch:condensed; font-size:11px; font-weight:700; line-height:1; letter-spacing:.14em; }
.ovi-words { min-width:0; overflow:hidden; color:var(--title); font-family:var(--instrument); font-size:14px; line-height:1.35;
  white-space:nowrap; animation-name:ovi-type; animation-fill-mode:both; }
@keyframes ovi-type { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0 0 0 0); } }
.preview-tools .ovi-says { display:none; }
.ovi-veil { position:absolute; z-index:3; inset:0; pointer-events:none;
  background:repeating-linear-gradient(0deg,#ec1c4833 0 1px,transparent 1px 4px); animation:ovi-veil .9s steps(1,end) both; }
@keyframes ovi-veil { 0% { opacity:1; translate:0 0; } 12% { opacity:0; } 24% { opacity:.8; translate:0 -3px; }
  38% { opacity:.15; } 52% { opacity:.6; translate:0 2px; } 70%,100% { opacity:0; translate:0 0; } }
@keyframes ovi-crimson { 0%,28%,62% { filter:hue-rotate(-42deg) saturate(1.6); } 14%,44%,78%,100% { filter:none; } }
.atlas.ovi-glitch header,.atlas.ovi-glitch .neighborhoods,.atlas.ovi-glitch .labels,.atlas.ovi-glitch .key,
.atlas.ovi-glitch .map-controls,.atlas.ovi-glitch .brain-hint,.atlas.ovi-glitch .pick,.atlas.ovi-glitch .specimen-mark,
.atlas.ovi-glitch .map-caption,.atlas.ovi-glitch .preview-tools,.atlas.ovi-glitch .tabbar { animation:ovi-crimson .9s steps(1,end) both; }
@keyframes ovi-jolt { 0% { translate:4px 0; clip-path:inset(0 0 52% 0); } 10% { translate:-5px 0; clip-path:inset(46% 0 0 0); }
  20% { translate:2px 1px; clip-path:inset(0 0 0 0); opacity:.4; } 32% { translate:-3px 0; opacity:1; }
  46% { translate:5px 0; clip-path:inset(22% 0 30% 0); } 58%,100% { translate:0 0; clip-path:inset(0 0 0 0); opacity:1; } }
.atlas.ovi-glitch .labels .hub,.atlas.ovi-glitch .labels .star-label { animation:ovi-jolt .9s steps(1,end) both; }
.ovi-voice svg { width:16px; height:16px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round;
  stroke-linejoin:round; }
.ovi-voice .ovi-off,.ovi-voice[aria-pressed=true] .ovi-on { display:none; }
.ovi-voice[aria-pressed=true] .ovi-off { display:inline; }
header .ovi-voice[aria-pressed=true] { border-color:var(--chrome-dim); background:#000; color:var(--steel); }
@media(min-width:651px) {
  header .ovi-voice { display:inline-flex; align-items:center; gap:6px; }
}
@media(max-width:650px) {
  header { position:relative; }
  .tab-brain header>.ovi-voice { display:inline-flex; align-items:center; gap:6px; position:absolute; top:13px; right:16px;
    min-height:36px; padding:0 12px; font-size:13px; }
  .universe .ovi-says { top:62px; left:12px; translate:none; max-width:calc(100% - 24px); }
  .preview-tools .ovi-says { display:flex; position:static; translate:none; margin:0 6px 0 auto; max-width:calc(100% - 120px); }
}
@media(prefers-reduced-motion:reduce) { .ovi-veil { display:none; } }
