@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #FAF7F2;
  --ink: #1A1A1A;
  --gold: #C9A84C;
  --gold-light: #F0E6C8;
  --grey: #6B6B6B;
  --white: #FFFFFF;
  --border: #E8E2D9;
  --red: #C0392B;
  --amber: #E67E22;
  --green: #27AE60;
  --red-bg: #FDF0EE;
  --amber-bg: #FEF6EE;
  --green-bg: #EEF8F2;
  --sidebar-w: 260px;
  --content-max: 860px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

/* ─── LAYOUT ─────────────────────────────────────── */
.layout {
  display: flex;
  max-width: 1160px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ─── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 32px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }

.sidebar-brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-brand .brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.sidebar nav { padding: 0 8px; }

.nav-section { margin-bottom: 4px; }

.nav-section-label {
  display: block;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-section-label:hover { color: var(--gold); }

.nav-sub { padding-left: 8px; }

.nav-sub a {
  display: block;
  padding: 4px 16px;
  font-size: 12.5px;
  color: var(--grey);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.nav-sub a:hover,
.nav-sub a.active {
  background: var(--gold-light);
  color: var(--ink);
}

.nav-score-badge {
  display: inline-block;
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  font-weight: 400;
}

.score-red { background: var(--red-bg); color: var(--red); }
.score-amber { background: var(--amber-bg); color: var(--amber); }
.score-gold { background: var(--gold-light); color: #8a6a1e; }
.score-green { background: var(--green-bg); color: var(--green); }

/* ─── MAIN CONTENT ────────────────────────────────── */
.main {
  flex: 1;
  padding: 60px 56px 100px;
  max-width: calc(var(--content-max) + 112px);
}

/* ─── REPORT HEADER ───────────────────────────────── */
.report-header {
  margin-bottom: 64px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--gold);
}

.report-header .report-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}

.report-header .report-title span {
  font-style: italic;
  color: var(--grey);
}

.report-meta {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--grey);
  margin-top: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.report-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-meta .dot {
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
}

/* ─── SECTION ─────────────────────────────────────── */
.section {
  margin-bottom: 72px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-number {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}

.section-score {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 400;
  white-space: nowrap;
}

.sub-section { margin-bottom: 48px; }

.sub-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

p { margin-bottom: 18px; }
p:last-child { margin-bottom: 0; }

/* ─── SCORE CARDS GRID ────────────────────────────── */
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}

.score-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.score-card.composite {
  grid-column: 1 / -1;
  background: var(--ink);
  color: var(--white);
  padding: 32px;
}

.score-card.composite .score-num { color: var(--white); }
.score-card.composite .score-label { color: rgba(255,255,255,0.65); }
.score-card.composite::before { height: 4px; }

.score-card.c-red::before { background: var(--red); }
.score-card.c-amber::before { background: var(--amber); }
.score-card.c-gold::before { background: var(--gold); }
.score-card.c-green::before { background: var(--green); }

.score-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.score-num.c-red { color: var(--red); }
.score-num.c-amber { color: var(--amber); }
.score-num.c-gold { color: var(--gold); }
.score-num.c-green { color: var(--green); }

.score-denom {
  font-size: 18px;
  opacity: 0.5;
  font-weight: 300;
}

.score-label {
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 500;
}

/* ─── OPENING QUOTE ───────────────────────────────── */
.opening-quote {
  background: var(--ink);
  color: var(--white);
  padding: 36px 40px;
  border-radius: 8px;
  margin-bottom: 36px;
  position: relative;
}

.opening-quote::before {
  content: '\201C';
  font-family: 'Cormorant Garamond', serif;
  font-size: 120px;
  color: var(--gold);
  position: absolute;
  top: -20px;
  left: 20px;
  line-height: 1;
  opacity: 0.5;
}

.opening-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  line-height: 1.6;
  font-style: italic;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* ─── PRIORITY ACTIONS ────────────────────────────── */
.priority-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.priority-action {
  display: flex;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 20px 24px;
  align-items: flex-start;
}

.priority-action .num {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--gold);
  min-width: 20px;
  padding-top: 2px;
}

.priority-action .text { font-size: 15px; line-height: 1.6; }
.priority-action .text strong { font-weight: 600; }

/* ─── INFO BOX ────────────────────────────────────── */
.info-box {
  background: #F2F6FD;
  border: 1px solid #C5D8F5;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 14px;
  color: #2c4a7c;
  margin: 24px 0;
}

.info-box strong { font-weight: 600; }

