/* GCC ad benchmarks page (/gcc-ad-benchmarks/). Built on public-tools.css; scoped under .gab-page.
   Type scale: 12 badges and abbreviations · 13 meta, table heads, notes · 15 body and cells · 18 facts and h3 · 24 h2. */

.gab-page {
    --gab-ink: #0f172a;
    --gab-text: #334155;
    --gab-muted: #5b6474;
    --gab-line: #e2e8f0;
    --gab-sunk: #f8fafc;
    --gab-accent: #7c3aed;
    --gab-accent-ink: #5b21b6;
    --gab-accent-soft: #f3edff;
    --gab-accent-line: #dccbff;
}

.gab-page ::selection {
    background: #ddd6fe;
    color: var(--gab-ink);
}

/* Hero */
.gab-hero .public-tools-hero-sub {
    max-width: 68ch;
}

.gab-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 16px 0 0;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.86);
}

.gab-hero-meta time {
    font-weight: 700;
    color: #fff;
}

.gab-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 24px;
}

.gab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gab-btn-light {
    border: 0;
    background: #fff;
    color: var(--gab-accent-ink);
}

.gab-btn-light:hover {
    background: var(--gab-accent-soft);
}

.gab-hero-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
    color: #ddd6fe;
    text-decoration: underline;
    text-decoration-color: rgba(221, 214, 254, 0.5);
    text-underline-offset: 4px;
}

.gab-hero-link:hover {
    color: #fff;
}

/* Sections */
.gab-page .gab-section {
    padding: 0;
    margin-top: 56px;
}

.gab-main > .container > .gab-section:first-child {
    margin-top: 8px;
}

.gab-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--gab-ink);
}

.gab-section h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--gab-ink);
}

.gab-intro {
    max-width: 75ch;
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gab-text);
}

.gab-intro a,
.gab-prose a {
    color: var(--gab-accent-ink);
    font-weight: 700;
}

/* Key figures: the sentences people quote. */
.gab-facts {
    display: grid;
    gap: 0;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: gabfact;
    border-top: 1px solid var(--gab-line);
}

.gab-facts li {
    position: relative;
    padding: 18px 0;
    padding-inline-start: 48px;
    border-bottom: 1px solid var(--gab-line);
    counter-increment: gabfact;
}

.gab-facts li::before {
    content: counter(gabfact);
    position: absolute;
    inset-inline-start: 0;
    top: 20px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--gab-accent-soft);
    font-size: 13px;
    font-weight: 700;
    color: var(--gab-accent-ink);
    font-variant-numeric: tabular-nums;
}

.gab-facts p {
    max-width: 72ch;
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
    color: var(--gab-ink);
}

/* Source badges */
.gab-refs {
    user-select: none;
    -webkit-user-select: none;
    display: inline-flex;
    gap: 2px;
    margin-inline-start: 6px;
    vertical-align: 2px;
}

.gab-ref {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #eef1f5;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #475569;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.gab-ref::after {
    content: "";
    position: absolute;
    inset: -6px -3px;
}

.gab-ref:hover {
    background: var(--gab-accent);
    color: #fff;
}

/* Tables */
.gab-table-wrap {
    width: 0;
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--gab-line);
    border-radius: 16px;
    background: #fff;
}

.gab-table-wrap:focus-visible,
.gab-markets a:focus-visible,
.gab-ref:focus-visible,
.gab-btn:focus-visible,
.gab-plan:focus-visible {
    outline: 2px solid var(--gab-accent);
    outline-offset: 2px;
}

.gab-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
}

.gab-table th,
.gab-table td {
    padding: 12px 14px;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--gab-line);
}

.gab-table tbody tr:last-child > * {
    border-bottom: 0;
}

.gab-table thead th {
    background: var(--gab-sunk);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--gab-muted);
    white-space: nowrap;
}

.gab-table thead th.gab-group {
    color: var(--gab-ink);
    border-inline-start: 1px solid var(--gab-line);
}

.gab-country-table thead tr:nth-child(2) th:nth-child(odd) {
    border-inline-start: 1px solid var(--gab-line);
}

.gab-abbr {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}

/* The row name stays in view while the columns scroll. */
.gab-table tbody th {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    min-width: 150px;
    background: #fff;
    font-weight: 700;
    color: var(--gab-ink);
}

