:root {
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: #17231f;
  background: #e9ece7;
  --ink: #17231f;
  --muted: #718078;
  --line: #cbd3cd;
  --deep: #172a23;
  --accent: #b8d83f;
  --accent-ink: #26330b;
  --paper: #f8faf6;
  --warm: #f1f2e8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #e9ece7; }
button, input { font: inherit; }
button { cursor: pointer; }
.workbench { min-height: 100dvh; display: grid; grid-template-columns: 218px minmax(0, 1fr) 214px; }
.admin-workbench { grid-template-columns: 218px minmax(0, 1fr); }
.protocol-rail { display: flex; flex-direction: column; min-height: 100dvh; padding: 25px 20px 22px; color: #e7eee8; background: var(--deep); }
.brand-mark { display: flex; align-items: center; gap: 10px; color: #f4f7ef; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.brand-index { display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--accent-ink); background: var(--accent); font: 800 12px/1 ui-monospace, monospace; letter-spacing: .05em; }
.rail-caption { margin: 64px 0 15px; color: #8fa39a; font: 700 10px/1 ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.protocol-nav { display: grid; gap: 4px; }
.protocol-nav a { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; padding: 10px 8px; color: #aabbb1; border-left: 2px solid transparent; text-decoration: none; font-size: 13px; }
.protocol-nav a:hover, .protocol-nav a.active { color: #f1f6ee; border-left-color: var(--accent); background: #ffffff0b; }
.protocol-nav b { color: var(--accent); font: 700 11px ui-monospace, monospace; }
.rail-foot { display: grid; gap: 11px; margin-top: auto; color: #aabbb1; font-size: 11px; line-height: 1.45; }
.rail-foot a { color: #e7eee8; text-decoration: none; }
.status-dot, .live-label i { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; margin-right: 5px; }
.workbench-main { min-width: 0; padding: 44px clamp(28px, 5vw, 76px) 72px; background: var(--paper); }
.mobile-app { width: 100%; max-width: 760px; min-height: 100dvh; margin: 0 auto; background: var(--paper); }
.mobile-app .workbench-main { min-height: 100dvh; padding-left: clamp(18px, 4vw, 38px); padding-right: clamp(18px, 4vw, 38px); }
.workspace-head { display: flex; justify-content: space-between; gap: 25px; align-items: flex-end; border-bottom: 1px solid var(--line); padding-bottom: 25px; }
.kicker { margin: 0 0 13px; color: #4f6c5c; font: 700 10px ui-monospace, monospace; letter-spacing: .15em; text-transform: uppercase; }
h1 { max-width: 650px; margin: 0; color: var(--ink); font-size: clamp(32px, 4vw, 55px); line-height: 1.03; letter-spacing: -.045em; font-weight: 760; }
.head-meta { display: grid; gap: 9px; flex: none; color: var(--muted); font-size: 11px; text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.lede { max-width: 58ch; margin: 19px 0 43px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.protocol-section { border-top: 1px solid var(--line); padding: 26px 0 31px; }
.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.section-number { flex: none; color: #63776b; font: 700 12px ui-monospace, monospace; letter-spacing: .03em; padding-top: 2px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.heading-action { margin-left: auto; flex: none; }
.form-grid { display: grid; grid-template-columns: minmax(150px, 1fr) 170px auto; align-items: end; gap: 13px; }
.register-form { grid-template-columns: minmax(150px, 1fr) 150px 150px auto; }
.admin-form { grid-template-columns: minmax(260px, 430px) auto; }
label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
input { width: 100%; border: 1px solid #b9c6bd; border-radius: 0; background: #fff; color: var(--ink); padding: 11px 12px; outline: none; }
input:focus { border-color: #6d8d43; box-shadow: 0 0 0 2px #b8d83f55; }
.button-row { display: flex; gap: 8px; align-items: center; }
button { border: 1px solid var(--deep); border-radius: 0; background: var(--deep); color: #f5f8f3; padding: 11px 15px; font-size: 12px; font-weight: 750; transition: background .15s, color .15s, transform .15s; }
button:hover { background: #29453a; }
button:active { transform: translateY(1px); }
button.secondary { color: #3d5a31; background: #edf3d9; border-color: #bfce8c; }
button.secondary:hover { background: #e1edbe; }
.text-button { border: 0; background: transparent; color: #55732e; padding: 0; font-size: 11px; font-weight: 750; }
.text-button:hover { color: #263c22; background: transparent; }
.feedback { min-height: 18px; margin: 11px 0 0; color: #527e45; font-size: 12px; }
.hidden { display: none; }
.state-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.state { min-height: 96px; display: grid; align-content: space-between; gap: 14px; padding: 12px; text-align: left; background: #fff; color: var(--ink); border-color: var(--line); }
.state strong { color: #66802f; font: 700 11px ui-monospace, monospace; }
.state:hover { color: var(--ink); background: #eff5dd; border-color: #9db86b; }
.schedule-list { border-top: 1px solid var(--line); }
.schedule { display: grid; grid-template-columns: 105px 1fr auto; align-items: center; gap: 18px; min-height: 52px; border-bottom: 1px solid #dde2dc; }
.schedule-time { color: var(--ink); font: 700 15px ui-monospace, monospace; }
.schedule-status { color: var(--muted); font-size: 12px; }
.schedule button { padding: 7px 11px; font-size: 11px; }
.empty { margin: 0; padding: 16px 0; color: var(--muted); font-size: 13px; }
.answer-section { padding: 25px 18px 30px; background: var(--warm); border-top-color: #bac6b4; }
.export-actions { display: flex; gap: 16px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.metric { min-height: 90px; padding: 15px 14px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric b { display: block; color: var(--ink); font: 700 28px/1 ui-monospace, monospace; }
.metric span { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 9px; border-bottom: 1px solid #dde2dc; text-align: left; white-space: nowrap; }
th { color: var(--muted); font: 700 10px ui-monospace, monospace; letter-spacing: .05em; }
td { color: var(--ink); }
.status-rail { min-height: 100dvh; padding: 45px 20px; border-left: 1px solid var(--line); background: #edf0e9; }
.status-rail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 38px; }
.status-rail-head .rail-caption { margin: 0; color: #66766d; }
.live-label { color: #607344; font: 700 9px ui-monospace, monospace; }
.live-label i { width: 5px; height: 5px; margin: 0 4px 1px 0; }
.status-block { display: grid; gap: 8px; padding: 15px 0; border-top: 1px solid var(--line); }
.status-block span { color: var(--muted); font-size: 11px; }
.status-block strong { color: var(--ink); font: 700 25px/1 ui-monospace, monospace; }
.status-block small { color: var(--muted); font: 400 11px ui-sans-serif, sans-serif; }
.status-note { margin-top: 35px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.65; }
@media (max-width: 1020px) {
  .workbench { grid-template-columns: 190px minmax(0, 1fr); }
  .status-rail { display: none; }
  .workbench-main { padding-right: clamp(24px, 5vw, 60px); }
}
@media (max-width: 700px) {
  .workbench, .admin-workbench { display: block; }
  .protocol-rail { min-height: auto; padding: 15px 17px; }
  .rail-caption { margin: 20px 0 9px; }
  .protocol-nav { grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .admin-workbench .protocol-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .protocol-nav a { grid-template-columns: 1fr; gap: 4px; padding: 8px 6px; border-left: 0; border-bottom: 2px solid transparent; font-size: 11px; }
  .protocol-nav a:hover, .protocol-nav a.active { border-left: 0; border-bottom-color: var(--accent); }
  .rail-foot { display: flex; flex-wrap: wrap; gap: 10px 17px; margin-top: 18px; }
  .workbench-main { padding: 28px 17px 52px; }
  .workspace-head { display: block; }
  .head-meta { display: flex; justify-content: space-between; margin-top: 17px; text-align: left; }
  h1 { font-size: 36px; }
  .lede { margin: 16px 0 33px; }
  .form-grid, .register-form, .admin-form { grid-template-columns: 1fr; }
  .button-row { display: grid; grid-template-columns: 1fr; }
  .button-row button { width: 100%; }
  .section-heading { flex-wrap: wrap; }
  .heading-action { margin-left: 42px; }
  .state-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state { min-height: 78px; }
  .schedule { grid-template-columns: 78px 1fr auto; gap: 9px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
