:root {
    --paper: #f5efe2;
    --paper-strong: #fbf7ef;
    --paper-deep: #efe4cf;
    --ink: #1f1a16;
    --ink-soft: #51473f;
    --line: rgba(56, 42, 31, 0.22);
    --line-soft: rgba(56, 42, 31, 0.1);
    --accent: #7f2f20;
    --accent-strong: #6a2418;
    --accent-soft: rgba(127, 47, 32, 0.1);
    --accent-paper: rgba(127, 47, 32, 0.08);
    --olive: #52604d;
    --olive-soft: rgba(82, 96, 77, 0.1);
    --gold: #b0864b;
    --gold-soft: rgba(176, 134, 75, 0.12);
    --shadow: 0 18px 40px rgba(52, 39, 28, 0.1), 0 4px 12px rgba(52, 39, 28, 0.06);
    --font-ui: "Noto Sans JP", "Yu Gothic UI", "Hiragino Sans", "BIZ UDPGothic", sans-serif;
    --font-body: "Noto Serif JP", "BIZ UDPMincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
    --font-heading: "Zen Old Mincho", "BIZ UDPMincho", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
    --font-display: "Cormorant Garamond", Georgia, "Noto Serif JP", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(127, 47, 32, 0.08), transparent 22%),
        radial-gradient(circle at top right, rgba(82, 96, 77, 0.08), transparent 18%),
        repeating-linear-gradient(
            to bottom,
            rgba(90, 72, 51, 0.03) 0,
            rgba(90, 72, 51, 0.03) 1px,
            transparent 1px,
            transparent 9px
        ),
        linear-gradient(180deg, #f7f1e4 0%, #efe6d6 100%);
    font-family: var(--font-body);
    line-height: 1.75;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 35%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.12), transparent 20%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.site-header {
    position: relative;
    margin-bottom: 28px;
    padding: 16px 22px 18px;
    border: 1px solid var(--line);
    border-top: 3px double var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(243, 236, 224, 0.96));
    box-shadow: var(--shadow);
}

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    height: 1px;
    background: var(--line-soft);
}

.site-header::before {
    top: 10px;
}

.site-header::after {
    bottom: 10px;
}

.site-header-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 12px;
    border-bottom: 3px double var(--line);
    color: rgba(81, 71, 63, 0.82);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.site-header-top p:nth-child(2) {
    color: var(--accent);
    font-style: italic;
}

.header-date {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.site-header-top p,
.site-footer p {
    margin: 0;
}

.site-header-main {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    padding-top: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.site-brand img {
    width: 60px;
    height: 60px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
    padding: 6px;
}

.site-brand-copy {
    display: grid;
    gap: 2px;
}

.site-brand-copy strong {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 0 rgba(127, 47, 32, 0.06);
}

.site-brand-copy span {
    color: var(--ink-soft);
    font-size: 0.94rem;
    font-family: var(--font-ui);
}

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

.site-nav a {
    position: relative;
    color: var(--ink-soft);
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    font-family: var(--font-ui);
}

.inline-nav-form {
    display: inline-flex;
}

.inline-nav-form button {
    position: relative;
    color: var(--ink-soft);
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    font-family: var(--font-ui);
    font-size: 1rem;
}

.inline-nav-form button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: transparent;
    transition: background-color 0.2s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: transparent;
    transition: background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--ink);
    background: rgba(127, 47, 32, 0.08);
}

.inline-nav-form button:hover {
    color: var(--ink);
    background: rgba(127, 47, 32, 0.08);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    background: var(--accent);
}

.inline-nav-form button:hover::after {
    background: var(--accent);
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--olive);
    border-top: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    background: rgba(82, 96, 77, 0.08);
    color: #2f3b2d;
}

.breadcrumbs {
    margin: 12px 0 18px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-family: var(--font-ui);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    color: rgba(81, 71, 63, 0.55);
}

