:root {
  color-scheme: dark;
  --bg: #0d1015;
  --rack: #12161d;
  --plate: #1a1f29;
  --line: #232833;
  --line-2: #2c3340;
  --port: #39414f;
  --text: #e8ecf1;
  --text-2: #c3cad6;
  --muted: #a7b0be;
  --dim: #7c8598;
  --led: #3ddc97;
  --amber: #f5a524;
  --on-amber: #14100a;
  --brand: #0193b1;
  --brand-2: #3cc3df;
  --danger: #ff8a7a;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --top-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 0.5rem); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

.mono { font-family: var(--mono); }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 30;
  padding: 0.6rem 1rem; border-radius: 0.3rem;
  background: var(--amber); color: var(--on-amber); font-weight: 600;
}
.skip:focus { top: 0.6rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex; align-items: center; gap: 2rem;
  max-width: 80rem; min-height: var(--top-h); margin-inline: auto; padding-inline: var(--gutter);
}
.logo { display: flex; align-items: center; gap: 0.35rem; text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; min-height: 44px; }
.logo img { width: 2rem; height: 2rem; }
.links { display: flex; gap: 0.35rem; margin-left: auto; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.7rem; color: var(--text-2); text-decoration: none; font-size: 0.95rem; transition: color 150ms ease; }
.links a:hover { color: var(--text); }

