/* ============================================================
   analytics.css — SOKYO Analytics
   Redesigned to inherit the blog-detail visual language:
   elevated "report cards", the fuchsia→cyan→rose expressive
   accent spectrum, Google Sans Flex headings, and layered
   surface containers. All original selectors are preserved —
   analytics.js targets these same class/ID names untouched.

   SELF-CONTAINED: every token this stylesheet needs is declared
   below, matching the same values used in blog_detail.css. This
   file does not depend on index.css defining anything — if it
   does, these declarations simply take precedence for this page.
   ============================================================ */

:root {
    --md-sys-color-primary:              #3F6212;
    --md-sys-color-on-surface:           #2F342C;
    --md-sys-color-on-surface-variant:   #6E7566;
    --md-sys-color-surface-container-lowest:  #FFFFFF;
    --md-sys-color-surface-container-low:     #F4F5F0;
    --md-sys-color-surface-container:         #EEF0E7;
    --md-sys-color-surface-container-high:    #E8EAE2;
    --md-sys-color-surface-container-highest: #E2E4DB;
    --md-sys-color-outline:              #C7D7B2;
    --md-sys-color-outline-variant:      #E5E7DE;
    --md-sys-color-inverse-surface:      #2F342C;
    --md-sys-color-inverse-on-surface:   #F4F5F0;

    --md-sys-elevation-1: 0 1px 3px 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.08);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.10);

    --md-sys-shape-corner-large:         16px;
    --md-sys-shape-corner-extra-large:   28px;
    --md-sys-shape-corner-full:          9999px;

    --md-sys-motion-duration-short4:     200ms;
    --md-sys-motion-easing-standard:     cubic-bezier(0.2, 0, 0, 1);

    --c-moss:       #AEBF96;
    --c-moss-light: #C7D7B2;
    --c-moss-dark:  #7F8C6D;

    --data-viz-primary:    #D946EF;
    --data-viz-secondary:  #FB7185;
    --data-viz-accent:     #06B6D4;
}

body.dark {
    --md-sys-color-primary:              #A3C77E;
    --md-sys-color-on-surface:           #E2E3DC;
    --md-sys-color-on-surface-variant:   #9EA899;
    --md-sys-color-surface-container-lowest:  #0D100C;
    --md-sys-color-surface-container-low:     #1A1D18;
    --md-sys-color-surface-container:         #1E2219;
    --md-sys-color-surface-container-high:    #282C24;
    --md-sys-color-surface-container-highest: #33372E;
    --md-sys-color-outline:              #888F82;
    --md-sys-color-outline-variant:      #3E4339;
    --md-sys-color-inverse-surface:      #E2E3DC;
    --md-sys-color-inverse-on-surface:   #2F3229;

    --md-sys-elevation-1: 0 1px 3px 1px rgba(0,0,0,.3),  0 1px 2px rgba(0,0,0,.35);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0,0,0,.3),  0 1px 2px rgba(0,0,0,.35);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,.3),  0 1px 3px rgba(0,0,0,.35);

    --data-viz-primary:    #E879F9;
    --data-viz-secondary:  #FDA4AF;
    --data-viz-accent:     #67E8F9;
}

