/*
 * Trade Print program styles (/trade-print/*).
 * Builds on public-site.css tokens; adds hub-specific layout + tier cards.
 * Dark and light parity inherited from the token layer.
 */

.tp-main { background: var(--surface-0, #0b0b10); color: var(--text-primary, #eef); min-height: 100vh; }
.tp-shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tp-shell-narrow { max-width: 760px; }
.tp-h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin: 16px 0 20px; letter-spacing: -0.02em; }
.tp-h2 { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.1; margin: 0 0 24px; letter-spacing: -0.015em; }
.tp-eyebrow { color: var(--brand-500, #c084fc); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0; }
.tp-eyebrow a { color: inherit; text-decoration: none; }
.tp-sub { font-size: 18px; line-height: 1.5; color: var(--text-secondary, #c6c6d1); max-width: 760px; margin: 0 0 28px; }

.tp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tp-cta-row-center { justify-content: center; }
.tp-btn { display: inline-block; padding: 14px 24px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease; font-size: 15px; }
.tp-btn:hover { transform: translateY(-1px); }
.tp-btn-primary { background: var(--brand-600, #8e21ca); color: #fff; box-shadow: 0 4px 20px rgba(142, 33, 202, 0.3); }
.tp-btn-primary:hover { background: var(--brand-700, #7619ac); }
.tp-btn-ghost { background: transparent; color: var(--text-primary, #eef); border-color: var(--border-strong, #3a3a46); }
.tp-btn-ghost:hover { background: var(--surface-1, #15151c); }

/* Hero */
.tp-hero { padding: 72px 0 64px; background: radial-gradient(circle at 20% 30%, rgba(142, 33, 202, 0.14), transparent 60%); }
.tp-hero-proof { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.tp-hero-proof li { display: flex; flex-direction: column; }
.tp-hero-proof strong { color: var(--text-primary, #eef); font-size: 16px; }
.tp-hero-proof span { color: var(--text-secondary, #a0a0ab); font-size: 14px; margin-top: 4px; }

/* Tiers row (home + full matrix) */
.tp-tiers-row { padding: 72px 0; border-top: 1px solid var(--border-subtle, #22222b); }
.tp-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 32px 0 16px; }
.tp-tier-card { position: relative; background: var(--surface-1, #15151c); border: 1px solid var(--border-subtle, #22222b); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; }
.tp-tier-featured { border-color: var(--brand-500, #c084fc); box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.08); }
.tp-tier-flag { position: absolute; top: -12px; right: 20px; background: var(--brand-600, #8e21ca); color: #fff; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.tp-tier-name { font-size: 20px; font-weight: 700; margin: 0; }
.tp-tier-price { margin: 8px 0 0; font-size: 15px; color: var(--text-secondary, #a0a0ab); }
.tp-tier-price span { font-size: 36px; font-weight: 700; color: var(--text-primary, #eef); }
.tp-tier-tag { font-size: 14px; color: var(--text-secondary, #a0a0ab); margin: 10px 0 20px; }
.tp-tier-list { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.tp-tier-list li { font-size: 14px; line-height: 1.5; padding: 6px 0; border-bottom: 1px solid var(--border-subtle, #22222b); color: var(--text-primary, #eef); }
.tp-tier-list li:last-child { border-bottom: 0; }
.tp-tier-cta { display: block; text-align: center; padding: 12px 16px; background: var(--surface-2, #1e1e26); border: 1px solid var(--border-subtle, #22222b); border-radius: 10px; color: var(--text-primary, #eef); text-decoration: none; font-weight: 600; }
.tp-tier-cta:hover { background: var(--brand-600, #8e21ca); color: #fff; border-color: var(--brand-600, #8e21ca); }
.tp-tier-footnote { margin-top: 24px; color: var(--text-secondary, #a0a0ab); font-size: 14px; }
.tp-tier-footnote a { color: var(--brand-500, #c084fc); }

/* Why */
.tp-why { padding: 72px 0; border-top: 1px solid var(--border-subtle, #22222b); }
.tp-why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.tp-why-card { background: var(--surface-1, #15151c); border: 1px solid var(--border-subtle, #22222b); border-radius: 12px; padding: 24px; }
.tp-why-card h3 { margin: 0 0 10px; font-size: 18px; }
.tp-why-card p { margin: 0; color: var(--text-secondary, #c6c6d1); line-height: 1.5; font-size: 14px; }

/* vs incumbents */
.tp-vs { padding: 72px 0; border-top: 1px solid var(--border-subtle, #22222b); }
.tp-vs-sub { color: var(--text-secondary, #a0a0ab); margin: 0 0 24px; }
.tp-vs-table-wrap { overflow-x: auto; }
.tp-vs-table, .tp-matrix-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface-1, #15151c); border-radius: 12px; overflow: hidden; }
.tp-vs-table th, .tp-vs-table td, .tp-matrix-table th, .tp-matrix-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-subtle, #22222b); }
.tp-vs-table thead th, .tp-matrix-table thead th { background: var(--surface-2, #1e1e26); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary, #a0a0ab); }
.tp-vs-us { background: rgba(142, 33, 202, 0.1); }
.tp-vs-us th { color: var(--brand-500, #c084fc); }
.tp-vs-note { margin: 20px 0 24px; color: var(--text-secondary, #c6c6d1); font-size: 14px; max-width: 760px; line-height: 1.5; }
.tp-vs-links { display: flex; gap: 20px; flex-wrap: wrap; }
.tp-vs-links a { color: var(--brand-500, #c084fc); text-decoration: none; font-size: 14px; }

/* Matrix (tiers page) */
.tp-matrix { padding: 48px 0 72px; }
.tp-matrix-wrap { overflow-x: auto; }
.tp-matrix-table th:first-child { width: 36%; }
.tp-matrix-featured { background: rgba(142, 33, 202, 0.08); }
.tp-matrix-group { background: var(--surface-0, #0b0b10); color: var(--text-secondary, #a0a0ab); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 20px; padding-bottom: 10px; }
.tp-matrix-price-row td { font-weight: 700; font-size: 16px; }
.tp-matrix-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; justify-content: center; }

/* Page head (sub-pages) */
.tp-page-head { padding: 56px 0 24px; }
.tp-page-head-center { text-align: center; }

/* Apply form */
.tp-apply { padding: 24px 0 72px; }
.tp-form fieldset { border: 1px solid var(--border-subtle, #22222b); border-radius: 12px; padding: 24px; margin: 0 0 20px; background: var(--surface-1, #15151c); }
.tp-form legend { padding: 0 8px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary, #a0a0ab); }
.tp-radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tp-radio-card { display: flex; flex-direction: column; padding: 16px; background: var(--surface-2, #1e1e26); border: 1px solid var(--border-subtle, #22222b); border-radius: 10px; cursor: pointer; transition: border-color .12s ease; }
.tp-radio-card input { position: absolute; opacity: 0; }
.tp-radio-selected { border-color: var(--brand-500, #c084fc); background: rgba(142, 33, 202, 0.08); }
.tp-radio-title { font-weight: 700; font-size: 15px; }
.tp-radio-price { font-size: 20px; margin: 4px 0; color: var(--text-primary, #eef); font-weight: 700; }
.tp-radio-tag { font-size: 13px; color: var(--text-secondary, #a0a0ab); }
.tp-field { margin: 16px 0; }
.tp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .tp-field-row { grid-template-columns: 1fr; } }
.tp-field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-secondary, #c6c6d1); }
.tp-field label span { color: var(--danger-500, #ef4444); }
.tp-field input, .tp-field select, .tp-field textarea { width: 100%; padding: 11px 12px; background: var(--surface-0, #0b0b10); border: 1px solid var(--border-strong, #3a3a46); border-radius: 8px; color: var(--text-primary, #eef); font-size: 14px; }
.tp-field input:focus, .tp-field select:focus, .tp-field textarea:focus { outline: 2px solid var(--brand-500, #c084fc); outline-offset: 1px; }
.tp-field-help { font-size: 12px; color: var(--text-secondary, #a0a0ab); margin: 6px 0 0; }
.tp-fieldset-hidden { display: none; }
.tp-form-actions { margin-top: 32px; }
.tp-form-meta { margin-top: 14px; font-size: 12px; color: var(--text-secondary, #a0a0ab); }
.tp-form-meta a { color: var(--brand-500, #c084fc); }

/* Alerts */
.tp-alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; line-height: 1.4; }
.tp-alert-ok { background: rgba(76, 175, 80, 0.12); color: #a5d6a7; border: 1px solid rgba(76, 175, 80, 0.3); }
.tp-alert-err { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.tp-alert ul { margin: 8px 0 0 20px; padding: 0; }

/* Apply CTA */
.tp-apply-cta { padding: 72px 0; text-align: center; border-top: 1px solid var(--border-subtle, #22222b); }

/* Light theme parity */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .tp-main { background: #fafafa; color: #141420; }
    :root:not([data-theme="dark"]) .tp-tier-card,
    :root:not([data-theme="dark"]) .tp-why-card,
    :root:not([data-theme="dark"]) .tp-vs-table,
    :root:not([data-theme="dark"]) .tp-matrix-table,
    :root:not([data-theme="dark"]) .tp-form fieldset { background: #ffffff; border-color: #e5e5ec; }
    :root:not([data-theme="dark"]) .tp-field input,
    :root:not([data-theme="dark"]) .tp-field select,
    :root:not([data-theme="dark"]) .tp-field textarea { background: #ffffff; border-color: #cccbd4; color: #141420; }
    :root:not([data-theme="dark"]) .tp-matrix-group { background: #f4f4f8; }
}
:root[data-theme="light"] .tp-main { background: #fafafa; color: #141420; }
:root[data-theme="light"] .tp-tier-card,
:root[data-theme="light"] .tp-why-card,
:root[data-theme="light"] .tp-vs-table,
:root[data-theme="light"] .tp-matrix-table,
:root[data-theme="light"] .tp-form fieldset { background: #ffffff; border-color: #e5e5ec; }
:root[data-theme="light"] .tp-field input,
:root[data-theme="light"] .tp-field select,
:root[data-theme="light"] .tp-field textarea { background: #ffffff; border-color: #cccbd4; color: #141420; }
:root[data-theme="light"] .tp-matrix-group { background: #f4f4f8; }
