/**
 * siren.css — SIREN Standalone Frontend Styles
 * SKYbrary white-and-navy institutional aesthetic
 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --rag-bg: #ffffff;
  --rag-surface: #f4f6f8;
  --rag-surface-dark: #e8ecf0;
  --rag-border: #d0d7de;
  --rag-navy: #003366;
  --rag-navy-light: #004488;
  --rag-navy-dim: rgba(0, 51, 102, 0.08);
  --rag-text: #1a1a2e;
  --rag-text-muted: #6b7280;
  --rag-red: #c0392b;
  --rag-blue-light: #e8f0f8;
  --rag-radius: 4px;
  --rag-font: 'Open Sans', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1rem;
  background: #eef1f5;
  font-family: var(--rag-font);
}

/* ── Widget ─────────────────────────────────────────────────────────────────── */
.skybrary-rag {
  font-family: var(--rag-font);
  background: var(--rag-bg);
  border: 1px solid var(--rag-border);
  border-top: 4px solid var(--rag-navy);
  border-radius: var(--rag-radius);
  overflow: hidden;
  max-width: 900px;
  margin: 2rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.rag-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.25rem;
  background: var(--rag-navy);
  color: #fff;
}
.rag-header__icon     { font-size: 1.1rem; color: #fff; }
.rag-header__title    { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; }
.rag-header__subtitle { font-size: 0.68rem; font-weight: 400; color: rgba(255,255,255,0.55); letter-spacing: 0.02em; }

.rag-status {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  transition: color 0.3s;
}
.rag-status.is-loading { color: #f9ca24; animation: analyzing-pulse 1.4s ease-in-out infinite; }
.rag-status.is-done    { color: #6fcf97; }
.rag-status.is-error   { color: #ff6b6b; }

/* ── Route bar ──────────────────────────────────────────────────────────────── */
.rag-route {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1.25rem;
  background: var(--rag-blue-light);
  border-bottom: 1px solid var(--rag-border);
  font-size: 0.72rem;
  font-weight: 600;
  flex-wrap: wrap;
}
.rag-route__item   { color: var(--rag-navy); }
.rag-route__sep    { color: var(--rag-border); }
.rag-route__router { color: var(--rag-text-muted); font-weight: 400; }

.rag-route__mode {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 0.15rem 0.55rem;
  border-radius: 3px; border: 1px solid transparent;
}
.rag-route__mode.is-conceptual    { background: rgba(0,51,102,0.1);   border-color: rgba(0,51,102,0.25);   color: var(--rag-navy); }
.rag-route__mode.is-investigative { background: rgba(180,100,0,0.1);  border-color: rgba(180,100,0,0.3);   color: #7a4200; }
.rag-route__mode.is-analytical    { background: rgba(80,0,140,0.08);  border-color: rgba(80,0,140,0.22);   color: #50008c; }
.rag-route__mode.is-refusal       { background: rgba(192,57,43,0.08); border-color: rgba(192,57,43,0.25);  color: var(--rag-red); }

/* ── Stats panel ────────────────────────────────────────────────────────────── */
.rag-stats {
  display: none;
  border-bottom: 1px solid var(--rag-border);
  padding: 1rem 1.25rem;
  background: var(--rag-surface);
}
.rag-stats__summary { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }

.rag-stats__pill {
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.65rem;
  background: var(--rag-navy-dim); border: 1px solid rgba(0,51,102,0.2);
  border-radius: 3px; color: var(--rag-navy);
}
.rag-stats__pill.is-filter {
  background: var(--rag-navy); border-color: var(--rag-navy); color: #fff; letter-spacing: 0.04em;
}

.rag-stats__chart            { margin-bottom: 1rem; }
.rag-stats__chart:last-child { margin-bottom: 0; }
.rag-stats__chart-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--rag-text-muted);
  margin-bottom: 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rag-border);
}
.rag-stats__bar-row {
  display: grid; grid-template-columns: 220px 1fr 44px;
  align-items: center; gap: 0.6rem; margin-bottom: 0.3rem;
}
.rag-stats__bar-label { font-size: 0.78rem; color: var(--rag-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rag-stats__bar-track { height: 7px; background: var(--rag-surface-dark); border-radius: 4px; overflow: hidden; }
.rag-stats__bar-fill  { height: 100%; background: var(--rag-navy); border-radius: 4px; transition: width 0.5s ease; }
.rag-stats__bar-count { font-size: 0.72rem; font-weight: 600; color: var(--rag-text-muted); text-align: right; }
.rag-stats__sparkline { width: 100%; height: 52px; display: block; }
.rag-stats__spark-labels {
  display: flex; justify-content: space-between;
  font-size: 0.68rem; color: var(--rag-text-muted); margin-top: 0.2rem;
}

/* ── Response area ──────────────────────────────────────────────────────────── */
.rag-response {
  min-height: 120px; max-height: 480px; overflow-y: auto;
  padding: 0; font-size: 0.92rem; line-height: 1.7;
  color: var(--rag-text); scrollbar-width: thin; scrollbar-color: var(--rag-border) transparent;
}
.rag-response__placeholder { color: var(--rag-text-muted); font-style: italic; padding: 1.4rem 1.5rem; margin: 0; }
.rag-response::-webkit-scrollbar       { width: 4px; }
.rag-response::-webkit-scrollbar-track { background: transparent; }
.rag-response::-webkit-scrollbar-thumb { background: var(--rag-border); border-radius: 2px; }

/* ── Q/A blocks ─────────────────────────────────────────────────────────────── */
.rag-qa-block    { border-bottom: 1px solid var(--rag-border); }
.rag-qa-q {
  display: flex; gap: 0.75rem; align-items: baseline;
  padding: 0.85rem 1.5rem; background: var(--rag-blue-light);
  border-bottom: 1px solid var(--rag-border);
}
.rag-qa-q__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rag-navy); flex-shrink: 0; }
.rag-qa-q__text  { font-size: 0.9rem; font-weight: 600; color: var(--rag-navy); }

.rag-qa-a        { display: flex; gap: 0.75rem; align-items: baseline; padding: 1rem 1.5rem; }
.rag-qa-a__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rag-text-muted); flex-shrink: 0; }
.rag-qa-a__text  { font-size: 0.92rem; color: var(--rag-text); line-height: 1.75; flex: 1; }
.rag-qa-a__text-refusal { color: var(--rag-text-muted); font-style: italic; margin: 0; }

/* ── Cursor ─────────────────────────────────────────────────────────────────── */
.rag-cursor {
  display: inline-block; width: 2px; height: 1em; background: var(--rag-navy);
  margin-left: 2px; vertical-align: text-bottom; animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Analyzing ──────────────────────────────────────────────────────────────── */
.rag-analyzing { color: var(--rag-text-muted); font-style: italic; animation: analyzing-pulse 1.4s ease-in-out infinite; }
@keyframes analyzing-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Sources ────────────────────────────────────────────────────────────────── */
.rag-sources { border-top: 1px solid var(--rag-border); padding: 0.8rem 1.25rem; background: var(--rag-surface); }
.rag-sources__title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--rag-text-muted); margin: 0 0 0.55rem;
}
.rag-sources__list  { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rag-sources__group {
  width: 100%; font-size: 0.63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--rag-text-muted); margin: 0.4rem 0 0.15rem;
}
.rag-sources__group:first-child { margin-top: 0; }
.rag-sources__item a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem; background: var(--rag-bg); border: 1px solid var(--rag-border);
  border-radius: 3px; font-size: 0.74rem; color: var(--rag-navy);
  text-decoration: none; transition: background 0.15s, border-color 0.15s;
}
.rag-sources__item a:hover { background: var(--rag-blue-light); border-color: var(--rag-navy); }
.rag-sources__score { color: var(--rag-text-muted); font-size: 0.66rem; }

