/* ProCVX - Guides (long-form reading pages), in the editor's Midnight line world:
   midnight enamel ground, porcelain type, four line inks with one job each
   (scarlet = primary action, cobalt = links and focus, amber = advice, green = do this). */
:root {
    --night-900: #0b1230;
    --night-850: #0f1739;
    --night-800: #141d47;
    --night-700: #26326b;
    --night-600: #3a4784;
    --porcelain: #f4f6fb;
    --porcelain-dim: #b3bcdb;
    --porcelain-faint: #8c96bf;
    --line-track: rgba(244, 246, 251, 0.3);
    --ink-scarlet: #e21d2d;
    --ink-scarlet-hover: #c10f1e;
    --ink-cobalt: #6b93ff;
    --ink-cobalt-solid: #2b59f0;
    --ink-amber: #ffc20e;
    --ink-green: #35c46a;
    --bad-text: #ff8a92;
    --line-width: 4px;
    --ui-radius: 6px;
    --ui-font: 'Overpass', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--night-900);
    color: var(--porcelain-dim);
    font-family: var(--ui-font);
    font-size: 1.0625rem;
    line-height: 1.7;
}

::selection { background: var(--ink-cobalt-solid); color: #fff; }

a { color: var(--ink-cobalt); text-underline-offset: 3px; }
a:hover { color: #a9c0ff; }
:focus-visible { outline: 2px solid var(--ink-cobalt); outline-offset: 2px; }

strong { color: var(--porcelain); }

/* Header band */
.site-header {
    background: var(--night-900);
    border-bottom: 1px solid var(--night-700);
    color: var(--porcelain);
}

.site-header-inner,
.site-footer-inner,
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--porcelain);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.3rem;
}

.brand:hover { color: #fff; }
.brand-name span { font-weight: 400; }

/* Mark: an interchange ring on a scarlet line */
.brand-mark {
    position: relative;
    width: 34px;
    height: 22px;
    flex-shrink: 0;
}

.brand-mark::before,
.brand-mark::after {
    content: '';
    position: absolute;
}

.brand-mark::before {
    left: 0;
    right: 0;
    top: calc(50% - 2px);
    height: var(--line-width);
    background: var(--ink-scarlet);
}

.brand-mark::after {
    left: calc(50% - 11px);
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--night-900);
    border: 4px solid var(--porcelain);
}

.header-cta,
.cta a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.15rem 1.1rem 0;
    border-radius: var(--ui-radius);
    background: var(--ink-scarlet);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.header-cta:hover,
.cta a:hover { background: var(--ink-scarlet-hover); color: #fff; }

/* Article */
.page { padding-top: 1.75rem; padding-bottom: 3rem; }

.breadcrumb {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--porcelain-faint);
    margin: 0 0 1.5rem;
}

.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.5rem; }
.breadcrumb a { color: var(--porcelain-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--porcelain); text-decoration: underline; }

h1, h2, h3 {
    color: var(--porcelain);
    line-height: 1.2;
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 0.9rem; }
h2 { font-size: 1.5rem; font-weight: 800; margin: 2.75rem 0 0.75rem; scroll-margin-top: 1rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }

.lead { font-size: 1.2rem; color: var(--porcelain); margin-top: 0; }

.meta {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--porcelain-faint);
    margin-bottom: 2rem;
}

p, ul, ol { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }
article > p, article > ul, article > ol { max-width: 68ch; }

/* Contents: the article's route, one station per section */
.toc { margin: 0 0 2.5rem; }

.toc strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--porcelain-dim);
}

.toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    position: relative;
    margin: 0;
    padding: 0.4rem 0 0.4rem 2.25rem;
}

.toc li::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: var(--line-width);
    background: var(--line-track);
}

.toc li:first-child::before { top: 50%; }
.toc li:last-child::before { bottom: 50%; }

.toc li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: calc(50% - 8px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--porcelain);
    background: var(--night-900);
    transition: background-color 0.15s ease;
}

.toc li:hover::after { background: var(--porcelain); }

.toc a {
    color: var(--porcelain);
    font-weight: 600;
    text-decoration: none;
}

.toc a:hover { text-decoration: underline; }

/* Advice and examples */
.tip, .example {
    border-radius: var(--ui-radius);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.tip {
    background: rgba(255, 194, 14, 0.08);
    border: 1px solid rgba(255, 194, 14, 0.45);
}

.tip strong:first-child { color: var(--ink-amber); }

.example {
    background: var(--night-850);
    border: 1px solid var(--night-700);
}

.example p:last-child, .tip p:last-child { margin-bottom: 0; }

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.compare > div {
    background: var(--night-850);
    border: 1px solid var(--night-700);
    border-radius: var(--ui-radius);
    padding: 0.85rem 1rem;
    font-size: 0.975rem;
}

.compare .label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

/* Status by shape and colour: a scarlet ring for "avoid", a filled dot for "better" */
.compare .label::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.compare .bad .label { color: var(--bad-text); }
.compare .bad .label::before { border: 3px solid var(--ink-scarlet); }
.compare .good .label { color: var(--ink-green); }
.compare .good .label::before { background: var(--ink-green); }

@media (max-width: 560px) {
    .compare { grid-template-columns: 1fr; }
}

/* Call to action: the route ends at the editor */
.cta {
    margin: 3rem 0;
    padding: 1.5rem;
    border-radius: var(--ui-radius);
    border: 1px solid var(--night-600);
    background: var(--night-850);
}

.cta h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.cta p { margin: 0 0 1.25rem; }

/* Guide list (hub + related): stations on one line */
.cards {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.cards li {
    position: relative;
    margin: 0;
    padding-left: 2.25rem;
}

.cards li::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: var(--line-width);
    background: var(--line-track);
}

.cards li:first-child::before { top: 1.6rem; }
.cards li:last-child::before { bottom: calc(100% - 1.6rem); }

.cards li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: calc(1.6rem - 8px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--porcelain);
    background: var(--night-900);
    transition: background-color 0.15s ease;
}

.cards li:hover::after,
.cards li:focus-within::after { background: var(--porcelain); }

.cards a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--night-800);
    text-decoration: none;
    color: var(--porcelain-dim);
}

.cards strong {
    display: block;
    color: var(--porcelain);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.cards a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cards span { font-size: 0.95rem; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--night-700);
    color: var(--porcelain-faint);
    font-size: 0.875rem;
}

.site-footer-inner { padding-top: 1.25rem; padding-bottom: 2rem; }
.site-footer a { color: var(--porcelain-dim); }

@media (prefers-reduced-motion: reduce) {
    .toc li::after, .cards li::after { transition: none; }
}
