*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(24, 24, 27, 0.72);
  --line: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --green: #6ee7b7;
  --green-deep: #059669;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.home {
  background: var(--bg);
  color: var(--text);
  font-family: "Cascadia Mono", "Cascadia Code", "Segoe UI Mono", Consolas, ui-monospace, monospace;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.22) 50%);
  background-size: 100% 4px;
  opacity: 0.45;
  z-index: 4;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(68rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 2.5rem;
}

.top,
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.16em;
  font-weight: 700;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

.langs {
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(24, 24, 27, 0.9);
}

.langs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.langs button.is-on {
  background: var(--green-deep);
  color: #04120c;
  font-weight: 700;
}

.ascii {
  display: none;
  margin: 1.6rem 0 0;
  color: rgba(16, 185, 129, 0.78);
  font-size: 0.72rem;
  line-height: 1.05;
  text-align: center;
  padding-bottom: 0.35rem;
  overflow: hidden;
}

.intro {
  max-width: 40rem;
  margin: 1.6rem auto 0;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lede {
  margin: 0.9rem 0 0;
  color: #d4d4d8;
  font-size: 0.92rem;
  line-height: 1.65;
}

.honesty {
  margin: 1rem auto 0;
  max-width: 34rem;
  padding-left: 0.75rem;
  border-left: 2px solid #34d399;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: left;
}

.block {
  margin-top: 2.2rem;
}

.section-title {
  margin: 0 0 0.85rem;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.steps,
.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.steps li,
.sign,
.card,
.rule-list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

.steps li,
.rule-list li {
  padding: 1rem 1rem 1.05rem;
}

.steps h3,
.rule-list h2 {
  margin: 0;
  font-size: 0.95rem;
}

.steps p,
.rule-list p,
.sign p,
.card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.rules-jump {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
}

.rules-jump a,
.fine a,
.foot a,
.back-link {
  color: var(--green);
}

.sign {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}

.sign label {
  font-size: 0.78rem;
  color: var(--green);
}

.sign input:not([type="checkbox"]),
.sign select {
  width: min(24rem, 100%);
  border: 1px solid #3f3f46;
  background: #09090b;
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  color: var(--text);
  font-size: 0.82rem;
}

.check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--green);
}

.ad-slot {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.2rem;
}

