/*
 * owapps.css — Unified stylesheet for Owapps AI
 * Covers: index.html (marketing site) + csv_analyzer.php (CSV tool)
 *
 * Structure
 * ─────────────────────────────────────────────────────────────
 *  1. CSS Custom Properties (design tokens)
 *  2. Reset & Base
 *  3. Typography
 *  4. Noise overlay
 *  5. Scrollbar
 *  6. Shared utility classes (.fade-up, .section-label, etc.)
 *  7. Shared form controls (.form-control, .form-select, etc.)
 *  8. Shared buttons (.btn, .btn-primary-cta, .btn-submit, etc.)
 *  9. Shared accordion
 * 10. Shared footer & toast
 * 11. ── index.html only ──
 *     Navbar, Hero, Services, How-it-works, Industries,
 *     Contact section, Marketing footer
 * 12. ── csv_analyzer.php only ──
 *     App header, Upload zone, Overview cards, Column grid,
 *     Data preview table, Qualification section, CTA section,
 *     Tool footer
 * ─────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════ */
:root {
  /* ── Shared palette ── */
  --midnight:     #080c14;   /* darkest background (index) */
  --deep-navy:    #0d1526;   /* section alternating bg (index) */
  --panel:        #111d35;   /* card / panel bg (index) */
  --panel-border: #1e304f;   /* border colour (index) */

  --bg:           #0c0c10;   /* darkest background (csv tool) */
  --surface:      #14141a;   /* slightly lifted surface (csv tool) */
  --card:         #1c1c26;   /* card bg (csv tool) */
  --border:       #2a2a38;   /* border colour (csv tool) */

  /* ── Accent colours ── */
  /* index.html uses teal; csv tool uses mint-green — both coexist */
  --accent:       #00e5c0;   /* primary accent (index) */
  --accent-dim:   #00b898;   /* darker teal hover (index) */
  --accent-glow:  rgba(0, 229, 192, 0.15);

  --csv-accent:   #5fffb0;   /* primary accent (csv tool) */
  --csv-accent2:  #ff6b6b;   /* danger / warning (csv tool) */
  --csv-accent3:  #60b4ff;   /* info / categorical (csv tool) */
  --csv-accent4:  #ffcc55;   /* date / warning-light (csv tool) */

  --warm:         #f5c842;   /* warm highlight (index) */

  /* ── Text ── */
  --white:        #f0f6ff;
  --text:         #c8d6ef;   /* primary text (index) */
  --text-muted:   #6b85ad;   /* muted text (index) */
  --csv-text:     #e8e8f0;   /* primary text (csv tool) */
  --csv-muted:    #7070a0;   /* muted text (csv tool) */

  /* ── Typography ── */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* ── Radii ── */
  --radius:       12px;
}


/* ═══════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* index.html body */
body.site {
  background: var(--midnight);
  color: var(--text);
}

/* csv_analyzer.php body */
body.tool {
  background: var(--bg);
  color: var(--csv-text);
  font-family: var(--font-display);
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-display);
  color: var(--white);
}


/* ═══════════════════════════════════════════════════════
   4. NOISE OVERLAY (shared pattern, different opacity)
   ═══════════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body.tool::before {
  opacity: .025; /* tool page uses slightly lower opacity */
}


/* ═══════════════════════════════════════════════════════
   5. SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ═══════════════════════════════════════════════════════
   6. SHARED UTILITY CLASSES
   ═══════════════════════════════════════════════════════ */

/* Sections sit above the noise overlay */
section { position: relative; z-index: 1; }

/* ── Fade-up scroll animation (index.html) ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card fade-in animation (csv tool) ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section eyebrow labels ── */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Small all-caps label used in the csv tool */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--csv-muted);
  margin-bottom: 18px;
}

/* ── Section titles ── */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 580px;
}

/* ── Centered content wrapper (csv tool) ── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}


/* ═══════════════════════════════════════════════════════
   7. SHARED FORM CONTROLS
   ═══════════════════════════════════════════════════════ */
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  background: var(--midnight);
  border: 1px solid var(--panel-border);
  color: var(--white);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
  background: var(--midnight);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.12);
  color: var(--white);
}

.form-control::placeholder { color: var(--text-muted); }

.form-select option { background: var(--deep-navy); }


/* ═══════════════════════════════════════════════════════
   8. SHARED BUTTONS
   ═══════════════════════════════════════════════════════ */

