/* ============================== ARTICLES: OPTIONAL THEMES ==============================
   One article may pick a look (nl2_articles.theme). Everything here is scoped to
   .article-theme-<code> on .article-view, so the site header and menu never change.
   The sheet is linked only on articles with a theme. Content blocks (ab-*) can read the
   --at-* variables with a fallback and follow the theme without rules of their own. */

/* ---------- theme variables ---------- */

.article-theme-steampunk {
    --at-accent: #c8913a;
    --at-paper: #2a160c;
    --at-surface: rgba(20, 9, 3, 0.45);
    --at-surface-2: rgba(200, 145, 58, 0.14);
    --at-border: rgba(200, 145, 58, 0.55);
    --at-rule: rgba(200, 145, 58, 0.45);
    --at-text: #e8dcc0;
    --at-text-dim: #b6a888;
    --at-heading: #eec77c;
    --at-strong: #fff2d2;
    --at-link: #f2b866;
    --at-link-hover: #fff2d2;
    --at-code: #f3cd8a;
    --at-font-head: 'Old Standard TT', 'PT Serif', Georgia, serif;
    --at-font-body: inherit;
    --at-radius: 6px;
}

.article-theme-parchment {
    --at-accent: #8a2b1d;
    --at-paper: #efe2c3;
    --at-surface: rgba(110, 70, 25, 0.08);
    --at-surface-2: rgba(110, 70, 25, 0.14);
    --at-border: rgba(95, 58, 22, 0.35);
    --at-rule: rgba(95, 58, 22, 0.3);
    --at-text: #3a2a19;
    --at-text-dim: #6b5236;
    --at-heading: #4a1d10;
    --at-strong: #24170b;
    --at-link: #8a2b1d;
    --at-link-hover: #4a1d10;
    --at-code: #5a2414;
    --at-font-head: 'Cormorant Garamond', 'PT Serif', Georgia, serif;
    --at-font-body: 'PT Serif', Georgia, serif;
    --at-radius: 3px;
}

.article-theme-technoir {
    --at-accent: #22d3ee;
    --at-paper: #0a0e13;
    --at-surface: rgba(34, 211, 238, 0.05);
    --at-surface-2: rgba(34, 211, 238, 0.1);
    --at-border: rgba(34, 211, 238, 0.3);
    --at-rule: rgba(34, 211, 238, 0.28);
    --at-text: #c8d3dd;
    --at-text-dim: #8193a3;
    --at-heading: #e8fbff;
    --at-strong: #ffffff;
    --at-link: #67e8f9;
    --at-link-hover: #ffffff;
    --at-code: #7dd3fc;
    --at-font-head: 'Russo One', 'Segoe UI', sans-serif;
    --at-font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --at-font-body: inherit;
    --at-radius: 0;
}

/* ---------- shared rules of every theme (read the variables) ---------- */

.article-themed .article-body {
    position: relative;
    margin-top: 1.25rem;
    padding: 2.5rem 3rem 3rem;
    background-color: var(--at-paper);
    border: 1px solid var(--at-border);
    border-radius: var(--at-radius);
}

.article-themed .article-content {
    color: var(--at-text);
    font-family: var(--at-font-body);
}

.article-themed .article-content h1,
.article-themed .article-content h2,
.article-themed .article-content h3,
.article-themed .article-content h4,
.article-themed .article-content h5,
.article-themed .article-content h6 {
    color: var(--at-heading);
    font-family: var(--at-font-head);
}

.article-themed .article-content > :first-child {
    margin-top: 0;
}

.article-themed .article-content h2 {
    border-bottom: 1px solid var(--at-rule);
}

.article-themed .article-content a {
    color: var(--at-link);
}

.article-themed .article-content a:hover {
    color: var(--at-link-hover);
}

.article-themed .article-content strong,
.article-themed .article-content b {
    color: var(--at-strong);
}

