/* Ghost Files uses brand.css; these rules do not load on other pages. */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); }
.ghost-files {
    --panel: #120A1C;
    margin: 0;
    background: var(--night);
    color: var(--paper);
    font: 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}
.ghost-files img { display: block; max-width: 100%; }
.ghost-files a { color: inherit; text-decoration: none; }
.ghost-files :is(a, button, [tabindex]):focus-visible {
    outline: 2px solid var(--lilac);
    outline-offset: 4px;
}
.ghost-files h1, .ghost-files h2, .ghost-files h3 { color: #fff; }
.ghost-files .wrap, .ghost-files .section-wrap { width: min(100% - 64px, 1240px); margin-inline: auto; }

/* The site header and footer mirror the home page partials. */
.site-header { padding: 18px 0; background: var(--night); border-bottom: 1px solid rgba(196,181,253,.12); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { font: 700 29px/.9 var(--display); letter-spacing: -.025em; color: var(--paper); }
.nav-links { display: flex; align-items: center; gap: clamp(17px, 2.8vw, 38px); }
.nav-links .nav-link { color: #E2D9EC; font-size: 13px; font-weight: 500; }
.nav-links .nav-link:hover, .nav-links [aria-current="page"] { color: var(--lilac); }
.nav-links [aria-current="page"] { position: relative; }
.nav-links [aria-current="page"]::after {
    position: absolute;
    inset: auto 0 -6px;
    height: 1px;
    border-radius: 2px;
    background: var(--lilac);
    content: "";
}
.nav-join {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border: 1px solid rgba(196,181,253,.3);
    border-radius: 999px;
    background: rgba(109,40,217,.2);
    font-size: 13px;
    font-weight: 600;
}
.nav-join:hover { background: rgba(109,40,217,.38); border-color: rgba(196,181,253,.55); }
.site-footer { border-top: 1px solid var(--line); background: #0D0715; }
.footer-main { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; padding-top: 57px; padding-bottom: 45px; }
.footer-brand { gap: 10px; }
.footer-brand img { width: 46px; height: 46px; }
.footer-brand span { font-size: 27px; }
.footer-branding p { margin: 17px 0 0; color: #C4B5D0; font-size: 12px; line-height: 1.9; }
.footer-branding p a { color: var(--lilac); }
.footer-branding p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.partner-list h2 { margin: 3px 0 16px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.partner-list > div { display: flex; flex-wrap: wrap; gap: 9px 20px; }
.partner-list a { color: var(--body); font: 500 19px/1.35 var(--display); }
.partner-list a:hover { color: var(--lilac); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-block: 20px 24px;
    border-top: 1px solid rgba(167,139,250,.13);
    color: var(--muted);
    font-size: 10px;
}
.footer-photo-credit { flex: 1 1 260px; min-width: 0; max-width: 100%; line-height: 1.6; }
.footer-bottom nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px 21px; }
.footer-bottom a:hover { color: var(--lilac); }

/* Ghost Files index and shared cards */
.ghost-index-hero {
    padding-block: clamp(54px, 7vw, 104px) clamp(44px, 6vw, 76px);
    background: radial-gradient(ellipse at 50% 8%, rgba(109,40,217,.25), transparent 66%);
    text-align: center;
}
.ghost-files .ghost-eyebrow {
    margin: 0 0 12px;
    color: var(--lavender);
    font: 600 12px/1.5 var(--sans);
    letter-spacing: .19em;
    text-transform: uppercase;
}
.ghost-index-hero h1 {
    margin: 0;
    font: 700 clamp(49px, 7.6vw, 110px)/.94 var(--display);
    letter-spacing: -.045em;
}
.ghost-index-hero em { color: var(--lilac); font-weight: 600; text-shadow: 0 0 32px rgba(139,92,246,.44); }
.ghost-intro { max-width: 580px; margin: 20px auto 0; color: var(--body); }
.ghost-index-content { padding-bottom: clamp(48px, 6vw, 88px); }
.ghost-card {
    min-width: 0;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, var(--panel-raised), var(--panel));
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ghost-card:hover, .ghost-card:focus-within {
    border-color: rgba(167,139,250,.65);
    box-shadow: 0 12px 38px rgba(109,40,217,.14);
}
.ghost-card-link { display: flex; flex-direction: column; height: 100%; min-width: 0; border-radius: inherit; }
.ghost-card-image {
    position: relative;
    isolation: isolate;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 23px 23px 0 0;
    background: linear-gradient(145deg, var(--plum-light), var(--panel));
}
.ghost-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.ghost-card-image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(18,10,28,.58), transparent 48%);
    pointer-events: none;
    content: "";
}
.ghost-card-link:hover img { transform: scale(1.045); }
.ghost-card-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; padding: 22px 24px 24px; }
.ghost-card-details { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; }
.ghost-category {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid rgba(167,139,250,.35);
    border-radius: 999px;
    background: rgba(109,40,217,.23);
    color: var(--lilac);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.ghost-meta { margin: 0; color: var(--muted); font-size: 13px; }
.ghost-read-time { white-space: nowrap; }
.ghost-card h2 { margin: 12px 0 9px; font: 700 clamp(28px, 2.45vw, 38px)/1.02 var(--display); overflow-wrap: anywhere; }
.ghost-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0 0 19px;
    color: var(--body);
    font-size: 14px;
    line-height: 1.62;
    overflow-wrap: anywhere;
}
.ghost-arrow { width: 19px; height: 19px; flex: none; }
.ghost-card-action { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--lilac); font-size: 13px; font-weight: 600; }
.ghost-card-link:hover .ghost-card-action { color: #fff; }
.ghost-card-featured .ghost-card-link { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); }
.ghost-card-featured .ghost-card-image { min-height: 340px; aspect-ratio: auto; border-radius: 23px 0 0 23px; }
.ghost-card-featured .ghost-card-image img { position: absolute; inset: 0; }
.ghost-card-featured .ghost-card-copy { justify-content: center; padding: clamp(24px, 4vw, 60px); }
.ghost-card-featured h2 { margin-block: 15px; font-size: clamp(36px, 4vw, 61px); }
.ghost-card-featured .ghost-excerpt { font-size: 16px; }
.ghost-card-featured .ghost-card-action { margin-top: 2px; }
.ghost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ghost-index-content > .ghost-grid { margin-top: 28px; }
.ghost-map-cta {
    margin-top: clamp(35px, 6vw, 74px);
    padding: clamp(29px, 5vw, 65px) 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: radial-gradient(ellipse at 50% 0, rgba(139,92,246,.22), transparent 72%), linear-gradient(135deg, var(--panel-raised), var(--panel));
    text-align: center;
}
.ghost-map-cta h2, .ghost-related > h2 { margin: 0; font: 700 clamp(37px, 4.5vw, 62px)/.99 var(--display); letter-spacing: -.02em; }
.ghost-cta-actions, .store-buttons { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 9px; }
.ghost-cta-actions { margin-top: 23px; gap: 12px; }
.ghost-cta-actions .brand-button { min-height: 52px; padding-inline: 21px; color: #fff; }
.store-button { display: inline-flex; min-width: 146px; min-height: 52px; align-items: center; gap: 11px; padding: 7px 14px; border: 1px solid rgba(196,181,253,.32); border-radius: 10px; background: rgba(18,10,28,.72); text-align: left; }
.store-button:hover { border-color: rgba(196,181,253,.55); background: rgba(45,27,61,.85); }
.store-button svg { width: 21px; height: 21px; flex: none; fill: var(--lilac); }
.store-button span { display: flex; flex-direction: column; line-height: 1.15; }
.store-button small { color: var(--muted); font-size: 9px; }
.store-button strong { margin-top: 3px; font-size: 12px; font-weight: 600; }

/* Article pages, including the flagship */
.ghost-article-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: end;
    min-height: 460px;
    background: radial-gradient(ellipse at 62% 0%, var(--plum-light), var(--panel) 66%);
}
.ghost-article-hero::after, .ghost-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.ghost-hero-image { z-index: -2; object-fit: cover; }
.ghost-article-hero::after {
    z-index: -1;
    background: linear-gradient(180deg, rgba(11,6,18,.27), rgba(11,6,18,.74) 62%, var(--night) 100%),
        linear-gradient(90deg, rgba(11,6,18,.48), transparent 84%);
    content: "";
}
.ghost-hero-copy, .ghost-prose { width: min(100% - 64px, 720px); margin-inline: auto; min-width: 0; overflow-wrap: anywhere; }
.ghost-hero-copy { padding-block: 45px 38px; }
.ghost-breadcrumb { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin-bottom: 20px; color: var(--body); font-size: 13px; }
.ghost-breadcrumb a { color: var(--lilac); }
.ghost-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ghost-hero-copy h1 { margin: 12px 0; font: 700 clamp(36px, 4.3vw, 56px)/1.01 var(--display); letter-spacing: -.024em; text-wrap: balance; }
.ghost-hero-copy .ghost-meta { color: var(--body); }
.ghost-prose { padding-top: 15px; color: var(--body); font-size: 18px; line-height: 1.75; }
.ghost-prose > :first-child { margin-top: 0; }
.ghost-prose > :last-child { margin-bottom: 0; }
.ghost-prose p { margin: 0 0 1.2em; }
.ghost-prose h2, .ghost-prose h3 { letter-spacing: -.017em; scroll-margin-top: 26px; }
.ghost-prose h2 { margin: 1.35em 0 .45em; font: 700 36px/1.08 var(--display); }
.ghost-prose h3 { margin: 1.15em 0 .42em; font: 700 26px/1.12 var(--display); }
.ghost-prose strong, .ghost-prose b { color: var(--paper); }
.ghost-prose a { color: var(--lilac); }
.ghost-prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ghost-prose figure { margin: 34px 0; }
.ghost-prose img { border-radius: 16px; height: auto; }
.ghost-prose figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; font-style: italic; text-align: center; }
.ghost-prose ul, .ghost-prose ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.ghost-prose li + li { margin-top: .42em; }
.ghost-prose li::marker { color: var(--lavender); }
.ghost-prose :is(.answer, .plan, .toc, blockquote, .visiting, .fact, .cta) {
    margin: 26px 0;
    padding: 17px 22px;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--lavender);
    border-radius: 14px;
    background: var(--panel-raised);
}
.ghost-prose :is(.answer, .cta) > :first-child { margin-top: 0; }
.ghost-prose :is(.answer, .cta) > :last-child { margin-bottom: 0; }
.ghost-prose :is(.answer strong, .plan b, .toc strong, .note-label) {
    color: var(--lilac);
    font: 600 12px/1.4 var(--sans);
    letter-spacing: .07em;
    text-transform: uppercase;
}
.ghost-prose :is(.answer strong, .toc strong) { display: block; margin-bottom: 5px; }
.ghost-prose .visiting { position: relative; padding-inline-start: 48px; font-size: .92em; }
.ghost-prose .visiting::before {
    position: absolute;
    inset: 20px auto auto 16px;
    width: 20px;
    height: 20px;
    background: var(--lavender);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5.3-8 11-8 11S4 15.3 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") center / contain no-repeat;
    content: "";
}
.ghost-prose .visiting em { font-style: normal; }
.ghost-prose .fact { background: rgba(26,15,36,.65); border-inline-start-color: var(--plum-light); font-size: .92em; }
.ghost-prose .sig { margin-top: -.35em; font-size: 15px; color: var(--lilac); }
.ghost-prose .article-rank { color: var(--lavender); font-size: 1.22em; }
.ghost-prose .toc ol { margin: 5px 0 12px; }
.ghost-prose .article-table { max-width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; }
.ghost-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; text-align: left; }
.ghost-prose th, .ghost-prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ghost-prose thead { background: var(--plum); color: var(--paper); }
.ghost-prose tbody tr:nth-child(even) { background: var(--panel); }
.ghost-prose tr:last-child td { border-bottom: 0; }
.ghost-prose .cta { text-align: center; border-inline-start-width: 1px; background: linear-gradient(140deg, var(--plum), var(--panel-raised)); }
.ghost-prose .cta .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 4px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: linear-gradient(135deg, var(--violet), var(--violet-deep)); color: #fff; font-size: 13px; font-weight: 600; }
.ghost-prose .cta .alt { background: var(--panel-raised); color: var(--lilac); }
.ghost-end { padding-bottom: clamp(50px, 6vw, 88px); }
.ghost-related { margin-top: clamp(38px, 6vw, 68px); }
.ghost-related > h2 { margin-bottom: 20px; }