.breadcrumbs a {
    border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.section {
    margin-top: 30px;
    position: relative;
}

.section + .section::before {
    content: "\2767";
    display: block;
    text-align: center;
    margin: 0 auto 24px;
    padding: 0 1em;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1rem;
    opacity: 0.5;
    position: relative;
}

.section + .section::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

.section-narrow {
    max-width: 760px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 3px double var(--line);
}

.section-title,
.hero-title,
.article-title,
.feature-lead-title {
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(1.8rem, 3.3vw, 2.85rem);
    line-height: 1.12;
    color: #2a2019;
}

.section-copy,
.hero-copy,
.meta-copy,
.article-card p,
.coverage-body p,
.feature-mini p,
.feature-lead-copy,
.editorial-points p,
.form-help {
    color: var(--ink-soft);
}

.article-meta,
.article-summary-label,
.article-card-meta,
.category-link,
.tag-link,
.footer-links,
.glossary-inline-link,
.form-field label,
.form-field input,
.form-field textarea,
.form-field select,
.toc-title,
.toc-list {
    font-family: var(--font-ui);
}

.section-copy,
.hero-copy,
.meta-copy,
.article-card p,
.coverage-body p,
.feature-mini p,
.feature-lead-copy,
.editorial-points p {
    line-height: 1.9;
}

.pill,
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(127, 47, 32, 0.04));
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.pill::before,
.hero-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 999px;
}

.button-row,
.chip-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sort-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.sort-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sort-chip:hover {
    color: var(--accent);
    border-color: rgba(127, 47, 32, 0.28);
}

.sort-chip.is-active {
    background: rgba(127, 47, 32, 0.1);
    color: var(--accent-strong);
    border-color: rgba(127, 47, 32, 0.26);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    font-family: var(--font-ui);
}

.button:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 47, 32, 0.35);
}

.button-primary {
    background: var(--ink);
    color: var(--paper-strong);
    border-color: var(--ink);
}

.button-secondary {
    color: var(--accent);
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.button-icon svg {
    display: block;
    width: 1.15em;
    height: 1.15em;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(127, 47, 32, 0.04));
    color: var(--ink);
    font-size: 0.88rem;
}

.tag-link:hover {
    color: var(--accent);
    border-color: rgba(127, 47, 32, 0.22);
}

.glossary-inline-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(127, 47, 32, 0.35);
    text-underline-offset: 0.16em;
}

.glossary-inline-link:hover {
    color: var(--accent-strong);
    text-decoration-color: rgba(127, 47, 32, 0.55);
    text-shadow: 0 0 8px rgba(127, 47, 32, 0.08);
}

.category-link,
.category-pill {
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.18);
}

.category-link:hover,
.category-pill:hover {
    color: #fff;
    border-color: transparent;
    filter: brightness(1.03);
}

