:root {
    color-scheme: light;
    font-family: "Segoe UI", "Yu Gothic UI", "Meiryo", sans-serif;
    color: #172033;
    background: #f3f6fa;
    font-synthesis: none;
    --analytics-blue: #2563eb;
    --analytics-green: #14805e;
    --analytics-purple: #7c3aed;
    --analytics-orange: #d97706;
    --analytics-cyan: #0891b2;
    --analytics-rose: #db2777;
    --analytics-yellow: #b7791f;
    --analytics-indigo: #4f46e5;
    --analytics-slate: #475569;
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(41, 98, 255, 0.08), transparent 34rem),
        #f3f6fa;
}

button,
input,
select,
textarea {
    font: inherit;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.login-shell {
    width: min(100%, 29rem);
}

.login-card,
.welcome-card {
    border: 1px solid #dbe2ec;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1rem 3rem rgba(28, 43, 69, 0.1);
}

.login-card {
    padding: clamp(1.5rem, 5vw, 2.5rem);
}

.product-name,
.eyebrow {
    margin: 0 0 0.5rem;
    color: #2851a3;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.65rem, 4vw, 2rem);
}

.lead {
    margin-bottom: 1.5rem;
    color: #5c6679;
}

.stack-form {
    display: grid;
    gap: 0.7rem;
}

label {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    font-weight: 650;
}

input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    border: 1px solid #b8c3d4;
    border-radius: 0.55rem;
    padding: 0.78rem 0.85rem;
    color: #172033;
    background: #ffffff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(41, 98, 255, 0.25);
    outline-offset: 2px;
}

button {
    cursor: pointer;
    border: 0;
    border-radius: 0.55rem;
    padding: 0.8rem 1.1rem;
    color: #ffffff;
    background: #2851a3;
    font-weight: 700;
}

.stack-form button {
    margin-top: 1rem;
}

button:hover {
    background: #1d3e82;
}

.button-secondary {
    border: 1px solid #b8c3d4;
    color: #25324a;
    background: #ffffff;
}

.button-secondary:hover {
    background: #edf1f7;
}

.alert {
    margin-bottom: 1rem;
    border: 1px solid #efb8b8;
    border-radius: 0.55rem;
    padding: 0.8rem;
    color: #8a2020;
    background: #fff4f4;
}

