:root {
  --steel: #4e545b;
  --steel-deep: #2b2f33;
  --steel-edge: #6a7178;
  --chalk: #f4f3ef;
  --chalk-dim: #c9cbc6;
  --tag: #ff7a1a;
  --tag-ink: #161616;
  --ok: #8fd694;
  --bad: #ff8a80;
  --measure: 62ch;
}

* { box-sizing: border-box; }

html { background: var(--steel); }

body {
  margin: 0;
  color: var(--chalk);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.masthead h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.tagline {
  margin: 10px 0 0;
  color: var(--chalk-dim);
  font-size: 21px;
}

/* ---- the one loud thing on the page ---- */

.launch { margin: 40px 0 36px; }

.enter {
  display: block;
  width: 100%;
  min-height: 116px;
  border: 0;
  border-radius: 6px;
  background: var(--tag);
  color: var(--tag-ink);
  font: inherit;
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18);
  transition: transform 80ms ease;
}
.enter:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.enter:disabled { background: var(--steel-edge); color: var(--chalk-dim); cursor: default; box-shadow: none; }
.enter:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; }

.help {
  margin: 14px 0 0;
  color: var(--chalk-dim);
  font-size: 17px;
  max-width: var(--measure);
}

/* ---- readiness ---- */

.checks {
  border-top: 2px solid var(--steel-edge);
  border-bottom: 2px solid var(--steel-edge);
  padding: 6px 0;
}

.check {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  min-height: 56px;
}
.check + .check { border-top: 1px solid rgba(255, 255, 255, 0.08); }

.check-name { font-weight: 600; }

.check-val { color: var(--chalk-dim); }
.check-val.ok { color: var(--ok); }
.check-val.bad { color: var(--bad); }

button.small, label.small {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 6px;
  border: 2px solid var(--chalk-dim);
  background: transparent;
  color: var(--chalk);
  cursor: pointer;
}
button.small:hover, label.small:hover { border-color: var(--chalk); }
button.small:focus-visible, label.small:focus-within { outline: 3px solid var(--chalk); outline-offset: 2px; }
button.small:disabled { opacity: 0.5; cursor: default; }

.result {
  margin: 8px 0 10px;
  padding: 12px 16px;
  background: var(--steel-deep);
  border-radius: 6px;
  color: var(--chalk);
  font-size: 17px;
  white-space: pre-wrap;
}
.result.bad { border-left: 4px solid var(--bad); }
.result.ok { border-left: 4px solid var(--ok); }

/* ---- how to ---- */

.howto { margin: 40px 0; max-width: var(--measure); }

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.howto ol { padding-left: 1.3em; margin: 0; }
.howto li { margin: 0 0 12px; }
.howto strong { font-weight: 700; }

/* ---- tags ---- */

.tags { margin-top: 44px; }

.tags-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tags-head h2 { margin: 0; }
.count { color: var(--chalk-dim); font-weight: 500; }
.tag-actions { display: flex; gap: 8px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.tag {
  display: grid;
  grid-template-columns: 8px 1fr;
  background: var(--steel-deep);
  border-radius: 6px;
  overflow: hidden;
}
.tag-bar { background: var(--tag); }
.tag.issue .tag-bar { background: #e53935; }
.tag.resolved .tag-bar { background: var(--steel-edge); }
.tag.resolved input[type="text"] { color: var(--chalk-dim); text-decoration: line-through; }

button.small.danger { border-color: rgba(229,57,53,0.7); color: #ffb3ae; }
button.small.danger:hover { border-color: #ff8a80; }

.errors-wrap { margin-top: 28px; }
.errors { border-left: 4px solid var(--bad); background: var(--steel-deep); border-radius: 6px; padding: 8px 14px; }
.err { font-size: 15px; padding: 6px 0; color: var(--chalk-dim); border-top: 1px solid rgba(255,255,255,0.06); }
.err:first-child { border-top: 0; }
.err span { color: var(--chalk); margin-right: 10px; font-variant-numeric: tabular-nums; }

.tag-body { padding: 12px 14px 12px 16px; }

.tag-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tag input[type="text"] {
  flex: 1;
  font: inherit;
  font-weight: 700;
  font-size: 20px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--chalk);
  min-width: 0;
}
.tag input[type="text"]:hover { border-color: var(--steel-edge); }
.tag input[type="text"]:focus { border-color: var(--chalk); outline: none; background: rgba(0, 0, 0, 0.2); }
.tag input::placeholder { color: var(--chalk-dim); font-weight: 500; }

.tag textarea {
  width: 100%;
  margin-top: 8px;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 4px;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.15);
  color: var(--chalk);
  resize: vertical;
  min-height: 64px;
}
.tag textarea:focus { border-color: var(--chalk); outline: none; }

.tag-meta {
  margin-top: 6px;
  color: var(--chalk-dim);
  font-size: 15px;
}

.empty { color: var(--chalk-dim); margin: 6px 0 0; }

/* the WebGL canvas: needed by the XR session, never shown on the page */
canvas.xr { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .page { padding: 24px 18px 60px; }
  .check { grid-template-columns: 1fr auto; }
  .check button { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .enter { transition: none; }
}
