/* ==============================================
   GWS Strategies - Layout, Sidebar, Charts, Stats
   ============================================== */

/* -- Layout ----------------------------------- */
.gws-strategies-layout {
    display: flex; gap: 1rem; min-height: 500px;
}

/* -- Sidebar ---------------------------------- */
.gws-strat-sidebar {
    width: 280px; min-width: 280px;
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    box-shadow: var(--gws-shadow);
    overflow-y: auto; max-height: 80vh;
}

.gws-strat-group { border-bottom: 1px solid var(--gws-border); }
.gws-strat-group:last-child { border-bottom: none; }

.gws-strat-group-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 0.85rem; cursor: pointer;
    background: #f8fafc; transition: background 0.15s ease;
    user-select: none;
}
.gws-strat-group-header:hover { background: #f1f5f9; }

.gws-strat-chevron {
    font-size: 0.65rem; color: var(--gws-text-muted);
    width: 14px; text-align: center;
    transition: transform 0.2s ease;
}

.gws-strat-group-name {
    flex: 1; font-size: 0.78rem; font-weight: 700;
    color: var(--gws-accent); text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gws-strat-group-count {
    font-size: 0.65rem; font-weight: 700;
    background: var(--gws-accent); color: white;
    padding: 0.1rem 0.4rem; border-radius: 8px;
    min-width: 20px; text-align: center;
}

.gws-strat-group-items { }

.gws-strat-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.55rem 0.85rem 0.55rem 1.6rem;
    cursor: pointer; transition: all 0.15s ease;
    border-left: 3px solid transparent;
}
.gws-strat-item:hover {
    background: rgba(44, 62, 80, 0.04);
    border-left-color: rgba(44, 62, 80, 0.2);
}
.gws-strat-item-active {
    background: rgba(44, 62, 80, 0.08);
    border-left-color: var(--gws-accent);
}
.gws-strat-item-active .gws-strat-item-name {
    color: var(--gws-accent); font-weight: 700;
}

.gws-strat-item-name {
    font-size: 0.82rem; color: var(--gws-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex: 1; min-width: 0;
}

.gws-strat-item-freq {
    font-size: 0.65rem; color: var(--gws-text-muted);
    text-transform: uppercase; font-weight: 600;
    flex-shrink: 0; margin-left: 0.5rem;
}

.gws-strat-error {
    padding: 2rem 1rem; text-align: center;
    color: var(--gws-negative); font-size: 0.85rem;
}

/* -- Main Panel ------------------------------- */
.gws-strat-main {
    flex: 1; min-width: 0;
}

.gws-strat-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 5rem 2rem; text-align: center;
    color: var(--gws-text-muted);
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    box-shadow: var(--gws-shadow);
    min-height: 500px;
}
.gws-strat-empty i { opacity: 0.15; margin-bottom: 1rem; }
.gws-strat-empty h5 { font-weight: 700; color: var(--gws-accent); margin-bottom: 0.3rem; }
.gws-strat-empty p { font-size: 0.85rem; }

.gws-strat-detail {
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    box-shadow: var(--gws-shadow);
    padding: 1.25rem;
}

/* -- Detail Header ---------------------------- */
.gws-strat-detail-header { margin-bottom: 1.25rem; }

.gws-strat-name-row {
    display: flex; align-items: center; gap: 0.75rem;
    flex-wrap: wrap; margin-bottom: 0.4rem;
}

.gws-strat-title {
    margin: 0; font-size: 1.2rem; font-weight: 700;
    color: var(--gws-accent);
}

.gws-strat-typology-badge {
    font-size: 0.68rem; font-weight: 700;
    padding: 0.2rem 0.6rem; border-radius: 6px;
    background: rgba(44, 62, 80, 0.08); color: var(--gws-accent);
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* Download PDF button in the detail header — push to the far right of
   the name row, smaller padding to sit beside the title/badge. */
.gws-strat-pdf-btn {
    margin-left: auto;
    padding: 0.35rem 0.7rem; font-size: 0.74rem;
}
.gws-strat-pdf-btn i { font-size: 0.72rem; }
.gws-strat-pdf-btn:disabled { opacity: 0.6; cursor: default; }
.gws-strat-pdf-btn .fa-spin { animation: gws-spin 1s linear infinite; }

.gws-strat-meta {
    display: flex; gap: 1rem; flex-wrap: wrap;
    font-size: 0.78rem; color: var(--gws-text-muted);
}
.gws-strat-meta i { margin-right: 0.25rem; }

/* -- Portfolio-type badges in detail header -- */
.gws-strat-badges {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    margin: 0.3rem 0 0.5rem;
}
.gws-strat-badge {
    font-size: 0.63rem; font-weight: 700;
    padding: 0.15rem 0.55rem; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.05em;
    border: 1px solid transparent;
}
.gws-strat-badge-dpm {
    background: rgba(13, 148, 136, 0.12); color: #0d9488;
    border-color: rgba(13, 148, 136, 0.3);
}
.gws-strat-badge-advisory {
    background: rgba(79, 70, 229, 0.12); color: #4f46e5;
    border-color: rgba(79, 70, 229, 0.3);
}
.gws-strat-badge-sma {
    background: rgba(234, 179, 8, 0.16); color: #a16207;
    border-color: rgba(234, 179, 8, 0.4);
}
.gws-strat-badge-amc {
    background: rgba(225, 29, 72, 0.12); color: #be123c;
    border-color: rgba(225, 29, 72, 0.3);
}
.gws-strat-badge-generic {
    background: rgba(100, 116, 139, 0.14); color: #475569;
    border-color: rgba(100, 116, 139, 0.3);
}

/* -- Sidebar portfolio-type dots -- */
.gws-strat-item-dots {
    display: inline-flex; gap: 3px;
    margin-right: 0.5rem; align-items: center;
}
.gws-strat-item-dot {
    width: 7px; height: 7px; border-radius: 50%;
    display: inline-block;
}
.gws-strat-item-dot.gws-strat-badge-dpm { background: #0d9488; }
.gws-strat-item-dot.gws-strat-badge-advisory { background: #4f46e5; }
.gws-strat-item-dot.gws-strat-badge-sma { background: #eab308; }
.gws-strat-item-dot.gws-strat-badge-amc { background: #be123c; }
.gws-strat-item-dot.gws-strat-badge-generic { background: #94a3b8; }

/* -- Strategy Overview text block -- */
.gws-strat-overview {
    background: #f8fafc;
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--gws-text);
    white-space: pre-wrap;
    max-width: 100%;
}

/* -- Benchmark -------------------------------- */
.gws-strat-benchmark {
    background: #f8fafc;
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    padding: 0.7rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.82rem;
    color: var(--gws-text);
}
.gws-strat-benchmark .gws-strat-section-title { margin-bottom: 0.4rem; }
.gws-strat-benchmark-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem;
}
.gws-strat-benchmark-list li {
    position: relative; padding-left: 0.75rem;
    color: #475569; line-height: 1.45;
}
.gws-strat-benchmark-list li::before {
    content: ''; position: absolute; left: 0; top: 0.45em;
    width: 5px; height: 5px; border-radius: 50%;
    background: #94a3b8;
}

/* -- Charts Row ------------------------------- */
.gws-strat-charts-row {
    display: flex; gap: 1.25rem; margin-bottom: 1.25rem;
}

.gws-strat-alloc-wrap {
    width: 260px; min-width: 260px;
    display: flex; flex-direction: column; align-items: center;
}

.gws-strat-perf-wrap {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
}

.gws-strat-section-title {
    font-size: 0.78rem; font-weight: 700;
    color: var(--gws-accent); text-transform: uppercase;
    letter-spacing: 0.05em; margin: 0 0 0.75rem;
}

.gws-strat-donut-container {
    display: flex; justify-content: center;
    margin-bottom: 0.75rem;
}

/* -- Allocation Legend ------------------------- */
.gws-strat-alloc-legend { width: 100%; }

.gws-strat-legend-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.25rem 0; font-size: 0.78rem;
}

.gws-strat-legend-dot {
    width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}

.gws-strat-legend-label {
    flex: 1; color: var(--gws-text);
}

.gws-strat-legend-val {
    font-weight: 700; color: var(--gws-text);
    font-variant-numeric: tabular-nums;
}

/* -- Performance Chart ------------------------ */
.gws-strat-perf-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 0.5rem;
}

.gws-strat-period-pills { display: flex; gap: 0.25rem; }

.gws-strat-period {
    padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 700;
    background: transparent; border: 1.5px solid var(--gws-border);
    border-radius: 6px; color: var(--gws-text-muted);
    cursor: pointer; transition: all var(--gws-transition);
}
.gws-strat-period:hover { border-color: var(--gws-accent); color: var(--gws-accent); }
.gws-strat-period.active {
    background: var(--gws-accent); color: white;
    border-color: var(--gws-accent);
}

.gws-strat-chart-container {
    position: relative; height: 300px; width: 100%;
    overflow: hidden;
}
.gws-strat-chart-container > canvas { max-width: 100%; }

/* -- Sector Breakdown chart ------------------ */
.gws-strat-sector-card {
    margin-top: 0.25rem; margin-bottom: 1.25rem;
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--gws-shadow);
}
.gws-strat-sector-container {
    position: relative;
    height: 340px;
    width: 100%;
}

/* -- Stats Table ------------------------------ */
.gws-strat-stats-section { margin-top: 0.25rem; }

.gws-strat-stats-loading {
    display: flex; justify-content: center; padding: 2rem;
}

.gws-strat-no-data {
    text-align: center; color: var(--gws-text-muted);
    padding: 1.5rem; font-size: 0.85rem;
}

.gws-strat-stats-grid {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
    table-layout: fixed;
}

/* 4-column layout (with benchmark): Label 34% | Strategy 22% | Benchmark 22% | Δ 22% */
.gws-strat-stats-grid thead th:nth-child(1) { width: 34%; }
.gws-strat-stats-grid thead th:nth-child(2),
.gws-strat-stats-grid thead th:nth-child(3),
.gws-strat-stats-grid thead th:nth-child(4) { width: 22%; }
/* 2-column layout (no benchmark): Label 50% | Strategy 50% */
.gws-strat-stats-grid thead tr:first-child th:nth-child(2):last-child { width: 66%; }

.gws-strat-stats-grid thead th {
    padding: 0.5rem 0.75rem; font-weight: 700; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gws-text-muted); border-bottom: 2px solid var(--gws-border);
    text-align: left;
}
.gws-strat-stats-grid thead th:not(:first-child) { text-align: right; }

.gws-stats-group-row td {
    padding: 0.6rem 0.75rem 0.3rem;
    font-weight: 700; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gws-accent); background: #f8fafc;
    border-top: 1px solid var(--gws-border);
}

