/* ===========================================================
   SER Automation Platform — design tokens & base
   =========================================================== */

:root {
  /* Brand */
  --ser-teal: #00b4a0;
  --ser-teal-600: #00a092;
  --ser-teal-50: #e6f7f5;
  --ser-navy: #1e1e5a;
  --ser-navy-700: #16164a;
  --ser-navy-900: #0e0e3a;
  --ser-gold: #f5a523;
  --ser-gold-50: #fff5e0;

  /* Neutrals — warm-cool tinted */
  --ink-900: #0e0e2a;
  --ink-700: #2a2a4a;
  --ink-500: #5a5e7a;
  --ink-400: #7e8298;
  --ink-300: #a8acc0;
  --ink-200: #d8dae6;
  --ink-100: #ebedf3;
  --ink-50:  #f4f5f9;
  --ink-25:  #fafbfd;
  --paper:   #ffffff;

  /* Specialism accents (chroma-matched) */
  --spec-seo:    #00b4a0;
  --spec-sea:    #f5a523;
  --spec-content:#7c5cff;
  --spec-data:   #2563eb;
  --spec-ai:     #ec4899;

  /* Semantic */
  --ok: #00b4a0;
  --warn: #f5a523;
  --err: #e53935;

  /* Spacing & radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(14,14,42,0.04), 0 1px 1px rgba(14,14,42,0.03);
  --shadow-md: 0 4px 14px rgba(14,14,42,0.06), 0 2px 4px rgba(14,14,42,0.04);
  --shadow-lg: 0 12px 32px rgba(14,14,42,0.10), 0 4px 8px rgba(14,14,42,0.04);
  --shadow-glow: 0 0 0 4px rgba(0,180,160,0.12);

  /* Type */
  --font-sans: 'Rubik', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--ink-25);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ===========================================================
   App shell
   =========================================================== */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-100);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(8px);
  background: rgba(255,255,255,0.92);
}
.topnav-left { display: flex; align-items: center; gap: 36px; }
.topnav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--ser-navy); letter-spacing: -0.01em;
  font-size: 15px;
}
.topnav-logo .logo-dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--ser-navy) 0%, var(--ser-teal) 100%);
  position: relative;
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 12px;
  box-shadow: var(--shadow-sm);
}
.topnav-logo .logo-dot::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ser-gold);
  border: 2px solid white;
}
.topnav-logo .brand-stack { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.topnav-logo .brand-stack .brand-sub {
  font-size: 10px; font-weight: 500; color: var(--ink-400);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.topnav-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-500);
}
.topnav-crumbs a { color: var(--ink-500); text-decoration: none; }
.topnav-crumbs a:hover { color: var(--ser-navy); }
.topnav-crumbs .sep { color: var(--ink-300); }
.topnav-crumbs .current { color: var(--ink-900); font-weight: 500; }

.topnav-right { display: flex; align-items: center; gap: 12px; }
.topnav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-50); border: 1px solid transparent;
  padding: 7px 12px; border-radius: var(--r-md);
  width: 280px; font-size: 13px; color: var(--ink-500);
  transition: 0.15s;
}
.topnav-search:hover { background: var(--ink-100); }
.topnav-search:focus-within { background: white; border-color: var(--ser-teal); box-shadow: var(--shadow-glow); }
.topnav-search input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 13px; color: var(--ink-900);
}
.topnav-search .kbd {
  font-family: var(--font-mono); font-size: 10px;
  background: white; border: 1px solid var(--ink-200); border-radius: 4px;
  padding: 1px 6px; color: var(--ink-500);
}

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent;
  display: grid; place-items: center; color: var(--ink-500);
  transition: 0.15s;
}
.icon-btn:hover { background: var(--ink-50); color: var(--ser-navy); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ser-navy), var(--ser-teal));
  color: white; display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  cursor: pointer;
}