/* Buttons */
.btn, .btn-2 { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 0.35rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.btn { padding: 0.65rem 1.35rem; border: 0; background: var(--amber); color: var(--on-amber); white-space: nowrap; }
.btn:hover { background: #ffb845; }
.btn:disabled { background: #8a6a33; cursor: progress; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-2 { width: 100%; margin-top: 1rem; padding: 0.6rem 1.2rem; border: 1px solid var(--amber); background: transparent; color: var(--amber); }
.btn-2:hover { background: var(--amber); color: var(--on-amber); }
.ghost { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.4rem; font-weight: 500; text-underline-offset: 0.25em; }
.ghost:hover { color: var(--amber); }

/* Rack layout */
.page { max-width: 80rem; margin-inline: auto; border-inline: 1px solid var(--line); }
.unit { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.rail {
  border-right: 1px solid var(--line);
  text-align: center;
  background-image: radial-gradient(circle at 50% 50%, var(--line-2) 2px, transparent 2.5px);
  background-size: 100% 2.4rem;
  background-position: 0 3.5rem;
}
.rail span {
  position: sticky; top: calc(var(--top-h) + 0.75rem);
  display: inline-block; margin-top: 2.5rem; padding: 0.2rem 0;
  background: var(--bg); color: var(--dim);
  font-family: var(--mono); font-size: 0.75rem;
}
.body { padding: clamp(2.25rem, 5vw, 3.75rem) var(--gutter); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.25rem); align-items: center; }
.two-end { align-items: end; }

/* Type */
.kick { margin-bottom: 0.8rem; color: var(--brand-2); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); font-weight: 600; line-height: 1.14; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: 1.1rem; font-weight: 600; }
.sub { max-width: 34em; margin-top: 1rem; color: var(--muted); font-size: 1.125rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.75rem; }

/* LEDs and rack units */
.led { display: inline-block; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--led); box-shadow: 0 0 0.55rem var(--led); }
.led-w { background: var(--amber); box-shadow: 0 0 0.55rem var(--amber); }

.rack { padding: 0.5rem; border: 1px solid var(--line-2); border-radius: 0.4rem; background: var(--rack); }
.u { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 0.9rem; align-items: center; gap: 0.7rem; margin: 0.22rem 0; padding: 0.55rem 0.8rem; border-radius: 0.2rem; background: var(--plate); font-size: 0.875rem; }
.u .n { color: var(--dim); font-size: 0.75rem; }
.ports { display: flex; gap: 0.2rem; }
.ports i { width: 0.6rem; height: 0.6rem; border: 1px solid var(--port); border-radius: 0.1rem; background: #0b0e13; }
.ports i.on { border-color: var(--led); background: var(--led); }

/* Before and after */
.cmp { width: 100%; margin-top: 1.6rem; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-2); border-radius: 0.4rem; overflow: hidden; }
.cmp th { padding: 0.65rem 1.1rem; background: #151a22; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-weight: 400; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.cmp td { position: relative; width: 50%; padding: 0.75rem 1.1rem 0.75rem 2.4rem; border-top: 1px solid var(--line); }
.cmp td + td, .cmp th + th { border-left: 1px solid var(--line); }
.cmp .led { position: absolute; left: 1.1rem; top: 1.22rem; }
.cmp .old { color: var(--muted); }

/* Cards and lists */
.card { padding: 1.25rem 1.35rem; border: 1px solid var(--line-2); border-radius: 0.4rem; background: var(--rack); }
.card-title { font-size: 1.15rem; font-weight: 600; }
.card-sub { color: var(--muted); font-size: 0.875rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.tabs li { padding: 0.25rem 0.7rem; border: 1px solid var(--line-2); border-radius: 0.25rem; color: var(--text-2); font-size: 0.875rem; }
.tabs b { margin-left: 0.35rem; color: var(--text); font-weight: 600; }
.list { margin-top: 1.1rem; color: var(--text-2); }
.list-flush { margin-top: 0; }
.list li { position: relative; padding: 0.28rem 0 0.28rem 1.35rem; }
.list li::before { content: ''; position: absolute; left: 0; top: 0.72rem; width: 0.55rem; height: 0.55rem; border-radius: 0.1rem; background: var(--brand-2); }

/* Support flow */
.flow { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 1.7rem; }
.flow::before { content: ''; position: absolute; left: 8%; right: 8%; top: 2rem; height: 0.3rem; border-radius: 1rem; background: var(--amber); }
.flow li { position: relative; padding: 1rem 1.15rem; border: 1px solid var(--line-2); border-radius: 0.4rem; background: var(--plate); }
.flow h3 { margin: 0.15rem 0 0.3rem; }
.flow p { color: var(--muted); font-size: 0.94rem; }
.step { color: var(--amber); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* Inventory drawing */
.trace { width: 100%; height: auto; }
.trace text { font-family: var(--mono); }
.trace.armed .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.trace.drawn .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease-out; }

/* Expiry list */
.e { display: grid; grid-template-columns: minmax(0, 1fr) 5.4rem 4.2rem 0.9rem; align-items: center; gap: 0.6rem; margin: 0.22rem 0; padding: 0.6rem 0.8rem; border-radius: 0.2rem; background: var(--plate); font-size: 0.85rem; }
.e .name { overflow-wrap: anywhere; }
.e .k { color: var(--muted); font-size: 0.8rem; }
.e .d { color: var(--led); text-align: right; }
.e .d-w { color: var(--amber); }
.caption { margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; text-align: right; }

/* Other modules */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.6rem; }
.grid li { padding: 0.95rem 1.05rem; border-radius: 0.3rem; background: var(--plate); }
.grid p { margin-top: 0.15rem; color: var(--muted); font-size: 0.92rem; }

/* Demo */
.dm { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 2.75rem; align-items: center; column-gap: 0.4rem; border-bottom: 1px solid var(--line); }
.dm .k { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }
.dm .v { font-family: var(--mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.copy {
  position: relative; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 0.3rem;
  background: transparent; color: var(--muted); cursor: pointer; transition: color 150ms ease;
}
.copy:hover { color: var(--text); }
.copy::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 1.05rem; height: 1.05rem; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.copy.done { color: var(--led); }
.copy.done::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.6rem; }
.role { padding: 1rem 1.1rem 0.4rem; border-radius: 0.3rem; background: var(--plate); }
.role h3 { display: flex; align-items: center; gap: 0.6rem; }
.role p { min-height: 2.8em; margin: 0.3rem 0 0.4rem; color: var(--muted); font-size: 0.92rem; }
.role .dm { grid-template-columns: 3.9rem minmax(0, 1fr) 2.75rem; border-bottom-color: var(--line-2); }
.role .dm:last-child { border-bottom: 0; }
.role .dm .v { font-size: 0.8rem; }

/* Sales form */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; padding: 1.4rem; border: 1px solid var(--line-2); border-radius: 0.4rem; background: var(--rack); }
.f-wide { grid-column: 1 / -1; }
.f label { display: block; margin-bottom: 0.3rem; color: var(--text-2); font-size: 0.9rem; }
.req { color: var(--amber); }
.f input, .f textarea {
  width: 100%; min-height: 44px; padding: 0.55rem 0.7rem;
  border: 1px solid var(--dim); border-radius: 0.25rem;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 1rem;
  transition: border-color 150ms ease;
}
.f textarea { display: block; resize: vertical; }
.f input:hover, .f textarea:hover { border-color: var(--muted); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: 0.85rem; }
.err:not(:empty) { margin-top: 0.3rem; }
.check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; color: var(--muted); font-size: 0.92rem; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--amber); cursor: pointer; }
.check a { color: var(--text); text-underline-offset: 0.2em; }
.check a:hover { color: var(--amber); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { color: var(--danger); font-size: 0.92rem; }
.form-err:empty { display: none; }
.hint { color: var(--muted); font-size: 0.85rem; text-align: center; }
.form-ok { padding: 1.5rem; border: 1px solid var(--led); border-radius: 0.4rem; background: var(--rack); }
.form-ok h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; }
.form-ok p { margin-top: 0.5rem; color: var(--muted); }

