/* ============================================================
   Vinsinfo AI LexReview — Design System & Component Styles
   ============================================================
   Token strategy: every custom property below is redefined, name-for-name, under
   :root[data-theme="dark"] further down — nothing is renamed, because a handful of tokens
   (--accent, --border, --success, --ink-4) are referenced directly from inline SVG attributes
   in the templates and from HTML strings built in app.js, not just from this file. Dark mode is
   attribute-driven (data-theme on <html>), not a prefers-color-scheme block — app.js decides the
   initial value (stored choice, else OS preference) once and stamps it explicitly, so this file
   only ever needs to define the two attribute states, never a third media-query variant. */

:root {
  /* ---- Document "paper" ----
     Deliberately NOT part of the surface scale that flips per theme: the text rendered inside
     it comes from the uploaded/generated .docx's own authored colors (docx-preview reproduces
     the document's real run styles, not our tokens), which are near-universally dark. Tying the
     page background to --surface would put that dark, document-authored text on a dark page in
     dark mode — unreadable, and not fixable by recoloring text we don't control run-by-run.
     Every real document editor's dark mode keeps the page itself as paper and only themes the
     surrounding chrome; --paper does the same, staying the same color in both themes. */
  --paper: #FFFFFF;

  /* ---- Surfaces ---- */
  --bg:          #F1F3F8;
  --bg-2:        #E7EAF2;
  --surface:     #FFFFFF;
  --surface-2:   #F7F8FC;
  --surface-3:   #EFF1F7;
  --border:      #DFE3EC;
  --border-soft: #EBEEF4;
  --border-strong: #C7CEDC;

  /* ---- Ink ---- */
  --ink:         #12151E;
  --ink-2:       #383F52;
  --ink-3:       #6B7288;
  --ink-4:       #99A0B3;

  /* ---- Brand / accent ---- */
  --accent:      #2B5CE6;
  --accent-2:    #1A47D0;
  --accent-3:    #547BFF;
  --accent-tint: #EDF2FE;
  --on-accent:   #FFFFFF;

  /* ---- Semantic ---- */
  --success:     #16875B;
  --success-2:   #0F6E48;
  --success-tint:#E6F6EE;
  --danger:      #C33A2C;
  --danger-2:    #A62E22;
  --danger-tint: #FCEAE8;
  --warn:        #9C5B00;
  --warn-tint:   #FDF1DE;

  /* ---- Fixed-dark chrome (topbar reads dark in both themes) ---- */
  --topbar-bg:      #0E1218;
  --topbar-bg-2:    #151B24;
  --topbar-border:  rgba(255,255,255,0.08);
  --topbar-ink:     #EEF1F7;
  --topbar-ink-dim: #98A0B4;

  --topbar-h:      58px;
  --panel-left-w:  304px;
  --panel-right-w: 372px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px;
  --radius:    9px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(16,24,44,0.05);
  --shadow-sm: 0 1px 2px rgba(16,24,44,0.05), 0 2px 6px rgba(16,24,44,0.05);
  --shadow:    0 4px 14px rgba(16,24,44,0.09), 0 1px 3px rgba(16,24,44,0.06);
  --shadow-lg: 0 18px 44px rgba(16,24,44,0.16), 0 4px 12px rgba(16,24,44,0.08);
  --shadow-inset: inset 0 0 0 1px rgba(16,24,44,0.05);
  --focus-ring: 0 0 0 3px rgba(43,92,230,0.16);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  --bg:          #0A0D13;
  --bg-2:        #0D1017;
  --surface:     #141821;
  --surface-2:   #191E29;
  --surface-3:   #202634;
  --border:      #2A3143;
  --border-soft: #232937;
  --border-strong: #3B4459;

  --ink:         #EEF0F6;
  --ink-2:       #C6CBDC;
  --ink-3:       #8D93AA;
  --ink-4:       #656C82;

  --accent:      #6D93FF;
  --accent-2:    #89AAFF;
  --accent-3:    #3E63C4;
  --accent-tint: rgba(109,147,255,0.16);
  --on-accent:   #0B1020;

  --success:     #3AD397;
  --success-2:   #57DBA8;
  --success-tint:rgba(58,211,151,0.14);
  --danger:      #F1786A;
  --danger-2:    #F5988C;
  --danger-tint: rgba(241,120,106,0.14);
  --warn:        #F0B348;
  --warn-tint:   rgba(240,179,72,0.14);

  --topbar-bg:      #05070B;
  --topbar-bg-2:    #0A0D13;
  --topbar-border:  rgba(255,255,255,0.07);
  --topbar-ink:     #EEF1F7;
  --topbar-ink-dim: #808A9E;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.4);
  --shadow:    0 6px 20px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.4);
  --shadow-lg: 0 26px 60px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.4);
  --shadow-inset: inset 0 0 0 1px rgba(255,255,255,0.04);
  --focus-ring: 0 0 0 3px rgba(109,147,255,0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

::selection { background: rgba(43,92,230,0.22); }

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, var(--topbar-bg-2), var(--topbar-bg));
  padding: 0 22px;
  border-bottom: 1px solid var(--topbar-border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--topbar-ink);
}

