/* Large type and high contrast throughout — this is a readability requirement,
   not a style preference. Base font is 19px and nothing user-facing goes below
   17px. Status is never colour alone: every coloured state also carries a word
   or a symbol, so it survives colour-blindness and a bad screen. */

:root {
  --bg:        #0b1220;
  --panel:     #131c2e;
  --panel-2:   #1a2438;
  --line:      #2b3a55;
  --text:      #f2f6fc;
  --muted:     #a8b6cf;
  --accent:    #4da3ff;
  --good:      #38d39f;
  --warn:      #ffc043;
  --bad:       #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 19px;
  line-height: 1.65;
}

a { color: var(--accent); }

.wrap { max-width: 940px; margin: 0 auto; padding: 32px 22px 64px; }
.narrow { max-width: 520px; }

header.top {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 18px; margin-bottom: 30px;
  flex-wrap: wrap;
}
header.top .brand { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
header.top .brand .fire { color: var(--warn); }
header.top .tag { color: var(--muted); font-size: 17px; }
header.top .spacer { flex: 1; }
header.top .who { font-size: 17px; color: var(--muted); }

h1 { font-size: 28px; margin: 0 0 10px; }
h2 { font-size: 23px; margin: 34px 0 12px; }
p.lede { font-size: 20px; color: var(--muted); margin-top: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
}

label { display: block; font-size: 18px; font-weight: 600; margin: 18px 0 7px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 14px 15px;
  font-size: 19px; font-family: inherit;
  background: var(--panel-2); color: var(--text);
  border: 2px solid var(--line); border-radius: 9px;
}
input:focus { outline: none; border-color: var(--accent); }

button, .btn {
  display: inline-block; margin-top: 24px;
  padding: 14px 26px;
  font-size: 19px; font-weight: 700; font-family: inherit;
  color: #07101f; background: var(--accent);
  border: none; border-radius: 9px; cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.12); }
button.quiet {
  background: transparent; color: var(--muted);
  border: 2px solid var(--line); padding: 10px 18px; font-size: 17px;
}

.msg {
  padding: 15px 18px; border-radius: 9px; margin: 0 0 20px;
  font-size: 18px; border-left: 6px solid;
}
.msg.bad  { background: #2b1620; border-color: var(--bad);  color: #ffd9d9; }
.msg.good { background: #10261f; border-color: var(--good); color: #c9f7e6; }

.alt { margin-top: 26px; font-size: 17px; color: var(--muted); }

/* --- agent (house) cards --- */
.house {
  display: flex; align-items: center; gap: 18px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 20px 22px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.house .name { font-size: 21px; font-weight: 700; }
.house .meta { color: var(--muted); font-size: 17px; }
.house .spacer { flex: 1; }
.state { font-size: 17px; font-weight: 700; white-space: nowrap; }
.state.on  { color: var(--good); }
.state.off { color: var(--bad); }
.count { font-size: 21px; font-weight: 800; }

.empty {
  border: 2px dashed var(--line); border-radius: 12px;
  padding: 30px 26px; color: var(--muted); font-size: 18px;
}
.empty strong { color: var(--text); }

code, .code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px; background: #08101d;
  border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 8px;
}

/* --- pairing code: this is read off one screen and typed into another, so it
   is the largest text on the page and uses a font where 8/B and 5/S differ. --- */
.paircode {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 46px; font-weight: 800; letter-spacing: 5px;
  color: var(--warn);
  padding: 14px 0 18px;
}
.cmd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 17px; line-height: 1.5;
  background: #08101d; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 16px;
  overflow-x: auto; white-space: pre; color: #cfe6ff;
}

/* --- device table --- */
table.devices {
  width: 100%; border-collapse: collapse; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
table.devices th {
  text-align: left; font-size: 17px; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--muted);
  padding: 14px 16px; background: var(--panel-2);
  border-bottom: 2px solid var(--line);
}
table.devices td {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-size: 18px; vertical-align: top;
}
table.devices tr:last-child td { border-bottom: none; }
.dev-name { font-weight: 700; font-size: 19px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
/* Never colour alone: the warning carries its own symbol and words. */
.warnnote { color: var(--warn); font-size: 17px; }
/* A recorded reading is good news, so it reads as confirmation, not a warning. */
.readnote { color: var(--good); font-size: 17px; }
button.copy{
  margin-top:0; padding:11px 20px; font-size:17px;
  background:var(--panel-2); color:var(--text); border:2px solid var(--accent);
}
details summary{ color:var(--accent); }
/* Numbered onboarding steps: the order is the message, so it is shown as order. */
.steps{ margin-top:22px; }
.step{ display:flex; gap:16px; align-items:flex-start; margin-bottom:26px; }
.step .num{
  flex:0 0 auto; width:38px; height:38px; border-radius:50%;
  background:var(--accent); color:#07101f;
  font-size:20px; font-weight:800; line-height:38px; text-align:center;
}
.step .stitle{ font-size:20px; font-weight:700; margin-bottom:4px; }