/* ── Expressive accent spectrum (same move as blog_detail) ─── */
:root {
    --mx-accent-a: var(--data-viz-primary,   #D946EF); /* fuchsia */
    --mx-accent-b: var(--data-viz-accent,    #06B6D4); /* cyan    */
    --mx-accent-c: var(--data-viz-secondary, #FB7185); /* rose    */
}

/* ── Hero ─────────────────────────────────────────────────── */
.ar-hero { padding: 72px 24px 56px; position: relative; overflow: hidden !important; }
@media (max-width: 640px) { .ar-hero { padding: 48px 16px 36px; } }
.ar-hero__blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ar-hero__inner { max-width: 1280px; margin: 0 auto; position: relative; z-index: 10; isolation: isolate; }

/* Signature color-wash glow behind the hero copy — same treatment
   as blog_detail's article header, using the site's own chart
   spectrum instead of a foreign palette. */
.ar-hero__inner::before {
    content: '';
    position: absolute;
    top: -120px; left: -60px;
    width: 380px; height: 380px;
    background: radial-gradient(circle at 30% 30%, var(--mx-accent-a) 0%, transparent 60%),
                radial-gradient(circle at 70% 55%, var(--mx-accent-b) 0%, transparent 55%),
                radial-gradient(circle at 45% 85%, var(--mx-accent-c) 0%, transparent 60%);
    filter: blur(64px);
    opacity: 0.22;
    pointer-events: none;
    z-index: -1;
}
body.dark .ar-hero__inner::before { opacity: 0.32; }

.ar-hero__actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Expressive badge — replaces the plain assist chip */
.ar-hero__badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--mx-accent-a) 88%, black 12%),
        color-mix(in srgb, var(--mx-accent-c) 88%, black 8%));
    color: #fff;
    border-radius: var(--md-sys-shape-corner-full);
    font-family: 'Google Sans Flex', 'Google Sans', sans-serif;
    font-variation-settings: 'wght' 650, 'ROND' 60, 'wdth' 100;
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px -3px color-mix(in srgb, var(--mx-accent-a) 55%, transparent);
}
.ar-hero__badge .material-symbols-rounded { font-size: 15px; color: #fff; }

/* Hero title — Google Sans Flex, first word carries the spectrum */
.ar-hero__title {
    font-family: 'Google Sans Flex', 'Google Sans Display', 'Google Sans', sans-serif;
    font-variation-settings: 'wght' 700, 'ROND' 20, 'wdth' 100;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    position: relative;
    padding-bottom: 20px;
}
.ar-hero__title-accent {
    background: linear-gradient(120deg, var(--mx-accent-a), var(--mx-accent-b), var(--mx-accent-c));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-variation-settings: 'wght' 820, 'ROND' 65, 'wdth' 104;
}
@supports not (background-clip: text) { .ar-hero__title-accent { color: var(--mx-accent-a); } }
.ar-hero__title::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    height: 6px; width: 96px; border-radius: var(--md-sys-shape-corner-full);
    background: linear-gradient(90deg, var(--mx-accent-a), var(--mx-accent-b), var(--mx-accent-c));
}

/* ── Download button ──────────────────────────────────────── */
.ar-btn-download {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: var(--md-sys-shape-corner-full);
    font-size: 14px; font-weight: 700; cursor: pointer; border: none;
    background: linear-gradient(135deg, var(--c-moss) 0%, #3d5e28 100%);
    color: #fff; box-shadow: 0 4px 14px rgba(110,156,77,.30);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    text-decoration: none; white-space: nowrap;
}
.ar-btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(110,156,77,.40); }
.ar-btn-download:active { transform: translateY(0); opacity: .88; }
.ar-btn-download .material-symbols-rounded { font-size: 18px; }
.ar-btn-download.loading { opacity: .65; pointer-events: none; }

/* ── Jump nav ─────────────────────────────────────────────── */
.ar-jump-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ar-jump-pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px;
    border-radius: var(--md-sys-shape-corner-full); font-size: 12px; font-weight: 600;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid var(--md-sys-color-outline-variant);
    cursor: pointer; text-decoration: none;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
    white-space: nowrap;
}
.ar-jump-pill:hover { background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); border-color: var(--mx-accent-b); }
.ar-jump-pill:hover .material-symbols-rounded { color: var(--mx-accent-b); }
.ar-jump-pill .material-symbols-rounded { font-size: 14px; transition: color 120ms ease; }

/* ── Main content ─────────────────────────────────────────── */
.ar-main { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }
@media (max-width: 640px) { .ar-main { padding: 0 16px 60px; } }

/* ── Section ─────────────────────────────────────────────── */
.ar-section { margin-bottom: 56px; }
.ar-section-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.ar-section-meta {
    font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase; margin-top: 5px;
}
.ar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--md-sys-color-outline-variant), transparent);
    margin: 48px 0;
}

