/* Research workspace */
.research-view { --research-panel: #1c1711; --research-muted: #bdb09c; }
.research-hero { position: relative; isolation: isolate; margin-top: 22px; min-height: 147px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(18px, 2.9vw, 36px); border: 1px solid #554027; border-radius: 9px; overflow: hidden; background: radial-gradient(ellipse at 85% 0, #473021a0, transparent 68%), linear-gradient(105deg, #241e18, #201913 58%, #2a2016); }
.research-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 98px, #edc18209 99px 100px, transparent 101px 150px); mask-image: linear-gradient(90deg, transparent 32%, black); pointer-events: none; }
.research-hero h1 { font-size: clamp(29px, 4.7vw, 46px); letter-spacing: -.025em; }
.am-deck { margin-top: 9px; color: var(--research-muted); font-size: 13px; }
.am-stamps { display: grid; gap: 8px; min-width: 190px; }
.am-stamps div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; border-left: 1px solid #886639; padding: 2px 0 2px 10px; }
.am-stamps span { grid-column: 2; color: var(--research-muted); font-size: 11px; }
.am-stamps b { grid-column: 2; font: 500 12px var(--mono); color: var(--text); }
.am-stamps i { grid-row: span 2; grid-column: 1; width: 6px; height: 6px; background: var(--aqua); border-radius: 50%; }
.am-stamps i.stale { background: var(--gold); }
.am-status { color: #e2c9a0; border: 1px solid #65492b; border-radius: 6px; background: #32241a; margin-top: 12px; padding: 11px 14px; font-size: 12px; }
.am-status small { display: block; color: var(--research-muted); margin-top: 4px; }
.am-status code, .am-method code { color: #f0d7aa; overflow-wrap: anywhere; }
.am-metrics { margin: 12px 0 17px; }
.am-metrics strong { font-size: clamp(18px, 2.3vw, 27px); }
.am-metrics span { color: #e1cdae; font-weight: 600; }
.am-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 13px; padding: 15px 17px 12px; }
.am-section-head p { color: var(--research-muted); font-size: 11px; margin-top: 4px; }
.am-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, .30fr); align-items: start; gap: 14px; }
.am-outlook, .am-pressure, .am-setups, .am-inspect, .am-history, .am-journal, .am-method { background: var(--research-panel); }
.am-table-scroll { scrollbar-color: #6b5035 #1f1710; }
.am-table { width: 100%; font-variant-numeric: tabular-nums; }
.am-table td:first-child { width: auto; }
.am-table td { vertical-align: top; }
.am-table tr:last-child td { border-bottom-width: 0; }
.am-ranking { min-width: 640px; }
.am-ranking td:first-child { width: 28%; min-width: 180px; }
.am-ranking td:nth-child(2) { width: 15%; }
.am-ranking td:nth-child(3) { width: 15%; }
.am-ranking td:nth-child(4) { padding-top: 8px; min-width: 195px; }
.am-table td small, .am-sub { display: block; color: var(--research-muted); font-size: 11px; font-weight: normal; }
.am-table td small { margin-top: 3px; }
.am-table .am-price { white-space: nowrap; color: var(--text); font-family: var(--mono); font-weight: 600; }
.am-table .am-target { color: #edd4a0; }
.am-table .am-item { display: flex; align-items: flex-start; gap: 7px; color: var(--text); border: 0; background: none; padding: 0; text-align: left; font-weight: 650; width: 100%; }
.am-table .am-item:is(:hover,:focus-visible) { color: var(--gold); }
.am-item .item-icon { align-self: flex-start; margin-top: 1px; }
.am-rank { min-width: 18px; flex: 0 0 18px; color: var(--gold); text-align: center; font: 500 11px var(--mono); margin-top: 4px; }
.am-reason, .am-risk { line-height: 1.35; overflow-wrap: anywhere; }
.am-risk { font-size: 10.5px !important; color: var(--research-muted); }
.am-groups { padding: 0 14px 13px; }
.am-group { padding: 8px 1px; border-bottom: 1px solid #392e23; }
.am-group:last-of-type { border: 0; }
.am-group-name { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; font-size: 11.5px; }
.am-group-label { font-weight: 600; }
.am-group-name strong { white-space: nowrap; font: 500 11px var(--mono); }
.am-pressure-track { display: flex; height: 3px; background: #362a20; border-radius: 3px; margin: 6px 0; overflow: hidden; }
.am-pressure-track i { display: block; max-width: 100%; background: var(--aqua); }
.am-group small { color: var(--research-muted); font-size: 10px; line-height: 1.3; display: block; }
.am-group-filter { border: 0; padding: 0; color: var(--text); background: none; text-align: left; }
.am-group-filter:hover, .am-group-filter[aria-pressed=true] { color: var(--gold); }
.am-group-footer { color: var(--research-muted); line-height: 1.5; margin-top: 10px; padding-top: 8px; border-top: 1px solid #392e23; font-size: 10px; }
.am-group-footer button { margin-top: 8px; }
.am-setups, .am-inspect, .am-history, .am-journal, .am-method { margin-top: 15px; }
.am-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; padding: 0 17px 12px; }
.am-controls label { color: var(--research-muted); font-size: 11px; display: grid; gap: 4px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.am-controls :is(input,select), .am-search-form input { background: var(--field); border: 1px solid #59442f; border-radius: 4px; color: var(--text); padding: 6px 9px; min-height: 32px; min-width: 0; max-width: 100%; }
.am-controls input[type="number"] { width: 145px; max-width: 100%; }
.am-trades { min-width: 690px; }
.am-trades td:first-child { min-width: 168px; }
.am-trades td:not(:first-child), .am-journal-table td:nth-child(n+2) { white-space: nowrap; }
.am-note { padding: 11px 17px 13px; color: var(--research-muted); font-size: 11px; }
.am-inspect { scroll-margin-top: 12px; }
.am-search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.am-search-form input { width: min(230px, 60vw); }
.am-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.am-search-message { color: var(--rose); padding-inline: 17px; font-size: 11px; }
.am-search-message:empty { display: none; }
.am-selected-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; border-block: 1px solid #3b3024; padding: 13px 17px; background: #242018; }
.am-selected-title h3 { font: 700 18px var(--display); color: #ecd8b9; }
.am-selected-title p { color: var(--research-muted); font-size: 11px; }
.am-selected-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 9px; font-size: 11px; }
.am-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 12px 17px 0; }
.am-kpi-grid div { min-width: 0; padding: 7px 10px; border: 1px solid #403325; border-radius: 5px; background: #211b14; }
.am-kpi-grid span, .am-kpi-grid small { display: block; color: var(--research-muted); font-size: 11px; }
.am-kpi-grid strong { display: block; color: var(--gold); font: 600 clamp(14px, 1.7vw, 19px)/1.5 var(--mono); overflow-wrap: anywhere; }
.am-item-chart-area { padding: 12px 17px 0; }
.am-trajectories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.am-trajectories figure { margin: 0; min-width: 0; }
.am-trajectories figcaption { color: #eadcc9; font-weight: 650; }
.am-canvas { height: 225px; }
.am-item-events { display: flex; flex-wrap: wrap; margin-top: 8px; gap: 6px; }
.am-item-events a, .am-item-events span { color: #d8c4a5; border: 1px solid #4e3c29; border-radius: 4px; padding: 3px 6px; font-size: 10.5px; }
.am-item-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 12px 17px 17px; }
.am-item-details p + p { margin-top: 7px; }
.am-item-details td:last-child, .am-item-details th:last-child { text-align: right; }
.am-item-details .am-sub { margin-top: 6px; }
.am-item-details code { overflow-wrap: anywhere; }
.am-library-controls { padding-top: 12px; }
.am-library-controls input { width: min(250px,60vw); }
.am-library-controls button { min-height: 32px; }
.am-history-info, .am-history-chart-area { padding: 0 17px 10px; color: var(--research-muted); font-size: 11px; }
.am-history-info b { color: var(--text); }
.am-library-chart { height: min(320px, 50vw); min-height: 205px; }
.am-patterns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 0 17px 14px; }
.am-patterns .plain { margin: 7px 5px 0 0; }
.am-history details { margin: 0 17px 15px; padding-top: 7px; border-top: 1px solid #433628; }
.am-method { padding: 12px 17px; }
.am-method summary, .am-history summary { color: var(--gold); font-weight: 650; cursor: pointer; }
.am-source-list { display: grid; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.am-source { background: #211a14; padding: 9px 11px; border: 1px solid #3b3024; border-radius: 5px; color: var(--research-muted); font-size: 11px; }
.am-source h3 { color: var(--gold); margin-bottom: 4px; font-size: 12px; }
.am-source p + p { margin-top: 4px; }
.am-source ol { padding-left: 16px; margin: 4px 0 0; }
.am-source li + li { margin-top: 3px; }
.am-archive-events { margin-top: 9px; }
.am-archive-events .am-table { min-width: 520px; }
.am-journal-table { min-width: 680px; }
.am-journal .am-kpi-grid { padding-top: 0; margin-bottom: 10px; }
.am-journal .am-table-scroll { max-height: 350px; }
.am-journal .am-table th { position: sticky; top: 0; }
.am-empty { text-align: left; padding: 18px 17px; color: var(--research-muted); }
@media (max-width: 1150px) { .am-board { grid-template-columns: minmax(0,1fr) minmax(210px,.28fr); } }
@media (max-width: 970px) {
  .am-board { grid-template-columns: minmax(0,1fr); }
  .am-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 14px; }
  .am-group:last-of-type { border-bottom: 1px solid #392e23; }
  .am-group-footer { grid-column: 1 / -1; margin-top: 3px; border: 0; }
}
@media (max-width: 760px) {
  .research-hero { margin-top: 13px; }
  .am-trajectories, .am-item-details { grid-template-columns: 1fr; }
  .am-patterns, .am-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .masthead nav { overflow-x: auto; }
}
@media (max-width: 540px) {
  .research-hero { display: grid; gap: 14px; }
  .am-stamps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .am-groups, .am-source-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .am-section-head, .am-item-chart-area, .am-item-details, .am-kpi-grid, .am-controls, .am-note, .am-search-message, .am-selected-title { padding-inline: 11px; }
  .am-history-info, .am-history-chart-area, .am-patterns { padding-inline: 11px; }
  .am-history details { margin-inline: 11px; }
  .am-controls label { flex: 1 1 40%; min-width: 115px; }
  .am-controls input[type="number"] { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .research-view * { scroll-behavior: auto !important; } }
.am-leads { margin-top: 15px; background: var(--research-panel); }
.am-lead-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; padding: 0 17px 13px; }
.am-lead { display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left; white-space: normal; color: var(--text); }
.am-lead small { display: block; color: var(--research-muted); font-weight: normal; font-size: 10px; }
@media (max-width: 930px) { .am-lead-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 540px) { .am-lead-list { padding-inline: 11px; } }
