/* =====================================================
   Lightrion search — aligned with lightrion.com
   Fraunces serif + JetBrains Mono + paper cream + rust
   ===================================================== */

/* ------- Reset ------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

/* ------- Fonts ------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ------- Tokens ------- */
:root {
    --paper:        #faf8f3;
    --paper-deep:   #f3efe5;
    --ink:          #1a1814;
    --ink-soft:     #45413a;
    --ink-faint:    #8a857a;
    --rule:         #d4cfc1;
    --accent:       #b04a2c;
    --accent-soft:  #f0e1d8;
    --code-bg:      #1a1814;
    --code-fg:      #f3efe5;

    --font-serif: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
    --font-mono:  "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

    --t-xs:   0.75rem;
    --t-sm:   0.875rem;
    --t-base: 1rem;
    --t-md:   1.125rem;
    --t-lg:   1.333rem;
    --t-xl:   1.777rem;
    --t-2xl:  2.369rem;
    --t-3xl:  3.157rem;

    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 0.75rem;
    --s-4: 1rem;
    --s-6: 1.5rem;
    --s-8: 2rem;
    --s-12: 3rem;
    --s-16: 4rem;
}

/* ------- Body & layout ------- */
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: var(--t-base);
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 var(--s-6);
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

/* ------- Header ------- */
.site-header {
    border-bottom: 1px solid var(--rule);
    padding: var(--s-4) 0;
    background: var(--paper);
}
.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-6);
}
.brand {
    font-family: var(--font-serif);
    font-size: var(--t-md);
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand sup {
    font-family: var(--font-mono);
    font-size: 0.55em;
    color: var(--ink-faint);
    margin-left: 0.25em;
    letter-spacing: 0.06em;
}
.nav {
    display: flex;
    gap: var(--s-6);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
}
.nav a {
    color: var(--ink-soft);
    text-decoration: none;
}
.nav a:hover { color: var(--accent); }

/* ------- Hero ------- */
.hero {
    padding: var(--s-12) 0 var(--s-8);
}
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: var(--s-4);
}
.hero-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: var(--t-3xl);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: var(--s-4);
}
.hero-title em {
    font-style: italic;
    color: var(--accent);
}
.hero-lead {
    font-family: var(--font-serif);
    font-size: var(--t-md);
    color: var(--ink-soft);
    margin-bottom: var(--s-8);
    max-width: 36rem;
}

/* ------- Search form ------- */
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--s-3);
    margin-bottom: var(--s-6);
    align-items: stretch;
}
.search-form--compact {
    margin-bottom: var(--s-4);
}
.search-input {
    grid-column: 1 / 2;
    font-family: var(--font-mono);
    font-size: var(--t-md);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: var(--s-3) var(--s-4);
    color: var(--ink);
    transition: border-color 0.15s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-button {
    grid-column: 2 / 3;
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    background: var(--ink);
    color: var(--paper);
    border: none;
    border-radius: 2px;
    padding: var(--s-3) var(--s-6);
    cursor: pointer;
    transition: background 0.15s ease;
    letter-spacing: 0.02em;
}
.search-button:hover { background: var(--accent); }

.version-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    margin-top: var(--s-2);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
}
.version-label {
    color: var(--ink-faint);
    margin-right: var(--s-2);
}
.version-chip {
    display: inline-flex;
    cursor: pointer;
}
.version-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.version-chip span {
    display: inline-block;
    padding: 0.2em 0.7em;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: var(--paper);
    color: var(--ink-soft);
    transition: all 0.15s ease;
}
.version-chip:hover span {
    border-color: var(--ink-faint);
    color: var(--ink);
}
.version-chip input:checked + span {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ------- Release select (minor version picker) ------- */
.release-select-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-left: 0.5em;
    font-size: var(--t-sm);
}
.release-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.release-select {
    padding: 0.4em 0.8em;
    border: 1px solid var(--ink-faint);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    cursor: pointer;
    max-width: 22ch;
}
.release-select:hover { border-color: var(--accent); }
.release-select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Pill indicating which minor release the results are scoped to. */
.release-pill {
    display: inline-block;
    padding: 0.15em 0.5em;
    margin-left: 0.3em;
    border: 1px solid var(--ink-faint);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--ink-faint);
}
.release-pill--historical {
    border-color: var(--accent);
    color: var(--accent);
}

