:root {
  --ink: #111d3e;
  --muted: #64718e;
  --blue: #0758ff;
  --line: #dae2ef;
  --wash: #f7f9fd;
  --good: #00814b;
  --bad: #cf2635;
  --background: #ffffff;
  --section-radius: 6px;
  --card-radius: 5px;
  --shell-width: 1280px;
  --shell-padding: 32px;
  --shell-scroll-offset: 105px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--background);
  scroll-padding-top: var(--shell-scroll-offset);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, input:not([type=hidden]), select, textarea { border: 1px solid var(--line); border-radius: var(--card-radius); }
button { color: var(--ink); background: var(--background); }
.shell-frame { width: 100%; max-width: var(--shell-width); margin-inline: auto; padding-inline: var(--shell-padding); }
.shell-content { min-height: 55vh; padding-block: 32px 48px; overflow-wrap: anywhere; }
.shell-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: var(--background); }
.shell-header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 28px; min-height: 88px; }
.shell-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.shell-brand-mark { flex: none; width: 32px; height: 36px; color: var(--blue); }
.shell-brand-copy { display: flex; flex-direction: column; gap: 3px; }
.shell-brand-name { font-size: 20px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.shell-brand-tagline { font-size: 11px; color: var(--muted); white-space: nowrap; }
.shell-nav { display: flex; align-items: center; gap: 20px; margin: 0; }
.shell-nav a, .shell-sign-in, .shell-utilities summary, .shell-mobile-fallback summary { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0; font-size: 13px; font-weight: 650; text-decoration: none; color: var(--ink); }
.shell-nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.shell-utilities { display: flex; align-items: center; gap: 16px; }
.shell-utilities details { position: relative; }
.shell-utilities summary { cursor: pointer; list-style: none; gap: 8px; }
.shell-utilities summary::-webkit-details-marker { display: none; }
.shell-sign-in { color: var(--blue); }
.shell-utility-panel { position: absolute; top: 100%; right: 0; min-width: 200px; max-width: min(340px, 90vw); padding: 12px; border: 1px solid var(--line); border-radius: var(--section-radius); background: var(--background); box-shadow: 0 8px 24px #111d3e18; }
.shell-utility-panel a, .shell-utility-panel button, .shell-account-group a, .shell-account-group button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; font-size: 14px; text-align: left; text-decoration: none; }
.shell-utility-panel form, .shell-account-group form { margin: 0; }
.shell-utility-panel a[aria-current], .shell-account-group a[aria-current] { font-weight: 700; text-decoration: underline; }
.shell-language-form { display: grid; gap: 8px; margin: 0; }
.shell-language-form label { margin: 0; font-size: 13px; color: var(--muted); }
.shell-language-form select, .shell-language-form button { min-height: 44px; width: 100%; padding: 8px; }
.shell-header.is-compact .shell-header-inner { min-height: 58px; }
.shell-header.is-compact .shell-brand-tagline { display: none; }
.shell-header.is-compact .shell-brand-mark { width: 24px; height: 27px; }
.shell-header.is-compact .shell-brand-name { font-size: 18px; }
.shell-mobile-trigger, .shell-mobile-fallback { display: none; }
.shell-mobile-trigger { width: 44px; height: 44px; padding: 10px; border: 0; }
.shell-mobile-trigger svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.shell-drawer { position: fixed; top: 0; right: 0; bottom: auto; left: auto; width: min(340px, 90vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 24px; border: 0; color: var(--ink); background: var(--background); overflow-y: auto; overscroll-behavior: contain; }
.shell-drawer::backdrop { background: #111d3e66; }
.shell-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shell-drawer-heading h2 { font-size: 18px; margin: 0; }
.shell-drawer-heading button { flex: none; width: 44px; height: 44px; padding: 0; font-size: 28px; border: 0; }
.shell-mobile-nav { align-items: stretch; flex-direction: column; gap: 4px; margin-block: 24px; }
.shell-mobile-nav a { padding: 10px 12px; }
.shell-mobile-nav a[aria-current] { background: var(--wash); border-radius: var(--card-radius); }
.shell-account-group { border-top: 1px solid var(--line); padding-top: 16px; }
.shell-account-group h3 { font-size: 14px; color: var(--muted); }
.shell-drawer .shell-language-form { margin-top: 16px; }
html.shell-drawer-open { overflow: hidden; }
.shell-skip { position: fixed; top: -100px; left: var(--shell-padding); z-index: 50; min-height: 44px; padding: 12px; border: 1px solid var(--blue); background: var(--background); }
.shell-skip:focus { top: 8px; }
.shell-footer { border-top: 1px solid var(--line); background: var(--wash); }
.shell-footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; padding-block: 32px; }
.shell-footer-nav { margin-left: auto; }
.shell-copyright { margin: 0; font-size: 12px; color: var(--muted); }
@media (min-width: 768px) and (max-width: 1100px) {
  :root { --shell-padding: 24px; --shell-scroll-offset: 149px; }
  .shell-header-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
  .shell-header-inner > .shell-brand, .shell-utilities { min-height: 88px; }
  .shell-desktop-nav { grid-column: 1 / -1; grid-row: 2; min-height: 44px; padding-bottom: 8px; flex-wrap: wrap; }
  .shell-header.is-compact .shell-header-inner > .shell-brand, .shell-header.is-compact .shell-utilities { min-height: 58px; }
}
@media (max-width: 767px) {
  :root { --shell-padding: 16px; --shell-scroll-offset: 93px; }
  .shell-header-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 76px; column-gap: 12px; }
  .shell-brand-name { font-size: 18px; }
  .shell-brand-mark { width: 28px; height: 32px; }
  .shell-desktop-nav, .shell-utilities { display: none; }
  .shell-mobile-fallback { display: block; }
  .shell-mobile-fallback[open] { grid-column: 1 / -1; }
  .shell-enhanced .shell-mobile-fallback { display: none; }
  .shell-enhanced .shell-mobile-trigger { display: block; }
  .shell-content { padding-block: 24px 32px; }
  .shell-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 24px; }
  .shell-footer-nav { margin-left: 0; }
}

