:root {
    --bg: #fff6fb;
    --card: rgba(255, 255, 255, 0.94);
    --surface: #ffe7f1;
    --text: #5b2741;
    --muted: #8b6278;
    --line: #f0cddd;
    --primary: #e15a92;
    --primary-soft: #ffe2ee;
    --accent: #ff9ab8;
    --accent-strong: #bf3d73;
    --shadow: 0 18px 44px rgba(191, 61, 115, 0.12);
    --radius: 24px;
    --heading-font: 'Cormorant Garamond', serif;
    --body-font: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    position: relative;
    font-family: var(--body-font);
    background: var(--bg);
    color: var(--text);
}

body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.7;
}

body::before {
    width: 320px;
    height: 320px;
    top: -90px;
    right: -80px;
    background: radial-gradient(circle, rgba(255, 154, 184, 0.72) 0%, rgba(255, 154, 184, 0) 72%);
}

body::after {
    width: 420px;
    height: 420px;
    left: -140px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(255, 223, 235, 0.95) 0%, rgba(255, 223, 235, 0) 72%);
}

h1,
h2,
h3,
.brand strong {
    font-family: var(--heading-font);
    font-weight: 700;
    letter-spacing: 0.02em;
}

a,
button,
input,
select,
iframe {
    transition: all 0.2s ease;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 248, 252, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(240, 205, 221, 0.92);
}

.topbar,
.nav-wrap,
.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar {
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    text-decoration: none;
}

.brand strong {
    font-size: 28px;
    line-height: 0.95;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.topbar-note,
.page-lead,
.section-head p,
.panel-head p,
.analysis-banner p,
.info-card p,
.download-card span,
.guide-card p,
.page-card p,
.site-footer p,
.insight-list,
.alert-banner {
    color: var(--muted);
    line-height: 1.7;
}

.brand-mark {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffb2ca 0%, var(--primary) 55%, var(--accent-strong) 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 16px 28px rgba(191, 61, 115, 0.24);
}

.topbar-note {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(240, 205, 221, 0.9);
}

.main-nav {
    border-top: 1px solid rgba(240, 205, 221, 0.78);
}

.nav-wrap {
    flex-wrap: wrap;
    padding: 12px 0;
    justify-content: flex-start;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}

.nav-link:hover {
    background: rgba(255, 226, 238, 0.82);
    color: var(--accent-strong);
}

.nav-link.active {
    background: var(--primary-soft);
    color: var(--accent-strong);
    box-shadow: inset 0 0 0 1px rgba(225, 90, 146, 0.14);
}

.page-hero {
    padding: 42px 0 26px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 208, 224, 0.96) 0%, rgba(255, 208, 224, 0) 30%),
        radial-gradient(circle at 88% 22%, rgba(255, 237, 244, 0.98) 0%, rgba(255, 237, 244, 0) 34%),
        linear-gradient(135deg, #fff8fb 0%, #ffeaf3 42%, #fff3f7 100%);
    border-bottom: 1px solid rgba(240, 205, 221, 0.95);
}

.page-hero::before,
.page-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.page-hero::before {
    width: 220px;
    height: 220px;
    right: 8%;
    bottom: -90px;
    background: rgba(255, 182, 204, 0.18);
    border: 1px solid rgba(255, 182, 204, 0.35);
}

.page-hero::after {
    width: 140px;
    height: 140px;
    left: 16%;
    top: -36px;
    background: rgba(255, 154, 184, 0.12);
    border: 1px solid rgba(255, 154, 184, 0.22);
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.badge,
.section-label,
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--accent-strong);
    border: 1px solid rgba(240, 205, 221, 0.9);
    font-size: 13px;
    font-weight: 800;
}

.page-hero h1,
.section-head h2,
.analysis-banner h2,
.info-card h2 {
    margin: 16px 0 10px;
    line-height: 1.08;
}

.page-hero h1 {
    font-size: clamp(30px, 4.6vw, 52px);
}