/* Compare-page release selectors (inherit some compare-versions styling) */
.compare-versions__label--minor {
    /* Slightly smaller than the major version select to read as a
       sub-selector of the parent. */
    font-size: 0.92em;
}
.compare-versions__select--minor {
    min-width: 11ch;
}

/* ------- Examples ------- */
.examples { margin-top: var(--s-8); }
.examples-label {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: var(--s-3);
}
.examples-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-2);
}
.examples-list a {
    display: block;
    padding: var(--s-2) 0;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-serif);
    font-style: italic;
    transition: color 0.15s ease;
}
.examples-list a:hover {
    color: var(--accent);
}

/* ------- Results header ------- */
.results-header {
    padding: var(--s-6) 0 var(--s-4);
    border-bottom: 1px solid var(--rule);
}
.results-meta {
    margin-top: var(--s-3);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink-faint);
}
.results-meta .error { color: var(--accent); }

/* ------- Results ------- */
.results { padding: var(--s-6) 0 var(--s-12); }

/* ------- Shape B — AI synthesis panel ------- */
.synthesis {
    margin-bottom: var(--s-8);
    padding-bottom: var(--s-6);
    border-bottom: 1px solid var(--rule);
}
.synth-trigger {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    width: 100%;
    text-align: left;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: var(--s-4) var(--s-6);
    cursor: pointer;
    font-family: var(--font-serif);
    color: var(--ink);
    transition: all 0.15s ease;
}
.synth-trigger:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.synth-icon {
    font-size: var(--t-lg);
    color: var(--accent);
    flex-shrink: 0;
}
.synth-label {
    font-size: var(--t-md);
    font-weight: 500;
    color: var(--ink);
}
.synth-meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    margin-left: auto;
}
.synth-output {
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 2px;
    padding: var(--s-6);
}
.synth-output__header {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding-bottom: var(--s-3);
    margin-bottom: var(--s-4);
    border-bottom: 1px solid var(--rule);
}
.synth-output__title {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.synth-output__caveat {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
}
.synth-output__text {
    font-family: var(--font-serif);
    font-size: var(--t-md);
    line-height: 1.65;
    color: var(--ink);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.synth-output__text p {
    margin-bottom: var(--s-3);
}
.synth-output__text p:last-child {
    margin-bottom: 0;
}
.synth-output__text code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--paper);
    color: var(--accent);
    padding: 0.08em 0.4em;
    border-radius: 2px;
    border: 1px solid var(--rule);
    word-break: break-all;
}
.synth-output__status {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    margin-top: var(--s-3);
    font-style: italic;
}

.result-list {
    list-style: none;
    counter-reset: result;
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}
.result {
    counter-increment: result;
    padding-bottom: var(--s-6);
    border-bottom: 1px solid var(--rule);
}
.result:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.result-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-3);
    margin-bottom: var(--s-1);
}
.result-path {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--accent);
    word-break: break-all;
    text-decoration: none;
}
.result-path:hover { text-decoration: underline; }
.result-score {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    flex-shrink: 0;
}
.result-meta {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    margin-bottom: var(--s-3);
}
.result-snippet {
    background: var(--code-bg);
    color: var(--code-fg);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    line-height: 1.5;
    padding: var(--s-4);
    border-radius: 2px;
    overflow-x: auto;
    margin-bottom: var(--s-3);
}
.result-snippet code {
    font-family: inherit;
    white-space: pre;
}
.result-actions {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
}
.result-actions a {
    color: var(--ink-soft);
    text-decoration: none;
}
.result-actions a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ------- Empty state ------- */
.empty-state {
    padding: var(--s-12) 0;
    text-align: center;
}
.empty-state h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: var(--t-xl);
    margin-bottom: var(--s-3);
}
.empty-state p {
    color: var(--ink-soft);
    margin-bottom: var(--s-4);
}
.version-suggestions {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-3);
}

/* ------- MCP banner ------- */
.mcp-banner {
    background: var(--paper-deep);
    padding: var(--s-12) 0;
    border-top: 1px solid var(--rule);
}
.mcp-banner--compact { padding: var(--s-6) 0; }
.mcp-banner h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: var(--t-xl);
    margin-bottom: var(--s-2);
    letter-spacing: -0.01em;
}
.mcp-banner p {
    color: var(--ink-soft);
    margin-bottom: var(--s-4);
    max-width: 36rem;
}
.mcp-banner--compact p { margin-bottom: 0; }
.mcp-cta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--paper);
    background: var(--ink);
    padding: var(--s-3) var(--s-6);
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.15s ease;
}
.mcp-cta:hover { background: var(--accent); }