.gab-table thead th:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
}

.gab-table tbody tr.is-country > * {
    background: var(--gab-sunk);
}

.gab-table tbody th a {
    display: block;
    margin: -12px -14px;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
}

.gab-table tbody th a:hover {
    color: var(--gab-accent-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gab-table td {
    min-width: 108px;
    white-space: nowrap;
}

.gab-v {
    display: inline-block;
    font-weight: 700;
    color: var(--gab-ink);
    font-variant-numeric: tabular-nums lining-nums;
    unicode-bidi: isolate;
}

.gab-range {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--gab-muted);
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}

.gab-table td.is-global .gab-v,
.gab-table td.is-calc-global .gab-v {
    font-weight: 500;
    color: #64748b;
}

.gab-table td.is-calc .gab-v {
    font-weight: 500;
}

/* Visible in screenshots and copy-paste, not only as grey text. */
.gab-tag {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.gab-thin {
    max-width: 75ch;
    margin: 8px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--gab-line);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gab-text);
}

.gab-fact-link {
    margin-inline-start: 4px;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.gab-facts li:hover .gab-fact-link,
.gab-fact-link:focus-visible {
    opacity: 1;
    color: var(--gab-accent-ink);
}

.gab-facts li:target {
    background: linear-gradient(var(--gab-accent-soft), var(--gab-accent-soft)) no-repeat;
    background-size: 100% 100%;
}

.gab-table td .gab-refs {
    display: flex;
    margin: 6px 0 0;
}

.gab-na {
    color: #94a3b8;
}

.gab-na span {
    color: var(--gab-muted);
}

/* Market switch and legend */
.gab-markets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.gab-markets a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--gab-line);
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--gab-text);
    text-decoration: none;
}

.gab-markets a:hover {
    border-color: #c4b5fd;
    color: var(--gab-accent-ink);
}

.gab-markets a.is-on {
    border-color: var(--gab-accent);
    background: var(--gab-accent-soft);
    color: var(--gab-ink);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--gab-accent);
}

.gab-legend {
    max-width: 75ch;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--gab-muted);
}

.gab-key::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-inline-end: 6px;
    border-radius: 50%;
    vertical-align: 0;
}

.gab-key.is-local::before {
    background: var(--gab-ink);
}

.gab-key.is-global::before {
    background: #94a3b8;
}

.gab-platform {
    margin: 32px 0 12px !important;
}

/* Sparse tables: one card per row listing only its figures, at every width. */
.gab-ind-table.is-sparse {
    min-width: 0;
}

.gab-ind-table.is-sparse thead {
    display: none;
}

.gab-ind-table.is-sparse tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.gab-ind-table.is-sparse tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px 16px;
    padding: 16px;
    border-bottom: 1px solid var(--gab-line);
    border-inline-end: 1px solid var(--gab-line);
}

.gab-ind-table.is-sparse tbody th {
    position: static;
    grid-column: 1 / -1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.gab-ind-table.is-sparse tbody th a {
    margin: 0;
    padding: 0;
}

.gab-ind-table.is-sparse td {
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
}

.gab-ind-table.is-sparse td::before {
    content: attr(data-h);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gab-muted);
}

.gab-ind-table.is-sparse tbody tr.is-country {
    background: var(--gab-sunk);
}

.gab-ind-table.is-sparse tbody tr.is-country > * {
    background: transparent;
}

.gab-ind-table.is-sparse td.gab-na {
    display: none;
}

.gab-table-wrap:has(.gab-ind-table.is-sparse) {
    width: auto;
    overflow: visible;
}

/* Industry summaries: a two-column list, separated by rules. */
.gab-summaries {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    border-top: 1px solid var(--gab-line);
}

.gab-sum {
    padding: 20px 0;
    border-bottom: 1px solid var(--gab-line);
    scroll-margin-top: 6rem;
}

.gab-sum p {
    margin: 6px 0 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gab-text);
}

.gab-plan {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gab-accent-ink);
    text-decoration: underline;
    text-decoration-color: var(--gab-accent-line);
    text-underline-offset: 4px;
}

.gab-plan:hover {
    text-decoration-color: currentColor;
}

