@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* App surface */
  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --glass: rgba(255, 255, 255, 0.72);

  /* Text */
  --ink: #1b1b21;
  --ink-2: #62626d;
  --ink-3: #9b9ba6;
  --line: #ececf1;
  --line-2: #e2e2e9;

  /* App accent (recording view) */
  --accent: #6d5ef6;
  --accent-2: #8b7bff;
  --accent-soft: rgba(109, 94, 246, 0.08);
  --accent-ring: rgba(109, 94, 246, 0.22);
  --live: #ff6b6b;
  --positive: #2fb574;

  /* Auth form accent — muted magenta pulled from bg.jpg */
  --form-accent: #B8245A;
  --form-accent-ring: rgba(184, 36, 90, 0.14);
  --form-border: #e2e2e2;
  --form-bg: #fafaf9;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.04), 0 1px 3px rgba(20, 20, 40, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 20, 40, 0.04), 0 10px 28px rgba(20, 20, 40, 0.07);
  --shadow-lg: 0 8px 16px rgba(20, 20, 40, 0.06), 0 24px 60px rgba(20, 20, 40, 0.1);

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(0.82); opacity: 0.55; }
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.summary-body,
.tips-content,
.transcript-feed,
.library-container,
.synthesis-panel {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 0;
  color: var(--ink-2);
  font-size: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-sm {
  width: 13px;
  height: 13px;
  border-width: 2px;
  display: inline-block;
  vertical-align: -2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .spinner { animation-duration: 0.7s !important; animation-iteration-count: infinite !important; }
}

/* ============================================================
   AUTH SCREENS — full-bleed bg + glass card
   ============================================================ */

.auth-screen {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0d0614;
}

.auth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.auth-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45)),
    radial-gradient(ellipse 80% 90% at 75% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
}

/* ---- Left: hero ---- */
.auth-left {
  position: relative;
  z-index: 2;
  width: 52%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px 72px;
}

.auth-wordmark {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(72px, 7.5vw, 120px);
  line-height: 0.86;
  color: #ffffff;
  letter-spacing: -0.04em;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 12px 80px rgba(0, 0, 0, 0.35);
  margin-bottom: 20px;
}

.auth-wordmark em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
  display: block;
}

.auth-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Right: card ---- */
.auth-right {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px 48px 24px;
  overflow-y: auto;
}

.auth-form {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  animation: auth-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  line-height: 1.2;
}

.auth-sub {
  font-size: 14px;
  color: #555;
  margin-bottom: 28px;
  line-height: 1.55;
  font-weight: 400;
}

/* ---- Shared form elements ---- */
.error-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fff0f0;
  border: 1px solid #ffd9d9;
  border-radius: 10px;
  color: #c94444;
  font-size: 13px;
  font-weight: 500;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-input,
.form-textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 14px;
  color: #0a0a0a;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #aaa;
}

.form-input:focus,
.form-textarea:focus {
  background: #fff;
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.form-textarea {
  min-height: unset;
  resize: none;
  line-height: 1.5;
}

.form-label {
  color: #444;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: block;
}

.form-label-opt {
  color: #999;
  font-weight: 400;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  margin-top: 6px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.18);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.25);
}

.submit-btn:active:not(:disabled) {
  transform: none;
}

/* ---- Google sign-in ---- */
.google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 4px;
}

/* ---- Setup-specific rows ---- */
.setup-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #222;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
}

.logout-link {
  background: none;
  border: none;
  color: #888;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: color 0.15s;
}

.logout-link:hover {
  color: #111;
}

.library-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: #555;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.library-chip:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.18);
}

.library-chip span {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #555;
  border-radius: 999px;
}

/* ---- Safari banner ---- */
.safari-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff8f0;
  border: 1px solid #f0d9c0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
  font-size: 12.5px;
  color: #7a4a1a;
}

.safari-chrome-btn {
  white-space: nowrap;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
}

.safari-chrome-btn:hover {
  opacity: 0.75;
}

/* ---- Contact row ---- */
.contact-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
  font-size: 12px;
  color: #888;
}

.contact-link {
  color: #444;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.contact-link:hover {
  color: #111;
}

/* Mobile */
@media (max-width: 768px) {
  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 36px 24px;
  }
}

/* ============================================================
   RECORDING VIEW
   ============================================================ */

.main-container {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: 100vw;
  height: 100vh;
  padding: 16px;
}

.app-panel {
  width: 460px;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: rise 0.6s var(--spring) both;
}

.top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recording-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: background 0.3s var(--ease);
}

.recording-dot.active {
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16);
  animation: breathe 2s var(--ease) infinite;
}

.mic-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
  opacity: 0.35;
  transition: opacity 0.2s;
}

.mic-bars.active {
  opacity: 1;
}

.mic-bars span {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: var(--ink-2);
  height: 3px;
  transition: height 0.08s ease, background 0.2s;
}

.mic-bars.active span {
  background: var(--positive);
}

.timer {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.audio-status {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.25s var(--spring), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--ink-3);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(109, 94, 246, 0.26);
}

.btn-primary:hover {
  background: var(--accent-2);
  color: #fff;
}

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

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.section-hint {
  font-weight: 500;
  color: var(--ink-3);
}

.questions-section {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}

