:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, sans-serif;
  background: #12191a;
  color: #f3f7f5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 36px, 860px); margin-inline: auto; }
.masthead { border-bottom: 1px solid #374342; }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding-block: 16px; }
.brand-name { font-family: Georgia, serif; font-size: 1.5rem; letter-spacing: .13em; color: #ead4a2; }
.brand-detail, .eyebrow { font-size: .72rem; letter-spacing: .12em; font-weight: 700; color: #b4c5bf; }
main { padding-block: 25px 48px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
h1 { font-size: clamp(1.75rem, 5vw, 2.65rem); line-height: 1.1; margin: 0; }
h2 { font-size: 1.19rem; margin: 24px 0 10px; }
p { margin: 0 0 .65rem; line-height: 1.45; }
.panel, .notice, .simulation { border: 1px solid #41514d; border-radius: 10px; padding: 16px; background: #1c2726; }
.notice { color: #ffd5c7; border-color: #8a5745; }
.simulation { color: #f2d7a6; border-color: #725e35; }
.gate { max-width: 400px; display: grid; gap: 14px; }
.gate h2 { margin: 0; }
label { font-weight: 700; }
input, button { font: inherit; border-radius: 8px; min-height: 48px; }
input { width: 100%; background: #12191a; border: 1px solid #627870; color: #fff; padding: 0 .85rem; font-size: 1.15rem; }
button { border: 1px solid #558477; background: #205c46; color: #fff; cursor: pointer; padding: .65rem 1rem; font-weight: 650; }
button:focus-visible, input:focus-visible { outline: 3px solid #f6d38b; outline-offset: 3px; }
button:disabled { cursor: default; }
button:disabled:not(.active) { opacity: .52; }
.secondary { background: #253331; white-space: nowrap; }
.status strong { display: block; font-size: 1.35rem; }
.status p:not(.eyebrow) { font-size: .9rem; color: #d0ddd6; margin: .4rem 0 0; }
.status p:empty { display: none; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cue { display: grid; align-content: center; text-align: left; gap: 4px; min-height: 77px; }
.cue small { font-weight: 500; }
.cue.active, .danger { background: #a02324; border-color: #ffafaa; }
.cue.active { animation: alert-pulse 1.6s steps(2, end) infinite; }
@keyframes alert-pulse { 50% { background: #6f191e; } }
dialog { max-width: min(450px, 100% - 32px); border: 1px solid #657770; color: inherit; background: #1c2726; border-radius: 12px; padding: 22px; }
dialog::backdrop { background: #080b0bd9; }
dialog h2 { margin: 0 0 .6rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 540px) {
  .heading { align-items: flex-start; }
  .controls { grid-template-columns: 1fr; }
  .cue { min-height: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .cue.active { animation: none; }
}
