/* ── Reset & tokens ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg0:        #f5f9f8;
    --bg1:        #ffffff;
    --bg2:        #f0f7f4;
    --bg3:        #e5f2ed;
    --brand:      #4eb39a;
    --brand-dark: #3a9b83;
    --brand-deep: #0e2d27;
    --brand-glow: rgba(78,179,154,0.18);
    --accent:     #00d4a4;
    --amber:      #d97706;
    --red:        #dc2626;
    --blue:       #2563eb;
    --purple:     #7c3aed;
    --text0:      #1a2e2b;
    --text1:      #3d6b63;
    --text2:      #6b8f88;
    --border:     rgba(78,179,154,0.18);
    --radius:     10px;
    --radius-lg:  16px;
    --shadow:     0 2px 12px rgba(14,45,39,0.08);
    --shadow-lg:  0 8px 32px rgba(14,45,39,0.12);
    --mono:       'DM Mono', monospace;
    --sans:       'DM Sans', sans-serif;
}

body { background: var(--bg0); color: var(--text0); font-family: var(--sans); }

/* ── Masthead / Hero ─────────────────────────────── */
.pq-masthead {
    background: linear-gradient(145deg, #0e2d27 0%, #133b30 55%, #0a2420 100%);
    border-bottom: 1px solid rgba(78,179,154,0.2);
    padding: 3rem 1.5rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.pq-masthead::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 70% 50%, rgba(78,179,154,0.09) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 10% 20%, rgba(0,212,164,0.06) 0%, transparent 50%);
    pointer-events: none;
}
/* Decorative grid lines */
.pq-masthead::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(78,179,154,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78,179,154,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.pq-masthead-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.pq-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(78,179,154,0.12);
    border: 1px solid rgba(78,179,154,0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.pq-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.8)} }

.pq-masthead h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.18;
    letter-spacing: -0.5px;
    margin-bottom: 0.85rem;
    max-width: 680px;
}
.pq-masthead h1 em {
    font-style: normal;
    color: var(--accent);
}
.pq-masthead p.lead {
    color: rgba(255,255,255,0.72);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 620px;
    margin-bottom: 2rem;
}
.pq-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.pq-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}
.pq-stat strong { color: var(--accent); font-family: var(--mono); font-size: 1rem; }
.pq-stat svg { opacity: 0.5; flex-shrink: 0; }

/* ── Page body ───────────────────────────────────── */
.pq-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ── Section headings ─────────────────────────────── */
.pq-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 1.5rem;
}
.pq-section-head h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text0);
    letter-spacing: -0.3px;
}
.pq-section-head .cnt {
    font-family: var(--mono);
    font-size: 0.75rem;
    background: var(--bg3);
    color: var(--brand);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 10px;
}

/* ── Dataset cards grid ─────────────────────────── */
.datasets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.ds-card {
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
    display: flex;
    flex-direction: column;
}
.ds-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(78,179,154,0.4);
}

.ds-card-header {
    padding: 1.2rem 1.4rem 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}