.category-link--programming,
.category-pill--programming {
    background: linear-gradient(180deg, #4a5872, #334055);
}

.category-link--server,
.category-pill--server {
    background: linear-gradient(180deg, #465f6f, #2f4656);
}

.category-link--network,
.category-pill--network {
    background: linear-gradient(180deg, #3f6f69, #2d5550);
}

.category-link--framework,
.category-pill--framework {
    background: linear-gradient(180deg, #6d5263, #523b49);
}

.category-link--software,
.category-pill--software {
    background: linear-gradient(180deg, #8a6a3c, #6c532f);
}

.category-link--security,
.category-pill--security {
    background: linear-gradient(180deg, #9b5237, #7f2f20);
}

.category-link--ai,
.category-pill--ai {
    background: linear-gradient(180deg, #53684a, #3f5238);
}

.masthead {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 22px;
    align-items: stretch;
}

.masthead-copy,
.masthead-note,
.editorial-strip,
.feature-lead,
.feature-stack,
.coverage-card,
.article-card,
.article-panel,
.meta-box,
.form-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.97), rgba(244, 236, 222, 0.97));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.masthead-copy,
.masthead-note,
.editorial-strip,
.feature-lead,
.feature-stack,
.article-panel,
.form-panel {
    overflow: hidden;
}

.masthead-copy::before,
.masthead-note::before,
.editorial-strip::before,
.feature-lead::before,
.feature-stack::before,
.article-panel::before,
.form-panel::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    height: 1px;
    background: var(--line-soft);
}

.masthead-copy {
    padding: 42px 40px 34px;
    background:
        radial-gradient(circle at top right, rgba(176, 134, 75, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(244, 236, 222, 0.97));
}

.masthead-copy::after {
    content: "VOL. 01";
    position: absolute;
    top: 18px;
    right: 18px;
    color: rgba(81, 71, 63, 0.45);
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    font-style: italic;
}

.hero-title {
    margin-top: 18px;
    font-size: clamp(2.6rem, 4.8vw, 4.5rem);
    line-height: 1.02;
    color: #241a15;
}

.hero-copy {
    margin: 24px 0 0;
    max-width: 720px;
    font-size: 1.03rem;
}

.article-lead-copy p {
    margin: 0;
}

.button-row {
    margin-top: 26px;
}

.masthead-note {
    padding: 28px 24px;
    background:
        linear-gradient(180deg, rgba(52, 36, 28, 0.98), rgba(31, 23, 19, 0.98));
    color: #f5ebdd;
}

.masthead-note::before {
    background: rgba(255, 235, 209, 0.18);
}

.note-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: rgba(245, 235, 221, 0.8);
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.note-label::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #d4a679;
    border-radius: 999px;
}

.masthead-note p {
    margin: 0;
    color: rgba(245, 235, 221, 0.84);
    line-height: 1.95;
}

.note-rule {
    width: 100%;
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, rgba(212, 166, 121, 0.62), transparent);
}

.note-quote {
    font-family: var(--font-heading);
    font-size: 1.16rem;
    line-height: 1.7;
}

.editorial-strip {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 248, 239, 0.96), rgba(240, 232, 220, 0.96));
}

.editorial-kicker {
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.editorial-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.editorial-points article {
    padding-left: 18px;
    border-left: 1px solid var(--line-soft);
}

.editorial-points strong {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-size: 1.12rem;
    color: var(--accent-strong);
}

.feature-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}

.feature-layout-single {
    grid-template-columns: 1fr;
}

.feature-lead {
    display: grid;
    grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1fr);
    align-self: start;
}

.feature-lead--text-only {
    grid-template-columns: 1fr;
}

.feature-lead-media {
    min-height: 100%;
    background:
        linear-gradient(135deg, rgba(127, 47, 32, 0.18), transparent 34%),
        linear-gradient(315deg, rgba(176, 134, 75, 0.16), transparent 36%),
        linear-gradient(180deg, #f1e4cf, #eadcc5);
    border-right: 1px solid var(--line-soft);
}

.feature-lead-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-lead-media img.is-svg {
    object-fit: contain;
    padding: 18px;
    background: rgba(255, 255, 255, 0.32);
}

.feature-lead-body {
    padding: 26px 24px 24px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.54), rgba(127, 47, 32, 0.03));
}

.feature-lead--text-only .feature-lead-body {
    padding: 32px 30px 28px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.meta-row-spacer {
    margin-left: auto;
}

.meta-row span:last-child {
    color: var(--accent);
    padding-right: 6px;
}

.feature-lead-title {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 1.2;
    color: #291e17;
}

.feature-lead-copy {
    margin: 14px 0 0;
}

.feature-readmore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 700;
}

.feature-readmore::after {
    content: "→";
}

.feature-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
    align-self: start;
    background:
        linear-gradient(180deg, rgba(255, 249, 240, 0.96), rgba(241, 233, 220, 0.96));
}

.feature-stack-head {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}

.feature-stack-head strong {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    color: var(--accent-strong);
}

.feature-stack-head span {
    color: var(--ink-soft);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.feature-mini {
    padding: 16px 16px 14px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 252, 247, 0.5);
}

.feature-mini:first-of-type {
    border-top: 1px solid var(--line-soft);
    padding-top: 16px;
}

.feature-mini h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.55;
}

.feature-mini p {
    margin: 10px 0 0;
    font-size: 0.94rem;
}

.home-dual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-panel {
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(242, 234, 221, 0.94));
    box-shadow: var(--shadow);
}

.home-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.home-panel-head h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-strong);
}

.home-panel-head p {
    margin: 6px 0 0;
    color: var(--ink-soft);
}

