
.pd-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem clamp(1.5rem, 5vw, 2rem);
}

.pd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #68717f;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.pd-back-link:hover { color: #ff6b4a; }

.pd-header {
    margin-bottom: 2.5rem;
}

.pd-header h1 {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 0.5rem;
}

.pd-header p {
    color: #68717f;
    font-size: 1.05rem;
    max-width: 640px;
}

/* ---------- Auth gate (not signed in) ---------- */
.pd-auth-gate {
    background: white;
    border-radius: var(--r-md);
    padding: 4rem 2rem;
    text-align: center;
    border: 1px solid #e3ddd3;
    box-shadow: var(--shadow-1);
}

.pd-auth-gate h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    color: #1a2332;
    margin-bottom: 0.75rem;
}

.pd-auth-gate p {
    color: #68717f;
    margin-bottom: 2rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.pd-auth-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: #ff6b4a;
    color: white;
    text-decoration: none;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.pd-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

/* ---------- Upgrade gate (free member) ---------- */
.pd-upgrade-gate {
    background: #1a2332;
    border-radius: var(--r-md);
    padding: 3.5rem 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.pd-upgrade-gate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.pd-upgrade-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.pd-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 107, 74, 0.18);
    border: 1.5px solid rgba(255, 107, 74, 0.4);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.pd-upgrade-gate h2 {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.pd-upgrade-gate h2 span { color: #ff6b4a; }

.pd-upgrade-gate p.lead {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.pd-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 0 auto 2.5rem;
    max-width: 720px;
    text-align: left;
}

.pd-preview-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.pd-preview-tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff6b4a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pd-preview-item p {
    margin: 0;
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}

.pd-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    background: #ff6b4a;
    color: white;
    text-decoration: none;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-2);
}

.pd-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.pd-upgrade-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Founder content shell ---------- */
.pd-empty {
    background: white;
    border-radius: var(--r-md);
    padding: 4rem 2rem;
    text-align: center;
    border: 1px solid #e3ddd3;
    box-shadow: var(--shadow-1);
    color: #68717f;
}

.pd-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pd-empty h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.5rem;
    color: #1a2332;
    margin-bottom: 0.75rem;
}