/* ─── TABLES ──────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead tr {
  background: var(--ink);
  color: var(--white);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #FDFCFA; }

tbody td {
  padding: 12px 16px;
  vertical-align: top;
  line-height: 1.5;
}

/* Issue severity tables */
.issue-table tbody td:first-child {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.issue-table tbody tr.critical { border-left: 4px solid var(--red); }
.issue-table tbody tr.critical td:first-child { color: var(--red); }
.issue-table tbody tr.critical { background: var(--red-bg); }

.issue-table tbody tr.major { border-left: 4px solid var(--amber); }
.issue-table tbody tr.major td:first-child { color: var(--amber); }

.issue-table tbody tr.minor { border-left: 4px solid var(--green); }
.issue-table tbody tr.minor td:first-child { color: var(--green); }

/* Press table */
.presence-yes { color: var(--green); font-weight: 600; }
.presence-no { color: var(--red); font-weight: 600; }
.presence-partial { color: var(--amber); font-weight: 600; }

/* Keyword table priority */
.kw-p1 { background: #FDF0EE; font-weight: 600; color: var(--red); }
.kw-p2 { background: var(--amber-bg); color: #8a4900; }
.kw-p3 { background: var(--green-bg); color: #1a6b3c; }

/* Priority matrix tables */
.matrix-table thead tr { background: var(--ink); }
.matrix-table tbody tr.tier1 { border-left: 4px solid var(--red); }
.matrix-table tbody tr.tier2 { border-left: 4px solid var(--amber); }
.matrix-table tbody tr.tier3 { border-left: 4px solid var(--green); }

/* ─── BLOCKQUOTES ─────────────────────────────────── */
blockquote {
  border-left: 3px solid var(--gold);
  padding: 20px 28px;
  margin: 28px 0;
  background: var(--white);
  border-radius: 0 6px 6px 0;
}

blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0;
}

/* ─── PRODUCT DESCRIPTION CALLOUTS ───────────────── */
.product-desc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.product-desc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 6px;
  padding: 20px;
}

.product-desc-card .product-name {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.product-desc-card .product-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
}

.product-desc-card .word-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  background: var(--red-bg);
  color: var(--red);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
}

/* ─── CASSHEENA ALERT ─────────────────────────────── */
.cassheena-alert {
  background: var(--red-bg);
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 32px 36px;
  margin: 32px 0;
}

.cassheena-alert .alert-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.cassheena-alert .title-tag-display {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  color: var(--red);
  font-weight: 400;
  background: rgba(192, 57, 43, 0.08);
  padding: 14px 20px;
  border-radius: 4px;
  margin: 16px 0;
  display: block;
  word-break: break-all;
}

/* ─── SEASON TIMELINE ─────────────────────────────── */
.season-list {
  list-style: none;
  margin: 20px 0;
}

.season-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.season-list li:last-child { border-bottom: none; }

.season-code {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--grey);
  min-width: 48px;
}

.season-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--ink);
}

.season-warning {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-bg);
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ─── COMPETITOR CARDS ────────────────────────────── */
.competitor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 28px;
}

.competitor-card .comp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.competitor-card .comp-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
}

.competitor-card .comp-label {
  font-size: 12px;
  color: var(--grey);
  font-style: italic;
}

.comp-bullets {
  margin: 16px 0 16px 0;
  padding-left: 20px;
}

.comp-bullets li {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── DISTRIBUTOR GRID ────────────────────────────── */
.distributor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.distributor-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 13px;
}

.distributor-card .d-name { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.distributor-card .d-count { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--grey); }
.distributor-card.present { background: var(--green-bg); border-color: #a8d9bc; }
.distributor-card.absent { background: #F8F8F8; }
.distributor-card.warning { background: var(--amber-bg); border-color: #f0c080; }

/* ─── TOOLS LIST ──────────────────────────────────── */
.tools-group { margin-bottom: 28px; }

.tools-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 12px;
}

.tool-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.tool-item:last-child { border-bottom: none; }

.tool-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  min-width: 220px;
  flex-shrink: 0;
}

.tool-name .tool-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

.tag-free { background: var(--green-bg); color: var(--green); }
.tag-paid { background: var(--amber-bg); color: #8a4900; }

.tool-desc { font-size: 14px; color: var(--grey); line-height: 1.5; }

/* ─── MEASUREMENT PREREQS ─────────────────────────── */
.prereqs { margin: 24px 0; }

.prereq-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.prereq-item:last-child { border-bottom: none; }

.prereq-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  min-width: 36px;
}

.prereq-content h4 {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.prereq-content p { font-size: 14px; color: var(--grey); margin-bottom: 0; }

/* ─── HIGHLIGHT STAT ──────────────────────────────── */
.stat-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-bg);
  color: var(--red);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 400;
}

/* ─── KEYWORD LANE ────────────────────────────────── */
.keyword-lane {
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 24px 0;
}

.keyword-lane .lane-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.keyword-lane .lane-formula {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
}

/* ─── TIER HEADERS ────────────────────────────────── */
.tier-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 0;
  margin-top: 36px;
}

.tier-header.t1 { background: var(--red-bg); border-left: 4px solid var(--red); }
.tier-header.t2 { background: var(--amber-bg); border-left: 4px solid var(--amber); }
.tier-header.t3 { background: var(--green-bg); border-left: 4px solid var(--green); }

.tier-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 600;
}

.tier-header.t1 h3 { color: var(--red); }
.tier-header.t2 h3 { color: #8a4900; }
.tier-header.t3 h3 { color: var(--green); }

.tier-header .tier-desc {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 0;
  margin-bottom: 0;
}

/* ─── FOOTER ──────────────────────────────────────── */
.report-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--grey);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ─── MOBILE ──────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
}

@media (max-width: 880px) {
  .hamburger { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
  }

  .sidebar.open { transform: translateX(0); }

  .main { padding: 48px 24px 80px; }

  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .score-card.composite { grid-column: 1 / -1; }

  .report-header .report-title { font-size: 30px; }

  .product-desc-grid { grid-template-columns: 1fr; }
}

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

/* ─── PRINT ───────────────────────────────────────── */
@media print {
  .sidebar, .hamburger { display: none !important; }
  .main { padding: 24px; max-width: 100%; }
  body { font-size: 12px; }
  .section { page-break-inside: avoid; }
  .report-header .report-title { font-size: 28px; }
  .table-wrap { overflow: visible; }
}

/* ─── MISC ────────────────────────────────────────── */
ul.check-list { list-style: none; padding: 0; margin: 16px 0; }
ul.check-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
ul.check-list li:last-child { border-bottom: none; }
ul.check-list li::before {
  content: '·';
  position: absolute;
  left: 8px;
  color: var(--gold);
  font-size: 20px;
  line-height: 1.2;
}

code {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  background: #F0EDE8;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
}
