/* =========================================================================
   shodasa — design tokens
   Palette: Midnight Executive (navy / ice-blue / gold) on warm white.
   Display face: Cambria (serif, evokes the grammatical/textual heritage).
   UI face: system sans stack (clean, gets out of the way for actual use).
   ========================================================================= */

:root {
  --navy: #1E2761;
  --navy-700: #2E3F7F;
  --navy-200: #CADCFC;
  --navy-100: #EEF3FC;
  --ink: #161B33;
  --ink-soft: #4A5170;
  --paper: #FAFAF7;
  --paper-raised: #FFFFFF;
  --gold: #C9A227;
  --gold-soft: #F0E4C2;
  --line: #DDE3F0;
  --line-soft: #ECEFF7;
  --good: #1D7A52;
  --warn: #9A6A00;

  --serif: "Cambria", "Georgia", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(30, 39, 97, 0.04), 0 8px 24px -8px rgba(30, 39, 97, 0.10);
  --shadow-card-hover: 0 4px 8px rgba(30, 39, 97, 0.06), 0 16px 36px -12px rgba(30, 39, 97, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--serif);
  color: var(--navy);
  letter-spacing: -0.01em;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy); }

::selection { background: var(--gold-soft); }

/* Visible keyboard focus everywhere — never remove this */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------------- */
/* Navbar                                                                  */
/* ---------------------------------------------------------------------- */
.navbar-shodasa {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand-wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.navbar-shodasa .nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
}
.navbar-shodasa .nav-link:hover,
.navbar-shodasa .nav-link.active {
  color: var(--navy);
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn-shodasa {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-shodasa:hover {
  background: var(--navy-700);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(30, 39, 97, 0.35);
}
.btn-shodasa-outline {
  background: transparent;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-shodasa-outline:hover {
  background: var(--navy);
  color: #fff;
}
.btn-gold {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-gold:hover {
  box-shadow: 0 6px 16px -4px rgba(201, 162, 39, 0.5);
  color: var(--navy);
}

/* ---------------------------------------------------------------------- */
/* Hero — the citation thread                                             */
/* ---------------------------------------------------------------------- */
.hero {
  padding: 5.5rem 0 4rem;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  margin: 1rem 0 1.25rem;
}

.not-statement {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  padding: 0.6rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 38rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 2rem;
}

/* The citation-thread card: a sentence with a highlighted word, a thin
   gold thread running down to the rule + source that justifies it. This
   is the page's signature element — reused on hero, pricing, and demo. */
.thread-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}

.thread-sentence {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--ink);
}

.thread-highlight {
  position: relative;
  background: var(--gold-soft);
  border-radius: 4px;
  padding: 0.05em 0.3em;
  color: var(--navy);
  font-weight: 600;
}

.thread-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--gold), var(--line));
  margin: 0.5rem auto 0;
}

.thread-citation {
  margin-top: 0.25rem;
  border-left: 2px solid var(--gold);
  padding: 0.75rem 1rem;
  background: var(--navy-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.thread-citation .rule-code {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}

.thread-citation .rule-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

.thread-citation .rule-structured {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.thread-citation .rule-structured span {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.4;
}
.thread-citation .rule-structured strong {
  color: var(--navy);
  font-weight: 600;
  min-width: 80px;
  display: inline-block;
}

/* ---------------------------------------------------------------------- */
/* Sections                                                                */
/* ---------------------------------------------------------------------- */
.section {
  padding: 4.5rem 0;
}
.section-tight {
  padding: 3rem 0;
}
.section-band {
  background: var(--navy-100);
}

/* Demo page — compact header so the chat shell gets maximum vertical space */
.demo-header-section {
  padding: 1.25rem 0 0.75rem;
}
.demo-body-section {
  padding: 0.5rem 0 1.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 38rem;
}

.feature-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.feature-card .icon-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--serif);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Pricing                                                                 */
/* ---------------------------------------------------------------------- */
.plan-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.plan-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.plan-card.highlighted {
  border-color: var(--gold);
  box-shadow: 0 8px 28px -10px rgba(201, 162, 39, 0.35);
}
.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 2rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.plan-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.plan-tagline {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  min-height: 2.4em;
}
.plan-price {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--navy);
  font-weight: 700;
  line-height: 1;
}
.plan-price .period {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 1.75rem;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-size: 0.93rem;
  color: var(--ink);
  border-top: 1px solid var(--line-soft);
}
.plan-features li:first-child { border-top: none; }
.plan-features li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------------------------------------------------------------------- */
/* Demo page                                                               */
/* ---------------------------------------------------------------------- */
.demo-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}
.demo-result {
  border-radius: var(--radius-lg);
  background: var(--navy-100);
  padding: 1.75rem;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}
.demo-badge.mode-mock {
  background: var(--gold-soft);
  color: var(--warn);
}
.demo-badge.mode-live {
  background: #DCF3E8;
  color: var(--good);
}
.demo-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}

.form-control:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(46, 63, 127, 0.12);
}
.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* ---------------------------------------------------------------------- */
/* Chat thread (Step 2 of the demo)                                        */
/* ---------------------------------------------------------------------- */
.chat-shell {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 480px;
  overflow: hidden;
}

