/* Influencer — the whole stylesheet. Light and dark, no framework, no build. */

:root {
  color-scheme: light dark;

  --bg:       #fbfaf8;
  --panel:    #f2efe9;
  --ink:      #17191c;
  --ink-2:    #5c6570;
  --ink-3:    #8a939e;
  --rule:     #e0dcd4;
  --rule-2:   #c9c4ba;
  --accent:   #1c3f5e;
  --danger:   #94303f;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #14161a;
    --panel:  #1d2026;
    --ink:    #e9e7e3;
    --ink-2:  #a3abb6;
    --ink-3:  #737c88;
    --rule:   #2a2e36;
    --rule-2: #3c424c;
    --accent: #9dc4e6;
    --danger: #e08f9c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0; padding: 0 5vw 8rem;
  background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main { max-width: 46rem; margin: 0 auto; }

header { padding: 3.5rem 0 0; }
h1 { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.lede {
  margin: 0.75rem 0 0; max-width: 34rem;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.45; color: var(--ink-2);
}

/* Read before anything is typed, so it is a filled panel above the input and
   there is no way to dismiss it. */
.disclosure {
  margin: 2rem 0 0; padding: 0.85rem 1rem;
  background: var(--ink); color: var(--bg);
  font-size: 0.9rem; line-height: 1.45;
}
@media (prefers-color-scheme: dark) { .disclosure { background: var(--panel); color: var(--ink); border-left: 3px solid var(--accent); } }

.warn {
  margin: 1rem 0 0; padding: 0.8rem 1rem;
  background: var(--panel); border-left: 3px solid var(--rule-2);
  font-size: 0.9rem; color: var(--ink-2);
}
.warn code { font-family: var(--mono); font-size: 0.85em; }

.thread {
  margin: 2rem 0 0; padding: 1.5rem 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.thread:empty { display: none; }

.turn { display: flex; flex-direction: column; gap: 0.35rem; }
.who {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3);
}
.said { margin: 0; font-family: var(--serif); font-size: 1.05rem; white-space: pre-wrap; }
.turn--you .said { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--accent); }

/* The citation line. An explainer that says where it got something is doing the
   most useful thing it can do; hiding that behind a toggle would be a waste. */
.cited { margin: 0.4rem 0 0; padding: 0; list-style: none; }
.cited li {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
  padding-left: 0.9rem; text-indent: -0.9rem;
}
.cited li::before { content: "· "; }

.empty { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.thinking { margin: 0; color: var(--ink-3); font-size: 0.85rem; }

.error {
  margin: 1rem 0 0; padding: 0.8rem 1rem;
  border-left: 3px solid var(--danger); color: var(--danger); font-size: 0.9rem;
}

form { margin: 1.5rem 0 0; display: flex; gap: 0.75rem; align-items: flex-end; }
input[type=text] {
  flex: 1; background: transparent; border: 0; border-bottom: 1px solid var(--rule-2);
  padding: 0.6rem 0.15rem; font: inherit; color: var(--ink);
}
input[type=text]:focus { outline: 0; border-bottom-color: var(--accent); border-bottom-width: 2px; }
input[type=text]::placeholder { color: var(--ink-3); }
button {
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  padding: 0.55rem 1.1rem; font: 500 0.85rem var(--sans); cursor: pointer;
}
button:disabled { border-color: var(--rule-2); background: transparent; color: var(--ink-3); cursor: not-allowed; }

.note { margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--ink-3); }

.starts { margin: 1.25rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.starts button {
  border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2);
  font-weight: 400; font-size: 0.85rem; text-align: left;
}
.starts button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }

.how { margin: 4rem 0 0; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.how h2 { margin: 0; font-size: 1.25rem; }
.how h3 {
  margin: 2rem 0 0; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3);
}
.how p { max-width: 34rem; color: var(--ink-2); font-size: 0.95rem; }
.how p.serif { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }

