/* =============================================
   Screenly — Main Stylesheet
   Theme: Light editorial — clean, large type, high contrast
   Fonts: Playfair Display (display), Lato (body), JetBrains Mono (code)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Lato:wght@300;400;700;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f7f5f0;
  --bg-card: #ffffff;
  --bg-card-hover: #faf9f7;
  --bg-subtle: #f0ede6;
  --border: #e2ddd5;
  --border-dark: #c8c0b4;
  --text: #1a1714;
  --text-muted: #6b6460;
  --text-dim: #b0a89e;
  --accent: #c0392b;
  --accent-light: rgba(192, 57, 43, 0.08);
  --accent2: #2c3e50;
  --success: #1a7a4a;
  --success-light: rgba(26, 122, 74, 0.08);
  --warning: #b7770d;
  --warning-light: rgba(183, 119, 13, 0.08);
  --danger: #c0392b;
  --danger-light: rgba(192, 57, 43, 0.08);
  --score-ats: #2980b9;
  --score-content: #8e44ad;
  --score-overall: #1a7a4a;
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lift: 0 4px 16px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }
.hidden { display: none !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); opacity: 1; }

/* ── HERO ── */
.hero {
  padding-top: 128px;
  padding-bottom: 16px;
  text-align: center;
  background: var(--bg);
  position: relative;
}

/* Subtle ruled-paper texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    var(--border) 31px,
    var(--border) 32px
  );
  opacity: 0.18;
  pointer-events: none;
}

.hero-bg-grid { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 4px;
  border: 1px solid var(--border-dark);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 28px;
  background: var(--bg-card);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 24px;
}

.title-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── UPLOAD SECTION ── */
.upload-section { padding: 40px 24px 64px; }

.upload-container {
  max-width: 620px;
  margin: 0 auto;
}

.dropzone {
  background: var(--bg-card);
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius);
  padding: 52px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
}

.dropzone::before { display: none; }

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  border-style: solid;
  box-shadow: var(--shadow-lift);
  background: var(--bg-card-hover);
}

.dropzone-inner { position: relative; z-index: 1; }

.dropzone-icon {
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.dropzone-primary {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.dropzone-secondary {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 24px;
}

.upload-btn {
  display: inline-block;
  padding: 13px 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: 0.02em;
}

.upload-btn:hover {
  background: #a93226;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.3);
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 16px;
  font-family: var(--font-mono);
}

/* Selected state */
.dropzone-selected { position: relative; z-index: 1; }

.selected-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--success-light);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.selected-filename {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 500;
}

.analyze-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 44px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  letter-spacing: 0.02em;
}

.analyze-btn:hover:not(:disabled) {
  background: #a93226;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.3);
}

.analyze-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.reselect-btn {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
}

/* Trust row */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── ANALYZING SECTION ── */
.analyzing-section { padding: 64px 24px; }

.analyzing-container {
  max-width: 480px;
  margin: 0 auto;
}

.analysis-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.analysis-step {
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0.25;
  transition: opacity 0.4s ease;
}

.analysis-step.active { opacity: 1; }
.analysis-step.done { opacity: 0.6; }

.step-indicator {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border-dark);
  transition: all 0.3s ease;
  position: relative;
  background: var(--bg-card);
}

.step-indicator.loading {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.75s linear infinite;
}

.step-indicator.done {
  border-color: var(--success);
  background: var(--success);
}

.step-indicator.done::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

@keyframes spin { to { transform: rotate(360deg); } }

.step-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.step-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── RESULTS SECTION ── */
.results-section {
  padding: 64px 24px 80px;
  animation: fade-in 0.5s ease forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-container {
  max-width: 920px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.results-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 6px;
  color: var(--text);
}

.results-filename {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Score circles */
.scores-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.score-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.score-side { flex-shrink: 0; }
.score-side .score-svg { width: 120px; height: 120px; }
.score-center .score-svg { width: 180px; height: 180px; }

.score-svg {
  transform: rotate(-90deg);
  overflow: visible;
}

.score-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-center .score-track { stroke-width: 10; }
.score-center .score-fill { stroke-dasharray: 439.8; stroke-dashoffset: 439.8; stroke-width: 10; }

.score-fill-ats { stroke: var(--score-ats); }
.score-fill-content { stroke: var(--score-content); }
.score-fill-overall { stroke: var(--score-overall); }

.score-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(-6px);
  text-align: center;
  line-height: 1;
}

.score-number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.75rem;
  display: block;
  color: var(--text);
}

.score-center .score-number { font-size: 2.5rem; }

.score-label-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.score-grade {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--score-overall);
  margin-top: 4px;
}

.score-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Verdict */
.verdict-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}

.verdict-text {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
}

/* Tabs */
.results-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 11px 18px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.tab-btn:hover { color: var(--text); background: var(--bg-subtle); }

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-panel { animation: fade-in 0.25s ease; }

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.panel-card.full-width { grid-column: 1 / -1; }

.card-title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-icon { font-size: 1rem; }

.issue-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--warning-light);
  border-left: 3px solid var(--warning);
  line-height: 1.5;
}

.issue-list li.danger {
  background: var(--danger-light);
  border-left-color: var(--danger);
  color: var(--text);
}

.issue-list li.success {
  background: var(--success-light);
  border-left-color: var(--success);
  color: var(--text);
}

.empty-state {
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 700;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 11px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border: 1px solid;
  font-weight: 500;
}

.tag.readable { border-color: var(--success); color: var(--success); background: var(--success-light); }
.tag.unreadable { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* Keywords grid */
.keywords-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.keyword-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: var(--bg);
}

.keyword-item.found {
  border-color: rgba(26, 122, 74, 0.25);
  background: var(--success-light);
  color: var(--text);
}