/* ------- Footer ------- */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: var(--s-8) 0;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
}
.footer-tagline { margin-bottom: var(--s-2); }
.footer-links a {
    color: var(--ink-faint);
    text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

/* ------- Responsive ------- */
@media (max-width: 640px) {
    .hero { padding: var(--s-8) 0 var(--s-6); }
    .hero-title { font-size: var(--t-2xl); }
    .search-form {
        grid-template-columns: 1fr;
    }
    .search-button { grid-column: 1 / 2; }
    .container { padding: 0 var(--s-4); }
    .result-head { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   COMPARE PAGE — side-by-side layout
   ===================================================================== */

/* Hero variant used on the empty-state /compare page (no big title). */
.hero--compact {
    padding: var(--s-6) 0 var(--s-4);
    text-align: left;
}
.hero--compact .hero-lead {
    max-width: 60ch;
    margin-bottom: var(--s-4);
}

/* Discovery CTA below the home search form */
.hero-alt {
    margin-top: var(--s-5);
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink-faint);
    text-align: center;
}
.hero-alt a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}
.hero-alt a:hover { border-bottom-style: solid; }

/* Compare CTA in the search.html results header */
.compare-cta {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}
.compare-cta:hover { border-bottom-style: solid; }

/* Compare form layout — extends .search-form grid, adds version-pair row */
.compare-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}
.compare-form .search-input  { grid-column: 1 / 2; }
.compare-form .search-button { grid-column: 2 / 3; }
.compare-form .compare-versions {
    grid-column: 1 / -1;
}

.compare-versions {
    display: flex;
    align-items: flex-end;
    gap: var(--s-4);
    flex-wrap: wrap;
    padding-top: var(--s-2);
}
.compare-versions__label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.compare-versions__caption {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.compare-versions__select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 8px 28px 8px 12px;
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink);
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.compare-versions__select:hover { border-color: var(--accent); }
.compare-versions__select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(178, 67, 45, 0.15);
}
.compare-versions__arrow {
    font-size: var(--t-base);
    color: var(--ink-faint);
    padding-bottom: 8px;
}
.compare-versions__alt {
    margin-left: auto;
    align-self: center;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    text-decoration: none;
    border-bottom: 1px dashed var(--ink-faint);
    transition: color 0.15s, border-color 0.15s;
}
.compare-versions__alt:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* The two-column layout itself.
 * Mobile / narrow: stacked.
 * ≥ 1200px: side-by-side.
 *
 * NOTE: `min-width: 0` on .compare-column is REQUIRED — otherwise grid items
 * refuse to shrink and code chunks with long lines blow the layout horizontally.
 */
.compare-layout {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
    margin-top: var(--s-4);
}
@media (min-width: 1200px) {
    .compare-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--s-5);
        align-items: start;
    }
}

.compare-column {
    min-width: 0;
}
.compare-column__header {
    font-family: var(--font-serif);
    font-size: var(--t-xl);
    font-weight: 400;
    padding-bottom: var(--s-3);
    margin-bottom: var(--s-4);
    border-bottom: 2px solid var(--rule);
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.compare-column__tag {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    font-weight: 400;
    background: var(--paper-deep);
    padding: 2px 8px;
    border-radius: 3px;
}
.compare-column__empty {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink-faint);
    font-style: italic;
    padding: var(--s-4);
    background: var(--paper-deep);
    border-radius: 4px;
    text-align: center;
}

/* Compact MCP banner on /compare (less prominent than home) */
.mcp-banner--compact {
    padding: var(--s-6) 0;
    background: var(--paper-deep);
}
.mcp-banner--compact p {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink-faint);
    margin: 0;
    text-align: center;
}
.mcp-banner--compact a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}
.mcp-banner--compact a:hover { border-bottom-style: solid; }

/* On compare side-by-side, each chunk has less room — tighten code preview */
@media (min-width: 1200px) {
    .compare-column .result-snippet {
        font-size: 0.78rem;
        padding: var(--s-3);
    }
    .compare-column .result-path {
        font-size: var(--t-xs);
        word-break: break-all;
    }
}