.home-panel-head span {
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-article-list {
    display: grid;
}

.home-article-item {
    position: relative;
    padding: 16px 0;
    border-top: 1px solid var(--line-soft);
}

.article-card.is-visited,
.home-article-item.is-visited {
    opacity: 1;
}

.article-card.is-visited {
    border-top-color: rgba(88, 82, 76, 0.18);
    background: linear-gradient(180deg, rgba(238, 235, 230, 0.98), rgba(231, 227, 220, 0.96));
}

.article-card.is-visited .article-card-body,
.home-article-item.is-visited {
    background: linear-gradient(180deg, rgba(238, 235, 229, 0.94), rgba(229, 225, 218, 0.9));
}

.article-card.is-visited h3,
.home-article-item.is-visited h3 {
    color: #6a635b;
}

.article-card.is-visited p,
.home-article-item.is-visited p {
    color: rgba(113, 105, 97, 0.88);
}

.article-card.is-visited .meta-row,
.home-article-item.is-visited .meta-row,
.article-card.is-visited .home-article-pv,
.home-article-item.is-visited .home-article-pv {
    color: rgba(128, 120, 112, 0.84);
}

.home-article-item.is-visited {
    border-left: 3px solid rgba(88, 82, 76, 0.14);
    padding-left: 14px;
}

.article-card.is-visited .category-link,
.home-article-item.is-visited .category-link {
    filter: saturate(0.72) brightness(1.06);
    opacity: 0.88;
}

.article-card.is-visited .tag-link:not(.category-link),
.home-article-item.is-visited .tag-link:not(.category-link) {
    background: rgba(247, 244, 239, 0.86);
    color: rgba(128, 120, 112, 0.84);
    border-color: rgba(88, 82, 76, 0.08);
}

.home-article-list .home-article-item:first-child {
    border-top: 0;
    padding-top: 18px;
}

.home-article-item h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.28rem;
    line-height: 1.45;
}

.home-article-item p {
    margin: 10px 0 0;
    color: var(--ink-soft);
}

.article-card-main-link {
    display: block;
    color: inherit;
}

.article-card-main-link:hover h3,
.article-card-main-link:hover p {
    color: var(--accent-strong);
}

.home-article-rank {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    display: inline-block;
    margin-bottom: 10px;
}

.home-article-pv {
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coverage-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 20px 20px 18px;
    border-top: 3px solid rgba(127, 47, 32, 0.22);
}

.coverage-index {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(176, 134, 75, 0.08));
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--accent);
}

.coverage-body strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.18rem;
    line-height: 1.4;
    color: var(--accent-strong);
}

.coverage-body p {
    margin: 10px 0 0;
}

.coverage-count {
    align-self: center;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(127, 47, 32, 0.1), rgba(176, 134, 75, 0.08));
    color: var(--accent);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.coverage-card--programming {
    border-top-color: rgba(74, 88, 114, 0.34);
}

.coverage-card--server {
    border-top-color: rgba(70, 95, 111, 0.34);
}

.coverage-card--network {
    border-top-color: rgba(63, 111, 105, 0.34);
}

.coverage-card--framework {
    border-top-color: rgba(109, 82, 99, 0.34);
}

.coverage-card--software {
    border-top-color: rgba(138, 106, 60, 0.34);
}

.coverage-card--security {
    border-top-color: rgba(127, 47, 32, 0.42);
}

.coverage-card--ai {
    border-top-color: rgba(83, 104, 74, 0.36);
}

.coverage-index--programming {
    color: #3d4b61;
    border-color: rgba(74, 88, 114, 0.22);
    background: linear-gradient(180deg, rgba(74, 88, 114, 0.12), rgba(255, 255, 255, 0.58));
}

.coverage-index--server {
    color: #334b5a;
    border-color: rgba(70, 95, 111, 0.22);
    background: linear-gradient(180deg, rgba(70, 95, 111, 0.12), rgba(255, 255, 255, 0.58));
}

.coverage-index--network {
    color: #2f5b55;
    border-color: rgba(63, 111, 105, 0.22);
    background: linear-gradient(180deg, rgba(63, 111, 105, 0.12), rgba(255, 255, 255, 0.58));
}

.coverage-index--framework {
    color: #5b4453;
    border-color: rgba(109, 82, 99, 0.22);
    background: linear-gradient(180deg, rgba(109, 82, 99, 0.12), rgba(255, 255, 255, 0.58));
}

