:root {
  color-scheme: dark;
  --ink: #292929;
  --ink-2: #1d1d1d;
  --ink-3: #343434;
  --yellow: #fff56e;
  --yellow-soft: #fff9b8;
  --cream: #fffdf2;
  --muted: rgba(255, 253, 242, 0.66);
  --dim: rgba(255, 253, 242, 0.42);
  --line: rgba(255, 253, 242, 0.14);
  --line-bright: rgba(255, 245, 110, 0.5);
  --max: 1120px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--ink);
  color: var(--cream);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10rem, rgba(255, 245, 110, 0.16), transparent 34rem),
    linear-gradient(rgba(255, 253, 242, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 253, 242, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 36px 36px, 36px 36px, auto;
}

p,
h1,
h2,
h3,
li,
dt,
dd {
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  background: var(--yellow);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
}

.brand,
.site-header nav,
.eyebrow,
.tui-frame,
.status-panel dl {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--cream);
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line-bright);
  background: var(--yellow);
  color: var(--ink);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--yellow);
  outline: none;
}

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 7vw, 5rem) 0 4rem;
}

.hero-copy {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--yellow);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-size: clamp(4.1rem, 11vw, 8.8rem);
  line-height: 1.02;
  letter-spacing: -0.09em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.075em;
}

h3 {
  margin-bottom: 0.45rem;
  color: var(--cream);
  font-size: 1.05rem;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 253, 242, 0.8);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.tui-frame {
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: var(--ink-2);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.34),
    0 0 0 8px rgba(255, 245, 110, 0.035);
}

.tui-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tui-topbar p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tui-topbar strong {
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.window-dots {
  display: flex;
  gap: 0.4rem;
}

.window-dots span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--dim);
}

.window-dots span:first-child {
  background: #ff7a70;
}

.window-dots span:nth-child(2) {
  background: #ffd36e;
}

.window-dots span:nth-child(3) {
  background: #a9ff91;
}

.tui-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 1fr);
  grid-template-rows: minmax(280px, 1fr) auto;
  min-height: 520px;
}

.pane {
  min-width: 0;
  padding: 1rem;
}

.pane-tree {
  grid-row: span 2;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 242, 0.025);
}

.pane-log {
  border-bottom: 1px solid var(--line);
}

.pane-chat {
  background: #151515;
}

.pane-title {
  margin-bottom: 0.8rem;
  color: var(--yellow);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.tree-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 253, 242, 0.76);
  font-size: 0.88rem;
}

.tree-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.42rem 0.5rem;
}

.tree-list .issue,
.tree-list .worker {
  margin-left: 0.8rem;
}

.tree-list .worker {
  margin-left: 1.6rem;
}

.tree-list .project,
.tree-list .head,
.tree-list .active {
  background: rgba(255, 245, 110, 0.12);
  color: var(--cream);
}

.tree-list .done {
  color: #b8ffae;
}

.tree-list .idle {
  color: var(--dim);
}

.log-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(255, 253, 242, 0.1);
  padding: 0.8rem 0;
}

.log-row:first-of-type {
  border-top: 0;
}

.log-row span {
  color: var(--yellow);
  font-size: 0.78rem;
}

.log-row p,
.pane-chat p {
  margin: 0;
  color: rgba(255, 253, 242, 0.78);
}

.pane-chat p span {
  color: var(--yellow);
}

.section {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.model-list {
  display: grid;
  gap: 0.8rem;
}

.model-list article {
  border-left: 2px solid var(--yellow);
  background: rgba(29, 29, 29, 0.72);
  padding: 1rem 1rem 1rem 1.2rem;
}

.model-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  border-color: var(--line-bright);
}

.status-panel dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.status-panel div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  background: rgba(29, 29, 29, 0.86);
  padding: 0.85rem;
}

.status-panel dt {
  color: var(--yellow);
}

.status-panel dd {
  margin: 0;
  color: rgba(255, 253, 242, 0.78);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
}

.site-footer p {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .tui-grid,
  .two-column,
  .status-panel {
    grid-template-columns: 1fr;
  }

  .pane-tree {
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tui-grid {
    grid-template-rows: auto;
  }

  .status-panel div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tui-topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tui-topbar strong {
    display: none;
  }

  h1 {
    font-size: clamp(3.35rem, 18vw, 5rem);
  }

  .log-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
