:root {
  color-scheme: dark;
  --ink: #050807;
  --panel: rgba(6, 12, 11, 0.9);
  --panel-strong: rgba(8, 16, 15, 0.96);
  --line: rgba(215, 233, 228, 0.18);
  --text: #edf6f2;
  --muted: #8ea29b;
  --teal: #45ddd2;
  --acid: #c7ff45;
  --warn: #ffc15a;
  --down: #ff7167;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--ink);
}

.earth-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #050807 url("assets/earth-night.jpg") center 34% / cover no-repeat;
  opacity: 0.34;
}

.earth-field::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 8, 7, 0.94), rgba(5, 8, 7, 0.58) 48%, rgba(5, 8, 7, 0.92)),
    rgba(1, 5, 4, 0.54);
}

header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 6, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 3px;
}

.brand b {
  font-size: 18px;
}

.brand small,
nav a,
.eyebrow,
.panel-head,
label span,
.security-meter span,
.submission-panel > div span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

nav {
  gap: 18px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--teal);
}

main {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 34px;
}

.registration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 24px;
  align-items: end;
  min-height: 220px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.registration-hero h1 {
  max-width: 820px;
  margin: 14px 0 12px;
  font: 700 clamp(38px, 6vw, 76px) / 0.95 Arial, sans-serif;
  letter-spacing: 0;
}

.registration-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.security-meter {
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(199, 255, 69, 0.26);
  background:
    linear-gradient(90deg, rgba(199, 255, 69, 0.08), transparent),
    var(--panel);
}

.security-meter b {
  color: var(--acid);
  font-size: 26px;
  line-height: 1;
}

.registration-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  margin-top: 22px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.onboarding-steps article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 126px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.onboarding-steps article:last-child {
  border-right: 0;
}

.onboarding-steps span {
  color: var(--teal);
  font-size: 10px;
}

.onboarding-steps b {
  font-size: 14px;
}

