/* Shared interaction, asynchronous and accessibility states. */
.primary>span {font-size:inherit;margin-left:0}
.primary:hover {background:#95e8ca}
.search {border-color:var(--border-control)}
.search:focus-within {outline:var(--focus-ring);outline-offset:3px;box-shadow:none}
.chart-legend label,.plan-check {min-height:var(--control-height)}
.interval-control select,.advanced-controls select {border-color:var(--border-control)}
.ownership-body,.market-calendar {padding:var(--card-padding)}
.market-calendar {margin-top:var(--space-5)}.market-calendar .signal-strip {padding:0}
#stock-metrics>.module-skeleton,#stock-metrics>.feedback {grid-column:1/-1}
.earnings-summary>.research-empty,.news-grid>.research-empty {grid-column:1/-1}
.earnings-chart .data-note {margin-top:var(--space-2)}

:where(button,a,input,select,summary) {outline-offset:4px}
:where(button,a,summary,input,select):focus-visible {outline:var(--focus-ring);outline-offset:4px}
:where(button,a,summary) {transition:background-color var(--motion-fast),color var(--motion-fast),border-color var(--motion-fast)}
:where(button,.quiet-button,.primary):active:not(:disabled) {filter:brightness(.92)}
button:disabled,select:disabled,input:disabled {opacity:1;cursor:not-allowed;color:var(--color-disabled);background:var(--surface-disabled);border-color:var(--border-subtle);box-shadow:none}
button:disabled:hover {filter:none;background:var(--surface-disabled);color:var(--color-disabled)}
button[aria-busy=true] {color:var(--text-secondary);cursor:progress}
button[aria-busy=true]::after {content:'';width:12px;height:3px;border-radius:4px;background:currentColor;animation:loading-pulse 1.6s ease-in-out infinite}
button[aria-pressed=true]:not([data-depth-mode]):not([data-period]):not(.chip) {border-color:var(--cyan);background:var(--surface-information);color:var(--cyan)}
input[aria-invalid=true],select[aria-invalid=true] {border:2px solid var(--color-error);background:var(--surface-error)}
input[readonly] {color:var(--text-secondary);background:var(--surface-disabled);border-style:dashed}
input:focus-visible,select:focus-visible {outline:var(--focus-ring);border-color:var(--cyan);outline-offset:3px}
summary:focus-visible {outline-offset:-4px;border-radius:var(--radius-control)}
.data-table-wrap:focus-visible {outline:var(--focus-ring);outline-offset:3px}
.news-card:focus-within,.watch-mobile-item:focus-within {border-color:var(--cyan)}
.news-card h3 a:hover,.news-card h3 a:focus-visible {text-decoration:underline;text-underline-offset:4px}
.workspace-nav>button[aria-selected=true] {border-bottom-width:3px;font-weight:var(--weight-strong)}
.segmented button[aria-pressed=true] {box-shadow:inset 0 -2px 0 var(--text-secondary)}
.mobile-nav button[aria-current=page] {box-shadow:inset 0 2px 0 var(--mint)}
:where(.price-line strong,.metric-cell strong,.stat-card strong,.plan-result strong,.data-table,.score-row,.brief-fact b,.earnings-reaction strong) {font-variant-numeric:tabular-nums lining-nums}
.ap-icon {width:var(--icon-size);height:var(--icon-size);stroke-width:var(--icon-stroke)}
[data-state] {--state-fg:var(--color-information);--state-bg:var(--surface-information)}
[data-state=bullish] {--state-fg:var(--color-bullish);--state-bg:var(--surface-bullish)}
[data-state=bearish] {--state-fg:var(--color-bearish);--state-bg:var(--surface-bearish)}
[data-state=neutral] {--state-fg:var(--color-neutral);--state-bg:var(--surface-neutral)}
[data-state=warning] {--state-fg:var(--color-warning);--state-bg:var(--surface-warning)}
[data-state=stale] {--state-fg:var(--color-stale);--state-bg:var(--surface-stale)}
[data-state=error] {--state-fg:var(--color-error);--state-bg:var(--surface-error)}
[data-state=success] {--state-fg:var(--color-success);--state-bg:var(--surface-success)}
[data-state=disabled] {--state-fg:var(--color-disabled);--state-bg:var(--surface-disabled)}
[data-state=loading] {--state-fg:var(--color-loading);--state-bg:var(--surface-loading)}
.state-badge {display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 8px;border-radius:var(--radius-small);color:var(--state-fg);background:var(--state-bg);font-size:var(--type-caption);font-weight:var(--weight-medium);line-height:1.5}
.state-badge .ap-icon {width:15px;height:15px}
.price-state {margin:10px 0 0}.price-state:empty {display:none}
.module-feedback {margin:var(--space-4) 0}.module-feedback:empty {display:none}
.feedback {display:flex;align-items:flex-start;gap:var(--space-3);padding:var(--space-4) var(--space-5);color:var(--state-fg);background:var(--state-bg);border:1px solid transparent;border-left:3px solid var(--state-fg);border-radius:var(--radius-control);min-width:0}
.feedback>.ap-icon {margin-top:2px;flex-shrink:0}
.feedback-copy {min-width:0;flex:1}.feedback-copy>strong {display:block;font-size:var(--type-label);line-height:1.5;font-weight:var(--weight-strong)}
.feedback-copy>p {font-size:var(--type-label);line-height:1.7;margin:5px 0 0;color:var(--text-secondary);max-width:85ch}
.feedback-action {flex-shrink:0;align-self:center;background:transparent;border-color:currentColor;color:var(--state-fg);min-height:var(--control-height)}
.feedback-action:hover {background:var(--surface-hover);color:var(--text-primary)}
#error {padding:0;border:0;background:none;margin:var(--space-5) 0}
.research-status {margin:0 0 var(--space-4)}
.research-status:not(:has(.feedback)) {color:var(--text-secondary)}
.research-empty {border:0;border-left:2px solid var(--border-control);border-radius:0;background:transparent;padding:var(--space-4) var(--space-5);box-shadow:none}
.research-empty h3 {font-size:var(--type-subheading);line-height:1.5}.research-empty p {font-size:var(--type-label);color:var(--text-secondary);max-width:75ch}
.research-empty .empty-next {margin-top:var(--space-3);color:var(--text-primary);font-size:var(--type-label)}
.module-skeleton {padding:var(--space-5);border:0;border-radius:var(--radius-card);background:var(--surface-card);min-width:0;overflow:hidden}
.module-skeleton [aria-hidden=true] {animation:loading-pulse 1.8s ease-in-out infinite}
.skeleton-line {display:block;width:100%;height:.625rem;border-radius:4px;background:#253246;margin:var(--space-3) 0}
.skeleton-line.is-short {width:32%}.skeleton-line.is-medium {width:66%}.skeleton-line.is-heading {width:58%;height:1.125rem;margin-bottom:var(--space-5)}
.skeleton-line.is-value {width:50%;height:1.75rem;margin-block:var(--space-4)}
.skeleton-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-5);margin-top:var(--space-6)}
.skeleton-row {display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:var(--space-5);padding-block:var(--space-3);border-bottom:1px solid var(--border-subtle)}
.skeleton-stories {display:grid;grid-template-columns:1fr 1fr;gap:var(--space-8)}
.skeleton-stories>div {min-width:0;padding-block:var(--space-4)}
.skeleton-plot {height:180px;border-radius:var(--radius-control);border:1px solid #263347;background:#172335;margin-top:var(--space-5)}
.skeleton-identity {display:flex;align-items:center;gap:var(--space-5);margin-bottom:var(--space-8)}
.skeleton-identity>div {flex:1}.skeleton-identity>.is-value {width:20%;margin-left:auto}.skeleton-avatar {width:56px;height:56px;border-radius:var(--radius-card);background:#253246;flex-shrink:0}
.timeframe-card .module-skeleton {padding:0;width:100%;background:none}.timeframe-card .skeleton-metrics {display:none}.timeframe-card.is-loading {justify-content:flex-start}
#earnings-loading .module-skeleton {padding:0;background:none}
#earnings-status {padding:0;margin:var(--space-5) 0}#earnings-status>.feedback {margin-bottom:var(--space-5)}
.earnings-status.has-error {background:none;border:0}
#plan-fx-status[data-state=stale],#plan-fx-status[data-state=error],#plan-fx-status[data-state=warning] {color:var(--state-fg);padding-left:var(--space-3);border-left:2px solid currentColor}
#plan-error:not(:empty) {background:var(--surface-warning);color:var(--color-warning);padding:var(--space-3) var(--space-4);border-radius:var(--radius-control);font-size:var(--type-label)}
.toast {padding:0;max-width:min(650px,calc(100% - 32px));background:none;border:0;box-shadow:var(--shadow-overlay);max-height:calc(100dvh - 150px);overflow:auto}
.toast .feedback {align-items:center;border-left-width:3px;padding:var(--space-4) var(--space-5)}
.toast .feedback-copy>strong {font-weight:var(--weight-medium)}
.search-status {position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:61;padding:var(--space-4);border:1px solid var(--border-control);border-radius:var(--radius-control);background:var(--surface-raised);font-size:var(--type-label);line-height:1.7;color:var(--text-secondary);box-shadow:var(--shadow-overlay)}
.search-status:empty {display:none}
.search-results [aria-selected=true] {background:var(--surface-hover);box-shadow:inset 3px 0 0 var(--cyan)}
.search-status .feedback {padding:0;background:none;border:0;box-shadow:none;flex-wrap:wrap}
.search-status .feedback-action {margin-left:32px}
.plan-fx-actions {display:flex;flex-wrap:wrap;gap:var(--space-2);margin-block:var(--space-3)}
.plan-fx-actions[hidden] {display:none}
[role=tabpanel]:focus-visible {outline:var(--focus-ring);outline-offset:4px}
.table-cell-value {min-width:0;overflow-wrap:anywhere}
/* Compact evidence is available in Pro without shrinking essential labels. */
body[data-depth=pro] .data-table th,body[data-depth=pro] .data-table td {padding:10px 14px}
body[data-depth=pro] .disclosure-content {padding:var(--space-5)}
/* Common responsive table: records stack; historical statement matrices stay scrollable. */
.record-table tbody th {max-width:420px;white-space:normal}
.plot-labels {display:flex;justify-content:space-between;gap:8px;font-size:var(--type-caption);color:var(--text-secondary);margin-top:var(--space-2);line-height:1.6}
.plot-range {font-size:var(--type-caption);color:var(--text-secondary);line-height:1.6;margin-top:var(--space-3)}
.mini-plot svg {overflow:visible}
.document-page {padding-bottom:0}.document-page .topbar {position:relative;min-height:80px;height:auto;padding-block:var(--space-4)}
.document-main {max-width:900px;padding:var(--space-10) var(--page-padding) 70px}
.document-content {padding:var(--space-6) 0;line-height:1.9;color:var(--text-secondary)}
.document-content p {font-size:var(--type-body);margin:0 0 var(--space-6)}.document-content h2 {margin:var(--space-8) 0 var(--space-4)}.document-content a {color:var(--cyan);text-decoration:underline;text-underline-offset:4px}
@keyframes loading-pulse {50% {opacity:.72}}
@media(max-width:960px) {
 .topbar {position:relative}.quote-header {scroll-margin-top:20px}html {scroll-padding-top:20px}
 .quote-block {min-width:0}.stock-id,.feed-controls,.score-header {min-width:0}
}
@media(max-width:700px) {
 .feedback {flex-wrap:wrap;padding:var(--space-4);gap:var(--space-3)}.feedback-copy {flex-basis:calc(100% - 36px)}.feedback-action {margin-left:32px;min-height:44px}
 .skeleton-stories {grid-template-columns:1fr;gap:var(--space-4)}.skeleton-stories>div:nth-child(n+2) {display:none}
 .skeleton-metrics {gap:var(--space-3)}.skeleton-identity {gap:var(--space-3)}.skeleton-identity>.is-value {width:25%}
 .state-badge {font-size:var(--type-caption)}
 .view-label,.session-label {font-size:var(--type-label)}
 .data-ribbon .auto-select select {min-height:44px}.depth-switch button {min-height:44px}
 .metric-cell summary,.level summary,.context-explanation>summary {min-height:44px;display:flex;align-items:center}
 .module-skeleton {padding:var(--space-4)}
 .record-table {display:block;white-space:normal}.record-table thead {position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}
 .record-table tbody {display:block}.record-table tr {display:block;border-bottom:1px solid var(--border-subtle);padding:var(--space-3) var(--space-4)}.record-table tr:last-child {border-bottom:0}
 .record-table tbody th {display:block;border:0;padding:var(--space-3) 0;color:var(--text-primary);font-size:var(--type-body)}
 .record-table td {display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4);border:0;padding:var(--space-2) 0;font-size:var(--type-label);min-width:0;overflow-wrap:anywhere}
 .record-table .table-cell-value {text-align:right;flex:1;min-width:0}
 .record-table td::before {content:attr(data-label);color:var(--text-secondary);font-family:var(--sans);flex:0 0 42%;font-size:var(--type-label)}
 .record-table td .wrap-cell {min-width:0;max-width:none}.record-table small {font-size:var(--type-caption)}
 body[data-depth=pro] .record-table th,body[data-depth=pro] .record-table td {padding:var(--space-2) 0}
 .record-table-wrap {border-radius:var(--radius-control)}
 .timeframe-card .quiet-button {width:100%;min-height:44px}
 .earnings-outlook .stat-grid {grid-template-columns:1fr 1fr}
 .data-table-wrap {max-width:100%;min-width:0}.disclosure-content,.research-pane,.research-heading,.technical-brief,.overview-hero {min-width:0}
 #share-dialog .quiet-button,#share-dialog .primary {width:100%}dialog {max-height:calc(100dvh - 24px);border-radius:var(--radius-dialog)}
 .document-page .topbar {padding-inline:var(--page-padding);gap:var(--space-3)}.document-page .brand {font-size:var(--type-label)}.document-page .quiet-button {font-size:var(--type-label);max-width:130px}
}
@media(max-width:380px) {
 .view-label {font-size:var(--type-caption)}.depth-switch button {padding-inline:9px}.topbar .brand {font-size:var(--type-label)}
 .earnings-outlook .stat-grid {grid-template-columns:1fr}.outlook-signals {grid-template-columns:1fr;gap:10px}.outlook-signals>div {display:flex;justify-content:space-between;gap:12px}.outlook-signals dt {margin:0}
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media(forced-colors:active) {
 .feedback,.state-badge,.rating,.bias,.panel,.disclosure,button,input,select {border:1px solid CanvasText}
 .workspace-nav>button[aria-selected=true] {border-bottom:3px solid Highlight}.score-track i {background:Highlight}
 .mobile-nav button[aria-current=page],.segmented button[aria-pressed=true] {outline:2px solid Highlight}
}