.hero-summary-card,
.info-card,
.stat-card,
.panel,
.filter-card,
.analysis-banner,
.download-card,
.guide-card,
.page-card,
.alert-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 246, 250, 0.96) 100%);
    border: 1px solid rgba(240, 205, 221, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-summary-card::before,
.info-card::before,
.stat-card::before,
.panel::before,
.filter-card::before,
.analysis-banner::before,
.download-card::before,
.guide-card::before,
.page-card::before,
.alert-banner::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, rgba(255, 154, 184, 0.9), rgba(225, 90, 146, 0.82), rgba(255, 214, 227, 0.88));
    z-index: -1;
}

.hero-summary-card {
    padding: 24px;
}

.hero-summary-card h3 {
    margin: 0 0 14px;
}

.chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.section {
    padding: 34px 0 74px;
}

.section-muted {
    background: linear-gradient(180deg, #fff8fb 0%, #ffeef5 100%);
    border-top: 1px solid rgba(240, 205, 221, 0.95);
    border-bottom: 1px solid rgba(240, 205, 221, 0.95);
}

.section-head {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-head h2,
.analysis-banner h2,
.info-card h2 {
    font-size: clamp(26px, 3.6vw, 38px);
}

.alert-banner {
    padding: 16px 18px;
    margin-bottom: 24px;
}

.alert-success {
    background: linear-gradient(180deg, #fff6fb 0%, #ffe9f2 100%);
    border-color: #f2bfd3;
    color: #a53867;
}

.alert-error {
    background: linear-gradient(180deg, #fff5f8 0%, #ffe5ea 100%);
    border-color: #f2c0cb;
    color: #a8445f;
}

code {
    background: #f3f7fc;
    padding: 2px 6px;
    border-radius: 8px;
    font-family: inherit;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 18px;
}

.info-card,
.stat-card,
.filter-card,
.panel,
.analysis-banner,
.guide-card {
    padding: 24px;
}

.accent-card {
    background: linear-gradient(135deg, #fff9fc 0%, #ffe4ef 55%, #fff4f8 100%);
}

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.mini-stat-card span,
.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.mini-stat-card strong,
.stat-card strong {
    display: block;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-card small {
    color: var(--muted);
}

.filter-card {
    margin-bottom: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
}

.filter-grid select {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    border: 1px solid rgba(240, 205, 221, 0.95);
    background: rgba(255, 251, 253, 0.96);
    font: inherit;
    padding: 0 14px;
    color: var(--text);
}

.filter-grid select:focus,
.upload-field input[type="file"]:focus {
    outline: none;
    border-color: rgba(225, 90, 146, 0.86);
    box-shadow: 0 0 0 4px rgba(225, 90, 146, 0.14);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 14px;
    text-decoration: none;
    border: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(191, 61, 115, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-strong) 100%);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    border: 1px solid rgba(240, 205, 221, 0.95);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 26px rgba(191, 61, 115, 0.16);
}

.btn-full {
    width: 100%;
}

.btn-small {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 238, 245, 0.96) 100%);
}

.chart-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.chart-grid-main {
    grid-template-columns: 1.1fr 1fr;
}

.chart-grid-secondary {
    grid-template-columns: repeat(3, 1fr);
}

.chart-grid-bottom {
    grid-template-columns: 1.2fr 0.8fr;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head h3,
.download-card strong,
.page-card h3,
.guide-card h3 {
    margin: 0 0 6px;
    color: var(--accent-strong);
    font-size: clamp(22px, 2.8vw, 30px);
    line-height: 1.02;
}

.canvas-wrap {
    position: relative;
    width: 100%;
}

.canvas-medium {
    height: 320px;
}

.canvas-tall {
    height: 420px;
}

.canvas-small {
    height: 270px;
}

.insight-panel {
    display: flex;
    flex-direction: column;
}

.meta-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 248, 252, 0.98) 0%, rgba(255, 237, 244, 0.98) 100%);
    border: 1px solid rgba(240, 205, 221, 0.95);
}

.meta-card-plain {
    padding: 0;
    background: transparent;
    border: none;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(240, 205, 221, 0.9);
}

.meta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-row span {
    color: var(--muted);
    font-weight: 700;
}

.meta-row strong {
    text-align: right;
}

.insight-list {
    margin: 0;
    padding-left: 18px;
}

.insight-list li + li {
    margin-top: 12px;
}

.insight-list a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 700;
}

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.data-table thead {
    background: #fff0f6;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: #fff8fb;
}

