/* Howart demo app. Mobile first, light and dark. */
:root {
  --bg: #f5f7fa; --surface: #ffffff; --ink: #1a232e; --sub: #5c6773; --line: #d8dee6;
  --accent: #0f7fa8; --accent-ink: #ffffff; --accent-soft: #e3f3f9;
  --red: #b3261e; --amber: #9a6700; --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131a; --surface: #151d26; --ink: #e8eef5; --sub: #93a0ad; --line: #28333f;
    --accent: #49c1e9; --accent-ink: #08313f; --accent-soft: #12303d;
    --red: #ff8a80; --amber: #f2c14e;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 960px; margin: 0 auto; padding: 12px 16px 32px;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button { font: inherit; color: inherit; cursor: pointer; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.logo {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-size: 16px;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0 12px; }
.badge {
  font-size: 12px; color: var(--sub); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; background: var(--surface);
}

.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 8px; z-index: 2;
}
.tabs button {
  border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; font-weight: 600; color: var(--sub);
}
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

main section { padding-top: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
#ask-form { display: grid; gap: 12px; }
textarea, input[type="text"] {
  width: 100%; font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical;
}
textarea:focus, input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.readers { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.readers legend { font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.readers label { position: relative; }
.readers input { position: absolute; opacity: 0; }
.readers span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px;
}
.readers input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.readers input:focus-visible + span { outline: 2px solid var(--accent); }
.primary {
  border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink);
}
.primary:disabled { opacity: .55; cursor: progress; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; text-align: left;
}
.status { min-height: 24px; color: var(--sub); font-size: 14px; }
.status.error { color: var(--red); }
.status .dot { display: inline-block; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.answer { margin-top: 4px; }
.answer-text p { margin: 0 0 10px; }
.answer-text ul { margin: 0 0 10px; padding-left: 20px; }
details { margin-top: 10px; font-size: 14px; }
summary { cursor: pointer; color: var(--sub); }
.figlist { margin: 8px 0 0; padding-left: 18px; }
table.bd { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
table.bd th, table.bd td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.bd td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.findings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.finding { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--sub); }
.finding.critical { color: var(--red); border-color: var(--red); font-weight: 600; }
.finding.warning { color: var(--amber); border-color: var(--amber); }

.frame {
  /* 16:9 report plus the 56 px Power BI bar; 928 = 960 page width minus the gutters */
  position: relative; width: 100%; height: calc(min(100vw - 32px, 928px) * 9 / 16 + 56px);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hint { font-size: 13px; color: var(--sub); margin: 0 0 8px; }
.rotate { display: none; }
@media (max-width: 600px) and (orientation: portrait) { .rotate { display: block; } }

.talk { text-align: center; }
.mic { font-size: 44px; color: var(--accent); line-height: 1; margin: 8px 0; }

.fine { font-size: 13px; color: var(--sub); }
.error { color: var(--red); }
footer { margin-top: 28px; font-size: 12px; color: var(--sub); text-align: center; }

/* access-code page */
body.gate { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.gate-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; display: grid; gap: 12px;
}
.gate-card .lead { margin: 0; font-size: 17px; }
.gate-card form { display: grid; gap: 8px; }
.gate-card label { font-size: 13px; color: var(--sub); }
.gate-card input { text-transform: uppercase; letter-spacing: .08em; font-size: 18px; }