/* ===========================================================
   Buttons
   =========================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  transition: 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ser-navy); color: white;
}
.btn-primary:hover { background: var(--ser-navy-700); }
.btn-teal {
  background: var(--ser-teal); color: white;
}
.btn-teal:hover { background: var(--ser-teal-600); }
.btn-ghost {
  background: transparent; color: var(--ink-700); border-color: var(--ink-200);
}
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-soft {
  background: var(--ink-100); color: var(--ink-900);
}
.btn-soft:hover { background: var(--ink-200); }
.btn-lg { padding: 12px 20px; font-size: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon-only { padding: 9px; }

/* ===========================================================
   Pills / chips
   =========================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; }

.pill-seo     { background: rgba(0,180,160,0.10);  color: #008873; border-color: rgba(0,180,160,0.25); }
.pill-seo .pill-dot { background: var(--spec-seo); }
.pill-sea     { background: rgba(245,165,35,0.12);  color: #b37800; border-color: rgba(245,165,35,0.30); }
.pill-sea .pill-dot { background: var(--spec-sea); }
.pill-content { background: rgba(124,92,255,0.10); color: #5a3fd9; border-color: rgba(124,92,255,0.25); }
.pill-content .pill-dot { background: var(--spec-content); }
.pill-data    { background: rgba(37,99,235,0.10);  color: #1e4fb8; border-color: rgba(37,99,235,0.25); }
.pill-data .pill-dot { background: var(--spec-data); }
.pill-ai      { background: rgba(236,72,153,0.10); color: #be2470; border-color: rgba(236,72,153,0.25); }
.pill-ai .pill-dot { background: var(--spec-ai); }
.pill-neutral { background: var(--ink-100); color: var(--ink-700); }
.pill-success { background: var(--ser-teal-50); color: #008873; border-color: rgba(0,180,160,0.30); }
.pill-warn    { background: var(--ser-gold-50); color: #b37800; border-color: rgba(245,165,35,0.30); }

/* ===========================================================
   Cards
   =========================================================== */

.card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-hoverable {
  transition: 0.18s ease;
  cursor: pointer;
}
.card-hoverable:hover {
  transform: translateY(-2px);
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
}

/* ===========================================================
   Headings
   =========================================================== */

h1, h2, h3, h4 { margin: 0; color: var(--ink-900); letter-spacing: -0.02em; }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); }
p  { margin: 0; color: var(--ink-700); line-height: 1.55; }

.muted { color: var(--ink-500); }
.mono  { font-family: var(--font-mono); }

/* ===========================================================
   Form controls
   =========================================================== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-700); }
.field-hint  { font-size: 11px; color: var(--ink-400); }

.input, .textarea, .select {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink-900);
  outline: none;
  transition: 0.15s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ser-teal);
  box-shadow: var(--shadow-glow);
}
.textarea { resize: vertical; min-height: 80px; font-family: inherit; }

/* Segmented */
.segmented {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.segmented button {
  background: transparent; border: none;
  padding: 6px 14px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-500);
  transition: 0.15s;
}
.segmented button.active {
  background: white; color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

/* ===========================================================
   Page layout
   =========================================================== */

.page {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.page-narrow { max-width: 1100px; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
}
.page-title-stack { display: flex; flex-direction: column; gap: 6px; }
.page-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-400); font-weight: 600;
}
.page-subtitle { font-size: 14px; color: var(--ink-500); max-width: 640px; }

/* Divider with label */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 36px 0 16px;
}
.section-header-left { display: flex; align-items: baseline; gap: 12px; }
.section-header h2 { font-size: 16px; font-weight: 600; }
.section-header .count {
  font-size: 12px; color: var(--ink-400); font-weight: 500;
  background: var(--ink-100); padding: 1px 8px; border-radius: var(--r-pill);
}

/* ===========================================================
   Login
   =========================================================== */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-visual {
  background: var(--ser-navy);
  background-image:
    radial-gradient(at 25% 30%, rgba(0,180,160,0.35) 0%, transparent 45%),
    radial-gradient(at 80% 70%, rgba(245,165,35,0.18) 0%, transparent 50%),
    linear-gradient(180deg, var(--ser-navy-900) 0%, var(--ser-navy) 100%);
  color: white;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.login-visual > * { position: relative; z-index: 1; }
.login-visual .brand {
  display: flex; align-items: center; gap: 12px;
}
.login-visual .brand .logo-dot {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, white 0%, rgba(255,255,255,0.6) 100%);
  display: grid; place-items: center; color: var(--ser-navy);
  font-weight: 800; font-size: 14px;
  position: relative;
}
.login-visual .brand .logo-dot::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ser-gold); border: 2px solid var(--ser-navy);
}
.login-visual .brand .name { font-weight: 700; font-size: 16px; }
.login-visual .brand .sub  { font-size: 11px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.10em; }

.login-hero h1 {
  color: white; font-size: 44px; font-weight: 700;
  line-height: 1.1; max-width: 500px;
}
.login-hero h1 em {
  color: var(--ser-teal); font-style: normal;
}
.login-hero p {
  color: rgba(255,255,255,0.7); font-size: 15px; max-width: 460px; margin-top: 16px;
}

