/* ═══════════════════════════════════════════════
   VRINDA STORE — DATA REPORT STYLESHEET
   Editorial light-mode design matching reference
═══════════════════════════════════════════════ */

:root {
    --ink:       #111111;
    --ink-mid:   #444444;
    --ink-muted: #888888;
    --rule:      #e0e0e0;
    --bg:        #ffffff;
    --bg-off:    #f6f6f4;
    --bg-accent: #f0ede8;
    --gold:      #c8963c;
    --gold-lt:   #f0ddb0;
    --teal:      #2a9d8f;
    --red:       #c0392b;
    --green:     #27ae60;
    --blue:      #2980b9;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --max-w:     860px;
    --section-gap: 4rem;
}

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

html {
    scroll-behavior: smooth;
    /* Prevents browser scroll-anchoring from jumping when Chart.js redraws resize charts */
    overflow-anchor: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ──────────────────────────────────── */
.report-header {
    background: #fff;
    padding: 2.5rem 0 0;
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-top-rule {
    width: 60px;
    height: 3px;
    background: var(--ink);
    margin-bottom: 1.8rem;
}

.header-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.header-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink-mid);
}

.report-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 0.7rem;
}

.report-subtitle {
    font-size: 1rem;
    color: var(--ink-muted);
    max-width: 560px;
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* STAT STRIP */
.stat-strip {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 1.2rem 0;
    margin-bottom: 1.4rem;
}

.stat-item {
    flex: 1;
    text-align: left;
    padding-right: 1.5rem;
    border-right: 1px solid var(--rule);
}

.stat-item:last-child { border-right: none; padding-right: 0; }
.stat-item + .stat-item { padding-left: 1.5rem; }

.stat-val {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    text-transform: uppercase;
}

/* BADGE ROW */
.badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.4rem;
}

.badge-group-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    text-transform: uppercase;
}

.badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.tool-badge {
    background: var(--ink);
    color: #fff;
}

.type-badge {
    background: transparent;
    color: var(--ink-mid);
    border: 1px solid var(--rule);
}

/* ── REPORT BODY ─────────────────────────────── */
.report-body {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── SECTIONS ────────────────────────────────── */
.report-section {
    padding: var(--section-gap) 0;
    border-bottom: 1px solid var(--rule);
}

.report-section:last-child { border-bottom: none; }

.section-title {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--ink);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.section-divider {
    width: 100%;
    height: 1px;
    background: var(--rule);
    margin-bottom: 1.8rem;
}

.section-lead {
    font-size: 1.05rem;
    color: var(--ink-mid);
    line-height: 1.8;
    max-width: 720px;
}

.section-lead strong { color: var(--ink); font-weight: 700; }

/* ── DASHBOARD BLOCKS ────────────────────────── */
.dashboard-block {
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
    background: #fff;
}

.dashboard-block:last-child { margin-bottom: 0; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.9rem;
    gap: 1rem;
}

.dashboard-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.dashboard-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.meta-chip {
    font-size: 0.7rem;
    color: var(--teal);
    font-weight: 600;
}

.meta-chip + .meta-chip::before { content: "·"; margin-right: 0.4rem; color: var(--rule); }

.insights-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--ink-mid);
    background: var(--bg-off);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* TECH TAGS */
.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.72rem;
    color: var(--teal);
    font-weight: 500;
    background: rgba(42,157,143,0.07);
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
}

.highlight-tag {
    background: transparent;
    color: var(--ink-muted);
}

/* ── INSIGHT CARDS (3-col) ───────────────────── */
.insight-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.insight-card {
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.4rem;
    position: relative;
    transition: border-color 0.2s;
}

.insight-card:hover { border-color: var(--ink-muted); }

.insight-card.accent {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.insight-card.accent h4 { color: var(--gold-lt); }
.insight-card.accent p  { color: rgba(255,255,255,0.75); }

.ic-num {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink-muted);
    margin-bottom: 0.7rem;
}