.onboarding-steps p {
  margin: 0;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.command-panel,
.file-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.panel-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head b {
  color: var(--warn);
  font-weight: 500;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}

.segmented button,
.command-output button,
.submission-panel button,
.submission-panel a {
  min-height: 34px;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.08em;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.segmented button {
  padding: 0 10px;
}

.segmented button + button {
  border-left: 1px solid var(--line);
}

.segmented button.active {
  color: var(--ink);
  background: var(--teal);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label.wide {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(2, 7, 7, 0.76);
}

input {
  min-height: 40px;
  padding: 0 11px;
}

input:focus,
textarea:focus {
  border-color: rgba(69, 221, 210, 0.58);
}

.command-output {
  border-top: 1px solid var(--line);
}

pre {
  min-height: 224px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: #cbd9d4;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.command-output button,
.submission-panel button,
.submission-panel a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-top: 1px solid var(--line);
}

.command-output button:hover,
.submission-panel button:hover,
.submission-panel a:hover {
  color: var(--text);
  background: rgba(69, 221, 210, 0.07);
}

.drop-zone {
  display: grid;
  gap: 9px;
  min-height: 146px;
  margin: 14px;
  place-content: center;
  text-align: center;
  border: 1px dashed rgba(69, 221, 210, 0.45);
  background:
    linear-gradient(135deg, rgba(69, 221, 210, 0.08), transparent 60%),
    rgba(2, 8, 8, 0.62);
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: var(--acid);
  background: rgba(199, 255, 69, 0.08);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone span {
  color: var(--text);
  font-size: 13px;
}

.drop-zone b {
  color: var(--acid);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.registration-report {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.report-card {
  display: grid;
  gap: 5px;
  min-height: 72px;
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-card:nth-child(2n) {
  border-right: 0;
}

.report-card span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.report-card b {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.report-card.ok b {
  color: var(--acid);
}

.report-card.warn b {
  color: var(--warn);
}

.report-card.error b {
  color: var(--down);
}

.submission-panel {
  display: grid;
  border-top: 1px solid var(--line);
}

.probe-panel {
  display: grid;
  border-top: 1px solid var(--line);
}

.probe-panel > div {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.probe-panel span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.probe-panel b {
  color: var(--warn);
  font-size: 10px;
  font-weight: 500;
}

.probe-panel b.ok {
  color: var(--acid);
}

.probe-panel b.error {
  color: var(--down);
}

#probe-report {
  min-height: 86px;
  color: #aebdb7;
}

.submission-panel > div {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.submission-panel > div span {
  padding-left: 14px;
}

.submission-panel button {
  min-width: 134px;
  border-top: 0;
  border-left: 1px solid var(--line);
}

.submission-panel button:disabled,
.submission-panel a.disabled {
  color: #46544f;
  cursor: not-allowed;
  pointer-events: none;
}

textarea {
  min-height: 158px;
  resize: vertical;
  padding: 14px;
  border: 0;
  background: rgba(2, 7, 7, 0.7);
  font-size: 10px;
  line-height: 1.55;
}

.submission-panel a {
  color: var(--muted);
  text-decoration: none;
}

.submission-panel .primary {
  color: var(--ink);
  border-top: 1px solid rgba(199, 255, 69, 0.42);
  background: var(--acid);
}

.submission-panel .primary:hover {
  color: var(--ink);
  background: #d8ff79;
}

.submission-panel .primary:disabled {
  color: #65706c;
  border-color: var(--line);
  background: rgba(80, 94, 89, 0.2);
}

.admission-panel {
  display: grid;
  border-top: 1px solid var(--line);
}

.admission-panel[hidden] {
  display: none;
}

.admission-panel > div:first-child {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.admission-panel span,
.admission-panel dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.admission-panel b {
  color: var(--warn);
  font-size: 10px;
}

.admission-panel b.ok {
  color: var(--acid);
}

.admission-panel b.error {
  color: var(--down);
}

.admission-panel dl {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  margin: 0;
}

.admission-panel dl div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.admission-panel dl div:last-child {
  border-right: 0;
}

.admission-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 10px;
}

body[data-kind="validator"] .security-meter,
body[data-kind="validator"] .drop-zone {
  border-color: rgba(255, 193, 90, 0.34);
}

body[data-kind="validator"] .segmented button.active {
  background: var(--warn);
}

@media (max-width: 920px) {
  main {
    width: min(100% - 24px, 1240px);
    padding-top: 28px;
  }

  .registration-hero,
  .onboarding-steps,
  .registration-grid {
    grid-template-columns: 1fr;
  }

  .registration-hero {
    min-height: 188px;
  }

  .registration-hero h1 {
    font-size: clamp(34px, 10vw, 58px);
  }
}

@media (max-width: 620px) {
  header {
    min-height: 64px;
    padding: 10px 12px;
  }

  .brand small {
    display: none;
  }

  nav {
    gap: 10px;
  }

  .registration-hero {
    min-height: 0;
    padding-bottom: 20px;
  }

  .registration-hero p {
    font-size: 12px;
  }

  .field-grid,
  .registration-report {
    grid-template-columns: 1fr;
  }

  .onboarding-steps article {
    min-height: 96px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-steps article:last-child {
    border-bottom: 0;
  }

  .report-card,
  .report-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 950px) {
  header {
    min-height: 52px;
  }

  main {
    padding-top: 16px;
  }

  .registration-hero {
    grid-template-columns: minmax(0, 1fr) 170px;
    min-height: 96px;
    gap: 14px;
    padding-bottom: 14px;
  }

  .registration-hero h1 {
    margin: 7px 0;
    font-size: 30px;
  }

  .registration-hero p {
    display: none;
  }

  .registration-grid {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 1fr);
    gap: 12px;
    margin-top: 12px;
  }

  .onboarding-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .onboarding-steps article {
    min-height: 78px;
    padding: 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .onboarding-steps p {
    display: none;
  }

  .panel-head {
    min-height: 42px;
    padding: 8px 10px;
  }

  .field-grid {
    gap: 8px;
    padding: 10px;
  }

  input {
    min-height: 34px;
  }

  pre {
    min-height: 128px;
    max-height: 160px;
  }

  .drop-zone {
    min-height: 92px;
    margin: 10px;
  }

  .registration-report {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-card {
    min-height: 58px;
    padding: 9px 10px;
  }

  textarea {
    min-height: 88px;
    max-height: 120px;
  }
}
