/* ============================================================
   THEME VARIABLES
   All color/spacing "constants" the rest of this file uses via
   var(--name). :root is the default (Phase 1 / home / login use
   this as-is); the two blocks below override a handful of these
   on <body data-theme="..."> to retheme Phase 2/3 without any
   other rule in this file needing to change.
   ============================================================ */
:root {
  --bg: #0b1120;               /* page background */
  --bg-panel: #131b2e;         /* card/panel background */
  --bg-panel-alt: #0f1729;     /* slightly darker inset background (inputs, nav) */
  --border: #24304a;
  --text: #e6ebf5;             /* main text color */
  --text-dim: #8b97b0;         /* secondary/muted text */
  --accent: #2dd4bf;           /* the theme color: links, active states, primary buttons */
  --accent-secondary: #0891b2; /* paired with --accent in the brand-mark gradient */
  --accent-dim: #14544d;       /* muted accent, used for the user's chat bubble background */
  --accent-contrast: #06231f;  /* text color placed ON TOP of --accent (e.g. button text) */
  --danger: #f87171;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Per-phase color themes (dark-mode versions - see the LIGHT/DARK MODE section
   further down for their light-mode counterparts). Set via
   <html data-theme="phase2|phase3">. Phase 1 and pages with no phase (home,
   login) use the default teal accent above.
   CSS custom properties are inherited, like any other CSS property - so
   redefining --accent etc. here cascades down into every descendant of
   <html>, meaning every rule elsewhere that reads var(--accent) picks up
   the new color automatically, with zero changes needed to those rules. */
html[data-theme="phase2"] {
  --accent: #a78bfa;
  --accent-secondary: #7c3aed;
  --accent-dim: #362463;
  --accent-contrast: #1c1330;
}

html[data-theme="phase3"] {
  --accent: #fbbf24;
  --accent-secondary: #d97706;
  --accent-dim: #4a3510;
  --accent-contrast: #2b1d02;
}

/* ============================================================
   LIGHT/DARK MODE
   :root's bare values above are the dark palette - this site's original,
   and still the overall fallback, look. Light takes over two ways:

   1. No explicit preference stored + the OS/browser prefers light -> the
      prefers-color-scheme media query below (this is what makes the
      DEFAULT auto-follow-system-settings behavior work with no JS involved
      at all).
   2. An explicit preference IS stored (via the nav's toggle button, see
      js/theme.js) -> the inline <script> at the top of every page's <head>
      sets data-mode="light"|"dark" on <html> before first paint (to avoid a
      flash of the wrong theme), and the two attribute rules below apply -
      these win over the media query in both directions, which is why the
      media query's guard is ":not([data-mode="dark"])" rather than nothing.

   Same duplication pattern as the per-phase themes above: every rule
   elsewhere reads var(--bg)/var(--text)/etc., so retheming here needs no
   changes anywhere else in this file.
   ============================================================ */