.page-card-grid,
.download-grid,
.guide-grid,
.analysis-grid,
.report-grid {
    display: grid;
    gap: 18px;
}

.page-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-card,
.download-card {
    text-decoration: none;
    color: var(--text);
    padding: 24px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.page-card:hover,
.download-card:hover {
    transform: translateY(-3px);
    border-color: rgba(225, 90, 146, 0.42);
    box-shadow: 0 20px 34px rgba(191, 61, 115, 0.16);
}

.download-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-banner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    margin-bottom: 18px;
}

.analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.upload-form {
    display: grid;
    gap: 14px;
}

.upload-field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.upload-field input[type="file"] {
    width: 100%;
    min-height: 56px;
    padding: 14px;
    border-radius: 14px;
    border: 1px dashed rgba(225, 90, 146, 0.48);
    background: rgba(255, 249, 252, 0.96);
    font: inherit;
    color: var(--text);
}

.form-help {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.panel-gap {
    margin-top: 18px;
}

.empty-state {
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 251, 253, 0.98) 0%, rgba(255, 240, 246, 0.98) 100%);
    border: 1px dashed rgba(225, 90, 146, 0.36);
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-card {
    padding: 24px;
    background: linear-gradient(180deg, #fffefe 0%, #fff1f7 100%);
    border: 1px solid rgba(240, 205, 221, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.report-card:hover {
    transform: translateY(-3px);
    border-color: rgba(225, 90, 146, 0.44);
    box-shadow: 0 20px 34px rgba(191, 61, 115, 0.15);
}

.report-card-head h3 {
    margin: 12px 0 8px;
}

.report-card-head p,
.report-summary {
    color: var(--muted);
    line-height: 1.7;
}

.report-card-head p {
    margin: 0;
}

.report-summary {
    display: grid;
    gap: 4px;
    margin: 16px 0;
}

.report-summary strong {
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff0f6;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.pill-success {
    background: #ffe0ec;
    color: var(--accent-strong);
}

.action-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pdf-preview {
    width: 100%;
    min-height: 720px;
    border: 1px solid rgba(240, 205, 221, 0.95);
    border-radius: 18px;
    background: #fff;
}

.site-footer {
    border-top: 1px solid rgba(240, 205, 221, 0.95);
    background: linear-gradient(180deg, #fff9fc 0%, #fff1f7 100%);
    padding: 24px 0 40px;
}

.footer-wrap {
    align-items: flex-start;
}

@media (max-width: 1100px) {
    .overview-grid,
    .stats-grid,
    .chart-grid-main,
    .chart-grid-secondary,
    .chart-grid-bottom,
    .page-card-grid,
    .download-grid,
    .analysis-grid,
    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guide-grid,
    .page-hero-grid,
    .analysis-banner {
        grid-template-columns: 1fr;
    }

    .overview-grid .accent-card {
        grid-column: 1 / -1;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container {
        width: min(1180px, calc(100% - 22px));
    }

    .topbar,
    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-wrap,
    .filter-grid,
    .overview-grid,
    .stats-grid,
    .chart-grid-main,
    .chart-grid-secondary,
    .chart-grid-bottom,
    .page-card-grid,
    .download-grid,
    .guide-grid,
    .analysis-grid,
    .report-grid,
    .analysis-banner {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 28px 0 56px;
    }

    .page-hero {
        padding-top: 28px;
    }

    .page-hero h1 {
        font-size: 30px;
    }

    .panel,
    .info-card,
    .stat-card,
    .guide-card,
    .analysis-banner,
    .filter-card,
    .download-card,
    .page-card {
        padding: 20px;
    }

    .canvas-medium,
    .canvas-tall,
    .canvas-small {
        height: 280px;
    }

    .data-table {
        min-width: 100%;
    }

    .meta-row {
        flex-direction: column;
    }

    .meta-row strong {
        text-align: left;
    }

    .pdf-preview {
        min-height: 520px;
    }
}