.gws-stats-label {
    padding: 0.45rem 0.75rem; color: var(--gws-text);
    border-bottom: 1px solid #f1f5f9;
}

.gws-stats-val {
    padding: 0.45rem 0.75rem; text-align: right;
    font-weight: 600; font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #f1f5f9;
}

/* -- Periodic Returns (Monthly heatmap + Yearly bars) -- */
.gws-strat-returns-section {
    margin-top: 1.5rem;
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--gws-shadow);
}
.gws-strat-h-unit {
    color: var(--gws-text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-left: 0.3rem;
}
.gws-strat-monthly-wrap { overflow-x: auto; }
.gws-strat-monthly {
    width: 100%;
    border-collapse: collapse;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: 6px;
    overflow: hidden;
}
.gws-strat-monthly th, .gws-strat-monthly td {
    padding: 10px 11px;
    text-align: right;
    border-right: 1px solid var(--gws-border);
    border-bottom: 1px solid var(--gws-border);
}
.gws-strat-monthly th:last-child, .gws-strat-monthly td:last-child { border-right: none; }
.gws-strat-monthly tr:last-child td, .gws-strat-monthly tr:last-child th { border-bottom: none; }
.gws-strat-monthly thead th {
    background: #f8fafc;
    color: var(--gws-text-muted);
    font-weight: 700;
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 8px;
    border-bottom: 1px solid #cbd5e1;
}
.gws-strat-monthly thead th:first-child {
    text-align: left;
    padding-left: 14px;
    color: var(--gws-text);
}
.gws-strat-monthly tbody th {
    background: #f8fafc;
    color: var(--gws-text);
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    padding-left: 14px;
    border-right: 1px solid #cbd5e1;
}
.gws-strat-monthly td.empty {
    color: var(--gws-text-muted);
    background: #f8fafc;
    opacity: 0.5;
}
.gws-strat-monthly td.pos {
    color: var(--gws-positive);
    font-weight: 600;
    background: transparent;
}
.gws-strat-monthly td.neg {
    color: var(--gws-negative);
    font-weight: 600;
    background: transparent;
}
.gws-strat-monthly td.ytd {
    background: rgba(44, 62, 80, 0.06) !important;
    border-left: 1px solid #cbd5e1;
    font-weight: 700;
    color: var(--gws-text) !important;
}
.gws-strat-monthly td.ytd.pos strong { color: var(--gws-positive); }
.gws-strat-monthly td.ytd.neg strong { color: var(--gws-negative); }

.gws-strat-yearly-container {
    position: relative;
    height: 220px;
    margin-top: 0.5rem;
}

/* -- Sidebar portfolio-type legend ------------ */
.gws-strat-sidebar-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--gws-border);
}
.gws-strat-legend-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: var(--gws-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.gws-strat-sidebar-legend .gws-strat-item-dot {
    width: 8px; height: 8px;
}
.gws-strat-legend-name { line-height: 1; }

/* -- Strategy documents row ------------------- */
.gws-strat-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}
.gws-strat-doc-btn > i { margin-right: 0.35rem; }
/* The hover-eye uses .gws-pdf-preview-eye which already centers its <i>;
   don't apply the doc-btn icon margin to that nested icon. */