.questions-placeholder {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.questions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  cursor: pointer;
  animation: rise 0.45s var(--spring) both;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.3s var(--ease);
}

.question-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-ring);
  box-shadow: var(--shadow-md);
}

.question-card.pinned {
  background: var(--accent-soft);
  border-color: var(--accent-ring);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.question-card.updating {
  opacity: 0.45;
}

.question-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  padding-right: 16px;
}

.pin-badge {
  position: absolute;
  top: 10px;
  right: 11px;
  font-size: 14px;
  opacity: 0.15;
  transition: opacity 0.15s var(--ease);
  line-height: 1;
}

.question-card:hover .pin-badge {
  opacity: 0.4;
}

.pin-badge.is-pinned {
  opacity: 1;
}

.questions-meta {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 10px;
}

.api-error {
  font-size: 12px;
  color: #d84747;
  font-weight: 500;
  margin-top: 10px;
}

.transcript-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  min-height: 0;
}

.transcript-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  margin: 0 -8px;
  padding: 0 8px;
}

.transcript-empty {
  color: var(--ink-3);
  font-size: 13.5px;
}

.transcript-line {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.transcript-line:hover {
  background: var(--surface-2);
}

.speaker-label {
  flex-shrink: 0;
  min-width: 70px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  padding-top: 1px;
}

.speaker-label.interviewee {
  color: var(--accent);
}

.transcript-text {
  flex: 1;
  word-break: break-word;
  line-height: 1.55;
  color: var(--ink);
}

.flip-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.transcript-line:hover .flip-btn {
  opacity: 1;
}

.flip-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---- Tips Panel ---- */
.tips-panel {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: rise 0.6s var(--spring) 0.05s both;
}

.tips-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tips-empty {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.tip-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  animation: rise 0.5s var(--spring) both;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}

.tip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   LIBRARY VIEW
   ============================================================ */

.library-container {
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  padding: 40px 24px 60px;
  background: var(--bg);
}

.library-inner {
  max-width: 760px;
  margin: 0 auto;
  animation: rise 0.5s var(--spring) both;
}

.library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.library-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.library-subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}

.library-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.library-empty {
  font-size: 14px;
  color: var(--ink-3);
  padding: 40px 0;
  text-align: center;
}

.session-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.45s var(--spring) both;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease), border-color 0.2s var(--ease);
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-ring);
}

.session-main {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.session-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.session-tldr {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.session-meta {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}

.session-del {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.session-del:hover {
  background: #fff0f0;
  color: #d84747;
}

/* ============================================================
   SYNTHESIS PANEL
   ============================================================ */

.synthesis-panel {
  background: var(--surface);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  animation: rise 0.5s var(--spring) both;
}

.synthesis-loading,
.synthesis-error {
  font-size: 14px;
  color: var(--ink-2);
  padding: 10px 0;
}

.synthesis-error { color: #d84747; }

.synthesis-head {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--accent);
}

.synthesis-overview {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.synthesis-section { margin-bottom: 22px; }

.synthesis-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.theme-row { margin-bottom: 14px; }

.theme-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  margin-bottom: 4px;
}

.theme-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  transition: width 0.6s var(--spring);
}

.theme-label {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding-left: 10px;
}

.theme-count {
  position: relative;
  margin-left: auto;
  padding-right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.theme-insight {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 10px;
}

.theme-who { color: var(--ink-3); }

.synthesis-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.synthesis-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.synthesis-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.synthesis-list.quote li {
  padding-left: 14px;
  border-left: 3px solid var(--line-2);
  font-style: italic;
  color: var(--ink-2);
}

.synthesis-list.quote li::before { display: none; }

.synthesis-rec {
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.synthesis-rec-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

/* ============================================================
   SUMMARY MODAL
   ============================================================ */

.summary-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 22, 38, 0.5);
  animation: fade 0.2s var(--ease) both;
}

.summary-modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateZ(0);
  animation: pop 0.4s var(--spring) both;
}

.summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.summary-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  margin-top: -2px;
}

.summary-close-btn:hover {
  background: var(--line);
  color: var(--ink);
}

.summary-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.summary-meta {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

.summary-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
}

.summary-loading {
  font-size: 14px;
  color: var(--ink-2);
  padding: 30px 0;
  text-align: center;
}

.summary-error {
  font-size: 14px;
  color: #d84747;
  padding: 20px 0;
}

.summary-tldr {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 22px;
}

.summary-section {
  margin-bottom: 20px;
  animation: rise 0.45s var(--spring) both;
}

.summary-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.summary-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.summary-quotes li {
  padding-left: 14px;
  border-left: 3px solid var(--line-2);
  font-style: italic;
  color: var(--ink-2);
}

.summary-quotes li::before { display: none; }

.summary-actions {
  display: flex;
  gap: 8px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.summary-actions .btn-primary { margin-left: auto; }

/* ============================================================
   DEBUG PANEL
   ============================================================ */

#debug-panel {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 300px;
  max-height: 320px;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 11px;
  color: var(--ink-2);
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.debug-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.debug-stats {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.debug-logs-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 5px;
}

#debug-logs div {
  margin-top: 3px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-3);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   SCROLLBARS
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
  border: 3px solid var(--surface);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
