500;600&display=swap');

body { margin: 0; background: var(--surface-canvas); color: var(--text-primary); font-family: var(--font-sans); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; }
.at-row { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; padding: var(--space-16); }
.at-col { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); }
.at-num { font-variant-numeric: tabular-nums; }
.at-meta { font-size: 12px; line-height: 16px; color: var(--text-muted); }
:where(.at-btn, .at-pill, .at-link, .at-search input, .at-tab):focus-visible { outline: var(--stroke-focus) solid var(--border-focus); outline-offset: var(--space-2); }

/* Button */
.at-btn { display: inline-flex; align-items: center; gap: var(--space-6); height: var(--height-control); padding: 0 var(--space-16); border-radius: var(--radius-pill); border: var(--stroke-hairline) solid transparent; font: 500 14px/20px var(--font-sans); cursor: pointer; transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); -webkit-tap-highlight-color: transparent; }
.at-btn:active:not(:disabled) { transform: scale(0.97); }
.at-btn-compact { height: var(--height-compact); padding: 0 var(--space-12); }
.at-btn-command { height: var(--height-command); width: var(--height-command); padding: 0; justify-content: center; }
.at-btn-primary { background: var(--action-primary); color: var(--text-inverse); }
.at-btn-primary:active { background: var(--action-pressed); }
.at-btn-secondary { background: var(--surface-control); color: var(--text-primary); }
.at-btn-quiet { background: transparent; color: var(--text-primary); font-weight: 400; }
.at-btn[aria-busy="true"] { cursor: progress; }
.at-btn:disabled { background: var(--surface-control); color: var(--text-disabled); cursor: not-allowed; }
.at-btn svg { width: var(--icon-ink); height: var(--icon-ink); }

/* Pills */
.at-pills { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.at-pill { height: var(--height-pill); padding: 0 var(--space-12); border-radius: var(--radius-pill); border: 0; background: var(--surface-control); box-shadow: inset 0 0 0 1px var(--border-subtle); color: var(--text-primary); font: 400 14px/20px var(--font-sans); cursor: pointer; }
.at-pill[aria-pressed="true"] { background: var(--selection-light); color: var(--text-on-light); font-weight: 500; }

/* Search */
.at-search { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 360px; }
.at-search label { font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.at-search input { height: var(--height-control); box-sizing: border-box; padding: 0 var(--space-12); border-radius: var(--radius-control); border: var(--stroke-hairline) solid var(--border-control); background: var(--surface-control); color: var(--text-primary); font: 400 14px/20px var(--font-sans); }
.at-search input::placeholder { color: var(--text-secondary); }
.at-search-msg { font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.at-search-msg[data-tone="error"] { color: var(--status-error); }

/* Signed value */
.at-signed { font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-signed[data-dir="up"] { color: var(--fin-increase-text); }
.at-signed[data-dir="down"] { color: var(--fin-decrease-text); }
.at-signed[data-dir="flat"], .at-signed[data-dir="missing"], .at-signed[data-dir="na"] { color: var(--text-secondary); }
.at-signed-note { font-size: 12px; line-height: 16px; color: var(--text-muted); margin-left: var(--space-4); }

/* Context bar */
.at-context { display: flex; align-items: center; gap: var(--space-16); height: var(--height-control); padding: 0 var(--space-16); background: transparent; border-bottom: var(--stroke-hairline) solid var(--border-subtle); white-space: nowrap; overflow: hidden; }
.at-context strong { font-weight: 500; color: var(--text-primary); }
.at-context span { color: var(--text-secondary); }
.at-context .at-sep { width: 1px; height: 16px; background: var(--border-subtle); }
.at-context .at-asof { margin-left: auto; color: var(--text-muted); font-size: 12px; }

/* Financial table */
.at-table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 20px; }
.at-table caption { text-align: left; padding: 0 var(--space-12) var(--space-8); color: var(--text-muted); font-size: 12px; line-height: 16px; caption-side: top; }
.at-table caption b { color: var(--text-primary); font: 600 14px/20px var(--font-sans); display: block; }
.at-table th, .at-table td { padding: 0 var(--space-12); border-bottom: var(--stroke-hairline) solid var(--border-subtle); }
.at-table thead th { height: var(--height-table-header); color: var(--text-secondary); font-weight: 500; text-align: right; }
.at-table thead th:first-child, .at-table tbody th { text-align: left; }
.at-table tbody th { font-weight: 400; color: var(--text-primary); }
.at-table tbody tr { height: var(--height-data-row); }
.at-table td { text-align: right; font-variant-numeric: tabular-nums; }
.at-table tr.at-total th, .at-table tr.at-total td { font-weight: 500; border-top: var(--stroke-hairline) solid var(--border-control); }
.at-table tr[aria-selected="true"] { background: var(--surface-selection-tint); }
.at-table .at-missing { color: var(--text-secondary); }

/* Evidence tag */
.at-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-6); border-radius: var(--radius-small); border: var(--stroke-hairline) solid var(--border-control); color: var(--text-secondary); font-size: 12px; line-height: 16px; }
.at-tag[data-kind="interpreted"] { border-style: dashed; }
.at-tag[data-kind="unavailable"] { color: var(--status-warning); border-color: var(--status-warning); }

/* Evidence item */
.at-evidence { background: var(--surface-overlay); box-shadow: inset 0 0 0 1px var(--border-subtle); border-radius: 12px; padding: var(--space-16); display: flex; flex-direction: column; gap: var(--space-8); max-width: 320px; box-sizing: border-box; }
.at-evidence-claim { font-size: 14px; line-height: 20px; color: var(--text-primary); margin: 0; }
.at-evidence-src { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.at-evidence-src b { color: var(--text-secondary); font-weight: 500; }
.at-evidence blockquote { margin: 0; padding-left: var(--space-12); border-left: var(--stroke-hairline) solid var(--border-control); color: var(--text-secondary); font-size: 14px; line-height: 20px; }
.at-evidence-actions { display: flex; gap: var(--space-8); align-items: center; }
.at-link { color: var(--action-link); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.at-evidence-warn { color: var(--status-warning); font-size: 12px; line-height: 16px; }

/* Pills and rows: colour on hover only, crisp press */
.at-pill { transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out); }
.at-pill:active { transform: scale(0.97); }
.at-table tbody tr { transition: background-color var(--dur-hover) ease; }

/* Hover only where a real pointer exists (touch fires hover on tap) */
@media (hover: hover) and (pointer: fine) {
  .at-btn-primary:hover { background: var(--action-hover); }
  .at-btn-secondary:hover { background: var(--surface-selected); }
  .at-btn-quiet:hover { background: var(--surface-hover); }
  .at-pill:hover { background: var(--surface-selected); }
  .at-table tbody tr:hover { background: var(--surface-hover); }
}

@media (prefers-reduced-motion: reduce) {
  .at-btn, .at-pill { transition: background-color var(--dur-hover) ease; }
  .at-btn:active:not(:disabled), .at-pill:active { transform: none; }
}

/* Paper composition helpers */
.at-ink { background: var(--surface-ink); color: var(--text-primary); border-radius: var(--radius-panel); box-shadow: var(--shadow-ink); }
.at-paper { background: var(--surface-panel); border-radius: var(--radius-panel); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.at-band { background: var(--brand-green); color: var(--brand-cream); }
.at-eyebrow { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.02em; color: var(--brand-eyebrow); }
