/* ═══════════════════════════════════════════════════
   Thesis Page Styles
   ═══════════════════════════════════════════════════ */

.thesis-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ── Hero ── */
.thesis-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}
.thesis-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}
.thesis-subtitle {
    color: #475569;
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Language Toggle ── */
.thesis-lang-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0 2.5rem;
}
.thesis-lang-btn {
    background: rgba(203, 213, 225, 0.3);
    border: 1px solid rgba(203, 213, 225, 0.4);
    color: #475569;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.thesis-lang-btn.active {
    background: rgba(54, 208, 234, 0.15);
    border-color: rgba(54, 208, 234, 0.4);
    color: #36d0ea;
}

/* ── Sections ── */
.thesis-section {
    background: rgba(241, 245, 249, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.thesis-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.thesis-section h2 i {
    color: #36d0ea;
    font-size: 1.1rem;
}
.thesis-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin: 1.5rem 0 0.5rem;
}
.thesis-section p {
    color: #475569;
    line-height: 1.75;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.thesis-section ul {
    color: #475569;
    line-height: 1.75;
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    font-size: 0.9rem;
}
.thesis-section li {
    margin-bottom: 0.4rem;
}
.thesis-section strong {
    color: #475569;
}

/* ── Highlight Box ── */
.thesis-highlight {
    background: rgba(54, 208, 234, 0.06);
    border-left: 3px solid #36d0ea;
    padding: 1rem 1.2rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}
.thesis-highlight p {
    color: #475569;
    margin: 0;
}

/* ── Warning Box ── */
.thesis-warning {
    background: rgba(153, 27, 27, 0.06);
    border-left: 3px solid #991b1b;
    padding: 1rem 1.2rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}
.thesis-warning p {
    color: #475569;
    margin: 0;
}

/* ── Decision Flow ── */
.decision-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.flow-step {
    background: rgba(203, 213, 225, 0.3);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
    min-width: 90px;
}
.flow-step.active {
    background: rgba(54, 208, 234, 0.15);
    border-color: rgba(54, 208, 234, 0.4);
    color: #36d0ea;
}
.flow-step.danger {
    background: rgba(153, 27, 27, 0.15);
    border-color: rgba(153, 27, 27, 0.4);
    color: #991b1b;
}
.flow-arrow {
    color: #475569;
    font-size: 1.2rem;
}

/* ── SSVC/LEV Diagram ── */
.score-diagram {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1.5rem 0;
}
.score-cell {
    text-align: center;
    padding: 0.8rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}
.score-cell.header {
    background: rgba(203, 213, 225, 0.3);
    color: #475569;
    font-weight: 700;
}
.score-cell.act { background: rgba(153, 27, 27, 0.2); color: #991b1b; }
.score-cell.attend { background: rgba(245, 158, 11, 0.2); color: #475569; }
.score-cell.track-star { background: rgba(54, 208, 234, 0.2); color: #36d0ea; }
.score-cell.track { background: rgba(16, 185, 129, 0.2); color: #0e7490; }

/* ── KPI Grid Example ── */
.kpi-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
}
.kpi-example-card {
    background: rgba(203, 213, 225, 0.2);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
}
.kpi-example-card .kpi-ex-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #334155;
}
.kpi-example-card .kpi-ex-label {
    font-size: 0.7rem;
    color: #64748B;
    margin-top: 0.2rem;
}

/* ── Paper-style elements (used by /thesis/kev-predictor) ── */
.paper-meta {
    display: flex; flex-wrap: wrap; gap: 1.2rem 2rem;
    padding: 0.9rem 1.1rem; margin: 0 0 1.5rem;
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 8px;
    font-size: 0.8rem; color: #475569;
}
.paper-meta strong { color: #334155; font-weight: 600; }

.paper-abstract {
    background: rgba(241, 245, 249, 0.5);
    border-left: 3px solid #36d0ea;
    padding: 1.1rem 1.3rem;
    margin: 0 0 2rem;
    border-radius: 0 8px 8px 0;
}
.paper-abstract h3 {
    margin: 0 0 0.5rem; font-size: 0.78rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: #36d0ea; font-weight: 700;
}
.paper-abstract p { color: #475569; font-size: 0.92rem; line-height: 1.7; margin: 0.4rem 0; }

.metrics-table {
    width: 100%; border-collapse: collapse;
    margin: 1rem 0; font-size: 0.85rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.3);
}
.metrics-table th, .metrics-table td {
    padding: 0.6rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(203, 213, 225, 0.25);
}
.metrics-table th {
    background: rgba(241, 245, 249, 0.9);
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.metrics-table td { color: #475569; }
.metrics-table td.num,
.metrics-table th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: 'SF Mono', Menlo, monospace; }
.metrics-table tr:last-child td { border-bottom: none; }
.metrics-table tr:hover td { background: rgba(203, 213, 225, 0.15); }

.case-card {
    background: rgba(248, 250, 252, 0.55);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-left: 3px solid #475569;
    border-radius: 8px;
    padding: 1.1rem 1.3rem;
    margin: 1rem 0;
}
.case-card.success { border-left-color: #0e7490; }
.case-card.warning { border-left-color: #475569; }
.case-card.danger  { border-left-color: #991b1b; }
.case-card .case-head {
    display: flex; flex-wrap: wrap; align-items: baseline;
    gap: 0.5rem 1rem; margin-bottom: 0.6rem;
}
.case-card .case-head .case-label {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 700;
}
.case-card.success .case-label { color: #0e7490; }
.case-card.warning .case-label { color: #475569; }
.case-card.danger  .case-label { color: #991b1b; }
.case-card .case-cve {
    font-family: 'SF Mono', Menlo, monospace;
    color: #334155; font-weight: 700; font-size: 0.95rem;
}
.case-card .case-meta {
    color: #64748B; font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.case-card p { margin: 0.5rem 0; }
.case-card .case-pill {
    display: inline-block;
    padding: 1px 8px; border-radius: 999px;
    font-size: 0.7rem; font-weight: 600;
    background: rgba(203, 213, 225, 0.35); color: #475569;
    margin-right: 4px;
}

.paper-section-link {
    display: block;
    background: rgba(241, 245, 249, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.paper-section-link:hover {
    border-color: rgba(54, 208, 234, 0.45);
    transform: translateY(-1px);
}
.paper-section-link .pl-title {
    color: #334155; font-weight: 600; font-size: 0.95rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.paper-section-link .pl-title i { color: #36d0ea; }
.paper-section-link .pl-desc {
    color: #475569; font-size: 0.82rem; margin-top: 0.35rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .thesis-container { padding: 1rem; }
    .thesis-title { font-size: 1.6rem; }
    .thesis-section { padding: 1.2rem; }
    .score-diagram { grid-template-columns: repeat(2, 1fr); }
    .decision-flow { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .metrics-table { font-size: 0.78rem; }
    .metrics-table th, .metrics-table td { padding: 0.45rem 0.6rem; }
}
