
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Sora', sans-serif;
    background: #F0F2F5;
    color: #1C2833;
    line-height: 1.7;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.header {
    background: linear-gradient(135deg, #000000 0%, #1a1445 50%, #211951 100%);
    text-align: center;
    padding: 1.8rem 3rem 2.6rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(74,144,226,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.header-logo {
    display: block;
    height: 72px;
    width: auto;
    margin: 0 auto 0.5rem;
    position: relative;
}

.header .subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    letter-spacing: 0.02em;
    max-width: 700px;
    margin: 0 auto 0.5rem;
    flex-wrap: wrap;
}

.header .subtitle span {
    display: flex;
    align-items: center;
}

.header .subtitle span::before {
    content: "\00B7";
    margin: 0 0.6rem;
    opacity: 0.4;
}

.header .subtitle span:first-child::before { display: none; }
.header .subtitle span:empty { display: none; }   /* drop the empty date span + its trailing separator */

.header .question {
    color: rgba(255,255,255,0.35);
    font-size: 0.78rem;
    font-style: italic;
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.5;
}

.settings-btn {
    position: absolute;
    top: 1.5rem; right: 2rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    width: 38px; height: 38px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-color: rgba(255,255,255,0.25);
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 1.5rem; left: 2rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0 14px;
    height: 38px;
    text-decoration: none;
    z-index: 1;
    transition: all 0.25s ease;
}

.home-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-color: rgba(255,255,255,0.25);
}

/* ── KPI STRIP ── */
.exec-summary {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 20px;
    transform: translateY(-1.5rem);
    margin-bottom: -0.5rem;
    position: relative;
    z-index: 10;
    display: none;
}

.exec-summary-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #DDE2E6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
}

.exec-stat {
    background: #ffffff;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: background 0.2s ease;
}

