/* ========================================================================
   NCM AI Research Lab — Dark research UI
   ======================================================================== */
:root {
  --bg: #0b0f19;
  --panel: #111827;
  --panel-hover: #1f2937;
  --border: #1f2937;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --ink: #111827;

  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.3);

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ============ LAYOUT ============ */
.main {
  display: flex;
  height: 100vh;
  max-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.2s ease;
}

.sidebar.hidden { transform: translateX(-100%); }

.brand {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.4px;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav {
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 4px;
  text-align: left;
}
.nav-item:hover {
  background: var(--panel-hover);
  color: var(--text);
}
.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.nav-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.10);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 8px;
}
.mode-pill.warning { background: rgba(251, 191, 36, 0.10); color: var(--warning); border-color: rgba(251, 191, 36, 0.25); }
.version {
  font-size: 11px;
  color: var(--text-muted);
}

/* Content area */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 24px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(8px);
  z-index: 30;
  margin-bottom: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.menu-toggle:hover { color: var(--text); background: var(--panel-hover); }

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-right: auto;
}

.topbar-right {
  display: flex;
  gap: 10px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--panel-hover); border-color: var(--text-muted); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--panel-hover); color: var(--text); }

/* ============ CARDS & STATS ============ */
.section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px 0;
  letter-spacing: -0.4px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-card .stat-delta {
  font-size: 11px;
  margin-top: 6px;
  font-weight: 600;
}
.delta-ok { color: var(--success); }
.delta-bad { color: var(--danger); }