/* The Vinsinfo logo's wordmark is dark navy, so it needs a light plate to read against the
   dark topbar — there's no reversed/white variant of the source logo to fall back on. */
.brand-logo-plate {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 5px 9px;
  border-radius: 7px;
  flex-shrink: 0;
  line-height: 0;
  box-shadow: var(--shadow-xs);
}
.brand-logo {
  height: 17px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--topbar-ink);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(84,123,255,0.16);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(84,123,255,0.28);
  margin-left: 4px;
}

.topbar-doc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.doc-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(84,123,255,0.16);
  border: 1px solid rgba(84,123,255,0.28);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.doc-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--topbar-ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.review-status-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.review-status-pill[data-status="pending"]   { background: rgba(240,179,72,0.16); color: #F0B348; border: 1px solid rgba(240,179,72,0.28); }
.review-status-pill[data-status="reviewing"] { background: rgba(84,123,255,0.16); color: #89AAFF; border: 1px solid rgba(84,123,255,0.28); }
.review-status-pill[data-status="complete"]  { background: rgba(58,211,151,0.16); color: #4DD9A0; border: 1px solid rgba(58,211,151,0.28); }
.review-status-pill[data-status="changes"]   { background: rgba(240,179,72,0.16); color: #F0B348; border: 1px solid rgba(240,179,72,0.28); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.toolbar-div {
  width: 1px;
  height: 20px;
  background: var(--topbar-border);
}

/* ---- Theme toggle ---- */
.theme-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--topbar-border);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  color: var(--topbar-ink-dim);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.12); color: var(--topbar-ink); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), transform 0.08s var(--ease), box-shadow 0.14s var(--ease), color 0.14s var(--ease);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: #C8CDD8;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(43,92,230,0.25), 0 4px 12px rgba(43,92,230,0.22);
}
.btn-accent:hover { box-shadow: 0 1px 2px rgba(43,92,230,0.3), 0 6px 18px rgba(43,92,230,0.3); filter: brightness(1.04); }

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(195,58,44,0.3);
}
.btn-danger-ghost:hover { background: var(--danger-tint); border-color: var(--danger); }

.btn-sm {
  height: 29px;
  padding: 0 11px;
  font-size: 12px;
}

.tbtn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  color: #C8CDD8;
  cursor: pointer;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.tbtn:hover { background: rgba(255,255,255,0.13); }
.tbtn:focus-visible { outline: 2px solid var(--accent-3); }

.w-full { width: 100%; justify-content: center; }
.mt-8 { margin-top: 8px; }

/* ============================================================
   UPLOAD SCREEN
   ============================================================ */

.upload-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h));
  padding: 56px 20px 72px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(43,92,230,0.08), transparent 60%),
    radial-gradient(ellipse 900px 600px at 100% 100%, rgba(43,92,230,0.07), transparent 60%),
    var(--bg);
}

/* Soft brand-colored blobs so the screen reads as designed, not empty. */
.upload-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.upload-glow-1 {
  width: 500px;
  height: 500px;
  top: -190px;
  left: -150px;
  background: radial-gradient(circle, rgba(43,92,230,0.16), transparent 70%);
}
.upload-glow-2 {
  width: 580px;
  height: 580px;
  bottom: -270px;
  right: -190px;
  background: radial-gradient(circle, rgba(43,92,230,0.11), transparent 70%);
}