.rag-sources__badge {
  font-size: 0.62rem; font-weight: 700; padding: 0.1rem 0.3rem;
  border-radius: 2px; margin-right: 0.25rem; flex-shrink: 0; line-height: 1;
}
.rag-sources__badge.is-curated  { background: rgba(180,140,0,0.12); border: 1px solid rgba(180,140,0,0.35); color: #7a5c00; }
.rag-sources__badge.is-category { background: rgba(0,100,100,0.1);  border: 1px solid rgba(0,100,100,0.25); color: #005555; }
.rag-sources__badge.is-operator { background: rgba(0,48,96,0.09);   border: 1px solid rgba(0,48,96,0.28);   color: #003060; }

.rag-sources__item--grouped {
  padding-bottom: .4rem;
}
.rag-sources__chunk {
  display: block;
  font-size: .75rem;
  color: #6b7280;
  padding-left: .75rem;
  line-height: 1.6;
}
.rag-sources__chunk::before {
  content: '· ';
}


/* ── Form ───────────────────────────────────────────────────────────────────── */
.rag-form {
  display: flex; gap: 0.6rem; padding: 0.9rem 1.25rem;
  border-top: 2px solid var(--rag-navy); background: var(--rag-surface);
  justify-content: center;
}
.rag-form__input {
  flex: 1; background: var(--rag-bg); border: 1px solid var(--rag-border);
  border-radius: var(--rag-radius); color: var(--rag-text); font-family: var(--rag-font);
  font-size: 0.9rem; line-height: 1.5; padding: 0.6rem 0.9rem;
  resize: none; transition: border-color 0.2s; outline: none;
}
.rag-form__input:focus       { border-color: var(--rag-navy); }
.rag-form__input::placeholder { color: var(--rag-text-muted); }

.rag-form__button {
  display: flex; align-items: center; gap: 0.4rem; padding: 0 1.2rem;
  background: var(--rag-navy); border: none; border-radius: var(--rag-radius);
  color: #fff; font-family: var(--rag-font); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer; transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.rag-form__button:hover:not(:disabled)  { background: var(--rag-navy-light); }
.rag-form__button:active:not(:disabled) { transform: scale(0.97); }
.rag-form__button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Error ──────────────────────────────────────────────────────────────────── */
.rag-error { color: var(--rag-red); font-size: 0.85rem; padding: 0.8rem 1.5rem; background: #fdf0ef; border-top: 1px solid #f5c6c3; }

/* ── Markdown rendered content ──────────────────────────────────────────────── */
.rag-qa-a__text h2,
.rag-qa-a__text h3,
.rag-qa-a__text h4 { font-family: var(--rag-font); color: var(--rag-navy); margin: 1em 0 0.35em; line-height: 1.3; }
.rag-qa-a__text h2 { font-size: 1rem;    font-weight: 700; }
.rag-qa-a__text h3 { font-size: 0.95rem; font-weight: 700; }
.rag-qa-a__text h4 { font-size: 0.88rem; font-weight: 700; }
.rag-qa-a__text h2:first-child,
.rag-qa-a__text h3:first-child,
.rag-qa-a__text h4:first-child { margin-top: 0; }
.rag-qa-a__text p           { margin: 0 0 0.75em; line-height: 1.75; }
.rag-qa-a__text p:last-child { margin-bottom: 0; }
.rag-qa-a__text ul,
.rag-qa-a__text ol { margin: 0.35em 0 0.75em; padding-left: 1.4em; }
.rag-qa-a__text li { margin-bottom: 0.3em; line-height: 1.6; }
.rag-qa-a__text strong { font-weight: 700; color: var(--rag-text); }
.rag-qa-a__text em     { font-style: italic; }
.rag-qa-a__text code   {
  font-family: 'Consolas', 'Monaco', monospace; font-size: 0.84em;
  background: var(--rag-surface-dark); padding: 0.1em 0.35em; border-radius: 2px;
}

/* ── New conversation button ───────────────────────────────────────────────── */
.rag-new-conv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-left: 0.6rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid var(--rag-border, #d0d5dd);
  border-radius: 6px;
  color: var(--rag-muted, #667085);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.rag-new-conv-btn:hover {
  background: var(--rag-surface-alt, #f9fafb);
  border-color: var(--rag-navy, #1c2b4a);
  color: var(--rag-navy, #1c2b4a);
}

/* ── Context indicator in route bar ────────────────────────────────────────── */
.rag-route__context {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  padding: 0.1rem 0.45rem;
  background: var(--rag-accent-muted, #e8f0fe);
  color: var(--rag-accent, #2563eb);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Reformulation notice ──────────────────────────────────────────────────── */
.rag-reformulation {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.75rem;
  margin-top: 0.3rem;
  background: var(--rag-surface-alt, #f9fafb);
  border-left: 2px solid var(--rag-accent, #2563eb);
  border-radius: 0 4px 4px 0;
  color: var(--rag-muted, #667085);
  font-size: 0.78rem;
  line-height: 1.4;
  animation: rag-fade-in 0.2s ease;
}
.rag-reformulation em {
  font-style: normal;
  color: var(--rag-text, #1a1a2e);
  font-weight: 500;
}
.rag-reformulation__icon {
  font-size: 0.85em;
  flex-shrink: 0;
}
@keyframes rag-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cache hit indicator ───────────────────────────────────────────────────── */
.rag-route__cache {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  padding: 0.1rem 0.45rem;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-left: 0.3rem;
}

/* ── Markdown rendered content ────────────────────────────────────────────── */
.rag-answer table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.875rem;
}
.rag-answer table th,
.rag-answer table td {
  border: 1px solid var(--rag-border);
  padding: 0.45rem 0.75rem;
  text-align: left;
}
.rag-answer table th {
  background: var(--rag-navy);
  color: #fff;
  font-weight: 600;
}
.rag-answer table tr:nth-child(even) td {
  background: rgba(0,0,0,0.03);
}
.rag-answer h2, .rag-answer h3, .rag-answer h4 {
  margin: 1.1rem 0 0.4rem;
  color: var(--rag-navy);
}
.rag-answer ul, .rag-answer ol {
  padding-left: 1.4rem;
  margin: 0.5rem 0;
}
.rag-answer li { margin: 0.25rem 0; }
.rag-answer p  { margin: 0.5rem 0; }
.rag-answer code {
  background: rgba(0,0,0,0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first adjustments
   Breakpoints:
     ≤ 600px  — phone portrait (primary target)
     ≤ 900px  — phone landscape / small tablet
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Base adjustments for the page wrapper ─────────────────────────────────── */
@media (max-width: 900px) {
  body {
    padding: 0;
    background: #fff;
  }

  .skybrary-rag {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-top: 4px solid var(--rag-navy);
    box-shadow: none;
    /* Full-height layout: header + content + form pinned at bottom */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;      /* dvh handles mobile browser chrome resize */
    min-height: 100vh;       /* fallback for older Safari */
  }

  /* Response area grows to fill available space, form stays pinned */
  .rag-response {
    flex: 1;
    max-height: none;        /* remove the 480px cap */
    min-height: 0;           /* allow flex shrink */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Sources pushes form down naturally */
  .rag-sources {
    flex-shrink: 0;
  }

  /* Form pinned at bottom */
  .rag-form {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    border-top: 2px solid var(--rag-navy);
    background: var(--rag-surface);
  }
}

/* ── Phone portrait ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* Header — compact, subtitle hidden to save space */
  .rag-header {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }
  .rag-header__subtitle {
    display: none;
  }
  .rag-header__title {
    font-size: 0.85rem;
  }
  .rag-status {
    font-size: 0.68rem;
  }

  /* Route bar — smaller text, tighter padding */
  .rag-route {
    padding: 0.3rem 1rem;
    font-size: 0.68rem;
    gap: 0.35rem;
  }

  /* Stats — fix the broken 3-column grid (220px label overflows on phone) */
  .rag-stats {
    padding: 0.75rem 1rem;
  }
  .rag-stats__bar-row {
    grid-template-columns: 1fr 80px 36px;   /* label fluid, bar narrower */
    gap: 0.4rem;
  }
  .rag-stats__bar-label {
    font-size: 0.72rem;
  }

  /* Q/A blocks — reduce padding, avoid cramped layout */
  .rag-qa-q {
    padding: 0.7rem 1rem;
    gap: 0.5rem;
  }
  .rag-qa-q__label {
    font-size: 0.65rem;
  }
  .rag-qa-q__text {
    font-size: 0.85rem;
  }

  .rag-qa-a {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    /* On narrow screens the Q/A label wastes horizontal space — hide it */
    align-items: flex-start;
  }
  .rag-qa-a__label {
    display: none;
  }
  .rag-qa-a__text {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  /* Response placeholder */
  .rag-response__placeholder {
    padding: 1.2rem 1rem;
    font-size: 0.88rem;
  }

  /* Sources — full-width pills on narrow screens */
  .rag-sources {
    padding: 0.65rem 1rem;
  }
  .rag-sources__item a {
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
  }

  /* Form — stack textarea + button vertically */
  .rag-form {
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .rag-form__input {
    width: 100%;
    font-size: 1rem;           /* 1rem prevents iOS auto-zoom on focus */
    rows: 3;
    padding: 0.65rem 0.85rem;
  }
  .rag-form__button {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;          /* iOS HIG minimum tap target */
  }

  /* New conversation button — smaller */
  .rag-new-conv-btn {
    font-size: 0.72rem;
    padding: 0.28rem 0.6rem;
  }

  /* Error */
  .rag-error {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
  }

  /* Reformulation notice */
  .rag-reformulation {
    font-size: 0.74rem;
    padding: 0.25rem 0.6rem;
    margin-top: 0.25rem;
  }
}

/* ── Landscape phone (short viewport, wide) ────────────────────────────────── */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .rag-header__subtitle { display: none; }
  .rag-header           { padding: 0.45rem 1rem; }
  .rag-response         { min-height: 120px; }
}


/* ── Preset selector ─────────────────────────────────────────────────────────── */
.rag-presets {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: var(--rag-surface);
  border-top: 1px solid var(--rag-border);
  flex-wrap: wrap;
}

.rag-preset__label {
  cursor: pointer;
  user-select: none;
}

.rag-preset__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.rag-preset__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rag-border);
  border-radius: 20px;
  background: var(--rag-bg);
  color: var(--rag-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.rag-preset__label:hover .rag-preset__pill {
  border-color: var(--rag-navy);
  color: var(--rag-navy);
}

.rag-preset__radio:checked + .rag-preset__pill {
  background: var(--rag-navy);
  border-color: var(--rag-navy);
  color: #fff;
}

.rag-preset__icon { font-size: 0.85em; line-height: 1; }

/* ── Timing indicator in route bar ──────────────────────────────────────────── */
.rag-route__timing {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rag-text-muted);
  white-space: nowrap;
}
.rag-route__timing-total {
  font-weight: 400;
  color: var(--rag-border);
}

/* Quick disclaimer — see full definition below */

/* ── Responsive adjustments for preset bar ───────────────────────────────────── */
@media (max-width: 600px) {
  .rag-presets {
    padding: 0.5rem 1rem;
    gap: 0.35rem;
  }
  .rag-preset__pill {
    font-size: 0.74rem;
    padding: 0.28rem 0.6rem;
  }

}


/* ── Quick disclaimer — full width below answer row ─────────────────────────── */
.rag-quick-disclaimer {
  margin: 0 1.5rem 0.75rem;
  padding: 0.4rem 0.75rem;
  background: rgba(249, 202, 36, 0.1);
  border-left: 3px solid #f9ca24;
  border-radius: 0 3px 3px 0;
  font-size: 0.78rem;
  color: var(--rag-text-muted);
  font-style: italic;
  clear: both;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.rag-footer {
  padding: 0.65rem 1.25rem 0.75rem;
  border-top: 1px solid var(--rag-border);
  background: var(--rag-surface);
  flex-shrink: 0;
}

.rag-footer p {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--rag-text-muted);
}
.rag-footer p:last-child { margin-bottom: 0; }

.rag-footer a {
  color: var(--rag-navy);
  text-decoration: none;
}
.rag-footer a:hover { text-decoration: underline; }

.rag-footer__disclaimer {
  font-style: italic;
}

@media (max-width: 600px) {
  .rag-footer         { padding: 0.55rem 1rem 0.65rem; }
  .rag-footer p       { font-size: 0.7rem; }
  .rag-quick-disclaimer { margin: 0 1rem 0.6rem; }
}