.coverage-index--software {
    color: #74562f;
    border-color: rgba(138, 106, 60, 0.22);
    background: linear-gradient(180deg, rgba(138, 106, 60, 0.12), rgba(255, 255, 255, 0.58));
}

.coverage-index--security {
    color: var(--accent);
    border-color: rgba(127, 47, 32, 0.26);
    background: linear-gradient(180deg, rgba(127, 47, 32, 0.14), rgba(255, 255, 255, 0.58));
}

.coverage-index--ai {
    color: #465a3f;
    border-color: rgba(83, 104, 74, 0.22);
    background: linear-gradient(180deg, rgba(83, 104, 74, 0.12), rgba(255, 255, 255, 0.58));
}

.tag-cloud {
    padding-top: 8px;
}

.grid-articles,
.taxonomy-grid,
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.glossary-card {
    padding: 22px 22px 20px;
    border: 1px solid var(--line);
    border-top: 3px solid rgba(127, 47, 32, 0.24);
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(242, 234, 221, 0.94));
    box-shadow: var(--shadow);
}

.glossary-card-head {
    display: grid;
    gap: 6px;
}

.glossary-card-kicker {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.glossary-card strong {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.2;
}

.glossary-card p {
    margin: 14px 0 0;
    color: var(--ink-soft);
}

.glossary-title {
    font-size: clamp(2.6rem, 5vw, 5.1rem);
    margin-bottom: 18px;
}

.glossary-support-grid {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.glossary-support-box p + p {
    margin-top: 12px;
}

.glossary-related-grid {
    gap: 12px;
}

.glossary-related-card {
    display: block;
    padding: 14px 16px;
    border-left: 3px solid rgba(127, 47, 32, 0.18);
    background: rgba(255, 255, 255, 0.44);
    color: var(--ink);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.glossary-related-card:hover {
    border-color: rgba(127, 47, 32, 0.42);
    background: rgba(255, 255, 255, 0.62);
    transform: translateY(-1px);
}

.glossary-related-card strong {
    display: block;
    margin-bottom: 6px;
}

.article-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-top: 3px solid rgba(127, 47, 32, 0.22);
}

.article-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(127, 47, 32, 0.18), transparent 35%),
        linear-gradient(315deg, rgba(82, 96, 77, 0.16), transparent 35%),
        linear-gradient(180deg, #f1e6d5, #ebe0cb);
    border-bottom: 1px solid var(--line-soft);
}

.article-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-media img.is-svg {
    object-fit: contain;
    padding: 14px;
    background: rgba(255, 255, 255, 0.28);
}

.article-card-body,
.taxonomy-card-body {
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.74), rgba(127, 47, 32, 0.02));
}

.article-card h3,
.taxonomy-card strong {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.24rem;
    line-height: 1.48;
    color: #2a2019;
}

.article-card p,
.taxonomy-card p {
    margin: 12px 0 0;
}

.chip-row {
    margin-top: 16px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.article-panel {
    padding: 28px;
    border-top: 5px double var(--accent);
    background:
        radial-gradient(circle at top right, rgba(176, 134, 75, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(244, 236, 222, 0.97));
}

.article-title {
    font-size: clamp(2.15rem, 4vw, 3.95rem);
    line-height: 1.08;
    color: #241a15;
    max-width: none;
    text-wrap: wrap;
}

.article-content {
    font-size: 1.02rem;
    line-height: 1.95;
}

.article-actions {
    margin: 22px 0 18px;
}

.article-actions-bottom {
    display: grid;
    gap: 14px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
}

.article-actions-copy strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--accent-strong);
}

.article-actions-copy p {
    margin: 0;
    color: var(--ink-soft);
}

.favorite-button {
    min-width: 190px;
    justify-content: center;
}

.favorite-button-icon svg {
    width: 1.08rem;
    height: 1.08rem;
}

.favorite-button.is-active {
    background: rgba(127, 47, 32, 0.12);
    border-color: rgba(127, 47, 32, 0.28);
    color: var(--accent-strong);
}

.favorite-login-note {
    padding: 16px 18px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.48);
}

.favorite-login-note p {
    margin: 0;
    color: var(--ink-soft);
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    cursor: pointer;
}

