:root {
  --bg: #0a0d11;
  --surface: #10151c;
  --surface-hover: #151c25;
  --line: #1d2530;
  --text: #dbe3ec;
  --muted: #6e7b89;
  --accent: #8fb8d4;
  --accent-dim: #3c5468;
  --error: #d48f8f;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent-dim); color: var(--text); }

/* ---------- pixel logo (small, used on login) ---------- */

.logo3d-sm {
  perspective: 700px;
  margin: 0 0 8px 0;
}

.ascii-sm {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 6px;
  line-height: 1.0;
  white-space: pre;
  margin: 0;
  transform: rotateX(16deg) rotateY(-7deg) rotateZ(1.5deg);
  text-shadow:
    1px 1px 0 #2c4356,
    2px 2px 0 #283d4e,
    3px 3px 0 #243646,
    5px 6px 12px rgba(0, 0, 0, 0.5);
}

/* ---------- layout shells ---------- */

.center-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  text-align: center;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 28px 100px 28px;
}

/* ---------- nav ---------- */

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 28px 0 28px;
  font-family: var(--mono);
  font-size: 13px;
}

.topnav .brand {
  color: var(--text);
  letter-spacing: 0.05em;
}

.topnav .links {
  display: flex;
  gap: 20px;
  color: var(--muted);
}

.topnav .links a.active {
  color: var(--accent);
}

/* ---------- forms ---------- */

.field {
  text-align: left;
  margin-bottom: 18px;
}

label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
}

.btn {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  width: 100%;
}
.btn:hover { background: var(--accent); color: var(--bg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--accent); }

.login-card {
  width: 100%;
  max-width: 340px;
  margin-top: 28px;
}

.flash {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--error);
  border: 1px solid var(--error);
  background: rgba(212, 143, 143, 0.08);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}

/* ---------- content sections (guide) ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 14px 0;
}
h1 { font-size: 30px; }

.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 52ch;
  margin: 0 0 44px 0;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { padding-bottom: 0; }

.step-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  padding-top: 2px;
}

.step-title {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px 0;
}

.step-body {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.inline-code {
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--accent);
}

.app-links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.app-links span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 20px;
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cta-row {
  margin-top: 40px;
  text-align: center;
}
.cta-row a.btn {
  display: inline-block;
  width: auto;
  text-decoration: none;
  padding: 14px 32px;
}

/* ---------- upload page ---------- */

.dropzone {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  transition: border-color 0.25s ease, background 0.25s ease;
  cursor: pointer;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.dropzone-icon {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.dropzone-title {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px 0;
}

.dropzone-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

#fileInput { display: none; }

.file-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-row {
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
}
.file-row .name { color: var(--text); }
.file-row.rejected { color: var(--error); border-color: var(--error); }

.upload-status {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