/* ═══════════════════════════════════════════════════════════
   REPORT CARD — the blog_detail "elevated card" treatment,
   wraps each report's summary / KPIs / charts / table.
   ═══════════════════════════════════════════════════════════ */
.ar-report-card {
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-2);
    padding: 32px;
    position: relative;
    isolation: isolate;
    overflow: hidden; /* keep the corner glow inside the rounded card */
}
@media (max-width: 860px) { .ar-report-card { padding: 24px; } }
@media (max-width: 500px) { .ar-report-card { padding: 16px; border-radius: var(--md-sys-shape-corner-large); } }

body.dark .ar-report-card {
    background: var(--md-sys-color-surface-container-low);
    box-shadow: var(--md-sys-elevation-3);
}

/* Soft color-wash blob behind each card, tucked in a corner so it
   never competes with the data. Three positional variants keep the
   three reports visually distinct while sharing one accent family. */
.ar-report-card::before {
    content: '';
    position: absolute;
    width: 340px; height: 340px;
    filter: blur(70px);
    opacity: 0.16;
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
}
body.dark .ar-report-card::before { opacity: 0.22; }

.ar-report-card--soc::before {
    top: -100px; right: -80px;
    background: radial-gradient(circle, var(--mx-accent-a) 0%, transparent 65%);
}
.ar-report-card--phone::before {
    top: -100px; right: -80px;
    background: radial-gradient(circle, var(--mx-accent-b) 0%, transparent 65%);
}
.ar-report-card--telco::before {
    top: -100px; right: -80px;
    background: radial-gradient(circle, var(--mx-accent-c) 0%, transparent 65%);
}

.ar-summary-card {
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 14px 18px; font-size: 13.5px; line-height: 1.7;
    color: var(--md-sys-color-on-surface-variant); margin-bottom: 20px;
}
.ar-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 56px 24px; text-align: center; gap: 12px;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-extra-large);
    border: 1px dashed var(--md-sys-color-outline-variant);
}
.ar-empty .material-symbols-rounded { font-size: 40px; color: var(--md-sys-color-on-surface-variant); }
.ar-empty p { font-size: 14px; color: var(--md-sys-color-on-surface-variant); max-width: 280px; }

/* ═══════════════════════════════════════════════════════════
   KPI CARDS
   ═══════════════════════════════════════════════════════════ */
.ar-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
/* Tablet: 3 + 2 */
@media (max-width: 860px) {
    .ar-kpi-row { grid-template-columns: repeat(3, 1fr); }
}
/* Mobile: 2 columns */
@media (max-width: 500px) {
    .ar-kpi-row { grid-template-columns: repeat(2, 1fr); }
    /* hide 5th card on very small screens to keep even grid */
    .ar-kpi-row > :nth-child(5) { display: none; }
}