.keyword-item.missing {
  border-color: var(--border);
  color: var(--text-dim);
  background: var(--bg);
}

.keyword-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.found .keyword-dot { background: var(--success); }
.missing .keyword-dot { background: var(--border-dark); }

/* Content stats */
.content-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gaps */
.gaps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gap-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-card);
}

.gap-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-subtle);
}

.gap-severity {
  padding: 2px 9px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gap-severity.high { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }
.gap-severity.medium { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }
.gap-severity.low { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent); }

.gap-category {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.gap-body {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.gap-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.55;
}

.gap-suggestion {
  font-size: 0.875rem;
  color: var(--text);
  background: var(--success-light);
  border: 1px solid rgba(26, 122, 74, 0.2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  line-height: 1.55;
}

.gap-suggestion::before {
  content: '→ ';
  color: var(--success);
  font-weight: 700;
}

.strength-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strength-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--success);
  background: var(--success-light);
  line-height: 1.5;
}

/* ATS View */
.ats-view-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.ats-view-pre {
  background: var(--text);
  color: #f0ede6;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── REFINE SECTION ── */
.refine-section {
  margin-top: 48px;
  padding: 48px 36px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-lift);
}

.refine-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}

.refine-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.refine-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 52px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  letter-spacing: 0.02em;
}

.refine-btn:hover:not(:disabled) {
  background: #a93226;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(192, 57, 43, 0.3);
}

.refine-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── REFINED SECTION ── */
.refined-section {
  padding: 64px 24px 80px;
  animation: fade-in 0.5s ease forwards;
}

.refined-container {
  max-width: 920px;
  margin: 0 auto;
}

.refined-header {
  text-align: center;
  margin-bottom: 36px;
}

.refined-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 4px;
  background: var(--success-light);
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 16px;
}

.refined-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 10px;
  color: var(--text);
}

.refined-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.download-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid;
  transition: transform var(--transition), box-shadow var(--transition);
}

.download-btn:hover { transform: translateY(-2px); }

.download-docx {
  background: rgba(41, 128, 185, 0.07);
  border-color: #2980b9;
  color: #1a5f8a;
}

.download-docx:hover { box-shadow: 0 6px 20px rgba(41, 128, 185, 0.2); }

.download-pdf {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

.download-pdf:hover { box-shadow: 0 6px 20px rgba(192, 57, 43, 0.2); }

/* Preview */
.resume-preview-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lift);
}

.resume-preview-label {
  padding: 11px 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-body);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.resume-preview-frame {
  background: #fff;
  min-height: 600px;
  overflow: auto;
}

.resume-preview-frame iframe {
  width: 100%;
  border: none;
  min-height: 800px;
}

.reanalyze-cta {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.reanalyze-cta p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.reanalyze-btn {
  padding: 10px 28px;
  background: none;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.reanalyze-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── SPINNER ── */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  max-width: 90vw;
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateX(-50%) translateY(12px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.toast-icon { color: var(--danger); }
.toast-msg { flex: 1; }
.toast-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1rem; padding: 0 4px;
}

/* ── HOW IT WORKS ── */
.how-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.how-container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 52px;
  color: var(--text);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.step-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.25;
  margin-bottom: 10px;
  line-height: 1;
}

.step-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text);
}

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

/* ── GUIDES ── */
.guides-section {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.guides-container {
  max-width: 900px;
  margin: 0 auto;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition);
  color: var(--text);
}

.guide-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
  color: var(--text);
  opacity: 1;
}

.guide-role {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
}

.guide-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: color var(--transition), transform var(--transition);
}

.guide-card:hover .guide-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── SEO ARTICLE ── */
.seo-article { padding-top: 80px; }

.seo-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.seo-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
}

.seo-breadcrumb a { color: var(--text-muted); }

.seo-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.seo-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.seo-cta-btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.seo-cta-btn:hover {
  background: #a93226;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.25);
  opacity: 1;
}

.seo-cta-btn.large { padding: 14px 36px; font-size: 1rem; }
.seo-header { margin-bottom: 48px; }

.seo-section {
  margin-bottom: 40px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.seo-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.seo-section p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.seo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seo-list li {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 12px 16px;
  border-left: 3px solid var(--border-dark);
  background: var(--bg-card);
  line-height: 1.6;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.seo-list.ordered { counter-reset: ol-counter; }
.seo-list.ordered li { counter-increment: ol-counter; }
.seo-list.ordered li::before {
  content: counter(ol-counter) ". ";
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

.seo-cta-section { margin: 48px 0; }

.seo-cta-box {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-lift);
}

.seo-cta-box h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--text);
}

.seo-cta-box p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1rem;
}

.seo-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

.seo-related h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.seo-related-links { display: flex; flex-wrap: wrap; gap: 8px; }

.seo-related-links a {
  padding: 6px 14px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  transition: all var(--transition);
  background: var(--bg-card);
}

.seo-related-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

/* ── FOOTER ── */
.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
}
.footer-logo span { color: var(--accent); }

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); opacity: 1; }

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .guides-grid { grid-template-columns: 1fr 1fr; }
  .content-stats-row { grid-template-columns: 1fr 1fr; }
  .scores-row { gap: 20px; }
  .score-side .score-svg { width: 100px; height: 100px; }
  .score-center .score-svg { width: 150px; height: 150px; }
  .score-center .score-number { font-size: 2rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .refine-section { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
  .content-stats-row { grid-template-columns: 1fr 1fr; }
  .scores-row { flex-direction: column; align-items: center; }
  .score-side { order: 2; }
  .score-center { order: 1; }
  .hero-title { letter-spacing: -1px; }
  .trust-row { gap: 16px; }
  .download-row { flex-direction: column; align-items: center; }
}