.article-themed .article-content li::marker {
    color: var(--at-accent);
}

.article-themed .article-content blockquote {
    border-left-color: var(--at-accent);
    background: var(--at-surface);
    color: var(--at-text);
}

.article-themed .article-content figcaption,
.article-themed .article-footer-meta {
    color: var(--at-text-dim);
}

.article-themed .article-content code {
    background: var(--at-surface-2);
    color: var(--at-code);
}

.article-themed .article-content pre {
    background: var(--at-surface);
    border-color: var(--at-border);
}

.article-themed .article-content hr {
    border-top-color: var(--at-rule);
}

.article-themed .article-content .table-wrapper {
    border-color: var(--at-border);
}

.article-themed .article-content th,
.article-themed .article-content td {
    border-bottom-color: var(--at-rule);
}

.article-themed .article-content th {
    color: var(--at-strong);
    background: var(--at-surface-2);
}

.article-themed .article-hero h1 {
    font-family: var(--at-font-head);
}

.article-themed .article-hero-meta .author-avatar,
.article-themed .article-comments > h4::before {
    border-color: var(--at-accent);
}

.article-themed .article-comments > h4::before {
    background: var(--at-accent);
}

/* Content blocks (article-blocks.css) take their accent from --p-color and their lines from --ab-*.
   Inside the article only, so the site menu keeps its colour. */
.article-themed .article-content,
.article-themed-accent .article-content {
    --p-color: var(--at-accent);
}

.article-themed .article-content {
    --ab-radius: var(--at-radius);
}

/* An accent colour on an article without a theme only recolours the decorations. */
.article-themed-accent:not(.article-themed) .article-content li::marker {
    color: var(--at-accent);
}

.article-themed-accent:not(.article-themed) .article-content blockquote {
    border-left-color: var(--at-accent);
}

/* ---------- Steampunk: rust-brown blueprint sheet (as the mod's blueprints) in a riveted brass frame ---------- */

.article-theme-steampunk .article-body {
    border: 3px solid #a8772f;
    box-shadow:
        0 0 0 1px #3d2810,
        inset 0 0 0 1px rgba(255, 222, 160, 0.28),
        inset 0 0 0 7px rgba(110, 72, 24, 0.55),
        inset 0 0 60px rgba(0, 0, 0, 0.35),
        0 18px 40px rgba(0, 0, 0, 0.45);
    background-image:
        linear-gradient(rgba(243, 203, 149, 0.085) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 203, 149, 0.085) 1px, transparent 1px),
        linear-gradient(rgba(243, 203, 149, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 203, 149, 0.035) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 0%, rgba(150, 75, 30, 0.22), transparent 70%);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px, 100% 100%;
}