.login-tools-preview {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 32px; max-width: 460px;
}
.login-tools-preview .mini {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  display: flex; flex-direction: column; gap: 6px;
}
.login-tools-preview .mini .tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ser-teal); font-weight: 700;
}

.login-foot { font-size: 12px; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; }

.login-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--paper);
}
.login-form {
  width: 100%; max-width: 360px;
}
.login-form h2 { font-size: 24px; margin-bottom: 6px; }
.login-form .lead { font-size: 14px; color: var(--ink-500); margin-bottom: 28px; }
.login-form .pw-input {
  position: relative;
}
.login-form .pw-input .toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--ink-400);
  padding: 4px;
}
.login-form .submit-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--ser-navy);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: 0.15s;
}
.login-form .submit-btn:hover { background: var(--ser-navy-700); }
.login-form .helper {
  margin-top: 24px; font-size: 12px; color: var(--ink-400);
  text-align: center;
}
.login-form .err {
  background: #fdecea; color: var(--err); border: 1px solid rgba(229,57,53,0.3);
  padding: 10px 12px; border-radius: var(--r-md); font-size: 12px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ===========================================================
   Tool grid
   =========================================================== */

.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-bar .filter-chip {
  background: white; border: 1px solid var(--ink-200);
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 13px; color: var(--ink-700); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: 0.15s;
}
.filter-bar .filter-chip:hover { border-color: var(--ink-300); background: var(--ink-25); }
.filter-bar .filter-chip.active {
  background: var(--ser-navy); color: white; border-color: var(--ser-navy);
}
.filter-bar .filter-chip .count {
  font-size: 11px; color: var(--ink-400);
}
.filter-bar .filter-chip.active .count { color: rgba(255,255,255,0.6); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: 0.18s ease;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
}
.tool-card .accent-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  opacity: 0.85;
}
.tool-card.t-seo     .accent-bar { background: var(--spec-seo); }
.tool-card.t-sea     .accent-bar { background: var(--spec-sea); }
.tool-card.t-content .accent-bar { background: var(--spec-content); }
.tool-card.t-data    .accent-bar { background: var(--spec-data); }
.tool-card.t-ai      .accent-bar { background: var(--spec-ai); }

.tool-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.tool-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
  color: white;
}
.tool-card.t-seo     .tool-icon { background: var(--spec-seo); }
.tool-card.t-sea     .tool-icon { background: var(--spec-sea); }
.tool-card.t-content .tool-icon { background: var(--spec-content); }
.tool-card.t-data    .tool-icon { background: var(--spec-data); }
.tool-card.t-ai      .tool-icon { background: var(--spec-ai); }

.tool-card h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tool-card .desc {
  font-size: 13px; color: var(--ink-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--ink-400);
  margin-top: auto;
}
.tool-card-foot .meta { display: flex; align-items: center; gap: 12px; }
.tool-card-foot .meta span { display: inline-flex; align-items: center; gap: 4px; }

.fav-btn {
  background: transparent; border: none; padding: 4px;
  color: var(--ink-300);
  transition: 0.15s;
}
.fav-btn:hover { color: var(--ser-gold); }
.fav-btn.active { color: var(--ser-gold); }

/* Recent strip */
.recent-strip {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 4px;
  scrollbar-width: thin;
}
.recent-card {
  flex: 0 0 auto; min-width: 240px;
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: 0.15s;
}
.recent-card:hover { border-color: var(--ink-200); box-shadow: var(--shadow-sm); }
.recent-card .tool-icon-sm {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: white; font-size: 14px;
}
.recent-card .stack { display: flex; flex-direction: column; gap: 2px; }
.recent-card .stack .name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.recent-card .stack .when { font-size: 11px; color: var(--ink-400); }

/* ===========================================================
   Tool detail page (SEO A/B Platform)
   =========================================================== */

.tool-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.tool-header-left { display: flex; gap: 16px; align-items: flex-start; }
.tool-header .tool-icon-lg {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; color: white; font-size: 24px;
  flex-shrink: 0;
}
.tool-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.tool-header .meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.tool-header .desc { font-size: 14px; color: var(--ink-500); max-width: 720px; margin-top: 8px; }
.tool-header-actions { display: flex; gap: 8px; }