/* Existing page content: migrated separately from the shared shell. */
h1 { font-size: 2.5rem; }
form { margin: 1.5rem 0; }
label { display: block; margin: 1rem 0; }
input:not([type=hidden]), textarea { display: block; padding: .6rem; max-width: 100%; box-sizing: border-box; }
button { padding: .6rem 1rem; cursor: pointer; }
[role=alert] { color: #9b2226; }
li { margin: .5rem 0; }
nav:not(.shell-nav) { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1rem 0 2rem; }
nav:not(.shell-nav) form { margin: 0; }
.research-card { margin: 1.5rem 0; padding: 1.25rem; background: white; border: 1px solid var(--line); border-radius: var(--card-radius); }
.prose { white-space: pre-line; line-height: 1.6; }
.topic-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; }
.topic-counts dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { h1 { font-size: 2rem; } }

/* Admin presentation: keep lifecycle status, role, metadata and actions distinct. */
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px;
}
nav a[aria-current] { color: var(--ink); font-weight: 650; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.admin-section { min-width: 0; }
.admin-section h2 { margin-bottom: .75rem; }
.admin-section h3 { margin: 1.25rem 0 .5rem; }
.admin-nav { gap: .25rem; margin: 0 0 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.admin-nav a, .pagination a { display: inline-flex; align-items: center; min-height: 44px; padding: .25rem .75rem; box-sizing: border-box; color: #31475e; border-radius: var(--card-radius); }
.admin-nav a[aria-current="page"] { background: #e8edf2; text-decoration: underline; }
.admin-note { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.admin-list { display: grid; gap: 1rem; margin-top: 1rem; }
.admin-card { min-width: 0; padding: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); }
.admin-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.admin-card-title { min-width: 0; margin: 0; font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.status-badge, .role-badge { display: inline-block; max-width: 100%; box-sizing: border-box; padding: .2rem .45rem; border: 1px solid transparent; border-radius: var(--card-radius); font-size: .75rem; line-height: 1.4; }
.status-badge { font-weight: 650; }
.status-pending { color: #715019; background: #f7f0df; border-color: #e8d9b6; }
.status-approved, .status-active { color: var(--good); background: #eaf3ed; border-color: #c9ded0; }
.status-rejected, .status-disabled { color: var(--bad); background: #f6eded; border-color: #e6cece; }
.role-badge { color: var(--muted); background: var(--wash); border-color: #e2e6eb; }
.role-admin { color: #35485c; }
.role-user { background: #fff; }
.admin-meta { display: grid; gap: .6rem; margin: 1rem 0 0; font-size: .875rem; }
.admin-meta-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .25rem .75rem; }
.admin-meta dt, .admin-user-meta dt { color: var(--muted); }
.admin-meta dd, .admin-user-meta dd { min-width: 0; margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.admin-comment { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #e6eaf0; }
.admin-comment h5 { margin: 0 0 .4rem; font-size: .875rem; color: var(--muted); font-weight: 500; }
.admin-comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; line-height: 1.6; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid #e6eaf0; }
.admin-actions form, .admin-user-action form { margin: 0; }
.admin-actions p { margin: 0; }
.admin-button { min-height: 44px; max-width: 100%; padding: .5rem .8rem; border: 1px solid #bbc5d0; border-radius: var(--card-radius); background: #fff; color: #31475e; font: inherit; font-size: .875rem; line-height: 1.4; }
.admin-button:hover { background: #edf1f5; }
.admin-button-primary { color: #fff; background: #30475d; border-color: #30475d; }
.admin-button-primary:hover { background: #22374b; }
.admin-button-danger { color: var(--bad); border-color: #d9baba; }
.admin-button-danger:hover { background: #f6eded; }
.admin-user-list { margin: 1rem 0; padding: 0; list-style: none; }
.admin-user-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 4fr) auto; align-items: center; gap: .75rem; margin: 0; padding: .9rem .75rem; background: #fff; border: 1px solid var(--line); }
.admin-user-row + .admin-user-row { border-top: 0; }
.admin-user-row:first-child { border-radius: .35rem .35rem 0 0; }
.admin-user-row:last-child { border-radius: 0 0 .35rem .35rem; }
.admin-user-meta { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: .6rem; margin: 0; font-size: .8rem; }
.admin-user-meta dt { margin-bottom: .35rem; font-size: .75rem; }
.admin-user-meta > div, .admin-user-action { min-width: 0; }
.pagination { gap: .5rem; margin: 1rem 0; }
.pagination a { border: 1px solid var(--line); background: #fff; }
.admin-activation-url { min-width: 0; padding: .75rem; background: var(--wash); border: 1px solid var(--line); border-radius: var(--card-radius); overflow-wrap: anywhere; }
.admin-activation-url code { white-space: normal; }
@media (max-width: 600px) {
  .admin-card { padding: .9rem; }
  .admin-card-header { flex-direction: column; gap: .5rem; }
  .admin-meta-row { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .admin-meta { gap: .75rem; }
  .admin-user-row { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .admin-user-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .admin-user-action { border-top: 1px solid #e6eaf0; padding-top: .75rem; }
}

/* Standard Page Frame for existing Account/authentication/Telegram flows. */
.standard-page { padding-top: 44px; }
.standard-page-body { max-width: 800px; }
.standard-page-header { margin-bottom: 24px; }
.standard-page-header h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 14px; }
.standard-page-header p { margin: 0; color: var(--muted); line-height: 1.6; }
.standard-card { max-width: 560px; min-width: 0; padding: 24px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--section-radius); background: #fff; }
.standard-card h2, .standard-card legend { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0 0 16px; }
.standard-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.standard-card a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.standard-form { display: grid; gap: 12px; margin: 16px 0; }
.standard-form label { display: grid; gap: 7px; margin: 0; font-size: 14px; line-height: 1.5; }
.standard-form input:not([type=hidden]):not([type=radio]), .standard-form textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; color: var(--ink); background: #fff; }
.standard-form textarea { resize: vertical; }
.standard-form button { justify-self: start; min-height: 44px; max-width: 100%; padding: 10px 16px; background: var(--blue); border-color: var(--blue); color: #fff; font-size: 14px; line-height: 1.5; }
.standard-form button:disabled { opacity: .55; cursor: default; }
.standard-secondary button { background: var(--wash); color: var(--ink); border-color: var(--line); }
.standard-form p { margin: 0; font-size: 12px; }
.standard-feedback { max-width: 560px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--card-radius); padding: 12px 16px; font-size: 14px; line-height: 1.6; background: var(--wash); }
.standard-feedback[role=alert] { border-left-color: var(--bad); color: var(--bad); }
.standard-recovery { margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.standard-recovery summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--blue); font-size: 14px; }
.standard-recovery .standard-form { margin-bottom: 12px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 0; list-style: none; }
.recovery-codes li { margin: 0; padding: 10px 4px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--wash); }
.recovery-codes code { font-size: 12px; overflow-wrap: anywhere; }
.account-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.account-cards .standard-card { max-width: none; margin: 0; }
.language-options { margin: 0; padding: 0; min-width: 0; border: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.language-options legend { padding: 0; scroll-margin-top: var(--shell-scroll-offset); }
.language-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.language-options input { margin: 0; accent-color: var(--blue); }
.account-security-state { margin: 0; font-size: 14px; }
.account-security-state div { margin-bottom: 16px; }
.account-security-state dt { color: var(--muted); font-size: 12px; line-height: 1.5; }
.account-security-state dd { margin: 4px 0 0; line-height: 1.5; }
@media (max-width: 1100px) { .standard-page { padding-top: 32px; } }
@media (max-width: 767px) {
  .standard-page { padding-top: 28px; }
  .standard-page-header h1 { font-size: 28px; }
  .standard-card { padding: 18px; }
  .account-cards { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .standard-form button { justify-self: stretch; }
  .recovery-codes { grid-template-columns: minmax(0,1fr); }
}

/* Existing public informational pages retain their presentation. */
.public-hero { max-width: 49rem; margin: 1.75rem 0 2rem; }
.public-hero h1 { margin: .3rem 0 .8rem; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.025em; }
@media (max-width: 700px) { .public-hero { margin-top: 1rem; } }

/* Home S01 / Market S08: shared source-aware analytical components. */
.shell-content.analytical-home, .shell-content.market-shell { padding-top: 44px; }
.analytical-home .public-hero, .market-intro { max-width: 820px; margin: 0 0 40px; }
.analytical-home .public-hero h1, .market-intro h1 { margin: 0 0 16px; font-size: 42px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.public-hero > p:last-child, .market-intro > p:last-child { color: var(--muted); line-height: 1.55; }
.home-kicker { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.home-section, .market-section { min-width: 0; box-sizing: border-box; margin: 24px 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--section-radius); }
.home-section h2, .market-section h2 { margin: 0 0 16px; font-size: 27px; line-height: 1.25; }
.home-market-heading, .market-section-heading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; margin-bottom: 24px; }
.market-section-heading:not(:has(.reporting-dates)) { display: flex; justify-content: space-between; }
#market-overview { font-size: 34px; }
.home-market-kpis, .market-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-card { container-type: inline-size; min-height: 250px; box-sizing: border-box; min-width: 0; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); }
.market-card-unavailable { border-style: dashed; }
.metric-heading { min-height: 64px; display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.metric-heading > div { min-width: 0; }
.market-card-title { margin: 0; color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.35; }
.market-card-date { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.metric-source { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 12px; text-decoration: none; flex: none; }
.metric-source img { width: 28px; height: 28px; object-fit: contain; }
.metric-heading .metric-source { min-height: 44px; width: 44px; justify-content: center; margin: -8px -8px 0 0; }
.metric-source-caption { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.metric-body { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 12px; margin-top: 16px; align-items: start; }
.metric-column { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.market-card-value { min-height: 46px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; margin: 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.market-card-value strong { font-size: clamp(30px, 10.8cqw, 38px); font-weight: 750; overflow-wrap: anywhere; }
.market-card-value > span { white-space: nowrap; font-size: 16px; color: var(--muted); }
.metric-comparisons { align-self: stretch; min-width: 0; border-left: 1px solid var(--line); padding-left: 12px; }
.market-change { margin: 0 0 10px; font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.market-change strong { font-weight: 700; }
.market-change-neutral { color: #52658a; }
.market-change-adverse { color: var(--bad); }
.market-change-improving { color: var(--good); }
.metric-period { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.metric-spark { width: 100%; min-width: 0; }
.market-sparkline { display: block; width: 100%; height: 54px; }
.market-sparkline .chart-line { stroke-width: 1.5; }
.market-sparkline .chart-point { stroke-width: 1; }
.market-warning { margin-top: 8px; color: #8a4e12; font-size: 12px; }
.market-warning summary, .market-events summary { min-height: 44px; cursor: pointer; font-weight: 650; }
.market-warning p { margin: 8px 0 0; line-height: 1.55; }
.metric-heading-actions { display: flex; align-items: start; flex-shrink: 0; gap: 4px; }
.metric-heading-actions .metric-source { margin: -8px 0 0; }
.metric-method { position: relative; margin: -8px -8px 0 0; }
.metric-method summary { min-width: 44px; justify-content: center; }
.metric-method summary > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.metric-method-popover { box-sizing: border-box; position: absolute; z-index: 20; right: 0; top: 100%; width: min(360px, calc(100vw - 32px)); margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--card-radius); background: #fff; color: var(--ink); box-shadow: 0 8px 28px #172b4d26; font-size: 13px; }
.metric-method-popover[popover] { position: fixed; inset: auto; max-height: calc(100dvh - 32px); overflow-y: auto; }
.metric-method-popover a { display: inline-flex; align-items: center; min-height: 44px; }
.metric-method summary { display: flex; align-items: center; gap: 8px; }
.method-symbol { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid #d8a462; border-radius: 4px; background: #fff9ef; font-weight: 700; }
.home-method-badge { display: inline-block; font-size: 10px; color: var(--muted); }
.reporting-dates { margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.reporting-dates > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.reporting-dates dt { min-width: 0; }
.reporting-dates dt > span { display: block; color: var(--muted); font-size: 10px; }
.reporting-dates dd { margin: 0; font-size: 12px; font-weight: 650; }
.home-market-definition, .market-note, .home-inline-warning { color: var(--muted); font-size: 13px; line-height: 1.55; }
.home-inline-warning { color: #8a4e12; }
.home-market-unavailable, .market-error-state { padding: 24px; background: var(--wash); }
.home-chart-grid, .market-chart-grid, .market-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.market-chart-grid-two, .market-population-history { margin-top: 24px; }
.market-chart-card { min-width: 0; box-sizing: border-box; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); }
.market-chart-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.market-chart-heading h3 { margin: 0; font-size: 16px; font-weight: 500; }
.market-chart-heading span { font-size: 18px; font-weight: 700; }
.market-chart-wrap { width: 100%; }
.market-chart { display: block; width: 100%; height: auto; min-height: 144px; }
.chart-axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-point { fill: #fff; stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-point-warning { fill: #d89b35; stroke: #8a611d; }
.chart-marker { stroke: #b57828; stroke-width: 1; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.chart-range { color: var(--muted); margin: 0; font-size: 11px; overflow-wrap: anywhere; }
.chart-dates { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.market-chart-unit, .market-marker-key { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.market-marker-key span { display: inline-block; width: 16px; border-top: 2px dashed #b57828; }
.market-empty { color: var(--muted); font-size: 13px; }
.market-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.market-population-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card-compact .market-card-value strong { font-size: 28px; }
.metric-card-compact .market-card-value > span { font-size: 13px; }
.market-employment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.market-context-grid .market-section { margin: 0; }
.market-context-grid { margin: 24px 0; }
.market-policy-grid { display: grid; gap: 16px; }
.coverage-summary dl { margin: 0 0 16px; }
.coverage-summary dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.coverage-summary dt { color: var(--muted); }
.coverage-summary dd { margin: 0; font-weight: 700; }
.reconciliation-status { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.status-reconciled { color: var(--good); }
.status-warning { color: #8a4e12; }
.status-unavailable { color: var(--muted); }
.market-table-wrap { max-width: 100%; overflow-x: auto; margin-top: 16px; }
.market-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.market-table caption { text-align: left; padding: 8px 0; }
.market-table th, .market-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.market-method-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 5px; }
.market-method-grid h3 { margin: 0 0 8px; font-size: 16px; }
.market-method-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.market-events { margin: 16px 0; }
.market-events li { font-size: 13px; overflow-wrap: anywhere; }
.market-freshness { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market-freshness dt { color: var(--muted); font-size: 12px; }
.market-freshness dd { margin: 8px 0 0; font-size: 13px; }
.home-methodology-notes { padding: 16px 24px; border: 1px solid var(--line); border-radius: 6px; }
.home-methodology-notes summary { min-height: 44px; cursor: pointer; }
.home-methodology-notes li { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.latest-brief { border-top: 3px solid var(--ink); }
.latest-brief h3 { margin: 16px 0; font-size: 24px; line-height: 1.3; }
.home-date, .home-empty { color: var(--muted); font-size: 13px; }
.home-summary { margin: 0; white-space: pre-line; line-height: 1.55; }
.home-research-summary { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; }
.home-research-summary aside { border-left: 1px solid var(--line); padding-left: 24px; }
.home-research-summary aside h3 { margin: 0 0 12px; font-size: 16px; }
.home-research-summary ul { list-style: none; padding: 0; margin: 0; }
.home-research-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.home-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.analytical-home .key-research-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.analytical-home .key-research-item h4 { margin: 8px 0; font-size: 16px; }
@media (min-width: 768px) and (max-width: 1100px) {
  .shell-content.analytical-home, .shell-content.market-shell { padding-top: 32px; }
  .market-card, .market-chart-card { padding: 18px; }
  .home-market-kpis, .market-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-context-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 850px) {
  .home-market-heading, .market-section-heading { grid-template-columns: minmax(0, 1fr); }
  .reporting-dates > div { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 8px; }
  .reporting-dates dd { margin-left: 36px; }
}
@media (max-width: 767px) {
  .shell-content.analytical-home, .shell-content.market-shell { padding-top: 28px; }
  .analytical-home .public-hero, .market-intro { margin-bottom: 30px; }
  .analytical-home .public-hero h1, .market-intro h1 { font-size: 31px; }
  #market-overview { font-size: 29px; }
  .home-section, .market-section, .market-card, .market-chart-card { padding: 16px; }
  .home-market-kpis, .market-card-grid, .home-chart-grid, .market-chart-grid, .market-context-grid, .market-method-grid, .market-freshness, .home-research-summary, .analytical-home .key-research-list { grid-template-columns: minmax(0, 1fr); }
  .market-section-heading { flex-wrap: wrap; }
  .metric-body { min-height: 104px; }
  .home-research-summary aside { border-left: 0; padding-left: 0; }
  .coverage-summary dl div { grid-template-columns: minmax(0, 1fr); }
}

.key-research-list { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: key-research; }
.key-research-item { position: relative; margin: 0; padding: 1rem 0 1rem 2.5rem; border-top: 1px solid #e3e7ec; counter-increment: key-research; }
.key-research-item::before { content: counter(key-research, decimal-leading-zero); position: absolute; left: 0; top: 1rem; color: #708092; font-size: .75rem; font-weight: 700; }
.key-research-item h3 { margin: .2rem 0 .45rem; font-size: 1rem; line-height: 1.4; }
.key-research-item p { margin: .3rem 0; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.key-research-item .key-research-topic { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.topic-summary dl { margin: 1rem 0 0; }
.topic-summary dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: baseline; padding: .65rem 0; border-top: 1px solid #e3e7ec; }
.topic-summary dt { min-width: 0; overflow-wrap: anywhere; }
.topic-summary dd { margin: 0; padding: .15rem .45rem; color: #30475d; background: #edf1f5; border-radius: var(--card-radius); font-weight: 700; }
.research-signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.research-signal-grid article { min-width: 0; padding: 1rem; background: var(--wash); border-left: 3px solid #718397; }
.research-signal-grid h3 { margin: 0 0 .75rem; font-size: 1rem; }
.research-signal-grid ol { margin: 0; padding-left: 1.4rem; }
.research-signal-grid li { padding-left: .25rem; line-height: 1.55; overflow-wrap: anywhere; }

/* Shared Messenger S09/S10/S11, inside the accepted shell. */
.messenger-shell { padding-top: 28px; }
.messenger-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); height: min(720px, calc(100dvh - 150px)); min-height: 580px; border: 1px solid var(--line); border-radius: var(--section-radius); overflow: hidden; background: var(--wash); }
.messenger-sidebar { min-width: 0; min-height: 0; padding: 20px 14px; border-right: 1px solid var(--line); background: #fff; overflow-y: auto; }
.messenger-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 7px 16px; }
.messenger-sidebar-heading h2 { margin: 0; font-size: 18px; }
.messenger-new-action, .messenger-start { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; background: var(--blue); color: #fff; border-radius: var(--card-radius); text-decoration: none; }
.messenger-new-action { flex: none; width: 44px; font-size: 26px; }
.messenger-new-text { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: var(--card-radius); font-size: 13px; text-decoration: none; }
.messenger-chat-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.messenger-chat-list li { margin: 0; min-width: 0; }
.messenger-chat-choice { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-height: 70px; border: 1px solid transparent; border-radius: var(--card-radius); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.messenger-chat-choice strong { font-size: 13px; }
.messenger-chat-choice time { color: var(--muted); font-size: 11px; }
.messenger-chat-choice[aria-current], .messenger-new-text[aria-current] { background: #eef3ff; border-color: #d4def1; border-left: 3px solid var(--blue); }
.messenger-chat-choice[aria-current] strong, .messenger-new-text[aria-current] { text-decoration: underline; text-underline-offset: 3px; }
.messenger-list-empty { color: var(--muted); font-size: 13px; padding: 12px; }
.messenger-conversation { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f2f5fc; }
.messenger-header { padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.messenger-header .home-kicker { margin: 0 0 5px; font-size: 10px; }
.messenger-header h1 { margin: 0; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.messenger-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.messenger-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.messenger-empty h2 { margin: 0; font-size: 22px; }
.messenger-empty p { margin: 0; color: var(--muted); max-width: 44ch; line-height: 1.55; }
.messenger-history { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.messenger-history .chat-message { align-self: flex-start; max-width: 80%; width: fit-content; min-width: 0; margin: 0; padding: 12px 15px; border: 1px solid #dce4f0; border-radius: 12px 12px 12px 3px; background: #fff; }
.messenger-history .chat-message-user { align-self: flex-end; background: #e1edff; border-color: #cfe0fb; border-radius: 12px 12px 3px 12px; }
.chat-message-role { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.chat-message-content { font-size: 14px; white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.chat-attempt-error, .chat-attempt-pending { margin: 8px 0 0; color: var(--bad); font-size: 12px; line-height: 1.55; }
.chat-attempt-pending { color: var(--muted); }
.messenger-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 12px; margin: 0; padding: 14px 20px 12px; border-top: 1px solid var(--line); background: #fff; }
.messenger-input { min-width: 0; }
.messenger-input label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.messenger-composer textarea { display: block; width: 100%; min-width: 0; min-height: 60px; max-height: 150px; padding: 10px 12px; font-size: 16px; line-height: 1.5; background: var(--wash); resize: vertical; }
.messenger-composer button { min-height: 44px; padding: 8px 14px; font-size: 12px; background: var(--blue); border-color: var(--blue); color: #fff; }
.messenger-pagination { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 12px; font-size: 12px; }
.messenger-pagination a, .messenger-history-return a { display: inline-flex; align-items: center; min-height: 44px; }
.messenger-history-navigation { margin: 0; padding: 0 22px; background: #fff; }
.messenger-history-navigation:empty { display: none; }
.messenger-history-return { padding: 8px 20px; border-top: 1px solid var(--line); background: #fff; font-size: 13px; }
/* Established Telegram step-up form keeps the same security flow. */
.chat-panel { min-width: 0; margin: 1rem 0; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--section-radius); }
.chat-verify { max-width: 38rem; }
@media (max-width: 767px) {
  .messenger-shell { padding-top: 16px; }
  .messenger-layout { display: flex; flex-direction: column; height: calc(100dvh - 110px); min-height: 700px; }
  .messenger-sidebar { flex: none; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .messenger-sidebar-heading { padding: 0 0 7px; }
  .messenger-sidebar-heading h2 { font-size: 14px; }
  .messenger-new-text { display: none; }
  .messenger-chat-list { flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; padding: 3px; max-height: 90px; }
  .messenger-chat-list li { flex: 0 0 180px; }
  .messenger-chat-choice { height: 76px; padding: 8px 10px; }
  .messenger-chat-choice strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .messenger-sidebar .messenger-pagination { margin: 0; font-size: 11px; }
  .messenger-conversation { flex: 1; }
  .messenger-header { padding: 12px 14px; }
  .messenger-header h1 { font-size: 18px; }
  .messenger-thread { padding: 14px; }
  .messenger-history .chat-message { max-width: 90%; }
  .messenger-composer { padding: 12px; gap: 8px; }
  .messenger-composer button { font-size: 11px; padding: 8px 10px; }
  .messenger-history-navigation { padding: 0 14px; }
}

/* Progressive inspection of server-rendered canonical chart evidence. */
.chart-selector { display: block; margin-top: .5rem; font-size: .8rem; }
.chart-selector[hidden] { display: none; }
.chart-selector input { display: block; width: 100%; min-height: 44px; }
.chart-selector input:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }
.chart-point-selected { r: 6; stroke: #1d344d; stroke-width: 2; }
.chart-evidence { margin-top: .5rem; font-size: .8rem; }
[data-chart-selected] { display: block; font-size: .8rem; overflow-wrap: anywhere; }

/* #84: S03 archive, S04/S05 reading, combined S06/S07 methodology. */
.shell-content.research-archive, .shell-content.research-detail, .shell-content.methodology-page { padding-top: 44px; }
.research-intro { margin-bottom: 28px; }
.research-intro h1 { margin: 0 0 16px; font-size: 42px; line-height: 1.2; letter-spacing: -.025em; }
.research-intro > p { max-width: 820px; color: var(--muted); }
.research-intro .home-kicker { margin: 0 0 16px; }
.research-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 30px; padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.research-tools[hidden], .archive-review-card[hidden], .research-empty[hidden] { display: none; }
.research-tools label, .research-topic-filter legend { font-size: 13px; font-weight: 650; }
.research-tools label { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.research-tools input { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: white; }
.research-topic-filter { margin: 0; padding: 0; border: 0; min-width: 0; }
.research-topic-filter legend { padding: 0; margin-bottom: 8px; }
.research-filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.research-filter-chips button { min-height: 44px; max-width: 100%; padding: 6px 9px; font-size: 11px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; color: var(--muted); background: var(--wash); }
.research-filter-chips button[aria-pressed=true] { background: #eaf1ff; color: var(--blue); border-color: #abc7ff; }
#research-search-scope { margin: 0; font-size: 12px; color: var(--muted); align-self: center; }
#research-reset { min-height: 44px; justify-self: start; padding: 8px 12px; font-size: 13px; }
.research-count { font-size: 12px; color: var(--muted); margin: 12px 0 24px; }
.research-empty { padding: 24px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--wash); }
.archive-review-card { margin: 0 0 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.archive-review-heading { margin-bottom: 22px; }
.archive-review-heading > p, .brief-week { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.archive-review-heading h2 { margin: 0; font-size: 23px; line-height: 1.3; letter-spacing: -.025em; }
.archive-review-heading a, .archive-paper-index a { text-decoration: none; }
.archive-review-heading a:hover, .archive-paper-index a:hover { text-decoration: underline; }
.archive-review-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; align-items: start; }
.archive-review-description .prose { font-size: 15px; line-height: 1.75; margin: 0 0 24px; color: var(--muted); }
.archive-paper-index { border-left: 1px solid var(--line); padding-left: 26px; min-width: 0; }
.archive-paper-index .home-kicker { margin: 0 0 16px; }
.archive-paper-index ol { margin: 0; padding-left: 20px; }
.archive-paper-index li { margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.archive-paper-index a { color: var(--ink); font-weight: 600; }
.archive-topic-tags { list-style: none; margin: 18px 0 0; padding: 0; }
.archive-topic-tags li { font-size: 11px; padding: 6px 9px; margin: 7px 0 0; border: 1px solid var(--line); background: var(--wash); color: var(--muted); border-radius: var(--card-radius); }
.archive-pagination { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; }
.archive-pagination a { display: inline-flex; align-items: center; min-height: 44px; }
.reading-layout { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 3fr); gap: 44px; align-items: start; }
nav.reading-sidebar { display: block; margin: 0; position: sticky; top: var(--shell-scroll-offset); border-top: 2px solid var(--blue); padding-top: 16px; min-width: 0; }
.reading-sidebar .home-kicker { font-size: 12px; line-height: 1.5; margin: 0 0 12px; color: var(--blue); }
.reading-sidebar a { display: block; min-height: 44px; font-size: 13px; line-height: 1.5; color: var(--muted); padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.reading-sidebar a:hover, .reading-sidebar a:focus-visible { color: var(--blue); text-decoration: underline; }
.reading-content { width: 100%; max-width: 800px; min-width: 0; }
.reading-content p, .reading-content li { font-size: 15px; line-height: 1.75; }
.reading-content .research-card { margin: 0 0 22px; padding: 24px; }
.reading-content h2 { font-size: 23px; line-height: 1.3; margin: 0 0 16px; letter-spacing: -.025em; }
.reading-content .research-card h3 { font-size: 16px; margin: 24px 0 8px; }
.reading-content .article-metadata { color: var(--muted); font-size: 13px; }
.brief-summary { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.reading-content section[id], .reading-content article[id] { scroll-margin-top: 24px; }
.method-layout .reading-content { max-width: 680px; }
.methodology-card { padding: 12px 24px; margin-bottom: 22px; border: 1px solid var(--line); border-left: 2px solid var(--blue); border-radius: var(--card-radius); }
.methodology-card h2 { font-size: 22px; margin-bottom: 10px; }
.methodology-card p { color: var(--muted); margin: 0; }
.methodology-page .public-sources { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 24px; }
.source-heading { display: flex; align-items: center; gap: 12px; }
.source-heading img { width: 28px; height: 28px; flex: 0 0 28px; }
.methodology-page .public-sources h3 { font-size: 20px; margin: 0 0 16px; }
.methodology-page .public-sources .research-card p { color: var(--muted); font-size: 13px; }
.methodology-page .public-sources a { display: inline-block; padding-block: 10px; min-height: 44px; }
@media (max-width: 1100px) {
  .shell-content.research-archive, .shell-content.research-detail, .shell-content.methodology-page { padding-top: 32px; }
  .reading-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 767px) {
  .shell-content.research-archive, .shell-content.research-detail, .shell-content.methodology-page { padding-top: 28px; }
  .research-intro h1 { font-size: 31px; }
  .research-tools, .archive-review-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .research-tools input { font-size: 16px; }
  .archive-review-card { padding: 18px; }
  .archive-review-heading h2 { font-size: 21px; }
  .archive-review-description .prose { font-size: 14px; }
  .archive-paper-index { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .reading-layout { display: block; }
  nav.reading-sidebar { position: static; margin-bottom: 28px; }
  .reading-sidebar a { font-size: 12px; }
  .reading-content .research-card { padding: 18px; }
  .reading-content h2 { font-size: 21px; }
  .reading-content p, .reading-content li { font-size: 14px; }
  .methodology-card { padding: 12px 18px; }
}

/* Shared data-heavy Admin Standard Page Frame. */
.admin-access-page .standard-page-body { max-width: none; }
.admin-access-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.admin-access-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.admin-access-nav a[aria-current="page"] { color: var(--blue); border-bottom: 2px solid var(--blue); }
.admin-access-content > .admin-note { margin: 0 0 24px; }
.admin-access-page .admin-list { gap: 0; border: 1px solid var(--line); border-radius: var(--section-radius); overflow: hidden; }
.admin-access-page .admin-card { padding: 24px; border: 0; border-radius: 0; }
.admin-access-page .admin-card + .admin-card { border-top: 1px solid var(--line); }
.admin-access-page .admin-card-title { font-size: 18px; line-height: 1.4; }
.admin-access-page .admin-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }
.admin-access-page .admin-meta-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.admin-access-page .admin-comment h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.admin-access-page .admin-actions { gap: 12px; padding-top: 16px; margin-top: 20px; }
.admin-access-page .admin-actions form { max-width: 100%; }
.admin-access-page .admin-button { color: var(--ink); border-color: var(--line); font-size: 14px; cursor: pointer; overflow-wrap: anywhere; }
.admin-access-page .admin-button-primary { color: white; background: var(--blue); border-color: var(--blue); }
.admin-access-page .admin-button-primary:hover { background: #0649d8; }
.admin-access-page .admin-button-danger { color: var(--bad); border-color: #e6cece; border-style: dashed; }
.admin-access-page .admin-user-row { padding: 20px 24px; gap: 20px; }
.admin-access-page .admin-user-meta { font-size: 14px; }
.admin-access-page .admin-user-meta dt { font-size: 12px; }
.admin-access-page .admin-list > .admin-note, .admin-access-page .admin-user-list > .admin-note { padding: 24px; background: var(--wash); border-radius: var(--section-radius); }
.admin-access-page .admin-result-outcome { color: var(--good); font-weight: 650; }
.admin-access-page .admin-access-content > .admin-card { max-width: 800px; border: 1px solid var(--line); border-radius: var(--section-radius); }
.admin-access-page .admin-access-content > .admin-card h2 { margin: 0; font-size: 20px; }
.admin-access-page .admin-activation-url code { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .admin-access-page .admin-user-row { grid-template-columns: minmax(0, 1fr); }
  .admin-access-page .admin-user-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-access-page .admin-user-action { border-top: 1px solid var(--line); padding-top: 16px; }
}
@media (max-width: 767px) {
  .admin-access-page .admin-card, .admin-access-page .admin-user-row { padding: 18px; }
  .admin-access-page .admin-meta { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .admin-access-page .admin-user-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-access-page .admin-actions { align-items: stretch; }
  .admin-access-page .admin-card-header { flex-direction: column; }
}

/* Market Ops: existing operational reads in the shared Admin frame. */
.market-ops-nav { display:flex; flex-wrap:wrap; gap:8px 24px; margin:0 0 28px; }
.market-ops-nav a { display:inline-flex; align-items:center; min-height:44px; padding:10px 0; text-decoration:none; color:var(--muted); }
.market-ops-nav a[aria-current="page"] { color:var(--blue); text-decoration:underline; text-underline-offset:6px; font-weight:650; }
.market-ops-page section { margin-bottom:28px; }
.market-ops-page h2 { font-size:22px; line-height:1.4; margin:0 0 16px; }
.market-ops-page h3 { font-size:16px; line-height:1.5; margin:0 0 14px; }
.market-ops-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.market-ops-panel { min-width:0; padding:24px; border:1px solid var(--line); border-radius:var(--section-radius); background:var(--background); }
.market-ops-page p,.market-ops-page dd,.market-ops-page dt,.market-ops-page a,.market-ops-page time { overflow-wrap:anywhere; }
.market-ops-panel > p:last-child { margin-bottom:0; }
.market-ops-page a { display:inline-flex; align-items:center; min-height:44px; }
.market-ops-status { display:inline-block; padding:4px 8px; border:1px solid var(--line); border-radius:var(--card-radius); background:var(--wash); color:var(--ink); font-size:12px; font-weight:650; }
.market-ops-status[data-status="failed"],.market-ops-status[data-status="error"] { color:var(--bad); border-color:#e6cece; }
.market-ops-status[data-status="review_required"],.market-ops-status[data-status="warning"],.market-ops-status[data-status="success_with_warnings"] { color:#825d16; border-color:#e5d6b4; background:#fffaf0; }
.market-ops-status[data-status="success"],.market-ops-status[data-status="ok"] { color:var(--good); }
.market-ops-fields { margin:16px 0 0; }
.market-ops-fields dt,.market-ops-detail-fields dt { font-size:12px; color:var(--muted); }
.market-ops-fields dd { margin:4px 0 16px; }
.market-ops-detail-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px 32px; margin:20px 0 0; }
.market-ops-detail-fields > div { min-width:0; }
.market-ops-detail-fields dd { margin:4px 0 0; }
.market-ops-empty { color:var(--muted); }
.market-ops-attention,.market-ops-targets { list-style:none; margin:0; padding:0; }
.market-ops-attention li + li { padding-top:16px; border-top:1px solid var(--line); margin-top:16px; }
.market-ops-targets { display:grid; gap:20px; }
.market-ops-targets header { display:flex; align-items:start; justify-content:space-between; gap:24px; }
.market-ops-targets header h2 { min-width:0; font-size:18px; margin:0; }
.market-ops-targets header .market-ops-status { flex-shrink:0; }
.market-ops-targets [data-review="required"] { border-left:3px solid #b08226; }
.market-ops-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:16px; align-items:end; margin:0 0 24px; }
.market-ops-filters > div { min-width:0; }
.market-ops-page label { display:block; font-size:14px; margin-bottom:8px; }
.market-ops-page input:not([type="hidden"]),.market-ops-page select,.market-ops-page textarea { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--card-radius); color:var(--ink); background:white; font:inherit; font-size:16px; }
.market-ops-page button { min-width:44px; min-height:44px; padding:10px 18px; border:1px solid var(--blue); border-radius:var(--card-radius); color:white; background:var(--blue); font:inherit; cursor:pointer; }
.market-ops-review { max-width:800px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.market-ops-review textarea { display:block; resize:vertical; margin-bottom:12px; }
.market-ops-table-scroll { max-width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:var(--section-radius); }
.market-ops-page .market-ops-table { width:100%; min-width:1000px; margin:0; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.market-ops-table th,.market-ops-table td { padding:14px 12px; text-align:left; vertical-align:top; overflow-wrap:anywhere; border-bottom:1px solid var(--line); }
.market-ops-table th { font-weight:650; }
.market-ops-table thead { background:var(--wash); }
.market-ops-table tr:last-child td,.market-ops-table tr:last-child th { border-bottom:0; }
.market-ops-events { list-style:decimal; padding:0 0 0 24px; margin:0; }
.market-ops-events li { margin:0 0 20px; }
.market-ops-event-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.market-ops-message { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:1100px) {
 .market-ops-grid { grid-template-columns:minmax(0,1fr); }
 .market-ops-detail-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .market-ops-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .market-ops-filters button { justify-self:start; }
}
@media(max-width:767px) {
 .market-ops-panel { padding:18px; }
 .market-ops-detail-fields,.market-ops-filters { grid-template-columns:minmax(0,1fr); }
 .market-ops-targets header { flex-direction:column; gap:12px; }
 .market-ops-events { padding-left:20px; }
 .market-ops-page h2 { font-size:20px; }
}

.market-ops-table-scroll:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
/* Native macOS selects otherwise clamp height below the 44px target. */
.market-ops-page select { appearance:none; height:44px; padding-right:36px; background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position:calc(100% - 19px) 19px,calc(100% - 14px) 19px; background-size:5px 5px; background-repeat:no-repeat; }

/* Independent KPI columns: sparse history and comparison text never move the spark. */
@container (max-width: 270px) {
  .metric-body { grid-template-columns: minmax(0, 1fr); }
  .metric-comparisons { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .market-card-value strong { font-size: 30px; }
}
.market-portfolio-charts { align-items: stretch; }
.portfolio-chart-card .market-chart-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.portfolio-chart-card .market-chart-heading h3 { min-height: 44px; }
.portfolio-chart-card .market-chart-heading span { font-size: 26px; }
.portfolio-chart-card .chart-range { min-height: 32px; }
.portfolio-chart-card [data-chart-selected] { min-height: 40px; }
.portfolio-chart-card .chart-evidence summary { min-height: 44px; }