.gws-strat-doc-btn .gws-pdf-preview-eye i { margin: 0; }

/* -- Stats delta column ----------------------- */
.gws-stats-delta-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.gws-strat-stats-grid thead .gws-stats-delta-col {
    text-align: right;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gws-text-muted);
    border-bottom: 2px solid var(--gws-border);
    padding: 0.5rem 0.75rem;
}

/* -- Performance Overview (view toggle + matrix) -- */
.gws-strat-viewnav {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--gws-shadow);
}
.gws-strat-viewbtn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 600;
    background: transparent; border: none; border-radius: 6px;
    color: var(--gws-text-muted); cursor: pointer;
    transition: all var(--gws-transition);
}
.gws-strat-viewbtn:hover { color: var(--gws-accent); background: rgba(44, 62, 80, 0.06); }
.gws-strat-viewbtn.active { background: var(--gws-accent); color: #fff; }
.gws-strat-viewbtn i { font-size: 0.72rem; }

.gws-strat-overview-card {
    background: var(--gws-card);
    border: 1px solid var(--gws-border);
    border-radius: var(--gws-radius);
    box-shadow: var(--gws-shadow);
    padding: 1.1rem 1.25rem 1.25rem;
}
.gws-strat-overview-head {
    /* One compact row: title block left; as-of + note + selection
       actions right. Wraps via the media query below on narrow screens. */
    display: flex; align-items: center; justify-content: flex-start;
    flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.85rem;
}
.gws-strat-overview-eyebrow {
    display: block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--gws-text-muted);
}
.gws-strat-overview-title {
    margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 700;
    color: var(--gws-accent);
}
.gws-strat-overview-headmeta {
    display: flex; flex-direction: row; align-items: baseline;
    gap: 0.6rem; margin-left: auto;
}
.gws-strat-overview-asof {
    font-size: 0.72rem; font-weight: 600; color: var(--gws-text);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.gws-strat-overview-asof:empty { display: none; }
.gws-strat-overview-note {
    font-size: 0.72rem; color: var(--gws-text-muted);
}
.gws-strat-overview-asof:not(:empty) + .gws-strat-overview-note::before {
    content: "·"; margin-right: 0.6rem;
}

.gws-strat-overview-wrap { overflow-x: auto; }
.gws-strat-overview-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.82rem; min-width: 760px;
}
.gws-strat-overview-table thead th {
    background: var(--gws-header-dark);
    color: #fff; font-weight: 700; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.6rem 0.75rem; text-align: right;
    white-space: nowrap; position: sticky; top: 0;
}
.gws-strat-overview-table thead th:first-child {
    text-align: left; border-top-left-radius: 6px;
}
.gws-strat-overview-table thead th:last-child { border-top-right-radius: 6px; }

