:root {
  --ink: #171717;
  --paper: #f4f1ea;
  --panel: #fbfaf6;
  --line: #c9c5bc;
  --muted: #706e68;
  --yellow: #f4d35e;
  --blue: #b9d6d4;
  --red: #e8b3a7;
  --green: #c8d8bc;
  --orange: #e5c3a2;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.4 Arial,
    sans-serif;
  overflow: hidden;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
.top {
  height: 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: var(--panel);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.brand {
  font-weight: 700;
}
.brand span {
  font-size: 22px;
  vertical-align: -2px;
  margin-right: 6px;
}
.scenario {
  color: var(--muted);
  flex: 1;
}
.version {
  font-size: 10px;
  color: var(--muted);
}
.version b {
  color: var(--ink);
  margin-left: 6px;
}
.app {
  height: calc(100vh - 48px);
  padding: 20px 28px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hero {
  min-height: 104px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
}
.hero h1 {
  font:
    700 clamp(28px, 3.2vw, 52px) / 0.95 Arial,
    Helvetica,
    sans-serif;
  margin: 4px 0 10px;
  letter-spacing: -0.04em;
}
.hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin: 0;
  color: var(--muted);
}
.hero-stat {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
}
.hero-stat b {
  font:
    700 38px Arial,
    Helvetica,
    sans-serif;
}
.hero-stat span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.mode-switch {
  display: flex;
  gap: 1px;
  margin: 16px 0;
  height: 56px;
}
.mode {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ink);
  padding: 9px 16px;
  text-align: left;
  background: transparent;
  min-width: 240px;
}
.mode + .mode {
  border-left: 0;
}
.mode.active {
  background: var(--ink);
  color: var(--paper);
}
.mode-symbol {
  font-size: 25px;
}
.mode b,
.mode small {
  display: block;
}
.mode b {
  font-size: 11px;
  letter-spacing: 0.12em;
}
.mode small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.mode.active small {
  color: #bdbab1;
}
.mode em {
  font:
    italic 15px Arial,
    Helvetica,
    sans-serif;
  margin-left: auto;
}
.workspace {
  flex: 1;
  min-height: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}
.capture-view {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
}
.capture-entries {
  min-height: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.section-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.section-kicker span {
  background: var(--ink);
  color: var(--paper);
  padding: 3px 6px;
  font-size: 10px;
}
.aside-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin: 14px 0;
}
.aside-heading h2,
.atlas-toolbar h2 {
  font:
    700 25px Arial,
    Helvetica,
    sans-serif;
  margin: 0;
}
.muted {
  color: var(--muted);
  margin: 4px 0;
}
.icon-button {
  border: 1px solid var(--ink);
  font-size: 22px;
  width: 34px;
  height: 34px;
  line-height: 25px;
}
.search,
.field,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 10px;
  color: var(--ink);
}
.search {
  margin-bottom: 10px;
}
.entry-list {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.entry-item {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 4px;
  align-items: start;
}
.entry-item:hover,
.entry-item.selected {
  background: var(--yellow);
}
.entry-item .symbol {
  font-size: 20px;
  line-height: 20px;
}
.entry-item h4 {
  font-size: 13px;
  margin: 0 0 3px;
}
.entry-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.key-box {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
  font-size: 11px;
}
.key-box p {
  margin: 7px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.key-box b {
  font-size: 10px;
  width: 42px;
}
.symbol {
  display: inline-block;
  width: 20px;
  text-align: center;
}
.observation {
  color: #367d79;
}
.mutation {
  color: #ae493c;
}
.insight {
  color: #5c5b8d;
}
.capture-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.workspace-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: var(--muted);
  padding: 0 2px 9px;
}
.capture-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 35px;
}
.capture-empty h2 {
  font:
    700 32px Arial,
    Helvetica,
    sans-serif;
  margin: 7px 0;
}
.capture-empty p:not(.eyebrow) {
  max-width: 500px;
  color: var(--muted);
}
.empty-symbol {
  font-size: 50px;
  color: #367d79;
}
.hidden {
  display: none !important;
}
.editor {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.entry-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.entry-identity {
  display: flex;
  gap: 14px;
  align-items: center;
}
.big-symbol {
  font-size: 40px;
}
.entry-head h2 {
  font:
    700 30px Arial,
    Helvetica,
    sans-serif;
  margin: 4px 0;
}
.source {
  border: 1px solid var(--line);
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.editor-grid {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  overflow: auto;
}
.capture-panel {
  border: 1px solid var(--line);
  background: #fffdf8;
}
.capture-panel.open {
  grid-column: span 2;
}
.panel-toggle {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 14px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 11px;
}
.panel-body {
  padding: 0 14px 16px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 12px 0 5px;
}
.field-label em {
  font-weight: 400;
  letter-spacing: 0;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.editor-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
.editor-footer span {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.dark,
.outline,
.text-button {
  padding: 10px 13px;
  border: 1px solid var(--ink);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.dark {
  background: var(--ink);
  color: var(--paper);
}
.outline {
  background: transparent;
}
.danger {
  color: #9a4238;
  border-color: #9a4238;
}
.full {
  width: 100%;
}
.atlas-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
}
.atlas-thread-column {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.atlas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.filter-strip > span {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-right: 5px;
}
.filter-chip {
  border: 1px solid var(--line);
  padding: 6px 9px;
  font-size: 10px;
  background: var(--panel);
}
.filter-chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.filter-status {
  font-size: 11px;
  color: var(--muted);
  padding: 0 0 10px;
}
.thread-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.thread-card {
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 15px;
  min-height: 170px;
}
.thread-card.muted-thread {
  opacity: 0.28;
}
.thread-card.focus-thread {
  background: #fffdf8;
}
.thread-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 8px;
}
.thread-card h3 {
  margin: 0;
  font:
    700 21px Arial,
    Helvetica,
    sans-serif;
}
.thread-type {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.thread-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.thread-entry {
  padding: 6px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 12px;
}
.thread-entry.focus-entry {
  font-weight: 700;
  background: var(--yellow);
}
.thread-entry.muted-entry {
  opacity: 0.35;
}
.thread-entry button {
  font-weight: 700;
  text-align: left;
}
.overlap {
  font-size: 10px;
  color: #7e5c17;
  padding-top: 10px;
}
.thread-note-link {
  font-size: 11px;
  text-decoration: underline;
  margin-top: 12px;
}
.thread-note-read {
  border: 1px solid var(--ink);
  background: var(--yellow);
  padding: 14px;
  margin-top: 12px;
}
.thread-note-read h3 {
  font:
    700 18px Arial,
    Helvetica,
    sans-serif;
  margin: 4px 0;
}
.atlas-edit-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.thread-editor {
  padding: 18px;
  min-height: 0;
  overflow: auto;
  flex: 1;
}
.thread-editor h2 {
  font:
    700 25px Arial,
    Helvetica,
    sans-serif;
  margin: 4px 0 16px;
}
.editor-heading {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.thread-entry-picker {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fffdf8;
}
.pick-entry {
  display: flex;
  gap: 9px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.pick-entry input {
  accent-color: var(--ink);
}
.pick-entry small {
  display: block;
  color: var(--muted);
}
.atlas-readings {
  padding: 15px;
}
.atlas-readings h3 {
  margin: 4px 0;
  font:
    700 18px Arial,
    Helvetica,
    sans-serif;
}
.drawer {
  position: fixed;
  z-index: 5;
  right: 0;
  top: 0;
  width: min(440px, 100%);
  height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--ink);
  padding: 22px;
  transform: translateX(100%);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}
.drawer.open {
  transform: none;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
}
.drawer h2 {
  font:
    700 27px Arial,
    Helvetica,
    sans-serif;
  margin: 3px 0;
}
.reading-card {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.reading-card p {
  margin: 0 0 8px;
}
.reading-card small {
  color: var(--muted);
  font-size: 10px;
}
.reading-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.reading-form {
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  margin-top: auto;
}
.reading-form h3 {
  font:
    700 18px Arial,
    Helvetica,
    sans-serif;
  margin: 0 0 8px;
}
.reading-form div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 15px;
  display: none;
  font-size: 12px;
}
.toast.show {
  display: block;
}
.screen-warning {
  display: none;
}
@media (max-width: 850px) and (min-width: 701px) {
  .capture-view {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .atlas-view {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .app {
    padding-left: 16px;
    padding-right: 16px;
  }
  .top {
    padding: 0 16px;
  }
  .scenario {
    display: none;
  }
}
@media (max-width: 700px) {
  .screen-warning {
    position: fixed;
    inset: 0;
    background: var(--ink);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    z-index: 20;
  }
  .screen-warning > div {
    max-width: 360px;
  }
  .screen-warning h1 {
    font:
      700 32px Arial,
      Helvetica,
      sans-serif;
    margin: 8px 0;
  }
  .screen-warning p:not(.eyebrow) {
    color: #c7c3ba;
  }
  .warning-mark {
    border: 1px solid var(--paper);
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    font:
      700 20px Arial,
      Helvetica,
      sans-serif;
  }
  .app {
    display: none;
  }
}

.entry-item {
  text-align: left;
  width: 100%;
}
.panel {
  position: relative;
}
.panel-toggle {
  align-items: flex-start;
}
.panel-toggle > div {
  flex: 1;
}
.panel-toggle b {
  display: block;
}
.section-hint {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: #706e68;
  margin: 4px 0 0;
}
.hint-icon {
  border: 1px solid #c9c5bc;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font:
    700 11px Arial,
    sans-serif;
  cursor: help;
}
.panel-help {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid #c9c5bc;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    700 11px Arial,
    sans-serif;
  cursor: help;
}
.panel-help:hover,
.hint-icon:hover {
  background: #171717;
  color: #f4f1ea;
}
.symbol,
.big-symbol,
.mode-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
}
.big-symbol {
  width: 40px;
  height: 40px;
  font-size: 36px;
}
.mode-symbol {
  font-size: 24px;
}
.thread-list {
  display: block;
}
.thread-sequence {
  border-top: 1px solid #171717;
  padding: 16px 0;
}
.thread-sequence header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.thread-sequence header h3 {
  margin: 2px 0 0;
  font:
    700 22px Arial,
    Helvetica,
    sans-serif;
}
.sequence-number {
  font:
    italic 18px Arial,
    Helvetica,
    sans-serif;
  color: #706e68;
  width: 28px;
}
.sequence-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0 4px 40px;
}
.sequence-node {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 145px;
  text-align: left;
  border-left: 1px solid #c9c5bc;
  padding: 10px;
  background: #fbfaf6;
}
.sequence-node b {
  font-size: 12px;
}
.sequence-node span {
  font-size: 11px;
}
.sequence-arrow {
  align-self: center;
  color: #706e68;
}
.thread-sequence.focus-thread {
  background: #fffdf8;
}
.thread-sequence.muted-thread {
  opacity: 0.3;
}
.sequence-node.focus-entry {
  background: #f4d35e;
}
.sequence-node.muted-entry {
  opacity: 0.4;
}
.entry-item:hover,
.mode:hover:not(.active),
.filter-chip:hover,
.text-button:hover,
.outline:hover,
.icon-button:hover,
.dark:hover,
.sequence-node:hover {
  background: #e8e5dc;
  color: #171717;
}
.mode.active:hover,
.dark:hover {
  background: #333;
  color: #f4f1ea;
}
.thread-title-button {
  padding: 0;
  text-align: left;
}
.thread-title-button:hover h3 {
  text-decoration: underline;
}
.thread-detail {
  border-top: 1px solid #c9c5bc;
  margin-top: 14px;
  padding-top: 12px;
}
.thread-detail h3 {
  font:
    700 20px Arial,
    Helvetica,
    sans-serif;
  margin: 3px 0 12px;
}
.detail-entry {
  border-top: 1px dotted #c9c5bc;
  padding: 10px 0;
}
.detail-entry strong {
  display: block;
  font-size: 11px;
}
.detail-entry p {
  margin: 4px 0 0;
  font-size: 12px;
}
.detail-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #706e68;
  font-weight: 700;
  margin-top: 8px;
}
.help-tip {
  position: fixed;
  z-index: 30;
  max-width: 260px;
  background: #171717;
  color: #f4f1ea;
  border: 1px solid #f4f1ea;
  padding: 9px 11px;
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  display: none;
}
.help-tip.show {
  display: block;
}
.history-drawer section {
  border-top: 1px solid #c9c5bc;
  margin-top: 16px;
  padding-top: 12px;
}
.drawer-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.drawer-section-head h3 {
  font:
    700 17px Arial,
    Helvetica,
    sans-serif;
  margin: 0;
}
.drawer-section-head span {
  font-size: 10px;
  color: #706e68;
}
.history-record {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dotted #c9c5bc;
  padding: 10px 0;
}
.history-record div {
  min-width: 0;
}
.history-record b,
.history-record span,
.history-record small {
  display: block;
}
.history-record b {
  font-size: 11px;
}
.history-record span {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-record small {
  font-size: 10px;
  color: #706e68;
}
.archived-record {
  opacity: 0.75;
}
.history-event {
  font-size: 11px;
  border-top: 1px dotted #c9c5bc;
  padding: 8px 0;
  margin: 0;
}
.history-event b {
  font-size: 10px;
}
.session-name {
  display: flex;
  align-items: center;
  gap: 7px;
}
.session-name label {
  font-size: 10px;
  color: #706e68;
}
.session-name input {
  width: 145px;
  border: 0;
  border-bottom: 1px solid #c9c5bc;
  background: transparent;
  padding: 5px 2px;
  color: #171717;
}
.top-actions {
  display: flex;
  gap: 4px;
}
.top-button {
  border-left: 1px solid #c9c5bc;
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.top-button:hover {
  background: #e8e5dc;
}
.utility-bar {
  display: none;
}
.toolbox-drawer {
  gap: 9px;
}
.toolbox-drawer .drawer-head {
  margin-bottom: 4px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.35);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 25px;
}
.modal.open {
  display: flex;
}
.modal-box {
  background: #fbfaf6;
  border: 1px solid #171717;
  width: min(560px, 100%);
  padding: 22px;
}
.modal-box h2 {
  font:
    700 28px Arial,
    Helvetica,
    sans-serif;
  margin: 3px 0;
}
.modal-box li {
  margin: 9px 0;
}
.modal-box ol {
  padding-left: 22px;
}

.connection-row span {
  margin-right: 1rem;
}

.connection-row .text-button {
  padding: 5px;
}