.pd-empty p {
    margin-bottom: 1.5rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.pd-empty a {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #1a2332;
    color: white;
    text-decoration: none;
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.95rem;
}

.pd-loading {
    text-align: center;
    padding: 3rem;
    color: #99a2b0;
}

/* Container for chunks 2-8 to populate */
.pd-modules { display: flex; flex-direction: column; gap: 1.5rem; }

.pd-coming-soon {
    background: white;
    border-radius: var(--r-md);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px dashed #c4cad4;
    color: #99a2b0;
}

.pd-coming-soon h3 {
    font-family: 'Crimson Pro', serif;
    color: #1a2332;
    margin-bottom: 0.5rem;
}

/* ---------- Headline strip ---------- */
.pd-headline-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.pd-stat-card {
    background: white;
    border-radius: var(--r-md);
    padding: 1.4rem 1.3rem;
    border: 1px solid #e3ddd3;
    box-shadow: var(--shadow-1);
    text-align: center;
}

.pd-stat-label {
    color: #68717f;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.65rem;
}

.pd-stat-value {
    font-family: 'Crimson Pro', serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.1;
}

.pd-stat-value.pd-positive { color: #1f7a5c; }
.pd-stat-value.pd-negative { color: #a83a2c; }
.pd-stat-value.pd-accent { color: #ff6b4a; }
.pd-stat-value.pd-amber { color: #965914; }

.pd-stat-sub {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #99a2b0;
    line-height: 1.3;
}

.pd-stat-sub.pd-positive { color: #1f7a5c; }
.pd-stat-sub.pd-negative { color: #a83a2c; }
.pd-stat-sub.pd-amber { color: #965914; }

/* ---------- Variance panel ---------- */
.pd-variance-panel {
    background: white;
    border-radius: var(--r-md);
    padding: 1.6rem 1.75rem;
    border: 1px solid #e3ddd3;
    box-shadow: var(--shadow-1);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.pd-variance-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 107, 74, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pd-variance-panel.pd-hot .pd-variance-icon { background: rgba(168, 58, 44, 0.12); }
.pd-variance-panel.pd-cold .pd-variance-icon { background: rgba(47, 93, 143, 0.12); }
.pd-variance-panel.pd-on-track .pd-variance-icon { background: rgba(31, 122, 92, 0.12); }

.pd-variance-body { flex: 1; min-width: 0; }

.pd-variance-body h3 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem;
    color: #68717f;
    font-weight: 600;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
}

.pd-variance-line {
    font-family: 'Crimson Pro', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a2332;
    line-height: 1.4;
    margin: 0 0 0.5rem;
}

.pd-variance-sub {
    font-size: 0.9rem;
    color: #68717f;
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 540px) {
    .pd-variance-panel { flex-direction: column; gap: 0.85rem; }
    .pd-variance-line { font-size: 1.15rem; }
    .pd-stat-value { font-size: 1.6rem; }
}

/* ---------- Generic module card (reused by chunks 3-8) ---------- */
.pd-module {
    background: white;
    border-radius: var(--r-md);
    padding: 1.75rem 1.85rem;
    border: 1px solid #e3ddd3;
    box-shadow: var(--shadow-1);
}

.pd-module-header {
    margin-bottom: 1.25rem;
}

.pd-module-header h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 0.35rem;
}

.pd-module-header p {
    color: #68717f;
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.55;
}

.pd-chart-wrapper {
    position: relative;
    width: 100%;
}

.pd-chart-bar { height: 280px; }
.pd-chart-line { height: 320px; }

/* ---------- Type summary table (under the chart) ---------- */
.pd-type-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.pd-type-summary-card {
    background: #faf7f2;
    border-radius: var(--r-md);
    padding: 0.85rem 1rem;
    border: 1px solid #f2ede5;
}

.pd-type-summary-label {
    font-size: 0.78rem;
    color: #68717f;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.pd-type-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
    color: #48536a;
}

.pd-type-summary-row + .pd-type-summary-row {
    margin-top: 0.2rem;
}

.pd-type-summary-row strong { color: #1a2332; }

.pd-low-sample-note {
    margin-top: 1rem;
    padding: 0.7rem 1rem;
    background: #fbf6ea;
    border: 1px solid #ecd9ae;
    border-radius: var(--r-md);
    color: #7d4a12;
    font-size: 0.85rem;
}

.pd-chart-horizontal { min-height: 200px; }

/* ---------- Top / Bottom Performers ---------- */
.pd-performers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.pd-performers-grid.pd-single { grid-template-columns: 1fr; }

@media (max-width: 720px) {
    .pd-performers-grid { grid-template-columns: 1fr; }
}

.pd-performers-card {
    background: #faf7f2;
    border-radius: var(--r-md);
    border: 1px solid #f2ede5;
    overflow: hidden;
}

.pd-performers-card.pd-top { border-color: rgba(31, 122, 92, 0.25); }
.pd-performers-card.pd-bottom { border-color: rgba(168, 58, 44, 0.25); }

.pd-performers-header {
    padding: 0.85rem 1.1rem;
    font-family: 'Work Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f2ede5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-performers-card.pd-top .pd-performers-header {
    background: rgba(31, 122, 92, 0.08);
    color: #114a39;
}

.pd-performers-card.pd-bottom .pd-performers-header {
    background: rgba(168, 58, 44, 0.08);
    color: #7d271d;
}

.pd-performers-card.pd-single-card .pd-performers-header {
    background: rgba(255, 107, 74, 0.08);
    color: #b25531;
}

.pd-performers-table { width: 100%; border-collapse: collapse; }

.pd-performers-table th {
    text-align: left;
    padding: 0.55rem 1.1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #99a2b0;
    background: white;
    border-bottom: 1px solid #f2ede5;
}

.pd-performers-table th.num,
.pd-performers-table td.num { text-align: right; }

.pd-performers-table td {
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid #f2ede5;
    font-size: 0.92rem;
    color: #48536a;
    background: white;
}

.pd-performers-table tr:last-child td { border-bottom: none; }

.pd-performers-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    background: white;
    color: #68717f;
    border: 1.5px solid #e3ddd3;
    margin-right: 0.5rem;
}

.pd-performers-card.pd-top .pd-performers-rank {
    background: #1f7a5c;
    color: white;
    border-color: #1f7a5c;
}

.pd-performers-card.pd-bottom .pd-performers-rank {
    background: #a83a2c;
    color: white;
    border-color: #a83a2c;
}

.pd-performers-casino { font-weight: 600; color: #1a2332; }

.pd-performers-group {
    display: block;
    font-size: 0.74rem;
    color: #99a2b0;
    font-weight: 400;
    margin-top: 0.1rem;
}

.pd-performers-rate-good { color: #1f7a5c; font-weight: 700; }
.pd-performers-rate-mid { color: #965914; font-weight: 700; }
.pd-performers-rate-bad { color: #a83a2c; font-weight: 700; }

.pd-performers-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #99a2b0;
    font-size: 0.9rem;
    background: white;
}

/* ---------- Day-of-week heatmap ---------- */
.pd-dow-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.55rem;
}

.pd-dow-cell {
    border-radius: var(--r-md);
    padding: 1.15rem 0.5rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    transition: transform 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.pd-dow-cell.heat-0 { background: var(--wash); color: var(--ink); }
.pd-dow-cell.heat-1 { background: color-mix(in srgb, var(--coral) 19%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-2 { background: color-mix(in srgb, var(--coral) 26%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-3 { background: color-mix(in srgb, var(--coral) 33%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-4 { background: color-mix(in srgb, var(--coral) 40%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-5 { background: color-mix(in srgb, var(--coral) 47%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-6 { background: color-mix(in srgb, var(--coral) 54%, var(--surface)); color: var(--ink); }
.pd-dow-cell.heat-7 { background: color-mix(in srgb, var(--coral) 61%, var(--surface)); color: var(--surface); }
.pd-dow-cell.heat-8 { background: color-mix(in srgb, var(--coral) 68%, var(--surface)); color: var(--surface); }
.pd-dow-cell.heat-9 { background: color-mix(in srgb, var(--coral) 75%, var(--surface)); color: var(--surface); }
.pd-low-sample { color: var(--caution-deep); }
.pd-muted-count { color: var(--ink-45); }

.pd-dow-cell:hover { transform: translateY(-2px); }

.pd-dow-day {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.pd-dow-count {
    font-family: 'Crimson Pro', serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.pd-dow-share {
    font-size: 0.74rem;
    opacity: 0.78;
}

.pd-dow-note {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #68717f;
    text-align: center;
    line-height: 1.55;
}

@media (max-width: 540px) {
    .pd-dow-cell { min-height: 78px; padding: 0.7rem 0.3rem; gap: 0.2rem; }
    .pd-dow-day { font-size: 0.7rem; }
    .pd-dow-count { font-size: 1.3rem; }
    .pd-dow-share { font-size: 0.68rem; }
}

/* ---------- Period filter + custom range ---------- */
.pd-period-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pd-period-btn {
    padding: 0.45rem 1rem;
    border: 1.5px solid #e3ddd3;
    border-radius: var(--r-pill);
    background: white;
    color: #68717f;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pd-period-btn:hover { border-color: #ff6b4a; color: #ff6b4a; }

.pd-period-btn.active {
    background: #ff6b4a;
    border-color: #ff6b4a;
    color: white;
    font-weight: 600;
}

.pd-custom-range {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
    background: white;
    border: 1.5px solid #e3ddd3;
    border-radius: var(--r-md);
    padding: 0.85rem 1.1rem;
}

.pd-custom-range.open { display: flex; }

.pd-custom-range label {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #68717f;
}

.pd-custom-range input[type="date"] {
    padding: 0.45rem 0.65rem;
    border: 1.5px solid #e3ddd3;
    border-radius: var(--r-md);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    color: #48536a;
    background: white;
}

.pd-custom-range input[type="date"]:focus { outline: none; border-color: #ff6b4a; }

.pd-custom-range .pd-custom-range-sep { color: #99a2b0; font-size: 0.85rem; }

.pd-custom-range .pd-custom-range-clear {
    background: none;
    border: none;
    color: #68717f;
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-family: 'Work Sans', sans-serif;
}

.pd-custom-range .pd-custom-range-clear:hover { color: #ff6b4a; }