.gws-strat-overview-table tbody tr.gws-strat-overview-group td {
    background: #f8fafc; color: var(--gws-accent);
    font-weight: 700; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid var(--gws-border);
    border-bottom: 1px solid var(--gws-border);
}

.gws-strat-overview-row { cursor: pointer; transition: background var(--gws-transition); }
.gws-strat-overview-row:hover { background: rgba(44, 62, 80, 0.05); }
.gws-strat-overview-row td {
    padding: 0.55rem 0.75rem; text-align: right;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}
.gws-strat-overview-row td.gws-strat-overview-name {
    text-align: left; font-family: inherit;
    color: var(--gws-text); font-weight: 600;
    white-space: nowrap;
}
.gws-strat-overview-row td.gws-strat-overview-name .gws-strat-overview-ccy {
    margin-left: 0.4rem; font-size: 0.65rem; font-weight: 600;
    color: var(--gws-text-muted); text-transform: uppercase;
}
.gws-strat-overview-row td.gws-strat-overview-dash { color: var(--gws-text-muted); }
/* Inception date column — quiet mono, left of the numbers. */
.gws-strat-overview-row td.gws-strat-overview-incep {
    text-align: right; color: var(--gws-text-muted);
    font-size: 0.74rem;
}

/* Benchmark sub-row — muted grey throughout so it reads as quiet
   reference data beneath each strategy's own figures. Tighter top
   padding visually pairs it with the strategy row above; the bottom
   border separates the pair from the next strategy. */
