:root {
  --bg: #0c0d0f;
  --bg-2: #141618;
  --bg-3: #1b1e22;
  --line: rgba(243, 241, 236, .12);
  --line-strong: rgba(243, 241, 236, .22);
  --text: #f4f1ea;
  --muted: #9b968c;
  --faint: #6e6a63;
  --accent: #ff4d3a;
  --ok: #8fdbb0;
  --bad: #ff9b8c;
  --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.011em;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
.bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 560; letter-spacing: .08em; text-transform: lowercase; }
.logo i {
  width: 10px; height: 10px; background: var(--accent); display: block; border-radius: 1px;
}
.bar-meta { color: var(--faint); font-size: 13px; letter-spacing: .04em; }
.hero { max-width: 1120px; margin: 0 auto; padding: 88px 28px 48px; }
.kicker { margin: 0 0 18px; color: var(--accent); font-size: 12px; font-weight: 560; letter-spacing: .16em; text-transform: uppercase; }
h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -.045em;
}
.deck { max-width: 460px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid transparent;
  background: var(--accent); color: #1a0907; font-weight: 560; cursor: pointer;
}
.btn.ghost, button.ghost {
  background: transparent; color: var(--text); border-color: var(--line-strong);
}
button:disabled { opacity: .4; cursor: not-allowed; }
.hero .btn { margin-top: 32px; }
.strip {
  max-width: 1120px; margin: 28px auto 0; padding: 0 28px 72px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.strip article { padding: 22px 22px 0 0; }
.strip article + article { padding-left: 22px; border-left: 1px solid var(--line); }
.strip span { display: block; color: var(--faint); font-family: "IBM Plex Mono", monospace; font-size: 12px; margin-bottom: 10px; }
.strip strong { display: block; font-weight: 560; margin-bottom: 6px; }
.strip p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.work { max-width: 1180px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
body.screen { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.screen .work { flex: 1; max-width: none; min-height: 0; padding: 16px 18px; }
body.screen .side, body.screen .stage { min-height: 0; height: 100%; }
body.screen .stage { display: flex; flex-direction: column; }
body.screen .specs { grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; }
body.screen .spec { padding: 14px 0 4px; }
body.screen .spec b { font-size: 16px; min-height: 1.3em; }
body.screen .log { flex: 1; min-height: 0; max-height: none; margin-top: 12px; }
.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.side { padding: 8px; align-self: start; position: sticky; top: 18px; }
.side button {
  width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px;
  padding: 14px 14px 16px; cursor: pointer;
}
.side button + button { margin-top: 2px; }
.side button strong { display: block; font-size: 15px; font-weight: 560; }
.side button em { display: block; margin-top: 4px; font-style: normal; color: var(--muted); font-size: 13px; line-height: 1.35; }
.side button.on { background: var(--bg-3); }
.side button.on strong { color: #fff; }
.stage { padding: 22px 22px 18px; }
.stage-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.stage-head h2 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.03em; }
.pill {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
}
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 16px; }
.spec { border-top: 1px solid var(--line); padding-top: 8px; }
.spec span { display: block; color: var(--faint); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.spec b { display: block; margin-top: 4px; font-weight: 500; font-size: 14px; word-break: break-all; }
.modes { display: flex; gap: 6px; margin-top: 4px; }
.modes button {
  height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; color: var(--muted); font-size: 13px;
}
.modes button.on { color: var(--text); border-color: var(--line-strong); background: var(--bg-3); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.field { display: block; margin-top: 12px; }
label.field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
input[type="text"], input[type="password"], textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 12px; outline: none;
}
textarea { min-height: 74px; resize: vertical; font-family: "IBM Plex Mono", monospace; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
input:focus, textarea:focus { border-color: var(--line-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.log {
  margin-top: 16px; background: #090a0b; border-radius: 8px; border: 1px solid var(--line);
  min-height: 160px; max-height: 240px; overflow: auto; padding: 12px 14px;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.55; color: #c8c3ba;
}
.log .ok { color: var(--ok); }
.log .bad { color: var(--bad); }
.note { margin: 14px 0 0; color: var(--faint); font-size: 13px; line-height: 1.45; }
.login-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 28px; }
.login { width: min(420px, 100%); padding: 28px; }
.login h1 { font-size: 32px; max-width: none; }
.login p { color: var(--muted); }
.admin { max-width: 1100px; margin: 0 auto; padding: 28px; display: grid; gap: 16px; }
.admin h1 { font-size: 36px; max-width: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.block { padding: 18px 18px 16px; }
.block h2 { margin: 0 0 14px; font-size: 16px; font-weight: 560; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
code { font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.row-actions { display: flex; gap: 6px; }
.row-actions button, .tiny {
  height: 30px; padding: 0 10px; border-radius: 5px; border: 1px solid var(--line-strong);
  background: transparent; cursor: pointer; font-size: 12px;
}
.flash { padding: 10px 12px; border-radius: 8px; background: #1a221c; color: var(--ok); font-size: 14px; }
.flash.bad { background: #2a1614; color: var(--bad); }
.off { color: var(--bad); }
@media (max-width: 900px) {
  body.screen { height: auto; overflow: auto; }
  body.screen .side, body.screen .stage { height: auto; }
  .strip, .work, .grid-2, .specs, body.screen .specs { grid-template-columns: 1fr; }
  .strip article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
  .side { position: static; }
  h1 { max-width: 16ch; }
}