/* Rivets in the four corners of the frame */
.article-theme-steampunk .article-body::before {
    content: '';
    position: absolute;
    inset: 9px;
    pointer-events: none;
    --rivet: radial-gradient(circle at 40% 35%, #ffe7ad 0 1.5px, #c8913a 2.5px, #6b4514 4.5px, rgba(0, 0, 0, 0.45) 5.5px, transparent 6.5px);
    background:
        var(--rivet) left top / 14px 14px no-repeat,
        var(--rivet) right top / 14px 14px no-repeat,
        var(--rivet) left bottom / 14px 14px no-repeat,
        var(--rivet) right bottom / 14px 14px no-repeat;
}

.article-theme-steampunk .article-content h2 {
    border-bottom: 3px double var(--at-rule);
    letter-spacing: 0.01em;
}

.article-theme-steampunk .article-content h3 {
    color: #e2a868;
}

.article-theme-steampunk .article-content img,
.article-theme-steampunk .article-content figure img {
    border: 3px solid #a8772f;
    border-radius: 4px;
    box-shadow: 0 0 0 1px #3d2810, 0 12px 28px rgba(0, 0, 0, 0.5);
}

.article-theme-steampunk .article-content blockquote {
    border-left: 4px solid #b87333;
    font-style: normal;
}

.article-theme-steampunk .article-content th {
    background: linear-gradient(180deg, #4a3415, #33230d);
    color: #f6dfaa;
    font-family: var(--at-font-head);
}

.article-theme-steampunk .article-hero h1 {
    color: #f6e2b3;
    font-weight: 700;
    text-shadow: 0 2px 0 #3d2810, 0 4px 26px rgba(0, 0, 0, 0.9);
}

.article-theme-steampunk .article-hero-meta .author-avatar {
    border: 2px solid #c8913a;
}

/* Content blocks: brass-framed plates, rivet step numbers */
.article-theme-steampunk .article-content {
    --ab-tint: rgba(20, 9, 3, 0.42);
    --ab-line: rgba(200, 145, 58, 0.38);
    --ab-tip: #8fc46a;
    --ab-note: #7fb6dd;
    --ab-warning: #e7a93a;
    --ab-danger: #e0674a;
}

.article-theme-steampunk .article-content :is(.ab-toc, .ab-specs, .ab-details, .ab-table) {
    border: 2px solid #a8772f;
    box-shadow: 0 0 0 1px #3d2810, inset 0 0 0 1px rgba(255, 222, 160, 0.16), 0 8px 22px rgba(0, 0, 0, 0.35);
}

.article-theme-steampunk .article-content :is(.ab-specs-title, .ab-steps-title, .ab-step-title, .ab-details > summary, .ab-callout-title) {
    font-family: var(--at-font-head);
}

.article-theme-steampunk .article-content .ab-steps-list > li::before {
    color: #2a1a08;
    border: 1px solid #3d2810;
    background: radial-gradient(circle at 38% 32%, #ffe7ad, #c8913a 55%, #7a5018);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.article-theme-steampunk .article-content .ab-callout {
    border-radius: 4px;
}

/* ---------- Parchment: aged paper, ink and a drop cap ---------- */

.article-theme-parchment .article-body {
    border: 1px solid #b8975f;
    box-shadow:
        inset 0 0 90px rgba(120, 72, 20, 0.28),
        inset 0 0 18px rgba(120, 72, 20, 0.2),
        0 18px 40px rgba(0, 0, 0, 0.5);
    background-image:
        radial-gradient(ellipse at 20% 15%, rgba(255, 250, 230, 0.55), transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(150, 100, 40, 0.16), transparent 60%),
        repeating-linear-gradient(0deg, rgba(120, 80, 30, 0.025) 0 2px, transparent 2px 5px);
}

.article-theme-parchment .article-content {
    font-size: 1.12rem;
}

.article-theme-parchment .article-content h2 {
    font-size: 2.2rem;
    text-align: center;
    border-bottom: 0;
    padding-bottom: 0.9rem;
    background: linear-gradient(90deg, transparent, var(--at-rule) 20%, var(--at-rule) 80%, transparent) center bottom / 100% 1px no-repeat;
}

.article-theme-parchment .article-content h3 {
    font-size: 1.75rem;
}

.article-theme-parchment .article-content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--at-font-head);
    font-size: 3.6em;
    line-height: 0.85;
    margin: 0.06em 0.12em 0 0;
    color: var(--at-accent);
}

.article-theme-parchment .article-content img,
.article-theme-parchment .article-content figure img {
    border: 1px solid rgba(95, 58, 22, 0.45);
    border-radius: 2px;
    padding: 5px;
    background: #f7eed8;
    box-shadow: 0 6px 18px rgba(80, 50, 15, 0.3);
}

.article-theme-parchment .article-content pre {
    background: #e5d3ac;
}

/* Content blocks: ink colours readable on paper */
.article-theme-parchment .article-content {
    --ab-tint: rgba(110, 70, 25, 0.07);
    --ab-line: rgba(95, 58, 22, 0.28);
    --ab-tip: #3d6b28;
    --ab-note: #2b5582;
    --ab-warning: #8a5a0e;
    --ab-danger: #8a2b1d;
}

.article-theme-parchment .article-content :is(.ab-specs-title, .ab-steps-title, .ab-step-title, .ab-details > summary) {
    font-family: var(--at-font-head);
    font-size: 1.25em;
}

.article-theme-parchment .article-hero h1 {
    font-weight: 700;
    font-size: clamp(3rem, 6.6vw, 4.8rem);
}

/* ---------- Dark tech: scanlines, cut corners and a cyan glow ---------- */

.article-theme-technoir .article-body {
    border: 1px solid var(--at-border);
    clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at 100% 0%, rgba(34, 211, 238, 0.1), transparent 55%),
        radial-gradient(ellipse at 0% 100%, rgba(244, 114, 182, 0.07), transparent 55%);
}