.ad-label {
  margin: 0;
  color: var(--dim);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ad-frame {
  min-height: 5.75rem;
  border: 1px dashed #3f3f46;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.1rem;
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.card {
  position: relative;
  min-height: 11.5rem;
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 11.5rem;
  padding: 1rem 1rem 3rem;
  color: inherit;
  text-decoration: none;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.card h2 {
  margin: 0;
  font-size: 0.95rem;
}

.tag {
  flex: none;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.65rem;
  color: var(--muted);
  border: 1px solid var(--line);
}

.card .open {
  margin-top: auto;
  color: var(--dim);
  font-size: 0.75rem;
}

.copy {
  position: absolute;
  right: 0.7rem;
  bottom: 0.65rem;
  border: 1px solid #3f3f46;
  background: #09090b;
  color: var(--text);
  border-radius: 0.45rem;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
  font-size: 0.68rem;
}

.card[data-accent="blue"] h2 { color: #93c5fd; }
.card[data-accent="green"] h2 { color: #6ee7b7; }
.card[data-accent="zinc"] h2 { color: #e4e4e7; }
.card[data-accent="amber"] h2 { color: #fcd34d; }
.card[data-accent="violet"] h2 { color: #d8b4fe; }

.card[data-accent="blue"]:hover { border-color: rgba(96, 165, 250, 0.7); }
.card[data-accent="green"]:hover { border-color: rgba(52, 211, 153, 0.7); }
.card[data-accent="zinc"]:hover { border-color: rgba(212, 212, 216, 0.55); }
.card[data-accent="amber"]:hover { border-color: rgba(251, 191, 36, 0.7); }
.card[data-accent="violet"]:hover { border-color: rgba(192, 132, 252, 0.7); }

.foot {
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.72rem;
  align-items: flex-start;
}

.legal {
  margin: 0.25rem 0 0;
}

.rule-list {
  display: grid;
  gap: 0.7rem;
}

.back-link {
  display: inline-block;
  margin-top: 1.2rem;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.payload {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  cursor: none;
  background: #000;
}

body.payload-bsod { background: #0078d7; }
body.payload-macos { background: #1c1c1e; }
body.payload-update { background: #005a9e; }

body.payload.revealed {
  cursor: auto;
  overflow: auto;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
}

.bsod {
  background: #0078d7;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
  padding: clamp(1.6rem, 7vw, 5.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.bsod-face {
  margin: 0;
  font-size: clamp(4.5rem, 16vw, 8rem);
  font-weight: 300;
  line-height: 0.9;
}

.bsod h1,
.update h1 {
  margin: 0.6rem 0 0;
  max-width: 46rem;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.35;
}

.bsod-pct {
  margin: 1.2rem 0 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 400;
}

.bsod-meta {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  font-family: Consolas, ui-monospace, monospace;
  font-size: clamp(0.72rem, 1.6vw, 0.92rem);
  line-height: 1.45;
}

.qr {
  width: 6.5rem;
  height: 6.5rem;
  background: #fff;
  padding: 0.35rem;
  flex: none;
}

.kernel {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background: #000;
  color: #00ff66;
  font-family: Consolas, ui-monospace, monospace;
  font-size: clamp(0.72rem, 1.5vw, 0.95rem);
  line-height: 1.45;
  padding: 1rem 1rem 2rem;
  white-space: pre-wrap;
}

.mac {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #1c1c1e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mac-card {
  width: min(36rem, 100%);
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.15rem;
  padding: 2rem 1.4rem 1.4rem;
  text-align: center;
  color: #d4d4d8;
}

.mac-mark {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 1rem;
  border: 2px solid #a1a1aa;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #e4e4e7;
  font-weight: 700;
}

.mac-card h1 {
  font-size: 1.05rem;
  line-height: 1.45;
}

.mac-card p {
  margin: 0.8rem 0 0;
  color: #a1a1aa;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mac-code {
  margin-top: 1.2rem;
  color: #71717a;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.72rem;
}

.bios {
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  color: #f5f5f5;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1rem, 2.3vw, 1.55rem);
  line-height: 1.35;
  padding: clamp(1.2rem, 4vw, 2.4rem);
}

.bios p { margin: 0.15rem 0; }
.bios-top { display: flex; justify-content: space-between; gap: 1rem; }
.bios-head { color: #fbbf24; font-weight: 700; }
.bios-brand { color: #34d399; }
.bios-gap { margin-top: 1rem; }
.bios-warn { color: #facc15; }
.bios-err { margin-top: 1.4rem; color: #f87171; font-weight: 700; }

.update {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1rem 4rem;
  background: #005a9e;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
}

.update-inner { width: min(34rem, 100%); }

.spin {
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 auto 1.4rem;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.update .sub { margin: 0.7rem 0 0; font-size: 0.95rem; opacity: 0.85; }
.update .foot-note {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.2rem;
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.65;
}

.reveal {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.84);
}

.reveal[hidden] { display: none; }

.reveal-card {
  width: min(32rem, 100%);
  background: #18181b;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 1.1rem;
  padding: 1.4rem 1.2rem 1.15rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.reveal-card h2 {
  margin: 0.9rem 0 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-family: "Segoe UI", sans-serif;
}

.reveal-desc {
  margin: 0.7rem 0 0;
  color: #a1a1aa;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #ef4444;
}

.sheet {
  margin: 1rem 0 0;
  padding: 0.8rem 0.85rem;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  text-align: left;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 0.75rem;
}

.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.28rem 0;
}

.sheet-row dt { color: #a1a1aa; }
.sheet-row dd { margin: 0; color: #fff; text-align: right; }
.sheet-row.ok dd { color: #6ee7b7; }
.sheet-row.hot { margin-top: 0.25rem; padding-top: 0.5rem; border-top: 1px solid #27272a; }
.sheet-row.hot dd { color: #fcd34d; }

.reveal-btn {
  width: 100%;
  margin-top: 1rem;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: #34d399;
  color: #04120c;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.fine {
  margin: 0.75rem 0 0;
  color: #71717a;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.75rem;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 640px) {
  .ascii { display: block; }
}

@media (max-width: 900px) {
  .screens { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .steps,
  .screens,
  .top,
  .foot { grid-template-columns: 1fr; display: grid; }
  .langs { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .dot,
  .spin { animation: none; }
  .scanlines { display: none; }
}
