/* ==========================================================================
   L26 - listing detail page, 2026 redesign ("Listing Page v3 Tabbed" handoff)
   Base sheet: design tokens, page grid, shared primitives.

   Rules for every l26-*.css sheet:
   - Scope every selector under .l26 (the page root, #l26Root). Nothing here may leak
     into the layout chrome, the flyouts/drawers or other pages.
   - No hex / rgb literals outside this token block: use var(--l26-*).
   - Type scale 12 / 14 / 16 / 20 / 25 / 31 / 39; weights 400 / 600 / 700; 8px grid;
     hit areas >= 44px.
   - Legacy ids / classes are JS hooks. Restyle them under .l26, never rename them.
   ========================================================================== */

.l26 {
    /* brand */
    --l26-green-dark: #31420E;
    --l26-green: #6E883F;
    --l26-green-hover: #5A7033;
    --l26-green-text: #5A7033;   /* green TEXT on white/page: 5.5:1 / 5.2:1 (the brand #6E883F is 4.0:1, fails AA) */
    --l26-green-tint: rgba(110, 136, 63, 0.08);
    --l26-green-ring: rgba(110, 136, 63, 0.15);
    --l26-orange: #DC7001;
    --l26-orange-text: #9A4E00;  /* 5.3:1 on --l26-orange-tint, 5.7:1 on the page (the handoff's #BB5F01 is 3.9:1) */
    --l26-orange-tint: #FBEEDC;
    --l26-green-deep: #263809;
    /* neutrals */
    --l26-text: #1A1A1A;
    --l26-text-2: #666666;
    --l26-text-3: #999999;
    --l26-border: #E0E0E0;
    --l26-divider: #F0F0F0;
    --l26-page: #FAF8F4;
    --l26-surface: #FFFFFF;
    --l26-zebra: #F8F9FA;
    --l26-tint: #F0F2EB;
    --l26-track: #EFEFEB;
    --l26-scrim: rgba(15, 18, 8, 0.94);
    --l26-overlay: rgba(38, 56, 9, 0.85);
    --l26-stamp: rgba(0, 0, 0, 0.78);
    /* status */
    --l26-success: #28A745;
    --l26-success-text: #1E7A33;
    --l26-success-tint: #E8F3E9;
    --l26-warning: #FFC107;
    --l26-danger: #DC3545;
    --l26-band-strong: #6E883F;
    --l26-band-moderate: #C9A22C;
    --l26-band-weak: #DC7001;
    --l26-band-moderate-tint: #F7F0D9;
    --l26-band-moderate-text: #7A5F0E; /* 5.3:1 on the tint */
    /* shape + motion */
    --l26-font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --l26-radius-sm: 8px;
    --l26-radius: 12px;
    --l26-radius-seg: 10px;
    --l26-radius-pill: 20px;
    --l26-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.10);
    --l26-shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
    --l26-shadow-seg: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
    --l26-shadow-bar: 0 -4px 16px rgba(0, 0, 0, 0.08);
    --l26-ease: 0.2s ease;
    /* layout */
    --l26-gutter: 32px;
    --l26-aside-w: 384px;
    /* Height of the site header while it is showing. l26-scout.js keeps --l26-sticky-top in
       step with the layout's hide-on-scroll header (0 while hidden). */
    --l26-header-h: 72px;
    --l26-sticky-top: var(--l26-header-h);

    font-family: var(--l26-font);
    color: var(--l26-text);
    background: var(--l26-page);
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 1px; /* keep child margins inside the page background */
}

.l26 *,
.l26 *::before,
.l26 *::after {
    box-sizing: border-box;
}

.l26 [hidden] {
    display: none !important;
}

/* ---------- page container + main grid ---------- */

.l26-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px var(--l26-gutter) 0;
}

.l26-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--l26-aside-w);
    grid-template-areas:
        "head aside"
        "body aside";
    column-gap: 64px;
    grid-template-rows: auto 1fr; /* a tall aside hands its extra height to the body row, not a gap under the head */
    align-items: start;
    margin-top: 32px;
}

.l26-main__head { grid-area: head; min-width: 0; }
.l26-main__aside { grid-area: aside; min-width: 0; }
.l26-main__body { grid-area: body; min-width: 0; }

.l26-aside__sticky {
    position: sticky;
    top: calc(var(--l26-sticky-top) + 24px);
    transition: top var(--l26-ease);
}

@media (max-width: 1079px) {
    .l26-main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "head"
            "aside"
            "body";
        column-gap: 0;
        row-gap: 24px;
    }

    .l26-aside__sticky {
        position: static;
    }
}

@media (min-width: 760px) and (max-width: 1079px) {
    .l26-main__aside {
        max-width: 560px;
    }
}

@media (max-width: 759px) {
    .l26 {
        --l26-gutter: 16px;
        --l26-header-h: 64px;
    }

    .l26-wrap {
        padding-top: 16px;
    }
}

