:root {
  --bg: #0b1117;
  --ink: #eef1f3;
  --muted: #7f8c96;
  --gold: #d9a74a;
  --gold-soft: rgba(217, 167, 74, .16);
  --line: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.glow {
  position: fixed; inset: -20vmax auto auto 50%;
  width: 70vmax; height: 70vmax; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(217,167,74,.10) 0%, rgba(11,17,23,0) 60%);
  pointer-events: none;
  transition: opacity .6s;
  opacity: .5;
}
body.busy .glow { opacity: 1; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) scale(1.06); } }

header {
  display: flex; align-items: center; gap: 2.5vw;
  padding: 2.2vh 3vw;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.brand { display: flex; align-items: center; gap: .7vw; }
.orb {
  width: 1.5vw; height: 1.5vw; min-width: 16px; min-height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe2a8, var(--gold) 55%, #7a5a1e);
  box-shadow: 0 0 18px rgba(217,167,74,.55);
}
body.busy .orb { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 34px rgba(217,167,74,.95); transform: scale(1.12); } }
.name { font-weight: 600; letter-spacing: .35em; font-size: 1.4vw; }
.org { color: var(--muted); font-size: 1.05vw; }
.systems { list-style: none; display: flex; gap: .6vw; margin: 0 0 0 auto; padding: 0; }
.systems li {
  font-size: .85vw; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: .35vw .9vw;
  transition: all .35s;
}
.systems li.live { color: #1b1305; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 16px rgba(217,167,74,.6); }
.systems li.used { color: var(--gold); border-color: rgba(217,167,74,.5); }

main {
  flex: 1; overflow-y: auto;
  padding: 5vh 9vw 2vh;
  display: flex; flex-direction: column; gap: 2.4vh;
  position: relative;
  scrollbar-width: none;
}
.question { color: var(--muted); font-size: 1.9vw; line-height: 1.35; min-height: 1em; }
.status { color: var(--gold); font-size: 1.3vw; min-height: 1.6em; letter-spacing: .02em; }
.status:not(:empty)::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.answer {
  font-family: Fraunces, Georgia, serif; font-weight: 300;
  font-size: 3.4vw; line-height: 1.28; letter-spacing: -.005em;
  max-width: 72ch;
}
.answer p { margin: 0 0 .5em; }
.answer .hello { color: var(--muted); }
.answer.long { font-size: 2.5vw; }
.caret { display: inline-block; width: .08em; height: .9em; background: var(--gold); margin-left: .08em; vertical-align: -.08em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cards { display: flex; gap: 1.5vw; flex-wrap: wrap; }
.card {
  display: flex; align-items: center; gap: 1.2vw;
  background: var(--gold-soft); border: 1px solid rgba(217,167,74,.4);
  border-radius: 14px; padding: 1.2vw 1.6vw; min-width: 28vw;
  animation: rise .45s ease-out;
  font-size: 1.25vw;
}
.card .icon { font-size: 2.4vw; }
.card .kicker { color: var(--gold); font-size: .95vw; text-transform: uppercase; letter-spacing: .14em; }
.card .title { font-weight: 500; }
.card .meta { color: var(--muted); font-size: 1vw; }
.card button {
  margin-left: auto; font: inherit; font-size: 1vw; color: #1b1305; background: var(--gold);
  border: 0; border-radius: 99px; padding: .6vw 1.3vw; cursor: pointer;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

form {
  display: flex; gap: 1vw; align-items: center;
  margin: 0 9vw 4vh; padding: 1.1vw 1.6vw;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,.03);
}
form:focus-within { border-color: rgba(217,167,74,.55); }
#input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--ink);
  font: 400 2vw Inter, system-ui, sans-serif;
}
#input::placeholder { color: #45525c; }
#voice {
  font: 500 .95vw Inter, sans-serif; color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 99px; padding: .5vw 1vw; cursor: pointer;
}
#voice.on { color: #1b1305; background: var(--gold); border-color: var(--gold); }

.viewer {
  position: fixed; inset: 0; background: rgba(5,8,11,.92);
  display: flex; flex-direction: column; padding: 2vh 6vw 3vh; z-index: 5;
  animation: rise .3s ease-out;
}
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: 1vh 0 1.5vh; font-size: 1.3vw; }
.viewer-bar button { font: inherit; font-size: 1vw; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 99px; padding: .5vw 1.2vw; cursor: pointer; }
.viewer iframe { flex: 1; border: 0; border-radius: 10px; background: #fff; }

/* Public site: intro, suggestions, credit line, and small screens. */
.intro {
  margin: 2.4vh 9vw 0; padding: .9em 1.2em; border: 1px solid rgba(217,167,74,.35);
  border-radius: 12px; background: var(--gold-soft); color: #e9dcc4; font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.45;
}
.intro[hidden], .suggest[hidden], .credit[hidden] { display: none; }
.suggest { display: flex; flex-wrap: wrap; gap: .6em; margin: -2.4vh 9vw 2.4vh; }
.suggest button {
  font: 400 clamp(13px, .95vw, 16px) Inter, system-ui, sans-serif; color: #c9d1d7; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 99px; padding: .5em 1em;
}
.suggest button:hover { border-color: rgba(217,167,74,.6); color: var(--ink); }
.credit { text-align: center; color: #56636c; font-size: 13px; padding: 0 0 2vh; }
.credit a { color: var(--gold); text-decoration: none; }

@media (max-width: 820px) {
  header { flex-wrap: wrap; gap: 10px 16px; padding: 14px 18px; }
  .name { font-size: 18px; } .orb { width: 16px; height: 16px; } .org { font-size: 13px; }
  .systems { order: 3; width: 100%; overflow-x: auto; margin: 0; scrollbar-width: none; }
  .systems li { font-size: 12px; padding: 4px 10px; white-space: nowrap; }
  main { padding: 20px 18px 8px; gap: 12px; }
  .question { font-size: 17px; } .status { font-size: 15px; }
  .answer, .answer.long { font-size: 24px; line-height: 1.3; }
  .card { min-width: 0; width: 100%; font-size: 15px; padding: 12px 14px; gap: 12px; }
  .card .icon { font-size: 26px; } .card .kicker, .card .meta { font-size: 12px; }
  .card button { font-size: 14px; padding: 8px 14px; }
  form { margin: 0 12px 12px; padding: 10px 12px; }
  #input { font-size: 17px; }
  #voice { font-size: 12px; padding: 6px 10px; }
  .intro { margin: 12px 12px 0; } .suggest { margin: 0 12px 12px; }
  .viewer { padding: 10px; } .viewer-bar { font-size: 14px; } .viewer-bar button { font-size: 13px; }
}