/* ── Base button (csv tool) ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--csv-accent);
  color: #0c1a14;
}
.btn-primary:hover { box-shadow: 0 0 24px #5fffb055; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--csv-muted);
}
.btn-ghost:hover { border-color: var(--csv-accent3); color: var(--csv-accent3); }

/* ── Marketing CTA buttons (index.html) ── */
.btn-primary-cta {
  background: var(--accent);
  color: var(--midnight);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: none;
  letter-spacing: 0.02em;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-primary-cta:hover {
  background: var(--accent-dim);
  color: var(--midnight);
  box-shadow: 0 0 40px rgba(0, 229, 192, 0.3);
  transform: translateY(-2px);
}

.btn-secondary-cta {
  background: transparent;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  letter-spacing: 0.02em;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.btn-secondary-cta:hover {
  background: var(--panel);
  color: var(--white);
  border-color: var(--accent);
}

/* ── Form submit button (index.html contact) ── */
.btn-submit {
  background: var(--accent);
  color: var(--midnight);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 8px;
  width: 100%;
  letter-spacing: 0.02em;
  transition: all 0.25s;
}
.btn-submit:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 30px rgba(0, 229, 192, 0.25);
}

/* ── Navbar CTA button (index.html) ── */
.btn-nav {
  background: var(--accent);
  color: var(--midnight) !important;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.45rem 1.2rem !important;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-nav:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}


/* ═══════════════════════════════════════════════════════
   9. SHARED ACCORDION (index.html FAQ)
   ═══════════════════════════════════════════════════════ */
.accordion-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-button {
  background: var(--panel);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: none !important;
  letter-spacing: -0.01em;
}

.accordion-button:not(.collapsed) {
  background: var(--panel);
  color: var(--accent);
}

.accordion-button::after {
  filter: invert(1) brightness(0.6);
}

.accordion-button:not(.collapsed)::after {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(120deg);
}

.accordion-body {
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--panel-border);
}


/* ═══════════════════════════════════════════════════════
   10. SHARED FOOTER PATTERNS & TOAST
   ═══════════════════════════════════════════════════════ */

/* ── Toast notification (index.html) ── */
#successToast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--white);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
#successToast i { color: var(--accent); font-size: 1.2rem; }
#successToast.fail { border-color: #ff4d6d; }
#successToast.fail i { color: #ff4d6d; }


/* ═══════════════════════════════════════════════════════
   11. INDEX.HTML — MARKETING SITE
   ═══════════════════════════════════════════════════════ */

/* ── Navbar ── */
.navbar {
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white) !important;
  letter-spacing: -0.03em;
}
.navbar-brand span { color: var(--accent); }

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 1rem !important;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent) !important; }

.navbar-toggler { border-color: var(--panel-border); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(200,214,239,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--panel-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
}

.hero-glow {
  position: absolute;
  top: -160px;
  right: -160px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 229, 192, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -200px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 229, 192, 0.1);
  border: 1px solid rgba(0, 229, 192, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero-title .accent-word { color: var(--accent); }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--panel-border);
}

.stat-item .stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ── Services ── */
#services { padding: 7rem 0; background: var(--deep-navy); }

.service-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 2rem;
  height: 100%;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 192, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 229, 192, 0.1);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.service-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.65;
}

.service-tag {
  display: inline-block;
  background: rgba(0, 229, 192, 0.08);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

/* ── How it works ── */
#how-it-works { padding: 7rem 0; background: var(--midnight); }

.step-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: #495664;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.step-connector {
  position: absolute;
  top: 2rem;
  right: -50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--panel-border), transparent);
}

/* ── Industries ── */
#industries { padding: 6rem 0; background: var(--deep-navy); }

.industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin: 0.3rem;
  transition: all 0.2s;
  cursor: default;
}
.industry-pill:hover { border-color: var(--accent); color: var(--accent); }
.industry-pill i { color: var(--accent); font-size: 1rem; }

/* ── FAQ ── */
#faq { padding: 7rem 0; background: var(--midnight); }

/* ── Contact ── */
#contact { padding: 7rem 0; background: var(--deep-navy); }

.contact-wrapper {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
}

.contact-info {
  background: linear-gradient(135deg, #0a1929 0%, #0d2040 100%);
  padding: 3rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.contact-info::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(0, 229, 192, 0.12) 0%, transparent 70%);
}

.contact-form-panel { padding: 3rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
}

.contact-item-text small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-item-text span {
  font-size: 0.95rem;
  color: var(--white);
}

/* ── Marketing footer ── */
footer.site-footer {
  background: var(--midnight);
  border-top: 1px solid var(--panel-border);
  padding: 3rem 0 2rem;
}

.footer-brand {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.footer-brand span { color: var(--accent); }

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  display: block;
  margin-bottom: 0.4rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--panel-border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════
   12. CSV_ANALYZER.PHP — TOOL PAGE
   ═══════════════════════════════════════════════════════ */

/* ── App header ── */
header.tool-header {
  padding: 56px 0 40px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  width: 52px; height: 52px; flex-shrink: 0;
  background: var(--csv-accent);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: grid; place-items: center;
}
.logo-mark svg { width: 26px; height: 26px; }

header.tool-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
}
header.tool-header h1 span { color: var(--csv-accent); }
header.tool-header p { color: var(--csv-muted); font-size: .9rem; margin-top: 2px; }