@media (prefers-color-scheme: light) {
  :root:not([data-mode="dark"]) {
    --bg: #f4f6fb;
    --bg-panel: #ffffff;
    --bg-panel-alt: #eef1f7;
    --border: #d9e0ec;
    --text: #101828;
    --text-dim: #5b6577;
    --accent: #0d9488;
    --accent-secondary: #0e7490;
    --accent-dim: #ccfbf1;
    --accent-contrast: #ffffff;
    --danger: #dc2626;
  }
  :root:not([data-mode="dark"])[data-theme="phase2"] {
    --accent: #7c3aed;
    --accent-secondary: #6d28d9;
    --accent-dim: #ede9fe;
    --accent-contrast: #ffffff;
  }
  :root:not([data-mode="dark"])[data-theme="phase3"] {
    --accent: #b45309;
    --accent-secondary: #92400e;
    --accent-dim: #fef3c7;
    --accent-contrast: #ffffff;
  }
  :root:not([data-mode="dark"]) .phase-card--2 { --accent: #7c3aed; }
  :root:not([data-mode="dark"]) .phase-card--3 { --accent: #b45309; }
}

:root[data-mode="light"] {
  --bg: #f4f6fb;
  --bg-panel: #ffffff;
  --bg-panel-alt: #eef1f7;
  --border: #d9e0ec;
  --text: #101828;
  --text-dim: #5b6577;
  --accent: #0d9488;
  --accent-secondary: #0e7490;
  --accent-dim: #ccfbf1;
  --accent-contrast: #ffffff;
  --danger: #dc2626;
}

:root[data-mode="light"][data-theme="phase2"] {
  --accent: #7c3aed;
  --accent-secondary: #6d28d9;
  --accent-dim: #ede9fe;
  --accent-contrast: #ffffff;
}

:root[data-mode="light"][data-theme="phase3"] {
  --accent: #b45309;
  --accent-secondary: #92400e;
  --accent-dim: #fef3c7;
  --accent-contrast: #ffffff;
}

:root[data-mode="light"] .phase-card--2 { --accent: #7c3aed; }
:root[data-mode="light"] .phase-card--3 { --accent: #b45309; }

/* ============================================================
   GLOBAL RESET / BASE ELEMENTS
   ============================================================ */
* {
  box-sizing: border-box; /* padding/border count inward, so widths stay predictable */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

/* ============================================================
   TOP NAVIGATION BAR
   The bar at the top of every page: brand/logo, Home + Phase 1/2/3
   links, and the sign-in/sign-out area on the right (filled in by
   js/auth.js's renderNavAuthState(), not by this CSS).
   ============================================================ */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-contrast);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--border);
}

.nav-links a.active {
  color: var(--text);
  background: var(--bg-panel);
  border-color: var(--border);
}

.nav-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
}

/* The little "1"/"2"/"3" circle turns solid --accent only for the current page's
   link (the one with class="active" in the HTML) - this is what makes the nav
   badge visibly "light up" in that phase's theme color. */
.nav-links a.active .nav-badge {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* Wraps the theme toggle + #nav-auth together as one flex item, so .topnav's
   justify-content: space-between still sees exactly 3 top-level children
   (brand, nav-links, this) instead of spreading a 4th one out unevenly. */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   BUTTONS
   .btn is the base pill shape; .btn-primary (solid, theme-colored)
   and .btn-ghost (text-only, no border) are variants added alongside it,
   e.g. class="btn btn-primary".
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: transparent;
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* The sun/moon light-dark toggle button in the nav (see js/theme.js). Square
   rather than the pill-shaped .btn-ghost it's based on, since it holds a
   single icon rather than a text label. */
#theme-toggle {
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1;
}

/* ============================================================
   PAGE LAYOUT / SHARED HEADER
   <main> centers and caps the width of every page's content.
   .page-header is the "Phase N - Title" + description block used
   at the top of the 3 phase pages (the home page uses .hero instead).
   ============================================================ */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.page-header p {
  margin: 0;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.5;
}

/* The "Work in progress" pill next to the Phase 3 heading. Fixed amber colors
   (not var(--accent)) so it reads the same regardless of the page's theme. */
.wip-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #3a2a12;
  color: #f0b83f;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

/* ============================================================
   HOME PAGE: hero intro + the 3 phase cards
   ============================================================ */
.hero {
  padding: 40px 0 20px;
}

.hero h1 {
  font-size: 34px;
  margin: 0 0 12px;
}

.hero p {
  color: var(--text-dim);
  max-width: 620px;
  line-height: 1.6;
  font-size: 15px;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.phase-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Preview each phase's theme color on its home-page card, scoped locally so it
   doesn't affect the rest of the (untethered) home page. */
.phase-card--2 {
  --accent: #a78bfa;
}

.phase-card--3 {
  --accent: #fbbf24;
}

.phase-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
}

.phase-card h3 {
  margin: 0;
  font-size: 17px;
}

.phase-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
  flex-grow: 1;
}

.phase-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* Not currently used anywhere in the HTML (no element has class="locked") -
   left in from an earlier design in case a "locked until you sign in" state
   gets added back to the home page cards later. */