/* ============ TABLES ============ */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: rgba(17, 24, 39, 0.4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 5;
}
tbody tr:hover { background: rgba(255,255,255,0.02); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-completed { background: rgba(52, 211, 153, 0.12); color: var(--success); border-color: rgba(52, 211, 153, 0.25); }
.status-pending   { background: rgba(251, 191, 36, 0.12); color: var(--warning); border-color: rgba(251, 191, 36, 0.25); }
.status-running   { background: rgba(99, 102, 241, 0.12); color: var(--accent); border-color: rgba(99, 102, 241, 0.25); }
.status-failed    { background: rgba(248, 113, 113, 0.12); color: var(--danger); border-color: rgba(248, 113, 113, 0.25); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.field.full { grid-column: 1 / -1; }

input, textarea, select {
  width: 100%;
  background: #0b1121;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
textarea { resize: vertical; min-height: 90px; }

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

/* ============ GENERATION EXPLORER ============ */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.level-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.level-card:hover { border-color: var(--accent); }
.level-card.active {
  border-color: var(--success);
  background: rgba(52, 211, 153, 0.05);
}
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.level-card.active .level-badge { background: var(--success); color: var(--ink); }
.level-card .level-name {
  font-weight: 600;
  font-size: 14px;
}
.level-card .level-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.level-decoded {
  margin-top: 8px;
  padding: 10px 12px;
  background: #0b1121;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.5;
  flex: 1;
  overflow: auto;
}
.level-decoded.dim { color: var(--text-muted); }

.gen-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.gen-flow .arrow { color: var(--accent); font-weight: 700; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.5; }

/* ============ CHARTS ============ */
.chart-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
  position: relative;
  height: 300px;
}

/* ============ UTILS ============ */
.mt-20 { margin-top: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.text-center { text-align: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel-hover);
  color: var(--text-muted);
}
.code-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: #0b1121;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin: 1px;
}

/* Upload zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #0b1121;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.upload-zone:hover {
  border-color: var(--accent);
  background: #111827;
  color: var(--text);
}
.upload-zone input { cursor: pointer; }
.upload-hint { font-size: 14px; font-weight: 600; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.modal-backdrop.open .modal { transform: scale(1); }

@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); }
  .sidebar.hidden { transform: translateX(-100%); }
  .menu-toggle { display: flex; }
  .content { padding: 20px 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
}
/* ClauseCheck workspace */
:root {
  --bg: #f7f8f5; --panel: #ffffff; --panel-hover: #f0f4ef; --border: #e2e7df;
  --text: #223b30; --text-muted: #758078; --accent: #22664f; --accent-hover: #174e3b;
  --success: #267052; --warning: #9e7225; --danger: #ba5147; --ink: #183c2c;
  --shadow: 0 2px 4px rgba(30,57,41,.03); --shadow-lg: 0 12px 36px rgba(30,57,41,.08);
}
body { overflow: hidden; }
[hidden] { display: none !important; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; height: 100dvh; background: #fcfdfb; }
.sidebar.hidden { transform: none; }
.brand { display: flex; gap: 11px; align-items: center; padding: 32px 22px 30px; border: 0; }
.brand-mark { width: 39px; height: 42px; border-radius: 12px; margin: 0; background: #22664f; font-family: Georgia,serif; font-size: 34px; position: relative; box-shadow: none; }
.brand-mark span { position: absolute; font: 13px system-ui; right: 3px; bottom: 2px; }
.brand-name { font-size: 19px; letter-spacing: -.7px; }
.brand-sub { font-size: 9px; white-space: nowrap; }
.nav { padding: 18px 14px; }
.nav-caption { color: #9bA49c; font-size: 9px; letter-spacing: 1.4px; font-weight: 600; margin: 0 12px 15px; }
.nav-item { padding: 12px; border-radius: 7px; font-size: 12px; gap: 10px; color: #728076; }
.nav-item.active { background: #eaf0e7; color: #28533e; font-weight: 600; }
.nav-arrow { margin-left: auto; }
.nav-icon { font-size: 18px; font-weight: 400; }
.research-nav { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 20px; }
.research-nav summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; font-size: 11px; padding: 0 12px 14px; color: #8b958c; }
.research-nav summary::-webkit-details-marker { display: none; }
.sidebar-note { margin: auto 23px 25px; background: #f0f3eb; border: 1px solid #e8ecdf; padding: 18px; border-radius: 10px; }
.note-symbol { display: block; font-size: 26px; color: #5b7c54; margin-bottom: 12px; }
.sidebar-note strong { font-size: 12px; font-weight: 500; }
.sidebar-note p { font-size: 11px; line-height: 1.8; color: #8a9486; margin-top: 6px; }
.nav-footer { padding: 17px 24px; }
.mode-pill { padding: 0; border: 0; background: none; color: #7e897e; font-size: 10px; font-weight: 400; }
.version { font-size: 9px; color: #a1aaa0; }
.main { margin-left: 244px; display: flex; flex-direction: column; width: calc(100% - 244px); height: 100dvh; max-height: none; min-width: 0; }
.topbar { min-height: 76px; padding: 0 44px; margin: 0; border-bottom: 1px solid var(--border); background: #fcfdfb; flex-shrink: 0; position: relative; backdrop-filter: none; gap: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 14px; color: #9aa299; font-size: 11px; }
.breadcrumb>span { color: #c0c8bc; }
.page-title { font-size: 11px; font-weight: 500; letter-spacing: 0; color: #455b4b; }
.topbar-right { margin-left: auto; align-items: center; gap: 20px; }
.topbar .btn-outline { border: 0; color: #839080; font-size: 10px; }
.avatar { height: 29px; width: 29px; display: grid; place-items: center; border-radius: 50%; background: #ebeee5; color: #617153; font-size: 11px; border: 3px solid white; box-shadow: 0 0 0 1px #e7ebe2; }
.content { min-height: 0; padding: 42px 44px 24px; overflow: auto; }
.contracts-workspace { max-width: 1170px; margin: 0 auto; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 32px; }
.eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 1.7px; color: #8a9683; }
.workspace-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(29px, 3vw, 43px); line-height: 1.25; letter-spacing: -1.3px; margin: 10px 0 11px; color: #263f31; }
.workspace-heading h2>span { color: #83a476; }
.workspace-heading p { color: var(--text-muted); font-size: 12px; }
.engine-badge { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; border: 1px solid #e3e7db; background: #f0f2e9; padding: 7px 11px; border-radius: 6px; font-size: 10px; color: #7f865c; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #b39c50; }.status-dot.ready { background: #42815a; }
.workflow-steps { display: flex; align-items: center; justify-content: space-between; margin: 0 0 30px; padding: 0 4px; gap: 18px; }
.workflow-steps>div { display: grid; grid-template-columns: 28px auto; column-gap: 10px; }
.workflow-steps>div>span { grid-row: 1 / 3; width: 27px; height: 27px; border: 1px solid #dde3d8; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #9aa391; margin-top: 3px; }
.workflow-steps .current>span { background: #e8eee1; border-color: #dce6d4; color: #56704c; }
.workflow-steps strong { font-size: 11px; font-weight: 500; color: #64735f; }
.workflow-steps small { font-size: 9px; margin-top: 3px; color: #a0a89a; }
.workflow-steps>b { color: #c1cabb; font-weight: 400; font-size: 18px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 24px; align-items: stretch; }
.upload-card { background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 25px 25px 17px; min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.card-heading h3 { font-size: 15px; font-weight: 500; letter-spacing: -.35px; margin-top: 5px; }
.card-heading .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
.small-chip { font: 9px var(--font-mono); border: 1px solid #e4e9df; color: #8a9482; padding: 3px 6px; border-radius: 4px; }
.upload-zone { border: 1.5px dashed #ccd9c5; background: #f9fbf7; min-height: 265px; padding: 24px 15px; cursor: default; border-radius: 8px; }
.upload-zone:hover, .upload-zone.dragging { background: #f1f6eb; border-color: #809b71; color: var(--text); }
.document-art { width: 66px; color: #c0cdb5; margin-bottom: 8px; transform: rotate(-5deg); }
.document-art svg { display: block; width: 100%; }
.upload-zone h4 { font-size: 14px; font-weight: 500; color: #48603f; margin: 3px 0; }
.upload-zone p { font-size: 10px; color: #9aa492; margin-bottom: 15px; }
.btn { border-radius: 6px; font-size: 11px; padding: 10px 16px; font-weight: 500; }
.btn-primary { background: var(--accent); box-shadow: none; }.btn-primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #719a5f; outline-offset: 4px; }
.choose-pdf { min-width: 134px; gap: 10px; padding: 9px 15px; }
.choose-pdf>span { font-size: 16px; font-weight: 300; }
.upload-limits { font-size: 8px; color: #a5ad9d; margin-top: 12px; }
.upload-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 19px 0; border-bottom: 1px solid #edf0e8; }
.upload-action>span { font-size: 10px; color: #929d8a; }.upload-action .btn { gap: 20px; }
.privacy-note { font-size: 8px; color: #a3ad9b; margin-top: 13px; line-height: 1.7; display: flex; gap: 6px; align-items: baseline; }
.guide-card { background: #eef2e7; border: 1px solid #e3e8db; padding: 26px 23px 19px; border-radius: 12px; }
.guide-card .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
.guide-card h3 { font-family: Georgia, serif; font-size: 24px; font-weight: 400; margin: 7px 0 26px; letter-spacing: -.5px; color: #4c6242; }
.guide-card ol { list-style: none; display: flex; flex-direction: column; gap: 23px; }
.guide-card li { display: flex; gap: 12px; }
.guide-card li>span { width: 21px; height: 21px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid #d7dfca; border-radius: 50%; font-size: 9px; color: #849278; }
.guide-card strong { font-size: 10px; color: #5d7051; font-weight: 500; }.guide-card p { font-size: 10px; line-height: 1.8; color: #8c9981; margin-top: 4px; }
.guide-bottom { display: flex; gap: 11px; border-top: 1px solid #dfe6d4; margin-top: 24px; padding-top: 17px; }.guide-bottom>span { color: #8a9c73; font-size: 22px; }.guide-bottom p { margin: 0; font-size: 9px; }
.setup-notice { background: #f5f3e9; border: 1px solid #e9e4d0; border-radius: 8px; margin-top: 19px; color: #887951; }
.setup-notice summary { padding: 14px 18px; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }.setup-notice summary::-webkit-details-marker { display: none; }
.setup-symbol { width: 18px; height: 18px; display: grid; place-items: center; font: italic 12px Georgia; border: 1px solid #c7b98f; border-radius: 50%; }
.setup-notice strong { display: block; font-size: 10px; font-weight: 500; }.setup-notice summary div>span { display: block; font-size: 9px; color: #ada280; margin-top: 3px; }.setup-notice b { margin-left: auto; font-size: 9px; font-weight: 400; white-space: nowrap; }.setup-content { padding: 0 18px 16px 48px; font-size: 11px; line-height: 1.9; }
.connection-note { margin: 16px 0; font-size: 10px; color: #8b9884; overflow-wrap: anywhere; }
.recent-section { margin-top: 32px; }.recent-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }.recent-heading h3 { font-size: 15px; font-weight: 500; letter-spacing: -.3px; }.recent-heading p { font-size: 10px; color: #9aa492; margin-top: 4px; }.recent-heading>span { font-size: 9px; color: #a0a997; }.count-badge { background: #eaf0e4; padding: 1px 6px; border-radius: 4px; font-size: 9px; color: #869b77; margin-left: 6px; vertical-align: middle; }
.contracts-table { border-radius: 9px; box-shadow: var(--shadow); margin: 0; }th { background: #fafbf8; color: #9ca591; font-size: 8px; letter-spacing: 1px; font-weight: 500; padding: 12px 20px; }td { color: #63765c; font-size: 11px; }tr:last-child td { border-bottom: 0; }
.empty-row td { text-align: center; padding: 27px 20px 31px; }.empty-document { display: block; font-size: 25px; color: #c4ceb8; margin-bottom: 6px; }.empty-row strong { font-size: 11px; font-weight: 400; color: #7c8e70; }.empty-row p { color: #abb49f; font-size: 9px; margin-top: 5px; }
.file-symbol { display: grid; place-items: center; flex-shrink: 0; font-size: 8px; color: #829674; background: #f0f4eb; border: 1px solid #e0e8d8; width: 28px; height: 35px; border-radius: 4px; }.document-name { display: flex; align-items: center; gap: 12px; }.document-name strong { font-weight: 500; overflow-wrap: anywhere; }
.selected-file { display: flex; gap: 12px; align-items: center; padding: 14px 0 0; }.selected-file>div { flex: 1; min-width: 0; }.selected-file strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 500; }.selected-file small { font-size: 9px; color: #98a28f; }.selected-file button { font-size: 22px; padding: 4px; color: #9eaa95; }
#uploadMsg:not(:empty) { padding-top: 12px; font-size: 11px; color: #78896d; }.upload-error { color: var(--danger) !important; }
.workspace-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 35px; padding-top: 17px; border-top: 1px solid var(--border); font-size: 8px; color: #acb4a4; }
.review-detail { scroll-margin-top: 18px; margin-top: 20px; }.review-card { padding: 26px; }.saved-notice { padding: 18px; border-radius: 9px; background: #eaf1e5; border: 1px solid #d7e2ce; color: #678153; font-size: 12px; }.saved-notice p { margin-top: 5px; font-size: 11px; }
.error-card { padding: 30px; background: white; border: 1px solid var(--border); border-radius: 12px; }.error-card p { margin: 12px 0 20px; font-size: 12px; }.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.status-reviewed { color: #49835b; background: #edf5eb; }.status-unverified { color: #a18c4f; background: #f7f3e6; }.status-pill { font-size: 9px; }
input,textarea,select,.level-decoded,.code-num { background: #fafcf7; }.badge { background: #edf2e8; }tbody tr:hover { background: #fcfdf9; }
@keyframes guidePulse { 0%,100% { box-shadow: none; } 40% { box-shadow: 0 0 0 4px #b5caa0; } }.highlight-guide { animation: guidePulse 1.6s ease; }
@media(min-width:1550px) { .content { padding-top: 55px; }.upload-zone { min-height: 300px; }.upload-layout { grid-template-columns: minmax(0,1fr) 300px; }.guide-card { padding: 30px; } }
@media(max-width:1100px) { .sidebar { width: 210px; }.brand { padding-left: 17px; }.brand-name { font-size: 17px; }.brand-sub { font-size: 8px; }.main { margin-left: 210px; width: calc(100% - 210px); }.topbar { padding: 0 28px; }.content { padding: 30px 28px; }.upload-layout { grid-template-columns: minmax(0,1fr) 230px; gap: 16px; }.upload-card { padding: 21px; }.guide-card { padding: 23px 18px; }.workspace-heading h2 { font-size: 32px; } }
@media(max-width:900px) { .upload-layout { grid-template-columns: minmax(0,1fr); }.guide-card ol { flex-direction: row; gap: 18px; }.guide-card li { flex: 1; }.guide-card h3 { margin-bottom: 20px; }.guide-bottom { display: none; }.workflow-steps { gap: 9px; }.workflow-steps small { display: none; }.engine-badge { font-size: 8px; }.workspace-heading { align-items: flex-start; flex-direction: column; gap: 14px; } }
@media(max-width:768px) { .sidebar { transform: translateX(-100%); width: 244px; box-shadow: var(--shadow-lg); }.sidebar.open { transform: translateX(0); }.main { margin-left: 0; width: 100%; }.menu-toggle { display: flex; }.topbar { min-height: 65px; padding: 0 20px; }.topbar-right { gap: 8px; }.content { padding: 27px 20px; }.brand-sub { font-size: 9px; }.brand-name { font-size: 19px; }.workflow-steps { margin-bottom: 24px; }.workflow-steps strong { font-size: 10px; }.workflow-steps>div { column-gap: 6px; }.workflow-steps>div>span { width: 22px; height: 22px; margin: 0; }.workflow-steps b { display: none; }.workspace-heading h2 { font-size: 32px; }.workspace-heading p { font-size: 11px; }.upload-card { padding: 20px 18px 16px; }.card-heading h3 { font-size: 14px; }.guide-card ol { flex-direction: column; gap: 18px; }.guide-card p { font-size: 11px; }.guide-card strong { font-size: 11px; }.guide-card { padding: 22px; }.setup-notice summary { padding: 14px 12px; gap: 9px; }.setup-notice b { font-size: 8px; }.setup-notice summary div>span { font-size: 8px; }.upload-action>span { font-size: 9px; }.workspace-footer { flex-direction: column; gap: 5px; }.contracts-table { overflow: auto; }.contracts-table table { min-width: 580px; }.breadcrumb { font-size: 10px; gap: 9px; }.breadcrumb .page-title { font-size: 10px; }.privacy-note { font-size: 9px; }.upload-limits { font-size: 9px; }.upload-zone p { font-size: 11px; } }
@media(prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* Keep supporting copy readable on compact displays. */
.guide-card p { color: #6f8063; font-size: 11px; }
.guide-card strong { color: #506646; font-size: 11px; }
.upload-limits, .privacy-note { color: #7f8b75; font-size: 10px; }
.upload-action>span { color: #758368; font-size: 11px; }
.workflow-steps small { color: #89947e; font-size: 10px; }
.eyebrow { color: #7f8c74; font-size: 10px; }
.setup-notice summary div>span { color: #8f825e; font-size: 10px; }
.setup-notice strong { font-size: 11px; }
.empty-row strong { font-size: 12px; color: #687d5b; }
.empty-row p { font-size: 11px; color: #8c997f; }
.contracts-table th { font-size: 9px; color: #818e76; }
.workspace-footer { font-size: 9px; color: #8c997f; }
.sidebar-close { display: none; }
@media(max-width:768px) { .sidebar-close { display: grid; place-items: center; position: absolute; right: 7px; top: 7px; font-size: 23px; width: 26px; height: 26px; color: #8a977f; } }
/* Accounts and plan access */
.account-controls { display: flex; align-items: center; gap: 12px; }
#accountEmail { font-size: 10px; color: #84927b; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.auth-layout { max-width: 1000px; margin: 60px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.auth-intro h2 { font-family: Georgia,serif; font-weight: 400; font-size: 43px; line-height: 1.2; letter-spacing: -1px; margin: 20px 0; }
.auth-intro p { font-size: 13px; line-height: 1.9; color: #7e8f74; max-width: 340px; }
.auth-intro ul { list-style: none; display: grid; gap: 16px; font-size: 12px; color: #5c7850; margin: 32px 0; }
.auth-disclaimer { font-size: 10px; max-width: 320px; color: #92a086; line-height: 1.8; }
.auth-card { background: white; padding: 32px; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 21px; font-weight: 500; margin: 10px 0; letter-spacing: -.6px; }.auth-card>p { font-size: 11px; color: #8a987f; line-height: 1.8; margin-bottom: 25px; }
.auth-card label { display: block; font-size: 11px; margin: 16px 0 7px; color: #657b59; }.auth-card input { background: #fafcf8; font-size: 12px; padding: 13px 12px; }.auth-card small { display: block; font-size: 9px; color: #99a68e; margin-top: 8px; }.auth-card .btn { width: 100%; margin-top: 18px; padding: 13px; }.auth-switch { text-align: center; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; font-size: 11px; color: #8a987f; }.auth-switch button { color: #356d48; text-decoration: underline; margin-left: 5px; }
#authError { color: var(--danger); font-size: 11px; margin-top: 12px; }
.plan-banner { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #eef3e8; border: 1px solid #dfe8d7; padding: 18px 22px; border-radius: 10px; margin: 0 0 26px; }.plan-tag { display: block; font-size: 8px; color: #8a9d7b; letter-spacing: 1.5px; margin-bottom: 4px; }.plan-banner strong { font-size: 13px; font-weight: 500; color: #536d45; }.plan-banner p { color: #8a9c7c; font-size: 10px; margin-top: 5px; }.plan-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }.plan-actions small { font-size: 9px; color: #93a187; }.checkout-message { margin-bottom: 20px; }
@media(max-width:1000px) { .auth-layout { gap: 30px; margin-top: 25px; }.auth-intro h2 { font-size: 34px; }.auth-card { padding: 25px; } }
@media(max-width:768px) { .auth-layout { grid-template-columns: 1fr; gap: 30px; margin: 10px auto; max-width: 430px; }.auth-intro h2 { font-size: 32px; }.auth-intro ul { gap: 10px; margin: 20px 0; }.auth-disclaimer { display: none; }.plan-banner { flex-direction: column; align-items: flex-start; padding: 18px; }.plan-actions { align-items: flex-start; width: 100%; }.plan-actions>.btn { width: 100%; }#accountEmail { display: none; }.account-controls { gap: 0; }.topbar .btn { padding: 6px; font-size: 9px; }.topbar-right { gap: 4px; } }
/* Editorial finish: clear type, quiet surfaces, one consistent icon set. */
:root { --bg: #f7f7f2; --panel: #fff; --text: #263c30; --text-muted: #68756a; --border: #e0e4da; --accent: #245e48; --accent-hover: #1b4937; }
.icon { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.brand-mark { border-radius: 10px; width: 40px; height: 42px; background: #245e48; }.brand-mark>.icon { width: 26px; height: 26px; }
.brand-sub { color: #7a8476; font-size: 10px; }.nav-caption { font-size: 10px; letter-spacing: 1.2px; }.nav-item { font-size: 13px; padding: 13px 12px; gap: 11px; }.nav-icon { display: flex; align-items: center; justify-content: center; }.nav-arrow .icon { width: 13px; height: 13px; transform: rotate(-90deg); }
.research-nav summary { font-size: 12px; }.research-nav summary>.icon { width: 14px; height: 14px; transition: transform .15s; }.research-nav[open] summary>.icon { transform: rotate(180deg); }
.sidebar-note { background: #f2f3eb; }.note-symbol { margin-bottom: 13px; }.note-symbol .icon { width: 23px; height: 23px; }.sidebar-note strong { font-size: 13px; }.sidebar-note p { font-size: 12px; color: #77826d; }.version { font-size: 10px; }
.topbar .btn-outline { font-size: 11px; }.topbar .icon { width: 15px; height: 15px; }.breadcrumb,.page-title { font-size: 12px; }
.workspace-heading h2 { font-size: clamp(30px,3vw,42px); letter-spacing: -1.1px; }.workspace-heading p { max-width: 640px; font-size: 13px; line-height: 1.8; color: #788170; }.eyebrow { font-size: 10px; letter-spacing: 1.5px; color: #7f8974; }
.engine-badge { font-size: 10px; color: #65784f; background: #eef2e7; }.status-dot { background: #a58d55; }.status-dot.ready { background: #6b8950; }
.plan-banner { background: #eff2e9; border-color: #e0e6d6; padding: 19px 22px; }.plan-tag { font-size: 9px; }.plan-banner strong { font-size: 14px; }.plan-banner p { font-size: 11px; color: #819173; }.plan-actions small { font-size: 10px; color: #829173; }
.workflow-steps strong { font-size: 12px; }.workflow-steps small { font-size: 10px; }.workflow-steps>b .icon { width: 16px; height: 16px; }
.card-heading h3 { font-size: 17px; font-weight: 500; }.card-heading .eyebrow { font-size: 9px; }.upload-card { padding: 26px 26px 18px; }.upload-zone { border-color: #c7d2bc; background: #fafbf7; min-height: 262px; padding: 26px 16px; }.document-art { transform: none; width: 66px; height: 66px; display: grid; place-items: center; color: #7c9570; background: #edf2e6; border: 1px solid #e3e9d9; border-radius: 16px; margin-bottom: 18px; }.document-art>.icon { width: 34px; height: 34px; }
.upload-zone h4 { font-size: 15px; font-weight: 500; margin: 0 0 6px; }.upload-zone p { font-size: 12px; color: #8c9880; margin-bottom: 20px; }.choose-pdf { min-width: 143px; }.btn { font-size: 12px; min-height: 38px; gap: 8px; }.btn-sm { min-height: 32px; font-size: 11px; padding: 6px 11px; }.btn-sm .icon { width: 14px; height: 14px; }.choose-pdf>.icon { width: 16px; height: 16px; }
.upload-limits { font-size: 10px; color: #89957c; margin-top: 16px; }.upload-action>span { font-size: 11px; }.upload-action .icon { width: 16px; height: 16px; }.privacy-note { font-size: 10px; line-height: 1.85; color: #8c977f; gap: 8px; }.privacy-note>.icon { width: 13px; height: 13px; margin-top: 3px; }
.guide-card { background: #f0f2e7; }.guide-card h3 { font-size: 24px; }.guide-card p { font-size: 12px; color: #7e8d6d; }.guide-card strong { font-size: 12px; }.guide-card .eyebrow { font-size: 9px; }.guide-bottom { align-items: flex-start; }.guide-bottom>.icon { width: 16px; height: 16px; margin-top: 3px; color: #869773; }.guide-bottom p { font-size: 10px; }
.service-notice { display: flex; align-items: flex-start; gap: 12px; background: #f4f1e7; border: 1px solid #e6dfcc; color: #88774f; padding: 17px 20px; border-radius: 8px; margin-top: 20px; }.service-notice>.icon { width: 18px; height: 18px; margin-top: 2px; }.service-notice strong { font-size: 12px; font-weight: 500; }.service-notice p { font-size: 11px; color: #9b8d6c; margin-top: 4px; line-height: 1.7; }
.recent-heading h3 { font-size: 17px; }.recent-heading p { font-size: 12px; color: #87937b; }.recent-heading>span { font-size: 11px; }.contracts-table th { font-size: 10px; }.contracts-table td { font-size: 12px; }.contracts-table .btn { font-size: 11px; }.empty-document>.icon { width: 30px; height: 30px; }.empty-row td { padding: 30px 20px; }.empty-row strong { font-size: 13px; }.empty-row p { font-size: 11px; }
.workspace-footer { font-size: 10px; color: #8b957e; line-height: 1.7; }.workspace-footer>span:first-child { color: #748563; font-weight: 500; }.saved-notice strong { display: inline-flex; align-items: center; gap: 8px; }.selected-file button .icon { width: 16px; height: 16px; }.auth-intro h2 { font-size: 42px; letter-spacing: -1px; }.auth-intro p { font-size: 14px; line-height: 1.9; max-width: 375px; color: #78896d; }.auth-intro ul { gap: 19px; font-size: 13px; }.auth-intro li { display: flex; align-items: center; gap: 12px; }.auth-intro li>.icon { width: 19px; height: 19px; color: #6f8b5f; }.auth-disclaimer { font-size: 11px; max-width: 355px; }.auth-card { border-radius: 12px; box-shadow: 0 8px 28px #263c3005; padding: 34px; }.auth-card h2 { font-family: Georgia,serif; font-size: 28px; font-weight: 400; letter-spacing: -.6px; }.auth-card>p { font-size: 12px; color: #829175; }.auth-card label { font-size: 12px; }.auth-card input { font-size: 13px; }.auth-card small { font-size: 10px; }.auth-switch { font-size: 12px; }.auth-card .btn { min-height: 42px; }
@media(min-width:1550px) { .upload-zone { min-height: 280px; } }
@media(max-width:1100px) { .auth-intro h2 { font-size: 36px; }.auth-layout { gap: 36px; }.auth-card { padding: 27px; } }
@media(max-width:768px) { .auth-intro h2 { font-size: 35px; }.auth-intro p { font-size: 13px; }.auth-intro ul { font-size: 12px; gap: 14px; }.auth-card h2 { font-size: 26px; }.topbar .btn { font-size: 10px; }.topbar .icon { width: 14px; height: 14px; }.upload-card { padding: 21px 18px 16px; }.card-heading h3 { font-size: 16px; }.workspace-heading h2 { font-size: 32px; }.workspace-heading p { font-size: 12px; }.workflow-steps strong { font-size: 10px; }.plan-banner p { font-size: 11px; }.upload-limits { font-size: 9px; }.guide-card p { font-size: 12px; }.breadcrumb,.page-title { font-size: 10px; }.brand-sub { font-size: 9px; } }
