/* Real Random Failure - cockpit panel theme */
:root {
	--panel: #d5d7d1;
	--paper: #ecede8;
	--ink: #171b1c;
	--ink-soft: #454c4e;
	--shield: #2a2e30;
	--shield-line: #454b4e;
	--amber: #f2a81d;
	--amber-deep: #9a6400;
	--fire: #d8372b;
	--go: #3e9f68;
	--go-deep: #23724a;
	--line: #b4b7b0;
	--radius: 6px;
	--head: "Barlow Condensed", "Arial Narrow", sans-serif;
	--body: "B612", "Segoe UI", system-ui, sans-serif;
	--wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.hero__grid > *, .split > *, .dl > *, .contact > *, .pager > *, .tabpanel > * { min-width: 0; }
.h1-fit { overflow-wrap: break-word; }
h1, h2 { overflow-wrap: break-word; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.02; letter-spacing: 0.005em; margin: 0 0 0.5em; }
h1 { font-size: clamp(3rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.7rem; line-height: 1.1; }
p { margin: 0 0 1em; max-width: 62ch; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding: 5.5rem 0; }
.section--panel { background: var(--panel); }
.section--dark { background: var(--shield); color: #e8eae6; }
.lede { font-size: 1.12rem; color: var(--ink-soft); }
.section--dark .lede { color: #b9bfbb; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 48px; padding: 0.6rem 1.4rem;
	font: 700 1rem/1.2 var(--body);
	text-decoration: none; cursor: pointer;
	border: 2px solid var(--ink); border-radius: var(--radius);
	background: transparent; color: var(--ink);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: rgba(23, 27, 28, 0.07); }
.btn:active { transform: translateY(2px); }
.btn--primary { background: var(--amber); box-shadow: 0 4px 0 var(--ink); }
.btn--primary:hover { background: #f7b73e; }
.btn--primary:active { box-shadow: 0 1px 0 var(--ink); transform: translateY(3px); }
.btn--light { border-color: #e8eae6; color: #e8eae6; }
.btn--light:hover { background: rgba(255, 255, 255, 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 50; background: var(--shield); color: #e8eae6; border-bottom: 3px solid var(--amber); }
.bar__in { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; font-family: var(--head); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.nav { display: flex; gap: 0.25rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 0.5rem 0.8rem; border-radius: var(--radius); font-size: 0.95rem; }
.nav a:hover { background: rgba(255, 255, 255, 0.1); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); }
.nav .btn { min-height: 40px; padding: 0.3rem 1rem; border-color: var(--amber); background: var(--amber); color: var(--ink); margin-left: 0.5rem; }
.nav .btn:hover { background: #f7b73e; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid #e8eae6; color: inherit; border-radius: var(--radius); min-height: 44px; padding: 0 0.9rem; font: 700 0.95rem var(--body); cursor: pointer; }

/* Hero */
.hero { padding: 4.5rem 0 5rem; background: linear-gradient(var(--panel), var(--paper)); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { margin-bottom: 1.8rem; }
.hero__note { margin-top: 1.4rem; font-size: 0.9rem; color: var(--ink-soft); }

/* Annunciator panel (interactive demo) */
.panel {
	background: var(--shield); color: #e8eae6;
	border-radius: 10px; padding: 1.4rem;
	border: 2px solid var(--ink);
	box-shadow: 0 10px 0 var(--ink), inset 0 0 0 4px #3a4043;
}
.panel__title { font-family: var(--head); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #aeb5b1; margin: 0 0 0.9rem; }
.lamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.lamp {
	display: grid; place-items: center; text-align: center;
	min-height: 64px; padding: 0.3rem;
	background: #151819; border: 2px solid #3b4144; border-radius: 4px;
	font: 700 0.72rem/1.15 var(--body); letter-spacing: 0.06em; color: #565d60;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.lamp.is-on { background: var(--amber); border-color: #ffd37a; color: #1b1300; box-shadow: 0 0 18px 2px rgba(242, 168, 29, 0.65); }
.lamp.is-on.lamp--fire { background: var(--fire); border-color: #ff8f86; color: #fff; box-shadow: 0 0 18px 2px rgba(216, 55, 43, 0.75); }
.lamp.is-memo { border: 2px dashed var(--amber); color: var(--amber); }
.panel__ctl { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.panel label { display: block; font-size: 0.8rem; color: #aeb5b1; margin-bottom: 0.3rem; }
.panel select {
	width: 100%; min-height: 48px; padding: 0 0.8rem;
	background: #151819; color: #e8eae6; border: 2px solid #565d60; border-radius: var(--radius);
	font: 400 0.95rem var(--body);
}
.panel .btn { border-color: var(--amber); }
.panel .btn--primary { color: var(--ink); box-shadow: 0 4px 0 #7a5200; }
.readout { background: #151819; border-radius: 4px; padding: 0.9rem 1rem; min-height: 104px; border-left: 4px solid #565d60; }
.readout.is-fail { border-left-color: var(--amber); }
.readout.is-ok { border-left-color: var(--go); }
.readout strong { display: block; font-family: var(--head); font-size: 1.5rem; line-height: 1.1; margin-bottom: 0.25rem; }
.readout span { font-size: 0.9rem; color: #b9bfbb; }
.log { margin: 0.9rem 0 0; padding: 0; list-style: none; font-size: 0.82rem; color: #aeb5b1; display: grid; gap: 0.2rem; }
.log li { display: flex; gap: 0.5rem; }
.log li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.5em; border-radius: 50%; background: var(--go); }
.log li.f::before { background: var(--amber); }
.panel__foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; font-size: 0.8rem; color: #aeb5b1; align-items: center; flex-wrap: wrap; }
.panel__foot button { background: none; border: 0; color: #e8eae6; text-decoration: underline; cursor: pointer; font: inherit; padding: 0.4rem; }

/* Compatibility list */
.compat { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.compat li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.compat strong { font-family: var(--head); font-size: 1.5rem; font-weight: 700; display: block; line-height: 1.1; }
.compat small { color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.status::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 3px rgba(62, 159, 104, 0.25); }
.status--beta::before { background: var(--amber); box-shadow: 0 0 0 3px rgba(242, 168, 29, 0.3); }
.status--soon::before { background: transparent; border: 2px solid var(--ink-soft); box-shadow: none; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.facts { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.facts strong { display: block; font-family: var(--head); font-size: 1.5rem; line-height: 1.1; }
.facts li.req { background: var(--amber); }

/* Scenario tabs */
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 0; }
.tabs [role="tab"] {
	min-height: 48px; padding: 0.4rem 1.2rem; cursor: pointer;
	font: 700 0.95rem var(--body); color: var(--ink);
	background: transparent; border: 2px solid var(--ink); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--shield); color: #fff; }
.tabpanel { background: var(--shield); color: #e8eae6; border: 2px solid var(--ink); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 2rem; display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: center; }
.tabpanel[hidden] { display: none; }
.tabpanel img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: #fff; }
.tabpanel .tip { display: inline-block; margin-top: 0.4rem; padding: 0.5rem 0.9rem; background: var(--amber); color: var(--ink); font-weight: 700; border-radius: var(--radius); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; padding: 0; list-style: none; }
.feature { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.feature img { width: 100%; height: 170px; object-fit: cover; object-position: center 30%; border-bottom: 2px solid var(--ink); background: #fff; }
.feature div { padding: 1.2rem 1.3rem 1.4rem; }
.feature h3 { margin-bottom: 0.4rem; }
.feature p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

/* Pager */
.pager { display: grid; grid-template-columns: 340px 1fr; gap: 4rem; align-items: center; }
.pager img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 3px solid var(--amber); }
.alerts { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.alerts li { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem 0.9rem; background: #1d2022; border: 1px solid var(--shield-line); border-radius: var(--radius); font-size: 0.93rem; }
.alerts li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.alerts li.red::before { background: var(--fire); box-shadow: 0 0 10px var(--fire); }

/* Download */
.dl { background: var(--panel); border: 2px solid var(--ink); border-radius: 10px; padding: 2.5rem; box-shadow: 0 8px 0 var(--ink); display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.dl h2 { margin-bottom: 0.3em; }
.dl__btns { display: grid; gap: 1rem; }
.dl__btns .btn { width: 100%; justify-content: flex-start; text-align: left; }
.dl__btns small { display: block; font-weight: 400; font-size: 0.82rem; opacity: 0.8; }
.textlink { font-weight: 700; }

/* Contact band + footer */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact a.big { font-family: var(--head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; word-break: break-word; }
.foot { background: var(--ink); color: #b9bfbb; padding: 2rem 0; font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.foot a { color: #e8eae6; }
.social { display: flex; gap: 1.2rem; }

/* Register page */
.page-head { padding: 4rem 0 3rem; background: linear-gradient(var(--panel), var(--paper)); }
.promo { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; background: var(--amber); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 1.8rem 0; max-width: 640px; }
.promo b { font-family: var(--head); font-size: 2.4rem; line-height: 1; }
.promo p { margin: 0; }
.code { display: inline-block; font-weight: 700; background: var(--ink); color: var(--amber); padding: 0.15rem 0.6rem; border-radius: 4px; user-select: all; }
.compare { width: 100%; border-collapse: collapse; margin-top: 2rem; background: var(--paper); border: 2px solid var(--ink); }
.compare th, .compare td { padding: 1rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare thead th { background: var(--shield); color: #fff; font-family: var(--head); font-size: 1.3rem; border-bottom: 0; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 20%; }
.compare .paid { background: rgba(242, 168, 29, 0.18); }
.compare thead th.paid { background: var(--amber); color: var(--ink); }
.compare .note { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.yes, .no, .lim { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; }
.yes { background: var(--go-deep); color: #fff; }
.no { background: var(--line); color: var(--ink-soft); }
.lim { width: auto; padding: 0 0.7rem; border-radius: 99px; background: var(--line); font-size: 0.85rem; }
.steps { margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 0.9rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--amber); font: 700 1.3rem var(--head); }

/* Load sequence: the lamps test, then the page settles */
@media (prefers-reduced-motion: no-preference) {
	.hero h1, .hero .lede, .hero .btn-row { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.hero .lede { animation-delay: 0.08s; }
	.hero .btn-row { animation-delay: 0.16s; }
	@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Responsive */
@media (max-width: 960px) {
	.hero__grid, .split, .dl, .contact, .pager { grid-template-columns: 1fr; gap: 2.5rem; }
	.features { grid-template-columns: 1fr 1fr; }
	.pager img { max-width: 320px; aspect-ratio: 1; }
	.tabpanel { grid-template-columns: 1fr; }
	.tabpanel img { max-width: 240px; }
}
@media (max-width: 760px) {
	.menu-btn { display: inline-block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--shield); padding: 0.8rem 1.25rem 1.2rem; border-bottom: 3px solid var(--amber); }
	.nav.is-open { display: flex; }
	.nav a { padding: 0.8rem; }
	.nav .btn { margin: 0.5rem 0 0; }
	.bar { position: sticky; }
}
@media (max-width: 600px) {
	.section { padding: 4rem 0; }
	.features, .alerts { grid-template-columns: 1fr; }
	.lamps { grid-template-columns: repeat(2, 1fr); }
	.panel__ctl { grid-template-columns: 1fr; }
	.dl { padding: 1.6rem; }
	.compat li { grid-template-columns: 1fr; gap: 0.3rem; }
	.compare th, .compare td { padding: 0.8rem 0.6rem; font-size: 0.9rem; }
	.compare td:not(:first-child), .compare th:not(:first-child) { width: 24%; }
	.promo { grid-template-columns: 1fr; }
}