.exec-stat:hover { background: #FAFBFC; }

.exec-stat-number {
    font-family: 'Instrument Serif', serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: #1C2833;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.exec-stat-number.accent { color: #2E5BA8; }
.exec-stat-number.green  { color: #1E8449; }
.exec-stat-number.amber  { color: #B7770A; }

.exec-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #85929E;
}

.exec-stat-sub {
    font-size: 0.68rem;
    color: #A0AAB4;
    margin-top: 0.1rem;
}

/* ── TABS ── */
.tabs {
    display: flex;
    padding: 16px 20px;
    max-width: 1700px;
    margin: 0 auto;
}

.tabs-inner {
    display: flex;
    flex: 1;
    background: #E4E8EB;
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
}

.tab {
    flex: 1;
    padding: 0.7rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #85929E;
    transition: all 0.25s ease;
    text-align: center;
}

.tab:hover { color: #1C2833; background: rgba(255,255,255,0.5); }

.tab.active {
    color: #1C2833;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-weight: 600;
}

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── CONTAINER ── */
.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0.5rem 20px 2rem;
}

/* ── FILTER BAR ── */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-bar input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 0.75rem 1.1rem;
    border: 1px solid #E4E8EB;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    color: #1C2833;
    background: #ffffff;
    transition: all 0.2s ease;
}

.filter-bar input[type="text"]::placeholder { color: #A0AAB4; }

.filter-bar input[type="text"]:focus,
.filter-bar select:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.08);
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 0.75rem 2.5rem 0.75rem 1.1rem;
    border: 1px solid #E4E8EB;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    color: #1C2833;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235D6D7E' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 1rem center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* ── COLUMN TOGGLE ── */
.col-toggle-wrap { position: relative; }

.col-toggle-btn {
    padding: 0.75rem 1.1rem;
    background: #ffffff;
    border: 1px solid #E4E8EB;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1C2833;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.col-toggle-btn:hover,
.col-toggle-btn.active {
    border-color: #4A90E2;
    background: #F0F6FF;
    color: #2E5BA8;
}

.col-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #ffffff;
    border: 1px solid #E4E8EB;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 200;
    min-width: 200px;
}

.col-panel-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #85929E;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #F0F2F4;
}

.col-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.35rem;
    border-radius: 5px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.col-option:hover { background: #F8F9FA; }

.col-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #2E5BA8;
    cursor: pointer;
    flex-shrink: 0;
}

.col-option span {
    font-size: 0.83rem;
    color: #1C2833;
    cursor: pointer;
}

.export-btn {
    padding: 0.75rem 1.25rem;
    background: #4A90E2;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.export-btn:hover { background: #2E5BA8; transform: translateY(-1px); }

.result-count {
    font-size: 0.82rem;
    color: #5D6D7E;
    margin-bottom: 0.75rem;
}

/* ── TABLE ── */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

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

thead { background: #F8F9FA; }

th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #5D6D7E;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid #E4E8EB;
    transition: color 0.15s ease;
    white-space: nowrap;
}

th:hover { color: #1C2833; }
th.col-right { text-align: right; }
th.no-sort { cursor: default; }

td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #F0F2F4;
    font-size: 0.85rem;
    color: #1C2833;
}

td.col-right { text-align: right; font-variant-numeric: tabular-nums; }
td.muted { color: #85929E; }

tr { transition: background 0.15s ease; cursor: pointer; }
tr:hover { background: #F8F9FB; }
tr:last-child td { border-bottom: none; }

.sort-icon { color: #C0C8D0; font-size: 0.7rem; margin-left: 0.25rem; }
th.sort-asc  .sort-icon,
th.sort-desc .sort-icon { color: #4A90E2; }

/* ── MARKET PILLS (modal) ── */
.market-pill {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #F4F6F8;
    border: 1px solid #DDE3E9;
    color: #5D6D7E;
    margin: 0.2rem 0.2rem 0 0;
}

/* ── GIFT INDICATOR ── */
.gift-yes { color: #1E8449; font-weight: 700; }
.gift-no  { color: #C5CCD3; }

/* ── MODAL TABS ── */
.modal-tab-nav {
    display: flex;
    background: #E4E8EB;
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
    margin: 0.5rem 0 1.25rem;
}
.modal-tab-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    color: #85929E;
    white-space: nowrap;
    text-align: center;
    font-family: 'Sora', sans-serif;
    transition: all 0.18s ease;
}
.modal-tab-btn:hover { color: #1C2833; }
.modal-tab-btn.active { background: #fff; color: #1C2833; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.modal-tab-pane { display: none; }
.modal-tab-pane.active { display: block; animation: fadeIn 0.2s ease; }

.company-link {
    color: #2E5BA8;
    text-decoration: none;
    font-weight: 600;
}

.company-link:hover { text-decoration: underline; }

/* ── BADGES ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge-ecommerce  { background: rgba(46,91,168,0.1);   color: #2E5BA8; }
.badge-hybrid     { background: rgba(30,132,73,0.1);   color: #1E8449; }
.badge-large      { background: rgba(30,132,73,0.1);   color: #1E8449; }
.badge-medium     { background: rgba(46,91,168,0.1);   color: #2E5BA8; }
.badge-small      { background: rgba(133,146,158,0.1); color: #5D6D7E; }
.badge-leader     { background: rgba(30,132,73,0.1);   color: #1E8449; }
.badge-mature     { background: rgba(46,91,168,0.1);   color: #2E5BA8; }
.badge-developing { background: rgba(183,119,10,0.1);  color: #B7770A; }
.badge-nascent    { background: rgba(133,146,158,0.1); color: #5D6D7E; }
.badge-high       { background: rgba(30,132,73,0.1);   color: #1E8449; }
.badge-medium-dq  { background: rgba(183,119,10,0.1);  color: #B7770A; }
.badge-low        { background: rgba(192,57,43,0.1);   color: #C0392B; }

/* ── SCORE BAR (inline) ── */
.score-cell { display: flex; align-items: center; gap: 0.5rem; justify-content: flex-end; }
.score-mini-bar { flex: 1; max-width: 60px; height: 4px; background: #E4E8EB; border-radius: 2px; overflow: hidden; }
.score-mini-fill { height: 100%; background: #2E5BA8; border-radius: 2px; }
.score-text { font-size: 0.82rem; font-weight: 600; color: #1C2833; white-space: nowrap; }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: #A0AAB4;
    font-size: 0.9rem;
    font-style: italic;
}

/* ── LOADING / ERROR ── */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #5D6D7E;
    font-size: 0.9rem;
}

.error-state {
    background: rgba(192,57,43,0.06);
    border: 1px solid rgba(192,57,43,0.2);
    border-radius: 8px;
    padding: 1.5rem;
    color: #C0392B;
    margin: 1rem 0;
    font-size: 0.85rem;
}

/* ── LANDSCAPE TAB ── */
.landscape-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.landscape-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

.panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #85929E;
    margin-bottom: 1.25rem;
}

.dist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dist-item:last-child { margin-bottom: 0; }

.dist-label {
    font-size: 0.82rem;
    color: #1C2833;
    min-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dist-track {
    flex: 1;
    height: 8px;
    background: #F0F2F4;
    border-radius: 4px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    border-radius: 4px;
    background: #2E5BA8;
    transition: width 0.4s ease;
}

.dist-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: #5D6D7E;
    min-width: 24px;
    text-align: right;
}

.dist-pct {
    font-size: 0.72rem;
    color: #A0AAB4;
    min-width: 32px;
    text-align: right;
}

/* ── METHODOLOGY TAB ── */
.methodology-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.methodology-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

.methodology-panel.full-width { grid-column: 1 / -1; }

.methodology-panel h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #1C2833;
    margin-bottom: 0.25rem;
}

.methodology-panel .panel-desc {
    font-size: 0.85rem;
    color: #5D6D7E;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

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

.score-dim-table th {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #85929E;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #E4E8EB;
    cursor: default;
}

.score-dim-table th:hover { color: #85929E; }

.score-dim-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #F0F2F4;
    font-size: 0.83rem;
    color: #1C2833;
}

.score-dim-table tr:last-child td { border-bottom: none; }

.theme-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.15rem 0.2rem 0.15rem 0;
    background: rgba(46,91,168,0.1);
    color: #2E5BA8;
}

/* ── MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 780px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
}

#modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.7rem;
    font-weight: 400;
    color: #1C2833;
    margin: 0;
    line-height: 1.2;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #5D6D7E;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.modal-close:hover { color: #1C2833; }

.modal-badges {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-badges-left { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }

.modal-website {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #2E5BA8;
    color: #ffffff;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(46,91,168,0.25);
    transition: background 0.15s ease;
}

.modal-website:hover { background: #1a4a8a; text-decoration: none; }

.modal-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E4E8EB;
}

.modal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* DMI breakdown list */
.dmi-list-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.45rem 0;
    border-bottom: 1px solid #EEF2F7;
    font-size: 0.75rem;
    gap: 0.5rem;
}
.dmi-list-row:last-child { border-bottom: none; }
.dmi-list-name { font-weight: 600; color: #1C2833; }
.dmi-list-obs  { font-size: 0.67rem; color: #8A9BAD; margin-top: 1px; }
.dmi-list-pts  { font-weight: 700; color: #4A90E2; white-space: nowrap; padding-top: 1px; }
.dmi-list-pts.zero { color: #C8D4DC; font-weight: 400; }

.modal-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #85929E;
    margin-bottom: 0.8rem;
}

.modal-section-title.toggleable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.modal-section-title.toggleable:hover { color: #5D6D7E; }
.section-chevron { font-style: normal; transition: transform 0.2s ease; display: inline-block; }
.modal-section.collapsed .section-chevron { transform: rotate(-90deg); }
.modal-section.collapsed .section-body { display: none; }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modal-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.modal-field { display: flex; flex-direction: column; gap: 0.15rem; }
.modal-field-label { font-size: 0.75rem; color: #85929E; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.modal-field-value { font-size: 0.9rem; color: #1C2833; font-weight: 500; }

.company-intro-card {
    background: #F4F7FB;
    border: 1px solid #DDE5EF;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    font-size: 0.875rem;
    color: #2C3E50;
    line-height: 1.75;
}

.modal-verbatim {
    font-size: 0.85rem;
    color: #5D6D7E;
    line-height: 1.65;
    font-style: italic;
    border-left: 3px solid #E4E8EB;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.sw-list { list-style: none; padding: 0; margin: 0; }
.sw-list li {
    font-size: 0.83rem;
    color: #1C2833;
    padding: 0.4rem 0;
    border-bottom: 1px solid #F0F2F4;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}
.sw-list li:last-child { border-bottom: none; }
.sw-sign { font-weight: 700; font-size: 0.95rem; flex-shrink: 0; width: 1em; margin-top: 0.05rem; }
.sw-plus  { color: #1E8449; }
.sw-minus { color: #C0392B; }

.weakness-text {
    font-size: 0.83rem;
    color: #C0392B;
    background: rgba(192,57,43,0.05);
    border-left: 3px solid rgba(192,57,43,0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
}

/* Score breakdown in modal */
.score-overview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.score-total-display {
    font-family: 'Instrument Serif', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: #1C2833;
    line-height: 1;
}

.score-total-max {
    font-size: 1rem;
    color: #A0AAB4;
    font-family: 'Sora', sans-serif;
}

.score-total-bar {
    flex: 1;
    height: 8px;
    background: #E4E8EB;
    border-radius: 4px;
    overflow: hidden;
}

.score-total-fill {
    height: 100%;
    background: #2E5BA8;
    border-radius: 4px;
}
.score-total-fill.dmi { background: #0D7A8C; }

.score-rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    margin-top: 0.75rem;
    background: #F9FAFB;
    border: 1px solid #DDE5EF;
    border-radius: 8px;
    overflow: hidden;
}
.score-rubric-table td {
    padding: 9px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #EEF2F7;
    color: #1C2833;
}
.score-rubric-table tbody tr:last-child td { border-bottom: none; }
.score-rubric-table .col-dim-cell { width: 60%; }
.score-rubric-table .col-dim { font-weight: 600; color: #1C2833; }
.score-rubric-table .col-rule {
    font-size: 0.65rem;
    color: #8A9BAD;
    margin-top: 2px;
    line-height: 1.4;
}
.score-rubric-table .col-fact {
    color: #4A6080;
    white-space: nowrap;
    padding-right: 16px;
}
.score-rubric-table .col-score {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    color: #4A90E2;
}
.score-rubric-table .col-score .score-max { color: #B0BEC5; font-weight: 400; }
.score-rubric-table tfoot td {
    background: #F0F4FA;
    border-top: 1px solid #DDE5EF;
    font-size: 0.65rem;
    font-weight: 600;
    color: #5D6D7E;
    padding: 8px 12px;
}
.score-rubric-table tfoot .col-score {
    font-size: 0.75rem;
    font-weight: 700;
}

/* kept for any legacy references */
.dim-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5D6D7E;
    min-width: 40px;
    text-align: right;
}

/* ── SETTINGS MODAL TABS ── */
.settings-tab-nav {
    display: flex;
    border-bottom: 1px solid #E4E8EB;
    margin-bottom: 1.25rem;
    gap: 0;
}
.settings-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #85929E;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Sora', sans-serif;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}
.settings-tab-btn:hover { color: #1C2833; }
.settings-tab-btn.active { color: #211951; border-bottom-color: #211951; font-weight: 600; }

#settings-tab-summary {
    max-height: 55vh;
    overflow-y: auto;
}

/* ── SETTINGS MODAL ── */
.settings-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.settings-modal-overlay.active { display: flex; }

.settings-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}

.settings-panel h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #1C2833;
    margin-bottom: 0.5rem;
}

.settings-panel p {
    font-size: 0.85rem;
    color: #5D6D7E;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.file-drop-zone {
    border: 2px dashed #DDE2E6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #4A90E2;
    background: rgba(74,144,226,0.04);
}

.file-drop-zone input[type="file"] { display: none; }
.file-drop-zone-label { font-size: 0.85rem; color: #5D6D7E; }
.file-drop-zone-label strong { color: #2E5BA8; }

.settings-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2E5BA8 0%, #4A90E2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(46,91,168,0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(46,91,168,0.35);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #C5CCD3;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #DDE2E6;
    color: #5D6D7E;
}

.btn-secondary:hover { background: #F4F6F8; border-color: #C5CCD3; }

/* ── FOOTER ── */
.sticky-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #000000;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.sticky-footer img { height: 22px; display: block; }
.sticky-footer .version { font-size: 0.72rem; color: rgba(255,255,255,0.4); font-weight: 500; position: absolute; right: 1.5rem; }

/* ── AUTH GATE (sign-in / loading) — rendered into #app by ag-auth-google.js ── */
.agi-gate {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #000000 0%, #1a1445 50%, #211951 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.5rem; padding: 2rem; text-align: center; z-index: 2000;
}
.agi-gate-logo { height: 46px; width: auto; max-width: 78%; opacity: 0.95; }
.agi-gate-tagline { font-size: 0.85rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.6); }
.agi-gate-msg { font-size: 0.8rem; color: #ffb4a8; max-width: 320px; }
.agi-gate-fine { font-size: 0.72rem; color: rgba(255,255,255,0.35); }
#agi-gsi-btn { display: flex; justify-content: center; min-height: 44px; }
.agi-gate-bar { width: 220px; height: 3px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; position: relative; }
.agi-gate-bar-fill {
    position: absolute; top: 0; left: -60%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, #4A90E2, transparent);
    border-radius: 3px; animation: agi-sweep 1.4s ease-in-out infinite;
}
@keyframes agi-sweep { 0% { left: -60%; } 100% { left: 100%; } }
.agi-gate-label { font-size: 0.78rem; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .landscape-grid { grid-template-columns: 1fr 1fr; }
    .methodology-grid { grid-template-columns: 1fr; }
    .methodology-panel.full-width { grid-column: 1; }
}

@media (max-width: 768px) {
    .header { padding: 1.5rem 1.5rem 2.2rem; }
    .header-logo { height: 54px; }
    .exec-summary-inner { grid-template-columns: repeat(3, 1fr); }
    .landscape-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-controls { flex-wrap: wrap; }
    .export-btn { width: 100%; }
    .modal-grid, .modal-grid-3 { grid-template-columns: 1fr; }
    .settings-btn { top: 1rem; right: 1rem; }
    .home-btn { top: 1rem; left: 1rem; padding: 0 10px; height: 34px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .exec-summary { transform: none; margin-bottom: 0; }
    .exec-summary-inner { grid-template-columns: repeat(2, 1fr); border-radius: 8px; }
    .exec-stat-number { font-size: 1.8rem; }
}


/* ===== AG Insights demo — header wordmark ===== */
.header-wordmark {
    color: #fff;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.7rem;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
}

/* ===== Leadership tab ===== */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
    padding: 0.25rem 0 2rem;
}
.lead-card {
    background: #fff;
    border: 1px solid #E4E8EB;
    border-radius: 12px;
    padding: 1rem 1.15rem 1.1rem;
    cursor: pointer;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.lead-card:hover { box-shadow: 0 6px 22px rgba(20,40,70,.10); transform: translateY(-2px); border-color: #C9D3DB; }
.lead-card-head {
    font-weight: 700; font-size: 1.02rem; color: #1C2833;
    padding-bottom: .7rem; margin-bottom: .55rem; border-bottom: 1px solid #F0F2F4;
}
.lead-row { display: flex; gap: .7rem; padding: .5rem 0; border-bottom: 1px dashed #F0F2F4; }
.lead-row:last-child { border-bottom: none; }
.lead-role {
    flex: 0 0 88px; font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #2E5BA8; padding-top: .15rem;
}
.lead-main { flex: 1 1 auto; min-width: 0; }
.lead-name { font-weight: 600; font-size: .9rem; color: #1C2833; }
.lead-bg { font-size: .8rem; color: #5D6D7E; margin-top: .2rem; line-height: 1.4; }
.lead-empty { font-size: .83rem; color: #A0AAB4; padding: .4rem 0; }
.lead-li {
    display: inline-block; font-size: .66rem; font-weight: 700; color: #fff;
    background: #2E5BA8; border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem;
    text-decoration: none; vertical-align: middle;
}
.lead-li:hover { background: #1E8449; }
.lead-name-lg { font-weight: 700; font-size: 1.05rem; color: #1C2833; }

/* ===== Data Explorer (evidence ledger) ===== */
.explorer-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 1rem; }
.exp-stat { background: #fff; border: 1px solid #E4E8EB; border-radius: 10px; padding: 0.55rem 0.9rem; min-width: 92px; text-align: center; }
.exp-stat-n { font-size: 1.25rem; font-weight: 700; color: #1C2833; line-height: 1; }
.exp-stat-l { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; color: #85929E; margin-top: 0.25rem; }
.explorer-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.65rem; }
.explorer-filters input, .explorer-filters select {
  padding: 0.5rem 0.7rem; border: 1px solid #D7DEE3; border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 0.82rem; color: #1C2833;
}
.explorer-filters input { flex: 1 1 240px; min-width: 200px; }
.explorer-count { font-size: 0.75rem; color: #85929E; margin-bottom: 0.5rem; }
.explorer-list { padding-bottom: 2rem; }
.exp-item { background: #fff; border: 1px solid #E8ECEF; border-radius: 9px; margin-bottom: 0.4rem; overflow: hidden; }
.exp-item.open { border-color: #C9D3DB; box-shadow: 0 4px 16px rgba(20,40,70,.07); }
.exp-row {
  display: grid; grid-template-columns: 1.15fr 1.35fr 1.7fr 116px 130px 26px;
  align-items: center; gap: 0.75rem; padding: 0.6rem 0.85rem; cursor: pointer;
}
.exp-row:hover { background: #FAFBFC; }
.exp-c-co { font-weight: 600; font-size: 0.85rem; color: #1C2833; }
.exp-field-label { font-size: 0.84rem; color: #1C2833; }
.exp-field-cat { font-size: 0.68rem; color: #98A2AD; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.1rem; }
.exp-c-val { font-size: 0.83rem; color: #44535F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-tier-badge { display: inline-flex; align-items: center; gap: 0.28rem; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.18rem 0.5rem; border-radius: 999px; text-transform: uppercase; }
.exp-tier-sym { font-size: 0.78rem; }
.exp-c-src { font-size: 0.74rem; color: #5D6D7E; }
.exp-c-chev { color: #B0B8C0; font-size: 0.8rem; transition: transform .15s ease; text-align: center; }
.exp-item.open .exp-c-chev { transform: rotate(180deg); }
.exp-detail { display: none; padding: 0.2rem 0.85rem 0.85rem; border-top: 1px solid #F0F2F4; }
.exp-item.open .exp-detail { display: block; }
.exp-resnote { font-size: 0.72rem; color: #85929E; padding: 0.55rem 0 0.4rem; font-style: italic; }
.exp-source { border-left: 2px solid #E4E8EB; padding: 0.45rem 0 0.45rem 0.75rem; margin-top: 0.45rem; }
.exp-src-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.74rem; }
.exp-role { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.12rem 0.4rem; border-radius: 4px; }
.exp-role-primary { background: #1E844915; color: #1E8449; }
.exp-role-corroborating { background: #2563EB15; color: #2563EB; }
.exp-role-superseded { background: #98A2AD22; color: #6B7884; }
.exp-src-type { color: #5D6D7E; }
.exp-src-link { color: #2563EB; text-decoration: none; }
.exp-src-link:hover { text-decoration: underline; }
.exp-src-syn { color: #85929E; font-style: italic; }
.exp-src-date { color: #A0AAB4; margin-left: auto; }
.exp-quote { font-size: 0.8rem; color: #2C3A45; line-height: 1.5; margin-top: 0.3rem; }
.exp-supersede { font-size: 0.72rem; color: #B7770A; margin-top: 0.25rem; }
@media (max-width: 860px) {
  .exp-row { grid-template-columns: 1fr 96px 24px; grid-template-areas: "co tier chev" "field field field" "val val val" "src src src"; row-gap: 0.3rem; }
  .exp-c-co { grid-area: co; } .exp-c-field { grid-area: field; } .exp-c-val { grid-area: val; white-space: normal; }
  .exp-c-tier { grid-area: tier; } .exp-c-src { grid-area: src; } .exp-c-chev { grid-area: chev; }
}

/* ===== Modal logo + evidence deep-links + table logo ===== */
#modal-title { display: flex; align-items: center; gap: 0.6rem; }
.modal-logo {
  position: relative; width: 42px; height: 42px; border-radius: 9px; background: #fff;
  border: 1px solid #E4E8EB; display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex: 0 0 auto;
}
.modal-logo::before { content: attr(data-mono); position: absolute; font-weight: 700; color: #9AA7B2; font-size: 1.05rem; }
.modal-logo img { position: relative; width: 30px; height: 30px; object-fit: contain; background: #fff; }
.modal-badges-right { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.modal-evidence { background: #1E8449 !important; color: #fff !important; border-color: #1E8449 !important; }
.modal-evidence:hover { background: #176B3A !important; }
.modal-evlink { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid #F0F2F4; }
.modal-evlink a { font-size: 0.8rem; color: #2563EB; text-decoration: none; font-weight: 600; }
.modal-evlink a:hover { text-decoration: underline; }
.tbl-logo { display: inline-flex; width: 18px; height: 18px; vertical-align: middle; margin-right: 0.5rem; }
.tbl-logo img { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; }