.upload-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  text-align: center;
}

.upload-logo {
  display: block;
  height: 34px;
  width: auto;
  margin: 0 auto 22px;
}

.upload-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(43,92,230,0.2);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}

.upload-title {
  font-family: var(--font-display);
  font-size: 37px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 15px;
}

.upload-subtitle {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 38px;
}

.upload-card {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.upload-card:hover,
.upload-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring), var(--shadow);
  outline: none;
  transform: translateY(-1px);
}
.upload-card.is-dragover {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: scale(1.01);
}

.upload-icon-wrap {
  width: 60px;
  height: 60px;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.upload-icon-wrap svg { width: 30px; height: 30px; }

.upload-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.upload-card-text strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.upload-card-text span {
  font-size: 13px;
  color: var(--ink-3);
}

.upload-hint {
  font-size: 12px;
  color: var(--ink-4);
  white-space: nowrap;
  flex-shrink: 0;
}

.upload-alt-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-4);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(43,92,230,0.35);
}
.btn-link:hover { text-decoration-color: var(--accent); }

.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 22px 0 50px;
}

.upload-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(43,92,230,0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.upload-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-top: 34px;
  border-top: 1px solid var(--border-soft);
}

.upload-feature {
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-lg);
  transition: background 0.16s var(--ease);
}
.upload-feature:hover { background: var(--surface); box-shadow: var(--shadow-sm); }

.upload-feature-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent);
  margin-bottom: 12px;
}

.upload-feature h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.upload-feature p {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

@media (max-width: 700px) {
  .upload-card { flex-direction: column; text-align: center; }
  .upload-card-text { align-items: center; }
  .upload-features { grid-template-columns: 1fr; }
  .upload-feature { text-align: center; }
  .upload-feature-icon { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   MODAL (doc type selector, generate, etc.)
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,10,16,0.55);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  animation: fade-in 0.14s var(--ease);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s var(--ease);
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 21px;
  margin-bottom: 8px;
  color: var(--ink);
}
.modal-header p {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 20px;
}

.modal-generate { width: 500px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn-neutral {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}
.btn-neutral:hover { background: var(--surface-3); color: var(--ink); }

/* ============================================================
   EDITOR SCREEN — 3-PANEL LAYOUT
   ============================================================ */

.editor-screen {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

/* ---- Panels ---- */
.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-2);
  border-right: 1px solid var(--border-soft);
}

.panel-left {
  width: var(--panel-left-w);
  min-width: 220px;
  flex-shrink: 0;
}

.panel-center {
  flex: 1;
  background: var(--bg);
  border-right: 1px solid var(--border-soft);
}

.panel-right {
  width: var(--panel-right-w);
  min-width: 280px;
  flex-shrink: 0;
  border-right: none;
}

/* ---- Panel sections ---- */
.panel-section {
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.panel-section-grow {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-soft);
  min-height: 0;
}

.panel-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 11px;
}

.panel-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.panel-label-row .panel-label { margin-bottom: 0; }

.panel-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 11px;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(43,92,230,0.25), 0 3px 8px rgba(43,92,230,0.2);
  transition: filter 0.12s var(--ease), transform 0.08s var(--ease);
}
.panel-label-btn:hover { filter: brightness(1.05); }
.panel-label-btn:active { transform: translateY(1px); }
.panel-label-btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---- Review Stats ---- */
.review-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.14s var(--ease), border-color 0.14s var(--ease);
}
.stat-chip:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.stat-n {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.stat-l {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-pending  .stat-n { color: var(--warn); }
.stat-accepted .stat-n { color: var(--success); }
.stat-rejected .stat-n { color: var(--ink-3); }

/* ---- Findings List ---- */
.findings-list {
  flex: 1;
  overflow-y: auto;
  padding: 7px 9px;
}
.findings-list::-webkit-scrollbar { width: 5px; }
.findings-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.findings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.55;
}

.finding-chip {
  padding: 11px 11px 11px 13px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-soft);
  background: var(--surface);
  cursor: pointer;
  margin-bottom: 6px;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), box-shadow 0.14s var(--ease), transform 0.1s var(--ease);
  position: relative;
}
.finding-chip:hover { border-color: var(--accent); background: var(--accent-tint); box-shadow: var(--shadow-xs); transform: translateX(1px); }
.finding-chip.is-active { border-color: var(--accent); background: var(--accent-tint); box-shadow: var(--shadow-sm); }
.finding-chip.is-accepted { border-color: var(--border-soft); background: var(--success-tint); opacity: 0.7; }
.finding-chip.is-rejected { border-color: var(--border-soft); opacity: 0.5; }

