*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.65;
  min-height: 100vh;
  padding-left: 148px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --ink: #e6edf3;
  --muted: #8b949e;
  --green: #3fb950;
  --amber: #d29922;
  --red: #f85149;
  --blue: #58a6ff;
  --line: #30363d;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
}

/* ——— DEVTOOLS DOCK left — large, obvious ——— */
.dock {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 136px;
  z-index: 100;
  background: #010409;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 6px;
}
.dock .logo {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  padding: 10px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  line-height: 1.3;
}
.dock a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  min-height: 56px;
  justify-content: center;
}
.dock a span {
  font-size: 0.62rem;
  font-weight: 500;
  opacity: 0.7;
}
.dock a:hover {
  background: var(--panel);
  color: var(--ink);
}
.dock a.on {
  background: var(--panel);
  color: var(--green);
  border-color: var(--line);
}

/* ——— TRIAGE: status board ——— */
.triage {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}
.triage .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.triage h1 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 12px;
}
.triage .lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 480px;
}
.status-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.status-board .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 0.92rem;
}
.status-board .row:last-child { border-bottom: none; }
.status-board .tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}
.tag.crit { background: rgba(248,81,73,0.15); color: var(--red); }
.tag.warn { background: rgba(210,153,34,0.15); color: var(--amber); }
.tag.ok { background: rgba(63,185,80,0.15); color: var(--green); }
.tag.info { background: rgba(88,166,255,0.15); color: var(--blue); }

/* ——— PATCH: stacked issue types ——— */
.patch {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}
.patch .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.patch h1 {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 22px;
}
.issue {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 18px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}
.issue .ico {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #010409;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--amber);
}
.issue h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.issue p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ——— LOG: incident timeline ——— */
.log-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}
.log-page .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.log-page h1 {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.log-page .intro {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 1.02rem;
}
.entry {
  border-left: 2px solid var(--line);
  padding: 0 0 22px 20px;
  position: relative;
}
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
}
.entry .when {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.entry h2 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.entry p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ——— CONSOLE: terminal form ——— */
.console-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.term {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.term .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #010409;
  border-bottom: 1px solid var(--line);
}
.term .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #30363d;
}
.term .dot:nth-child(1) { background: #f85149; }
.term .dot:nth-child(2) { background: #d29922; }
.term .dot:nth-child(3) { background: #3fb950; }
.term .chrome span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.term .body { padding: 22px 18px; }
.term h1 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 12px;
}
.term .meta {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.term .meta a { color: var(--blue); font-weight: 600; }
.term label {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.term input,
.term textarea {
  width: 100%;
  padding: 10px 12px;
  background: #010409;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.term input:focus,
.term textarea:focus {
  outline: none;
  border-color: var(--green);
}
.term textarea { min-height: 90px; resize: vertical; }
.term button {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: #010409;
  border: none;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.term button:hover { filter: brightness(1.08); }

.shot {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: saturate(0.85);
}

.ft {
  text-align: center;
  padding: 12px 24px 40px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}
.ft strong { color: var(--ink); }

@media (max-width: 700px) {
  body { padding-left: 0; padding-bottom: 80px; }
  .dock {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--line);
    padding: 6px;
    gap: 4px;
  }
  .dock .logo { display: none; }
  .dock a {
    flex: 1;
    min-height: 56px;
    align-items: center;
    padding: 10px 4px;
    font-size: 0.7rem;
  }
  .dock a span { font-size: 0.55rem; }
}