.article-content > p:first-of-type::first-letter {
    float: left;
    margin: 0.04em 0.12em 0 -0.02em;
    font-family: var(--font-display);
    font-size: 4.2em;
    line-height: 0.76;
    color: var(--accent);
    text-shadow: 2px 2px 0 rgba(127, 47, 32, 0.08);
}

.article-content h2,
.article-content h3 {
    margin: 2.3em 0 0.8em;
    font-family: var(--font-heading);
    line-height: 1.25;
    scroll-margin-top: 110px;
}

.article-content h2 {
    padding: 0.55em 0 0.5em;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid rgba(31, 26, 22, 0.25);
    font-size: 1.96rem;
    color: var(--ink);
    text-align: center;
    position: relative;
}

.article-content h2::before {
    content: "";
    display: block;
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    border-top: 0.5px solid rgba(31, 26, 22, 0.35);
}

.article-content h2::after {
    content: "\2014\00a0\2726\00a0\2014";
    display: block;
    position: absolute;
    bottom: -0.6em;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 0.6em;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(244, 236, 222, 0.97));
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    opacity: 0.55;
}

.article-content h3 {
    font-size: 1.42rem;
    color: var(--olive);
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content pre,
.article-content blockquote {
    margin: 0 0 1.2em;
}

.article-content ul,
.article-content ol {
    padding-left: 1.3em;
}

.article-content li + li {
    margin-top: 0.35em;
}

.article-content pre,
.form-field textarea.code {
    overflow-x: auto;
    padding: 16px;
    background: #1f1a16;
    color: #f8f2e9;
}

.article-content code {
    font-family: Consolas, "Courier New", monospace;
}

.article-content :not(pre) > code {
    padding: 0.15em 0.4em;
    background: rgba(56, 42, 31, 0.08);
    color: var(--accent);
}

.article-content blockquote {
    position: relative;
    padding: 24px 24px 20px 32px;
    border-left: none;
    border-top: 2px solid var(--accent);
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(127, 47, 32, 0.08), rgba(176, 134, 75, 0.06));
    color: #613227;
    font-style: italic;
}

.article-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: -0.15em;
    left: 0.05em;
    font-family: var(--font-display);
    font-size: 4.5em;
    line-height: 1;
    color: var(--accent);
    opacity: 0.12;
    pointer-events: none;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
    background: rgba(255, 255, 255, 0.48);
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--line);
}

.article-content th,
.article-content td {
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
    text-align: left;
}

.article-content thead th {
    background: linear-gradient(180deg, rgba(127, 47, 32, 0.1), rgba(176, 134, 75, 0.08));
    color: var(--ink);
    font-weight: 700;
    border-bottom: 2px solid var(--line);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
}

.article-content tbody tr:nth-child(even) {
    background: rgba(127, 47, 32, 0.025);
}

.article-table-wrap {
    margin: 1.6em 0;
    overflow-x: auto;
}

.article-summary-box,
.article-callout,
.article-callout--warning {
    margin: 0 0 1.6em;
    padding: 18px 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
}

.article-summary-box {
    border-left: none;
    border-top: 3px double var(--accent);
    background: linear-gradient(180deg, rgba(127, 47, 32, 0.08), rgba(255, 255, 255, 0.72));
    box-shadow: var(--shadow);
    position: relative;
}

.article-summary-box::before {
    content: "\2014\00a0\2726\00a0\2014";
    display: block;
    text-align: center;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    margin-bottom: 10px;
    opacity: 0.55;
}

.article-summary-label {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    font-family: var(--font-display);
}

.article-key-list {
    margin: 0;
    padding-left: 1.2em;
}

.article-callout strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 1.06rem;
    color: var(--olive);
}

.article-callout--warning {
    border-left: 4px solid #9f231b;
    background: linear-gradient(180deg, rgba(159, 35, 27, 0.1), rgba(255, 255, 255, 0.76));
}

.article-note-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 1.6em 0;
}

.article-note-card {
    padding: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(82, 96, 77, 0.08), rgba(255, 255, 255, 0.72));
}

.article-note-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.45;
    color: var(--accent-strong);
}

.article-note-card p {
    margin: 0;
    color: var(--ink-soft);
}

.meta-box {
    padding: 18px 20px;
    border-top: 3px solid rgba(82, 96, 77, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(239, 231, 217, 0.94));
}