.phase-status.locked::before {
  content: "\1F512  "; /* unicode padlock emoji */
}

/* ============================================================
   PHASE PAGES: the 3-column Chat / Records / Data layout
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr; /* chat column slightly wider */
  gap: 18px;
  align-items: stretch; /* all 3 cards match the tallest one's height */
}

/* Base card shape shared by the chat/records/data panels AND the phase-2
   logs panel below (.card.logs-widget combines both). */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-header h2 {
  margin: 0;
  font-size: 15px;
}

.card-note {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

/* --- Chat widget: message list + input row, inside the Chat card --- */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 12px;
}

.chat-message {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
}

/* chat.js sets class="chat-message chat-message--agent" or "...--user" on each
   bubble it creates - these two rules are what actually tell them apart visually
   (agent on the left in a neutral color, user on the right in the accent color). */
.chat-message--agent {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.chat-message--user {
  background: var(--accent-dim);
  align-self: flex-end;
  /* var(--text), not a fixed color: --accent-dim is a DARK muted tint in dark
     mode (needs light text) but a very PALE tint in light mode (needs dark
     text) - var(--text) is always "the readable color for this mode", so it
     tracks that flip automatically. A fixed light color here would go
     pale-on-pale (unreadable) once light mode existed. */
  color: var(--text);
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex-grow: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel-alt);
  color: var(--text);
  font-size: 13.5px;
}

.chat-input-row input:focus {
  outline: 1px solid var(--accent);
}

/* --- Records card: the flagged-account list --- */
.record-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.record-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg-panel-alt);
}

.record-item .record-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.record-item .record-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* Status pill on each record (Escalate/Needs review/Dismissed). Fixed colors
   per status (not var(--accent)) so "escalate" reads as red-ish regardless of
   which phase's theme is active - status meaning shouldn't shift with theme. */
.tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-escalate {
  background: #3a1f22;
  color: #f87171;
}

.tag-dismiss {
  background: #16302a;
  color: #34d399;
}

.tag-review {
  background: #3a2a12;
  color: #f0b83f;
}

/* --- Data card: the label/value stat rows --- */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row .stat-label {
  color: var(--text-dim);
}

.stat-row .stat-value {
  font-weight: 600;
}

/* ============================================================
   PHASE 2 ONLY: the full-width Agent Logs panel below the 3-column grid.
   ============================================================ */
.logs-widget {
  margin-bottom: 18px;
}

/* Holds the source <select> + Refresh button, right-aligned next to the
   "Agent Logs" heading inside .card-header (which is already
   justify-content: space-between, so this just needs to be one flex item). */
.logs-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-controls select {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel-alt);
  color: var(--text);
  font-size: 12.5px;
}

.logs-controls select:focus {
  outline: 1px solid var(--accent);
}

/* Intentionally NOT theme-driven: this panel stays a dark "terminal" look in
   both light and dark mode (like a code editor's console pane), so its own
   text colors are fixed rather than using var(--text)/var(--text-dim) - those
   flip to dark colors in light mode, which would go unreadable against this
   panel's always-near-black background. */
.logs-panel {
  background: #05070c;
  color: #d7e0f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  height: 220px;
  overflow-y: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
}

.log-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.log-line .log-tag {
  color: var(--accent);
}

.log-line .log-dim {
  color: #7c879e;
}

/* ============================================================
   PHASE 1 & 2: full-width Agent Info panel below the 3-column grid.
   Detail about the AWS Bedrock Agent/model behind the last chat reply - see
   js/chat.js's renderAgentInfo() for what populates each part.
   ============================================================ */
.agent-info-widget {
  margin-top: 18px;
}

.agent-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 20px;
  margin-bottom: 14px;
}

.agent-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-info-key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.agent-info-value {
  font-size: 13px;
  word-break: break-word;
}

.agent-info-subhead {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  margin: 14px 0 6px;
}

