/* Research pages. Uses the site's tokens, so the three themes and the Appearance panel apply here too. */
.research { padding: 44px 0 72px; }
.research .wrap { max-width: 1040px; }
.research h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 10px; }
.research h2 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
.research h3 { font-size: 17px; margin: 22px 0 8px; }
.research p, .research li { color: var(--lead); }
.research .eyebrow a { color: inherit; }
.research .updated { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.research section { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.rs-notice { border: 1px solid var(--notice-line); background: var(--notice-bg); color: var(--notice-ink); border-radius: 10px; padding: 12px 16px; font-size: 14px; line-height: 1.55; margin: 0 0 22px; }
.rs-notice a { color: inherit; text-decoration: underline; }
.rs-lead { font-size: 18.5px; line-height: 1.6; max-width: 880px; }
.rs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.rs-tiles .tile { border: 1px solid var(--panel-border); background: var(--panel); border-radius: var(--radius); padding: 16px 18px; }
.rs-tiles .tile strong { display: block; font-size: 26px; line-height: 1.2; color: var(--accent-t); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rs-tiles .tile span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.rs-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; margin: 6px 0 0; }
.rs-toc a { color: var(--accent-t); }
table.rs { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 14px 0 16px; font-variant-numeric: tabular-nums; }
table.rs caption { text-align: left; color: var(--muted); font-size: 13.5px; padding-bottom: 8px; }
table.rs th, table.rs td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--lead); }
table.rs thead th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--bg-2); }
table.rs tbody th { font-weight: 600; color: var(--ink); }
table.rs td.dn { color: var(--down); }
table.rs td.up { color: var(--accent-t); }
table.rs tr.sum th, table.rs tr.sum td { border-top: 2px solid var(--line-2); font-weight: 600; }
.rs-note, .research .note { font-size: 13.5px; color: var(--muted); }
.research .callout { border-left: 4px solid var(--accent); background: var(--bg-2); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.rs-prev .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.rs-prev .questions li { margin-bottom: 12px; }
.rs-prev .questions strong { display: block; color: var(--ink); }
.rs-chart { margin: 18px 0; border: 1px solid var(--panel-border); background: var(--panel); border-radius: var(--radius); padding: 14px 14px 12px; }
.rs-chart svg { width: 100%; height: auto; display: block; }
.rs-chart figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.rc-events { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.rc-events li { color: var(--lead); font-size: 13.5px; margin-bottom: 4px; break-inside: avoid; }
.rc-grid { stroke: var(--line); stroke-width: 1; }
.rc-t { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.rc-px { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.rc-m50 { fill: none; stroke: var(--accent-t); stroke-width: 1.4; }
.rc-m200 { fill: none; stroke: var(--warn); stroke-width: 1.4; stroke-dasharray: 5 4; }
.rc-vol { fill: var(--line-2); }
.rc-vol.rc-dn { fill: var(--down); opacity: 0.55; }
.rc-lead { stroke: var(--muted); stroke-width: 1; }
.rc-dot { fill: var(--ink); }
.rc-badge { fill: var(--panel); stroke: var(--ink); stroke-width: 1.3; }
.rc-n { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font); }
.rs-item { display: block; padding: 22px 24px; margin-top: 18px; color: inherit; }
.rs-item:hover { text-decoration: none; border-color: var(--line-2); }
.rs-item h2 { margin: 4px 0 8px; }
@media (max-width: 760px) {
  .rs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-prev .grid { grid-template-columns: minmax(0, 1fr); }
  .rc-events { columns: 1; }
  table.rs { min-width: 620px; }
}

/* the section's two tabs, and the earnings calendar */
.rs-tabs { display: flex; gap: 6px; margin: 4px 0 20px; border-bottom: 1px solid var(--line); }
.rs-tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rs-tabs a:hover { text-decoration: none; color: var(--ink); }
.rs-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.research h3.today { color: var(--accent-t); }
table.rs.cal th[scope="row"] { width: 36%; }
table.rs.cal th[scope="row"] a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
table.rs.cal th[scope="row"] a:hover { text-decoration-color: var(--accent-t); }
table.rs.cal td:nth-child(2) { font-weight: 600; }
table.rs.cal { table-layout: fixed; }
table.rs.cal th:nth-child(2), table.rs.cal td:nth-child(2) { width: 9%; }
table.rs.cal th:nth-child(3), table.rs.cal td:nth-child(3) { width: 13%; }
table.rs.cal th:nth-child(4), table.rs.cal td:nth-child(4) { width: 14%; }

/* calendar: the tile view and the switch between tiles and table */
.cal-views { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; margin: 4px 0 16px; background: var(--panel); }
.cal-views button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cal-views button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cal-head { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 2px; }
.cal-tile { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 118px; padding: 12px 14px; border: 1px solid var(--panel-border); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
a.cal-tile:hover, a.cal-tile:focus-visible { text-decoration: none; border-color: var(--accent-t); }
.cal-tile b { font-size: 20px; line-height: 1.1; }
.cal-tile .cal-n { font-size: 13px; color: var(--muted); }
.cal-tile .cal-cap { margin-top: auto; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-tile .cal-lbl { font-size: 11.5px; color: var(--muted); }
.cal-tile.past { background: var(--bg-2); }
.cal-tile.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-tile.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-tile.empty { color: var(--faint); background: none; border-style: dashed; }
.cal-tip { display: none; position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: max-content; max-width: 280px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); flex-wrap: wrap; gap: 4px 6px; }
.cal-tip span { font-size: 12.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--bg-2); color: var(--ink); }
a.cal-tile:hover .cal-tip, a.cal-tile:focus-visible .cal-tip { display: flex; }
.cal-grid > .cal-tile:nth-child(5n) .cal-tip { left: auto; right: 0; }
#cal[data-view="table"] .cal-tiles { display: none; }
#cal[data-view="tiles"] .cal-day { display: none; }
#cal[data-view="tiles"] .cal-day.on { display: block; }
.cal-day { scroll-margin-top: 84px; }
#cal[data-view="tiles"] .cal-day h3 { margin-top: 26px; }
@media (max-width: 760px) {
  .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-head { display: none; }
  .cal-tile { min-height: 96px; }
  .cal-grid > .cal-tile:nth-child(5n) .cal-tip { left: 0; right: auto; }
}

/* tiles: the header is a button, tickers are stacked below it, each with a hover card */
.cal-tile { padding: 0; min-height: 0; }
.cal-tile.empty { padding: 12px 14px; min-height: 96px; }
.cal-open { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 12px 14px 8px; cursor: pointer; border-radius: var(--radius) var(--radius) 0 0; }
.cal-open:hover b { color: var(--accent-t); }
.cal-open:focus-visible { outline: 2px solid var(--accent-t); outline-offset: -2px; }
.cal-open .cal-cap { margin-top: 6px; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 12px; }
.cal-chip { position: relative; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); }
.cal-tile.past .cal-chip { background: var(--panel); }
a.cal-chip:hover, a.cal-chip:focus-visible { text-decoration: none; border-color: var(--accent-t); color: var(--accent-t); z-index: 6; }
.cal-card { display: none; position: absolute; z-index: 7; left: 0; top: calc(100% + 6px); width: 250px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); flex-direction: column; gap: 3px; font-weight: 400; color: var(--lead); text-align: left; }
.cal-card b { font-size: 13.5px; color: var(--ink); }
.cal-card span { font-size: 12.5px; line-height: 1.4; }
.cal-card .cal-go { color: var(--accent-t); font-weight: 600; margin-top: 2px; }
a.cal-chip:hover .cal-card, a.cal-chip:focus-visible .cal-card { display: flex; }
.cal-grid > .cal-tile:nth-child(5n) .cal-card, .cal-grid > .cal-tile:nth-child(5n+4) .cal-card { left: auto; right: 0; }
@media (max-width: 760px) {
  .cal-grid > .cal-tile:nth-child(5n) .cal-card, .cal-grid > .cal-tile:nth-child(5n+4) .cal-card { left: 0; right: auto; }
  .cal-grid > .cal-tile:nth-child(2n+1) .cal-card { left: auto; right: 0; }
  .cal-card { width: 220px; }
}

/* compact tiles: date and count on one line, the cap under it, tickers stacked in aligned columns */
.cal-grid { gap: 8px; }
.cal-open { padding: 9px 11px 6px; gap: 1px; }
.cal-top { display: flex; align-items: baseline; gap: 8px; }
.cal-tile b { font-size: 17px; }
.cal-tile .cal-n { font-size: 12px; }
.cal-open .cal-cap { margin-top: 2px; font-size: 15px; }
.cal-open .cal-cap .cal-lbl { font-size: 11px; font-weight: 400; }
.cal-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 0 4px; padding: 0 9px 8px; }
.cal-chip { font-size: 11.5px; line-height: 1.55; padding: 0 2px; border: 0; border-radius: 4px; background: none; }
.cal-tile.past .cal-chip { background: none; }
a.cal-chip:hover, a.cal-chip:focus-visible { background: var(--bg-2); }
.cal-tile.empty { padding: 9px 11px; min-height: 64px; }

/* the month switch on the calendar */
.cal-months { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cal-months a { padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.cal-months a:hover { text-decoration: none; color: var(--ink); }
.cal-months a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

/* research front page: articles beside the "Economy at a glance" tile */
.rs-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; margin-top: 18px; }
.rs-list .rs-item:first-child { margin-top: 0; }
.eco { padding: 16px 16px 12px; }
.eco h2 { font-size: 17px; margin: 0 0 2px; }
.eco-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.eco-list { display: flex; flex-direction: column; }
.eco-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 6px; border-radius: 6px; font-size: 13.5px; color: var(--lead); border-top: 1px solid var(--line); }
.eco-row:first-child { border-top: 0; }
.eco-row:hover, .eco-row:focus-visible { text-decoration: none; background: var(--bg-2); color: var(--ink); }
.eco-l::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.eco-v { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-v i { font-style: normal; font-weight: 600; font-size: 12px; margin-left: 4px; }
.eco-v i.up { color: var(--accent-t); }
.eco-v i.dn { color: var(--down); }
.eco-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 860px) { .rs-cols { grid-template-columns: minmax(0, 1fr); } }