/* ── Upload zone ── */
.upload-section { padding: 48px 0 40px; }

.upload-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 56px 32px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--surface);
  position: relative;
}
.upload-label:hover      { border-color: var(--csv-accent); background: #14141e; }
.upload-label.drag-over  { border-color: var(--csv-accent); background: #0f2a1e; }

.upload-icon {
  width: 56px; height: 56px;
  background: #1e2e28; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--csv-accent);
}

.upload-title { font-size: 1.15rem; font-weight: 700; }
.upload-sub   { color: var(--csv-muted); font-size: .85rem; }

#csv-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.submit-row { display: flex; gap: 12px; margin-top: 20px; align-items: center; }

.filename-badge {
  font-family: var(--font-mono);
  font-size: .8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  color: var(--csv-accent3);
  display: none;
}

.error-box {
  background: #2a1010;
  border: 1px solid var(--csv-accent2);
  border-radius: var(--radius);
  padding: 18px 24px;
  color: var(--csv-accent2);
  font-size: .9rem;
  margin-bottom: 32px;
  display: flex; gap: 12px; align-items: flex-start;
}

/* ── Overview cards ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.ov-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.ov-card::after      { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--csv-accent); }
.ov-card.c2::after   { background: var(--csv-accent3); }
.ov-card.c3::after   { background: var(--csv-accent2); }
.ov-card.c4::after   { background: #c084fc; }

.ov-val { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.ov-key { font-size: .8rem; color: var(--csv-muted); }

/* ── Column grid ── */
.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.col-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeUp .4s ease both;
}

.col-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.col-name {
  font-size: .95rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 240px;
}

.type-badge {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500;
  padding: 3px 10px; border-radius: 20px; flex-shrink: 0;
}
.type-num  { background: #0f2a1e; color: var(--csv-accent);  border: 1px solid #2a5a3e; }
.type-cat  { background: #0f1e2e; color: var(--csv-accent3); border: 1px solid #2a3e5e; }
.type-date { background: #1e180a; color: var(--csv-accent4); border: 1px solid #5a4a1e; }

/* ── Date timeline bar ── */
.date-timeline { margin-top: 16px; }
.date-tl-bars  { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.date-tl-bar   {
  flex: 1; background: var(--csv-accent4);
  border-radius: 2px 2px 0 0;
  opacity: .7; transition: opacity .2s;
  position: relative; min-width: 4px;
}
.date-tl-bar:hover { opacity: 1; }
.date-tl-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: .65rem; color: var(--csv-muted); margin-top: 4px;
}

.date-range-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 10px 12px;
  background: #1a160a; border: 1px solid #3a3010;
  border-radius: 8px; font-size: .8rem;
}
.date-range-arrow { color: var(--csv-accent4); font-size: .9rem; flex-shrink: 0; }
.date-range-val   { font-family: var(--font-mono); color: var(--csv-accent4); }
.date-span-badge  {
  margin-left: auto; font-family: var(--font-mono); font-size: .7rem;
  color: var(--csv-muted); white-space: nowrap;
}

/* ── Column body / stat rows ── */
.col-body { padding: 18px 20px; }

.stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid #1e1e28; font-size: .875rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-key { color: var(--csv-muted); }
.stat-val { font-family: var(--font-mono); font-size: .85rem; }
.stat-val.hi   { color: var(--csv-accent); }
.stat-val.warn { color: var(--csv-accent2); }

/* ── Histogram ── */
.histogram   { margin-top: 16px; }
.hist-bars   { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.hist-bar    {
  flex: 1; background: var(--csv-accent);
  border-radius: 3px 3px 0 0; opacity: .75; transition: opacity .2s;
}
.hist-bar:hover { opacity: 1; }
.hist-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: .65rem; color: var(--csv-muted); margin-top: 4px;
}

/* ── Categorical bars ── */
.cat-bars  { margin-top: 14px; }
.cat-row   { margin-bottom: 8px; }
.cat-label { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 3px; }
.cat-label-name {
  color: var(--csv-text); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 70%;
}
.cat-label-cnt { font-family: var(--font-mono); color: var(--csv-muted); }
.cat-track { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.cat-fill  { height: 100%; background: var(--csv-accent3); border-radius: 4px; transition: width .6s ease; }

/* ── Missing value bar ── */
.miss-bar  {
  display: flex; height: 5px; border-radius: 4px;
  overflow: hidden; margin-top: 10px; background: var(--border);
}
.miss-fill { height: 100%; background: var(--csv-accent2); }

/* ── Data preview table ── */
.preview-section { margin-bottom: 60px; }
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
thead { background: var(--surface); }
th {
  padding: 12px 16px; text-align: left;
  font-weight: 700; font-size: .75rem; letter-spacing: .06em;
  color: var(--csv-muted); white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 16px; border-bottom: 1px solid #1a1a24;
  font-family: var(--font-mono); font-size: .8rem;
  white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #1e1e2a; }

/* ── Data qualification section ── */
.qual-section { margin-bottom: 60px; }

.qual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.qual-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.qual-card:hover { transform: translateY(-2px); }
.qual-card.top-pick {
  border-color: var(--csv-accent);
  box-shadow: 0 0 28px #5fffb022;
}
.qual-card.top-pick::before {
  content: 'Best Match';
  position: absolute; top: 12px; right: 14px;
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--csv-accent);
  background: #0f2a1e;
  padding: 3px 8px; border-radius: 20px;
  border: 1px solid #2a5a3e;
}

.qual-icon { font-size: 1.6rem; margin-bottom: 10px; line-height: 1; }
.qual-task {
  font-size: .85rem; font-weight: 700; color: var(--csv-muted);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em;
}

/* ── Score ring ── */
.score-ring-wrap { display: flex; align-items: center; gap: 14px; }
.score-ring { position: relative; width: 62px; height: 62px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring-bg   { fill: none; stroke: var(--border); stroke-width: 5; }
.score-ring-fill { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-ring-num  {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; font-family: var(--font-mono);
}
.score-detail { flex: 1; }
.score-label   { font-size: .78rem; color: var(--csv-muted); }
.score-verdict { font-size: .85rem; font-weight: 700; margin-top: 2px; }
.score-verdict.good   { color: var(--csv-accent);  }
.score-verdict.medium { color: var(--csv-accent4); }
.score-verdict.low    { color: var(--csv-accent2); }

/* ── Evidence panels (signals / issues) ── */
.qual-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
@media (max-width: 680px) { .qual-evidence { grid-template-columns: 1fr; } }

.ev-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.ev-panel h4 {
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px;
}
.ev-panel.signals h4 { color: var(--csv-accent);  }
.ev-panel.issues  h4 { color: var(--csv-accent2); }

.ev-item {
  display: flex; gap: 10px;
  font-size: .82rem; padding: 8px 0;
  border-bottom: 1px solid #1e1e28; line-height: 1.5;
}
.ev-item:last-child { border-bottom: none; padding-bottom: 0; }
.ev-icon { flex-shrink: 0; font-style: normal; width: 18px; text-align: center; }
.ev-text { color: var(--csv-text); }
.no-ev   { color: var(--csv-muted); font-size: .82rem; font-style: italic; }

/* ── Tool CTA section ── */
.cta-section {
  margin-bottom: 60px;
  background: linear-gradient(135deg, #0f2a1e 0%, #0f1828 60%, #1a0f28 100%);
  border: 1px solid var(--csv-accent);
  border-radius: 18px;
  padding: 48px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, #5fffb012 0%, transparent 60%);
  pointer-events: none;
}
.cta-section::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, #5fffb018 0%, transparent 70%);
  pointer-events: none;
}
.cta-left  { flex: 1; position: relative; z-index: 1; }
.cta-right {
  flex-shrink: 0; display: flex; flex-direction: column;
  gap: 12px; align-items: flex-end; position: relative; z-index: 1;
}

.cta-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--csv-accent); margin-bottom: 12px;
}
.cta-headline {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 800; line-height: 1.25;
  margin-bottom: 16px; letter-spacing: -.02em;
}
.cta-headline em { color: var(--csv-accent); font-style: normal; }
.cta-body { color: #b0b8d0; font-size: .9rem; line-height: 1.6; max-width: 480px; }

.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px;
  background: var(--csv-accent); color: #0c1a14;
  border-radius: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  white-space: nowrap;
}
.cta-btn:hover  { box-shadow: 0 0 32px #5fffb066; transform: translateY(-2px); }
.cta-btn:active { transform: scale(.97); }

.cta-secondary { color: var(--csv-muted); font-size: .78rem; text-align: right; }
.cta-secondary a { color: var(--csv-accent3); text-decoration: none; }
.cta-secondary a:hover { text-decoration: underline; }

.cta-tasks-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cta-task-chip {
  font-size: .75rem; font-weight: 700;
  background: #0a1a12; border: 1px solid #2a5a3e;
  color: var(--csv-accent); border-radius: 20px; padding: 4px 12px;
}

@media (max-width: 700px) {
  .cta-section { flex-direction: column; padding: 32px 24px; }
  .cta-right   { align-items: flex-start; }
  .cta-secondary { text-align: left; }
}

/* ── Tool footer ── */
footer.tool-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--csv-muted);
  font-size: .82rem;
}
footer.tool-footer strong { color: var(--csv-text); }