/* ---------- type ---------- */

.l26 .l26-h1 {
    font-family: var(--l26-font);
    font-size: 39px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--l26-text);
    margin: 0;
}

.l26 .l26-h2 {
    font-family: var(--l26-font);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--l26-text);
    margin: 0 0 8px;
}

.l26 .l26-h2--feature {
    font-size: 31px;
}

.l26 .l26-h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.l26 .l26-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--l26-green-text);
    margin: 0 0 8px;
}

.l26 .l26-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--l26-text-2);
}

.l26 .l26-meta {
    font-size: 14px;
    color: var(--l26-text-2);
}

@media (max-width: 759px) {
    .l26 .l26-h1 { font-size: 31px; }
    .l26 .l26-h2--feature { font-size: 25px; }
}

/* ---------- surfaces ---------- */

.l26 .l26-card {
    background: var(--l26-surface);
    border: 1px solid var(--l26-border);
    border-radius: var(--l26-radius);
    padding: 32px;
}

.l26 .l26-section {
    margin-bottom: 40px;
}

.l26 .l26-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.l26 .l26-divider {
    border: 0;
    border-top: 1px solid var(--l26-divider);
    margin: 24px 0;
}

@media (max-width: 759px) {
    .l26 .l26-card { padding: 20px 16px; }
}

/* ---------- buttons + links ---------- */

.l26 .l26-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--l26-radius-sm);
    border: 1.5px solid transparent;
    font-family: var(--l26-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--l26-ease), border-color var(--l26-ease), color var(--l26-ease), box-shadow var(--l26-ease);
}

.l26 .l26-btn--block { display: flex; width: 100%; }
.l26 .l26-btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; }

.l26 .l26-btn--primary {
    background: var(--l26-green);
    border-color: var(--l26-green);
    color: var(--l26-surface);
}

.l26 .l26-btn--primary:hover,
.l26 .l26-btn--primary:focus-visible {
    background: var(--l26-green-hover);
    border-color: var(--l26-green-hover);
    color: var(--l26-surface);
}

.l26 .l26-btn--outline {
    background: var(--l26-surface);
    border-color: var(--l26-green);
    color: var(--l26-green-dark);
}

.l26 .l26-btn--outline:hover,
.l26 .l26-btn--outline:focus-visible {
    background: var(--l26-green-tint);
    color: var(--l26-green-dark);
}

.l26 .l26-btn--ghost {
    background: var(--l26-surface);
    border: 1px solid var(--l26-border);
    color: var(--l26-text);
}

.l26 .l26-btn--ghost:hover,
.l26 .l26-btn--ghost:focus-visible {
    border-color: var(--l26-text-3);
    color: var(--l26-text);
}

.l26 .l26-btn--accent {
    background: var(--l26-orange);
    border-color: var(--l26-orange);
    color: var(--l26-surface);
}

.l26 .l26-btn:disabled,
.l26 .l26-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.l26 .l26-link {
    color: var(--l26-green-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.l26 .l26-link:hover { color: var(--l26-green-text); }

.l26 .l26-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--l26-green-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.l26 .l26-link-arrow::after {
    content: "\2192";
    transition: transform var(--l26-ease);
}

.l26 .l26-link-arrow:hover { color: var(--l26-green-dark); }
.l26 .l26-link-arrow:hover::after { transform: translateX(2px); }

/* ---------- pills + tags ---------- */

.l26 .l26-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: var(--l26-radius-pill);
    background: var(--l26-tint);
    color: var(--l26-green-dark);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.l26 .l26-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    background: var(--l26-tint);
    color: var(--l26-green-dark);
}

.l26 .l26-badge--weak,
.l26 .l26-badge--up { background: var(--l26-orange-tint); color: var(--l26-orange-text); }
.l26 .l26-badge--strong,
.l26 .l26-badge--down { background: var(--l26-success-tint); color: var(--l26-success-text); }
.l26 .l26-badge--neutral { background: var(--l26-track); color: var(--l26-text-2); }

/* ---------- empty state ---------- */

.l26 .l26-empty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 14px 16px;
    border: 1px dashed var(--l26-border);
    border-radius: var(--l26-radius-sm);
    color: var(--l26-text-2);
    font-size: 14px;
}

/* ---------- form controls ---------- */

.l26 input[type="text"],
.l26 input[type="email"],
.l26 input[type="number"],
.l26 textarea,
.l26 select {
    font-family: var(--l26-font);
}

.l26 input:focus,
.l26 textarea:focus,
.l26 select:focus {
    border-color: var(--l26-green);
    box-shadow: 0 0 0 3px var(--l26-green-ring);
    outline: none;
}

.l26 a:focus-visible,
.l26 button:focus-visible,
.l26 [role="tab"]:focus-visible {
    outline: 2px solid var(--l26-green);
    outline-offset: 2px;
}

.l26 .l26-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .l26 *,
    .l26 *::before,
    .l26 *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