.finding-chip-cat {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.finding-chip.is-accepted .finding-chip-cat { color: var(--success); }
.finding-chip.is-rejected .finding-chip-cat { color: var(--ink-4); }

.finding-chip-orig {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finding-chip-status {
  position: absolute;
  top: 9px;
  right: 9px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}
.finding-chip.is-accepted .finding-chip-status { background: var(--surface); color: var(--success); }
.finding-chip.is-rejected .finding-chip-status { background: var(--surface); color: var(--ink-4); }

/* ---- History List ---- */
.history-list {
  max-height: 160px;
  overflow-y: auto;
  padding: 0;
}
.history-empty {
  font-size: 12px;
  color: var(--ink-4);
  padding: 8px 0;
}
.history-item {
  font-size: 12px;
  color: var(--ink-2);
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  line-height: 1.4;
}
.history-item:last-child { border-bottom: none; }
.history-item-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--success);
  margin-right: 4px;
}
.history-item-label.rejected { color: var(--ink-4); }

/* ============================================================
   CENTER PANEL — Document
   ============================================================ */

.format-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}

.fbtn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.fbtn:hover { background: var(--surface-3); color: var(--ink); }
.fbtn.is-active { background: var(--accent-tint); color: var(--accent); }
.fbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.fdiv {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 5px;
  flex-shrink: 0;
}

.fsize {
  height: 30px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 12.5px;
  cursor: pointer;
}
.fsize:focus-visible { outline: 2px solid var(--accent); }

/* Text color — a real <input type="color"> drives the picker, but its native appearance is
   hidden; the "A" glyph + swatch bar underneath is the visible control, and stays in sync with
   the input's current value via JS. */
.fcolor {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.fcolor:hover { background: var(--surface-3); color: var(--ink); }

.fcolor-swatch {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  flex-shrink: 0;
}

.fcolor input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.doc-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 36px 24px 64px;
}
.doc-scroll-area::-webkit-scrollbar { width: 6px; }
.doc-scroll-area::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.doc-inner {
  max-width: 720px;
  margin: 0 auto;
}

.docx-container {
  outline: none;
  min-height: 200px;
}

/* Make docx-preview pages look like paper — see the --paper token's own comment for why this
   stays white instead of following --surface into dark mode. */
.docx-container .docx-wrapper {
  background: transparent !important;
}
.docx-container .docx-wrapper > * {
  background: var(--paper) !important;
  box-shadow: inset 0 0 0 1px rgba(16,24,44,0.06), 0 2px 6px rgba(16,24,44,0.08), 0 32px 64px -28px rgba(16,24,44,0.4) !important;
  margin: 0 auto 30px !important;
  border-radius: 3px;
}
.docx-container > * { background: var(--paper); }

/* AI highlight marks — font-family is pinned here (not just on the accepted-replacement inline
   style) because a highlighted PENDING span otherwise just inherits whatever font its underlying
   Word run actually used, which is inconsistent across a document that mixes fonts across runs
   (a defined-term run in one face, body text in another). Times New Roman here, matching this
   app's standard font, keeps every highlighted span visually uniform regardless of source
   formatting. Rejected/untouched-within-accepted spans explicitly cancel this back to `inherit`
   in their own inline style (see applyFindingVisual in app.js) since those are meant to look
   completely unmodified. */