/* Stepper */
.stepper {
  display: flex; align-items: center; gap: 0;
  background: white; border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.step {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  transition: 0.15s;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
}
.step:hover { background: var(--ink-25); }
.step.active { background: var(--ser-navy); }
.step.active .step-num { background: var(--ser-teal); color: white; }
.step.active .step-title { color: white; }
.step.active .step-sub { color: rgba(255,255,255,0.6); }
.step.complete .step-num { background: var(--ser-teal-50); color: var(--ser-teal-600); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink-100); color: var(--ink-500);
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.step-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.step-title { font-size: 13px; font-weight: 600; color: var(--ink-900); white-space: nowrap; }
.step-sub   { font-size: 11px; color: var(--ink-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-sep { color: var(--ink-200); font-size: 14px; padding: 0 4px; flex-shrink: 0; }

/* Two-column working area */
.work-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.work-side { display: flex; flex-direction: column; gap: 16px; }
.work-main { display: flex; flex-direction: column; gap: 20px; }

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

.panel {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-100);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head h3 { font-size: 14px; }
.panel-body { padding: 18px; }

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.kpi .lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-400); font-weight: 600; margin-bottom: 8px;
}
.kpi .val {
  font-size: 26px; font-weight: 700; color: var(--ink-900);
  letter-spacing: -0.02em; line-height: 1;
}
.kpi .delta {
  font-size: 12px; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 600;
}
.kpi .delta.up   { color: var(--ok); }
.kpi .delta.down { color: var(--err); }

/* Table */
.table-wrap { overflow: auto; border-radius: var(--r-md); }
table.data {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  text-align: left; font-weight: 600; color: var(--ink-500);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 10px 14px;
  background: var(--ink-25);
  border-bottom: 1px solid var(--ink-100);
}
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-900);
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--ink-25); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Chart placeholder */
.chart {
  background: linear-gradient(180deg, white 0%, var(--ink-25) 100%);
  border: 1px dashed var(--ink-200);
  border-radius: var(--r-md);
  height: 240px;
  position: relative;
  overflow: hidden;
}
.chart svg { width: 100%; height: 100%; display: block; }

/* Verdict box */
.verdict {
  background: linear-gradient(135deg, var(--ser-navy) 0%, var(--ser-navy-900) 100%);
  color: white;
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.verdict-big {
  font-size: 48px; font-weight: 800; line-height: 1;
  color: var(--ser-teal);
  letter-spacing: -0.02em;
}
.verdict-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255,255,255,0.5); font-weight: 600; margin-bottom: 10px;
}
.verdict h2 { color: white; font-size: 22px; margin-bottom: 6px; }
.verdict p  { color: rgba(255,255,255,0.7); font-size: 13px; }

/* File upload area */
.upload-zone {
  border: 2px dashed var(--ink-200);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
  background: var(--ink-25);
  transition: 0.15s;
  cursor: pointer;
}
.upload-zone:hover {
  border-color: var(--ser-teal); background: var(--ser-teal-50);
}
.upload-zone .icon { font-size: 28px; color: var(--ink-300); margin-bottom: 8px; }
.upload-zone .ttl  { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.upload-zone .sub  { font-size: 11px; color: var(--ink-400); margin-top: 4px; }

/* Progress bar */
.bar { height: 6px; background: var(--ink-100); border-radius: var(--r-pill); overflow: hidden; }
.bar > div { height: 100%; background: var(--ser-teal); border-radius: var(--r-pill); transition: width 0.3s; }

/* Code-ish output block */
.output-block {
  background: var(--ser-navy-900); color: #c5c8e0;
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-family: var(--font-mono); font-size: 12px;
  line-height: 1.6;
  max-height: 220px; overflow: auto;
}
.output-block .ok { color: var(--ser-teal); }
.output-block .warn { color: var(--ser-gold); }
.output-block .err { color: #ff6b6b; }
.output-block .dim { color: #6b6e8c; }

/* Stat row in verdict */
.verdict-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.verdict-stats .vs {
  display: flex; flex-direction: column; gap: 2px;
}
.verdict-stats .vs .l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); font-weight: 600; }
.verdict-stats .vs .v { font-size: 16px; font-weight: 700; color: white; }

/* Misc helpers */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 6px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 20px; }

/* Scrollbar */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }
*::-webkit-scrollbar-track { background: transparent; }

/* Tweaks-controlled body class */
body.density-compact .page { padding-top: 20px; }
body.density-compact .tool-card { padding: 14px; }
body.density-compact .panel-body { padding: 14px; }
body.density-compact .topnav { padding: 10px 24px; }

/* Subtle entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.35s ease both; }
