:root {
  color-scheme: dark;
  --bg: #0b1012;
  --panel: #101719;
  --line: #2a3435;
  --text: #d9e1db;
  --muted: #8b9c95;
  --green: #c5f582;
  --amber: #e5b777;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 80% 0%, #19251e55, transparent 48%), var(--bg);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
}
button:hover {
  color: var(--green);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.4;
}
a {
  color: inherit;
  text-decoration: none;
}
.masthead {
  min-height: 76px;
  padding: 0 4.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.wordmark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--green);
  color: var(--bg);
  font-size: 29px;
  line-height: 1;
}
.edition {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px #c5f58233;
}
.quiet {
  margin-left: 20px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  font-size: 11px;
}
main {
  max-width: 1680px;
  margin: auto;
  padding: 0 4.2%;
}
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 43px 0 35px;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--green);
}
.eyebrow span {
  margin: 0 12px;
  color: var(--muted);
}
h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(27px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: -1.6px;
  margin: 15px 0 12px;
  line-height: 1.1;
}
.period {
  color: var(--green);
}
.case-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.case-stamp {
  border: 1px solid var(--line);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 230px;
  transform: rotate(-2deg);
  color: var(--muted);
}
.case-stamp span {
  font-size: 9px;
  letter-spacing: 1.2px;
}
.case-stamp strong {
  font-size: 17px;
  letter-spacing: 3px;
  font-weight: 400;
  color: var(--text);
}
.mobile-break,
.mobile-tabs {
  display: none;
}
.workspace-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
.scope-label span {
  color: var(--green);
  margin: 0 8px;
  font-size: 7px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 16px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 3px;
  overflow: hidden;
}
.panel-top {
  height: 39px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
  gap: 8px;
}
.panel-top button {
  font-size: 10px;
  letter-spacing: 0;
}
.panel-top > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.small-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border: 1px solid var(--green);
  border-radius: 50%;
}
.terminal {
  height: 700px;
  display: flex;
  flex-direction: column;
  background: #0d1415;
  min-width: 0;
}
.sessions {
  display: flex;
  border-bottom: 1px solid var(--line);
  height: 40px;
  flex-shrink: 0;
  background: #111a1b;
}
.sessions button {
  font-size: 11px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.sessions button.active {
  background: #19251e;
  color: var(--green);
  border-bottom: 2px solid var(--green);
}
.session-number {
  opacity: 0.5;
  margin-right: 8px;
}
.transcript {
  padding: 22px 24px 8px;
  overflow: auto;
  flex: 1;
  scrollbar-color: #34463b transparent;
  min-height: 0;
}
.entry {
  margin: 0 0 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.7 var(--mono);
  color: #b7c8be;
}
.entry.command {
  color: var(--green);
  margin-bottom: 5px;
}
.entry.system {
  color: #92aa9b;
  border-left: 2px solid #465c43;
  padding-left: 16px;
}
.entry.error {
  color: #e9ae94;
}
#command-form {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 9px;
  border-top: 1px solid #24332a;
  background: #111b17;
  flex-shrink: 0;
}
#prompt {
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#command-input {
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  width: 100%;
  min-width: 25px;
  font-size: 13px;
  caret-color: var(--green);
}
#command-form:focus-within {
  box-shadow: inset 2px 0 var(--green);
}
#command-form button {
  color: var(--green);
  font-size: 20px;
}
.terminal-footer {
  height: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 9px;
  flex-shrink: 0;
}
.terminal-footer button {
  font-size: 10px;
  color: var(--green);
}
kbd {
  font: 9px var(--mono);
  color: #c0cbc4;
  margin-left: 10px;
}
kbd:first-child {
  margin-left: 0;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.network {
  min-height: 172px;
}
#network-map {
  padding: 12px 16px 2px;
}
.host {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 10px;
}
.host-symbol {
  color: var(--muted);
}
.host.current .host-symbol {
  color: var(--green);
}
.host > span:last-child {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}
.trace {
  padding: 12px 16px 9px;
}
.trace > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.5px;
}
.trace strong {
  font-weight: 400;
  color: var(--green);
}
.meter {
  height: 3px;
  background: #2c3830;
  margin: 9px 0;
}
.meter > div {
  height: 100%;
  background: var(--green);
  transition: width 0.3s;
}
.trace p {
  font-size: 9px;
  color: var(--muted);
  margin: 9px 0 0;
  line-height: 1.5;
}
.badge {
  font-size: 8px;
  color: var(--green);
  background: #233025;
  padding: 4px 6px;
  border-radius: 2px;
}
#messages {
  max-height: 252px;
  overflow: auto;
  scrollbar-color: #34463b transparent;
}
.message {
  border-bottom: 1px solid var(--line);
}
.message summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 15px;
  display: grid;
  gap: 7px;
}
.message summary::-webkit-details-marker {
  display: none;
}
.message .sender {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
}
.message .subject {
  font-size: 11px;
  line-height: 1.4;
}
.message.unread .subject {
  color: var(--green);
}
.message p {
  white-space: pre-wrap;
  padding: 0 15px 15px;
  margin: 0;
  font-size: 11px;
  line-height: 1.75;
  color: #b7c8be;
  overflow-wrap: anywhere;
}
.message[open] summary {
  background: #17201b;
  margin-bottom: 12px;
}
.hint-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px 15px;
  font-size: 10px;
  color: var(--muted);
}
.hint-button span {
  color: var(--green);
}
.notes textarea {
  display: block;
  resize: vertical;
  min-height: 146px;
  max-height: 350px;
  width: 100%;
  padding: 16px;
  background: transparent;
  border: 0;
  outline: 0;
  color: #c9d4b8;
  font: 11px/1.8 var(--mono);
}
.notes textarea:focus {
  box-shadow: inset 2px 0 var(--green);
}
textarea::placeholder {
  color: #76887d;
}
.notes-footer {
  padding: 7px 15px 12px;
  font-size: 8px;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.page-footer {
  padding: 22px 0 25px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1px;
}
.page-footer .muted {
  margin: 0 8px;
}
.debrief {
  border: 1px solid #668549;
  background: #182119;
  padding: 30px;
  margin-top: 24px;
}
.debrief h2 {
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 400;
}
.debrief p {
  line-height: 1.8;
  max-width: 800px;
}
dialog {
  background: #16201a;
  border: 1px solid #6c865a;
  color: var(--text);
  padding: 28px;
  max-width: 480px;
  line-height: 1.8;
}
dialog::backdrop {
  background: #000a;
}
dialog h2 {
  font-size: 18px;
}
dialog > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
}
dialog button {
  border: 1px solid var(--line);
  padding: 10px;
}
.danger {
  color: #f0b09b;
}
#notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  background: #283820;
  border: 1px solid #698a50;
  color: var(--green);
  padding: 12px 18px;
  font-size: 11px;
  box-shadow: 0 6px 25px #0007;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#notification.show {
  opacity: 1;
}
@media (min-width: 1600px) {
  .terminal {
    height: 760px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
  .entry {
    font-size: 13px;
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .edition {
    display: none;
  }
  .case-stamp {
    min-width: 190px;
  }
  .transcript {
    padding: 18px 16px;
  }
  #command-form {
    padding: 12px;
  }
  .terminal-footer {
    padding: 0 10px;
  }
  .terminal-footer span {
    font-size: 8px;
  }
}
@media (max-width: 760px) {
  .masthead {
    padding: 0 5%;
    min-height: 64px;
  }
  .wordmark {
    font-size: 12px;
    letter-spacing: 1px;
    gap: 8px;
  }
  .mark {
    width: 27px;
    height: 27px;
    font-size: 25px;
  }
  .header-right {
    gap: 5px;
  }
  .header-right #save-status {
    display: none;
  }
  .quiet {
    border: 0;
    margin: 0;
    padding: 0;
    font-size: 9px;
  }
  .live-dot {
    display: none;
  }
  main {
    padding: 0 5%;
  }
  .case-header {
    padding: 29px 0 24px;
  }
  h1 {
    font-size: 34px;
    letter-spacing: -1px;
    line-height: 1.1;
  }
  .case-header p {
    font-size: 10px;
    line-height: 1.7;
  }
  .case-stamp {
    display: none;
  }
  .mobile-break {
    display: block;
  }
  .eyebrow {
    font-size: 8px;
  }
  .workspace-nav {
    margin-bottom: 0;
  }
  .workspace-label,
  .scope-label {
    display: none;
  }
  .mobile-tabs {
    display: flex;
    width: 100%;
    border: 1px solid var(--line);
    border-bottom: 0;
  }
  .mobile-tabs button {
    flex: 1;
    padding: 12px 8px;
    font-size: 10px;
  }
  .mobile-tabs [aria-selected="true"] {
    background: #223020;
    color: var(--green);
    border-top: 2px solid var(--green);
  }
  .workspace {
    display: block;
  }
  .terminal {
    height: 65dvh;
    min-height: 370px;
    max-height: 800px;
    border-radius: 0 0 3px 3px;
  }
  .sidebar {
    display: none;
  }
  .workspace[data-view="inbox"] .terminal,
  .workspace[data-view="notes"] .terminal {
    display: none;
  }
  .workspace[data-view="inbox"] .sidebar,
  .workspace[data-view="notes"] .sidebar {
    display: flex;
  }
  .workspace[data-view="inbox"] .notes,
  .workspace[data-view="notes"] .network,
  .workspace[data-view="notes"] .inbox {
    display: none;
  }
  .workspace[data-view="notes"] .notes {
    display: block;
  }
  .workspace[data-view="inbox"] #messages {
    max-height: none;
  }
  .workspace[data-view="notes"] textarea {
    min-height: 50dvh;
    max-height: none;
  }
  .panel-top {
    font-size: 8px;
    padding: 0 11px;
  }
  .entry {
    font-size: 11px;
    line-height: 1.7;
  }
  .transcript {
    padding: 17px 12px;
  }
  #prompt {
    font-size: 9px;
    max-width: 52%;
  }
  #command-input {
    font-size: 16px;
  }
  .terminal-footer span {
    font-size: 8px;
  }
  .terminal-footer kbd {
    font-size: 8px;
    margin-left: 4px;
  }
  .page-footer {
    font-size: 7px;
    gap: 15px;
    line-height: 1.6;
  }
  .debrief {
    padding: 20px;
  }
  .debrief h2 {
    font-size: 25px;
  }
  .debrief p {
    font-size: 11px;
  }
  .sessions button {
    padding: 0 11px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
#prompt {
  flex-shrink: 0;
}
#command-input {
  flex: 1;
  width: 0;
}