/* Compare-page-specific responsive tweaks */
@media (max-width: 640px) {
    .compare-form {
        grid-template-columns: 1fr;
    }
    .compare-form .search-button { grid-column: 1 / 2; }
    .compare-versions {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s-3);
    }
    .compare-versions__arrow {
        display: none;
    }
    .compare-versions__alt {
        margin-left: 0;
    }
    .compare-cta {
        margin-left: 0;
        margin-top: var(--s-2);
    }
}

/* =====================================================================
   COMPARE PAGE v2 — file-grouped layout (Option B)
   ===================================================================== */

/* Each section (Common, Only-from, Only-to) gets a clear header */
.compare-section {
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--rule);
}
.compare-section:first-of-type {
    border-top: none;
    padding-top: 0;
}
.compare-section__header {
    margin-bottom: var(--s-4);
}
.compare-section__title {
    font-family: var(--font-serif);
    font-size: var(--t-xl);
    font-weight: 400;
    margin: 0 0 var(--s-2) 0;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.compare-section__caption {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--ink-faint);
    margin: 0;
    max-width: 70ch;
    line-height: 1.5;
}

/* Badge labels for each section type */
.compare-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid currentColor;
    vertical-align: middle;
}
.compare-badge--common {
    color: #2c5b8a;
    background: #eaf2f9;
    border-color: #c8dcea;
}
.compare-badge--removed {
    color: #8a3c2c;
    background: #fae8e2;
    border-color: #eecbbf;
}
.compare-badge--added {
    color: #2c7a4a;
    background: #e4f3e8;
    border-color: #b8dbc4;
}

/* Pair list: one entry per file present in both versions */
.compare-pair-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}
.compare-pair {
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper);
    overflow: hidden;
}
.compare-pair__file {
    background: var(--paper-deep);
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.compare-pair__path {
    font-family: var(--font-mono);
    font-size: var(--t-sm);
    color: var(--accent);
    font-weight: 500;
    word-break: break-all;
}
.compare-pair__counts {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    white-space: nowrap;
}

/* The two columns within a pair: stacked on narrow, side-by-side on wide */
.compare-pair__columns {
    display: flex;
    flex-direction: column;
    gap: 0;
}
@media (min-width: 1200px) {
    .compare-pair__columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
}
.compare-pair__column {
    padding: var(--s-3) var(--s-4);
    min-width: 0;
    border-top: 1px solid var(--rule);
}
.compare-pair__column:first-child {
    border-top: none;
}
@media (min-width: 1200px) {
    .compare-pair__column {
        border-top: none;
    }
    .compare-pair__column + .compare-pair__column {
        border-left: 1px solid var(--rule);
    }
}

.compare-pair__version {
    font-family: var(--font-serif);
    font-size: var(--t-base);
    font-weight: 400;
    margin: 0 0 var(--s-3) 0;
    padding-bottom: var(--s-2);
    border-bottom: 1px dotted var(--rule);
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
    flex-wrap: wrap;
}
.compare-pair__tag {
    font-family: var(--font-mono);
    font-size: var(--t-xs);
    color: var(--ink-faint);
    font-weight: 400;
}

.compare-pair__chunk {
    margin-bottom: var(--s-3);
}
.compare-pair__chunk:last-child {
    margin-bottom: 0;
}
.compare-pair__chunk .result-head {
    margin-bottom: var(--s-1);
}
.compare-pair__chunk .result-snippet {
    margin-top: var(--s-2);
}

/* Tighter code in side-by-side mode */
@media (min-width: 1200px) {
    .compare-pair__chunk .result-snippet {
        font-size: 0.78rem;
        padding: var(--s-3);
    }
}

/* Single-version sections (Only-in-X): use existing .result-list but with a
 * subtle visual differentiator -- left border in the section's accent color. */
.result-list--single {
    list-style: none;
    padding: 0;
    margin: 0;
}
.result-list--single .result {
    border-left: 3px solid transparent;
    padding-left: var(--s-3);
    margin-bottom: var(--s-4);
}
/* Color the left border based on the section parent badge */
.compare-section:has(.compare-badge--removed) .result-list--single .result {
    border-left-color: #c8857a;
}
.compare-section:has(.compare-badge--added) .result-list--single .result {
    border-left-color: #7aaa8e;
}
/* :has() fallback: if browser doesn't support it, the border just stays transparent.
 * No functional impact, just less visual cuing. */