.chat-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy-100);
  border: 1px solid var(--line);
  color: var(--navy-700);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  max-width: 220px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.source-chip:hover {
  background: var(--paper-raised);
  box-shadow: 0 1px 2px rgba(30, 39, 97, 0.08);
}
.source-chip-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.source-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.chat-row {
  display: flex;
  width: 100%;
}
.chat-row.from-user {
  justify-content: flex-end;
}
.chat-row.from-shodasa {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 80%;
}

.chat-bubble-user {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-bubble-shodasa {
  background: var(--navy-100);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  padding: 1.1rem 1.25rem;
  width: 100%;
}

.chat-bubble-shodasa .answer-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.chat-bubble-shodasa .thread-citation {
  margin-top: 0.5rem;
  background: var(--paper-raised);
}

.chat-bubble-shodasa .source-excerpt {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0.6rem;
}

.verdict-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.verdict-excluded {
  background: #FBEAEA;
  color: #B3261E;
}
.verdict-covered {
  background: #DCF3E8;
  color: var(--good);
}

.result-section {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

.chat-meta-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0.5rem;
}

.chat-warning {
  font-size: 0.78rem;
  color: var(--warn);
  margin-top: 0.5rem;
}

.chat-bubble-system {
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  margin: 0 auto;
  text-align: center;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

.chat-input-bar {
  border-top: 1px solid var(--line-soft);
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  background: var(--paper-raised);
  position: relative;
}

/* ── Sample questions popup ──────────────────────────────────────────── */
.inspire-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 1.25rem;
  right: 1.25rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px -8px rgba(30, 39, 97, 0.22);
  z-index: 200;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.inspire-popup.d-none { display: none; }

.inspire-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--navy-100);
  flex-shrink: 0;
}
.inspire-popup-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.inspire-popup-body {
  overflow-y: auto;
  padding: 0.5rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inspire-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.inspire-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.3rem 0.25rem 0.1rem;
}
.inspire-q {
  background: none;
  border: none;
  text-align: left;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.4;
}
.inspire-q:hover {
  background: var(--navy-100);
  color: var(--navy);
}


.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0;
}
.chat-typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.5;
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.step-indicator .step-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--line-soft);
  color: var(--ink-soft);
}
.step-indicator .step-dot.active {
  background: var(--navy);
  color: #fff;
}
.step-indicator .step-dot.done {
  background: var(--gold);
  color: var(--navy);
}

/* ---------------------------------------------------------------------- */
/* Step 1 source tabs (paste text / upload file)                          */
/* ---------------------------------------------------------------------- */
.source-tabs {
  background: var(--navy-100);
  border-radius: var(--radius-md);
  padding: 0.3rem;
  gap: 0.3rem;
  display: inline-flex;
  width: 100%;
}
.source-tabs .nav-link {
  flex: 1 1 0;
  text-align: center;
  border-radius: calc(var(--radius-md) - 4px);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.source-tabs .nav-link.active {
  background: var(--paper-raised);
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(30, 39, 97, 0.08);
}
.source-tab-pane.d-none {
  display: none;
}

.consent-check {
  background: var(--navy-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.75rem 0.75rem 2.25rem;
}
.consent-check .form-check-input {
  margin-top: 0.2rem;
}
.consent-check .form-check-label {
  color: var(--ink-soft);
  line-height: 1.5;
}
.consent-check .form-check-input:checked ~ .form-check-label {
  color: var(--ink);
}

/* Submit buttons are disabled until the consent checkbox is ticked. */
#analyse-submit-btn:disabled,
#upload-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}


/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.footer-shodasa {
  background: var(--navy);
  color: var(--navy-200);
  padding: 3rem 0 2rem;
}
.footer-shodasa a {
  color: var(--navy-200);
}
.footer-shodasa a:hover {
  color: #fff;
}
.footer-shodasa .brand-wordmark {
  color: #fff;
}
.footer-fine {
  color: rgba(202, 220, 252, 0.55);
  font-size: 0.82rem;
}

/* ---------------------------------------------------------------------- */
/* Auth pages                                                              */
/* ---------------------------------------------------------------------- */
.auth-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
.auth-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
}

/* ---------------------------------------------------------------------- */
/* Utility                                                                 */
/* ---------------------------------------------------------------------- */
.text-ink-soft { color: var(--ink-soft); }
.text-gold { color: var(--gold); }
.bg-navy-100 { background: var(--navy-100); }
.divider-thread {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 3rem 0;
}

/* ---------------------------------------------------------------------- */
/* Source modal — view the pasted text / uploaded filename. Draggable by  */
/* its header, resizable from the bottom-right corner.                    */
/* ---------------------------------------------------------------------- */
.source-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 27, 51, 0.32);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.source-modal-overlay.d-none {
  display: none;
}

.source-modal {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 90vw);
  height: min(480px, 70vh);
  min-width: 320px;
  min-height: 220px;
  max-width: 95vw;
  max-height: 90vh;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px -16px rgba(22, 27, 51, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.source-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
  background: var(--navy-100);
}
.source-modal-title {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}
.source-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 0.25rem;
}
.source-modal-close:hover {
  color: var(--navy);
}

.source-modal-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1.25rem;
}

.source-modal-text {
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.source-modal-filename {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.source-modal-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 50%, var(--line) 50% 58%, transparent 58% 100%),
    linear-gradient(135deg, transparent 0 65%, var(--line) 65% 73%, transparent 73% 100%);
}
.source-modal-resize-handle:hover {
  opacity: 0.8;
}

@media (max-width: 576px) {
  .source-modal {
    top: 6%;
    width: 94vw;
    height: 80vh;
  }
}
