/* Texas 2036 Brain — January Advisors house brand.
 * Tokens mirrored from company/design-system/tokens/colors.css. */

@font-face {
  font-family: "Borna";
  src: url("/fonts/Borna-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #004e7b;
  --navy-2: #2495b7;
  --teal: #00b9c3;
  --orange: #faa634;
  --black: #262626;
  --gray: #f0eded;
  --line: #e2dcdc;
  --white: #fff;
  --muted: #5f6b73;

  --radius-card: 18px;
  --shadow: 0 1px 2px rgba(38, 38, 38, 0.06), 0 8px 24px rgba(38, 38, 38, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Onest", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}

h1, h2, h3 { font-family: "Borna", "Onest", sans-serif; font-weight: 700; letter-spacing: 0; }

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

button {
  font-family: "Borna", "Onest", sans-serif;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s ease;
}
button:hover:not(:disabled) { background: #003a5c; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, select, textarea {
  font-family: "Onest", sans-serif;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--white);
  color: var(--black);
}
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--gray);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 40px 36px;
}
.login-card img { height: 28px; margin-bottom: 28px; }
.login-card h1 { font-size: 26px; margin: 0 0 6px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
.login-card form { display: flex; gap: 10px; }
.login-card input { flex: 1; }
.notice {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.err { color: #b3261e; font-size: 14px; margin-top: 12px; min-height: 20px; }

/* The capsule highlight — brand signature, 50% opacity behind a key word. */
.capsule {
  background: rgba(0, 185, 195, 0.5);
  border-radius: 999px;
  padding: 0 0.4em;
  box-decoration-break: clone;
}

/* ---------- App shell ---------- */

.shell { display: flex; flex-direction: column; height: 100vh; }

header.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
header.bar img { height: 22px; }
header.bar .title { font-family: "Borna", sans-serif; font-weight: 700; font-size: 15px; }
header.bar .spacer { flex: 1; }
header.bar select { padding: 7px 12px; border-radius: 999px; font-size: 14px; }
header.bar .ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 7px 16px;
  font-size: 14px;
}
header.bar .ghost:hover { background: var(--gray); }
.model-note { font-size: 12px; color: var(--muted); }

/* ---------- Transcript ---------- */

.transcript { flex: 1; overflow-y: auto; padding: 28px 22px 8px; }
.inner { max-width: 780px; margin: 0 auto; }

.msg { margin-bottom: 26px; }
.msg .who {
  font-family: "Borna", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.msg.user .bubble {
  background: var(--gray);
  border-radius: var(--radius-card);
  padding: 14px 18px;
}
.msg.assistant .bubble p:first-child { margin-top: 0; }
.msg.assistant .bubble p:last-child { margin-bottom: 0; }
.bubble { word-wrap: break-word; }
.bubble a { word-break: break-all; }

/* Rendered markdown inside an assistant message. */
.msg.user .bubble { white-space: pre-wrap; }
.bubble h3 { font-size: 16px; margin: 18px 0 6px; }
.bubble p { margin: 0 0 12px; }
.bubble ul, .bubble ol { margin: 0 0 12px; padding-left: 22px; }
.bubble li { margin-bottom: 4px; }
.bubble code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--gray);
  padding: 1px 5px;
  border-radius: 5px;
}
.bubble pre {
  background: var(--gray);
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.bubble pre code { background: none; padding: 0; }
.bubble table { margin: 0 0 14px; font-size: 15px; }
.bubble th, .bubble td { padding: 7px 12px; }
.bubble blockquote {
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
}
.bubble hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.cursor {
  display: inline-block; width: 7px; height: 1em;
  background: var(--teal); vertical-align: text-bottom;
  animation: pulse 1.1s ease-in-out infinite;
}

.activity {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.meta { font-size: 12px; color: var(--muted); margin-top: 10px; }

.empty { color: var(--muted); padding: 48px 0; }
.empty h2 { font-size: 22px; color: var(--black); margin: 0 0 10px; }
.examples { display: grid; gap: 8px; margin-top: 20px; }
.examples button {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  font-family: "Onest", sans-serif;
  font-weight: 400;
  padding: 12px 16px;
  font-size: 15px;
}
.examples button:hover { background: var(--gray); }

/* ---------- Composer ---------- */

footer.composer {
  border-top: 1px solid var(--line);
  padding: 16px 22px 20px;
  background: var(--white);
  flex-shrink: 0;
}
footer.composer .inner { display: flex; gap: 10px; align-items: flex-end; }
footer.composer textarea {
  flex: 1;
  resize: none;
  max-height: 180px;
  line-height: 1.5;
}
.disclaimer {
  max-width: 780px;
  margin: 10px auto 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Admin ---------- */

.admin { max-width: 1040px; margin: 0 auto; padding: 32px 22px 64px; }
.admin h1 { font-size: 28px; margin: 0 0 4px; }
.admin .sub { color: var(--muted); margin: 0 0 28px; }

.banner {
  background: rgba(250, 166, 52, 0.16);
  border: 1px solid var(--orange);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 15px;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat .label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-family: "Borna", sans-serif;
}
.stat .value { font-family: "Borna", sans-serif; font-size: 28px; margin-top: 4px; color: var(--navy); }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

.admin h2 { font-size: 18px; margin: 36px 0 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { font-family: "Borna", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }

.chart { display: flex; align-items: flex-end; gap: 5px; height: 130px; margin-top: 8px; }
/* max-width keeps a single day from rendering as one full-width slab. */
.chart .col {
  flex: 1 1 0;
  max-width: 48px;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-width: 8px;
}
.chart .fill { background: var(--navy-2); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .day { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; }

.q { color: var(--muted); max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caveat {
  margin-top: 40px; padding: 18px 20px;
  background: var(--gray); border-radius: var(--radius-card);
  font-size: 14px; color: var(--muted);
}
.caveat strong { color: var(--black); }

@media (max-width: 620px) {
  header.bar .title { display: none; }
  .transcript { padding: 20px 16px 8px; }
}
