
:root {
    --space-section: clamp(2.75rem, 6vw, 5rem);
    --space-card: clamp(1rem, 2vw, 1.45rem);
    --radius-card: 9px;
    --font-site: system-ui, -apple-system, "Segoe UI", sans-serif;
    --surface: #fff;
    --surface-soft: #e9efe5;
    --time-hover: 160ms;
}
body { font-family: var(--font-site); }
.portal-section { margin-block: var(--space-section); }
.portal-section:last-child { margin-bottom: 0; }
.portal-lead, .record-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: clamp(1.2rem, 3vw, 2.5rem);
    align-items: start;
}
.portal-lead:only-child, .record-layout:only-child { margin-bottom: 0; }
.portal-feature { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--green); color: white; }
.portal-feature img { width: 100%; aspect-ratio: 2.15; object-fit: cover; object-position: center 60%; }
.portal-feature .hero-copy { padding: clamp(1.35rem, 3vw, 2.65rem); }
.portal-feature h1, .portal-feature h2 { font-size: clamp(1.9rem, 4.2vw, 3.6rem); }
.portal-feature p { max-width: 55ch; }
.portal-feature .hero-copy > :last-child { margin-bottom: 0; }
.portal-rail { padding: 1.2rem 0 0; border-top: 3px solid var(--green); }
.portal-rail h2 { font-size: 1.55rem; }
.portal-rail ol { list-style: none; padding: 0; margin: 1rem 0; }
.portal-rail li { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.portal-rail li a { display: block; font-weight: 740; color: var(--ink); text-decoration: none; }
.portal-rail li a:hover, .portal-card a:hover { color: var(--green); text-decoration: underline; }
.portal-meta { color: var(--muted); font-size: .83rem; }
.portal-meta + h3, .portal-meta + h2 { margin-top: .4rem; }
.portal-overline { margin-bottom: .55rem; color: var(--green); font-size: .81rem; font-weight: 780; }
.portal-card { overflow: hidden; background: var(--surface); border-radius: var(--radius-card); min-width: 0; transition: background var(--time-hover); }
.portal-card:hover { background: #f0f3ed; }
.clickable-card { position: relative; }
.clickable-card .card-target::after { content: ""; position: absolute; inset: 0; }
.clickable-card:focus-within .card-target { text-decoration: underline; }
.clickable-card:hover .card-title a { color: var(--green); text-decoration: underline; }
.clickable-card .card-image, .clickable-card .gallery-frames { overflow: hidden; }
.clickable-card img { transition: transform var(--time-hover) ease-out; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .clickable-card:hover img { transform: scale(1.035); }
}
.clickable-card .portal-compare, .clickable-card .gallery-compact { position: relative; z-index: 1; }
.clickable-card .portal-compare { pointer-events: none; }
.clickable-card .portal-compare :is(a,button) { pointer-events: auto; }
.clickable-card:has(.card-target:focus-visible) { outline: 3px solid #b96c00; outline-offset: 3px; }
.gallery-compact figure { margin: 0; }
.gallery-compact .gallery-frames img { border-radius: 0; aspect-ratio: 1.75; object-fit: cover; }
.gallery-compact .gallery-actions { justify-content: center; padding: .3rem; }
.gallery-actions button, .portal-compare button, .portal-compare a { min-height: 44px; }
.gallery-actions { flex-wrap: wrap; }
.gallery-frames { touch-action: pan-y; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.gallery-thumbs button { padding: 2px; width: 64px; border: 2px solid transparent; background: none; cursor: pointer; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--green); }
.gallery-thumbs img { aspect-ratio: 1; object-fit: cover; }
.gallery-dialog { width: min(1000px, 96vw); max-height: 94vh; border: 0; border-radius: var(--radius-card); padding: 1rem; }
.gallery-dialog::backdrop { background: #101910d9; }
.gallery-dialog .gallery-actions { justify-content: end; margin-bottom: .5rem; }
.gallery-full-frame { overflow: auto; max-height: 66vh; touch-action: pan-y; }
.gallery-full-frame img { width: 100%; height: 65vh; aspect-ratio: auto; object-fit: contain; }
.gallery-zoomed .gallery-full-frame { touch-action: auto; }
.gallery-zoomed .gallery-full-frame img { width: 175%; height: auto; max-width: none; }
.maker-tile a { height: 100%; display: grid; place-items: center; gap: .4rem; text-align: center; }
.maker-logo { width: 100%; height: 68px; display: grid; place-items: center; }
.maker-logo img { max-height: 58px; width: auto; object-fit: contain; }
.tractor-card-visual { position: relative; }
.tractor-brand-badge {
    position: absolute;
    z-index: 2;
    inset: .55rem auto auto .55rem;
    display: grid;
    place-items: center;
    min-width: 3.8rem;
    max-width: calc(100% - 1.1rem);
    height: 2rem;
    padding: .25rem .45rem;
    border-radius: .25rem;
    background: #fffffff2;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 750;
    pointer-events: none;
}
.tractor-brand-badge img { width: 4rem; height: 1.5rem; object-fit: contain; aspect-ratio: auto; transform: none !important; }
.ts-selector { margin-bottom: 1.5rem; }
.ts-selector fieldset { display: grid; gap: .65rem; border: 1px solid var(--line); padding: 1rem; margin-bottom: .75rem; }
.ts-selector label { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.type-ts_maker > figure img { max-height: 150px; width: auto; max-width: min(100%,280px); object-fit: contain; }
.category-grid { list-style: none; padding: 0; margin: 0 0 1.3rem; }
.category-card a { display: block; height: 100%; text-decoration: none; font-weight: 760; }
.category-card span { display: block; padding: .9rem; }
.category-card img.category-owner-media { object-fit: contain; padding: .65rem; background: var(--surface-soft); }
.portal-lead .portal-feature img { aspect-ratio: 3.25; }
.portal-lead .portal-feature .hero-copy { padding: clamp(1.1rem, 2.2vw, 1.65rem); }
.portal-lead .portal-feature h1, .portal-lead .portal-feature h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.bazus-calculator { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.15rem; }
.calculator-inputs, .calculator-result { border-radius: var(--radius-card); padding: var(--space-card); }
.calculator-inputs { background: var(--surface); }
.calculator-inputs label { display: grid; gap: .25rem; font-weight: 720; margin-bottom: .8rem; }
.calculator-inputs input { min-height: 44px; }
.calculator-range input { accent-color: var(--green); padding: 0; }
.calculator-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.calculator-result { background: var(--green); color: white; }
.calculator-result output { display: grid; gap: .65rem; }
.calculator-result output span { display: grid; border-bottom: 1px solid #c8dec478; }
.calculator-result strong { font-size: clamp(1.55rem,3vw,2.5rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calculator-result p { margin: .8rem 0 0; }
.compare-table th img { aspect-ratio: 1.6; max-width: 130px; object-fit: cover; border-radius: 4px; }
.compare-table tr[data-difference] { background: #e9efe5; }
.compare-table tr[data-incompatible] { background: #fff2d9; }
.header-actions { display: flex; gap: .65rem; align-items: center; }
.header-comparison { white-space: nowrap; text-decoration: none; }
.comparison-switch { display: block; margin-block: .75rem; }
@media (max-width: 760px) { .header-actions { width: 100%; flex-wrap: wrap; } }
@media (max-width: 650px) { .bazus-calculator { grid-template-columns: 1fr; } }
.portal-card .card-body { padding: var(--space-card); }
.portal-card .card-body > :last-child { margin-bottom: 0; }
.portal-card h2, .portal-card h3 { font-size: 1.27rem; }
.portal-card h2 a, .portal-card h3 a { text-decoration: none; color: var(--ink); }
.portal-card img, .portal-card .media-placeholder { aspect-ratio: 1.75; width: 100%; object-fit: cover; }
.media-placeholder {
    display: grid;
    place-content: center;
    text-align: center;
    padding: 1rem;
    color: var(--green);
    background: repeating-linear-gradient(125deg, #e2eadd 0 1px, transparent 1px 12px), var(--surface-soft);
    font-size: .86rem;
    font-weight: 670;
}
.portal-makers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.portal-makers a { display: block; background: var(--surface); text-decoration: none; font-weight: 800; padding: 1rem; border-radius: var(--radius-card); overflow-wrap: anywhere; }
.portal-makers a:hover { background: var(--surface-soft); }
.portal-panel { background: var(--surface-soft); padding: var(--space-card); border-radius: var(--radius-card); }
.portal-panel p:last-child { margin-bottom: 0; }
.portal-article { max-width: 780px; }
.portal-article h2 { margin-top: 1.6em; }
.portal-article h2:first-child { margin-top: 0; }
.portal-article figure, .gallery figure { margin: 1rem 0; }
.portal-article figcaption, .gallery figcaption { color: var(--muted); font-size: .85rem; padding-top: .4rem; }
.portal-article img, .gallery img { border-radius: var(--radius-card); }
.portal-article blockquote { border-inline-start: 3px solid var(--orange); margin-inline: 0; padding-inline-start: 1rem; }
.portal-journal .portal-card:first-child { grid-column: span 2; }
.portal-filters, .compare-picker { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.portal-filters label, .compare-picker label { display: grid; gap: .25rem; font-size: .9rem; }
.portal-filters select, .portal-filters input, .compare-picker select { width: 100%; }
.portal-filters > *, .compare-picker > * { min-width: min(100%, 8rem); }
.portal-count { margin: 1rem 0; }
.portal-quiet { background: transparent; color: var(--green); border: 1px solid #aeb9ab; padding: .45rem .65rem; border-radius: 4px; cursor: pointer; font-weight: 700; }
.portal-quiet[aria-pressed="true"] { background: var(--green); color: white; }
.portal-quiet:hover { border-color: var(--green); }
.portal-compare { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.portal-compare a { font-size: .9rem; }
.record-heading { margin-bottom: 1.6rem; }
.record-heading p { max-width: 65ch; }
.record-heading h1, .portal-article h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
.record-details .specs { margin-bottom: 1.5rem; }
.record-layout .media-placeholder { min-height: 230px; border-radius: var(--radius-card); }
.gallery-actions { display: flex; gap: .6rem; align-items: center; }
.gallery img { width: 100%; aspect-ratio: 5 / 3; object-fit: contain; background: var(--surface-soft); }
.table-scroll { max-width: 100%; }
.compare-table { min-width: 420px; }
.portal-footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.portal-menu-toggle { display: none; }
.portal-demo { background: var(--surface-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding-block: .35rem; }
.portal-links { padding-left: 1.25rem; }
[hidden] { display: none !important; }
@media (max-width: 780px) {
    .portal-lead, .record-layout { grid-template-columns: minmax(0, 1fr); }
    .portal-makers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-journal .portal-card:first-child { grid-column: 1 / -1; }
    .portal-menu-toggle { display: inline-block; color: white; border-color: #859385; margin-block: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .portal-card { transition: none; }
}
