:root {
  color-scheme: dark;
  --bg: #091322;
  --panel: #111f32;
  --line: #293d57;
  --muted: #a9bbcf;
  --blue: #62b8ff;
  --green: #62ddb7;
  --ink: #eff6ff;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button,
.button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #1b3553;
  color: var(--ink);
  border: 1px solid #3b587a;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #25496e;
}
button.primary {
  background: #2584d7;
  border-color: #2584d7;
  color: white;
}
button:disabled {
  opacity: 0.52;
  cursor: default;
}
button.danger {
  color: #ffb1b8;
  border-color: #793a48;
}
a {
  color: var(--blue);
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #3a5270;
  border-radius: 9px;
  padding: 11px;
  background: #0a1728;
  color: var(--ink);
  min-width: 0;
}
input[type="checkbox"] {
  width: auto;
  min-width: 22px;
  height: 22px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #d4e0ee;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 18px;
}
small,
.muted {
  color: var(--muted);
}
header.top {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #101e31;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}
.brand img {
  width: 118px;
  border-radius: 5px;
}
.brand strong {
  font-size: 19px;
}
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
nav button {
  background: transparent;
  border-color: transparent;
}
nav button.active {
  border-color: #3c698f;
  background: #193551;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 30px 24px 60px;
}
.hero,
.row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero {
  margin: 6px 0 30px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 10px;
}
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  min-width: 0;
}
.module {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 12px;
}
.module p {
  flex: 1;
  margin: 0;
}
.badge {
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--muted);
}
.badge.ready {
  color: var(--green);
  border-color: #326955;
}
.section-title {
  margin: 28px 0 14px;
}
.login {
  max-width: 440px;
  margin: 8vh auto;
  padding: 24px;
}
.login img {
  width: 165px;
  margin-bottom: 28px;
  border-radius: 6px;
}
.stack {
  display: grid;
  gap: 16px;
}
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wide {
  grid-column: 1/-1;
}
.list {
  display: grid;
  gap: 12px;
}
.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #122137;
}
.item h3 {
  margin: 0 0 5px;
}
.item p {
  margin: 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.editor {
  width: 100%;
  height: calc(100vh - 255px);
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.editor-wrap {
  max-width: none;
}
.status {
  margin-left: auto;
  color: var(--green);
  font-size: 14px;
}
.status.error {
  color: #ffb1b8;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.filters button {
  font-size: 14px;
}
.empty {
  border: 1px dashed var(--line);
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border-radius: 12px;
}
#notice {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 700px);
  background: #572437;
  border: 1px solid #b85d70;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 10px 50px #0008;
}
#notice[hidden] {
  display: none;
}
.loading {
  padding: 32px;
}
details > summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 700;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dialog {
  max-width: min(92vw, 640px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
dialog::backdrop {
  background: #0009;
}
@media (max-width: 760px) {
  header.top {
    padding: 12px;
    gap: 10px;
  }
  .brand img {
    width: 90px;
  }
  .brand strong {
    font-size: 17px;
  }
  nav {
    width: 100%;
  }
  nav button {
    flex: 1;
    padding: 8px;
    font-size: 14px;
  }
  main {
    padding: 22px 14px;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 12px;
  }
  .card {
    padding: 17px;
  }
  .editor {
    height: 75vh;
    min-height: 620px;
  }
  .toolbar button {
    flex: 1;
    font-size: 14px;
  }
  .status {
    width: 100%;
    margin: 0;
  }
  .login {
    margin: 3vh auto;
  }
  .wide {
    grid-column: auto;
  }
}
@media print {
  header.top,
  .toolbar,
  #notice {
    display: none;
  }
  main {
    padding: 0;
  }
  .editor {
    height: auto;
    border: 0;
  }
}
