:root {
  color-scheme: dark;
  color: #eef6e9;
  background: #0b100c;
  --ink: #edf6e8;
  --muted: #a0b39d;
  --line: #30452e;
  --white: #121a13;
  --surface: #101811;
  --accent: #b8fb6b;
  --accent-hover: #d5ffaa;
  --soft: #263b20;
  --night: #0b100c;
  --error: #ff9b8e;
  --kind-note: #a9bf92;
  --kind-fact: #bbf764;
  --kind-preference: #99caff;
  --kind-event: #f6ca7a;
  scrollbar-color: #526a48 #101811;
}

body { background: #0b100c; }
::selection { background: #b8fb6b; color: #172712; }
:focus-visible { outline-color: #b8fb6b; }
a { color: var(--accent); }
.primary { color: #172712; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { color: #dfecd9; background: #1a291a; border-color: #557050; }
.quiet:hover:not(:disabled), .secondary:hover:not(:disabled) { background: #284121; color: #f1faed; }
input, select, textarea { background-color: #101a12; color: #f1faed; border-color: #5b7456; }
input::placeholder, textarea::placeholder { color: #9caf97; }
input[readonly], .copy-row code { background: #0d160e; border-color: #42583f; }
select { background-image: linear-gradient(45deg, transparent 50%, #a8c39e 50%), linear-gradient(135deg, #a8c39e 50%, transparent 50%); }
.mark, .login-story .mark { background: #253b1b url('/assets/pbox-mascot.png') 50% 50% / cover; border-radius: 50%; width: 2.35rem; height: 2.35rem; }
.mark::before, .mark::after { content: none; }
.brand { font-size: 1.18rem; letter-spacing: -.03em; }
.brand:focus-visible { border-radius: .25rem; }
.login-story { isolation: isolate; position: relative; overflow: hidden; min-height: 100svh; justify-content: space-between; padding: 2rem clamp(1.4rem, 4.8vw, 4.8rem); }
.login-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 39%; }
.login-story::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #060b07e8 0%, #07100800 26%, #07100812 43%, #070d09ed 77%, #070e09 100%); }
.login-story .brand { margin-bottom: 15rem; }
.story-inner { margin: 0; padding-bottom: .6rem; }
.story-inner h1 { font-size: 3.5rem; }
.story-inner p, .conversation-example span { color: #d3e5c8; }
.conversation-example { margin-top: 1.2rem; border-color: #647c58; }
.conversation-example div { padding-block: .6rem; border-color: #647c58; }
.conversation-example div:nth-child(2) strong { color: #b8fb6b; }
.login-panel, .consent-layout { background: #101811; }
.login-content { width: min(100%, 25rem); }
.demo-entry { display: grid; grid-template-columns: 1fr; gap: .65rem; margin-top: 1.3rem; }
.demo-entry p { font-size: .94rem; }
.segments { background: #0b140d; }
.segments button[aria-pressed='true'] { background: #233a22; color: #e3facf; border-color: #527348; }
.topbar { background: #101811; padding-inline: clamp(1rem, 2.8vw, 2.5rem); }
.workspace { max-width: 99rem; grid-template-columns: 12.6rem minmax(0, 1fr); }
.workspace-nav { background: #0d150e; padding: 2.1rem .75rem; gap: .4rem; }
.workspace-nav button { border-color: transparent; }
.workspace-nav button:hover, .workspace-nav button[aria-current='page'] { color: #c9fa9f; background: #21361e; border-color: #375431; }
.workspace-nav .admin-nav { margin-top: 1.6rem; }
.workspace-content { padding: 2.4rem clamp(1rem, 2.8vw, 2.4rem) 3rem; }
.view { max-width: 81rem; }
.page-heading { margin-bottom: 1.35rem; }
.page-heading h1 { font-size: 2.9rem; letter-spacing: -.04em; }
.notice { background: #1a2d18; color: #cae7bb; }
.demo-banner { font-size: .88rem; padding: .55rem .8rem; border: 1px solid #3d5a35; }
.prompt-card, .connect-card { background: #141f15; border-color: #385035; }
.prompt-card p { color: #adc3a7; }
blockquote { background: #0e180f; border-color: #3e5838; }
.prompt-card .copy-status[data-error] { color: var(--error); }
.steps li::marker { color: var(--accent); }

.atlas-head { display: flex; align-items: end; gap: 1rem; justify-content: space-between; }
.atlas-head button { flex-shrink: 0; }
.atlas-board, .atlas-inspector, .operations { padding: 0; min-width: 0; background: #111b12; border: 1px solid #364d31; border-radius: .9rem; }
.atlas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .85rem; padding: .8rem .85rem; flex-wrap: wrap; border-bottom: 1px solid #30482f; }
.live-state { display: inline-flex; gap: .55rem; align-items: center; color: #c6e2b8; font-size: .86rem; white-space: nowrap; }
.live-state span { border-radius: 50%; width: .53rem; height: .53rem; background: #d4aa6a; }
.live-state[data-state='ready'] span { background: #b8fb6b; }
.live-state[data-state='error'] span { background: #ffac91; }
.atlas-filter { display: flex; gap: .45rem; flex: 1 1 21rem; width: min(100%, 31rem); max-width: 31rem; }
.atlas-filter input { flex: 1; min-width: 6rem; font-size: .88rem; }
.atlas-filter select { width: auto; min-width: 7.4rem; font-size: .88rem; }
.atlas-filter button { margin: 0; padding-inline: .6rem; font-size: .88rem; }
.owner-scope { display: flex; align-items: center; justify-content: space-between; padding: .25rem .85rem; gap: .4rem; color: #c9e1bf; font-size: .9rem; }
.owner-scope span { overflow-wrap: anywhere; }
.atlas-stage { height: 29rem; overflow: hidden; position: relative; isolation: isolate; background: radial-gradient(ellipse at 50% 48%, #1d3217 0%, #0c170d 44%, #08110b 100%); touch-action: none; cursor: grab; user-select: none; }
.atlas-stage:focus-visible { outline: 2px solid #bafc74; outline-offset: -3px; }
.atlas-stage.is-dragging, .atlas-stage.is-dragging .atlas-node { cursor: grabbing; }
.atlas-stage canvas, .atlas-pins { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.atlas-pins { z-index: 1; }
.atlas-node { position: absolute; left: 0; top: 0; z-index: var(--atlas-depth, 100); pointer-events: auto; min-height: 2rem; }
.atlas-root { width: 4.4rem; height: 4.4rem; min-height: 0; border-radius: 50%; border: 2px solid #bafc74; padding: .17rem; background: #0b180b; }
.atlas-root img { border-radius: 50%; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.atlas-group { cursor: default; padding: .24rem .5rem; min-height: 0; border: 1px solid var(--node-color); color: var(--node-color); background: #122013; border-radius: .36rem; font-size: .75rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.atlas-point { width: 2rem; height: 2rem; min-height: 0; background: transparent; border: 0; color: var(--node-color); padding: 0; display: grid; place-items: center; border-radius: 50%; }
.atlas-point::after { content: ''; aspect-ratio: 1; width: .63rem; border-radius: 50%; background: currentColor; outline: .25rem solid color-mix(in srgb, currentColor 20%, #07120a); transition: outline-width 180ms ease, scale 180ms ease; }
.atlas-point:hover::after, .atlas-point[aria-pressed='true']::after { scale: 1.2; outline-width: .37rem; }
.atlas-point.is-new::after { animation: node-arrival 900ms cubic-bezier(.16,1,.3,1) both; }
.atlas-point .atlas-tip { visibility: hidden; position: absolute; z-index: 1; top: -1.9rem; left: 50%; translate: -50% 0; white-space: nowrap; max-width: min(13rem, 35vw); overflow: hidden; text-overflow: ellipsis; color: #eef8e7; padding: .25rem .4rem; border-radius: .3rem; background: #1b2c19; font-size: .75rem; pointer-events: none; }
.atlas-point:is(:hover, :focus-visible) { z-index: 200; }
.atlas-point:hover .atlas-tip, .atlas-point:focus-visible .atlas-tip { visibility: visible; }
.atlas-stage.is-dragging .atlas-tip { visibility: hidden; }
.atlas-orbit-hint { position: absolute; z-index: 2; top: .7rem; left: .8rem; color: #b9cfb3; font-size: .78rem; pointer-events: none; }
[data-kind='note'] { --node-color: var(--kind-note); }
[data-kind='fact'] { --node-color: var(--kind-fact); }
[data-kind='preference'] { --node-color: var(--kind-preference); }
[data-kind='event'] { --node-color: var(--kind-event); }
.atlas-zoom { position: absolute; z-index: 2; bottom: .65rem; right: .65rem; display: flex; gap: .2rem; background: #101d12; border: 1px solid #375331; border-radius: .45rem; padding: .15rem; }
.atlas-zoom button { min-height: 2.15rem; min-width: 2.05rem; padding: .2rem .45rem; color: #e7f4df; }
.atlas-zoom button:not(.atlas-reset) { font-size: 1.2rem; }
.atlas-reset { font-size: .78rem; }
.atlas-empty { position: absolute; z-index: 2; bottom: 3.4rem; left: .8rem; right: .8rem; text-align: center; max-width: 41ch; margin-inline: auto; background: #101d12; border: 1px solid #395334; border-radius: .6rem; padding: .6rem .75rem; color: #d0e7c6; font-size: .9rem; }
.atlas-bottom { padding: .55rem .8rem; border-top: 1px solid #30482f; display: flex; justify-content: space-between; align-items: center; gap: .55rem; flex-wrap: wrap; }
.atlas-legend, .atlas-page { display: flex; gap: .58rem; align-items: center; flex-wrap: wrap; font-size: .8rem; color: #b0c8a8; }
.atlas-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.atlas-legend span::before { content: ''; width: .38rem; height: .38rem; border-radius: 50%; background: var(--node-color); }
.atlas-page button { min-height: 2rem; font-size: .8rem; padding: .28rem .48rem; }
.atlas-message:not(:empty) { padding: .4rem .8rem .75rem; font-size: .88rem; }
.atlas-inspector { padding: 1rem; }
.atlas-inspector h2 { font-size: 1.08rem; color: #dff4d5; }
.atlas-inspector > p { margin: .55rem 0 .7rem; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 17rem; overflow: auto; }
.atlas-inspector button[data-info-edit] { min-height: 2.25rem; font-size: .85rem; }
.node-list { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid #344b33; }
.node-list summary { cursor: pointer; color: #c6e7ba; font-size: .87rem; }
.node-list ul { list-style: none; padding: 0; margin: .55rem 0 0; max-height: 12rem; overflow: auto; }
.node-list button { font-size: .84rem; text-align: left; width: 100%; min-height: 2.2rem; padding: .38rem .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-list button[aria-pressed='true'] { color: #cfffaf; background: #253a22; }
.atlas-next { margin-top: .8rem; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 1rem; padding: .9rem 0; gap: .7rem; border-block: 1px solid #354c30; }
.metrics div { padding-left: .7rem; padding-right: .7rem; }
.metrics div + div { border-left: 1px solid #354c30; }
.metrics dt { color: #a8bf9f; font-size: .85rem; }
.metrics dd { color: #dcf8ce; font-size: 1.85rem; font-weight: 700; margin: .12rem 0 0; font-variant-numeric: tabular-nums; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(15rem, 1fr); gap: .85rem; align-items: start; }
#admin-graph .atlas-inspector { margin-top: .75rem; }
.operations { padding: .85rem; }
.operations-tabs { margin-bottom: .75rem; }
.operations form { display: flex; margin-bottom: .65rem; }
.operations form button { margin: 0; }
.operations-list { list-style: none; padding: 0; margin: .35rem 0; max-height: 32rem; overflow: auto; }
.operations-list li { padding: .64rem .15rem; border-bottom: 1px solid #344b33; overflow-wrap: anywhere; }
.operations-list strong { font-size: .88rem; }
.operations-list small { color: #afc5a9; font-size: .78rem; display: block; margin-top: .15rem; }
.operations-list button { display: block; text-align: left; width: 100%; margin: .24rem 0; padding: .38rem; min-height: 2.15rem; font-size: .82rem; }
.operation-pages { display: flex; justify-content: space-between; }
.operation-pages button { min-height: 2.25rem; font-size: .83rem; }
@keyframes node-arrival {
  from { opacity: .25; scale: .35; outline-width: .65rem; }
  to { opacity: 1; scale: 1; outline-width: .25rem; }
}
@media (max-width: 76rem) {
  .admin-layout { grid-template-columns: minmax(0, 1.7fr) minmax(13rem, 1fr); }
}
@media (max-width: 61rem) {
  .workspace { grid-template-columns: 11.15rem minmax(0, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .atlas-stage { height: 27rem; }
}
@media (max-width: 46rem) {
  .login-story { min-height: 0; padding: 1rem 1.1rem 1.25rem; }
  .login-story .brand { margin-bottom: 6.3rem; }
  .story-inner h1 { font-size: 2.1rem; }
  .story-inner p { font-size: .95rem; }
  .workspace { grid-template-columns: 1fr; }
  .workspace-nav { padding: .55rem .55rem; }
  .workspace-nav .admin-nav { margin-top: 0; }
  .workspace-content { padding-top: 1.35rem; }
  .page-heading h1 { font-size: 2.17rem; }
  .atlas-head { display: grid; justify-items: start; }
  .atlas-toolbar { padding: .62rem; }
  .atlas-filter { flex: 1 1 100%; flex-wrap: wrap; }
  .atlas-filter input { flex-basis: 100%; }
  .atlas-filter select { flex: 1; }
  .atlas-stage { height: 21rem; }
  .atlas-root { width: 3.25rem; height: 3.25rem; }
  .atlas-group { font-size: .61rem; padding: .14rem .27rem; }
  .atlas-point { width: 1.5rem; height: 1.5rem; }
  .atlas-point::after { width: .47rem; outline-width: .16rem; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics dd { font-size: 1.47rem; }
  .login-content { margin-block: .45rem; }
}
@media (max-width: 46rem), (pointer: coarse) {
  .atlas-orbit-hint span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-point.is-new::after { animation: none; }
  .atlas-point::after { transition: none; }
}
