:root {
    --bg: #ffffff;
    --ink: #111;
    --muted: #555;
    --rule: #e6e6e6;
    --panel: #f6f7f8;
    --panel2: #fbfbfc;
    --accent: #4a90e2;
    --accent2: #4a90e2;
    --warn: #9b6b00;
    --shadow: 0 8px 24px rgba(0,0,0,.06);
    --radius: 14px;
    --max: 1120px;
    --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: var(--accent2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 8px 10px;
    border-radius: 10px;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    z-index: 999;
}

.masthead {
    border-bottom: 1px solid var(--rule);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.masthead-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 240px;
    color: inherit;
}

.brand-logo {
    width: 22px;
    height: 22px;
    opacity: .9;
    margin-top: -2px;
}

.brand-text {
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: .2px;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 15px;
    margin-left: -16px;
}

.topnav a {
    color: var(--muted);
}

.topnav a:hover {
    color: var(--ink);
}

.topnav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
}

.cta {
    margin-left: auto;
    background: var(--accent);
    color: #fff !important;
    border: 0;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .2px;
}

.cta:hover {
    text-decoration: none;
    filter: brightness(.97);
}

.layout {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 18px 56px;
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    gap: 22px;
    align-items: start;
}

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

    .rail {
        position: static !important;
        top: auto !important;
    }

    .brand {
        min-width: unset;
    }

    .brand-text::after {
        display: none;
    }

    .topnav {
        margin-left: 0;
    }

    .masthead-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.rail {
    position: sticky;
    top: 72px;
}

.rail-title {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #333;
}

.toc {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px 14px 10px;
    background: var(--panel2);
}

.toc a {
    display: block;
    padding: 8px 8px;
    border-radius: 10px;
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.toc a:hover {
    background: #e6f7ff;
}

.toc a.active {
    background: #e7f3ff;
    color: var(--accent2);
    font-weight: 600;
}

.rail-box {
    margin-top: 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--panel2);
}

.rail-box-title {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.rail-links {
    margin: 0;
    padding-left: 18px;
}

.rail-links li {
    margin: 8px 0;
}

.rail-right .adbox {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--panel2);
    margin-top: 0;
    margin-bottom: 14px;
}

.adlabel {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.adslot {
    height: 420px;
    border-radius: 12px;
    border: 1px dashed #d7d7d7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    background: #fff;
}

.breadcrumb {
    color: var(--muted);
    font-size: 13px;
    padding-top: 2px;
    margin: 0 0 16px;
}

.breadcrumb a {
    color: var(--muted);
}

.article-hero {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 22px;
}

.h1 {
    font-family: var(--serif);
    font-size: 44px;
    line-height: 1.08;
    margin: 0 0 10px;
    letter-spacing: -.2px;
}

.h1-subtitle {
    display: block;
    font-size: 0.65em;
    font-weight: 400;
    font-style: italic;
    color: var(--muted);
    margin-top: 0.15em;
    line-height: 1.2;
}

.deck {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
    max-width: 72ch;
    margin: 0 0 14px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.meta strong {
    color: var(--ink);
}

.meta .sep {
    opacity: .7;
}

.article {
    max-width: 78ch;
}

.sec {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}

.sec:last-child {
    border-bottom: 0;
}

.sec h2 {
    font-family: var(--serif);
    font-size: 26px;
    margin: 0 0 10px;
    letter-spacing: -.1px;
}

.sec h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 28px 0 8px;
}

.sec h3:first-of-type {
    margin-top: 14px;
}

.subsec h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 14px 0 8px;
}

p {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.7;
    list-style-type: circle;
}

ul,
ol {
    line-height: 1.7;
}

.key-takeaways {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    margin: 0 0 18px;
}

.key-takeaways h2 {
    font-family: var(--serif);
    font-size: 18px;
    margin: 0 0 10px;
}

.key-takeaways ul {
    margin: 0;
    padding-left: 18px;
}

.key-takeaways li {
    margin: 8px 0;
}

.fast-fact {
    border: 1px solid #f0e3bf;
    background: #fffaf0;
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 14px 0 18px;
}

.fast-fact-label {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--warn);
    margin-right: 8px;
}

.related-card {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow);
    margin-top: 14px;
}

.related-title {
    font-weight: 900;
    margin: 0 0 6px;
}

.related-sub {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 10px;
}

.related-card a.btn {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: #fff;
    font-weight: 800;
    font-size: 13px;
    color: #222;
}

.related-card a.btn.primary {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
}

/* Hierarchical related list */
.related-grid {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid #e0e0e0;
    list-style: none;
    margin: 0;
}

.related-grid .related-card {
    position: relative;
    display: block;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: all 0.2s ease;
}

.related-grid .related-card::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e0e0e0;
}

.related-grid .related-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: var(--accent2);
}

.related-grid .related-card:hover::before {
    background: var(--accent2);
    transform: translateY(-50%) scale(1.2);
}

.footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 13px;
}

.footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-left {
    min-width: 220px;
}

.footer-brand {
    font-weight: 900;
    color: var(--ink);
    font-size: 14px;
}

.footer-fine {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
}

.footer-nav a {
    color: var(--accent2);
    font-weight: 800;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 10px;
}

.footer-nav a:hover {
    background: #eef5ff;
    text-decoration: none;
}

/* ticker */
.ticker-wrap {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow);
    margin: 2px 0 24px;
}

.ticker-label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.ticker-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.ticker-price {
    font-family: var(--serif);
    font-size: 22px;
}

.ticker-meta,
.ticker-status {
    color: var(--muted);
    font-size: 13px;
}

.rail-p {
    margin: 0 0 10px;
    color: #222;
    font-size: 14px;
    line-height: 1.55;
}

.rail-fine {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.rail-button {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff !important;
    font-weight: 700;
}

.rail-button:hover {
    text-decoration: none;
    filter: brightness(.97);
}

.rail-link {
    color: var(--accent2);
    font-weight: 800;
}

.sitemap-list {
    columns: 2;
    column-gap: 26px;
    padding-left: 18px;
}

@media (max-width: 700px){
    .sitemap-list {
        columns: 1;
    }
}

/* link-weight */
.article a,
.related-card {
    font-weight: 700;
}

.token-kicker {
    font-size: 13px;
    color: var(--muted);
    margin: 20px 0 2px;
}

.token-kicker strong {
    color: var(--ink);
    font-weight: 900;
}

.token-kicker a {
    color: var(--accent2);
    font-weight: 400;
}

/* optical top alignment: align adbox top border with top of first-line text in other columns */
@media (min-width: 900px){
    .rail-right {
        padding-top: 4px;
    }
}

/* Callout boxes (e.g., Important / Alert) */
.callout{
    margin: 14px 0;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: var(--panel2);
}
.callout-title{
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 6px 0;
}
.callout p{ margin: 0; }
.callout p + p{ margin-top: 10px; }

/* Variants */
.callout--important{ border-left-color: var(--accent); }
.callout--important .callout-title{ color: var(--accent); }

.callout--alert{ border-left-color: var(--warn); }
.callout--alert .callout-title{ color: var(--warn); }

