:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #24343b;
  background: #f5f6f3;
  font-synthesis: none;
  --ink: #17352c;
  --green: #187452;
  --muted: #73807f;
  --line: #e3e8e2;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #7ebfaa;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #91bfaa;
  outline-offset: 1px;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.sidebar {
  width: 230px;
  background: #17352c;
  color: #dce8df;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 36px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 750;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2.1px;
  color: #9fb7ab;
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: #a9dbac;
  color: #17352c;
  font-size: 28px;
  width: 39px;
  height: 43px;
  border-radius: 11px;
  font-style: italic;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 2px;
  color: #8da99a;
  margin: 58px 12px 17px;
}
.nav-item {
  display: flex;
  gap: 12px;
  padding: 13px 12px;
  font-size: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.nav-item.active {
  background: #2c483e;
  color: #edfaec;
}
.nav-item span {
  font-size: 16px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  padding: 16px 10px;
  border-top: 1px solid #355045;
}
.sidebar-bottom small {
  display: block;
  color: #9fb7ab;
  font-size: 10px;
  margin: 8px 0 0 14px;
}
.shell {
  margin-left: 230px;
}
.topbar {
  height: 74px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #7b8780;
  background: #fbfcf9;
}
.topbar strong {
  font-weight: 500;
  color: #314339;
}
.slash {
  padding: 0 14px;
  color: #afbbb1;
}
.db-status {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5aeaa;
  vertical-align: middle;
  margin-right: 5px;
}
.dot.green {
  background: #5db481;
}
.dot.bad {
  background: #c36b3b;
}
main {
  max-width: 1530px;
  margin: auto;
  padding: 35px 40px 18px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 27px;
  gap: 15px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #7e8e80;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.05px;
  line-height: 1.3;
  margin: 8px 0 9px;
  font-weight: 620;
  color: #183a2c;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.45px;
  line-height: 1.35;
  margin: 5px 0 0;
  font-weight: 620;
}
p {
  margin: 0;
  color: var(--muted);
}
.page-heading p {
  font-size: 12px;
}
.station-tag {
  font-size: 8px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  color: #879389;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 13px;
}
.station-tag b {
  font-size: 11px;
  margin-left: 8px;
  color: #466050;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 6px #1d402503;
}
.profile-card {
  margin-bottom: 20px;
}
.profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 23px;
}
.profile-emblem {
  background: #eef3e8;
  color: #617d40;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 23px;
}
.profile-selector label {
  display: block;
  color: #819084;
  font-size: 10px;
}
.profile-selector select {
  border: 0;
  padding: 0 25px 0 0;
  background: #fff;
  min-height: 25px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  max-width: 260px;
}
.revision {
  font-size: 9px;
  border: 1px solid #dde6d7;
  border-radius: 20px;
  padding: 2px 8px;
  color: #78916d;
}
.profile-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  min-height: 38px;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button.primary {
  background: #1d654a;
  color: white;
  border-color: #1d654a;
  box-shadow: 0 3px 5px #1d654a15;
}
.button.primary:hover:not(:disabled) {
  background: #164e39;
}
.button.secondary {
  color: #41594a;
  background: #fff;
  border-color: #d9e1d6;
}
.button.subtle {
  background: transparent;
  color: #697d6c;
}
.button.large {
  min-height: 46px;
  padding: 13px 22px;
  font-size: 12px;
}
.button.large span {
  margin-left: 15px;
}
.profile-summary {
  border-top: 1px solid #eef1eb;
  padding: 10px 24px;
  display: flex;
  gap: 25px;
  font-size: 10px;
  color: #8a9688;
  background: #fcfdfb;
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
}
.profile-summary span:before {
  content: '·';
  padding-right: 7px;
  color: #608461;
}
.connections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 23px;
}
.connection-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.connection-icon {
  width: 39px;
  height: 41px;
  background: #f5f6f2;
  border: 1px solid #e7ece2;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #68826b;
  flex-shrink: 0;
}
.connection-info {
  flex: 1;
  min-width: 0;
}
.connection-info .eyebrow {
  font-size: 8px;
}
.connection-info h2 {
  font-size: 13px;
  letter-spacing: 0;
  margin: 3px 0 5px;
}
.connection-info p {
  font-size: 10px;
}
.connect-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.connect-actions select {
  padding: 6px;
  width: 75px;
  min-height: 36px;
  font-size: 10px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}
