/* WE-DO Sample Deliverables - Shared Styles */
:root {
  --accent: #c45c26;
  --accent-hover: #a34d1f;
  --accent-soft: #f7e4d8;
  --secondary: #90AAA7;
  --secondary-soft: #e3eae8;
  --tertiary: #d4a574;
  --text: #1a1a1a;
  --text-muted: #666666;
  --background: #FFFFFF;
  --background-alt: #f7f5f2;
  --white: #FFFFFF;
  --border: #e5e3de;
  --success: #90AAA7;
  --info: #90AAA7;
  --warning: #F9B233;
  --error: #DC3545;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: 'DM Sans', sans-serif; color: var(--text); margin: 0 0 0.5em; line-height: 1.25; }
h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* Header */
.report-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 0; z-index: 10;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-logo img, .header-logo svg { height: 28px; width: auto; }
.header-meta { text-align: right; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.header-meta .client-name { font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--text); }

/* Hero */
.report-hero {
  padding: 56px 0 40px;
  background: var(--background-alt);
  border-bottom: 1px solid var(--border);
}
.report-hero .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.report-hero h1 { font-size: 42px; max-width: 800px; }
.report-hero .lede { font-size: 18px; color: var(--text-muted); max-width: 720px; margin-top: 12px; }
.report-meta-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; margin-top: 32px;
  border-top: 1px solid var(--border); padding-top: 24px;
}
.report-meta-grid .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.report-meta-grid .value { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 16px; }

