/* Shared styling for Trainex legal pages — matches the main site */
:root {
    color-scheme: dark;
    --bg: #070A12;
    --bg-2: #0B1220;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --primary: #6E7BFF;
    --primary-2: #8B93FF;
    --blue: #4F9CFF;
    --cyan: #22D3EE;
    --text: #FFFFFF;
    --muted: #AEB8CC;
    --muted-2: #6B768F;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--muted);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

::selection { background: rgba(110, 123, 255, 0.35); color: #fff; }

a { color: var(--primary-2); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

/* Background glow */
.glow {
    position: fixed; top: -260px; left: 50%; transform: translateX(-50%);
    width: 760px; height: 760px; pointer-events: none; z-index: -1;
    background: radial-gradient(circle, rgba(110, 123, 255, 0.16), transparent 70%);
    filter: blur(40px);
}

/* Top bar */
.topbar {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(16px);
    background: rgba(7, 10, 18, 0.72);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 840px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 10px;
    box-shadow: 0 6px 18px -6px rgba(79, 156, 255, 0.6); }
.brand span { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.3px; }
.back-link { font-size: 0.9rem; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.back-link:hover { color: #fff; }

/* Content */
.wrap { max-width: 840px; margin: 0 auto; padding: 56px 24px 96px; }

.doc-kicker {
    display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; color: var(--primary-2);
    padding: 6px 13px; border-radius: 100px;
    background: rgba(110, 123, 255, 0.08); border: 1px solid rgba(110, 123, 255, 0.22);
    margin-bottom: 18px;
}
h1 {
    font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; color: #fff;
    line-height: 1.1; letter-spacing: -1px; margin-bottom: 12px;
}
h1 .accent {
    background: linear-gradient(135deg, #6E7BFF, #22D3EE);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.updated { color: var(--muted-2); font-size: 0.9rem; margin-bottom: 30px; }
.intro { font-size: 1.08rem; color: var(--muted); margin-bottom: 14px; }

h2 {
    font-size: 1.3rem; font-weight: 700; color: #fff;
    margin: 44px 0 14px; letter-spacing: -0.3px; scroll-margin-top: 84px;
    display: flex; align-items: baseline; gap: 12px;
}
h2 .num {
    font-size: 0.85rem; font-weight: 700; color: var(--primary-2);
    background: rgba(110, 123, 255, 0.12); border: 1px solid rgba(110, 123, 255, 0.25);
    border-radius: 8px; padding: 3px 9px; line-height: 1; flex-shrink: 0;
}
h3 { font-size: 1.02rem; font-weight: 600; color: #E7ECF6; margin: 22px 0 8px; }

p { margin: 10px 0; }
strong { color: #EDF1F8; font-weight: 600; }

ul, ol { margin: 12px 0 12px 4px; padding-left: 22px; }
li { margin: 7px 0; }
ul li::marker { color: var(--primary); }
ol li::marker { color: var(--primary-2); font-weight: 600; }

.lead-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.93rem; }
.lead-table th, .lead-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.lead-table th { color: #fff; font-weight: 600; background: var(--surface); }
.lead-table td:first-child { color: #E7ECF6; font-weight: 500; white-space: nowrap; }

/* Table of contents */
.toc {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 22px 24px; margin: 26px 0 10px;
}
.toc h4 { color: var(--muted-2); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.toc ol { columns: 2; column-gap: 32px; margin: 0; padding-left: 18px; }
.toc a { color: var(--muted); font-size: 0.92rem; }
.toc a:hover { color: var(--primary-2); }

/* Callout card */
.note {
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 16px; padding: 20px 22px; margin: 22px 0;
    position: relative;
}
.note.accent { border-color: rgba(110, 123, 255, 0.35); background: rgba(110, 123, 255, 0.06); }
.note.warn { border-color: rgba(255, 159, 28, 0.32); background: rgba(255, 159, 28, 0.06); }
.note .note-title { color: #fff; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.note p:last-child { margin-bottom: 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 18px 0; }
.steps li { counter-increment: step; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--border); }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 12px;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #6E7BFF, #4F9CFF); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem;
}
.steps li:last-child { border-bottom: none; }
.steps strong { display: block; color: #fff; margin-bottom: 2px; }

/* Footer */
.legal-footer {
    border-top: 1px solid var(--border); margin-top: 56px; padding-top: 28px;
    display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between;
    color: var(--muted-2); font-size: 0.85rem;
}
.legal-footer .links { display: flex; flex-wrap: wrap; gap: 20px; }
.legal-footer .links a { color: var(--muted); font-weight: 500; }
.legal-footer .links a:hover { color: #fff; }

@media (max-width: 640px) {
    .toc ol { columns: 1; }
    .wrap { padding: 40px 20px 72px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