.article-theme-technoir .article-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    width: 140px;
    height: 2px;
    background: var(--at-accent);
    box-shadow: 0 0 12px var(--at-accent);
}

.article-theme-technoir .article-content h2 {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--at-rule);
    box-shadow: 0 1px 0 rgba(34, 211, 238, 0.12);
}

.article-theme-technoir .article-content h3 {
    font-weight: 400;
    color: #f9a8d4;
}

.article-theme-technoir .article-content code,
.article-theme-technoir .article-content pre,
.article-theme-technoir .article-content th,
.article-theme-technoir .article-footer-meta {
    font-family: var(--at-font-mono);
}

.article-theme-technoir .article-content th {
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.06em;
}

.article-theme-technoir .article-content img,
.article-theme-technoir .article-content figure img {
    border: 1px solid var(--at-border);
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 28px rgba(34, 211, 238, 0.1);
}

.article-theme-technoir .article-content blockquote {
    font-style: normal;
    border-radius: 0;
}

/* Content blocks: square corners, neon callouts */
.article-theme-technoir .article-content {
    --ab-tip: #34d399;
    --ab-note: #22d3ee;
    --ab-warning: #fbbf24;
    --ab-danger: #f472b6;
}

.article-theme-technoir .article-content .ab-steps-list > li::before {
    border-radius: 0;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

.article-theme-technoir .article-content :is(.ab-specs-title, .ab-steps-title, .ab-step-title) {
    font-family: var(--at-font-head);
    font-weight: 400;
}

.article-theme-technoir .article-content :is(.ab-specs-row dt, .ab-key) {
    font-family: var(--at-font-mono);
}

.article-theme-technoir .article-hero h1 {
    font-weight: 400;
    letter-spacing: 0.01em;
    text-shadow: 0 0 22px rgba(34, 211, 238, 0.35), 0 3px 24px rgba(0, 0, 0, 0.9);
}

/* Editor preview window: the sheet is the whole preview */
.article-preview.article-themed {
    background-color: var(--at-paper);
    padding-bottom: 2rem;
}

.article-preview.article-themed .article-preview-title {
    color: var(--at-heading);
    font-family: var(--at-font-head);
}

.article-preview.article-themed .article-preview-meta {
    color: var(--at-text-dim);
}

/* ---------- phone width ---------- */

@media (max-width: 768px) {
    .article-themed .article-body {
        padding: 1.6rem 1.25rem 2rem;
    }

    .article-theme-parchment .article-content h2 {
        font-size: 1.7rem;
    }

    .article-theme-parchment .article-hero h1 {
        font-size: clamp(1.7rem, 7.5vw, 2.5rem);
    }
}

@media (max-width: 576px) {
    .article-themed .article-body {
        margin-left: -0.35rem;
        margin-right: -0.35rem;
        padding: 1.25rem 0.95rem 1.6rem;
    }

    .article-theme-steampunk .article-body {
        border-width: 2px;
    }

    .article-theme-steampunk .article-body::before {
        inset: 5px;
    }

    .article-theme-steampunk .article-content img,
    .article-theme-steampunk .article-content figure img {
        border-width: 2px;
    }

    .article-theme-technoir .article-body {
        clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    }

    .article-theme-parchment .article-content > p:first-of-type::first-letter {
        font-size: 3em;
    }
}

/* ---------- editor: theme picker ---------- */

.article-theme-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.article-theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    margin: 0;
}