.ds-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}
.ds-icon.teal   { background: #e1f5ee; }
.ds-icon.blue   { background: #eff6ff; }
.ds-icon.amber  { background: #fff8e6; }
.ds-icon.purple { background: #f3f0ff; }
.ds-icon.red    { background: #fff0f0; }

.ds-card-title { flex: 1; }
.ds-card-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 2px;
    line-height: 1.3;
}
.ds-card-title .ds-filename {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--brand);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 7px;
    display: inline-block;
}

.ds-card-meta {
    padding: 0.85rem 1.4rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.ds-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ds-meta-item .label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text2);
}
.ds-meta-item .value {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text0);
}

/* Schema table */
.ds-schema {
    padding: 0 1.4rem 0.85rem;
    flex: 1;
}
.ds-schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.ds-schema-table thead th {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text2);
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.ds-schema-table tbody tr:hover { background: var(--bg2); }
.ds-schema-table tbody td {
    padding: 5px 8px;
    color: var(--text0);
    border-bottom: 1px solid rgba(78,179,154,0.07);
    vertical-align: middle;
}
.ds-schema-table tbody tr:last-child td { border-bottom: none; }
.col-name { font-family: var(--mono); font-weight: 600; color: var(--text0); font-size: 0.78rem; }
.type-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
}
.type-i32  { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.type-i64  { background:#e3f2fd; color:#1565c0; border:1px solid #90caf9; }
.type-str  { background:#fff8e1; color:#e65100; border:1px solid #ffcc80; }
.type-flt  { background:#f3e5f5; color:#6a1b9a; border:1px solid #ce93d8; }
.type-dbl  { background:#e0f7fa; color:#00695c; border:1px solid #80cbc4; }
.type-bool { background:#fbe9e7; color:#bf360c; border:1px solid #ffab91; }
.nullable-badge {
    font-size: 0.6rem;
    font-family: var(--mono);
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
}

.sample-cell { color: var(--text1); font-size: 0.75rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Download bar */
.ds-card-foot {
    padding: 0.9rem 1.4rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg2);
    flex-wrap: wrap;
}
.ds-size-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.file-size {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text2);
}
.parquet-v { font-family: var(--mono); font-size: 0.68rem; color: var(--brand); background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: background 0.18s, transform 0.15s;
    white-space: nowrap;
}
.btn-download:hover { background: var(--brand-dark); transform: translateY(-1px); color: #fff; }
.btn-download svg { flex-shrink: 0; }

/* ── What is Parquet info section ───────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}
.info-card {
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.4rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s;
}
.info-card:hover { border-color: rgba(78,179,154,0.4); }
.info-card-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--brand-glow);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.9rem;
}
.info-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 0.4rem;
}
.info-card p {
    font-size: 0.83rem;
    color: var(--text1);
    line-height: 1.6;
}

/* ── FAQ ─────────────────────────────────────────── */
.faq-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 3rem; }
.faq-item {
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
    font-family: var(--sans);
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text0);
    transition: background 0.15s;
}
.faq-q:hover { background: var(--bg2); }
.faq-q .chevron { flex-shrink: 0; transition: transform 0.25s; color: var(--brand); }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); }
.faq-a {
    display: none;
    padding: 0 1.3rem 1.1rem;
    font-size: 0.87rem;
    color: var(--text1);
    line-height: 1.7;
    border-top: 1px solid var(--border);
}
.faq-item.open .faq-a { display: block; }
.faq-a code {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0 5px;
    color: var(--brand-dark);
}
.faq-a pre {
    font-family: var(--mono);
    font-size: 0.78rem;
    background: var(--brand-deep);
    color: #a8e6d4;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    line-height: 1.7;
}

/* ── Use cases strip ────────────────────────────── */
.usecases-strip {
    background: linear-gradient(135deg, #0e2d27 0%, #163d31 100%);
    border: 1px solid rgba(78,179,154,0.15);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 2.25rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.usecases-strip::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(78,179,154,0.07) 0%, transparent 60%);
    pointer-events: none;
}
.usecases-strip h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
}
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
    position: relative;
}
.usecase-pill {
    background: rgba(78,179,154,0.08);
    border: 1px solid rgba(78,179,154,0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background 0.18s, border-color 0.18s;
}
.usecase-pill:hover { background: rgba(78,179,154,0.14); border-color: rgba(78,179,154,0.35); }
.usecase-pill span { font-size: 0.83rem; font-weight: 500; color: rgba(255,255,255,0.82); }
.usecase-pill .icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Comparison table ───────────────────────────── */
.comparison-wrapper {
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}
.comparison-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.comparison-wrapper thead th {
    background: var(--bg3);
    padding: 10px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text1);
    border-bottom: 1px solid var(--border);
}
.comparison-wrapper thead th:first-child { color: var(--text0); }
.comparison-wrapper tbody tr:nth-child(even) { background: var(--bg0); }
.comparison-wrapper tbody tr:hover { background: var(--bg2); }
.comparison-wrapper tbody td {
    padding: 10px 16px;
    color: var(--text0);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.comparison-wrapper tbody tr:last-child td { border-bottom: none; }
.tick { color: var(--brand); font-size: 1rem; font-weight: 700; }
.cross { color: var(--red); }
.partial { color: var(--amber); }
.feat-name { font-weight: 600; }
.parquet-col { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--brand); }

/* ── Schema explainer section ─────────────────────── */
.schema-explainer {
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}
.schema-explainer h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 0.4rem;
}
.schema-explainer p.sub {
    color: var(--text2);
    font-size: 0.87rem;
    margin-bottom: 1.5rem;
}
.schema-anatomy {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.anatomy-piece {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}
.anatomy-piece h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text0);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.anatomy-piece p { font-size: 0.78rem; color: var(--text1); line-height: 1.55; }
.anatomy-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
    .pq-masthead { padding: 2rem 1rem 2.5rem; }
    .pq-body { padding: 1.75rem 1rem 3rem; }
    .datasets-grid { grid-template-columns: 1fr; }
    .usecases-grid { grid-template-columns: 1fr 1fr; }
    .comparison-wrapper { overflow-x: auto; }
    .schema-anatomy { grid-template-columns: 1fr 1fr; }
}