.insight-card.accent .ic-num { color: rgba(255,255,255,0.4); }

.insight-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.insight-card p {
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

/* ── CHART + INSIGHT LAYOUT ─────────────────── */
.chart-and-insight {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.chart-pane {
    flex: 1.2;
}

.chart-pane.wide { flex: 1.5; }
.chart-pane.narrow-chart { flex: 0 0 240px; width: 240px; }
.chart-pane.full-width {
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Chart.js needs a position:relative parent with a FIXED height — not max-height */
.ch-wrap {
    position: relative;
    width: 100%;
}
.ch-wrap.h-bar  { height: 185px; }   /* bar chart */
.ch-wrap.h-line { height: 110px; }   /* line chart — short */
.ch-wrap.h-donut{ height: 210px; }   /* donut */
.ch-wrap.h-water{ height: 200px; }   /* waterfall */

.chart-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.insight-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-pane.narrow { flex: 0.8; }

/* KPI Row */
.kpi-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kpi-box {
    border: 1px solid var(--rule);
    border-radius: 5px;
    padding: 0.9rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-box.dark {
    background: var(--ink);
    border-color: var(--ink);
}

.kpi-v {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.kpi-box.dark .kpi-v { color: var(--gold-lt); }

.kpi-l {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.kpi-box.dark .kpi-l { color: rgba(255,255,255,0.5); }

.insight-quote {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ink-mid);
    border-left: 3px solid var(--rule);
    padding-left: 1rem;
    line-height: 1.7;
}

/* WARNING / OPPORTUNITY BOXES */
.warning-box {
    border: 1px solid #f39c12;
    background: #fffbf3;
    border-radius: 5px;
    padding: 1rem 1.2rem;
}

.warn-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.warn-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #b7770d;
}

.warning-box p, .opportunity-box p {
    font-size: 0.8rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

.opportunity-box {
    border: 1px solid var(--teal);
    background: rgba(42,157,143,0.05);
    border-radius: 5px;
    padding: 1rem 1.2rem;
}

.opportunity-box h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.4rem;
}

/* ── TREEMAP ─────────────────────────────────── */
.treemap-grid {
    display: flex;
    gap: 0.8rem;
    height: 220px;
    margin-bottom: 1.2rem;
}

.tree-col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.tree-card {
    flex: 1;
    border-radius: 6px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s;
}

.tree-card:hover { transform: scale(1.01); }

.tree-card.main-card {
    flex: 2;
    background: var(--ink);
    color: #fff;
}

.tree-card.accent-card {
    background: var(--teal);
    color: #fff;
}

.tree-card.gap-card {
    background: #fff;
    border: 2px dashed #f39c12;
}

.tree-label {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
}

.tree-val {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.tree-tag {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.callout-box {
    background: var(--bg-off);
    border-left: 4px solid var(--ink);
    border-radius: 0 5px 5px 0;
    padding: 1.1rem 1.4rem;
}

.callout-box h4 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    color: var(--ink);
}

.callout-box p {
    font-size: 0.85rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

/* ── GEOGRAPHY ───────────────────────────────── */
.geo-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.region-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    flex: 1;
}

.region-card {
    border-radius: 6px;
    padding: 1.1rem;
    border: 1px solid var(--rule);
}

.region-card h5 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.region-val {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.region-tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.region-card.win {
    background: #f0faf4;
    border-color: var(--green);
}

.region-card.win .region-tag { color: var(--green); }

.region-card.neutral .region-tag { color: var(--blue); }

.region-card.opp {
    background: #fffbf3;
    border: 2px dashed #f39c12;
}

.region-card.opp .region-tag { color: #b7770d; }

.geo-insight {
    flex: 1;
}

.geo-lead {
    font-size: 0.88rem;
    color: var(--ink-mid);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.geo-bar-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}

.geo-bar-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-mid);
    width: 75px;
    flex-shrink: 0;
}

.geo-bar-track {
    flex: 1;
    height: 6px;
    background: var(--rule);
    border-radius: 3px;
    overflow: hidden;
}

.geo-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.geo-bar-fill.south  { background: var(--ink); }
.geo-bar-fill.west   { background: var(--teal); }
.geo-bar-fill.north  { background: #f39c12; }

.geo-bar-pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-mid);
    width: 36px;
    text-align: right;
}

/* ── SEASONALITY CARDS ───────────────────────── */
.season-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.season-card {
    border-radius: 6px;
    padding: 1.2rem;
    border: 1px solid var(--rule);
}

.sc-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.season-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.season-card p {
    font-size: 0.8rem;
    color: var(--ink-muted);
    line-height: 1.5;
}

.season-card.peak .sc-label { color: var(--green); }
.season-card.peak { border-color: var(--green); background: #f0faf4; }

.season-card.dip .sc-label { color: var(--red); }
.season-card.dip { border-color: var(--red); background: #fdf5f5; }

.season-card.neutral .sc-label { color: var(--gold); }

/* ── FULFILLMENT ─────────────────────────────── */
.fulfillment-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.fm-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.fm-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-mid);
    width: 60px;
    flex-shrink: 0;
}

.fm-bar-track {
    flex: 1;
    height: 8px;
    background: var(--rule);
    border-radius: 4px;
    overflow: hidden;
}

.fm-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.fm-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
    width: 42px;
    text-align: right;
}

.highlight-callout {
    display: flex;
    gap: 0.7rem;
    background: var(--bg-off);
    border-radius: 5px;
    padding: 1rem 1.2rem;
    align-items: flex-start;
}

.hc-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }

.highlight-callout p {
    font-size: 0.82rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

.highlight-callout strong { color: var(--ink); }

/* ── STRATEGY PILLARS ────────────────────────── */
.pillar-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.pillar {
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.pillar:hover { border-color: var(--ink-muted); }

.pillar.secondary { background: var(--bg-off); }
.pillar.tertiary  { background: var(--ink); color: #fff; border-color: var(--ink); }
.pillar.tertiary h3 { color: var(--gold-lt); }
.pillar.tertiary li { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.2); }

.pillar-num {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.pillar.tertiary .pillar-num { color: rgba(255,255,255,0.4); }

.pillar h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.pillar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pillar li {
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.5;
    border-left: 2px solid var(--rule);
    padding-left: 0.75rem;
}

/* ── WATERFALL CHART ─────────────────────────── */
.waterfall-wrap {
    background: var(--bg-off);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 1rem 1.5rem 1.5rem;
    margin-bottom: 2rem;
}

.projection-statement {
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
}

.projection-statement h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold-lt);
    margin-bottom: 0.7rem;
}

.projection-statement p {
    font-size: 0.92rem;
    opacity: 0.75;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
    font-style: italic;
}

/* ── FOOTER ──────────────────────────────────── */
.report-footer {
    background: #fff;
    border-top: 1px solid var(--rule);
    padding: 2rem 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
}

.footer-meta {
    font-size: 0.72rem;
    color: var(--ink-muted);
}

.footer-meta strong { color: var(--ink-mid); font-weight: 600; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 780px) {

    .header-meta-row { flex-direction: column; gap: 0.3rem; align-items: flex-start; }

    .stat-strip { flex-wrap: wrap; }
    .stat-item  { min-width: 40%; border-right: none; border-bottom: 1px solid var(--rule); padding: 0.8rem 0; }
    .stat-item:last-child { border-bottom: none; }
    .stat-item + .stat-item { padding-left: 0; }

    .insight-cards { grid-template-columns: 1fr; }
    .chart-and-insight { flex-direction: column; }
    .chart-pane.narrow-chart { max-width: 100%; }
    .treemap-grid { height: auto; flex-direction: column; }
    .tree-card.main-card { flex: none; height: 140px; }
    .tree-col { flex-direction: row; }
    .geo-layout { flex-direction: column; }
    .region-grid { grid-template-columns: 1fr 1fr; }
    .season-cards { grid-template-columns: 1fr; }
    .pillar-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}