:root {
    --sections-navy: #092a46;
    --sections-blue: #17658f;
    --sections-cyan: #44a5c7;
    --sections-ink: #102235;
    --sections-muted: #657486;
    --sections-line: #dce5ec;
    --sections-soft: #f3f7fa;
    --sections-card: #ffffff;
    --sections-success: #19735a;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sections-page {
    background:
        radial-gradient(circle at 12% 20%, rgba(68, 165, 199, 0.08), transparent 25rem),
        #f6f9fb;
}

.sections-shell.container {
    width: min(1640px, calc(100% - 40px));
}

.sections-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(115deg, rgba(8, 37, 61, 0.98), rgba(14, 69, 103, 0.94)),
        var(--sections-navy);
    color: #fff;
}

.sections-hero::after {
    position: absolute;
    right: -90px;
    top: -170px;
    width: 540px;
    height: 540px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.025),
        0 0 0 140px rgba(255, 255, 255, 0.018);
    content: "";
}

.sections-hero .sections-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    padding-top: 54px;
    padding-bottom: 48px;
}

.sections-hero .eyebrow {
    color: #7fc9e2;
    margin-bottom: 9px;
}

.sections-hero h1 {
    max-width: none;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.sections-hero p:not(.eyebrow) {
    max-width: 760px;
    margin-top: 15px;
    color: #c9dbe6;
    font-size: 16px;
}

.dataset-note {
    min-width: 235px;
    padding: 14px 17px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
}

.dataset-note span,
.dataset-note small {
    display: block;
    color: #a9c2d1;
    font-size: 11px;
}

.dataset-note span {
    margin-bottom: 3px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dataset-note strong {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
}

.sections-workspace-section {
    padding: 28px 0 72px;
}

.mobile-workspace-actions,
.sections-backdrop,
.panel-close {
    display: none;
}

.panel-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sections-app-grid {
    display: grid;
    grid-template-columns: 290px minmax(430px, 0.95fr) minmax(430px, 1.05fr);
    gap: 16px;
    align-items: start;
}

.filter-panel,
.results-panel,
.detail-panel {
    min-width: 0;
    border: 1px solid var(--sections-line);
    border-radius: 15px;
    background: var(--sections-card);
    box-shadow: 0 12px 38px rgba(18, 45, 65, 0.065);
}

.filter-panel,
.detail-panel {
    position: sticky;
    top: 94px;
}

.panel-heading {
    display: flex;
    min-height: 79px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--sections-line);
    background: linear-gradient(180deg, #fff, #fbfcfd);
}

.panel-heading h2 {
    color: var(--sections-ink);
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.panel-label {
    display: block;
    margin-bottom: 3px;
    color: var(--sections-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.active-filter-count {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--sections-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.advanced-filters {
    border: 0;
}

.advanced-filters > summary {
    display: grid;
    padding: 15px 18px;
    border-bottom: 1px solid var(--sections-line);
    color: var(--sections-navy);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    list-style: none;
}

.advanced-filters > summary::-webkit-details-marker {
    display: none;
}

.advanced-filters > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--sections-blue);
    content: "+";
    font-size: 20px;
    font-weight: 500;
}

.advanced-filters[open] > summary::after {
    content: "−";
}

.advanced-filters > summary small {
    margin-top: 2px;
    color: var(--sections-muted);
    font-size: 9px;
    font-weight: 650;
}

.filter-scroll {
    max-height: calc(100vh - 260px);
    overflow: auto;
    scrollbar-color: #becbd5 transparent;
    scrollbar-width: thin;
}

.filter-group {
    min-width: 0;
    padding: 17px 18px;
    border: 0;
    border-bottom: 1px solid var(--sections-line);
}

.filter-group[hidden] {
    display: none;
}

.filter-group > label,
.filter-group legend {
    display: block;
    width: 100%;
    margin-bottom: 9px;
    color: #334a5e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.filter-group legend small {
    color: var(--sections-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.filter-group input[type="search"],
.filter-group input[type="number"],
.result-controls select {
    width: 100%;
    min-width: 0;
    border: 1px solid #cfdbe4;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--sections-ink);
    font: inherit;
    font-size: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-group input[type="search"],
.filter-group input[type="number"] {
    height: 39px;
    padding: 8px 10px;
}

.filter-group input:focus,
.result-controls select:focus {
    border-color: var(--sections-cyan);
    box-shadow: 0 0 0 3px rgba(68, 165, 199, 0.12);
}

.search-input {
    position: relative;
}

.search-input > span {
    position: absolute;
    left: 11px;
    top: 50%;
    color: var(--sections-muted);
    font-size: 18px;
    transform: translateY(-52%);
}

.search-input input {
    padding-left: 34px !important;
}

.family-options {
    display: grid;
    gap: 7px;
}

.family-option {
    display: grid !important;
    grid-template-columns: 15px 28px 1fr;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin: 0 !important;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #344b5f !important;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.family-option:hover,
.family-option:has(input:checked) {
    border-color: #cfe0ea;
    background: #f3f8fb;
}

.family-option input,
.checkbox-options input {
    width: 14px;
    height: 14px;
    accent-color: var(--sections-blue);
}

.family-shape {
    position: relative;
    display: inline-block;
    width: 23px;
    height: 22px;
    color: var(--sections-blue);
    vertical-align: middle;
}

.family-shape-i_h::before {
    position: absolute;
    inset: 10% 12%;
    background:
        linear-gradient(currentColor 0 0) center top / 100% 18% no-repeat,
        linear-gradient(currentColor 0 0) center / 24% 100% no-repeat,
        linear-gradient(currentColor 0 0) center bottom / 100% 18% no-repeat;
    content: "";
}

.family-shape-channel::before {
    position: absolute;
    inset: 2px 4px;
    border-top: 4px solid var(--sections-blue);
    border-bottom: 4px solid var(--sections-blue);
    border-left: 5px solid var(--sections-blue);
    content: "";
}

.family-shape-chs::before {
    position: absolute;
    inset: 2px;
    border: 4px solid var(--sections-blue);
    border-radius: 50%;
    content: "";
}

.family-shape-rhs_shs::before {
    position: absolute;
    inset: 2px 1px;
    border: 4px solid var(--sections-blue);
    border-radius: 4px;
    content: "";
}

.family-shape-angle::before {
    position: absolute;
    inset: 2px 3px;
    border-bottom: 5px solid var(--sections-blue);
    border-left: 5px solid var(--sections-blue);
    content: "";
}

.family-shape-tee::before {
    position: absolute;
    inset: 10% 12%;
    background:
        linear-gradient(currentColor 0 0) center top / 100% 18% no-repeat,
        linear-gradient(currentColor 0 0) center top / 24% 100% no-repeat;
    content: "";
}

.family-shape-joist::before {
    position: absolute;
    inset: 4px 2px;
    border-top: 3px solid var(--sections-blue);
    border-bottom: 3px solid var(--sections-blue);
    background:
        linear-gradient(135deg, transparent 0 42%, var(--sections-blue) 42% 56%, transparent 56%),
        linear-gradient(45deg, transparent 0 42%, var(--sections-blue) 42% 56%, transparent 56%);
    content: "";
}

.family-shape-timber::before {
    position: absolute;
    inset: 3px 2px;
    border: 3px solid var(--sections-blue);
    border-radius: 3px;
    background: linear-gradient(90deg, transparent 30%, rgba(31, 76, 107, .18) 30% 38%, transparent 38% 68%, rgba(31, 76, 107, .18) 68% 76%, transparent 76%);
    content: "";
}

.family-shape-bar::before {
    position: absolute;
    inset: 7px 1px;
    border-radius: 999px;
    background: var(--sections-blue);
    content: "";
}

.family-shape-zee::before {
    position: absolute;
    inset: 3px 4px;
    border-top: 4px solid var(--sections-blue);
    border-bottom: 4px solid var(--sections-blue);
    transform: skew(-14deg);
    content: "";
}

.family-shape-sheet_pile::before {
    position: absolute;
    inset: 2px 4px;
    border-right: 4px solid var(--sections-blue);
    border-bottom: 4px solid var(--sections-blue);
    border-left: 4px solid var(--sections-blue);
    transform: skew(-10deg);
    content: "";
}

.family-shape-mining::before {
    position: absolute;
    inset: 3px 2px;
    border: 4px solid var(--sections-blue);
    border-top-width: 2px;
    border-radius: 8px 8px 3px 3px;
    content: "";
}

.family-shape-other::before {
    position: absolute;
    inset: 4px 2px;
    border: 3px solid var(--sections-blue);
    transform: skew(-10deg);
    content: "";
}

.option-search {
    height: 34px !important;
    margin-bottom: 8px;
}

.checkbox-options {
    display: grid;
    max-height: 176px;
    gap: 3px;
    overflow: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.checkbox-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 7px;
    border-radius: 6px;
    color: #405568;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.checkbox-options label:hover,
.checkbox-options label:has(input:checked) {
    background: var(--sections-soft);
    color: var(--sections-navy);
}

.checkbox-options label[hidden] {
    display: none;
}

.compact-options {
    max-height: 210px;
}

.range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.range-grid label {
    min-width: 0;
}

.range-grid label > span:not(.sr-only) {
    display: block;
    min-height: 16px;
    margin-bottom: 3px;
    color: var(--sections-muted);
    font-size: 10px;
    font-weight: 700;
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 13px 18px;
    border-top: 1px solid var(--sections-line);
    background: #fbfcfd;
}

.filter-actions .btn-primary {
    min-height: 40px;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12px;
}

.btn-text {
    padding: 8px;
    color: var(--sections-muted);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.btn-text:hover {
    color: var(--sections-navy);
}

.results-heading {
    align-items: flex-end;
}

.result-controls {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.result-controls label {
    display: block;
    color: var(--sections-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.result-controls label:first-child {
    width: 92px;
}

.result-controls label:last-child {
    width: 59px;
}

.result-controls label span {
    display: block;
    margin-bottom: 3px;
}

.result-controls select {
    height: 31px;
    padding: 4px 6px;
    font-size: 11px;
    text-transform: none;
}

.section-list {
    min-height: 400px;
}

.section-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    gap: 12px;
    align-items: center;
    min-height: 84px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sections-line);
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.section-list-item:hover {
    background: #f8fbfd;
}

.section-list-item.is-selected {
    position: relative;
    background: linear-gradient(90deg, rgba(68, 165, 199, 0.11), rgba(68, 165, 199, 0.035));
    box-shadow: inset 3px 0 0 var(--sections-cyan);
}

.section-list-item.is-loading {
    opacity: 0.62;
}

.list-shape {
    display: grid;
    width: 60px;
    height: 66px;
    place-items: center;
    border: 1px solid #dce8ee;
    border-radius: 9px;
    background: #f7fafc;
}

.section-svg {
    display: block;
    width: 55px;
    height: 55px;
    overflow: visible;
}

.section-svg > rect,
.section-svg > path:not(.dimension-line),
.section-svg > circle {
    fill: #4d89a5;
    stroke: #092f49;
    stroke-linejoin: round;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.section-svg > .svg-cut {
    fill: #f8fbfc;
}

.section-svg .dimension-line {
    fill: none;
    stroke: #7094a8;
    stroke-dasharray: 2 2;
    stroke-linecap: round;
    stroke-width: 1.25;
    vector-effect: non-scaling-stroke;
}

.section-svg text {
    fill: #6d7f8e;
    font-size: 10px;
    font-weight: 800;
    text-anchor: middle;
}

.list-main {
    min-width: 0;
}

.list-main > strong {
    display: block;
    overflow: hidden;
    color: var(--sections-navy);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-main > small {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--sections-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.list-tags em {
    padding: 2px 6px;
    border-radius: 999px;
    background: #edf3f6;
    color: #536b7d;
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
    white-space: nowrap;
}

.list-metrics {
    display: grid;
    gap: 3px;
    color: var(--sections-muted);
    font-size: 9px;
    text-align: right;
    white-space: nowrap;
}

.list-metrics strong {
    color: #2a4053;
    font-size: 11px;
}

.list-arrow {
    color: #9aabb8;
    font-size: 25px;
    font-weight: 300;
}

.sections-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    color: var(--sections-muted);
    font-size: 11px;
    font-weight: 700;
}

.sections-pagination a,
.sections-pagination > span:first-child {
    justify-self: start;
}

.sections-pagination a:last-child,
.sections-pagination > span:last-child {
    justify-self: end;
}

.sections-pagination a {
    color: var(--sections-navy);
    font-weight: 800;
    text-decoration: none;
}

.sections-pagination .disabled {
    opacity: 0.42;
}

.no-results,
.section-preview-empty {
    display: grid;
    min-height: 420px;
    place-content: center;
    padding: 40px;
    text-align: center;
}

.no-results > span,
.empty-icon {
    color: #9ab0be;
    font-size: 44px;
}

.no-results h3,
.section-preview-empty h2 {
    margin-top: 8px;
    color: var(--sections-ink);
    font-size: 20px;
}

.no-results p,
.section-preview-empty p {
    max-width: 330px;
    margin: 7px auto 0;
    color: var(--sections-muted);
    font-size: 13px;
}

.no-results a {
    margin-top: 14px;
    color: var(--sections-blue);
    font-size: 12px;
    font-weight: 800;
}

.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sections-success);
    font-size: 10px;
    font-weight: 800;
}

.detail-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ca77f;
    box-shadow: 0 0 0 4px rgba(44, 167, 127, 0.11);
    content: "";
}

.section-preview {
    max-height: calc(100vh - 194px);
    overflow: auto;
    scrollbar-color: #bdcbd5 transparent;
    scrollbar-width: thin;
}

.section-preview.is-loading {
    opacity: 0.48;
    pointer-events: none;
}

.section-preview-content {
    padding: 19px;
}

.preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.family-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--sections-blue);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.preview-heading h2 {
    color: var(--sections-navy);
    font-size: clamp(25px, 2vw, 34px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.preview-heading p {
    margin-top: 5px;
    color: var(--sections-muted);
    font-size: 11px;
}

.standard-badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #d5e2e9;
    border-radius: 999px;
    background: #f4f8fa;
    color: #506879;
    font-size: 9px;
    font-weight: 800;
}

.preview-badges {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.validation-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 850;
    white-space: nowrap;
}

.validation-verified {
    border-color: #9ed8bf !important;
    background: #eefaf5 !important;
    color: #176347 !important;
}

.validation-single_source {
    border-color: #b9d7e7 !important;
    background: #f0f8fc !important;
    color: #255f7c !important;
}

.validation-not_verified {
    border-color: #e7d7a7 !important;
    background: #fff9e9 !important;
    color: #7c611c !important;
}

.preview-visual {
    display: grid;
    min-height: 215px;
    margin: 17px 0;
    place-items: center;
    border: 1px solid #cddfe8;
    border-radius: 12px;
    background:
        linear-gradient(rgba(25, 93, 128, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(25, 93, 128, 0.035) 1px, transparent 1px),
        #f7fbfd;
    background-size: 18px 18px;
    box-shadow: inset 0 1px 0 #fff;
}

.section-svg-large {
    width: 210px;
    height: 190px;
    filter: drop-shadow(0 10px 9px rgba(9, 47, 73, 0.14));
}

.section-svg-large > rect,
.section-svg-large > path:not(.dimension-line),
.section-svg-large > circle {
    fill: #4d89a5;
    stroke-width: 3;
}

.section-profile-h > path:not(.dimension-line) {
    fill: #326f8e;
    stroke: #082f49;
    stroke-linejoin: round;
}

.section-svg-large.section-profile-h {
    width: 225px;
    height: 205px;
    filter: drop-shadow(0 12px 10px rgba(9, 47, 73, 0.18));
}

.preview-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 1px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--sections-line);
    border-radius: 10px;
    background: var(--sections-line);
}

.preview-metrics > div {
    min-width: 0;
    padding: 10px;
    background: #fff;
}

.preview-metrics span {
    display: block;
    margin-bottom: 2px;
    color: var(--sections-muted);
    font-size: 9px;
    font-weight: 700;
}

.preview-metrics strong {
    color: var(--sections-ink);
    font-size: 15px;
}

.preview-metrics small {
    margin-left: 3px;
    color: var(--sections-muted);
    font-size: 8px;
}

.preview-metrics .metric-text {
    display: block;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-provenance {
    margin-bottom: 2px;
    padding: 13px 14px;
    border: 1px solid var(--sections-line);
    border-radius: 10px;
    background: #fbfcfd;
}

.preview-provenance ul,
.source-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: #405568;
    font-size: 10px;
    line-height: 1.45;
}

.preview-provenance p,
.provenance-note {
    margin-top: 9px;
    color: var(--sections-muted);
    font-size: 10px;
    line-height: 1.5;
}

.preview-data-section {
    padding: 16px 0;
    border-top: 1px solid var(--sections-line);
}

.preview-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.preview-section-title h3 {
    color: var(--sections-ink);
    font-size: 14px;
}

.preview-section-title > span {
    color: var(--sections-muted);
    font-size: 9px;
}

.property-list {
    display: grid;
}

.property-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 34px;
    border-bottom: 1px solid #edf1f4;
}

.property-list > div:last-child {
    border-bottom: 0;
}

.property-list dt {
    overflow: hidden;
    color: #52687a;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-list dt span {
    display: inline-block;
    min-width: 43px;
    margin-right: 6px;
    color: var(--sections-navy);
    font-weight: 850;
}

.property-list dd {
    color: var(--sections-ink);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.property-list dd small {
    color: var(--sections-muted);
    font-size: 8px;
    font-weight: 600;
}

.preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--sections-line);
}

.preview-actions .btn-primary,
.btn-outline {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.btn-outline {
    border: 1px solid #c9d7e0;
    color: var(--sections-navy);
}

.btn-outline:hover {
    border-color: var(--sections-blue);
    background: #f5f9fb;
}

.sections-disclaimer {
    margin-top: 16px;
    padding-left: 2px;
    color: var(--sections-muted);
    font-size: 10px;
}

/* Full section datasheet */
.section-detail-page {
    background: #f6f9fb;
}

.section-detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.section-visual-card,
.section-data-card {
    overflow: hidden;
    border: 1px solid var(--sections-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(18, 45, 65, 0.065);
}

.visual-head {
    padding: 20px 22px;
    border-bottom: 1px solid var(--sections-line);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.visual-head h2 {
    margin-bottom: 4px;
    color: var(--sections-navy);
    font-size: 26px;
}

.visual-head p,
.summary-row span {
    color: var(--sections-muted);
}

.visual-body {
    display: grid;
    gap: 20px;
    padding: 26px;
}

.visual-body > .section-svg-large {
    justify-self: center;
}

.summary-list {
    display: grid;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sections-line);
    font-size: 13px;
}

.summary-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.summary-row strong {
    text-align: right;
}

.section-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.section-data-card {
    padding: 24px;
}

.section-data-card h2 {
    margin-bottom: 16px;
    color: var(--sections-ink);
    font-size: 22px;
}

.provenance-card {
    grid-column: 1 / -1;
}

.provenance-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.provenance-heading h2 {
    margin-bottom: 0;
}

.source-list {
    font-size: 12px;
}

.provenance-note {
    font-size: 12px;
}

.property-table {
    width: 100%;
    border-collapse: collapse;
}

.property-table th,
.property-table td {
    padding: 11px 0;
    border-bottom: 1px solid var(--sections-line);
    text-align: left;
    vertical-align: top;
}

.property-table th {
    width: 50%;
    color: var(--sections-muted);
    font-size: 12px;
    font-weight: 700;
}

.property-table td {
    font-size: 12px;
    font-weight: 800;
}

.symbol {
    margin-right: 8px;
    color: var(--sections-navy);
    font-weight: 900;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--sections-navy);
    font-weight: 800;
    text-decoration: none;
}

.detail-actions {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.detail-actions .btn-light {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sections-line);
    border-radius: 8px;
    color: var(--sections-navy);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1320px) {
    .sections-app-grid {
        grid-template-columns: 270px minmax(400px, 1fr) minmax(390px, 0.95fr);
    }

    .section-list-item {
        grid-template-columns: minmax(0, 1fr) 17px;
    }

    .list-metrics {
        display: none;
    }
}

@media (max-width: 1080px) {
    body.sections-panel-open {
        overflow: hidden;
    }

    .mobile-workspace-actions {
        position: sticky;
        top: 76px;
        z-index: 35;
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-bottom: 12px;
        padding: 8px;
        border: 1px solid var(--sections-line);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 10px 25px rgba(18, 45, 65, 0.08);
        backdrop-filter: blur(12px);
    }

    .workspace-action {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        gap: 8px;
        border: 1px solid #cbd9e2;
        border-radius: 8px;
        background: #fff;
        color: var(--sections-navy);
        cursor: pointer;
        font: inherit;
        font-size: 11px;
        font-weight: 800;
    }

    .open-filter-panel {
        display: none;
    }

    .open-detail-panel {
        max-width: 100%;
        padding: 8px 13px;
    }

    .open-detail-panel > span {
        color: var(--sections-muted);
        font-size: 9px;
        text-transform: uppercase;
    }

    .open-detail-panel > strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sections-backdrop {
        position: fixed;
        z-index: 80;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(9, 27, 40, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .sections-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .panel-close {
        display: grid;
        width: 34px;
        height: 34px;
        place-items: center;
        border: 1px solid var(--sections-line);
        border-radius: 8px;
        background: #fff;
        color: var(--sections-navy);
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
    }

    .sections-app-grid {
        grid-template-columns: 270px minmax(0, 1fr);
    }

    .detail-panel {
        position: fixed;
        z-index: 90;
        top: 12px;
        right: 12px;
        bottom: 12px;
        width: min(480px, calc(100% - 24px));
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        transform: translateX(calc(100% + 24px));
        transition: transform 0.22s ease, opacity 0.18s ease, visibility 0.22s;
    }

    .detail-panel.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .section-preview {
        max-height: calc(100vh - 104px);
    }
}

@media (max-width: 800px) {
    .sections-hero .sections-shell {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .dataset-note {
        width: 100%;
    }

    .sections-app-grid {
        grid-template-columns: 1fr;
    }

    .mobile-workspace-actions {
        justify-content: stretch;
    }

    .workspace-action {
        flex: 1;
        justify-content: center;
    }

    .open-filter-panel {
        display: inline-flex;
        max-width: 130px;
        padding: 8px 12px;
    }

    .open-filter-panel strong {
        display: grid;
        width: 21px;
        height: 21px;
        place-items: center;
        border-radius: 50%;
        background: var(--sections-navy);
        color: #fff;
        font-size: 9px;
    }

    .filter-panel {
        position: fixed;
        z-index: 90;
        top: 12px;
        bottom: 12px;
        left: 12px;
        width: min(420px, calc(100% - 24px));
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        transform: translateX(calc(-100% - 24px));
        transition: transform 0.22s ease, opacity 0.18s ease, visibility 0.22s;
    }

    .filter-panel.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .filter-scroll {
        max-height: calc(100vh - 176px);
    }

    .section-preview-content {
        display: block;
    }

    .section-detail-layout,
    .section-data-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .sections-shell.container {
        width: min(100% - 20px, 1640px);
    }

    .sections-hero .sections-shell {
        padding-top: 38px;
        padding-bottom: 36px;
    }

    .sections-workspace-section {
        padding-top: 12px;
    }

    .mobile-workspace-actions {
        top: 68px;
        margin-bottom: 10px;
    }

    .open-detail-panel {
        min-width: 0;
    }

    .open-detail-panel > span {
        display: none;
    }

    .panel-heading {
        min-height: 72px;
        padding: 13px 14px;
    }

    .results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-controls {
        width: 100%;
    }

    .result-controls label:first-child {
        width: auto;
        flex: 1;
    }

    .section-list-item {
        grid-template-columns: minmax(0, 1fr) 14px;
        gap: 9px;
        min-height: 78px;
        padding: 11px 13px;
    }

    .list-tags em:last-child {
        display: none;
    }

    .preview-heading {
        flex-direction: column;
    }

    .preview-metrics,
    .preview-actions {
        grid-template-columns: 1fr;
    }

    .sections-pagination {
        gap: 8px;
        font-size: 9px;
    }

    .filter-actions .btn-primary,
    .preview-actions .btn-primary {
        width: auto;
    }
}

/* Standard-first section library */
.library-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 88% 20%, rgba(91, 190, 220, 0.18), transparent 24rem),
        linear-gradient(115deg, #082942, #0d4a6b);
    color: #fff;
}

.library-hero .sections-shell {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-top: 30px;
    padding-bottom: 28px;
}

.library-hero .eyebrow {
    margin-bottom: 7px;
    color: #87d2e8;
}

.library-hero h1 {
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.library-hero p:not(.eyebrow) {
    max-width: 680px;
    margin-top: 12px;
    color: #c9dce7;
    font-size: 15px;
}

.library-workspace {
    padding: 16px 0 64px;
}

.library-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.workflow-step {
    display: grid;
    grid-template-columns: 38px minmax(120px, auto) minmax(170px, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--sections-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(18, 45, 65, 0.05);
}

.search-step {
    grid-column: 1 / -1;
    order: -1;
    grid-template-columns: 38px minmax(170px, 250px) minmax(0, 1fr);
}

.step-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #eaf5f9;
    color: var(--sections-blue);
    font-size: 10px;
    font-weight: 900;
}

.workflow-step > label strong,
.workflow-step > label small {
    display: block;
}

.workflow-step > label strong {
    color: var(--sections-ink);
    font-size: 13px;
}

.workflow-step > label small {
    margin-top: 3px;
    color: var(--sections-muted);
    font-size: 10px;
}

.workflow-step select,
.library-search-input {
    width: 100%;
}

.workflow-step select {
    height: 44px;
    min-width: 0;
    border: 1px solid #cbd9e2;
    border-radius: 8px;
    background: #fff;
    color: var(--sections-ink);
    font-size: 12px;
}

.library-search-input {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    height: 44px;
    overflow: hidden;
    border: 1px solid #cbd9e2;
    border-radius: 8px;
    background: #fff;
}

.library-search-input:focus-within,
.workflow-step select:focus {
    border-color: var(--sections-cyan);
    box-shadow: 0 0 0 3px rgba(68, 165, 199, 0.12);
    outline: 0;
}

.library-search-input > span {
    color: #7b92a2;
    font-size: 20px;
    text-align: center;
}

.library-search-input input {
    width: 100%;
    height: 42px;
    min-width: 0;
    padding: 0 8px 0 0;
    border: 0;
    outline: 0;
    color: var(--sections-ink);
}

.library-search-input button {
    align-self: stretch;
    padding: 0 16px;
    border: 0;
    background: var(--sections-navy);
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.library-search-input button:hover {
    background: var(--sections-blue);
}

.search-step .step-number {
    background: var(--sections-navy);
    color: #fff;
}

.search-step .library-search-input {
    height: 48px;
    border-color: #aecfdd;
}

.search-step .library-search-input input {
    height: 46px;
    font-size: 13px;
}

.search-step .library-search-input button {
    padding: 0 20px;
}

.search-refine-panel {
    margin-top: -2px;
}

.library-advanced {
    grid-column: 1 / -1;
    border: 1px solid var(--sections-line);
    border-radius: 12px;
    background: #fff;
}

.catalogue-filter-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--sections-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(18, 45, 65, 0.04);
}

.catalogue-filter-title {
    display: grid;
    align-content: center;
}

.catalogue-filter-title span {
    color: var(--sections-blue);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.catalogue-filter-title strong {
    margin-top: 4px;
    color: var(--sections-ink);
    font-size: 15px;
}

.catalogue-filter-title small {
    max-width: 280px;
    margin-top: 5px;
    color: var(--sections-muted);
    font-size: 10px;
    line-height: 1.45;
}

.catalogue-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.catalogue-filter-grid label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.catalogue-filter-grid label span {
    color: var(--sections-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.catalogue-filter-grid select {
    width: 100%;
    height: 40px;
    min-width: 0;
    border: 1px solid #cbd9e2;
    border-radius: 8px;
    background: #fff;
    color: var(--sections-ink);
    font-size: 11px;
}

.catalogue-filter-grid select:focus {
    border-color: var(--sections-cyan);
    box-shadow: 0 0 0 3px rgba(68, 165, 199, 0.12);
    outline: 0;
}

.catalogue-clear-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #d8e4ea;
    border-radius: 8px;
    color: var(--sections-blue);
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.catalogue-clear-link:hover {
    border-color: var(--sections-blue);
    background: #f3f9fb;
}

.library-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    color: var(--sections-navy);
    cursor: pointer;
    list-style: none;
}

.library-advanced > summary::-webkit-details-marker {
    display: none;
}

.library-advanced > summary span {
    font-size: 12px;
    font-weight: 850;
}

.library-advanced > summary small {
    color: var(--sections-muted);
    font-size: 10px;
}

.library-advanced > summary::after {
    color: var(--sections-blue);
    content: "+";
    font-size: 18px;
    font-weight: 500;
}

.library-advanced[open] > summary::after {
    content: "−";
}

.advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--sections-line);
}

.advanced-filter-grid fieldset {
    min-width: 0;
    padding: 13px;
    border: 1px solid #e2e9ee;
    border-radius: 9px;
}

.advanced-filter-grid legend {
    padding: 0 5px;
    color: var(--sections-ink);
    font-size: 11px;
    font-weight: 800;
}

.advanced-filter-grid legend small {
    color: var(--sections-muted);
    font-weight: 600;
}

.advanced-filter-grid input[type="number"] {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 5px 7px;
    border: 1px solid #d4e0e7;
    border-radius: 6px;
}

.advanced-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
}

.advanced-checks label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #405568;
    font-size: 10px;
    font-weight: 650;
}

.advanced-filter-grid .second-legend {
    margin-top: 12px;
}

.library-advanced > footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--sections-line);
}

.library-advanced > footer .btn-primary {
    width: auto;
    min-height: 38px;
    padding: 8px 15px;
    border-radius: 7px;
    font-size: 11px;
}

.library-advanced > footer a {
    color: var(--sections-muted);
    font-size: 11px;
    font-weight: 750;
}

.library-picker,
.working-library,
.series-picker,
.category-quick-picker,
.saved-sections {
    margin-bottom: 16px;
    border: 1px solid var(--sections-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(18, 45, 65, 0.045);
}

.category-quick-picker {
    overflow: hidden;
}

.library-section-heading,
.working-library-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 19px;
    border-bottom: 1px solid var(--sections-line);
}

.series-table {
    overflow-x: auto;
}

.series-table-head,
.series-table-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.15fr) minmax(120px, .9fr) minmax(105px, .75fr) minmax(170px, 1.1fr) 82px;
    gap: 12px;
    align-items: center;
    min-width: 920px;
}

.series-table-head {
    min-height: 38px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--sections-line);
    background: #f6f9fb;
    color: var(--sections-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.series-table-row {
    min-height: 58px;
    padding: 9px 16px;
    border-bottom: 1px solid #edf1f4;
    color: #42586a;
    font-size: 10px;
    text-decoration: none;
    transition: background 0.14s ease, box-shadow 0.14s ease;
}

.series-table-row:hover,
.series-table-row.is-selected {
    background: #f2f8fa;
    box-shadow: inset 3px 0 var(--sections-cyan);
}

.country-cell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.flag-icon {
    display: inline-block;
    min-width: 1.15em;
    font-size: 13px;
    line-height: 1;
    vertical-align: -0.08em;
}

.series-name strong,
.series-name small {
    display: block;
}

.series-name strong {
    color: var(--sections-navy);
    font-size: 14px;
}

.series-name small {
    margin-top: 3px;
    color: var(--sections-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.series-empty {
    margin: 0;
    border: 0;
    border-radius: 0 0 15px 15px;
    box-shadow: none;
}

.library-section-heading h2,
.working-library-title h2,
.saved-sections h2 {
    color: var(--sections-ink);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.library-section-heading > p,
.working-library-title p {
    color: var(--sections-muted);
    font-size: 11px;
}

.working-library-title a {
    color: var(--sections-blue);
    font-size: 11px;
    font-weight: 800;
}

.library-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.category-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.category-quick-link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #dfe8ed;
    border-radius: 10px;
    background: #fbfdfe;
    color: inherit;
    text-decoration: none;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.category-quick-link:hover,
.category-quick-link:focus-visible {
    border-color: #9bc8d9;
    background: #f4fafc;
    box-shadow: 0 8px 20px rgba(13, 65, 96, 0.08);
    outline: 0;
}

.category-quick-link .family-shape {
    width: 34px;
    height: 30px;
}

.category-quick-link strong,
.category-quick-link small {
    display: block;
}

.category-quick-link strong {
    color: var(--sections-navy);
    font-size: 13px;
    line-height: 1.15;
}

.category-quick-link small {
    margin-top: 3px;
    color: var(--sections-muted);
    font-size: 9px;
    font-weight: 750;
}

.category-quick-link em {
    color: var(--sections-blue);
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
}

.library-card {
    position: relative;
    display: grid;
    min-height: 126px;
    align-content: start;
    padding: 15px;
    overflow: hidden;
    border: 1px solid #dfe8ed;
    border-radius: 10px;
    background: #fbfdfe;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.library-card:hover {
    border-color: #9bc8d9;
    box-shadow: 0 10px 24px rgba(13, 65, 96, 0.1);
    transform: translateY(-2px);
}

.library-card.is-active {
    border-color: var(--sections-navy);
    background: linear-gradient(180deg, #f6fbfd 0%, #fff 100%);
    box-shadow: inset 0 0 0 1px rgba(24, 52, 75, 0.08), 0 10px 24px rgba(13, 65, 96, 0.08);
}

.library-card.is-active::before {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--sections-navy);
    color: #fff;
    content: "✓";
    font-size: 11px;
    font-weight: 900;
    line-height: 20px;
    text-align: center;
}

.library-card.is-recent::after {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #e5f5ef;
    color: var(--sections-success);
    content: "Recent";
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.library-card > span {
    color: var(--sections-blue);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.library-card strong {
    margin-top: 6px;
    padding-right: 44px;
    color: var(--sections-navy);
    font-size: 15px;
    line-height: 1.2;
}

.library-card small {
    margin-top: 4px;
    color: var(--sections-muted);
    font-size: 10px;
}

.library-card em {
    margin-top: auto;
    padding-top: 12px;
    color: var(--sections-blue);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.category-card {
    min-height: 152px;
}

.category-card .family-shape {
    width: 42px;
    height: 36px;
    margin-bottom: 9px;
}

.category-card .family-shape::before {
    transform-origin: center;
}

.compact-card-grid .library-card {
    min-height: 116px;
}

.family-chip-list {
    display: flex;
    gap: 8px;
    padding: 13px 15px 15px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.family-chip-list a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #d8e3e9;
    border-radius: 999px;
    background: #fff;
    color: #3e5669;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.family-chip-list a:hover,
.family-chip-list a.is-active {
    border-color: var(--sections-navy);
    background: var(--sections-navy);
    color: #fff;
}

.family-chip-list a span {
    display: grid;
    min-width: 21px;
    height: 21px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef4f7;
    color: var(--sections-muted);
    font-size: 8px;
}

.saved-sections {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 17px;
}

.saved-section-links {
    display: flex;
    gap: 7px;
    overflow-x: auto;
}

.saved-section-item {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #d8e4ea;
    border-radius: 7px;
    background: #fff;
}

.saved-section-links a {
    flex: 0 0 auto;
    padding: 7px 10px;
    color: var(--sections-navy);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.saved-section-item button {
    width: 29px;
    border: 0;
    border-left: 1px solid #d8e4ea;
    background: #f7fafb;
    color: #758b99;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.saved-section-item button:hover,
.saved-section-item button:focus-visible {
    background: #fff0ee;
    color: #a64234;
    outline: 0;
}

.library-results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 390px);
    gap: 16px;
    align-items: start;
}

.library-detail-panel {
    top: 86px;
    max-height: calc(100vh - 102px);
    overflow: hidden;
}

.section-table {
    min-height: 360px;
    overflow-x: auto;
}

.section-table-head,
.section-table-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) 68px 68px 68px 58px 70px 84px 100px 92px;
    gap: 8px;
    align-items: center;
    min-width: 860px;
}

.section-table-head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 34px;
    padding: 7px 13px;
    border-bottom: 1px solid var(--sections-line);
    background: #f6f9fb;
    color: var(--sections-muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-table-row {
    min-height: 52px;
    padding: 8px 13px;
    border-bottom: 1px solid #edf1f4;
    color: #42586a;
    font-size: 10px;
    text-decoration: none;
    transition: background 0.14s ease, box-shadow 0.14s ease;
}

.section-table-row:hover,
.section-table-row.is-selected {
    background: #f2f8fa;
    box-shadow: inset 3px 0 var(--sections-cyan);
}

.section-table-row.is-loading {
    opacity: 0.55;
}

.table-section-name strong,
.table-section-name small {
    display: block;
}

.table-section-name strong {
    color: var(--sections-navy);
    font-size: 12px;
}

.table-section-name small {
    margin-top: 3px;
    color: var(--sections-muted);
    font-size: 8px;
}

.table-dimensions {
    color: #506879;
}

.section-table-row > span:not(.table-section-name) {
    display: grid;
    gap: 2px;
    justify-items: start;
    color: #33495c;
}

.section-table-row > span:not(.table-section-name) strong {
    color: var(--sections-ink);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.section-table-row > span:not(.table-section-name) small {
    color: var(--sections-muted);
    font-size: 7px;
    font-weight: 750;
}

.table-status {
    justify-self: start;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
}

.table-status.validation-verified {
    background: #e5f5ef;
    color: var(--sections-success);
}

.table-status.validation-single_source {
    background: #eef4f8;
    color: var(--sections-blue);
}

.table-status.validation-not_verified {
    background: #fff1e4;
    color: #9b5b1c;
}

.favorite-toggle.is-saved {
    border-color: #d3a235;
    background: #fff8e7;
    color: #845d08;
}

.copy-value {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    cursor: copy;
    font: inherit;
    text-align: right;
}

.copy-value:hover,
.copy-value:focus-visible {
    border-color: #b9d9e5;
    background: #e8f4f8;
    color: var(--sections-blue);
    outline: 0;
}

.copy-value::before {
    position: static;
    order: 2;
    margin-left: 3px;
    color: var(--sections-blue);
    content: "⧉";
    font-size: 11px;
    opacity: 0.62;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.copy-value:hover::before,
.copy-value:focus-visible::before {
    opacity: 1;
    transform: translateY(-1px);
}

.copy-value.is-copied::after {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: calc(100% + 6px);
    padding: 5px 7px;
    border-radius: 5px;
    background: var(--sections-navy);
    color: #fff;
    content: "Copied";
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.metric-copy-value {
    justify-content: center;
    margin: 0 auto;
}

.preview-metrics {
    overflow: visible;
}

.preview-metrics > div:first-child {
    border-radius: 9px 0 0 9px;
}

.preview-metrics > div:last-child {
    border-radius: 0 9px 9px 0;
}

@media (max-width: 1260px) {
    .library-controls {
        grid-template-columns: 1fr;
    }

    .library-advanced {
        grid-column: auto;
    }

    .advanced-filter-grid,
    .library-card-grid,
    .category-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-filter-panel {
        grid-template-columns: 1fr;
    }

    .catalogue-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-clear-link {
        justify-self: start;
    }

    .section-table-head,
    .section-table-row {
        grid-template-columns: minmax(170px, 1.2fr) 68px 68px 68px 58px 70px 84px 100px 92px;
    }
}

@media (max-width: 1080px) {
    .library-results-layout {
        display: block;
    }

    .library-detail-panel {
        top: 12px;
        max-height: none;
    }
}

@media (max-width: 800px) {
    .library-hero .sections-shell,
    .library-section-heading,
    .working-library-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-hero .sections-shell {
        gap: 20px;
        padding-top: 30px;
        padding-bottom: 28px;
    }

    .library-controls {
        gap: 9px;
    }

    .workflow-step {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 0;
        padding: 12px;
    }

    .search-step {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .workflow-step > select,
    .workflow-step > .library-search-input {
        grid-column: 1 / -1;
    }

    .advanced-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .library-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .catalogue-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .library-section-heading {
        gap: 8px;
    }

    .section-table-head {
        display: none;
    }

    .section-table {
        display: grid;
        gap: 8px;
        min-height: 0;
        padding: 10px;
        background: #f7fafb;
    }

    .section-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px 12px;
        min-height: 0;
        padding: 13px;
        border: 1px solid #dfe8ed;
        border-radius: 9px;
        background: #fff;
    }

    .table-section-name {
        grid-column: 1 / -1;
    }

    .table-dimensions {
        grid-column: 1 / -1;
    }

    .section-table-row > [data-label]::before {
        display: block;
        margin-bottom: 2px;
        color: var(--sections-muted);
        content: attr(data-label);
        font-size: 7px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

}

@media (max-width: 560px) {
    .library-hero h1 {
        font-size: 31px;
    }

    .library-workspace {
        padding-top: 12px;
    }

    .workflow-step {
        border-radius: 10px;
    }

    .library-advanced > summary {
        align-items: flex-start;
    }

    .library-advanced > summary small {
        display: none;
    }

    .advanced-filter-grid,
    .library-card-grid,
    .catalogue-filter-grid,
    .category-quick-grid {
        grid-template-columns: 1fr;
    }

    .catalogue-filter-panel {
        padding: 12px;
    }

    .library-card {
        min-height: 108px;
    }

    .working-library-title,
    .library-section-heading {
        padding: 14px;
    }

    .saved-sections {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .saved-section-links {
        width: 100%;
    }

    .results-heading {
        gap: 12px;
    }

    .result-controls {
        align-items: flex-end;
    }

    .detail-panel {
        top: 6px;
        right: 6px;
        bottom: 6px;
        width: calc(100% - 12px);
    }

    .section-preview {
        max-height: calc(100vh - 84px);
    }
}