/* Sections */
.section { padding: 48px 0; border-bottom: 1px solid var(--border); }
.section.alt { background: var(--background-alt); }
.section h2 { margin-bottom: 8px; }
.section .section-lede { color: var(--text-muted); margin-bottom: 32px; max-width: 760px; }
.section h3 { margin-top: 32px; }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 20px;
}
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
.stat-card .stat-value { font-family: 'DM Sans', sans-serif; font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-card .stat-delta { font-size: 13px; margin-top: 6px; color: var(--text-muted); }
.stat-card .stat-delta.up { color: #2f7d6a; }
.stat-card .stat-delta.down { color: var(--error); }
.stat-card svg.spark { display: block; margin-top: 10px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 16px; background: var(--background-alt); font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafaf8; }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table .url { font-family: 'SF Mono', Monaco, Consolas, monospace; font-size: 12.5px; color: var(--text-muted); }

/* Badges */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge.p1 { background: #fbe1d6; color: #8a3712; }
.badge.p2 { background: #fbecd1; color: #7a5512; }
.badge.p3 { background: #e3eae8; color: #45605c; }
.badge.up { background: #d6ebe5; color: #1f6051; }
.badge.down { background: #fbd6d6; color: #882a2a; }
.badge.neutral { background: var(--background-alt); color: var(--text-muted); }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card.accent-left { border-left: 3px solid var(--accent); }
.card.secondary-left { border-left: 3px solid var(--secondary); }
.card.warning-left { border-left: 3px solid var(--warning); }
.card .card-meta { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }

/* Findings list */
.finding {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.finding-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.finding-head h4 { margin: 0; }
.finding-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.finding p { margin: 6px 0 0; }

/* Callout */
.callout { background: var(--secondary-soft); border-left: 3px solid var(--secondary); border-radius: 6px; padding: 18px 20px; margin: 24px 0; }
.callout.accent { background: var(--accent-soft); border-color: var(--accent); }
.callout h4 { margin: 0 0 6px; }

/* TOC */
.toc { background: var(--background-alt); border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-top: 24px; }
.toc h3 { margin-top: 0; }
.toc ol { columns: 2; column-gap: 24px; padding-left: 18px; margin: 0; }
.toc ol li { font-size: 14px; padding: 4px 0; break-inside: avoid; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.roadmap .phase { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.roadmap .phase h4 { color: var(--accent); margin-top: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.roadmap .phase ul { margin: 0; padding-left: 20px; font-size: 14px; }
.roadmap .phase ul li { margin-bottom: 8px; }

/* Week grid */
.week-grid { display: grid; grid-template-columns: 80px 1fr; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--white); }
.week-row { display: contents; }
.week-num { background: var(--background-alt); padding: 14px 16px; font-family: 'DM Sans', sans-serif; font-weight: 600; border-bottom: 1px solid var(--border); }
.week-content { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.week-row:last-child .week-num, .week-row:last-child .week-content { border-bottom: 0; }

/* Footer */
.report-footer { padding: 32px 0; background: var(--background-alt); border-top: 1px solid var(--border); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-logo img, .footer-logo svg { height: 24px; width: auto; opacity: 0.6; }
.footer-meta { font-size: 12px; color: var(--text-muted); text-align: right; }
.disclaimer { background: var(--background-alt); padding: 16px 0; border-top: 1px solid var(--border); }
.disclaimer p { font-size: 12px; color: var(--text-muted); text-align: center; margin: 0; font-style: italic; }

/* Print */
@media print {
  .report-header { position: static; }
  .section { page-break-inside: avoid; }
}

/* CTR Plan — meta rewrite cards */
.rewrite-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(26, 26, 26, 0.04);
}
.rewrite-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.rewrite-rank {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.rewrite-url {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0;
  word-break: break-all;
}
.rewrite-query {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 8px;
}
.rewrite-block {
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.rewrite-block.current {
  background: var(--background-alt);
  border-left: 3px solid var(--text-muted);
}
.rewrite-block.proposed {
  background: var(--secondary-soft);
  border-left: 3px solid var(--secondary);
}
.rewrite-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
}
.rewrite-block.current .rewrite-label { color: var(--text-muted); }
.rewrite-block.proposed .rewrite-label { color: var(--secondary); }
.rewrite-field {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 8px;
  color: var(--text);
}
.rewrite-field:last-child { margin-bottom: 0; }
.rewrite-field strong:first-child {
  display: inline-block;
  min-width: 90px;
  font-weight: 600;
  color: var(--text-muted);
}
.rewrite-block.proposed .rewrite-field { font-weight: 500; }
.char-count {
  display: inline-block;
  margin-left: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-weight: 400;
}
.rewrite-block.current .char-count { background: var(--white); }
.rationale {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--background-alt);
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  border-left: 3px solid var(--accent);
}
.rationale strong { color: var(--accent); }

/* Phase / group cards (tech-seo + url-portfolio samples) */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.phase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.phase-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.phase-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin: 4px 0;
}
.phase-window {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.phase-actions {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}
.phase-actions li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
}
.phase-actions li:last-child { border-bottom: none; }
.phase-effort {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Finding severity modifiers */
.finding.critical { border-left: 4px solid var(--error); }
.finding.high { border-left: 4px solid #ea580c; }
.finding.medium { border-left: 4px solid var(--warning); }
.finding.low { border-left: 4px solid var(--success); }
.finding-head strong { font-family: 'DM Sans', sans-serif; font-size: 16px; }
.finding code { background: var(--background-alt); padding: 2px 6px; border-radius: 3px; font-size: 13px; font-family: 'SF Mono', Menlo, Consolas, monospace; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-critical { background: #fee2e2; color: #dc2626; }
.badge-high { background: #ffedd5; color: #ea580c; }
.badge-medium { background: #fef9c3; color: #ca8a04; }
.badge-warning { background: #fef9c3; color: #ca8a04; }
.badge-low { background: #dcfce7; color: #16a34a; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-stable { background: var(--background-alt); color: var(--text-muted); }

/* Methodology list */
.methodology {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  background: var(--background-alt);
  border-radius: 8px;
  padding: 20px 24px;
}
.methodology li {
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.methodology li:last-child { border-bottom: none; }

/* Utility */
.text-muted { color: var(--text-muted); }
.num.up, .stat-delta.up, .up { color: var(--success); }
.num.down, .stat-delta.down, .down { color: var(--error); }

/* Mobile additions */
@media (max-width: 720px) {
  .phase-grid { grid-template-columns: 1fr; }
  .rewrite-card { padding: 20px; }
  .rewrite-block { padding: 14px 16px; }
  .char-count { display: block; margin: 4px 0 0 0; }
}

/* Mobile */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  h1 { font-size: 28px; }
  .report-hero h1 { font-size: 30px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .report-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .cards-grid.three, .roadmap { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
