/* TableXtract design system
   Swiss / International Typographic Style - hard grid, grotesque type, a single
   restrained amber accent. Square corners throughout, flat offset shadow only.
   Transcribed from the chosen prototype (design-system.md). */

:root {
  --primary: #0b1c2c;
  --secondary: #111827;
  --accent: #d97706;
  --background: #f2f4f7;
  --surface: #ffffff;
  --text: #111827;
  --muted: #4b5e71;
  --border: #d1d9e4;
  --border-strong: #0b1c2c;
  --section-alt: #eef2f7;
  --sidebar-bg: #f8fafc;
  --dropzone-border: #94a3b8;
  --status-done-text: #1c7c4d;  --status-done-bg: #e6f4ed;
  --status-processing-text: #2b5bb0; --status-processing-bg: #e8effa;
  --status-queued-text: #475569;  --status-queued-bg: #f1f5f9;
  --status-no_tables-text: #b66b1c; --status-no_tables-bg: #fdf4e7;
  --status-failed-text: #b02b2b; --status-failed-bg: #faeaea;
  --status-expired-text: #475569; --status-expired-bg: #e2e8f0;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 16px;
}

.font-mono, .eyebrow, .quota-chip, .step-num, .status-badge {
  font-family: 'IBM Plex Mono', monospace;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Grid frame - strict column container */
.grid-frame { max-width: 72rem; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.grid-frame.narrow { max-width: 48rem; }

/* Hard rules */
.rule-b { border-bottom: 1px solid var(--border-strong); }
.rule-t { border-top: 1px solid var(--border); }
.rule-l { border-left: 1px solid var(--border); }

/* Elevation - flat offset, no blur */
.shadow-hard { box-shadow: 4px 4px 0 0 #e5eaf0; }

/* Focus - amber outline */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: all .1s ease;
}
.btn:hover { background-color: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-lg { padding: 0.75rem 1.5rem; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--secondary); }
.btn-outline { border-color: var(--border-strong); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-inverse { border: 1px solid rgba(255,255,255,0.3); color: #fff; }
.btn-inverse:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border-strong); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0.75rem; padding-bottom: 0.75rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; color: var(--primary); }
.logo-mark { flex: 0 0 auto; }
.site-nav { display: none; align-items: center; gap: 1.5rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
@media (min-width: 768px) { .site-nav { display: flex; } }
.nav-link:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); padding: 0.25rem 0.6rem; font-size: 1rem; cursor: pointer; color: var(--primary); }
@media (min-width: 768px) { .nav-toggle { display: none; } }
.mobile-nav { border-top: 1px solid var(--border); padding: 0.5rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; background: var(--surface); }
.mobile-nav-link { padding: 0.4rem 0; font-size: 0.9rem; color: var(--muted); }
.mobile-nav-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.mobile-nav-actions .btn { flex: 1; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.h1 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 1rem; }
.h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.h2-margin { margin-top: 0.25rem; margin-bottom: 2rem; }
.h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin: 0; }

