/* PQC session tickets whitepaper — CSP compliant, no inline styles. */

:root {
    --pt-primary: #7dd3fc;
    --pt-primary-dark: #0284c7;
    --pt-accent: #a78bfa;
    --pt-good: #34d399;
    --pt-warn: #fbbf24;
    --pt-pink: #f472b6;
    --pt-bg: #080b12;
    --pt-card: #101520;
    --pt-text: #ffffff;
    --pt-text-dim: #94a3b8;
    --pt-muted: #64748b;
    --pt-border: #1f2937;
    --pt-code-bg: #0d1219;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: transparent;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--pt-bg);
    color: var(--pt-text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

code, pre {
    font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.pt-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--pt-border);
    background: rgba(8, 11, 18, 0.86);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.logo-link { display: block; flex-shrink: 0; }

.logo-image {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    display: block;
}

.page-title {
    font-size: clamp(1.65rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--pt-primary), var(--pt-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-subtitle {
    color: var(--pt-text-dim);
    font-size: 0.98rem;
    margin-top: 0.2rem;
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.pt-main {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.25rem 1.25rem 3rem;
}

.pt-main section {
    margin-bottom: 2.75rem;
}

.pt-h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pt-text);
    margin-bottom: 0.9rem;
}

.pt-main p {
    max-width: 76ch;
    color: var(--pt-text-dim);
    margin-bottom: 0.95rem;
}

.pt-main strong { color: var(--pt-text); }

.pt-main em {
    color: var(--pt-primary);
    font-style: normal;
}

.pt-lede p {
    font-size: 1.06rem;
}

.pt-warn {
    background: rgba(251, 191, 36, 0.07);
    border-left: 3px solid var(--pt-warn);
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.15rem;
    font-size: 0.95rem;
}

/* ── Steps ──────────────────────────────────────────────────────────── */

.pt-steps {
    counter-reset: pt-step;
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin: 1.1rem 0 1.6rem;
    max-width: 76ch;
}

.pt-steps li {
    counter-increment: pt-step;
    position: relative;
    padding: 0.85rem 1.1rem 0.85rem 3rem;
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    border-radius: 10px;
    color: var(--pt-text-dim);
    font-size: 0.93rem;
}

.pt-steps li::before {
    content: counter(pt-step);
    position: absolute;
    left: 1.05rem;
    top: 0.85rem;
    width: 1.35rem;
    height: 1.35rem;
    line-height: 1.35rem;
    text-align: center;
    border-radius: 50%;
    background: var(--pt-primary-dark);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── Figure ─────────────────────────────────────────────────────────── */

.pt-figure {
    margin: 1.5rem 0 0.5rem;
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    padding: 1.25rem;
    overflow-x: auto;
}

.pt-svg {
    display: block;
    width: 100%;
    min-width: 640px;
    height: auto;
}

.pt-figure figcaption {
    margin-top: 0.85rem;
    font-size: 0.84rem;
    color: var(--pt-muted);
    text-align: center;
}

/* ── Code ───────────────────────────────────────────────────────────── */

.pt-code {
    background: var(--pt-code-bg);
    border: 1px solid var(--pt-border);
    border-radius: 9px;
    padding: 0.95rem 1.1rem;
    overflow-x: auto;
    font-size: 0.86rem;
    margin: 0.75rem 0 1.1rem;
}

.pt-code code {
    color: var(--pt-primary);
    white-space: pre;
}

.pt-main :not(pre) > code {
    background: var(--pt-code-bg);
    border: 1px solid var(--pt-border);
    border-radius: 5px;
    padding: 0.08rem 0.35rem;
    font-size: 0.87em;
    color: var(--pt-accent);
}

/* ── Table ──────────────────────────────────────────────────────────── */

.pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.89rem;
    margin: 0.9rem 0 1.2rem;
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    border-radius: 10px;
    overflow: hidden;
}

.pt-table th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pt-text-dim);
    border-bottom: 1px solid var(--pt-border);
}

.pt-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.6);
    color: var(--pt-text-dim);
    vertical-align: top;
}

.pt-table td:first-child {
    color: var(--pt-primary);
    font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
    white-space: nowrap;
}

.pt-table td:nth-child(2) {
    color: var(--pt-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

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

.pt-total td {
    background: rgba(251, 191, 36, 0.06);
    font-weight: 600;
}

.pt-total td:first-child { color: var(--pt-warn); }

/* ── Limits ─────────────────────────────────────────────────────────── */

.pt-limits {
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    border-left: 4px solid var(--pt-pink);
    border-radius: 12px;
    padding: 1.6rem 1.75rem;
}

.pt-list {
    list-style: none;
    display: grid;
    gap: 0.7rem;
    margin: 0.9rem 0 1.2rem;
    max-width: 76ch;
}

.pt-list li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--pt-text-dim);
    font-size: 0.93rem;
}

.pt-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--pt-pink);
}

/* ── Notes & links ──────────────────────────────────────────────────── */

.pt-note {
    font-size: 0.87rem;
    color: var(--pt-muted);
}

.pt-main a,
.pt-footer a {
    color: var(--pt-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pt-main a:hover,
.pt-footer a:hover {
    color: var(--pt-accent);
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.pt-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--pt-border);
    padding: 1.5rem 1.25rem 2.5rem;
    text-align: center;
    color: var(--pt-text-dim);
    font-size: 0.87rem;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .pt-limits {
        padding: 1.2rem 1.1rem;
    }

    .pt-steps li {
        padding-left: 2.7rem;
    }
}