.files { margin: 1.25rem 0 0; display: grid; gap: 0.5rem; }
.files > div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
.files dt { font-family: var(--mono); font-size: 0.8rem; }
.files dd { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

.srcs { margin: 1rem 0 0; padding: 0; list-style: none; }
.srcs li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
.srcs code { font-family: var(--mono); font-size: 0.85em; }
.srcs span { color: var(--ink-3); }

pre {
  margin: 1rem 0 0; padding: 0.9rem 1rem;
  background: var(--panel); border-left: 1px solid var(--rule-2);
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.5; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
pre.long { max-height: 60vh; overflow-y: auto; }

details { margin: 2rem 0 0; }
summary { cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--accent); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 34rem) {
  form { flex-direction: column; align-items: stretch; }
  .files > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ── The stage ──────────────────────────────────────────────────────────────
   The face, and the label that is not allowed to leave it. `disclosure.md` asks
   for the label on video for the first three seconds; keeping it there for the
   whole time costs nothing and cannot be missed by someone who arrives late.
*/

.stage {
  position: relative;
  margin: 0 0 1.75rem;
  max-width: 22rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  aspect-ratio: 4 / 5;
}

.stage img,
.stage video {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--panel);
}

.stage-label {
  position: absolute; left: 0; bottom: 0;
  margin: 0; padding: .3rem .6rem;
  font: 600 11px/1 var(--sans);
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff;
  /* Its own dark plate rather than a translucent one, so it stays legible over a
     bright frame of video as well as a dark one. */
  background: rgba(12, 14, 18, .82);
  border-top-right-radius: 6px;
}

.stage-status {
  position: absolute; inset: auto 0 0 0;
  margin: 0; padding: .45rem 4.5rem .45rem .6rem;
  font: 13px/1.3 var(--sans);
  color: #fff;
  background: rgba(12, 14, 18, .82);
}

/* ── Who is here ─────────────────────────────────────────────────────────── */

.who-bar {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: baseline; justify-content: space-between;
  margin: 0 0 1.25rem; padding: .6rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  font-size: 14px; color: var(--ink-2);
}

.who-action {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.who-action:hover { opacity: .8; }

/* ── Admin ──────────────────────────────────────────────────────────────────
   Deliberately plain. This is a control room for one person, and every minute
   spent styling it is a minute not spent on the character.
*/

.admin { max-width: 54rem; }

.panel {
  margin: 0 0 2rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel);
}

.panel h2 { margin-top: 0; }
.panel h3 { margin: 1.5rem 0 .4rem; font-size: 15px; }

.row {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin: .75rem 0;
}

.row input[type="text"], .row select { flex: 1 1 14rem; min-width: 0; }

.quote {
  margin: .5rem 0; padding: .6rem .8rem;
  border-left: 3px solid var(--rule-2);
  font: italic 15px/1.5 var(--serif);
  color: var(--ink-2);
}

.stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: .5rem 0 0; }
.stats div { margin: 0; }
.stats dt { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.stats dd { margin: .15rem 0 0; font: 600 20px/1.2 var(--sans); }

.checklist { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--ink-2); font-size: 14px; }
.checklist li { margin: .2rem 0; }

.grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  margin-top: .6rem;
}

.card {
  margin: 0; padding: .5rem;
  border: 1px solid var(--rule-2); border-radius: 8px;
  background: var(--bg);
}

/* The chosen one is outlined rather than badged: at a glance across a grid, an
   outline reads faster than a label you have to find. */
.card--chosen { outline: 2px solid var(--accent); outline-offset: 1px; }

.card img {
  display: block; width: 100%; aspect-ratio: 4 / 5;
  object-fit: cover; border-radius: 5px; background: var(--panel);
}

.card figcaption {
  display: flex; justify-content: space-between; gap: .5rem;
  margin: .4rem 0; font-size: 12px; color: var(--ink-3);
}

.card .tag { font-weight: 600; color: var(--ink-2); }
.card button { width: 100%; }

.upload span {
  display: inline-block; margin-left: .3rem; padding: .2rem .55rem;
  border: 1px solid var(--rule-2); border-radius: 6px;
  cursor: pointer; color: var(--accent); font-weight: 600;
}