/* Footer */
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; max-width: 80rem; margin-inline: auto; padding: 1.25rem var(--gutter); color: var(--muted); font-size: 0.9rem; }
.foot-in a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 0.2em; }
.foot-in a:hover { color: var(--text); }
.foot-end { margin-left: auto; }

/* Privacy notice */
.doc { max-width: 46rem; margin-inline: auto; padding: clamp(2.25rem, 5vw, 3.75rem) var(--gutter); }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc h2 { margin-top: 2.25rem; font-size: 1.3rem; }
.doc p, .doc li, .doc td, .doc th { color: var(--text-2); }
.doc p { margin-top: 0.8rem; }
.doc .updated { color: var(--muted); font-size: 0.9rem; }
.doc ul { margin-top: 0.8rem; }
.doc .bullets li { position: relative; padding: 0.2rem 0 0.2rem 1.35rem; }
.doc .bullets li::before { content: ''; position: absolute; left: 0; top: 0.65rem; width: 0.5rem; height: 0.5rem; border-radius: 0.1rem; background: var(--brand-2); }
.doc table { width: 100%; margin-top: 0.9rem; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { padding: 0.6rem 0.7rem; border: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.doc th { background: #151a22; color: var(--text); font-weight: 600; }
.doc a { color: var(--brand-2); text-underline-offset: 0.2em; }
.doc-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 0.2em; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .rack .led { animation: led 3.2s ease-in-out infinite; }
  .u:nth-child(2n) .led { animation-delay: 0.7s; }
  .u:nth-child(3n) .led { animation-delay: 1.4s; }
  @keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
}

/* Three narrow role cards: label above value so addresses stay on one line */
@media (min-width: 62.01rem) and (max-width: 75rem) {
  .role .dm { grid-template-columns: minmax(0, 1fr) 2.75rem; }
  .role .dm .k { grid-column: 1 / -1; margin-top: 0.45rem; }
}

/* Tablet and below */
@media (max-width: 62rem) {
  .links { display: none; }
  .top-in { justify-content: space-between; }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .role p { min-height: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .unit { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .page { border-inline: 0; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
  .flow::before { display: none; }

  .cmp, .cmp tbody, .cmp tr { display: block; width: 100%; }
  .cmp thead { display: none; }
  .cmp tr + tr { border-top: 1px solid var(--line-2); }
  .cmp td { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.7rem; width: 100%; border: 0; padding: 0.55rem 0.9rem; }
  .cmp td:first-child { padding-top: 0.8rem; }
  .cmp td:last-child { padding-bottom: 0.8rem; }
  .cmp td + td { border-left: 0; }
  .cmp td::before { content: attr(data-label); grid-column: 1 / -1; margin-bottom: 0.1rem; color: var(--dim); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
  .cmp .led { position: static; margin-top: 0.5rem; }
}

@media (max-width: 30rem) {
  .btn-sm { padding-inline: 0.75rem; }
  .form { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .e { grid-template-columns: minmax(0, 1fr) auto 0.9rem; }
  .e .name { grid-column: 1 / -1; }
  .cta .btn { width: 100%; }
  .foot-end { margin-left: 0; width: 100%; }
}