.ai-highlight {
  background: rgba(245,180,40,0.32);
  border-bottom: 2px solid #D99A00;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Times New Roman', Times, serif;
  transition: background 0.15s var(--ease);
}
.ai-highlight:hover { background: rgba(245,180,40,0.52); }
.ai-highlight.is-accepted {
  background: rgba(22,135,91,0.15);
  border-bottom-color: var(--success);
}
.ai-highlight.is-rejected {
  /* Rejected text stays visually identical to the surrounding document — no strikethrough,
     no fading — it just remains clickable so the decision can be redone. */
  background: transparent;
  border-bottom-color: transparent;
  text-decoration: none;
  color: inherit;
  opacity: 1;
}
.ai-highlight.is-active {
  background: rgba(43,92,230,0.2);
  border-bottom-color: var(--accent);
}

/* ============================================================
   RIGHT PANEL — Tabs & Content
   ============================================================ */

.right-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--surface);
}

.rtab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
  white-space: nowrap;
}
.rtab:hover { color: var(--ink); }
.rtab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.tab-content.is-active { display: flex; }

/* ---- Recommendations Tab ---- */
.active-finding-panel,
.no-finding-selected {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.no-finding-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* Once a review has run, this same panel carries a standing document-level summary instead of
   the empty "select a finding" placeholder (see renderNoFindingSelected in app.js) — switches
   the parent out of centered-empty-state mode into a normal top-aligned reading layout. */
.no-finding-selected.has-overview {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

.review-overview {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-overview-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.review-overview-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  background: var(--surface-2);
  padding: 12px 13px;
  border-radius: var(--radius);
}

.review-overview-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.review-overview-section-label-missing { color: var(--danger); }
.review-overview-section-label-extra   { color: var(--warn); }

.review-overview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.review-overview-list li {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border-strong);
}
.review-overview-section-label-missing + .review-overview-list li { border-left-color: var(--danger); }
.review-overview-section-label-extra + .review-overview-list li { border-left-color: var(--warn); }

.review-overview-hint {
  font-size: 12px;
  color: var(--ink-4);
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.finding-detail-section {
  margin-bottom: 15px;
}

.finding-detail-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.finding-location {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.finding-text-orig {
  font-size: 13px;
  background: var(--danger-tint);
  color: var(--ink);
  padding: 9px 11px;
  border-radius: var(--radius);
  border-left: 3px solid var(--danger);
  line-height: 1.5;
  word-break: break-word;
}

.finding-text-rec {
  font-size: 13px;
  background: var(--success-tint);
  color: var(--ink);
  padding: 9px 11px;
  border-radius: var(--radius);
  border-left: 3px solid var(--success);
  line-height: 1.5;
  word-break: break-word;
}

.finding-reason {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
  background: var(--surface-2);
  padding: 9px 11px;
  border-radius: var(--radius);
}

.finding-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.finding-cat-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.finding-confidence {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.finding-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.finding-actions-settled {
  flex-direction: column;
  align-items: stretch;
}

.btn-accept {
  flex: 1;
  background: linear-gradient(135deg, var(--success-2), var(--success));
  color: white;
  border: none;
  height: 37px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(22,135,91,0.25), 0 4px 10px rgba(22,135,91,0.2);
  transition: filter 0.12s var(--ease), transform 0.08s var(--ease);
}
.btn-accept:hover { filter: brightness(1.06); }
.btn-accept:active { transform: translateY(1px); }
.btn-accept:disabled { opacity: 0.4; pointer-events: none; }

.btn-reject {
  flex: 1;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1.5px solid var(--border);
  height: 37px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease), transform 0.08s var(--ease);
}
.btn-reject:hover { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.btn-reject:active { transform: translateY(1px); }
.btn-reject:disabled { opacity: 0.4; pointer-events: none; }

.finding-settled-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 9px;
}

.btn-redo {
  width: 100%;
  background: var(--accent-tint);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  height: 37px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), transform 0.08s var(--ease);
}
.btn-redo:hover { background: var(--accent); color: var(--on-accent); }
.btn-redo:active { transform: translateY(1px); }

/* ---- Manual Replace Tab ---- */
.manual-replace-panel {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.form-group { margin-bottom: 13px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.optional {
  font-weight: 400;
  color: var(--ink-4);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
  resize: vertical;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--ink-4); }
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.form-textarea { min-height: 72px; }

.validation-result {
  margin-top: 13px;
  padding: 13px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
}
.validation-result.is-valid {
  background: var(--success-tint);
  border: 1px solid rgba(22,135,91,0.25);
  color: var(--success);
}
.validation-result.is-invalid {
  background: var(--danger-tint);
  border: 1px solid rgba(195,58,44,0.25);
  color: var(--danger);
}
.validation-result-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.validation-result-body {
  color: var(--ink-2);
  font-size: 12.5px;
}
.validation-alt {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
}
.validation-alt strong { color: var(--accent); }

/* ---- Chat Tab ---- */
.tab-content#tab-chat {
  display: none;
  flex-direction: column;
}
.tab-content#tab-chat.is-active { display: flex; }

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.chat-area::-webkit-scrollbar { width: 5px; }
.chat-area::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 10px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
}

.chat-msg {
  max-width: 92%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.chat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: var(--on-accent);
  border-bottom-right-radius: 4px;
}
.chat-msg-ai {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
  white-space: pre-wrap;
  box-shadow: var(--shadow-xs);
}
.chat-msg-ai.is-loading {
  color: var(--ink-3);
  font-style: italic;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 11px 13px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface-2);
  resize: none;
  min-height: 38px;
  max-height: 100px;
  overflow-y: auto;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.chat-input::placeholder { color: var(--ink-4); }
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.chat-send-btn {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  border: none;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: var(--on-accent);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(43,92,230,0.25), 0 4px 10px rgba(43,92,230,0.2);
  transition: filter 0.12s var(--ease);
}
.chat-send-btn:hover { filter: brightness(1.06); }
.chat-send-btn:disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   OVERLAY & SPINNER
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,10,16,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.overlay-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 30px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay-card p {
  font-size: 13.5px;
  color: var(--ink-3);
  text-align: center;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border-radius: var(--radius);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  animation: toast-in 0.18s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.toast-error {
  background: linear-gradient(135deg, var(--danger-2), var(--danger));
  color: white;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.75;
  font-size: 12px;
  margin-left: 4px;
  padding: 2px 4px;
}
.toast-close:hover { opacity: 1; }

/* ============================================================
   ADMIN SCREEN
   ============================================================ */

.admin-body { background: var(--bg); }

.admin-screen {
  padding: 44px 20px 80px;
}

.admin-container {
  max-width: 880px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 30px;
}
.admin-header h1 {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.admin-header p {
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 620px;
}

.admin-notice {
  margin-bottom: 20px;
  padding: 13px 17px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-xs);
}
.admin-notice-success {
  background: var(--success-tint);
  color: var(--success);
  border: 1px solid rgba(22,135,91,0.25);
}
.admin-notice-error {
  background: var(--danger-tint);
  color: var(--danger);
  border: 1px solid rgba(195,58,44,0.25);
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

@media (max-width: 600px) {
  .ref-grid { grid-template-columns: 1fr; }
}

.ref-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.ref-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }

.ref-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.ref-card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--ink-3);
}
.ref-card-icon.has-doc { color: var(--accent); }
.ref-card-icon svg { width: 40px; height: 40px; }

.ref-card-meta h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.ref-status {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.ref-status-ok {
  background: var(--success-tint);
  color: var(--success);
}
.ref-status-missing {
  background: var(--warn-tint);
  color: var(--warn);
}

.ref-card-info {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}
.ref-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.ref-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.upload-label {
  cursor: pointer;
}

.admin-add-type {
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 26px;
}
.admin-add-type h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.admin-add-type p {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.admin-add-type-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-add-type-row .form-input {
  flex: 1;
}

.admin-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--accent-tint);
  border: 1px solid rgba(43,92,230,0.2);
  border-radius: var(--radius);
  padding: 15px 17px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.admin-info-box svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1000px) {
  :root {
    --panel-left-w: 220px;
    --panel-right-w: 280px;
  }
}

@media (max-width: 760px) {
  .panel-left { display: none; }
  :root { --panel-right-w: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .btn, .tbtn, .upload-card, .finding-chip, .theme-toggle, body { transition: none; }
}
