/* Tutor component grammar adapted to the dashboard's existing data layouts.
   Navy = structure, teal = interaction, green = confirmed success, not prediction. */
body { font-family: var(--font-ui); font-size: 16px; }
::selection { color: white; background: var(--teal-deep); }
a { color: var(--teal-deep); }
a:hover { color: #045c68; }
button, input, select, textarea { font-family: inherit; }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; box-shadow: 0 0 0 2px white; }
.topbar :focus-visible { outline-color: #76cbd3; box-shadow: 0 0 0 2px var(--navy-950); }
button:disabled { cursor: not-allowed; opacity: .65; }
.skip-link { transform: translateY(calc(-100% - 16px)); }
.skip-link:focus { transform: translateY(0); }
.topbar { min-height: 76px; grid-template-columns: 214px minmax(350px,1fr) minmax(150px,220px) auto; gap: 20px; padding-inline: clamp(20px,3vw,48px); border-bottom-color: #244156; }
.topbar-status { display: none; }
.brand-lockup { width: fit-content; min-height: 56px; display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand-lockup img { width: 116px; height: 52px; object-fit: contain; }
.brand-lockup span { padding-left: 12px; border-left: 1px solid #466071; color: #b9d2da; font-size: 16px; font-weight: 600; }
.main-nav { gap: 6px; }
.main-nav a { min-height: 76px; padding-inline: 16px; font-size: 15px; font-weight: 600; border-bottom-width: 3px; white-space: nowrap; transition: color .2s, background .2s, border-color .2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: white; background: #0b293e; border-bottom-color: var(--teal); }
.main-nav a.admin-panel-link { color: #b8ccd4; background: transparent; border-bottom-color: transparent; font-weight: 600; }
.main-nav a.admin-panel-link:hover { color: white; background: #0b293e; border-bottom-color: var(--teal); }
.top-search button { color: #76cbd3; }
.user-menu summary { max-width: 210px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; }
.user-menu summary > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.user-menu[open] > div { top: calc(100% + 8px); border-radius: 12px; }
.user-menu a, .user-menu button { min-height: 44px; border-radius: 8px; }
.user-menu form { margin: 0; }
.signal-ticker { min-height: 60px; grid-template-columns: 132px repeat(5,minmax(200px,1fr)); }
.signal-ticker > strong { color: #b9d2da; text-transform: none; letter-spacing: normal; font-size: 14px; padding: 16px 20px; }
.signal-ticker a { font-size: 13px; border-left-color: #355268; }
.signal-ticker a span { color: #76cbd3; }
.dashboard-grid, .analytics-layout, .dashboard-lower-grid, .source-table-wrap, .runs-ledger {
  width: min(var(--content),calc(100% - 56px)); border: 1px solid var(--rule); border-radius: var(--radius-sheet); box-shadow: var(--shadow-sheet);
}
.dashboard-grid { margin-top: 28px; grid-template-columns: 250px minmax(400px,1fr) 350px; }
.filter-ledger { padding: 22px 18px; top: 76px; }
.filter-heading h2, .analysis-rail h2 { font-size: 21px; }
.filter-heading a, .analysis-rail header a { font-size: 14px; min-height: 28px; display: inline-flex; align-items: center; }
.filter-ledger legend, .search-label { font-size: 14px; text-transform: none; letter-spacing: normal; }
.filter-option { min-height: 44px; padding: 7px 8px; font-size: 14px; grid-template-columns: 17px 28px minmax(0,1fr) auto; }
.filter-option:has(input:checked) { box-shadow: none; border-color: var(--teal-deep); }
.filter-option input { accent-color: var(--teal-deep); }
.filter-option small { font-size: 12px; }
.country-code { border-radius: 6px; border-color: var(--rule-strong); background: var(--mist); }
.search-control input, .date-grid select { min-height: 44px; background: #fbfdfd; font-size: 14px; }
.search-control svg { top: 13px; }
.date-grid label, .filter-scope-note { font-size: 13px; }
.archive-range { color: var(--teal-deep); font-size: 11px; }
.primary-action { min-height: 46px; border-color: var(--teal-deep); background: var(--teal-deep); border-radius: 10px; font-size: 16px; transition: background .2s, transform .2s; }
.primary-action:hover { background: #045c68; border-color: #045c68; color: white; transform: translateY(-1px); }
.primary-action:active { transform: translateY(0); }
.export-actions a { min-height: 44px; font-size: 14px; }
.news-ledger { padding: 24px; }
.section-header { gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-header h1 { font-size: 32px; line-height: 1.1; }
.section-header h2 { font-size: 24px; }
.section-header p { font-size: 14px; line-height: 1.5; }
.run-state, .source-state { border-radius: 6px; font-size: 12px; }
.news-entry { grid-template-columns: 72px minmax(0,1fr); padding: 24px 0; gap: 12px 18px; }
.news-meta { font-size: 12px; }
.news-copy h2 { font-size: 21px; line-height: 1.25; }
.news-copy > p { font-family: var(--font-ui); font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.topic-row span { padding: 5px 9px; font-size: 12px; }
.source-line { font-size: 13px !important; }
.confidence { grid-column: 2; display: flex; gap: 10px; align-items: center; text-align: left; font-size: 12px; }
.confidence small { display: inline; font-size: 12px; margin-right: 5px; }
.confidence i { margin: 0; }
.analysis-rail { border-left: 1px solid var(--rule); border-radius: 0 14px 14px 0; padding: 24px; background: #fbfdfd; }
.forecast-scope { padding: 12px; border-left: 0; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.forecast-scope strong { text-transform: none; letter-spacing: normal; }
.evidence-base h3, .probability-module h3, .mini-trend h3, .indicator-strip h3 { font-size: 15px; }
.evidence-base dt { font-size: 12px; }
.evidence-base dd { color: var(--teal-deep); font-size: 22px; }
.probability-module > div { grid-template-columns: 80px 1fr 32px; font-size: 13px; margin-block: 10px; }
.probability-module strong, .scenario-head strong { color: var(--teal-deep); }
.scenario { padding-block: 22px; }
.scenario:first-of-type { border-left: 0; padding-left: 0; }
.scenario:first-of-type::before { content: none; }
.scenario h3 { font-size: 18px; }
.scenario h3 span { color: var(--teal-deep); }
.scenario p, .analysis-empty p { font-size: 15px; line-height: 1.55; }
.scenario > a { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; }
.scenario small { font-size: 12px; }
.scenario-positive .scenario-scale i { background: var(--teal); }
.indicator-strip h3 { text-transform: none; letter-spacing: normal; }
.indicator-strip span, .indicator-strip small { font-size: 12px; }
.indicator-strip strong { font-size: 15px; }
.indicator-strip > div { grid-template-columns: 1fr; }
.dashboard-lower-grid { margin-block: 24px 48px; border-top: 1px solid var(--rule); }
.chart-section { border-radius: 14px 0 0 14px; }
.dashboard-source-quality table, .chart-html-legend { font-size: 13px; }
.chart-data-table { font-size: 14px; }
.chart-data-table summary { color: var(--teal-deep); }
.page-heading { width: min(var(--content),calc(100% - 56px)); margin-block: 28px 24px; border-radius: 18px; padding: 38px 40px; min-height: 200px; background: var(--navy-900); }
.page-heading h1 { font-size: 44px; max-width: 24ch; letter-spacing: -.025em; line-height: 1.05; }
.page-heading p { font-size: 16px; }
.method-badge { border-radius: 12px; background: var(--navy-800); border: 0; gap: 4px; }
.method-badge strong { color: #76cbd3; }
.method-badge span, .method-badge small { font-size: 13px; }
.analytics-layout { margin-bottom: 48px; }
.chart-inline { border-radius: 0 14px 0 0; }
.scenario-ledger { padding: 28px; }
.scenario-row { grid-template-columns: 110px minmax(0,1fr) 200px; padding-block: 12px; }
.scenario-body h3 { font-size: 24px; line-height: 1.2; }
.scenario-body > p, .scenario-body p, .forecast-explanation, .forecast-explanation p { font-family: var(--font-ui); font-size: 16px; line-height: 1.65; }
.forecast-explanation h4 { font-size: 19px; }
.forecast-explanation h5 { font-size: 16px; }
.scenario-type strong { color: var(--teal-deep); }
.scenario-type span { font-size: 13px; text-transform: none; }
.evidence-list, .scenario-body details { font-size: 14px; line-height: 1.5; }
.evidence-list a { padding-block: 6px; overflow-wrap: anywhere; }
.evidence-list > span:first-child { text-transform: none; letter-spacing: normal; }
.source-table-wrap { padding: 24px; }
.source-table-wrap h2 { margin: 24px 0 16px; font-size: 24px; }
.source-table-wrap h2:first-child { margin-top: 0; }
.source-note td { color: var(--ink-soft); background: var(--mist); }
.source-note summary { cursor: pointer; min-height: 44px; padding: 10px 0; overflow-wrap: anywhere; }
.source-note p { max-width: 72ch; margin: 8px 0; overflow-wrap: anywhere; }
.source-table .source-note td { display: table-cell; }
.source-table th { background: var(--mist); color: var(--ink-muted); font-size: 13px; text-transform: none; letter-spacing: normal; border-bottom: 1px solid var(--rule-strong); }
.source-table td { font-size: 15px; line-height: 1.45; }
.runs-ledger { margin-block: 24px 48px; }
.run-row { font-size: 14px; }
.detail-page { width: min(1180px,calc(100% - 56px)); margin-block: 28px 48px; padding: 36px 40px; border-radius: 14px; background: white; box-shadow: var(--shadow-sheet); }
.detail-page h1 { max-width: 28ch; font-size: 44px; }
.detail-meta, .back-link { font-size: 15px; }
.lead-summary, .source-text p { font-family: var(--font-ui); font-size: 18px; }
.evidence-card { border-radius: 14px; }
.evidence-card dt, .evidence-card dd, .ai-note { font-size: 13px; }
.empty-state, .chart-empty { border-radius: 12px; border-style: solid; }
.pagination a { min-width: 44px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; }
.pagination { align-items: center; font-size: 15px; }

/* Same split-screen composition as Tutor, with Dashboard-specific product copy. */
.login-page { background: white; }
.login-shell { min-height: 100dvh; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); }
.login-brand { min-height: 100dvh; padding: clamp(36px,5vw,76px); display: grid; grid-template-rows: auto minmax(230px,1fr) auto; }
.login-logo { display: flex; align-items: center; gap: 15px; width: fit-content; }
.login-logo img { width: 178px; height: 82px; object-fit: contain; }
.login-logo span { padding-left: 15px; border-left: 1px solid #466071; color: #bdd4dc; font-size: 18px; font-weight: 600; }
.login-statement { padding: clamp(54px,8vh,100px) 0 40px; align-self: center; }
.login-statement p { max-width: 11ch; margin: 0; color: white; font-weight: 700; font-size: clamp(46px,5.1vw,76px); line-height: .98; letter-spacing: -.035em; }
.login-statement > span { display: block; max-width: 42ch; margin-top: 22px; color: #a9c5cf; font-size: 16px; line-height: 1.55; }
.login-journey { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); list-style: none; border-top: 1px solid #304b60; }
.login-journey li { min-width: 0; padding: 22px 18px 0 0; }
.login-journey li + li { padding-left: 18px; border-left: 1px solid #243d53; }
.login-journey span, .login-journey strong, .login-journey small { display: block; }
.login-journey span { color: #76cbd3; font-size: 12px; font-weight: 700; }
.login-journey strong { margin-top: 10px; font-size: 16px; }
.login-journey small { margin-top: 5px; color: #a9c5cf; font-size: 13px; line-height: 1.45; }
.login-form-panel { font-family: var(--font-ui); min-height: 100dvh; padding: clamp(38px,7vw,110px); }
.login-form-wrap { width: min(470px,100%); }
.login-form-wrap h1 { margin-bottom: 14px; font-size: clamp(42px,4vw,58px); line-height: 1; }
.login-form-wrap > p { margin: 0 0 34px; color: var(--ink-muted); font-size: 16px; line-height: 1.65; }
.login-form { gap: 10px; margin-top: 0; }
.login-form label { margin-top: 8px; }
.login-form input { min-height: 56px; background: #fbfdfd; border-color: var(--rule-strong); border-radius: 10px; }
.login-form input:hover { border-color: #7fa4af; }
.login-form input:focus { border-color: var(--teal-deep); }
.login-form .primary-action { min-height: 56px; margin-top: 10px; }
.login-form-wrap .login-help { margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; }
.form-error { border-radius: 10px; margin-bottom: 16px; }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 210px 1fr auto; gap: 12px; }
  .top-search { display: none; }
  .dashboard-grid { grid-template-columns: 240px minmax(0,1fr); }
  .analysis-rail { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); border-radius: 0 0 14px 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
  .analysis-rail > header, .analysis-rail > .forecast-scope, .analysis-rail > .indicator-strip { grid-column: 1 / -1; }
  .scenario { border: 0; border-top: 1px solid var(--rule); padding: 18px 0; }
  .scenario-row { grid-template-columns: 100px minmax(0,1fr); }
  .scenario-row > .evidence-list { grid-column: 2; border-left: 0; border-top: 1px solid var(--rule); }
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .chart-section { border-right: 0; border-radius: 14px 14px 0 0; }
}
@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; }
  .main-nav a { min-height: 48px; }
  .user-menu { grid-column: 2; grid-row: 1; }
  .filter-ledger { top: 116px; }
  .login-brand { padding: 34px; }
  .login-logo img { width: 142px; }
  .login-statement p { font-size: 50px; }
  .login-journey { grid-template-columns: 1fr; }
  .login-journey li { padding: 12px 0; display: grid; grid-template-columns: 32px 1fr; column-gap: 8px; }
  .login-journey li + li { padding-left: 0; border-left: 0; border-top: 1px solid #243d53; }
  .login-journey span { grid-row: 1 / 3; padding-top: 3px; }
  .login-journey strong { margin: 0; }
  .login-journey small { margin-top: 2px; }
}
@media (max-width: 820px) {
  .topbar { position: static; padding: 8px 20px 0; gap: 0 12px; }
  .main-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; overflow: visible; gap: 0; }
  .main-nav a { padding-inline: 6px; font-size: 14px; }
  .brand-lockup { min-height: 56px; gap: 8px; }
  .brand-lockup img { width: 92px; height: 44px; }
  .brand-lockup span { padding-left: 8px; font-size: 14px; }
  .user-menu summary { max-width: 170px; font-size: 12px; }
  .signal-ticker { display: none; }
  .dashboard-grid, .analytics-layout, .dashboard-lower-grid, .source-table-wrap, .runs-ledger, .page-heading { width: calc(100% - 32px); }
  .dashboard-grid, .analytics-layout { display: block; }
  .dashboard-grid { margin-top: 16px; }
  .dashboard-grid > aside:first-child, .analytics-layout > aside { border-right: 0; }
  .filter-ledger { position: static; }
  .filter-disclosure > summary { border-radius: 14px 14px 0 0; }
  .filter-disclosure:not([open]) > summary { border-radius: 14px; }
  .analysis-rail { display: block; }
  .page-heading { margin-block: 20px; padding: 28px; }
  .page-heading h1 { font-size: 36px; }
  .page-heading p { font-size: 15px; }
  .source-table-wrap { padding: 16px; }
  .source-table tr { border-radius: 10px; }
  .source-table td { font-size: 14px; }
  .source-table .source-note { border: 0; margin-top: -12px; }
  .source-table .source-note td { display: block; }
  .source-table .source-note td::before { content: none; }
  .source-table td::before { font-size: 12px; text-transform: none; letter-spacing: normal; }
  .source-state { white-space: normal; width: fit-content; }
  .scenario-row > .evidence-list { grid-column: 1 / -1; }
  #news-ledger, #analysis-summary, #activity-chart, .scenario-row[id] { scroll-margin-top: 24px; }
  .detail-page { width: calc(100% - 32px); padding: 28px; }
  .detail-page h1 { font-size: 36px; }
  .login-shell { display: block; }
  .login-brand { min-height: auto; padding: 24px 22px 30px; display: block; }
  .login-logo img { width: 128px; height: 58px; }
  .login-logo span { font-size: 15px; }
  .login-statement { padding: 28px 0 0; }
  .login-statement p { max-width: 16ch; font-size: 38px; line-height: 1; }
  .login-statement > span { margin-top: 14px; font-size: 14px; }
  .login-journey { display: none; }
  .login-form-panel { min-height: auto; padding: 38px 22px 48px; place-items: start center; }
  .login-form-wrap h1 { font-size: 40px; }
}
@media (max-width: 560px) {
  .topbar { padding-inline: 14px; }
  .user-menu summary { max-width: 135px; }
  .main-nav a { white-space: normal; text-align: center; }
  .news-ledger, .analysis-rail, .chart-section, .scenario-ledger, .dashboard-source-quality { padding: 20px; }
  .news-entry { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .news-meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .confidence { grid-column: 1; }
  .news-copy h2 { font-size: 22px; }
  .section-header h1 { font-size: 30px; }
  .page-heading, .detail-page { padding: 24px; }
  .detail-meta { flex-wrap: wrap; }
  .scenario-row { display: block; }
  .scenario-type { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
  .scenario-type strong { margin: 0; }
  .scenario-body, .evidence-list { padding: 20px 0; }
  .run-row { overflow-wrap: anywhere; }
  .filter-heading a { min-height: 44px; }
  .topic-row span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .primary-action:hover { transform: none; }
}
