/* Extracted from pages/paper9.html */
.p9-wrap { max-width: 820px; margin: 0 auto; padding: 0 1.5rem 5rem; }
.lede { font-size: 1.1rem; line-height: 1.7; color: var(--text-dim); max-width: 680px; margin-bottom: 2rem; }

/* ── Three.js canvas ────────────────────────────────────── */
#p9-canvas-wrap {
    width: 100%; height: 420px;
    border-bottom: 2px solid var(--border);
    position: relative;
    background: #0a0a0a;
}
#p9-canvas-wrap canvas { display: block; }
#p9-phase-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 0.6rem 1.25rem;
    background: rgba(10,10,10,0.85);
    font-family: var(--font-mono); font-size: 0.78rem;
    color: var(--text-dim); line-height: 1.5;
    border-top: 1px solid var(--border);
}
.canvas-hint {
    position: absolute; top: 1rem; right: 1.25rem;
    font-size: 0.7rem; color: var(--text-faint);
    letter-spacing: 0.04em;
}

/* ── Etymology ──────────────────────────────────────────── */
.etymology-box {
    border: 2px solid var(--border); padding: 1.25rem;
    margin: 2rem 0; background: var(--surface-2);
}
.etymology-box .box-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 0.6rem;
}
.etymology-box p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.65; margin: 0; }

/* ── Phase table ────────────────────────────────────────── */
.pe-scale { margin: 2.5rem 0; border: 2px solid var(--border); }
.pe-scale-header {
    display: grid; grid-template-columns: 90px 90px 1fr 1fr;
    background: var(--surface-2); border-bottom: 2px solid var(--border);
}
.pe-scale-header > div {
    padding: 0.6rem 1rem; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint);
}
.pe-row {
    display: grid; grid-template-columns: 90px 90px 1fr 1fr;
    border-bottom: 1px solid var(--border); align-items: start;
}
.pe-row:last-child { border-bottom: none; }
.pe-row > div { padding: 1rem; font-size: 0.85rem; line-height: 1.5; }
.pe-row .phase-name { font-weight: 700; font-family: var(--font-display); }
.pe-row .phase-pe { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }
.pe-row .phase-desc { color: var(--text-dim); }
.pe-row .phase-example { color: var(--text-dim); font-size: 0.82rem; }
.pe-row.vortex-row { background: var(--surface-2); }
.pe-row.vortex-row .phase-name { color: var(--text); }

/* ── Threshold block ────────────────────────────────────── */
.threshold-block {
    border: 2px solid var(--border); padding: 1.5rem; margin: 2.5rem 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.threshold-col { padding: 0 1.25rem; }
.threshold-col:first-child { border-right: 2px solid var(--border); padding-left: 0; }
.threshold-col:last-child { padding-right: 0; }
.threshold-label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 0.5rem;
}
.threshold-num {
    font-family: var(--font-display); font-weight: 900; font-size: 2.8rem;
    letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.4rem;
}
.threshold-col p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; margin: 0; }

.section-divider { border-top: 2px solid var(--border); padding-top: 2rem; margin-top: 2.5rem; }

@media (max-width: 640px) {
    #p9-canvas-wrap { height: 320px; }
    .pe-scale-header, .pe-row { grid-template-columns: 80px 70px 1fr; }
    .pe-scale-header > div:last-child, .pe-row > div:last-child { display: none; }
    .threshold-block { grid-template-columns: 1fr; }
    .threshold-col:first-child { border-right: none; border-bottom: 2px solid var(--border); padding-left: 0; padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
    .threshold-col:last-child { padding-right: 0; }
}
