/* ============================================================
   PartyTrends — light brand theme for embedded "Party Economy"
   data documents. All rules are scoped under .pt-doc so they
   only re-skin the lifted legacy content.
   ============================================================ */

/* sibling sub-navigation across Party Economy pages */
.econ-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.econ-subnav a {
    font-size: .82rem; font-weight: 700; color: var(--navy); background: #fff;
    border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; transition: .2s;
}
.econ-subnav a:hover { border-color: var(--cyan); color: var(--cyan); }
.econ-subnav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.pt-doc { color: var(--text); font-size: .95rem; }
.pt-doc main { display: block; padding: 0; margin: 0; max-width: none; }

/* live Chart.js canvases (rebuilt 2026 economy pages) */
.econ-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 22px; margin: 0 0 22px; box-shadow: var(--shadow-sm); }
.econ-card > h2 { font-family: 'Sora', sans-serif; font-size: 1.05rem; color: var(--navy); margin: 0 0 4px; }
.econ-card > p.econ-sub { font-size: .82rem; color: var(--muted); margin: 0 0 14px; line-height: 1.55; }
.econ-canvas-wrap { position: relative; height: 340px; }
.econ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin: 0 0 22px; }
.econ-grid .econ-card { margin: 0; }
.econ-grid .econ-canvas-wrap { height: 240px; }
.econ-tablewrap-title { font-family: 'Sora', sans-serif; font-size: 1rem; color: var(--navy); margin: 22px 0 12px; }
.econ-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 0 0 22px; }
.econ-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; border-top: 3px solid var(--cyan); box-shadow: var(--shadow-sm); }
.econ-kpi .v { font-family: 'Sora', sans-serif; font-size: 1.55rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.econ-kpi .l { font-size: .76rem; color: var(--muted); margin-top: 4px; font-weight: 600; }
.econ-kpi .d { font-size: .72rem; margin-top: 2px; font-weight: 700; }
.econ-kpi .d.up { color: #e0535b; } .econ-kpi .d.down { color: var(--green); }

/* per-item chart feed (infinite scroll) */
.econ-search { margin: 0 0 18px; }
.econ-search input { width: 100%; padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font-size: .95rem; box-shadow: var(--shadow-sm); }
.econ-search input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(27,160,196,.15); }
.econ-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; margin: 0 0 8px; }
.econ-item-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; box-shadow: var(--shadow-sm); }
.econ-item-head { margin: 0 0 8px; }
.econ-item-head h4 { font-family: 'Sora', sans-serif; font-size: .92rem; color: var(--navy); margin: 0; line-height: 1.3; }
.econ-item-sub { font-size: .72rem; color: var(--muted); font-weight: 600; }
.econ-item-canvas { position: relative; height: 230px; }
.econ-feed-status { text-align: center; color: var(--muted); font-size: .82rem; font-weight: 600; padding: 18px 0 8px; }
#econSentinel { height: 1px; }
.econ-method { line-height: 1.65; }
.econ-formula { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 18px; font-size: .88rem; }
.econ-formula code { display: block; background: #eef2f9; border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-family: Consolas, 'Courier New', monospace; font-size: .82rem; color: var(--navy); overflow-x: auto; white-space: nowrap; }
.econ-formula p { margin: 0 0 6px; }
/* SEO: breadcrumbs, crawl index, FAQ, SSR tables */
.econ-crumb { margin: 0 0 14px; font-size: .82rem; }
.econ-crumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.econ-crumb li:not([aria-current])::after { content: '/'; margin-left: 6px; opacity: .5; }
.econ-crumb a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.econ-crumb a:hover { text-decoration: underline; }
.econ-crumb [aria-current="page"] { color: var(--navy); font-weight: 700; }
.econ-crawl-index { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.econ-crawl-index summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy); }
.econ-crawl-body { padding: 0 16px 16px; max-height: 360px; overflow-y: auto; columns: 2; column-gap: 24px; }
.econ-crawl-body h4 { font-size: .82rem; color: var(--cyan); margin: 12px 0 6px; break-after: avoid; }
.econ-crawl-body ul { margin: 0 0 8px; padding-left: 18px; font-size: .78rem; color: var(--text); break-inside: avoid; }
.econ-faq { margin: 0 0 22px; }
.econ-faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.econ-faq-item summary { cursor: pointer; padding: 12px 14px; font-weight: 700; color: var(--navy); font-size: .9rem; }
.econ-faq-item p { margin: 0; padding: 0 14px 14px; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.econ-related ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.econ-related a { display: inline-block; font-size: .82rem; font-weight: 700; color: var(--navy); background: var(--bg); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.econ-related a:hover { border-color: var(--cyan); color: var(--cyan); }
@media (max-width: 620px) { .econ-item-grid { grid-template-columns: 1fr; } .econ-formula code { white-space: normal; word-break: break-word; } .econ-crawl-body { columns: 1; } }

/* meta / disclaimer blocks */
.pt-doc .meta {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 15px 18px; margin: 0 0 16px; font-size: .88rem; color: var(--muted);
    box-shadow: var(--shadow-sm); line-height: 1.65;
}
.pt-doc .meta strong { color: var(--navy); }
.pt-doc .meta.warn { background: #fff7e6; border-color: #e8c16b; color: #7a5a12; }
.pt-doc .meta.warn strong { color: #b8860b; }

/* in-page jump navs (price files + economy dashboard) */
.pt-doc nav.cat-nav,
.pt-doc nav#nav, .pt-doc #nav {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: 14px; padding: 12px;
    margin: 0 0 22px; position: sticky; top: 98px; z-index: 40; box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.pt-doc nav.cat-nav a {
    color: var(--navy); text-decoration: none; font-size: .75rem; font-weight: 600;
    padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px;
    background: var(--bg); white-space: nowrap;
}
.pt-doc nav.cat-nav a:hover { color: #fff; background: var(--navy); border-color: var(--navy); }
.pt-doc #nav button {
    background: var(--bg); border: 1px solid var(--line); color: var(--navy);
    padding: .45rem .85rem; border-radius: 999px; cursor: pointer; font-size: .78rem;
    font-weight: 600; white-space: nowrap; transition: .18s;
}
.pt-doc #nav button:hover, .pt-doc #nav button.active { color: #fff; background: var(--navy); border-color: var(--navy); }

/* KPI cards (economy dashboard) */
.pt-doc .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin: 0 0 22px; }
.pt-doc .kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; border-top: 3px solid var(--cyan); box-shadow: var(--shadow-sm); }
.pt-doc .kpi.green { border-top-color: var(--green); }
.pt-doc .kpi.blue { border-top-color: var(--cyan); }
.pt-doc .kpi.gold { border-top-color: var(--gold); }
.pt-doc .kpi.red { border-top-color: #e0535b; }
.pt-doc .kpi.purple { border-top-color: var(--purple); }
.pt-doc .kpi.orange { border-top-color: var(--gold); }
.pt-doc .kpi-val { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.pt-doc .kpi-label { font-size: .78rem; color: var(--muted); margin-top: 4px; font-weight: 600; }
.pt-doc .kpi-sub { font-size: .7rem; color: var(--muted); opacity: .85; }

/* panels + charts (economy dashboard) */
.pt-doc .panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 22px; overflow: hidden; box-shadow: var(--shadow-sm); }
.pt-doc .panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 10px; }
.pt-doc .panel-head h2 { font-family: 'Sora', sans-serif; font-size: 1.1rem; color: var(--navy); margin: 0; }
.pt-doc .sec-icon { margin-right: .4rem; }
.pt-doc .chart-box { padding: 16px 18px; height: 320px; position: relative; }
.pt-doc .hero-chart { padding: 18px; height: 360px; background: #fff; border: 1px solid var(--line); border-radius: 16px; margin: 0 0 22px; box-shadow: var(--shadow-sm); position: relative; }
.pt-doc .hero-chart h2 { font-size: .85rem; color: var(--muted); padding: 0 0 12px; margin: 0; font-weight: 600; }
.pt-doc .chart-toggle { display: flex; gap: 4px; }
.pt-doc .ct { background: var(--bg); border: 1px solid var(--line); color: var(--muted); padding: .3rem .65rem; border-radius: 7px; cursor: pointer; font-size: .72rem; }
.pt-doc .ct.active { color: #fff; background: var(--cyan); border-color: var(--cyan); }

/* business-ratio cards (economy dashboard) */
.pt-doc .ratios-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 16px 18px; }
.pt-doc .ratio-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pt-doc .ratio-card h3 { font-size: .9rem; color: var(--cyan); margin: 0 0 8px; }
.pt-doc .ratio-card p { font-size: .8rem; color: var(--muted); line-height: 1.6; margin: 0; }
.pt-doc .ratio-card .formula { font-family: Consolas, monospace; font-size: .75rem; color: var(--navy); margin-top: 8px; padding: 9px; background: #eef2f9; border-radius: 7px; }

/* CSS bar/trend charts (price files) */
.pt-doc .charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin: 0 0 20px; }
.pt-doc .chart-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); opacity: 1; transform: none; border-top: 1px solid var(--line); }
.pt-doc .chart-card h3 { font-size: .82rem; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.pt-doc .bar-row { display: grid; grid-template-columns: 92px 1fr 72px; gap: 8px; align-items: center; margin-bottom: 7px; font-size: .72rem; }
.pt-doc .bar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-doc .bar-track { height: 18px; background: #eef2f9; border-radius: 5px; overflow: hidden; }
.pt-doc .bar-fill { height: 100%; border-radius: 5px; min-width: 2px; }
.pt-doc .bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; }
.pt-doc .trend-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: .5rem; }
.pt-doc .trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.pt-doc .trend-bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--cyan), var(--purple)); border-radius: 5px 5px 0 0; min-height: 8px; }
.pt-doc .trend-val { font-size: .68rem; color: var(--navy); font-weight: 700; }
.pt-doc .trend-yr { font-size: .7rem; color: var(--muted); }
.pt-doc .sup-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pt-doc .sup-chip { font-size: .72rem; padding: .3rem .6rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }

/* category sections (price files) */
.pt-doc .cat-section { margin: 0 0 30px; }
.pt-doc .cat-heading { font-family: 'Sora', sans-serif; font-size: 1.1rem; color: var(--navy); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--cyan); }
.pt-doc .cat-count { font-size: .75rem; color: var(--muted); font-weight: 400; }

/* search box (master cost table) */
.pt-doc .search-box { margin: 0 0 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pt-doc .search-box input { flex: 1; min-width: 220px; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font-size: .95rem; }
.pt-doc .search-box input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(27,160,196,.15); }
.pt-doc .count { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* data tables (all docs) */
.pt-doc .table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; max-height: 78vh; background: #fff; box-shadow: var(--shadow-sm); }
.pt-doc table { width: 100%; border-collapse: collapse; font-size: .8rem; background: #fff; }
.pt-doc th, .pt-doc td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: right; white-space: nowrap; }
.pt-doc th { background: #f1f4fa; color: var(--navy); font-weight: 700; position: sticky; top: 0; z-index: 2; font-size: .74rem; }
.pt-doc td:first-child, .pt-doc th:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: #fff; min-width: 200px; white-space: normal; }
.pt-doc th:first-child { z-index: 3; background: #f1f4fa; }
.pt-doc td.region { text-align: left; color: var(--muted); font-weight: 500; font-size: .75rem; }
.pt-doc td.na { color: var(--muted); text-align: center; }
.pt-doc td.lowest { background: #e7f7ec; color: #1f8a3b; font-weight: 700; }
.pt-doc .size, .pt-doc .hint { font-size: .72rem; color: var(--muted); font-weight: 400; }
.pt-doc tr.item-group.alt td, .pt-doc tr.prod-group.alt td { background: #f7f9fc; }
.pt-doc tr.item-group.alt td:first-child, .pt-doc tr.prod-group.alt td:first-child { background: #eef2f9; }
.pt-doc tr.item-group:hover td, .pt-doc tr.prod-group:hover td { background: #eaf6f9; }
.pt-doc tr.item-group:hover td:first-child, .pt-doc tr.prod-group:hover td:first-child { background: #ddeff4; }
.pt-doc .prod-cell, .pt-doc tr.item-group td[rowspan] { vertical-align: top; padding-top: .55rem; }
.pt-doc .trend-up { color: #e0535b; }
.pt-doc .trend-down { color: var(--green); }
.pt-doc .trend-flat { color: var(--muted); }

/* verified pricing — pink cells sourced off the internet for 2026,
   light pink = reverse-engineered back-years from that real anchor */
.pt-doc td.pv { background: #ffe0ec; color: #9d1f54; font-weight: 700; }
.pt-doc td.pd { background: #fff2f7; color: #b23a6b; }
.pt-doc tr.item-group:hover td.pv { background: #ffd1e2; }
.pt-doc tr.item-group:hover td.pd { background: #ffe6f0; }
.pt-doc .pv-badge {
    display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .02em;
    text-transform: uppercase; color: #fff; background: #e6488f; border-radius: 999px;
    padding: 1px 7px; margin-left: 6px; vertical-align: middle; cursor: help;
}
.pt-doc .pv-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; font-size: .8rem; color: var(--muted); }
.pt-doc .pv-key { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pt-doc .pv-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.pt-doc .pv-swatch--v { background: #ffe0ec; border-color: #f3a9c6; }
.pt-doc .pv-swatch--d { background: #fff2f7; border-color: #f3ccde; }
.pt-doc .pv-swatch--e { background: #fff; }

/* clickable source link shown under a verified product name */
.pt-doc .pv-src {
    display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .01em;
    color: #b23a6b; background: #fff2f7; border: 1px solid #f3ccde; border-radius: 999px;
    padding: 1px 8px; margin-left: 6px; vertical-align: middle; text-decoration: none;
}
.pt-doc .pv-src:hover { background: #ffe0ec; color: #9d1f54; text-decoration: underline; }
.pt-doc .pv-note { display: block; margin-top: 3px; font-size: .68rem; line-height: 1.3; color: #b23a6b; }
.pt-doc .pv-count { display: block; margin-top: 4px; font-size: .68rem; font-weight: 600; color: #b23a6b; }
.pt-doc .pv-cell-src { font-size: .65rem; margin-left: 3px; color: #9d1f54; text-decoration: none; }
.pt-doc .pv-cell-src:hover { text-decoration: underline; }
.pt-doc td.na { color: var(--muted); text-align: center; }

@media (max-width: 720px) {
    .pt-doc nav.cat-nav, .pt-doc #nav { top: 80px; }
    .pt-doc td:first-child, .pt-doc th:first-child { min-width: 150px; }
}
