@font-face {
  font-family: Barlow Semi Condensed;
  src: url("fonts/barlow-semi-condensed-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Barlow Semi Condensed;
  src: url("fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow Semi Condensed;
  src: url("fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #f6f7f1;
  --ink: #182d25;
  --forest: #173e30;
  --subtle: #4b6558;
  --rule: #cbd4ca;
  font-family: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 4px solid var(--forest); }
a { color: var(--forest); text-underline-offset: .18em; }
a:hover { color: #097143; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button { padding: 9px 20px; border: 1px solid #899c8e; background: transparent; border-radius: 4px; color: var(--ink); font-size: 17px; font-weight: 500; }
button:disabled { cursor: default; color: #5d6d62; background: #f0f2ea; border-color: #cbd2c6; }
button:enabled:hover { background: #e8efe5; }
:focus-visible { outline: 2px solid #389260; outline-offset: 4px; }
.mast { border-bottom: 1px solid var(--rule); }
.mast-in, main { width: min(1232px, 100%); margin-inline: auto; padding-inline: clamp(18px, 5vw, 70px); }
.mast-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); font-size: 31px; font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.wordmark svg { width: 29px; height: 33px; }
.edition { color: var(--subtle); border-left: 1px solid #b7c3b7; padding-left: 16px; font-size: 17px; }
.guide-link { margin-left: auto; text-decoration: none; font-size: 18px; }
.guide-link span { margin-left: 4px; }
.guide-link:hover { text-decoration: underline; }
main { padding-bottom: 40px; }
.title { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-block: clamp(28px, 4vw, 48px) 25px; }
.title h1 { margin: 0; font-size: clamp(42px, 5.5vw, 70px); line-height: 1; font-weight: 300; letter-spacing: -.045em; }
.title p { margin: 10px 0 0; color: var(--subtle); font-size: 19px; line-height: 1.35; }
button.primary { background: var(--forest); border-color: var(--forest); color: #fff; border-radius: 4px; padding: 11px 24px; white-space: nowrap; font-size: 19px; font-weight: 400; }
button.primary:enabled:hover { background: #24543f; }
button.primary:disabled { background: #5b7064; color: #fff; border-color: #5b7064; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .34fr); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; }
.plotpanel { padding: 18px 22px 13px; min-width: 0; }
.plotbar, .plotfoot, .actions, .readout, .meters-head, .switch > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plotbar label { font-size: 13px; color: var(--subtle); margin-right: 8px; }
.plotbar select { padding: 5px 9px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; color: var(--ink); font-size: 17px; }
.plot { height: clamp(235px, 31vh, 330px); position: relative; margin-block: 17px 7px; }
#chart { width: 100%; height: 100%; display: block; }
#chart text { font-family: "Barlow Semi Condensed", Arial, sans-serif; font-size: 13px; }
#empty { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); text-align: center; padding: 2px 12px; background: #fff; color: #52685b; font-size: 17px; }
.plotfoot { font-size: 14px; color: var(--subtle); }
.plotfoot i { display: inline-block; width: 22px; height: 2px; background: #246745; vertical-align: middle; margin-right: 3px; }
.metrics { padding: 20px 17px 13px; border-left: 1px solid var(--rule); background: #eaf0e6; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.meters-head { align-items: baseline; gap: 8px; padding-bottom: 11px; }
.meters-head h2 { font-size: 21px; letter-spacing: -.02em; line-height: 1; font-weight: 400; margin: 0; }
.state { display: inline-flex; gap: 5px; align-items: center; color: var(--subtle); font-size: 13px; }
.state i { background: #7b877e; width: 6px; height: 6px; border-radius: 50%; }
.state[data-kind="connected"] i { background: #34754d; }
.state[data-kind="waiting"] i { background: #a77829; }
.readout, .switch { padding-block: 7px; border-top: 1px solid #c8d5c7; font-size: 16px; }
.readout strong { font-size: 30px; font-weight: 300; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.readout small { font-size: 14px; color: var(--subtle); margin-left: 4px; }
.switch { padding-bottom: 0; }
.switch strong { font-weight: 400; }
.smallcheck { display:flex; align-items:center; justify-content:flex-end; color:var(--subtle); font-size:14px; gap:4px; margin-top:4px; cursor:pointer; }
.smallcheck input { accent-color:var(--green, #275743); margin:0; }
.actions { padding: 17px 1px 19px; }
.actions > div { display: flex; align-items: center; gap: 12px; }
.actions p { font-size: 16px; margin: 0; color: var(--subtle); }
details { border-top: 1px solid var(--rule); padding: 15px 0; }
summary { font-size: 17px; font-weight: 400; color: var(--forest); }
details p, .phone-note { max-width: 80ch; font-size: 17px; line-height: 1.45; }
details p { margin: 12px 0 0; }
details strong, .phone-note strong { font-weight: 500; }
.phone-note { display: none; }
#message { border-left: 2px solid #72917b; background: #eaf0e5; padding: 9px 14px; margin-bottom: 16px; font-size: 17px; }
#message[data-tone="error"] { border-color: #ac764e; background: #f7efe4; }
@media (max-width: 810px) {
  .workspace { grid-template-columns: 1fr; }
  .metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 22px; border-left: 0; border-top: 1px solid var(--rule); }
  .meters-head { grid-column: 1/-1; padding-bottom: 0; }
  .readout { align-items: baseline; }
}
@media (max-width: 610px) {
  .mast-in { min-height: 59px; gap: 10px; }
  .wordmark { font-size: 27px; }
  .wordmark svg { width: 24px; height: 28px; }
  .edition { font-size: 15px; padding-left: 10px; }
  .guide-link { font-size: 16px; }
  .title { display: block; margin-top: 26px; margin-bottom: 15px; }
  .title p { font-size: 17px; }
  .title button { margin-top: 14px; }
  .phone-note { display: block; font-size: 16px; margin-bottom: 16px; }
  .kit-url { overflow-wrap: anywhere; }
  .plotpanel { padding: 12px; }
  .plotbar label { display: block; font-size: 14px; margin-bottom: 4px; }
  .plotbar select { max-width: 145px; font-size: 16px; padding: 5px; }
  .plot { height: 196px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 18px; padding: 13px; }
  .readout, .switch { font-size: 15px; }
  .switch { grid-column: 1/-1; display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
  .switch > div { gap: 8px; }
  .actions > div { flex-direction: column; align-items: flex-start; gap: 5px; }
  .actions > div:last-child { flex-direction: column-reverse; align-items: flex-end; }
}
.edition, .guide-link { white-space: nowrap; }
main:has(.state[data-kind="connected"]) .phone-note { display: none; }
@media (max-width: 365px) {
  .mast-in { gap: 8px; }
  .wordmark { font-size: 24px; gap: 5px; }
  .wordmark svg { width: 21px; }
  .edition { font-size: 14px; padding-left: 8px; }
  .guide-link { font-size: 15px; }
  .guide-link span { display: none; }
}

.title { display: block; margin-bottom: 16px; }
.title p:empty { display: none; }
.start-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 19px; }
.start-path { border-left: 2px solid #b7c9b7; padding: 5px 15px 7px; display: grid; grid-template-rows: auto 1fr auto; justify-items: start; }
.start-path h2 { margin: 0; font-size: 23px; line-height: 1.1; font-weight: 400; }
.start-path p { margin: 6px 0 10px; font-size: 17px; line-height: 1.3; color: var(--subtle); }
.start-path strong { font-weight: 500; }
#connectionPath { grid-template-rows: 1fr auto; }
.start-path .primary, .wire-link { line-height: 1.2; font-size: 17px; padding: 8px 15px; }
.wire-link { display: inline-flex; align-items: center; gap: 8px; color: var(--forest); text-decoration: none; border: 1px solid #8aab94; border-radius: 4px; }
.wire-link:hover { background: #e8efe5; }
main[data-stream="on"] .title { margin-right: 110px; min-height: 74px; }
main[data-stream="on"] { position: relative; }
main[data-stream="on"] .start-paths { display: block; position: absolute; right: clamp(18px,5vw,70px); top: 0; }
main[data-stream="on"] #assemblyPath, main[data-stream="on"] .connect-help { display:none; }
main[data-stream="on"] #connectionPath { border: 0; padding: 6px 0; }
.sensor-tip { padding: 10px 14px; font-size: 17px; line-height: 1.4; background: #f4eee1; border-left: 2px solid #aa8545; margin-bottom: 16px; }
.sensor-tip a { white-space: nowrap; }
@media(max-width: 610px) {
  .start-paths { grid-template-columns: 1fr; gap: 10px; }
  .start-path { padding: 2px 0 4px 11px; }
  .start-path h2 { font-size: 21px; }
  .start-path p { margin: 3px 0 6px; }
  .title h1 { font-size: 40px; }
  main[data-stream="on"] .title { margin-right: 0; min-height: 0; }
  main[data-stream="on"] .start-paths { position: static; }
  main[data-stream="on"] #connectionPath { padding-block: 0; }
}