.gws-strat-overview-bm { cursor: pointer; }
.gws-strat-overview-bm td {
    padding: 0.2rem 0.75rem 0.5rem; text-align: right;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
    font-size: 0.74rem;
}
/* A strategy that has a benchmark row drops its own divider so the two
   read as one grouped block. */
.gws-strat-overview-row.has-bm td { border-bottom: none; padding-bottom: 0.3rem; }
.gws-strat-overview-bm-cell { color: #94a3b8; }
.gws-strat-overview-bm td.gws-strat-overview-name.gws-strat-overview-bm-label {
    text-align: left; font-family: inherit; font-weight: 600;
    color: #94a3b8; padding-left: 0.75rem;
    text-transform: none; letter-spacing: 0; font-size: 0.7rem;
}
.gws-strat-overview-empty {
    text-align: center; color: var(--gws-text-muted);
    padding: 2rem; font-size: 0.85rem;
}

/* Selection actions (N selected + Download PDF) — live inside the
   header row, no longer a separate bar. */
.gws-strat-overview-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 0.75rem; margin: 0; flex-shrink: 0;
}

/* iPad portrait / mobile: title + actions share the first line; the
   as-of / help meta drops to its own full-width second line, left-
   aligned, so nothing overflows or leaves dead space. */
@media (max-width: 768px) {
    .gws-strat-overview-headmeta {
        margin-left: 0; flex: 1 1 100%; order: 3;
    }
    .gws-strat-overview-actions { margin-left: auto; }
}
.gws-strat-overview-selcount {
    font-size: 0.74rem; font-weight: 600; color: var(--gws-text-muted);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

/* Checkbox column — narrow, centered, accent-tinted control. */
.gws-strat-overview-table th.gws-strat-overview-checkcol,
.gws-strat-overview-table td.gws-strat-overview-checkcol {
    width: 2.2rem; text-align: center; padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.gws-strat-overview-check {
    width: 0.95rem; height: 0.95rem; cursor: pointer;
    accent-color: var(--gws-accent); vertical-align: middle;
    margin: 0;
}

/* -- Responsive ------------------------------- */
@media (max-width: 992px) {
    /* iPad portrait (incl. Air/Pro at 820–834px): stack the strategy list
       on top at full width instead of a narrow 280px rail beside a
       squeezed detail. The list keeps a capped, scrollable height so the
       detail panel is reachable just below it. */
    .gws-strategies-layout { flex-direction: column; }
    .gws-strat-sidebar { width: 100%; min-width: 0; max-height: 45vh; }
    .gws-strat-charts-row { flex-direction: column; }
    .gws-strat-alloc-wrap { width: 100%; min-width: auto; flex-direction: row; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
    .gws-strat-alloc-legend { max-width: 220px; }
}

@media (max-width: 768px) {
    /* Layout/sidebar stacking is handled in the <=992 block above; phones
       just get a slightly shorter list + tighter chart/detail sizing. */
    .gws-strat-sidebar { max-height: 38vh; }
    .gws-strat-chart-container { height: 220px; }
    .gws-strat-detail { padding: 0.85rem; }
    .gws-strat-sector-container { height: 280px; }
}