.meta-box + .meta-box {
    margin-top: 16px;
}

.meta-box h2 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--olive);
}

.meta-box p {
    margin: 0;
}

.toc-nav {
    margin-top: 6px;
}

.toc-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc-item a {
    display: block;
    padding: 9px 12px;
    border-left: 3px solid rgba(127, 47, 32, 0.18);
    background: rgba(255, 255, 255, 0.46);
    color: var(--ink);
    line-height: 1.65;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.toc-item a:hover {
    color: var(--accent);
    border-color: rgba(127, 47, 32, 0.5);
    background: rgba(127, 47, 32, 0.08);
}

.toc-item--level-3 a {
    margin-left: 14px;
    border-left-color: rgba(82, 96, 77, 0.24);
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-family: var(--font-ui);
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-panel {
    padding: 28px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.56);
    color: var(--ink);
    font: inherit;
}

.form-field textarea {
    min-height: 170px;
    resize: vertical;
}

.field-error {
    margin-top: 8px;
    color: #9f231b;
    font-size: 0.9rem;
}

.empty-state {
    padding: 24px;
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.36);
    color: var(--ink-soft);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
}

.pagination .active {
    background: var(--ink);
    color: var(--paper-strong);
    border-color: var(--ink);
}

.site-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0;
    margin-top: 34px;
    padding: 20px 0 0;
    border-top: 3px double var(--line);
    color: var(--ink-soft);
    font-size: 0.92rem;
    position: relative;
}

.site-footer::before {
    content: "\00A7";
    position: absolute;
    top: -0.7em;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 0.8em;
    background: var(--paper);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.9rem;
    opacity: 0.5;
}

.site-footer > p:first-child {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.site-footer > p:nth-child(2) {
    padding: 0 20px;
    border-left: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
}

.footer-links a {
    border-bottom: 1px solid transparent;
}

.footer-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 40;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(56, 42, 31, 0.18);
    background: rgba(31, 26, 22, 0.84);
    color: var(--paper-strong);
    font-family: var(--font-ui);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(31, 26, 22, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.back-to-top-icon svg {
    width: 1.3rem;
    height: 1.3rem;
}

.back-to-top:hover {
    background: rgba(127, 47, 32, 0.92);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .masthead,
    .two-column {
        grid-template-columns: 1fr;
    }

    .home-dual-grid,
    .feature-lead {
        grid-template-columns: 1fr;
    }

    .feature-stack {
        grid-template-columns: 1fr;
    }

    .feature-lead-media {
        min-height: 240px;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
    }

    .coverage-grid,
    .grid-articles,
    .taxonomy-grid,
    .glossary-grid,
    .article-note-grid,
    .home-dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 880px) {
    .site-header-main,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .site-footer > p:nth-child(2) {
        padding: 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--line-soft);
        padding-top: 12px;
    }

    .editorial-strip {
        grid-template-columns: 1fr;
    }

    .editorial-points {
        grid-template-columns: 1fr;
    }

    .editorial-points article {
        padding-left: 0;
        padding-top: 12px;
        border-left: 0;
        border-top: 1px solid var(--line-soft);
    }

    .editorial-points article:first-child {
        padding-top: 0;
        border-top: 0;
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: min(100% - 18px, 1180px);
        padding-top: 18px;
    }

    .site-header {
        padding: 14px 16px 16px;
    }

    .site-header-top {
        flex-direction: column;
        gap: 6px;
        letter-spacing: 0.12em;
    }

    .site-brand {
        align-items: flex-start;
    }

    .site-brand img {
        width: 52px;
        height: 52px;
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 2.8rem);
        line-height: 1.08;
    }

    .section-title {
        font-size: clamp(1.7rem, 8vw, 2.25rem);
    }

    .article-title,
    .glossary-title {
        font-size: clamp(1.95rem, 9vw, 2.65rem);
        line-height: 1.12;
    }

    .article-content {
        font-size: 0.98rem;
        line-height: 1.85;
    }

    .article-content h2 {
        font-size: 1.6rem;
        margin-top: 2em;
    }

    .article-content h3 {
        font-size: 1.24rem;
    }

    .home-panel-head span {
        display: none;
    }

    .home-panel,
    .article-card-body,
    .taxonomy-card-body {
        padding: 16px;
    }

    .meta-row {
        gap: 8px 10px;
        font-size: 0.82rem;
    }

    .masthead-copy,
    .masthead-note,
    .editorial-strip,
    .feature-stack,
    .article-panel,
    .form-panel {
        padding: 22px 20px;
    }

    .coverage-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .coverage-count {
        grid-column: 2;
        justify-self: start;
    }

    .back-to-top {
        right: 14px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }

    .favorite-button {
        width: 100%;
        min-width: 0;
    }
}