.article-theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* :where() keeps these defaults below the theme variables above */
:where(.article-theme-swatch) {
    --at-paper: #141418;
    --at-heading: #fff;
    --at-text: #9a9aa2;
    --at-border: rgba(255, 255, 255, 0.12);
    --at-accent: var(--al-accent, #e04444);
    --at-font-head: inherit;
}

.article-theme-swatch {
    position: relative;
    display: block;
    width: 112px;
    height: 72px;
    padding: 0.45rem 0.6rem;
    background: var(--at-paper);
    border: 2px solid var(--at-border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.article-theme-swatch b {
    display: block;
    font-family: var(--at-font-head);
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--at-heading);
}

.article-theme-swatch i {
    display: block;
    height: 4px;
    margin-top: 5px;
    border-radius: 2px;
    background: var(--at-text);
    opacity: 0.55;
}

.article-theme-swatch i:nth-of-type(1) {
    width: 70%;
    background: var(--at-accent);
    opacity: 1;
}

.article-theme-swatch i:nth-of-type(3) {
    width: 55%;
}

.article-theme-swatch.article-theme-steampunk {
    border-color: #a8772f;
    background-image:
        linear-gradient(rgba(243, 203, 149, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 203, 149, 0.12) 1px, transparent 1px);
    background-size: 12px 12px;
}

.article-theme-swatch.article-theme-technoir {
    border-radius: 0;
}

.article-theme-option input:checked + .article-theme-swatch {
    box-shadow: 0 0 0 3px var(--p-color, #e04444);
}

.article-theme-option input:focus-visible + .article-theme-swatch {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.article-theme-name {
    font-size: 0.85rem;
}

.article-theme-accent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.article-theme-accent input[type="color"] {
    width: 42px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.article-theme-accent:not(.is-set) input[type="color"] {
    opacity: 0.4;
}

.article-theme-accent:not(.is-set) .btn {
    display: none;
}

/* ---------- Wiki mode chrome (article-blocks.css, js/article-wiki.js) ----------
   The side contents, breadcrumbs bar, back-to-top and toast read --ab-wiki-*.
   The drawer, back-to-top and toast sit in .ab-wiki-portal in <body>, which repeats
   the article's theme classes, so the same selectors reach them. */

.article-themed:is(.ab-wiki, .ab-wiki-portal),
.article-themed-accent:is(.ab-wiki, .ab-wiki-portal) {
    --ab-wiki-accent: var(--at-accent);
}

.article-themed :is(.ab-wiki-list .ab-wiki-h2 > a, .ab-wiki-crumb:last-child) {
    font-family: var(--ab-wiki-font-head);
}

/* Steampunk: blueprint panels in riveted brass */
.article-theme-steampunk:is(.ab-wiki, .ab-wiki-portal) {
    --ab-wiki-panel: #24130a;
    --ab-wiki-drawer: #24130a;
    --ab-wiki-line: rgba(200, 145, 58, 0.42);
    --ab-wiki-text: var(--at-text);
    --ab-wiki-strong: var(--at-strong);
    --ab-wiki-dim: var(--at-text-dim);
    --ab-wiki-hover: rgba(200, 145, 58, 0.12);
    --ab-wiki-field: rgba(14, 6, 2, 0.6);
    --ab-wiki-thumb: #7a5018;
    --ab-wiki-font-head: var(--at-font-head);
    --ab-wiki-radius: 6px;
}

.article-theme-steampunk :is(.ab-wiki-side, .ab-wiki-bar) {
    border: 2px solid #a8772f;
    box-shadow: 0 0 0 1px #3d2810, inset 0 0 0 1px rgba(255, 222, 160, 0.16), 0 10px 26px rgba(0, 0, 0, 0.45);
    background-image:
        linear-gradient(rgba(243, 203, 149, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 203, 149, 0.065) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Rivets in the corners of the side panel: a background stays on the box while the list scrolls */
.article-theme-steampunk .ab-wiki-side {
    --rivet: radial-gradient(circle at 40% 35%, #ffe7ad 0 1px, #c8913a 2px, #6b4514 3.5px, transparent 4.5px);
    background-image:
        var(--rivet), var(--rivet), var(--rivet), var(--rivet),
        linear-gradient(rgba(243, 203, 149, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 203, 149, 0.065) 1px, transparent 1px);
    background-size: 10px 10px, 10px 10px, 10px 10px, 10px 10px, 24px 24px, 24px 24px;
    background-position: 4px 4px, calc(100% - 4px) 4px, 4px calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
}

.article-theme-steampunk .ab-wiki-side-head {
    padding-bottom: 0.5rem;
    border-bottom: 3px double var(--ab-wiki-line);
}

.article-theme-steampunk .ab-wiki-side-title {
    color: var(--at-heading);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.article-theme-steampunk .ab-wiki-list .ab-wiki-h2 > a {
    color: var(--at-heading);
    font-size: 1.02rem;
}

.article-theme-steampunk .ab-wiki-list a.active {
    border-left: 3px solid #c8913a;
    background: linear-gradient(90deg, rgba(200, 145, 58, 0.26), rgba(200, 145, 58, 0.06));
    color: var(--at-strong);
}

/* Search: a recessed gauge window with a brass knob for the lens */
.article-theme-steampunk .ab-wiki-side .ab-wiki-search input,
.article-theme-steampunk .ab-wiki-side .ab-wiki-search input:focus {
    padding-left: 2.35rem;
    border: 1px solid #a8772f;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(12, 5, 2, 0.9), rgba(44, 24, 12, 0.8)) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), 0 0 0 1px #3d2810, 0 1px 0 rgba(255, 222, 160, 0.14);
    color: var(--at-strong) !important;
}

.article-theme-steampunk .ab-wiki-side .ab-wiki-search input:focus {
    border-color: #e0b062;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65), 0 0 0 1px #3d2810, 0 0 0 3px rgba(200, 145, 58, 0.28);
}

.article-theme-steampunk .ab-wiki-search input::placeholder {
    color: rgba(238, 199, 124, 0.62);
    font-family: var(--at-font-head);
    font-style: italic;
    letter-spacing: 0.03em;
}

.article-theme-steampunk .ab-wiki-search i {
    left: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid #3d2810;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #ffe7ad, #c8913a 55%, #7a5018);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    color: #2a1a08;
    font-size: 0.7rem;
}

.article-theme-steampunk .ab-wiki-result {
    border: 1px solid rgba(200, 145, 58, 0.32);
    border-left: 3px solid #a8772f;
    border-radius: 4px;
    background: rgba(14, 6, 2, 0.6);
}

.article-theme-steampunk .ab-wiki-result:hover {
    border-color: #c8913a;
    background: rgba(200, 145, 58, 0.12);
}

.article-theme-steampunk :is(.ab-wiki-result small, .ab-wiki-none) {
    color: var(--at-heading);
    font-family: var(--at-font-head);
    letter-spacing: 0.03em;
}

.article-theme-steampunk :is(.ab-wiki-result, .ab-wiki-hit) mark {
    background: linear-gradient(180deg, #f0cf86, #c8913a);
    color: #2a1a08;
}

.article-theme-steampunk .ab-wiki-progress {
    height: 3px;
    background: linear-gradient(90deg, #7a5018, #c8913a 60%, #ffe7ad);
}

.article-theme-steampunk .ab-wiki-toggle {
    border-color: #a8772f;
    background: linear-gradient(180deg, #4a3415, #33230d);
    color: #f6dfaa;
    font-family: var(--at-font-head);
}

.article-theme-steampunk .ab-wiki-crumb:last-child {
    color: var(--at-heading);
}

.article-theme-steampunk .ab-wiki-top {
    border: 1px solid #3d2810;
    background: radial-gradient(circle at 38% 32%, #ffe7ad, #c8913a 55%, #7a5018);
    color: #2a1a08;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
}

.article-theme-steampunk .ab-wiki-toast {
    border: 2px solid #a8772f;
    color: var(--at-strong);
    font-family: var(--at-font-head);
}

/* Parchment: aged paper and ink */
.article-theme-parchment:is(.ab-wiki, .ab-wiki-portal) {
    --ab-wiki-panel: #efe2c3;
    --ab-wiki-drawer: #efe2c3;
    --ab-wiki-line: rgba(95, 58, 22, 0.3);
    --ab-wiki-text: var(--at-text);
    --ab-wiki-strong: var(--at-strong);
    --ab-wiki-dim: var(--at-text-dim);
    --ab-wiki-hover: rgba(110, 70, 25, 0.1);
    --ab-wiki-field: rgba(255, 250, 232, 0.65);
    --ab-wiki-thumb: #b8975f;
    --ab-wiki-font-head: var(--at-font-head);
    --ab-wiki-radius: 3px;
}

.article-theme-parchment :is(.ab-wiki-side, .ab-wiki-bar, .ab-wiki-top, .ab-wiki-toast) {
    border-color: #b8975f;
    box-shadow: inset 0 0 30px rgba(120, 72, 20, 0.2), 0 10px 26px rgba(0, 0, 0, 0.4);
}

.article-theme-parchment .ab-wiki-side-title {
    color: var(--at-heading);
    font-size: 1rem;
}

.article-theme-parchment .ab-wiki-list .ab-wiki-h2 > a {
    color: var(--at-heading);
    font-size: 1.08rem;
    font-weight: 700;
}

.article-theme-parchment .ab-wiki-list a.active {
    border-left-color: var(--at-accent);
    background: rgba(138, 43, 29, 0.1);
    color: var(--at-accent);
}

.article-theme-parchment .ab-wiki-result mark,
.article-theme-parchment .ab-wiki-hit mark {
    background: rgba(138, 43, 29, 0.2);
    color: var(--at-strong);
}

/* Search: a ruled line on the paper, red-ink lens */
.article-theme-parchment .ab-wiki-side .ab-wiki-search input,
.article-theme-parchment .ab-wiki-side .ab-wiki-search input:focus {
    border: 1px solid #b8975f;
    border-radius: 2px;
    background: rgba(255, 250, 232, 0.72) !important;
    box-shadow: inset 0 1px 4px rgba(95, 58, 22, 0.22);
    color: var(--at-strong) !important;
    font-family: var(--at-font-body);
}

.article-theme-parchment .ab-wiki-side .ab-wiki-search input:focus {
    border-color: var(--at-accent);
    box-shadow: inset 0 1px 4px rgba(95, 58, 22, 0.22), 0 0 0 2px rgba(138, 43, 29, 0.16);
}

.article-theme-parchment .ab-wiki-search input::placeholder {
    color: rgba(95, 58, 22, 0.6);
    font-style: italic;
}

.article-theme-parchment .ab-wiki-search i {
    color: var(--at-accent);
}

.article-theme-parchment .ab-wiki-result {
    border: 1px solid rgba(95, 58, 22, 0.22);
    border-left: 3px solid rgba(138, 43, 29, 0.55);
    border-radius: 2px;
    background: rgba(255, 250, 232, 0.55);
    font-family: var(--at-font-body);
}

.article-theme-parchment .ab-wiki-result:hover {
    border-color: rgba(138, 43, 29, 0.55);
    background: rgba(255, 250, 232, 0.85);
}

.article-theme-parchment :is(.ab-wiki-result small, .ab-wiki-none) {
    color: var(--at-accent);
    font-family: var(--at-font-head);
    font-size: 0.85rem;
}

.article-theme-parchment .ab-wiki-toggle {
    border-color: #b8975f;
    font-family: var(--at-font-head);
    font-size: 0.95rem;
}

.article-theme-parchment .ab-wiki-backdrop {
    background: rgba(40, 24, 8, 0.45);
}

/* Tech-noir: dark glass, cyan lines, glow */
.article-theme-technoir:is(.ab-wiki, .ab-wiki-portal) {
    --ab-wiki-panel: rgba(8, 12, 17, 0.94);
    --ab-wiki-drawer: #0a0e13;
    --ab-wiki-line: rgba(34, 211, 238, 0.28);
    --ab-wiki-text: var(--at-text);
    --ab-wiki-strong: var(--at-strong);
    --ab-wiki-dim: var(--at-text-dim);
    --ab-wiki-hover: rgba(34, 211, 238, 0.08);
    --ab-wiki-field: rgba(34, 211, 238, 0.05);
    --ab-wiki-thumb: rgba(34, 211, 238, 0.35);
    --ab-wiki-font-head: var(--at-font-head);
    --ab-wiki-radius: 0;
}

.article-theme-technoir :is(.ab-wiki-side, .ab-wiki-bar) {
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 0 24px rgba(34, 211, 238, 0.06);
}

.article-theme-technoir .ab-wiki-side-title {
    color: var(--at-accent);
    font-family: var(--at-font-mono);
}

.article-theme-technoir .ab-wiki-list .ab-wiki-h2 > a {
    font-weight: 400;
    letter-spacing: 0.02em;
}

.article-theme-technoir .ab-wiki-list a.active {
    border-left-color: var(--at-accent);
    box-shadow: inset 3px 0 12px -6px var(--at-accent);
}

.article-theme-technoir .ab-wiki-progress {
    box-shadow: 0 0 10px var(--at-accent);
}

.article-theme-technoir :is(.ab-wiki-top, .ab-wiki-toggle) {
    border-radius: 0;
}

/* Search: a terminal prompt with a glowing lens */
.article-theme-technoir .ab-wiki-side .ab-wiki-search input,
.article-theme-technoir .ab-wiki-side .ab-wiki-search input:focus {
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 0;
    background: rgba(3, 7, 11, 0.92) !important;
    box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.07);
    color: var(--at-heading) !important;
    font-family: var(--at-font-mono);
    font-size: 0.82rem;
}

.article-theme-technoir .ab-wiki-side .ab-wiki-search input:focus {
    border-color: var(--at-accent);
    box-shadow: inset 0 0 14px rgba(34, 211, 238, 0.1), 0 0 0 1px var(--at-accent), 0 0 16px rgba(34, 211, 238, 0.35);
}

.article-theme-technoir .ab-wiki-search input::placeholder {
    color: rgba(103, 232, 249, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-theme-technoir .ab-wiki-search i {
    color: var(--at-accent);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}

.article-theme-technoir .ab-wiki-result {
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-left: 2px solid var(--at-accent);
    border-radius: 0;
    background: rgba(34, 211, 238, 0.04);
}

.article-theme-technoir .ab-wiki-result:hover {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}

.article-theme-technoir :is(.ab-wiki-result small, .ab-wiki-none) {
    color: var(--at-accent);
    font-family: var(--at-font-mono);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.article-theme-technoir :is(.ab-wiki-result, .ab-wiki-hit) mark {
    background: rgba(34, 211, 238, 0.24);
    color: #ffffff;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.8);
}

.article-theme-technoir .ab-wiki-top:hover {
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
}