.gab-list {
    display: grid;
    gap: 10px;
    max-width: 72ch;
    margin: 0;
    padding-inline-start: 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gab-text);
}

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

.gab-aov td,
.gab-aov th {
    white-space: nowrap;
}

.gab-prose p {
    max-width: 75ch;
    font-size: 15px;
    line-height: 1.8;
    color: var(--gab-text);
}

.gab-caveat {
    font-size: 13px !important;
    color: var(--gab-muted) !important;
}

/* Cite */
.gab-cite {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    max-width: 880px;
    padding: 16px 20px;
    border: 1px solid var(--gab-accent-line);
    border-radius: 16px;
    background: #fff;
}

.gab-cite p {
    flex: 1 1 380px;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gab-ink);
    overflow-wrap: anywhere;
}

.gab-btn-quiet {
    min-height: 44px;
    border: 1px solid var(--gab-line);
    background: #fff;
    color: var(--gab-accent-ink);
}

.gab-btn-quiet:hover {
    border-color: #c4b5fd;
}

/* Sources */
.gab-sources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 40px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: gabsrc;
}

.gab-sources li {
    position: relative;
    padding-inline-start: 34px;
    counter-increment: gabsrc;
    scroll-margin-top: 6rem;
}

.gab-sources li::before {
    content: counter(gabsrc);
    position: absolute;
    inset-inline-start: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef1f5;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.gab-sources li:target::before {
    background: var(--gab-accent);
    color: #fff;
}

.gab-sources p {
    margin: 0;
}

.gab-src-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.gab-src-title a {
    color: var(--gab-ink);
    text-decoration: underline;
    text-decoration-color: var(--gab-accent-line);
    text-underline-offset: 3px;
}

.gab-src-title a:hover {
    color: var(--gab-accent-ink);
}

.gab-src-meta {
    margin-top: 2px !important;
    font-size: 13px;
    color: #475569;
}

.gab-kind {
    font-weight: 700;
}

.gab-kind.is-agency {
    color: #7c4a1a;
}

.gab-src-covers {
    margin-top: 4px !important;
    font-size: 13px;
    line-height: 1.6;
    color: var(--gab-muted);
}

.gab-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
}

.gab-cta-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.gab-page .public-tools-faq summary {
    display: flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 900px) {
    .gab-summaries,
    .gab-sources,
    .gab-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .gab-two {
        gap: 0;
    }

    .gab-two > div + div {
        margin-top: 56px;
    }
}

@media (max-width: 560px) {
    .gab-section h2 {
        font-size: 24px;
    }

    .gab-facts li {
        padding-inline-start: 42px;
    }

    .gab-facts p {
        font-size: 15px;
    }

    /* Phones: each industry becomes a block of label and value pairs; no sideways scrolling. */
    .gab-ind-table,
    .gab-country-table {
        min-width: 0;
    }

    .gab-ind-table thead,
    .gab-country-table thead {
        display: none;
    }

    .gab-ind-table tbody tr,
    .gab-country-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        padding: 16px;
        border-bottom: 1px solid var(--gab-line);
    }

    .gab-ind-table tbody tr:last-child,
    .gab-country-table tbody tr:last-child {
        border-bottom: 0;
    }

    .gab-ind-table tbody th,
    .gab-country-table tbody th {
        position: static;
        grid-column: 1 / -1;
        min-width: 0;
        padding: 0;
        border: 0;
        font-size: 15px;
    }

    .gab-ind-table tbody th a {
        margin: 0;
        padding: 0;
    }

    .gab-ind-table td,
    .gab-country-table td {
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .gab-ind-table td::before,
    .gab-country-table td::before {
        content: attr(data-h);
        display: block;
        margin-bottom: 2px;
        font-size: 12px;
        font-weight: 700;
        color: var(--gab-muted);
    }

    .gab-ind-table td.gab-na,
    .gab-country-table td.gab-na {
        display: none;
    }

    .gab-ind-table + *,
    .gab-table-wrap:has(.gab-ind-table),
    .gab-table-wrap:has(.gab-country-table) {
        width: auto;
        overflow: visible;
    }
}

@media print {
    .gab-markets,
    .gab-hero-actions,
    .public-tools-cta-band {
        display: none !important;
    }

    .gab-table-wrap {
        width: auto;
        overflow: visible;
    }
}
