:root {
    --af-ink: #10151c;
    --af-slate: #1a2330;
    --af-mist: #e7eef5;
    --af-paper: #f4f7fb;
    --af-line: #c9d4e0;
    --af-muted: #5b6b7c;
    --af-legal: #1f4e6b;
    --af-tech: #0f766e;
    --af-merge: #b45309;
    --af-merge-soft: #f6e2c8;
    --font-brand: Syne, 'Syne Fallback', 'Avenir Next', 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif 4', 'Source Serif Fallback', Georgia, serif;
    --font-sans: Syne, 'Syne Fallback', 'Avenir Next', 'Segoe UI', sans-serif;
    --color-darker-gray: var(--af-ink);
    --color-primary-text: #17202a;
    --color-secondary-text: var(--af-muted);
    --color-light-gray: var(--af-line);
    --color-lighter-gray: #edf2f7;
    --gh-font-heading: var(--font-brand);
}

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(15, 118, 110, 0.10), transparent 55%),
        radial-gradient(900px 420px at 90% 0%, rgba(180, 83, 9, 0.10), transparent 50%),
        linear-gradient(180deg, #eef3f8 0%, var(--af-paper) 28%, var(--af-paper) 100%);
    color: var(--color-primary-text);
    font-family: var(--font-serif);
}