/* ── Scroll-reveal animations ── */

.reveal-target {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-target.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-target:nth-child(2) { transition-delay: 0.08s; }
.reveal-target:nth-child(3) { transition-delay: 0.16s; }
.reveal-target:nth-child(4) { transition-delay: 0.24s; }

/* ── Card hover effects ── */

.article-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(52, 39, 28, 0.14), 0 8px 16px rgba(52, 39, 28, 0.08);
}

.coverage-card {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.coverage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(52, 39, 28, 0.12);
}

.glossary-card {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.glossary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(52, 39, 28, 0.13);
}

.feature-mini {
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.feature-mini:hover {
    background: rgba(255, 252, 247, 0.85);
    border-color: rgba(127, 47, 32, 0.18);
    transform: translateX(4px);
}

/* ── Animated link underlines ── */

.article-content a:not(.glossary-inline-link):not(.category-link):not(.tag-link) {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.35s ease;
    padding-bottom: 1px;
}

.article-content a:not(.glossary-inline-link):not(.category-link):not(.tag-link):hover {
    background-size: 100% 1px;
    color: var(--accent);
}

.glossary-inline-link {
    transition: color 0.2s ease, text-decoration-color 0.3s ease;
}

/* ── Header entrance animation ── */

.site-header {
    animation: headerReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes headerReveal {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Enhanced drop cap animation ── */

.article-content > p:first-of-type {
    position: relative;
}

/* ── Smooth image reveal ── */

.article-card-media img,
.feature-lead-media img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.article-card:hover .article-card-media img,
.feature-lead:hover .feature-lead-media img {
    transform: scale(1.03);
}

/* ── Table row hover ── */

.article-content tbody tr {
    transition: background-color 0.2s ease;
}

.article-content tbody tr:hover {
    background: rgba(127, 47, 32, 0.05);
}

/* ── Tag hover animation ── */

.tag-link {
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.tag-link:hover {
    transform: translateY(-1px);
}

/* ── TOC item hover ── */

.toc-item a {
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.toc-item a:hover {
    padding-left: 16px;
}

/* ── Button press effect ── */

.button:active,
.sort-chip:active {
    transform: translateY(1px);
}

/* ── Back-to-top pulse ── */

.back-to-top.is-visible {
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 12px 26px rgba(31, 26, 22, 0.2); }
    50% { box-shadow: 0 12px 32px rgba(127, 47, 32, 0.3); }
}

/* ── Ornamental page border ── */

.site-shell::before,
.site-shell::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 15%, var(--gold) 50%, var(--accent) 85%, transparent);
    opacity: 0.25;
}

.site-shell::before {
    margin-bottom: 8px;
}

.site-shell::after {
    margin-top: 24px;
}

/* ── Rich Component (shortcode embeds) ── */

.rich-component {
    margin: 2rem 0;
    min-height: 200px;
    overflow: hidden;
}

.rich-component[data-loading="true"] .rich-component-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(180deg, rgba(255, 250, 243, 0.96), rgba(244, 236, 222, 0.96));
    color: var(--ink-soft);
    font-size: 0.875rem;
    font-family: var(--font-ui);
    border: 1px dashed var(--line);
}

.rich-component[data-loading="false"] .rich-component-placeholder {
    display: none;
}

.rich-component[data-loading="error"] .rich-component-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: linear-gradient(180deg, rgba(159, 35, 27, 0.06), rgba(255, 255, 255, 0.76));
    color: var(--accent-strong);
    font-size: 0.875rem;
    font-family: var(--font-ui);
    border: 1px dashed rgba(159, 35, 27, 0.22);
}