@media (max-width: 1023px) {
    .ghost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .ghost-files .wrap, .ghost-files .section-wrap { width: min(100% - 40px, 600px); }
    .site-header { padding: 13px 0; }
    .brand { gap: 8px; }
    .brand span { font-size: 25px; }
    .nav-links { gap: 10px; }
    .nav-links .nav-link { font-size: 12px; }
    .nav-join { padding: 9px 13px; gap: 8px; font-size: 11px; }
    .footer-main { grid-template-columns: 1fr; gap: 35px; padding-block: 40px 34px; }
    .footer-bottom { align-items: flex-start; flex-direction: column; gap: 14px; }
    .footer-photo-credit { flex: 0 1 auto; }
    .footer-bottom nav { justify-content: flex-start; }
    .ghost-card-featured .ghost-card-link { display: flex; }
    .ghost-card-featured .ghost-card-image { aspect-ratio: 16/9; min-height: 0; border-radius: 23px 23px 0 0; }
    .ghost-article-hero { min-height: 300px; }
    .ghost-hero-copy, .ghost-prose { width: min(100% - 40px, 600px); }
    .ghost-hero-copy { padding-block: 28px 25px; }
}
@media (max-width: 719px) {
    .nav-map, .nav-files, .nav-quiz { display: none; }
    .ghost-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 430px) {
    .nav-shell { gap: 8px; }
    .brand span { font-size: 23px; }
    .nav-links { gap: 9px; }
    .nav-links .nav-login { font-size: 11px; }
    .nav-join { padding: 8px 10px; font-size: 10px; }
    .footer-bottom nav { gap: 10px 15px; }
    .ghost-prose th, .ghost-prose td { padding: 8px 5px; font-size: 12px; }
    .store-button { min-width: 0; min-height: 48px; padding: 6px 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .ghost-card, .ghost-card-image img { transition: none; }
    .ghost-card-link:hover img { transform: none; }
}