.alert-success { border-color: #9ed8b4; color: #176236; background: #effbf3; }
.alert ul { margin-bottom: 0; }
.admin-header { padding-bottom: 1rem; }
.header-user { margin: 0; color: #3b4659; font-size: .9rem; }
.role-badge { margin-left: .35rem; border-radius: 999px; padding: .18rem .45rem; color: #2851a3; background: #edf3ff; font-size: .72rem; font-weight: 700; }
.admin-nav { display: flex; gap: .25rem; padding: .65rem clamp(1rem,4vw,3rem); border-bottom: 1px solid #dbe2ec; background: #fff; }
.admin-nav a { border-radius: .45rem; padding: .55rem .8rem; color: #32415d; text-decoration: none; font-weight: 650; }
.admin-nav a:hover { color: #1d3e82; background: #edf3ff; }
.nav-count { display: inline-flex; min-width: 1.35rem; height: 1.35rem; align-items: center; justify-content: center; margin-left: .35rem; border-radius: 999px; padding: 0 .35rem; color: #fff; background: #a12b2b; font-size: .72rem; }
.admin-shell { width: min(100% - 2rem, 86rem); margin: 0 auto; padding: clamp(1.5rem,4vw,3rem) 0 4rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { margin-bottom: .4rem; }
.button-link { display: inline-flex; align-items: center; justify-content: center; border-radius: .55rem; padding: .8rem 1.1rem; color: #fff; background: #2851a3; text-decoration: none; font-weight: 700; white-space: nowrap; }
.button-link:hover { background: #1d3e82; }
.button-link.button-secondary { color: #25324a; background: #fff; }
.button-danger { background: #a12b2b; }
.button-danger:hover { background: #7d1f1f; }
button:disabled { cursor: not-allowed; opacity: .55; }
.filter-panel { display: grid; grid-template-columns: minmax(14rem,2fr) repeat(2,minmax(10rem,1fr)) auto; align-items: end; gap: .8rem; margin-bottom: 1rem; border: 1px solid #dbe2ec; border-radius: .8rem; padding: 1rem; background: #fff; }
.filter-panel-wide { grid-template-columns: repeat(5,minmax(9rem,1fr)); }
.field { display: grid; gap: .35rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.filter-actions { display: flex; align-items: center; gap: .7rem; }
.filter-actions a { color: #425574; }
.result-count { color: #5c6679; font-size: .9rem; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #dbe2ec; border-radius: .8rem; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; min-width: 58rem; }
.data-table-sites { min-width: 78rem; }
.data-table th,.data-table td { padding: .85rem .9rem; border-bottom: 1px solid #e5eaf1; text-align: left; vertical-align: middle; }
.data-table th { color: #536079; background: #f8fafc; font-size: .78rem; letter-spacing: .03em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table strong,.data-table small { display: block; }
.data-table small { margin-top: .2rem; color: #697489; }
.data-table a { overflow-wrap: anywhere; }
.table-action { font-weight: 700; }
.status-badge { display: inline-block; border-radius: 999px; padding: .25rem .55rem; font-size: .78rem; font-weight: 700; }
.status-active { color: #176236; background: #e5f7eb; }
.status-inactive,.status-closed { color: #6b3940; background: #f8e9eb; }
.status-paused { color: #705315; background: #fff4d9; }
.status-open,.status-unread { color: #8a2020; background: #fff0f0; }
.status-resolved { color: #176236; background: #e5f7eb; }
.severity-badge { display: inline-block; border-radius: 999px; padding: .28rem .58rem; font-size: .76rem; font-weight: 750; white-space: nowrap; }
.severity-critical { color: #fff; background: #7f1d1d; }
.severity-error { color: #8a2020; background: #ffe2e2; }
.severity-warning { color: #705315; background: #fff0bd; }
.severity-info { color: #2851a3; background: #e8f0ff; }
.notification-table { min-width: 75rem; }
.notification-unread { background: #f7faff; }
.notification-unread td:nth-child(3) strong { color: #173f8a; }
.bulk-actions,.notification-actions,.detail-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: 0 0 1rem; }
.bulk-actions button,.notification-actions button { padding: .6rem .85rem; }
.notification-detail { border: 1px solid #dbe2ec; border-radius: .9rem; padding: clamp(1rem,3vw,1.6rem); background: #fff; }
.notification-message { border-left: .25rem solid #9eb4df; padding: .85rem 1rem; background: #f7faff; line-height: 1.75; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1.5rem 0; }
.detail-grid div { border: 1px solid #e2e8f0; border-radius: .6rem; padding: .75rem; min-width: 0; }
.detail-grid dt { color: #697489; font-size: .8rem; }
.detail-grid dd { margin: .3rem 0 0; overflow-wrap: anywhere; font-weight: 650; }
.notification-actions { margin-top: 1rem; }
.empty-state { border: 1px dashed #b8c3d4; border-radius: .8rem; padding: 2rem; text-align: center; background: rgba(255,255,255,.65); }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.pagination a { min-width: 2.3rem; border: 1px solid #c8d1df; border-radius: .45rem; padding: .45rem .65rem; text-align: center; text-decoration: none; color: #33425d; background: #fff; }
.pagination a.current { color: #fff; background: #2851a3; border-color: #2851a3; }
.form-card,.info-card,.danger-zone { border: 1px solid #dbe2ec; border-radius: .9rem; padding: clamp(1rem,3vw,1.6rem); background: #fff; box-shadow: 0 .6rem 2rem rgba(28,43,69,.05); }
.admin-form { display: grid; gap: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.form-actions { display: flex; gap: .7rem; align-items: center; }
.required { color: #9a2525; font-size: .75rem; }
.field-error { margin: 0; color: #a12b2b; font-size: .82rem; }
.help-text,.muted { color: #697489; font-size: .84rem; }
.checkbox-field label { display: flex; align-items: center; gap: .55rem; }
.checkbox-field input { width: 1.1rem; height: 1.1rem; }
.info-card,.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.info-card h2,.danger-zone h2 { margin-bottom: .35rem; font-size: 1.1rem; }
.info-card p,.danger-zone p { margin-bottom: 0; }
.danger-zone { margin-top: 1.5rem; border-color: #e7bcbc; background: #fffafa; }
.summary-grid,.management-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.summary-card,.management-card { border: 1px solid #dbe2ec; border-radius: .85rem; padding: 1.2rem; background: #fff; }
.summary-card p { color: #697489; }
.summary-card strong { font-size: 2rem; }
.summary-card .summary-date { font-size: 1rem; }
.management-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.management-card { display: grid; gap: .45rem; color: #26344e; text-decoration: none; box-shadow: 0 .5rem 1.5rem rgba(28,43,69,.05); }
.management-card strong { font-size: 1.2rem; }
.management-card:hover { border-color: #9eb4df; transform: translateY(-1px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Analytics dashboard */
.dashboard-heading { margin-bottom: 1.1rem; }
.dashboard-back { margin-bottom: 1rem; }
.dashboard-back a { color: #47607f; text-decoration: none; font-weight: 650; }
.analytics-site-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.analytics-site-card,.dashboard-section,.dashboard-control-panel,.kpi-card { border: 1px solid #dbe2ec; border-radius: .9rem; background: #fff; box-shadow: 0 .55rem 1.7rem rgba(28,43,69,.045); }
.analytics-site-card { display: grid; gap: 1rem; padding: 1.15rem; }
.site-card-head,.site-card-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.site-card-head h2 { margin: 0; font-size: 1.15rem; }
.site-card-head h2 a { color: #192943; text-decoration: none; }
.card-client,.card-date { margin-bottom: .25rem; color: #68768b; font-size: .8rem; }
.site-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; margin: 0; }
.site-meta { display: grid; gap: .35rem; margin: 0; color: #536177; font-size: .78rem; }
.site-meta div { display: grid; grid-template-columns: 6rem 1fr; gap: .5rem; }
.site-meta dt { color: #7b8798; }
.site-meta dd { margin: 0; overflow-wrap: anywhere; }
.site-kpis div { min-width: 0; border-radius: .6rem; padding: .7rem; background: #f5f8fc; }
.site-kpis dt { color: #68768b; font-size: .72rem; white-space: nowrap; }
.site-kpis dd { margin: .25rem 0 0; font-weight: 750; }
.site-card-foot { align-items: center; border-top: 1px solid #edf0f5; padding-top: .85rem; }
.notification-summary { color: #68768b; font-size: .8rem; }
.notification-summary.has-notification { color: #9a4d15; font-weight: 700; }
.status-succeeded { color: #17603a; background: #e7f7ee; }
.status-partially-succeeded,.status-pending,.status-running { color: #82520d; background: #fff4d6; }
.status-failed { color: #9b2d2d; background: #fde8e8; }
.status-unfetched { color: #5f6b7b; background: #edf1f6; }
.dashboard-warning { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; border: 1px solid #efcaa1; border-left: .3rem solid #d97706; border-radius: .7rem; padding: .85rem 1rem; background: #fffaf1; }
.dashboard-meta { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .65rem; margin: 0 0 1rem; }
.dashboard-meta div { min-width: 0; border: 1px solid #e1e7f0; border-radius: .65rem; padding: .7rem; background: rgba(255,255,255,.72); }
.dashboard-meta dt { color: #6b778b; font-size: .72rem; }
.dashboard-meta dd { margin: .25rem 0 0; overflow-wrap: anywhere; font-size: .84rem; font-weight: 650; }
.dashboard-meta small { display: block; margin-top: .2rem; color: #6b778b; font-weight: 400; }
.dashboard-warning p { margin: .25rem 0 0; color: #674c31; }
.dashboard-warning a { flex: 0 0 auto; }
.dashboard-control-panel { display: grid; grid-template-columns: minmax(12rem,1fr) auto; gap: 1rem 1.5rem; margin: 1rem 0 1.25rem; padding: 1.15rem; }
.dashboard-control-panel h2 { margin: 0; }
.dashboard-control-panel h2 small { display: block; margin-top: .25rem; color: #697489; font-size: .82rem; font-weight: 500; }
.dashboard-segment-selector { display:flex; flex-wrap:wrap; align-items:end; gap:.65rem; margin:0 0 1rem; padding:.9rem 1rem; border:1px solid #dbe2ec; border-radius:.8rem; background:#fff; }
.dashboard-segment-selector label { color:#475569; font-size:.82rem; font-weight:700; }
.dashboard-segment-selector select { min-width:min(22rem,100%); }
.segment-form + .segment-form { border-top:1px solid #e8edf4; margin-top:1rem; padding-top:1rem; }
.period-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.period-links a { border: 1px solid #c9d3e2; border-radius: 999px; padding: .5rem .8rem; color: #33425d; background: #fff; text-decoration: none; font-size: .84rem; }
.period-links a.active { border-color: #2851a3; color: #fff; background: #2851a3; }
.dashboard-compare-selector { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
.dashboard-compare-selector label { margin: 0; color: #5b687c; font-size: .78rem; font-weight: 700; }
.dashboard-compare-selector select { display: block; min-width: 10rem; margin-top: .25rem; padding: .55rem .65rem; }
.custom-period,.manual-fetch { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; grid-column: 1 / -1; border-top: 1px solid #e8edf4; padding-top: .9rem; }
.custom-period label { margin: 0; color: #5b687c; font-size: .78rem; }
.custom-period input { min-width: 10rem; margin-top: .25rem; padding: .55rem .65rem; }
.manual-fetch { justify-content: flex-end; padding-top: .8rem; }
.manual-fetch small { color: #68768b; }
button:disabled { cursor: not-allowed; opacity: .55; }
.dashboard-empty { margin-bottom: 1.25rem; }
.section-heading { margin-bottom: 1rem; }
.section-heading h2 { margin-bottom: .25rem; font-size: 1.25rem; }
.section-heading p:last-child { margin-bottom: 0; color: #68768b; font-size: .84rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi-card { display: grid; min-height: 8.4rem; padding: 1rem; }
.kpi-card p { margin-bottom: .55rem; color: #697489; font-size: .82rem; }
.kpi-card strong { font-size: clamp(1.35rem,2.4vw,2rem); font-variant-numeric: tabular-nums; }
.kpi-card span { align-self: end; margin-top: .5rem; font-size: .76rem; font-weight: 650; }
.kpi-main { border-top: .24rem solid #3b6ed2; }
.trend-up { color: #177245; }.trend-down { color: #b33131; }.trend-flat { color: #697489; }
.dashboard-section { min-width: 0; max-width: 100%; box-sizing: border-box; margin-bottom: 1rem; padding: clamp(1rem,2.8vw,1.4rem); }
.trend-chart { min-height: 14rem; border-radius: .7rem; padding: .5rem; background: linear-gradient(#f5f8fc 1px,transparent 1px) 0 0/100% 25%; overflow: hidden; }
.trend-chart svg { display: block; width: 100%; height: 16rem; }
.chart-axis { stroke: #aeb9ca; stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; color: #536177; font-size: .8rem; }
.chart-legend i { display: inline-block; width: .75rem; height: .22rem; margin: 0 .3rem .15rem 0; border-radius: 2px; }
.legend-users { background: #2563eb; }.legend-sessions { background: #0f766e; }.legend-views { background: #7c3aed; }.legend-events { background: #d97706; }
.daily-details { margin-top: 1rem; }
.daily-details summary { cursor: pointer; color: #2851a3; font-weight: 700; }
.daily-details .table-wrap { margin-top: .7rem; }
.dashboard-two-column { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 1rem; }
.dashboard-two-column > * { min-width: 0; }
.breakdown-list { display: grid; gap: .75rem; }
.breakdown-list > div { display: grid; grid-template-columns: 1fr auto; gap: .2rem .7rem; }
.breakdown-list progress { grid-column: 1 / -1; width: 100%; height: .5rem; border: 0; border-radius: 999px; overflow: hidden; background: #e7edf6; }
.breakdown-list progress::-webkit-progress-bar { background: #e7edf6; }.breakdown-list progress::-webkit-progress-value { background: var(--breakdown-color, var(--analytics-blue)); }.breakdown-list progress::-moz-progress-bar { background: var(--breakdown-color, var(--analytics-blue)); }
.breakdown-list > div:nth-child(1) { --breakdown-color: var(--analytics-blue); }.breakdown-list > div:nth-child(2) { --breakdown-color: var(--analytics-green); }.breakdown-list > div:nth-child(3) { --breakdown-color: var(--analytics-purple); }.breakdown-list > div:nth-child(n+4) { --breakdown-color: var(--analytics-cyan); }
.breakdown-list small { grid-column: 2; color: #697489; }
.data-table td strong,.data-table td small { display: block; }
.compact-table { font-size: .84rem; }
.job-facts { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .7rem; margin: 0; }
.job-facts div { min-width: 0; border-radius: .6rem; padding: .75rem; background: #f5f8fc; }
.job-facts dt { color: #697489; font-size: .75rem; }
.job-facts dd { margin: .35rem 0 0; overflow-wrap: anywhere; font-weight: 650; }

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid #dbe2ec;
    background: #ffffff;
}

.app-header h1 {
    margin-bottom: 0;
}

.dashboard-shell {
    width: min(100% - 2rem, 70rem);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.welcome-card {
    padding: clamp(1.5rem, 5vw, 3rem);
}

.account-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 2rem 0 0;
}

.account-details div {
    border-radius: 0.7rem;
    padding: 1rem;
    background: #f3f6fa;
}

.account-details dt {
    margin-bottom: 0.35rem;
    color: #5c6679;
    font-size: 0.85rem;
}

.account-details dd {
    margin: 0;
    font-weight: 700;
}

@media (max-width: 36rem) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-nav { overflow-x: auto; scrollbar-width: thin; }
    .admin-nav a { flex: 0 0 auto; white-space: nowrap; }
    .page-heading,.info-card,.danger-zone { flex-direction: column; }
    .page-heading .button-link,.info-card form,.danger-zone form,.info-card button,.danger-zone button { width: 100%; }
    .form-grid,.summary-grid,.management-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .filter-panel,.filter-panel-wide { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .analytics-site-grid,.dashboard-two-column { grid-template-columns: 1fr; }
    .site-kpis,.kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-control-panel { grid-template-columns: 1fr; }
    .period-links { justify-content: flex-start; }
    .dashboard-compare-selector { width: 100%; }
    .dashboard-compare-selector label,.dashboard-compare-selector select,.dashboard-compare-selector button { width: 100%; min-width: 0; }
    .custom-period { display: grid; grid-template-columns: 1fr 1fr; }
    .custom-period label,.custom-period input,.custom-period button { width: 100%; min-width: 0; }
    .manual-fetch { justify-content: stretch; }
    .manual-fetch button { width: 100%; }
    .job-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-warning { align-items: flex-start; flex-direction: column; }
}

.search-console-page-table th:first-child,.search-console-page-table td:first-child { min-width: 18rem; text-align: left; }
.search-console-page-table td strong,.search-console-page-table td small { display: block; overflow-wrap: anywhere; }
.search-console-page-table td small { color: #64748b; font-size: .78rem; }

@media (min-width: 36.01rem) and (max-width: 70rem) {
    .filter-panel,.filter-panel-wide { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .analytics-site-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .job-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .dashboard-meta { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

/* Operations health dashboard */
.health-page-heading { align-items: flex-end; }
.health-updated { margin: 0; color: #68768b; font-size: .82rem; white-space: nowrap; }
.health-overall { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; border: 1px solid #dbe2ec; border-left-width: .4rem; border-radius: .9rem; padding: 1.15rem 1.25rem; background: #fff; }
.health-overall h2 { margin-bottom: .25rem; font-size: 1.55rem; }
.health-overall p:last-child { margin-bottom: 0; color: #526078; }
.health-symbol { display: grid; flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 50%; font-size: 1.25rem; font-weight: 800; background: #eef2f7; }
.health-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; margin-bottom: 1rem; }
.health-summary-card,.health-section { border: 1px solid #dbe2ec; border-top-width: .24rem; border-radius: .85rem; padding: 1rem; background: #fff; box-shadow: 0 .35rem 1.25rem rgba(28,43,69,.04); }
.health-summary-card h2 { margin-bottom: .45rem; font-size: 1.05rem; }
.health-summary-card p { margin-bottom: 0; color: #637086; font-size: .83rem; line-height: 1.55; }
.health-card-head { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.health-section { margin-bottom: 1rem; border-top-width: 1px; padding: clamp(1rem,2.8vw,1.35rem); }
.health-two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.health-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.health-section-head h2 { margin-bottom: 0; font-size: 1.2rem; }
.health-status-chip { display: inline-flex; align-items: center; gap: .3rem; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 999px; padding: .22rem .55rem; font-size: .73rem; font-weight: 750; white-space: nowrap; }
.health-normal { border-color: #74c69d; color: #176236; background-color: #f0fbf4; }
.health-warning { border-color: #e9b949; color: #76520a; background-color: #fff9e9; }
.health-error { border-color: #df8b8b; color: #8a2020; background-color: #fff4f4; }
.health-audit { border-color: #7aa2e3; color: #234f98; background-color: #f1f6ff; }
.health-hold { border-color: #a99ac5; color: #59457e; background-color: #f7f3fc; }
.health-unknown { border-color: #aab3c1; color: #526078; background-color: #f6f8fa; }
.health-summary-card.health-normal,.health-summary-card.health-warning,.health-summary-card.health-error,.health-summary-card.health-audit,.health-summary-card.health-hold,.health-summary-card.health-unknown { color: #172033; }
.health-alert-list { display: grid; gap: .65rem; }
.health-alert-item { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .8rem; border-left: .3rem solid currentColor; border-radius: .65rem; padding: .8rem; }
.health-alert-item strong { color: #172033; }
.health-alert-item p { margin: .25rem 0 0; color: #536177; font-size: .82rem; }
.health-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 0; }
.health-facts div { min-width: 0; border-radius: .58rem; padding: .7rem; background: #f5f8fc; }
.health-facts dt { color: #68768b; font-size: .74rem; }
.health-facts dd { margin: .3rem 0 0; overflow-wrap: anywhere; font-size: .88rem; font-weight: 700; }
.health-actions { margin: .9rem 0 0; text-align: right; }
.health-actions a { display: inline-block; border-radius: .5rem; padding: .55rem .7rem; color: #2851a3; background: #eef4ff; font-weight: 700; text-decoration: none; }
.health-truncate { overflow: hidden !important; text-overflow: ellipsis; white-space: nowrap; }
.health-table td { vertical-align: middle; }
.health-table small { color: #68768b; }
.health-check-list { display: grid; gap: .55rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.health-check-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; border-bottom: 1px solid #e8edf4; padding: .55rem 0; }
.health-check-list strong { font-size: .8rem; }
.health-check-icon { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; font-size: .74rem; font-weight: 800; }
.health-check-icon.is-pass { color: #176236; background: #e2f6e9; }
.health-check-icon.is-fail { color: #8a2020; background: #fde8e8; }
.health-check-icon.is-pending { color: #59457e; background: #eee8f7; }

/* Analytics customer report actions */
.dashboard-report-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.dashboard-report-actions .button-link { min-height: 2.5rem; margin: 0; }

/* Customer-facing Analytics dashboard */
.customer-kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.customer-kpi-grid .kpi-card { min-height: 9.5rem; border-top: .25rem solid #7aa2e3; }
.customer-kpi-grid .kpi-main { border-top-color: #2851a3; }
.customer-kpi-grid .trend-up::before { content: '↑ '; }.customer-kpi-grid .trend-down::before { content: '↓ '; }.customer-kpi-grid .trend-flat::before { content: '→ '; }
.trend-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .8rem; }
.trend-tab { border: 1px solid #b8c3d4; padding: .5rem .8rem; color: #33415a; background: #fff; }
.trend-tab.is-active { border-color: #2851a3; color: #fff; background: #2851a3; }
.trend-line { display: none; }.trend-line.is-visible { display: block; }
.metric-bars { display: grid; gap: .75rem; }
.metric-bars > div { display: grid; grid-template-columns: minmax(7rem,1fr) auto; gap: .3rem .75rem; align-items: center; }
.metric-bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.metric-bars strong { color: #1f3f85; font-variant-numeric: tabular-nums; }
.metric-bars progress { grid-column: 1 / -1; width: 100%; height: .7rem; accent-color: var(--metric-bar-color, var(--analytics-green)); }
.metric-bars progress::-webkit-progress-bar { background: #e7edf6; }.metric-bars progress::-webkit-progress-value { background: var(--metric-bar-color, var(--analytics-green)); }.metric-bars progress::-moz-progress-bar { background: var(--metric-bar-color, var(--analytics-green)); }
.social-bars > div:nth-child(1) { --metric-bar-color: var(--analytics-purple); }.social-bars > div:nth-child(2) { --metric-bar-color: var(--analytics-cyan); }.social-bars > div:nth-child(3) { --metric-bar-color: var(--analytics-rose); }.social-bars > div:nth-child(4) { --metric-bar-color: var(--analytics-orange); }.social-bars > div:nth-child(5) { --metric-bar-color: var(--analytics-indigo); }.social-bars > div:nth-child(n+6) { --metric-bar-color: var(--analytics-slate); }
.content-bars > div:nth-child(1) { --metric-bar-color: var(--analytics-blue); }.content-bars > div:nth-child(2) { --metric-bar-color: var(--analytics-green); }.content-bars > div:nth-child(3) { --metric-bar-color: var(--analytics-purple); }.content-bars > div:nth-child(4) { --metric-bar-color: var(--analytics-orange); }.content-bars > div:nth-child(5) { --metric-bar-color: var(--analytics-cyan); }.content-bars > div:nth-child(6) { --metric-bar-color: var(--analytics-rose); }.content-bars > div:nth-child(7) { --metric-bar-color: var(--analytics-yellow); }.content-bars > div:nth-child(8) { --metric-bar-color: var(--analytics-indigo); }.content-bars > div:nth-child(n+9) { --metric-bar-color: var(--analytics-slate); }
.metric-rank { display: inline-grid; width: 1.3rem; height: 1.3rem; margin-right: .35rem; place-items: center; border-radius: 50%; color: #fff; background: var(--metric-bar-color, var(--analytics-slate)); font-size: .72rem; font-style: normal; font-variant-numeric: tabular-nums; }
.social-summary { margin: 0 0 1rem; color: #536079; }.social-summary strong { color: var(--analytics-purple); }
.content-bars { margin-bottom: 1rem; }.content-bars span { max-width: 45rem; }
.visitor-type-summary { display: flex; align-items: center; gap: 1.5rem; min-height: 11rem; }
.visitor-ring { display: grid; flex: 0 0 9.5rem; width: 9.5rem; height: 9.5rem; place-items: center; border-radius: 50%; background: conic-gradient(var(--analytics-blue) 0 var(--new-share), var(--analytics-green) var(--new-share) 100%); }
.visitor-ring::before { content: ''; grid-area: 1 / 1; width: 6.6rem; height: 6.6rem; border-radius: 50%; background: #fff; }.visitor-ring span { z-index: 1; grid-area: 1 / 1; text-align: center; color: #536079; font-size: .74rem; font-weight: 700; line-height: 1.35; }.visitor-ring strong { color: #172033; font-size: 1.15rem; }
.visitor-type-legend { display: grid; flex: 1; gap: .65rem; }.visitor-type-legend > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .2rem .55rem; align-items: center; border-bottom: 1px solid #e6ebf2; padding: .45rem 0; }.visitor-type-legend i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--analytics-blue); }.visitor-type-legend i.visitor-returning { background: var(--analytics-green); }.visitor-type-legend span { font-weight: 750; }.visitor-type-legend strong { color: #1f3f85; }.visitor-type-legend small { grid-column: 2 / 4; color: #64748b; }
.glossary-help { position: relative; display: inline-flex; align-items: center; vertical-align: .08em; }
.glossary-trigger { display: inline-block; width: 1rem; height: 1rem; margin-left: .2rem; border: 1px solid #2851a3; border-radius: 50%; padding: 0; color: #2851a3; background: #fff; font: 700 .65rem/0.9rem sans-serif; text-align: center; vertical-align: middle; cursor: help; }
.glossary-trigger:hover,.glossary-trigger:focus-visible { outline: 2px solid #bfd2f7; outline-offset: 2px; color: #1f4388; background: #eef4ff; }
.glossary-popover { display: none; position: absolute; z-index: 80; top: calc(100% + .5rem); left: 50%; width: min(20rem,calc(100vw - 2rem)); transform: translateX(-50%); border: 1px solid #bdc9da; border-radius: .65rem; padding: .75rem .85rem; color: #24334d; background: #fff; box-shadow: 0 .7rem 2rem rgba(28,43,69,.18); font-size: .82rem; font-weight: 500; line-height: 1.65; text-align: left; }
.glossary-help.is-open .glossary-popover { display: block; }
.glossary-popover.is-positioned { position: fixed; transform: none; }

@media (max-width: 70rem) {
    .health-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .health-two-column { grid-template-columns: 1fr; }
    .customer-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 36rem) {
    .health-page-heading { align-items: flex-start; }
    .health-updated { white-space: normal; }
    .health-overall { align-items: flex-start; }
    .health-summary-grid { grid-template-columns: 1fr; }
    .health-section-head { align-items: flex-start; flex-direction: column; }
    .health-facts { grid-template-columns: 1fr 1fr; }
    .health-table,.health-table tbody,.health-table tr,.health-table td { display: block; width: 100%; }
    .health-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .health-table tr { margin-bottom: .8rem; border: 1px solid #dbe2ec; border-radius: .7rem; padding: .35rem .75rem; background: #fff; }
    .health-table td { display: grid; grid-template-columns: minmax(7rem,.42fr) minmax(0,1fr); gap: .6rem; border-bottom: 1px solid #edf1f6; padding: .62rem 0; text-align: left; }
    .health-table td:last-child { border-bottom: 0; }
    .health-table td::before { content: attr(data-label); color: #68768b; font-size: .74rem; font-weight: 700; }
    .health-truncate { max-width: 13rem; }
    .dashboard-report-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .dashboard-report-actions .button-link { justify-content: center; text-align: center; }
    .customer-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .customer-kpi-grid .kpi-card { min-height: 8.5rem; }
    .metric-bars > div { grid-template-columns: minmax(0,1fr) auto; }
    .content-bars span { max-width: 14rem; }
    .visitor-type-summary { align-items: flex-start; gap: 1rem; }.visitor-ring { flex-basis: 7.5rem; width: 7.5rem; height: 7.5rem; }.visitor-ring::before { width: 5.2rem; height: 5.2rem; }.visitor-type-legend { font-size: .9rem; }
    .glossary-trigger { width: 1rem; height: 1rem; }
}

@media print { .glossary-help { display: none !important; } }
.search-console-latest { margin: 0 0 .35rem; }
.search-console-note { margin-top: .75rem; }
.search-console-table th:first-child,.search-console-table td:first-child { min-width: 16rem; text-align: left; }
.search-console-table th:not(:first-child),.search-console-table td:not(:first-child) { text-align: right; white-space: nowrap; }

/* Internal SEO analysis: web dashboard only; never included in report/PDF models. */
.seo-analysis-section { border-top: .25rem solid var(--analytics-indigo); }
.seo-analysis-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.seo-analysis-heading > div { min-width: 0; }
.seo-internal-badge { display: inline-flex; margin-left: .45rem; border: 1px solid #8b7bb4; border-radius: 999px; padding: .16rem .48rem; color: #59457e; background: #f3effa; font-size: .7rem; font-weight: 800; letter-spacing: .02em; vertical-align: .08rem; }
.seo-latest-date { flex: 0 0 auto; margin: 0; color: #536177; font-size: .8rem; white-space: nowrap; }
.seo-latest-date strong { color: #26354f; }
.seo-print-note,.seo-comparison-note { margin: .45rem 0 0; color: #64748b; font-size: .8rem; }
.seo-print-note::before { content: 'ⓘ '; font-weight: 800; }
.seo-analysis-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; margin-top: 1rem; }
.seo-analysis-card { min-width: 0; border: 1px solid #dbe2ec; border-radius: .75rem; background: #fff; overflow: hidden; }
.seo-analysis-card[open] { grid-column: 1 / -1; box-shadow: 0 .45rem 1.4rem rgba(28,43,69,.07); }
.seo-analysis-card summary { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 4.2rem; padding: .8rem .9rem; cursor: pointer; list-style: none; color: #293852; background: #f8faff; font-size: .86rem; font-weight: 750; }
.seo-analysis-card summary::-webkit-details-marker { display: none; }
.seo-analysis-card summary::before { content: '＋'; flex: 0 0 auto; color: var(--analytics-indigo); font-size: 1rem; }
.seo-analysis-card[open] summary::before { content: '−'; }
.seo-analysis-card summary span { flex: 1; }
.seo-analysis-card summary strong { flex: 0 0 auto; border-radius: 999px; padding: .18rem .48rem; color: #314f8d; background: #eaf0fc; font-size: .72rem; white-space: nowrap; }
.seo-analysis-card summary:focus-visible { outline: 3px solid #a9c4f5; outline-offset: -3px; }
.seo-analysis-detail { border-top: 1px solid #e4e9f1; padding: 1rem; }
.seo-analysis-detail > p:first-child { margin-top: 0; color: #5c687b; font-size: .83rem; }
.seo-analysis-detail > p:last-child { margin-bottom: 0; }
.seo-analysis-table th:first-child,.seo-analysis-table td:first-child { min-width: 16rem; text-align: left; }
.seo-analysis-table th:not(:first-child),.seo-analysis-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.seo-analysis-table td:first-child strong,.seo-analysis-table td:first-child small { display: block; overflow-wrap: anywhere; }
.seo-analysis-table td:first-child small { color: #64748b; font-size: .76rem; }
.seo-analysis-table th small { color: #758197; font-size: .68rem; font-weight: 600; }
.seo-comparison-table th:last-child,.seo-comparison-table td:last-child { min-width: 11rem; text-align: left; white-space: normal; }
.seo-change-reason { color: #304f89; font-size: .78rem; font-weight: 700; }

@media (max-width: 70rem) {
    .seo-analysis-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 36rem) {
    .seo-analysis-heading { flex-direction: column; }
    .seo-latest-date { white-space: normal; }
    .seo-analysis-grid { grid-template-columns: 1fr; }
    .seo-analysis-card[open] { grid-column: auto; }
    .seo-analysis-card summary { min-height: 3.7rem; }
    .seo-analysis-detail { padding: .8rem; }
}

@media print { .seo-analysis-section { display: none !important; } }