.agent-info-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-info-actions li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg-panel-alt);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-info-text {
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-wrap {
  min-height: calc(100vh - 61px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}

.login-card h1 {
  font-size: 20px;
  margin: 0 0 6px;
}

.login-card p.sub {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 22px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel-alt);
  color: var(--text);
  font-size: 14px;
}

.field input:focus {
  outline: 1px solid var(--accent);
}

.login-note {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.login-note code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Hidden by default; login.html's inline <script> sets style.display = "block"
   on this element if you try to submit with an empty field. */
.login-error {
  color: var(--danger);
  font-size: 12.5px;
  margin: -8px 0 14px;
  display: none;
}

/* ============================================================
   RESPONSIVE: narrow screens (phones, small tablets) collapse the
   3-column grids to a single column instead of squeezing 3 across.
   ============================================================ */
@media (max-width: 900px) {
  .grid-3,
  .phase-grid {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 300px;
  }
}

/* --- Rendered markdown (js/markdown.js): the agents' replies, in chat bubbles
   and report boxes. Colours come from the --md-* variables, which fall back to
   this site's theme; the Phase 2 / 3 dashboards set them to their own
   palettes (see css/phase2-dashboard.css). --- */
.md {
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 0;
}
.md > :first-child {
  margin-top: 0;
}
.md > :last-child {
  margin-bottom: 0;
}
.md p {
  margin: 0 0 0.6em;
}
.md strong {
  font-weight: 600;
  color: var(--md-text, var(--text));
}
.md em {
  font-style: italic;
}
.md del {
  opacity: 0.7;
}
.md .md-h {
  margin: 1.1em 0 0.4em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--md-text, var(--text));
}
.md h3.md-h {
  font-size: 1.12em;
}
.md h4.md-h {
  font-size: 1.04em;
}
.md h5.md-h,
.md h6.md-h {
  font-size: 0.82em;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--md-accent, var(--accent));
}
.md code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--md-code-bg, rgba(127, 127, 127, 0.18));
}
.md pre.md-code {
  margin: 0.6em 0;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid var(--md-border, var(--border));
  border-radius: 5px;
  background: var(--md-code-bg, rgba(127, 127, 127, 0.18));
}
.md pre.md-code code {
  padding: 0;
  background: none;
  font-size: 0.88em;
}
.md ul,
.md ol {
  margin: 0 0 0.6em;
  padding-left: 1.35em;
}
.md li {
  margin: 0.2em 0;
}
.md li > ul,
.md li > ol {
  margin: 0.2em 0 0;
}
.md blockquote {
  margin: 0.6em 0;
  padding: 0.1em 0 0.1em 12px;
  border-left: 2px solid var(--md-accent, var(--accent));
  color: var(--md-dim, var(--text-dim));
}
.md hr {
  margin: 1em 0;
  border: 0;
  border-top: 1px solid var(--md-border, var(--border));
}
/* Wide tables scroll sideways inside their own box instead of stretching the bubble. */
.md .md-table-wrap {
  margin: 0.6em 0;
  overflow-x: auto;
  border: 1px solid var(--md-border, var(--border));
  border-radius: 4px;
}
.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}
.md th,
.md td {
  padding: 5px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--md-border, var(--border));
}
.md tbody tr:last-child td {
  border-bottom: 0;
}
.md th {
  font-weight: 600;
  white-space: nowrap;
  color: var(--md-dim, var(--text-dim));
  background: var(--md-surface, var(--bg-panel-alt));
}
.md .md-al-c {
  text-align: center;
}
.md .md-al-r {
  text-align: right;
}
.md .md-al-l {
  text-align: left;
}
/* Inside a chat bubble: tighter, headings no bigger than the text. */
.chat-message.md p {
  margin-bottom: 0.45em;
}
.chat-message.md .md-h {
  margin-top: 0.8em;
  font-size: 1em;
}
.chat-message.md .md-h:first-child {
  margin-top: 0;
}

/* A phase that is no longer in use (Phase 1 on the home page): dimmed, with a button
   that looks inert. It is a <span aria-disabled>, not a link, so there is nothing to follow. */
.phase-card--unavailable {
  opacity: 0.6;
}
.phase-card--unavailable .btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