.ar-kpi-card {
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 14px 14px 14px 18px;
    position: relative; overflow: hidden;
    transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
    cursor: default; min-width: 0;
}
.ar-kpi-card:hover {
    box-shadow: var(--md-sys-elevation-2, 0 4px 16px rgba(0,0,0,.09));
    border-color: var(--md-sys-color-outline);
    transform: translateY(-2px);
}
.ar-kpi-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--ar-kpi-accent, var(--c-moss));
}
.ar-kpi-card__label {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase; margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-kpi-card__value {
    font-size: 20px; font-weight: 800; letter-spacing: -0.02em;
    color: var(--md-sys-color-on-surface); line-height: 1.1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 640px) { .ar-kpi-card__value { font-size: 16px; } }
.ar-kpi-card__trend {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 700; margin-top: 4px;
}
.ar-kpi-card__trend--up   { color: #16a34a; }
.ar-kpi-card__trend--down { color: #dc2626; }
.ar-kpi-card__trend--flat { color: var(--md-sys-color-on-surface-variant); }
.ar-kpi-card__trend .material-symbols-rounded { font-size: 13px; }
body.dark .ar-kpi-card { background: var(--md-sys-color-surface-container-high); }

/* ═══════════════════════════════════════════════════════════
   CHART PANELS
   ═══════════════════════════════════════════════════════════ */
.ar-chart-panel {
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-1);
    overflow: hidden;
    margin-bottom: 16px;
    min-width: 0;
}
body.dark .ar-chart-panel { background: var(--md-sys-color-surface-container-high); }
.ar-chart-panel__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    background: var(--md-sys-color-surface-container-high);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    gap: 10px; flex-wrap: wrap; min-width: 0;
}
body.dark .ar-chart-panel__head { background: var(--md-sys-color-surface-container-highest); }
.ar-chart-panel__title {
    font-size: 13px; font-weight: 700;
    color: var(--md-sys-color-on-surface);
    display: flex; align-items: center; gap: 7px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-chart-panel__title .material-symbols-rounded { font-size: 15px; color: var(--mx-accent-a); flex-shrink: 0; }
.ar-chart-row--2col .ar-chart-panel:nth-child(2) .ar-chart-panel__title .material-symbols-rounded { color: var(--mx-accent-b); }
.ar-chart-panel__sub {
    font-size: 11px; color: var(--md-sys-color-on-surface-variant); margin-top: 1px;
}
.ar-chart-panel__body { padding: 16px 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Legend chips */
.ar-legend-chips { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.ar-legend-chip { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.ar-legend-chip__dot { width: 20px; height: 3px; border-radius: 2px; flex-shrink: 0; }

/* Chart canvas wrappers — always set explicit height */
.ar-chart-wrap { position: relative; }
.ar-chart-row {
    display: grid; grid-template-columns: 1fr;
    gap: 14px; margin-bottom: 16px;
}
@media (min-width: 860px) {
    .ar-chart-row--2col { grid-template-columns: 1fr 1fr; }
    .ar-chart-row--tel  { grid-template-columns: 2fr 1fr; }
}

/* Donut labels */
.ar-donut-label { text-align: center; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--md-sys-color-on-surface); }
.ar-donut-sub   { text-align: center; font-size: 10px; color: var(--md-sys-color-on-surface-variant); margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════
   UNIFIED TABLE  (SoC · Smartphone · Telco — identical)
   ═══════════════════════════════════════════════════════════ */
.ar-table-wrap {
    overflow-x: auto;
    border-radius: var(--md-sys-shape-corner-extra-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
    /* smooth momentum scroll on iOS */
    -webkit-overflow-scrolling: touch;
}
.ar-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ar-table thead { background: var(--md-sys-color-surface-container-high); }
.ar-table th {
    padding: 11px 14px; text-align: left; font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap; border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.ar-table td {
    padding: 10px 14px; color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    vertical-align: middle;
}
.ar-table tbody tr:last-child td { border-bottom: none; }
.ar-table tbody tr { background: var(--md-sys-color-surface-container); transition: background 100ms ease; }
.ar-table tbody tr:hover { background: var(--md-sys-color-surface-container-high); }
body.dark .ar-table thead { background: var(--md-sys-color-surface-container-highest); }
body.dark .ar-table tbody tr { background: var(--md-sys-color-surface-container-high); }
body.dark .ar-table tbody tr:hover { background: var(--md-sys-color-surface-container-highest); }

/* ── Rank badge ──────────────────────────────────────────── */
.ar-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.ar-rank--gold   { background: linear-gradient(135deg,#FEF3C7,#FDE68A); color: #92400E; box-shadow: 0 2px 6px rgba(217,158,11,.25); }
.ar-rank--silver { background: linear-gradient(135deg,#F1F5F9,#E2E8F0); color: #475569; box-shadow: 0 2px 6px rgba(71,85,105,.18); }
.ar-rank--bronze { background: linear-gradient(135deg,#FEF0E7,#FBD9C0); color: #9A3412; box-shadow: 0 2px 6px rgba(154,52,18,.18); }
.ar-rank--default{ background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); }

/* ── Tier badge ──────────────────────────────────────────── */
.ar-tier { display: inline-block; padding: 2px 9px; border-radius: var(--md-sys-shape-corner-full); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.ar-tier--flagship  { background: color-mix(in srgb, #7C3AED 14%, transparent); color: #7C3AED; }
.ar-tier--high-end  { background: color-mix(in srgb, #3F6212 14%, transparent); color: #3F6212; }
.ar-tier--mid-range { background: color-mix(in srgb, #0284C7 14%, transparent); color: #0284C7; }
.ar-tier--budget    { background: color-mix(in srgb, #6E7566 14%, transparent); color: #6E7566; }
body.dark .ar-tier--flagship  { background: color-mix(in srgb, #A78BFA 18%, transparent); color: #A78BFA; }
body.dark .ar-tier--high-end  { background: color-mix(in srgb, #A3C77E 18%, transparent); color: #A3C77E; }
body.dark .ar-tier--mid-range { background: color-mix(in srgb, #38BDF8 18%, transparent); color: #38BDF8; }

/* ── Score bar (AnTuTu inline in tables) ─────────────────── */
.ar-score-bar { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.ar-score-bar__track { flex: 1; height: 5px; background: var(--md-sys-color-surface-container-highest); border-radius: 3px; overflow: hidden; min-width: 48px; }
.ar-score-bar__fill  { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--mx-accent-a) 0%, var(--mx-accent-b) 100%); }
.ar-score-bar__val   { font-size: 11.5px; font-weight: 700; color: var(--md-sys-color-on-surface); white-space: nowrap; min-width: 44px; text-align: right; }

/* ── Rating dot (used in phone table) ───────────────────── */
.ar-rating {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 700;
}
.ar-rating__dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ar-rating--high  .ar-rating__dot { background: #16A34A; }
.ar-rating--mid   .ar-rating__dot { background: #D97706; }
.ar-rating--low   .ar-rating__dot { background: #DC2626; }

/* ── Telco speed cells ───────────────────────────────────── */
.ar-speed-val  { font-size: 13px; font-weight: 700; color: var(--md-sys-color-on-surface); }
.ar-speed-unit { font-size: 10px; color: var(--md-sys-color-on-surface-variant); font-weight: 500; }
.ar-latency    { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--md-sys-shape-corner-full); font-size: 11.5px; font-weight: 700; }
.ar-latency--low    { background: color-mix(in srgb, #16A34A 12%, transparent); color: #16A34A; }
.ar-latency--medium { background: color-mix(in srgb, #D97706 12%, transparent); color: #D97706; }
.ar-latency--high   { background: color-mix(in srgb, #DC2626 12%, transparent); color: #DC2626; }

/* ── Toast ───────────────────────────────────────────────── */
.ar-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--md-sys-color-inverse-surface, #2d3130);
    color: var(--md-sys-color-inverse-on-surface, #eff1ee);
    padding: 11px 22px; border-radius: var(--md-sys-shape-corner-full);
    font-size: 13.5px; font-weight: 500; z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    transition: transform 300ms cubic-bezier(.34,1.56,.64,1);
    white-space: nowrap; display: flex; align-items: center; gap: 10px;
}
.ar-toast.visible { transform: translateX(-50%) translateY(0); }
.ar-toast .material-symbols-rounded { font-size: 17px; }

/* ═══════════════════════════════════════════════════════════
   MD3 BOTTOM NAVIGATION BAR — floating pill, liquid glass,
   mobile only. Same component as blog_detail, so the two pages
   share one nav language instead of drawer-vs-bottom-nav split.
   ═══════════════════════════════════════════════════════════ */

/* On mobile, the glass bottom-nav replaces the hamburger + drawer
   entirely (matches blog_detail). The drawer/hamburger stay fully
   wired for tablet/desktop — nothing here removes that code, it's
   just visually stepped aside under 768px. */
@media (max-width: 767px) {
    #openSidebar.md3-top-app-bar__menu-btn { display: none !important; }
    /* Drawer is superseded by the bottom nav on mobile — force it fully
       out of the layout so it can never render inline/open-by-default
       regardless of what index.css's default state is. */
    .md3-drawer, #sidebarOverlay.md3-scrim { display: none !important; }
    .ar-main   { padding-bottom: 108px; }
    .md3-footer{ padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}

.md3-bottom-nav {
    display: none;
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px; right: 16px;
    height: 68px;
    z-index: 99997 !important;
    align-items: center;
    justify-content: space-around;
    border-radius: 999px;
    isolation: isolate;
}
.md3-bottom-nav::before {
    content: '';
    position: absolute; inset: 0; border-radius: inherit;
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(24px) saturate(160%) brightness(1.06);
    -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(1.06);
    border: 1px solid rgba(255,255,255,.6);
    box-shadow:
        0 8px 32px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.07),
        inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(0,0,0,.05);
    pointer-events: none; z-index: -1;
}
body.dark .md3-bottom-nav::before {
    background: rgba(28,26,38,.72);
    border-color: rgba(255,255,255,.12);
    box-shadow:
        0 8px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.24),
        inset 0 1px 0 rgba(255,255,255,.08), inset 0 -1px 0 rgba(0,0,0,.2);
}
@media (max-width: 767px) { .md3-bottom-nav { display: flex; } }

.md3-bottom-nav__tab {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; padding: 8px 4px;
    border: none; background: transparent;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    font-family: inherit; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--md-sys-motion-duration-short4, 150ms) var(--md-sys-motion-easing-standard, ease);
    border-radius: 999px;
}
.md3-bottom-nav__indicator {
    position: relative;
    width: 52px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    transition: background 240ms ease, transform 150ms ease, box-shadow 240ms ease;
}
.md3-bottom-nav__indicator::before {
    content: '';
    position: absolute; inset: 0; border-radius: inherit;
    background: var(--md-sys-color-on-surface); opacity: 0;
    transition: opacity 150ms ease;
}
.md3-bottom-nav__tab:hover .md3-bottom-nav__indicator::before { opacity: 0.08; }
.md3-bottom-nav__tab:active .md3-bottom-nav__indicator { transform: scale(0.88); }
.md3-bottom-nav__indicator .material-symbols-rounded { font-size: 22px; position: relative; z-index: 1; }
.md3-bottom-nav__label { font-size: 10px; font-weight: 600; line-height: 1; white-space: nowrap; }

.md3-bottom-nav__tab.active .md3-bottom-nav__indicator,
.md3-bottom-nav__tab[aria-current="page"] .md3-bottom-nav__indicator {
    background: rgba(255,255,255,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(0,0,0,.06);
    border: 1px solid rgba(255,255,255,.7);
}
body.dark .md3-bottom-nav__tab.active .md3-bottom-nav__indicator,
body.dark .md3-bottom-nav__tab[aria-current="page"] .md3-bottom-nav__indicator {
    background: rgba(255,255,255,.15);
    box-shadow: 0 2px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.2);
}
.md3-bottom-nav__tab.active,
.md3-bottom-nav__tab[aria-current="page"] { color: var(--md-sys-color-primary); }
.md3-bottom-nav__tab.active .md3-bottom-nav__label,
.md3-bottom-nav__tab[aria-current="page"] .md3-bottom-nav__label { font-weight: 700; }

.md3-bottom-nav__tab--more.open { color: var(--md-sys-color-primary); }
.md3-bottom-nav__tab--more.open .md3-bottom-nav__indicator {
    background: rgba(255,255,255,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.7);
}

.md3-bottom-nav__scrim {
    display: none;
    position: fixed; inset: 0; z-index: 99998 !important;
    background: rgba(0,0,0,.36);
    opacity: 0; pointer-events: none;
    transition: opacity 280ms ease;
}
@media (max-width: 767px) { .md3-bottom-nav__scrim { display: block; } }
.md3-bottom-nav__scrim.active { opacity: 1; pointer-events: auto; }

.md3-bottom-nav__more-panel {
    display: none;
    position: fixed;
    left: 16px; right: 16px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: 99999 !important;
    transform: translateY(20px);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
    -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.95);
    transition: transform 380ms cubic-bezier(.2,.8,.2,1), opacity 240ms ease;
    opacity: 0; pointer-events: none; overflow: hidden;
}
body.dark .md3-bottom-nav__more-panel {
    background: rgba(28,26,38,.88);
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 12px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
}
@media (max-width: 767px) { .md3-bottom-nav__more-panel { display: block; } }
.md3-bottom-nav__more-panel.active { transform: translateY(0); opacity: 1; pointer-events: auto; }

.md3-bottom-nav__more-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(0,0,0,.15); margin: 10px auto 2px;
}
body.dark .md3-bottom-nav__more-handle { background: rgba(255,255,255,.2); }
.md3-bottom-nav__more-header { padding: 10px 20px 6px; }
.md3-bottom-nav__more-title { font-size: 15px; font-weight: 700; color: var(--md-sys-color-on-surface); }
.md3-bottom-nav__more-list { list-style: none; margin: 0; padding: 4px 8px 12px; }
.md3-bottom-nav__more-item {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 12px; border-radius: 16px;
    color: var(--md-sys-color-on-surface); text-decoration: none;
    font-size: 14px; font-weight: 600; position: relative; overflow: hidden;
}
.md3-bottom-nav__more-item::before {
    content: ''; position: absolute; inset: 0;
    background: var(--md-sys-color-on-surface); opacity: 0;
    transition: opacity 120ms ease;
}
.md3-bottom-nav__more-item:hover { background: rgba(0,0,0,.04); }
.md3-bottom-nav__more-item:active::before { opacity: 0.1; }
.md3-bottom-nav__more-item .material-symbols-rounded { position: relative; z-index: 1; flex-shrink: 0; font-size: 20px; color: var(--md-sys-color-on-surface-variant); }
.md3-bottom-nav__more-item span:last-child { position: relative; z-index: 1; }
/* Current-page highlight inside the More flyout */
.md3-bottom-nav__more-item.active,
.md3-bottom-nav__more-item[aria-current="page"] {
    background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
    color: var(--md-sys-color-primary);
}
.md3-bottom-nav__more-item.active .material-symbols-rounded,
.md3-bottom-nav__more-item[aria-current="page"] .material-symbols-rounded { color: var(--md-sys-color-primary); }

/* ── Print ───────────────────────────────────────────────── */
@media print {
    .md3-top-app-bar, .md3-drawer, .md3-scrim, .md3-footer,
    .md3-bottom-nav, .md3-bottom-nav__scrim, .md3-bottom-nav__more-panel,
    .ar-hero__blobs, .ar-hero__inner::before, .ar-btn-download, .ar-jump-nav,
    #theme-toggle, #openSidebar { display: none !important; }
    body  { background: #fff !important; color: #000 !important; }
    .ar-hero { padding: 20px 0 14px; }
    .ar-main { padding: 0 0 40px; max-width: 100%; }
    .ar-section { margin-bottom: 36px; break-inside: avoid; }
    .ar-divider { margin: 28px 0; }
    .ar-report-card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
    .ar-report-card::before { display: none !important; }
    .ar-kpi-card { background: #f4f4f4 !important; border: 1px solid #ccc !important; }
    .ar-kpi-card__value { color: #000 !important; }
    .ar-chart-panel { background: #f9f9f9 !important; border: 1px solid #ddd; box-shadow: none !important; break-inside: avoid; }
    .ar-chart-row { grid-template-columns: 1fr !important; }
    .ar-table-wrap { border: 1px solid #ccc; border-radius: 0; box-shadow: none !important; }
    .ar-table thead { background: #efefef !important; }
    .ar-table th, .ar-table td { color: #000 !important; border-color: #ddd !important; }
    .ar-table tbody tr { background: #fff !important; }
}