::selection { background: #cde8e4; color: var(--af-ink); }

/* —— Top bar —— */
.af-topbar {
    background: var(--af-ink);
    color: #d7e0ea;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.af-topbar-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
}
.af-topbar a { color: #9fd8d1; }
.af-topbar a:hover { color: #fff; opacity: 1; }
.af-beats { display: flex; gap: 10px; align-items: center; }
.af-beat {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 700;
    letter-spacing: .08em;
}
.af-beat-legal { color: #9ec5e0; }
.af-beat-tech { color: #9fd8d1; }
.af-beat-merge { color: #f0c48a; border-color: rgba(240,196,138,.35); }
@media (max-width: 767px) {
    .af-topbar-date { display: none; }
    .af-topbar-inner { justify-content: center; }
    .af-beats { display: none; }
}

/* —— Masthead / brand —— */
.gh-head,
.is-head-left-logo .gh-head { background: transparent; }
.gh-head-logo,
.af-brand {
    font-family: var(--font-brand);
    font-weight: 800;
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    letter-spacing: -.03em;
    line-height: 1;
    color: var(--af-ink);
    text-decoration: none;
}
.af-brand span { color: var(--af-tech); }
.af-masthead-sub {
    display: block;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--af-muted);
}
.gh-head-menu .nav a {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--af-ink);
}
.gh-head-menu .nav a:hover { color: var(--af-tech); opacity: 1; }
.gh-head-menu .nav-current a { color: var(--af-legal); }

/* —— Hero (first viewport composition) —— */
.af-hero {
    position: relative;
    overflow: hidden;
    margin: 0 0 48px;
    min-height: min(78vh, 720px);
    color: #f4f8fc;
    background:
        linear-gradient(115deg, rgba(16,21,28,.92) 18%, rgba(16,21,28,.55) 58%, rgba(15,118,110,.35) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3Cpath d='M0 40h160M0 120h160M40 0v160M120 0v160'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(160deg, #142033, #0f766e 120%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    animation: af-hero-in .9s ease both;
}
.af-hero-inner {
    display: grid;
    align-content: end;
    gap: 22px;
    min-height: inherit;
    padding: 72px 0 56px;
}
.af-hero-brand {
    margin: 0;
    font-family: var(--font-brand);
    font-weight: 800;
    font-size: clamp(4.2rem, 9vw, 8.2rem);
    letter-spacing: -.045em;
    line-height: .92;
}
.af-hero-brand em {
    font-style: normal;
    color: #7ee0d4;
}
.af-hero-headline {
    max-width: 18ch;
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(2.2rem, 3.4vw, 3.4rem);
    line-height: 1.2;
}
.af-hero-support {
    max-width: 42rem;
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    line-height: 1.55;
    color: #c9d6e4;
}
.af-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.af-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.af-cta:hover { transform: translateY(-2px); opacity: 1; }
.af-cta-legal { background: #1f4e6b; color: #eef6fb; }
.af-cta-tech { background: #0f766e; color: #e8fffb; }
.af-cta-merge { background: transparent; color: #f6e2c8; border-color: rgba(246,226,200,.55); }
.af-cta-merge:hover { background: rgba(180,83,9,.25); }
.af-hero-orbit {
    position: absolute;
    right: -8%;
    top: 12%;
    width: min(46vw, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    pointer-events: none;
    animation: af-orbit 18s linear infinite;
}
.af-hero-orbit:before,
.af-hero-orbit:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(126,224,212,.28);
}
.af-hero-orbit:before { inset: 12%; }
.af-hero-orbit:after { inset: 28%; border-color: rgba(240,196,138,.3); }
@keyframes af-hero-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes af-orbit { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
    .af-hero { min-height: 70vh; }
    .af-hero-inner { padding: 56px 0 40px; }
    .af-hero-orbit { opacity: .35; }
}

/* —— Section chrome —— */
.af-section { margin: 48px 0; animation: af-rise .7s ease both; }
.af-section:nth-child(2) { animation-delay: .05s; }
.af-section:nth-child(3) { animation-delay: .1s; }
.af-section:nth-child(4) { animation-delay: .15s; }
@keyframes af-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
.af-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--af-ink);
}
.af-section-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.af-section-title a { color: inherit; }
.af-section-link {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--af-tech);
}
.af-pill {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    vertical-align: middle;
}
.af-pill-legal { background: rgba(31,78,107,.12); color: var(--af-legal); }
.af-pill-tech { background: rgba(15,118,110,.12); color: var(--af-tech); }
.af-pill-merge { background: var(--af-merge-soft); color: var(--af-merge); }

.af-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
@media (max-width: 900px) {
    .af-split { grid-template-columns: 1fr; }
}

/* —— Cards / topics —— */
.gh-topic-name {
    display: flex;
    gap: 16px;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--af-ink);
}
.gh-topic-name:after {
    flex: 1;
    height: 2px;
    content: "";
    background: var(--af-ink);
}
.gh-card-title {
    font-family: var(--font-brand);
    font-weight: 700;
    line-height: 1.2;
    color: var(--af-ink);
}
.gh-card.large .gh-card-title { font-size: 3.2rem; line-height: 1.08; }
.gh-card-link:hover { opacity: 1; }
.gh-card-link:hover .gh-card-title { color: var(--af-tech); }
.gh-card-image { overflow: hidden; }
.gh-card-image img { transition: transform .55s ease; }
.gh-card-link:hover .gh-card-image img { transform: scale(1.03); }
.gh-card-excerpt { color: #3d4a59; font-family: var(--font-serif); }
.gh-card-footer { font-family: var(--font-sans); }
.gh-card-author { color: var(--af-ink); font-weight: 700; }

.af-rail {
    display: grid;
    gap: 0;
    border-top: 2px solid var(--af-ink);
}
.af-rail-item {
    display: grid;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid var(--af-line);
    text-decoration: none;
    color: inherit;
    transition: background .2s ease, padding-left .2s ease;
}
.af-rail-item:hover {
    background: rgba(15,118,110,.04);
    padding-left: 8px;
    opacity: 1;
}
.af-rail-meta {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--af-legal);
}
.af-rail-title {
    margin: 0;
    font-family: var(--font-brand);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--af-ink);
}
.af-rail-excerpt {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.45;
    color: var(--af-muted);
}
.af-external-note {
    margin-top: 14px;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    color: var(--af-muted);
}
.af-external-note a { color: var(--af-legal); font-weight: 700; }

/* Merge spotlight */
.af-merge-band {
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(180,83,9,.08), rgba(15,118,110,.08)),
        #fff;
    border: 1px solid var(--af-line);
    border-left: 4px solid var(--af-merge);
}
.af-merge-band .gh-card-title { font-size: 2.8rem; }

/* About / editor */
.af-about {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 32px;
    align-items: center;
    padding: 36px 0;
    border-top: 2px solid var(--af-ink);
    border-bottom: 2px solid var(--af-ink);
}
.af-about h2 {
    margin: 0 0 10px;
    font-family: var(--font-brand);
    font-size: 3rem;
    letter-spacing: -.02em;
}
.af-about p {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.55;
    color: #3d4a59;
}
.af-about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.af-about-panel {
    padding: 24px;
    background: var(--af-ink);
    color: #d7e0ea;
}
.af-about-panel h3 {
    margin: 0 0 10px;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #7ee0d4;
}
.af-about-panel p { color: #b7c4d2; font-size: 1.45rem; }
.af-about-panel a { color: #f0c48a; font-weight: 700; }
@media (max-width: 900px) {
    .af-about { grid-template-columns: 1fr; }
}

/* Article */
.gh-article-tag {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--af-tech) !important;
}
.gh-article-title {
    font-family: var(--font-brand);
    font-weight: 800;
    line-height: 1.05;
    color: var(--af-ink);
}
.gh-article-excerpt {
    font-family: var(--font-serif);
    font-style: italic;
    color: #3d4a59;
}
.gh-content > p:first-of-type::first-letter {
    float: left;
    margin: 4px 10px 0 0;
    font-family: var(--font-brand);
    font-size: 5.2em;
    font-weight: 800;
    line-height: .8;
    color: var(--af-legal);
}
.gh-content a { color: var(--af-legal); text-decoration-color: var(--af-tech); text-underline-offset: 3px; }
.gh-content h2 {
    font-family: var(--font-brand);
    font-weight: 700;
    color: var(--af-ink);
}
.gh-content blockquote { border-left-color: var(--af-tech); font-style: italic; }

.wq-author-box,
.af-author-box {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 56px;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--af-line);
    border-top: 3px solid var(--af-tech);
}
.af-author-box img,
.af-author-initials {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
}
.af-author-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-brand);
    font-size: 3rem;
    font-weight: 800;
    color: #7ee0d4;
    background: var(--af-ink);
}
.af-author-label {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--af-tech);
}
.af-author-name {
    margin: 4px 0 8px;
    font-family: var(--font-brand);
    font-size: 2.4rem;
    color: var(--af-ink);
}
.af-author-name a { color: inherit; }
.af-author-bio { font-size: 1.55rem; line-height: 1.55; color: #3d4a59; }

/* Footer */
.gh-foot { background: transparent; border-top: 2px solid var(--af-ink); margin-top: 64px; }
.af-foot-brand {
    font-family: var(--font-brand);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--af-ink);
}
.af-foot-brand span {
    display: block;
    margin-top: 6px;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--af-muted);
}
.af-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin: 18px 0;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
}
.af-foot-links a { color: var(--af-ink); }
.af-foot-links a:hover { color: var(--af-tech); opacity: 1; }

/* Reuse/override leftover wirqo class names from copied templates */
.wq-topbar { display: none; }
.wq-masthead-sub { display: none; }
.wq-foot-brand { display: none; }
.wq-editor-strip {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 18px;
    align-items: center;
    margin: 40px 0;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--af-line);
}
.wq-editor-strip h2 {
    margin: 0 0 6px;
    font-family: var(--font-brand);
    font-size: 2rem;
}
.wq-editor-link {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--af-tech);
}
@media (max-width: 700px) {
    .wq-editor-strip { grid-template-columns: 64px 1fr; }
    .wq-editor-link { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .af-hero, .af-section, .af-hero-orbit, .gh-card-image img { animation: none !important; transition: none !important; }
}