.work-card,
.preview-card {
  padding: 26px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8b9a87;
  background: #f3f6ee;
  border: 1px solid #e3eadb;
  padding: 5px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.pill.active {
  color: #216e51;
  background: #e7f5ec;
}
.pill.error {
  color: #995327;
  background: #fff0e3;
}
.run-intro {
  font-size: 11px;
  margin: 13px 0 23px;
  min-height: 34px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.steps li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 24px;
}
.steps li:before {
  content: '';
  position: absolute;
  top: 31px;
  left: 14px;
  bottom: 3px;
  width: 1px;
  background: #e7ece3;
}
.steps li:last-child {
  padding-bottom: 0;
}
.steps li:last-child:before {
  display: none;
}
.steps li > span {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #f7f8f4;
  border: 1px solid #e4e9df;
  color: #92a08c;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
  z-index: 1;
}
.steps strong {
  display: block;
  font-size: 12px;
  color: #5d6f61;
  font-weight: 600;
  margin: 2px 0 3px;
}
.steps small {
  font-size: 10px;
  color: #97a191;
  display: block;
}
.steps li b {
  margin-left: auto;
  color: #268160;
  font-size: 13px;
}
.steps li.active > span {
  border-color: #a2c1a1;
  background: #e7f2e7;
  color: #397346;
}
.steps li.active strong,
.steps li.done strong {
  color: #214d36;
}
.steps li.done > span {
  background: #276749;
  color: white;
  border-color: #276749;
}
.steps li.done:before {
  background: #a4c8a2;
}
.run-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.run-footnote {
  font-size: 9px;
  line-height: 1.7;
  color: #919d8c;
  margin-top: 15px;
}
.dimension {
  font-size: 10px;
  color: #879782;
  border: 1px solid #e8eee0;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.preview-card {
  background: linear-gradient(140deg, #fbfcf8, #f5f8f0);
  display: flex;
  flex-direction: column;
}
.preview-caption {
  display: flex;
  justify-content: space-between;
  color: #8b9980;
  font-size: 8px;
  letter-spacing: 1.4px;
  font-weight: 650;
  margin: 24px 0 10px;
}
.label-surface {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 13px #36532a0a;
  border: 1px solid #e2e8db;
  padding: 0;
  max-width: 400px;
  aspect-ratio: 7/3;
  width: 100%;
  align-self: center;
  overflow: hidden;
}
.label-surface img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: contain;
}
.preview-url {
  font-size: 10px;
  color: #77926c;
  text-align: center;
  word-break: break-all;
  margin: 12px 0 0;
}
.preview-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 20px;
  margin-top: auto;
  color: #769369;
}
.preview-note > span {
  font-size: 18px;
}
.preview-note strong {
  font-size: 10px;
  color: #608153;
  display: block;
  margin-bottom: 4px;
}
.preview-note p {
  font-size: 9px;
  line-height: 1.8;
  color: #94a087;
}
.device-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 12px;
  border: 1px solid #dcebdc;
  background: #f4faf4;
  padding: 18px;
  border-radius: 10px;
  margin: 0 0 22px;
}
.device-result span {
  font-size: 8px;
  letter-spacing: 1px;
  color: #849681;
  display: block;
  margin-bottom: 4px;
}
.device-result strong {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  color: #235036;
}
.device-result > div:last-child strong {
  font-size: 10px;
}
.terminal-card {
  padding: 24px;
  margin-bottom: 26px;
  min-width: 0;
}
.terminal-card .section-title,
.terminal-actions {
  flex-wrap: wrap;
}
.terminal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.terminal-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.terminal-actions input {
  width: auto;
}
.terminal-note {
  font-size: 11px;
  line-height: 1.6;
  color: #667361;
  margin: 12px 0 0;
}
.serial-terminal {
  background: #101b18;
  color: #dce8e2;
  border-radius: 10px;
  height: 340px;
  overflow: auto;
  padding: 14px;
  margin-top: 14px;
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.serial-terminal:empty::before {
  content: 'Waiting for serial traffic…';
  color: #a5b7ab;
}
.terminal-entry {
  padding: 8px 0;
  border-bottom: 1px solid #2b3e35;
}
.terminal-entry strong {
  color: #b5c5bd;
}
.terminal-tx strong {
  color: #82c9ff;
}
.terminal-rx strong {
  color: #8de4a6;
}
.terminal-error strong {
  color: #ffad9d;
}
.terminal-entry pre {
  margin: 4px 0 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.history-card {
  padding: 24px;
}
.count {
  font-size: 10px;
  background: #eef4e8;
  color: #70945a;
  border-radius: 6px;
  padding: 3px 7px;
  vertical-align: middle;
  margin-left: 7px;
}
.search {
  display: flex;
  align-items: center;
  gap: 4px;
}
.search input {
  font-size: 11px;
  width: 200px;
  min-height: 36px;
}
.table-wrap {
  overflow: auto;
  margin-top: 21px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  font-size: 9px;
  color: #889582;
  font-weight: 500;
  background: #f8faf5;
  padding: 10px 13px;
  border-bottom: 1px solid #e9eee3;
}
td {
  padding: 15px 13px;
  font-size: 11px;
  border-bottom: 1px solid #edf1e8;
  color: #5b6d57;
}
td strong {
  color: #294f37;
  font-family: ui-monospace, monospace;
  font-weight: 500;
}
td small {
  display: block;
  font-size: 9px;
  color: #91a084;
  margin-top: 2px;
}
td.empty {
  text-align: center;
  padding: 35px;
  color: #9aa58e;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #9aa58e;
  font-size: 9px;
  padding: 20px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce4d6;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: #324c38;
  min-height: 38px;
  font-size: 12px;
}
textarea {
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 10px;
}
label {
  display: block;
  font-size: 10px;
  font-weight: 550;
  color: #6b7e60;
  margin: 15px 0 6px;
}
.settings-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 22px 24px 0;
}
.settings-intro p {
  font-size: 11px;
  margin-top: 5px;
}
.icon-button {
  border: 0;
  background: #f3f6f0;
  border-radius: 7px;
  font-size: 23px;
  color: #849778;
  line-height: 1;
  width: 32px;
  height: 32px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
  padding: 25px;
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-size: 12px;
  font-weight: 650;
  color: #456239;
  margin-bottom: 5px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.input-suffix {
  display: flex;
  border: 1px solid #dce4d6;
  border-radius: 7px;
  align-items: center;
  padding-right: 10px;
  font-size: 10px;
  color: #9eac94;
}
.input-suffix input {
  border: 0;
  min-width: 0;
  padding-right: 4px;
}
.form-note {
  font-size: 10px;
  color: #99a58e;
  line-height: 1.8;
  margin-top: 12px;
}
.upload-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.upload-heading label {
  margin: 8px 0;
}
.file-button {
  font-size: 9px;
  text-decoration: underline;
  cursor: pointer;
}
input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.logo-upload {
  background: #f7f9f3;
  border: 1px dashed #dce5d3;
  border-radius: 9px;
  padding: 14px;
  margin: 14px 0;
}
.logo-upload img {
  width: 100%;
  height: 62px;
  object-fit: contain;
  display: block;
}
.logo-upload .button {
  width: 100%;
  margin: 13px 0 4px;
  cursor: pointer;
}
.logo-upload small {
  display: block;
  font-size: 9px;
  text-align: center;
  color: #97a38e;
}
.settings-footer {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.settings-footer span {
  font-size: 10px;
  color: #899b7b;
}
.notice {
  border: 1px solid #ead8bf;
  background: #fff8ec;
  color: #997242;
  font-size: 12px;
  border-radius: 10px;
  padding: 13px 17px;
  margin-bottom: 20px;
}
.toast {
  position: fixed;
  right: 28px;
  bottom: 25px;
  background: #214d37;
  color: #fff;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 12px;
  box-shadow: 0 8px 30px #18392020;
  max-width: calc(100vw - 40px);
  z-index: 5;
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
}
@media (min-width: 1550px) {
  main {
    padding-top: 43px;
  }
  .work-card,
  .preview-card {
    padding: 32px;
  }
  .label-surface {
    max-width: 420px;
  }
  .steps li {
    padding-bottom: 32px;
  }
  .run-intro {
    margin-bottom: 30px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 185px;
    padding: 32px 14px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .shell {
    margin-left: 185px;
  }
  main {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .station-tag {
    display: none;
  }
  .connection-card {
    flex-wrap: wrap;
  }
  .connection-card > .button,
  .connect-actions {
    margin-left: 52px;
  }
  .connections {
    gap: 15px;
  }
  .work-card,
  .preview-card {
    padding: 22px;
  }
  .settings-grid {
    gap: 20px;
    padding: 20px;
  }
  .workspace-grid {
    gap: 16px;
  }
  .profile-actions {
    gap: 1px;
  }
  .button {
    padding: 9px 12px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .shell {
    margin: 0;
  }
  .topbar {
    height: 59px;
  }
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid fieldset:last-child {
    grid-column: 1/-1;
    max-width: 470px;
    width: 100%;
  }
  .workspace-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-actions .subtle {
    font-size: 10px;
  }
  .search input {
    width: 165px;
  }
}
@media (max-width: 650px) {
  main {
    padding: 24px 16px;
  }
  .topbar {
    padding: 0 16px;
    font-size: 10px;
  }
  .db-status {
    font-size: 9px;
  }
  h1 {
    font-size: 26px;
    max-width: 300px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 310px;
    line-height: 1.7;
  }
  .profile-bar {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .profile-emblem {
    width: 35px;
    height: 36px;
  }
  .profile-selector {
    flex: 1;
  }
  .profile-selector select {
    max-width: 190px;
  }
  .profile-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .profile-summary {
    padding: 10px 16px;
    gap: 7px 18px;
    font-size: 9px;
  }
  .connections {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .connection-card {
    padding: 16px;
    flex-wrap: nowrap;
  }
  .connection-card > .button,
  .connect-actions {
    margin-left: 0;
  }
  .connect-actions {
    flex-direction: column;
    gap: 4px;
  }
  .connect-actions select {
    width: 100%;
  }
  .connection-info h2 {
    font-size: 12px;
  }
  .connection-info p {
    font-size: 9px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .work-card,
  .preview-card {
    padding: 22px;
  }
  .preview-card {
    padding: 24px;
  }
  .label-surface {
    max-width: 400px;
  }
  .preview-note {
    padding-top: 22px;
  }
  .history-card {
    padding: 20px 16px;
  }
  .history-card > .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .search {
    width: 100%;
    margin-top: 8px;
  }
  .search input {
    flex: 1;
    width: 100%;
    min-width: 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 30px;
  }
  .settings-grid fieldset:last-child {
    grid-column: auto;
  }
  .settings-intro {
    padding: 20px 20px 0;
  }
  .settings-footer {
    padding: 16px 20px;
    align-items: flex-start;
  }
  .settings-footer span {
    max-width: 190px;
  }
  .settings-intro p {
    max-width: 260px;
  }
  .run-actions {
    gap: 8px;
  }
  .button.large {
    padding: 12px 16px;
  }
  .device-result {
    gap: 15px 10px;
    padding: 15px;
  }
  .device-result strong {
    font-size: 12px;
  }
  footer {
    font-size: 8px;
  }
  .steps small {
    font-size: 9px;
  }
  .topbar .slash {
    padding: 0 7px;
  }
}
