:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101e19;
  background: #f6f7f1;
  --background: #f6f7f1;
  --paper: #fff;
  --ink: #101e19;
  --muted: #4f5b53;
  --pine: #12392d;
  --pine-deep: #112923;
  --lime: #d3fb82;
  --lime-wash: #e8f7cc;
  --line: #d3dad2;
  --sidebar-width: clamp(208px, 17.5vw, 264px);
  --page-inset: clamp(25px, 3vw, 48px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 20px; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #457448;
  outline-offset: 3px;
}
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
.icon-library { display: none; }
.icon {
  display: inline-block;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.small-icon { width: 17px; height: 17px; }
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 10;
  transform: translateY(-180%);
  padding: .75rem;
  border-radius: .5rem;
  background: var(--paper);
}
.skip-link:focus { transform: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 29px 14px 22px;
  background: var(--pine-deep);
  color: #f4f8f4;
}
.brand {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: fit-content;
  margin: 0 14px 39px;
  text-decoration: none;
}
.brand img { margin-top: 4px; }
.brand strong {
  display: block;
  font-size: 40px;
  font-weight: 850;
  line-height: .99;
  letter-spacing: -.047em;
}
.brand small { display: block; margin-top: 7px; font-size: 17px; font-weight: 510; }
.nav { display: flex; flex: 1; flex-direction: column; gap: 13px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 55px;
  padding: 9px 16px;
  border-radius: 11px;
  font-weight: 520;
  font-size: 18px;
  text-decoration: none;
}
.nav a:hover { background: #213d34; }
.nav a[aria-current] { color: #102619; background: var(--lime); font-weight: 700; }
.nav a:focus-visible, .brand:focus-visible { outline-color: var(--lime); }
.nav .nav-simulator {
  position: relative;
  margin-top: auto;
}
.nav-simulator::before {
  position: absolute;
  top: -13px;
  right: 6px;
  left: 6px;
  border-top: 1px solid #658077;
  content: "";
}

.main {
  width: calc(100% - var(--sidebar-width));
  max-width: 1700px;
  margin-left: var(--sidebar-width);
  padding: 0 var(--page-inset) 42px;
}
.topbar, .top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar {
  justify-content: space-between;
  min-height: 69px;
  border-bottom: 1px solid #b6c1b7;
  font-size: 17px;
  font-weight: 650;
  color: var(--pine-deep);
}
.mode-tag, .quiet-button {
  border: 1px solid var(--pine);
  border-radius: 9px;
  padding: 7px 13px;
  background: transparent;
  color: var(--pine);
  font-size: 14px;
  font-weight: 650;
}
.quiet-button:hover { background: var(--paper); }
.heading { margin: 25px 0 26px; }
.heading h1 {
  font-size: clamp(40px, 4.9vw, 73px);
  font-weight: 850;
  line-height: .99;
  letter-spacing: -.035em;
}
.heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(16px, 1.53vw, 23px);
  line-height: 1.35;
}
.station {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 103px;
  margin-bottom: 22px;
  padding: 17px 26px;
  border-radius: var(--radius);
  background: var(--pine);
  color: #f7faf6;
}
.station h2 { font-size: clamp(23px, 2.5vw, 37px); font-weight: 790; line-height: 1.06; }
.station-connection {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 550;
}
.dot { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; background: #e5ba68; }
.dot[data-online="true"] { background: #8cf124; }
.station-sync {
  flex: 0 0 26%;
  display: grid;
  gap: 4px;
  min-width: 185px;
  padding-left: clamp(17px, 3.3vw, 49px);
  border-left: 1px solid #a6b9af;
  font-size: clamp(15px, 1.4vw, 21px);
  line-height: 1.16;
}
.station-sync strong { font-size: clamp(19px, 1.85vw, 27px); letter-spacing: -.025em; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 0; margin-bottom: 22px; }
.stats > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 22px;
  align-items: center;
  padding: 7px clamp(12px, 2.65vw, 39px);
}
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: clamp(14px, 1.36vw, 20px); font-weight: 630; }
.stats dd {
  grid-column: 2;
  color: var(--pine);
  font-size: clamp(35px, 4.5vw, 66px);
  font-weight: 840;
  line-height: 1.03;
  letter-spacing: -.065em;
  font-variant-numeric: tabular-nums;
}
.stat-note { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 550; letter-spacing: 0; }
.stats .icon { align-self: end; width: 29px; height: 29px; color: var(--pine-deep); }
.station-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 17px; margin-bottom: 22px; }
.list-panel { min-width: 0; padding: 24px 24px 13px; }
.list-panel h2 {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  font-size: clamp(21px, 2.04vw, 30px);
  font-weight: 790;
  line-height: 1.12;
}
.list-panel h2 .icon { width: 31px; height: 31px; color: var(--pine-deep); }
.records { list-style: none; padding: 0; }
.record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  min-height: 85px;
  padding: 12px 0;
}
.record.machine { grid-template-columns: auto minmax(0, 1fr) minmax(145px, .82fr) auto; }
.record + .record { border-top: 1px solid var(--line); }
.record .icon { color: var(--pine-deep); }
.record strong, .record .name-button { display: block; font-size: clamp(16px, 1.39vw, 21px); font-weight: 750; letter-spacing: -.025em; }
.record .meta { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.record.session { grid-template-columns: minmax(0, 1fr) auto; }
.record.audit { grid-template-columns: minmax(0, 1fr) auto; min-height: 62px; }
.record.empty { display: flex; color: var(--muted); font-size: 15px; }
.name-button { padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.name-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 99px;
  background: #edf0ed;
  color: #26362d;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}
.status::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; content: ""; }
.status.good { background: var(--lime-wash); color: #254719; }
.status.alert { background: #f7edce; color: #664b13; }
.status.error { background: #f7e5e0; color: #792e25; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 8px 17px;
  border: 1px solid var(--pine);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 660;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}
.button.outline { background: transparent; color: var(--pine); }
.button.outline:hover { background: #f0f6e7; }
.button.primary { background: var(--pine); color: #fff; }
.button.primary:hover { background: #20523e; }
.button.compact { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.credits-panel, .utility-details { margin-bottom: 18px; }
.utility-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 95px;
  padding: 16px 24px;
}
.utility-row > .icon { width: 34px; height: 34px; color: var(--pine-deep); }
.utility-row h2 { font-size: clamp(21px, 1.77vw, 26px); font-weight: 790; line-height: 1.15; }
.utility-row p { margin-top: 5px; font-size: clamp(14px, 1.12vw, 17px); color: var(--muted); line-height: 1.36; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary:hover .summary-control { background: #f0f6e7; }
details[open] > summary .small-icon { transform: rotate(180deg); }
.panel-continuation {
  margin: 0 24px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.panel-continuation h3 { font-size: 18px; }
.panel-continuation > p { margin-bottom: 14px; color: var(--muted); }
.metrics-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metrics div { display: grid; gap: 4px; }
.metrics dt { color: var(--muted); font-size: 14px; }
.metrics dd { font-size: 21px; font-weight: 730; }
.simulator-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }

.gate { max-width: 530px; padding: 23px; margin: 30px 0; }
.gate h1 { font-size: clamp(23px, 3vw, 35px); }
.gate p { margin: 9px 0 15px; color: var(--muted); }
.gate button { justify-self: start; margin-top: 6px; }
.notice { margin: 16px 0; padding: 11px 15px; border-radius: 9px; background: var(--lime-wash); color: #254719; }
.notice.error { background: #f7e5e0; color: #792e25; }
dialog {
  width: min(500px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: #10241c99; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.dialog-head h2 { margin: 5px 0; font-size: 25px; }
.icon-button { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border: 0; border-radius: 9px; color: var(--pine); background: #edf2eb; }
.icon-button:hover { background: var(--lime-wash); }
.icon-button .icon { width: 20px; height: 20px; }
form { display: grid; gap: 7px; }
label { font-size: 14px; font-weight: 680; }
input, select, textarea {
  width: 100%;
  min-height: 43px;
  padding: 7px 9px;
  border: 1px solid #899d90;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}
textarea { resize: vertical; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-pair > div { display: grid; gap: 7px; }
.form-error { padding: 7px 0; color: #862c23; font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.detail-info { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; gap: 10px 14px; margin-bottom: 15px; }
.detail-info dt { color: var(--muted); }
.detail-info dd { overflow-wrap: anywhere; font-weight: 610; }
.detail-note { color: var(--muted); margin-top: 14px; font-size: 14px; line-height: 1.4; }

@media (max-width: 1100px) {
  .station-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
  .list-panel { padding-right: 15px; padding-left: 15px; }
  .record { gap: 9px; }
  .machine-symbol { display: none; }
  .record.machine { grid-template-columns: minmax(0, 1fr) auto auto; }
  .record.session { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

@media (max-width: 850px) {
  :root { --sidebar-width: 169px; --page-inset: 19px; }
  .sidebar { padding-inline: 9px; }
  .brand { margin-left: 8px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand strong { font-size: 35px; }
  .nav a { gap: 10px; padding-inline: 9px; font-size: 16px; }
  .nav a .icon { width: 23px; height: 23px; }
  .station-grid { grid-template-columns: minmax(0, 1fr); }
  .record.session { grid-template-columns: minmax(0, 1fr) auto; }
  .stats > div { gap: 4px 10px; }
  .stats .icon { width: 21px; height: 21px; }
}

@media (max-width: 610px) {
  html { scroll-padding-top: 12px; }
  .sidebar { position: static; width: auto; padding: 15px 14px 11px; gap: 13px; }
  .brand { margin: 0; align-items: center; }
  .brand img { width: 26px; height: 26px; margin: 0; }
  .brand span { display: flex; align-items: baseline; gap: 8px; }
  .brand strong { font-size: 30px; }
  .brand small { margin: 0; font-size: 13px; }
  .nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 3px; }
  .nav a { display: grid; justify-items: center; align-content: center; min-height: 45px; gap: 4px; padding: 5px 2px; white-space: nowrap; font-size: 11px; border-radius: 7px; }
  .nav a .icon { width: 16px; height: 16px; }
  .nav .nav-simulator { margin: 0; }
  .nav-simulator::before { display: none; }
  .main { width: auto; margin: 0; padding: 0 14px 28px; }
  .topbar { min-height: 55px; font-size: 15px; }
  .top-actions { gap: 7px; }
  .mode-tag, .quiet-button { padding: 6px 7px; font-size: 12px; }
  .heading { margin: 22px 0 19px; }
  .station { gap: 12px; min-height: auto; padding: 13px; margin-bottom: 14px; }
  .station h2 { font-size: 21px; }
  .station-connection { gap: 6px; font-size: 13px; }
  .station-connection .dot { width: 9px; height: 9px; }
  .station-sync { flex: 0 1 auto; min-width: 0; padding-left: 10px; font-size: 12px; }
  .station-sync strong { font-size: 16px; }
  .stats { margin-bottom: 14px; padding: 9px 0; }
  .stats > div { gap: 3px 7px; padding-inline: 9px; }
  .stats dt { font-size: 12px; }
  .stats dd { font-size: 30px; }
  .stats .icon { width: 17px; height: 17px; }
  .station-grid { margin-bottom: 14px; }
  .list-panel { padding-top: 16px; }
  .list-panel h2 { margin-bottom: 8px; }
  .list-panel h2 .icon { width: 24px; height: 24px; }
  .record { min-height: 65px; }
  .record .meta { font-size: 13px; }
  .status { font-size: 11px; padding: 5px 7px; gap: 4px; }
  .status::before { width: 5px; height: 5px; }
  .button.compact { gap: 3px; min-height: 42px; padding-inline: 6px; }
  .button.compact .icon { width: 14px; height: 14px; }
  .utility-row { grid-template-columns: auto minmax(0, 1fr); min-height: 0; padding: 14px; gap: 9px; }
  .utility-row > .icon { width: 25px; height: 25px; align-self: start; }
  .utility-row .button { grid-column: 2; justify-self: start; }
  .panel-continuation { margin-inline: 14px; }
  .metrics-title { padding-inline: 14px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 375px) {
  .record.machine { grid-template-columns: minmax(0, 1fr) auto; }
  .record.machine .button { grid-column: 2; justify-self: end; }
}

@media (forced-colors: active) {
  .dot, .status::before { background: CanvasText; }
}