/* ---------- Hero ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--border-strong); }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; align-items: center; }
@media (min-width: 768px) { .hero-inner { grid-template-columns: 1fr 1fr; gap: 3rem; padding-top: 5rem; padding-bottom: 5rem; } }
.hero-headline { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 1.5rem; max-width: 32rem; }
@media (min-width: 768px) { .hero-headline { font-size: 2.5rem; } }
.hero-subhead { font-size: 1.125rem; color: var(--muted); margin: 0 0 2rem; max-width: 26rem; }
.hero-ctas { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }
.trust-line { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0; font-size: 0.75rem; color: var(--muted); }
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #2b6e4f; display: inline-block; }
.hero-media img { width: 100%; border: 1px solid #e5eaf0; }

/* ---------- Sections ---------- */
.section { background: var(--surface); border-bottom: 1px solid var(--border-strong); padding: 4rem 0; }
.section-alt { background: var(--section-alt); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.quota-chip {
  font-size: 0.75rem; background: var(--surface); border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
}

/* ---------- App shell (dashboard preview) ---------- */
.app-shell { display: flex; flex-direction: column; border: 1px solid #cbd5e1; background: var(--surface); box-shadow: 4px 4px 0 0 #e5eaf0; }
@media (min-width: 768px) { .app-shell { flex-direction: row; } }
.sidebar { width: 100%; background: var(--sidebar-bg); border-bottom: 1px solid #e2e8f0; padding: 1rem; }
@media (min-width: 768px) { .sidebar { width: 12rem; border-bottom: none; border-right: 1px solid #e2e8f0; } }
.sidebar-nav { display: flex; flex-direction: row; gap: 0.25rem; font-size: 0.875rem; }
@media (min-width: 768px) { .sidebar-nav { flex-direction: column; } }
.sidebar-link { display: block; padding: 0.5rem 0.75rem; border-radius: 0.125rem; color: var(--muted); }
.sidebar-link:hover { background: var(--section-alt); }
.sidebar-link.active { background: var(--primary); color: #fff; font-weight: 500; }
.sidebar-meta { display: none; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; font-size: 0.75rem; color: var(--muted); }
@media (min-width: 768px) { .sidebar-meta { display: block; } }
.sidebar-meta p { margin: 0.25rem 0; }
.main-panel { flex: 1; padding: 1rem; }
@media (min-width: 640px) { .main-panel { padding: 1.5rem; } }

.dropzone { border: 2px dashed var(--dropzone-border); background: var(--sidebar-bg); padding: 1.5rem; text-align: center; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.dropzone-title { font-size: 0.875rem; font-weight: 500; color: var(--primary); }
.dropzone-hint { font-size: 0.75rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table.job-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.job-table th, table.job-table td { padding: 0.75rem 0.5rem; vertical-align: middle; text-align: left; }
table.job-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; color: var(--muted); border-bottom: 1px solid #e2e8f0; }
table.job-table tbody tr { border-bottom: 1px solid #eef2f7; }
table.job-table tbody tr:last-child { border-bottom: none; }
.row-expired { opacity: 0.6; }
.cell-file { font-weight: 500; }
.cell-muted { color: var(--muted); }
.cell-action { text-align: right; white-space: nowrap; }
.action-download { color: var(--accent); font-weight: 500; }
.action-download:hover { text-decoration: underline; }
.action-muted { color: var(--muted); font-size: 0.75rem; }
.action-muted a:hover, a.action-muted:hover { text-decoration: underline; }

.status-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 600; padding: 0.125rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.status-done { background: var(--status-done-bg); color: var(--status-done-text); }
.status-processing { background: var(--status-processing-bg); color: var(--status-processing-text); }
.status-queued { background: var(--status-queued-bg); color: var(--status-queued-text); }
.status-no_tables { background: var(--status-no_tables-bg); color: var(--status-no_tables-text); }
.status-failed { background: var(--status-failed-bg); color: var(--status-failed-text); }
.status-expired { background: var(--status-expired-bg); color: var(--status-expired-text); }

.table-footnote { margin: 1rem 0 0; padding-top: 0.75rem; border-top: 1px solid #e2e8f0; font-size: 0.75rem; color: var(--muted); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border-top: 2px solid var(--primary); padding-top: 1rem; }
.step-num { font-size: 0.875rem; color: var(--accent); }
.step h3 { margin-top: 0.5rem; }
.step-body { font-size: 0.875rem; color: var(--muted); margin: 0.25rem 0 0; }
.feature-callout { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; margin-top: 3rem; }
@media (min-width: 768px) { .feature-callout { grid-template-columns: 1fr 1fr; } }
.feature-callout img { width: 100%; border: 1px solid #e5eaf0; }
.feature-heading { margin-bottom: 0.5rem; }
.feature-body { color: var(--muted); margin: 0; }

/* ---------- Pricing ---------- */
.pricing-intro { color: var(--muted); max-width: 36rem; margin: 0.5rem 0 2.5rem; }
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 48rem; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
.pricing-card { position: relative; background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; display: flex; flex-direction: column; }
.pricing-pro { border: 2px solid var(--accent); }
.pricing-badge { position: absolute; top: -0.75rem; left: 1rem; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 0.125rem 0.5rem; }
.pricing-price { font-size: 1.875rem; font-weight: 600; margin: 0.5rem 0 1rem; }
.pricing-period { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-bullets { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.5rem; }
.bullet-check { color: var(--status-done-text); margin-right: 0.5rem; font-weight: 600; }
.pricing-card .btn { margin-top: auto; }
.pricing-footnote { margin: 1.5rem 0 0; font-size: 0.75rem; color: var(--muted); max-width: 36rem; }

/* ---------- Legal ---------- */
.legal-body { color: var(--muted); max-width: 42rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #fff; }
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer .brand { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: rgba(255,255,255,0.7); }
@media (min-width: 640px) { .footer-links { flex-direction: row; gap: 1rem; } }
.footer-link:hover { color: #fff; }
