:root {
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: #152922;
  background: #f4f6f3;
  font-size: 16px;
  --ink: #182e26;
  --muted: #52675b;
  --green: #c9f56c;
  --border: #d9e1d8;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.62;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #69a538;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: #265730;
  text-underline-offset: 3px;
}
header {
  background: white;
  border-bottom: 1px solid var(--border);
}
.bar,
main,
footer {
  width: min(1180px, calc(100% - 80px));
  margin: auto;
}
.bar {
  display: flex;
  align-items: center;
  gap: 56px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 730;
  letter-spacing: -0.06em;
}
.brand b {
  font-weight: 450;
  margin-left: -5px;
}
.brand img {
  margin-right: 2px;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 24px;
}
nav button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #64726b;
  padding: 3px 0 0;
  font-size: 0.94rem;
}
nav button.active {
  border-color: #3d673a;
  color: var(--ink);
  font-weight: 650;
}
.status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: #f9fbf8;
  color: #435748;
  font-size: 0.81rem;
}
.status i,
.tiny-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ba99f;
}
.status.live i {
  background: #54881c;
  box-shadow: 0 0 0 3px #e0efcf;
}
.hero {
  margin: 28px 0 26px;
  border-radius: 16px;
  background: #162c24;
  color: #fbfff5;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 212px;
}
.intro {
  padding: 32px 16px 32px 38px;
  z-index: 1;
}
.eyebrow,
.kicker,
.schematicTitle,
.device small,
.footnote,
.mono {
  font-family: var(--mono);
}
.eyebrow,
.kicker,
.schematicTitle {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.eyebrow {
  color: #d3e2d1;
  display: flex;
  align-items: center;
  gap: 9px;
}
.signal {
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--green);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  letter-spacing: -0.063em;
  line-height: 1.03;
  font-weight: 600;
  margin: 13px 0 12px;
}
h1 em {
  color: var(--green);
  font-style: normal;
}
.intro p {
  line-height: 1.5;
  color: #d0dbd2;
  max-width: 445px;
}
.schematic {
  margin: 0 24px 0 8px;
  padding: 12px 22px 18px;
  border: 1px solid #476247;
  border-radius: 10px;
  background-color: #1a3026;
  background-image: radial-gradient(#466044 0.8px, transparent 0.9px);
  background-size: 12px 12px;
}
.schematicTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #c0d4a9;
  font-size: 0.7rem;
}
.cross {
  font-size: 1.25rem;
}
.drawing {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 86px;
  margin-top: 6px;
}
.drawing canvas {
  flex: 1;
  width: 5px;
  height: 78px;
  min-width: 0;
}
.device {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #d5edb8;
  width: 58px;
}
.device small {
  font-size: 0.77rem;
}
.chip,
.gate {
  height: 30px;
  width: 36px;
  display: block;
  position: relative;
}
.chip {
  border: 2px solid #c7ed9c;
  border-radius: 5px;
}
.chip:before {
  content: '';
  position: absolute;
  border: 1px solid #a5c58a;
  inset: 5px;
  border-radius: 2px;
}
.chip:after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  height: 3px;
  bottom: -7px;
  background: repeating-linear-gradient(
    90deg,
    #98bc7c 0 3px,
    transparent 3px 7px
  );
}
.gate:before,
.gate:after {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  height: 10px;
  border: 2px solid #c7ed9c;
  border-radius: 4px;
  background: radial-gradient(
    circle at 7px 5px,
    #c6ef96 1.5px,
    transparent 2px
  );
}
.gate:before {
  top: 0;
}
.gate:after {
  bottom: 0;
}
.viewhead,
.cardhead,
.modalhead,
.modalactions,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.viewhead {
  margin: 30px 0 18px;
}
.kicker {
  color: #687c6b;
  margin-bottom: 6px;
}
h2 {
  font-size: 1.8rem;
  letter-spacing: -0.048em;
  font-weight: 650;
}
h3 {
  font-size: 1.11rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.ghost,
.primary,
.mini,
.close {
  border: 1px solid #ccd7ca;
  border-radius: 7px;
  padding: 9px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 550;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.ghost:hover,
.mini:hover {
  background: #f0f5ec;
}
.primary {
  background: var(--green);
  border-color: #b3dc58;
  color: #1c331e;
  font-weight: 650;
  padding: 12px 16px;
}
.primary:hover {
  background: #bce857;
}
.flask {
  font-family: var(--mono);
  font-size: 1.18rem;
}
.wide {
  width: 100%;
}
.grid {
  display: grid;
  grid-template-columns: minmax(295px, 0.83fr) minmax(0, 1.57fr);
  gap: 20px;
  align-items: start;
}
.right {
  display: grid;
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 2px 3px #203a2110;
}
.cardhead {
  padding: 18px 22px;
  border-bottom: 1px solid #e4e9e2;
  justify-content: flex-start;
  gap: 11px;
}
.ico {
  background: #e7f2d8;
  color: #3d692c;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 400;
}
.ico.dark {
  background: #223d30;
  color: #d3f797;
}
.ico.neutral {
  background: #eff2ed;
  color: #4f6154;
}
.formcard form {
  padding: 22px;
}
label:not(.option),
legend {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
input:not([type='radio']),
textarea {
  width: 100%;
  background: #fbfcfa;
  color: var(--ink);
  border: 1px solid #becbbc;
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 0.94rem;
}
input::placeholder,
textarea::placeholder {
  color: #718077;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
legend {
  padding: 0;
}
.option {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.option:has(:checked) {
  background: #f2f8e9;
  border-color: #9fb88d;
}
.option:last-child {
  margin-bottom: 0;
}
.option input {
  accent-color: #496f32;
  margin: 3px 0 0;
}
.option strong,
.option small {
  display: block;
}
.option strong {
  font-size: 0.94rem;
  font-weight: 620;
}
.option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.footnote {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
}
.footnote span {
  font-size: 1rem;
}
textarea {
  resize: vertical;
  min-height: 78px;
  font-family: var(--mono);
  margin-bottom: 12px;
}
.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-direction: column;
  text-align: center;
  min-height: 211px;
  padding: 24px;
}
.empty-art {
  height: 52px;
  width: 60px;
  position: relative;
}
.empty-art:before,
.empty-art:after {
  content: '';
  display: block;
  width: 38px;
  height: 41px;
  position: absolute;
  border: 1.6px solid #8fa495;
  border-radius: 6px;
  left: 9px;
  top: 2px;
  transform: rotate(-9deg);
  background: #f0f5ec;
}
.empty-art:after {
  left: 16px;
  top: 6px;
  transform: rotate(5deg);
  background:
    linear-gradient(#81967e, #81967e) 7px 11px/19px 2px no-repeat,
    linear-gradient(#a4b89e, #a4b89e) 7px 18px/14px 2px no-repeat,
    linear-gradient(#a4b89e, #a4b89e) 7px 25px/10px 2px no-repeat,
    #fcfef8;
}
.empty strong {
  font-size: 1rem;
  font-weight: 600;
}
.empty p {
  font-size: 0.89rem;
  color: var(--muted);
  margin-top: -7px;
  line-height: 1.5;
  max-width: 380px;
}
.emptyrow {
  padding: 18px 22px;
  font-size: 0.91rem;
  color: var(--muted);
}
.note {
  font-size: 0.9rem;
  line-height: 1.5;
  background: #eef4e8;
  border-radius: 7px;
  padding: 12px 14px;
  color: #40543e;
}
.guide,
.sessionBody {
  padding: 24px;
}
.guide p,
dialog p,
li {
  line-height: 1.55;
  color: var(--muted);
}
.guide h3 + p,
dialog h3 + p {
  margin-top: 8px;
}
li {
  margin: 10px 0;
}
ol {
  padding-left: 1.5rem;
}
.guide li {
  margin: 15px 0;
}
.guide li strong {
  color: var(--ink);
}
.mini {
  margin-left: auto;
  padding: 5px 9px;
  font-size: 0.8rem;
}
.endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
}
.endpoint code {
  padding: 12px;
  background: #172b23;
  color: #d7f1c0;
  flex: 1;
  overflow-wrap: anywhere;
  border-radius: 6px;
}
.sessionBody small {
  color: var(--muted);
}
.mono,
code,
pre {
  font-family: var(--mono);
  font-size: 0.85rem;
}
.digest {
  word-break: break-all;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.5;
}
.line {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 15px;
}
.pill {
  border-radius: 20px;
  padding: 5px 8px;
  background: #edf2e9;
  color: #4c604d;
  font-size: 0.77rem;
  font-weight: 600;
}
.pill.ok {
  color: #285a30;
  background: #e3f4d7;
}
.pill.bad {
  color: #89372d;
  background: #fae8e5;
}
.event {
  padding: 10px 0;
  border-bottom: 1px solid #edf1eb;
}
.recentItem {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: none;
  border-bottom: 1px solid #edf1eb;
  background: white;
  padding: 14px 22px;
  color: var(--ink);
}
.recentItem:hover,
.recentItem.chosen {
  background: #f2f7ed;
}
.recentItem span:first-child {
  overflow-wrap: anywhere;
}
.recentItem small {
  white-space: nowrap;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  margin: 34px auto 0;
  padding: 19px 0 26px;
  color: var(--muted);
  font-size: 0.8rem;
}
footer span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}
.tiny-mark {
  display: inline-block;
  background: #769262;
  border-radius: 2px;
  transform: rotate(45deg);
}
dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 18px 70px #0f221f3b;
}
dialog::backdrop {
  background: #12251cb3;
}
dialog p {
  margin: 14px 0 15px;
}
.close {
  font-size: 1.4rem;
  border: 0;
  background: #f1f4ef;
  padding: 0;
  width: 32px;
  height: 32px;
}
.modalactions {
  margin-top: 20px;
}
.downloads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}
#copyPass {
  margin-top: 8px;
}
pre {
  padding: 14px;
  border-radius: 7px;
  background: #172b23;
  color: #d7f1c0;
  white-space: pre-wrap;
}
.error {
  color: #9b342b;
  font-size: 0.9rem;
  line-height: 1.45;
}
.error:not(:empty) {
  margin: 12px 0 0;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #182e26;
  color: white;
  border-radius: 8px;
  z-index: 3;
}
button:hover {
  transition: background 0.12s;
}
@media (max-width: 820px) {
  .bar,
  main,
  footer {
    width: calc(100% - 36px);
  }
  .bar {
    gap: 28px;
  }
  .schematic {
    margin-right: 16px;
    padding: 10px;
  }
  .hero {
    grid-template-columns: 1.12fr 1fr;
  }
  .intro {
    padding: 26px 10px 26px 22px;
  }
  .grid {
    grid-template-columns: minmax(255px, 0.9fr) minmax(0, 1.2fr);
    gap: 12px;
  }
  .cardhead,
  .formcard form {
    padding: 16px;
  }
  .drawing {
    height: 76px;
  }
  .device {
    width: 47px;
  }
}
@media (max-width: 620px) {
  .bar {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 0 15px;
  }
  .brand {
    font-size: 1.15rem;
  }
  nav {
    height: 48px;
    order: 3;
    width: 100%;
    gap: 20px;
  }
  nav button {
    font-size: 0.91rem;
  }
  .status {
    font-size: 0.75rem;
  }
  .brand,
  .status {
    margin-top: 10px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 18px 0;
  }
  .intro {
    padding: 22px 20px 0;
  }
  .schematic {
    margin: 12px 18px 18px;
  }
  .drawing {
    height: 56px;
  }
  .drawing canvas {
    height: 52px;
  }
  .schematicTitle {
    font-size: 0.66rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .viewhead {
    margin: 22px 0 13px;
  }
  .viewhead h2 {
    font-size: 1.55rem;
  }
  .viewhead .ghost,
  .viewhead .primary {
    font-size: 0.8rem;
  }
  .cardhead h3 {
    font-size: 1rem;
  }
  .empty {
    min-height: 165px;
  }
  .modalactions {
    flex-wrap: wrap;
  }
  .sessionBody,
  .guide {
    padding: 17px;
  }
  #refresh {
    font-size: 0.73rem;
  }
  .schemaTitle {
    margin: 0;
  }
}
