/* GENERATED by apps/web/scripts/bundle-page-css.mjs — do not edit.
 * Source: apps/web/public/styles/pages/account-page.css
 * Flattened from 41 @import'd files into one render-blocking request. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Newsreader:ital,wght@0,200..800;1,200..800&display=swap");

/*
 * Dedicated entrypoint for the /account dashboard (and the /link Discord
 * account-linking flow, which reuses the account shell). See
 * docs/page-css-architecture.md for the full page → entrypoint map.
 *
 * Replaces the legacy styles.css kitchen-sink (~144 render-blocking @imports of
 * the whole site) that was the cause of the slow first paint / flash of
 * unstyled content on the account page. The dashboard only needs:
 *   - app-base  (base [→ nav-shell, brand], tables, status, postlude) — shared foundation + site nav
 *   - runs      (research-table mobile rules for the usage table)
 *   - job/status-message (.job-message boxes reused by account/link states)
 *   - account/* (the page's own shell, billing, sections, modal, keys-runs, usage, responsive styles)
 */
/*
 * app-base.css — the shared CSS layer every app page composes.
 *
 * Contains only the truly cross-page foundation:
 *   - base/*        (foundation, nav-shell, brand, typography, article)
 *   - tables        (research-table component + variants)
 *   - components/*  (canonical status color map)
 *   - postlude/*    (code, footer, interaction, responsive, motion)
 *
 * Page-specific trees (home, job, runs, entity, topics, discord-agent,
 * global-chat, start-chat) are imported by each page's own entry CSS on top of
 * this base. This guarantees shared components can never diverge between pages.
 */
:root {
  --font-fallback: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-primary: var(--font-inter, var(--font-fallback));
  --font-secondary: var(--font-newsreader, var(--font-fallback));
  --font-code: "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    Courier, monospace;
  --body-color: #111111;
  --body-bg: #fdfdfc;
  --heading-color: #111111;
  --link-color: #2480ed;
  --muted: rgba(0, 0, 0, 0.4);
  --line: #f2f2f2;
  --soft-line: #ededed;
  --selection-bg: #ededed;
  --selection-color: #111111;
  --focus-color: rgba(0, 122, 255, 0.5);
  --success-color: #65C466;
  --success-tint: rgba(101, 196, 102, 0.13);
  --success-line: rgba(101, 196, 102, 0.45);
  --danger-color: #EA3223;
  --danger-color-hover: #D42C20;
  --danger-tint: rgba(234, 50, 35, 0.07);
  --danger-line: rgba(234, 50, 35, 0.22);
  --danger-soft-tint: rgba(234, 50, 35, 0.04);
  --danger-soft-line: rgba(234, 50, 35, 0.18);
  --researcher-page-width: 64rem;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation-name: researcher-page-out;
}

::view-transition-new(root) {
  animation-name: researcher-page-in;
}

::view-transition-old(researcher-chat-composer),
::view-transition-new(researcher-chat-composer) {
  animation-duration: 210ms;
  animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes researcher-page-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -0.25rem, 0) scale(0.998);
  }
}

@keyframes researcher-page-in {
  from {
    opacity: 0;
    transform: translate3d(0, 0.45rem, 0) scale(0.998);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--body-bg);
  color: var(--body-color);
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
  overflow-anchor: none;
}

html,
html body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-y: scroll;
  background: var(--body-bg);
  color: var(--body-color);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.25rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  text-size-adjust: none;
  backface-visibility: hidden;
}

[hidden] {
  display: none !important;
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1rem 2.5rem;
}

@media screen and (max-width: 768px) {
  main {
    padding: 2rem 1.5rem 2.5rem;
  }
}

article {
  max-width: none;
}

.site-nav {
  display: grid;
  grid-template-columns: auto 1fr repeat(4, auto);
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.0025rem;
}

/* The "new topic" + button is a cross-page nav element (run, entity, topics,
   dashboard). When present, flow nav items into auto columns so the extra
   button stays on one row instead of wrapping under the brand. */
.site-nav:has(.site-nav-new) {
  grid-auto-flow: column;
  grid-auto-columns: auto;
}

.site-nav .site-nav-new {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}

.site-nav .site-nav-new:hover {
  border-color: rgba(0, 0, 0, 0.16);
  color: #111111;
  background: #f8f8f8;
}

.site-nav .site-nav-new::after {
  content: "";
  position: absolute;
  inset: -0.625rem;
}

.site-nav .site-nav-new svg {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
}

@media screen and (max-width: 420px) {
  .site-nav .site-nav-new {
    display: none;
  }
}

/* Account avatar dropdown (Pricing, Docs, Log out). The container is the grid
   cell; the menu is absolutely positioned beneath the avatar. */
.site-nav-account {
  position: relative;
}

.site-nav-account-login {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav-account-login:hover {
  color: #111111;
}

.site-nav-account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  min-width: 9rem;
  display: flex;
  flex-direction: column;
  padding: 0.3125rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.625rem;
  background: #ffffff;
  box-shadow:
    0 0.5rem 1.5rem rgba(0, 0, 0, 0.1),
    0 0.0625rem 0.125rem rgba(0, 0, 0, 0.06);
}

.site-nav-account-menu[hidden] {
  display: none;
}

.site-nav-account-menu-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4375rem 0.625rem;
  border: 0;
  border-radius: 0.4375rem;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.12s ease,
    background-color 0.12s ease;
}

.site-nav-account-menu-item:hover {
  color: #111111;
  background: #f5f5f5;
}

.site-nav-account-menu-divider {
  height: 1px;
  margin: 0.3125rem 0.375rem;
  background: var(--soft-line);
}

.site-nav-account-menu-logout {
  color: var(--accent-red, #c0392b);
}

.site-nav-account-menu-logout:hover {
  color: var(--accent-red, #c0392b);
  background: rgba(192, 57, 43, 0.08);
}

.legal-page main {
  width: min(100%, 42rem);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 1.5rem;
  height: 1.5rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #111111;
}

.site-nav-account.has-avatar {
  display: inline-flex;
  align-items: center;
}

.site-nav-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}

.site-nav-account-trigger:hover,
.site-nav-account[data-open="true"] .site-nav-account-trigger {
  color: #111111;
}

.site-nav-balance {
  font-variant-numeric: tabular-nums;
  font-weight: 480;
}

.site-nav-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.brand-mark {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  border-radius: 999px;
}

.brand-footer {
  padding: 1rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.brand-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 450;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
}

.brand-footer a:hover {
  color: var(--heading-color);
}

.brand-footer-logo {
  display: inline-block;
  width: 0.875em;
  height: 0.875em;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.brand-footer a:hover .brand-footer-logo {
  opacity: 0.7;
}

blockquote,
dd,
dl,
dt,
fieldset,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
html,
iframe,
legend,
li,
ol,
p,
pre,
textarea,
ul {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  position: relative;
  display: flex;
  text-wrap: balance;
  -webkit-text-stroke: 0.001px transparent;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
}

h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.00813rem;
}

h2,
h3 {
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.00563rem;
}

h3 {
  font-weight: 500;
}

p,
li,
dl {
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

p strong,
li strong,
dl strong {
  font-weight: 600;
}

time {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.basic-link,
.nav a {
  position: relative;
  display: inline;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
  transition: all 0.2s ease;
}

.basic-link::before,
.nav a::before {
  pointer-events: none;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  border-radius: 2px;
  background: #d9d9d9;
  opacity: 1;
  transition: inherit;
}

.basic-link:hover::before,
.nav a:hover::before {
  background: #666666;
}

.basic-link:focus-visible,
.nav a:focus-visible {
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
  transition: none;
  outline: 2px solid var(--focus-color);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-top: 1rem;
}

hr {
  border: 0;
  display: block;
  width: 3.125rem;
  height: 1px;
  background: var(--soft-line);
  margin: 2.5rem 0 2rem;
}

.shell {
  width: min(100%, 70ch);
  max-width: none;
  margin-inline: auto;
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 0.5rem;
}

header h1 {
  color: #111111;
  font-weight: 500;
}

header h1,
header time {
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

.lede {
  color: var(--muted);
}

article > p,
article > p + h1 {
  padding-top: 1rem;
}

article > p + h2 {
  padding-top: 2.25rem;
}

article > p + h3,
article > p + h4,
article > p + h5,
article > p + h6 {
  padding-top: 1rem;
}

article h1 + ol,
article h1 + ul,
article h2 + ol,
article h2 + ul,
article h3 + ol,
article h3 + ul,
article h4 + ol,
article h4 + ul,
article h5 + ol,
article h5 + ul,
article h6 + ol,
article h6 + ul {
  padding-top: 1.5rem;
}

article > section {
  padding-top: 2.25rem;
}

article > section > p + p {
  padding-top: 0.5rem;
}

.research-table-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-top: 0.875rem;
}

.research-table {
  width: 100%;
  max-width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.research-table thead tr th {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: #111111;
  font-weight: 500;
  line-height: 1.15rem;
  letter-spacing: -0.00563rem;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-table thead tr th:first-child {
  padding-left: 0;
}

.research-table thead tr th:last-child {
  padding-right: 0;
}

.research-table tbody {
  color: rgba(0, 0, 0, 0.45);
}

.research-table tbody tr {
  transition:
    background-color 90ms ease,
    opacity 90ms ease;
}

.research-table tbody tr.is-entering {
  animation: research-row-enter 140ms cubic-bezier(0.215, 0.61, 0.355, 1);
  animation-delay: var(--research-row-enter-delay, 0ms);
  animation-fill-mode: both;
}

@media (hover: hover) and (pointer: fine) {
  .research-table tbody:hover tr {
    opacity: 0.48;
  }

  .research-table tbody tr:hover {
    opacity: 1;
  }
}

.research-table tbody tr.is-clickable {
  cursor: pointer;
}

.research-table tbody tr.is-clickable:active {
  background: rgba(0, 0, 0, 0.025);
}

.research-table tbody tr td {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 460;
  line-height: 1.15rem;
  letter-spacing: -0.00563rem;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.research-table tbody tr td:first-child {
  padding-left: 0;
  color: #111111;
}

@keyframes research-row-enter {
  0% {
    opacity: 0;
    transform: translateY(0.2rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .research-table tbody tr.is-entering {
    animation: none;
  }
}

.research-table tbody tr td:last-child {
  padding-right: 0;
}

.research-table-empty {
  color: var(--muted);
  white-space: normal;
}

.research-markdown-table-wrapper {
  margin: 0.75rem 0 1rem;
  padding-top: 0;
}

.research-markdown-table {
  table-layout: auto;
}

.research-markdown-table tbody,
.research-markdown-table tbody tr td {
  color: #111111;
}

.research-markdown-table-wide {
  table-layout: fixed;
}

.research-markdown-table-wide thead tr th,
.research-markdown-table-wide tbody tr td {
  min-width: 11rem;
}

.research-markdown-table-wide thead tr th:first-child,
.research-markdown-table-wide tbody tr td:first-child {
  min-width: 13rem;
}

.research-markdown-table tbody tr td {
  white-space: normal;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

.research-markdown-table tbody tr td:first-child {
  width: auto;
}

@media screen and (max-width: 640px) {
  .research-markdown-table-stack.research-markdown-table {
    display: block;
    width: 100%;
    border: 0;
  }

  .research-markdown-table-stack thead {
    display: none;
  }

  .research-markdown-table-stack tbody,
  .research-markdown-table-stack tbody tr {
    display: block;
    width: 100%;
  }

  .research-markdown-table-stack tbody tr {
    padding: 0.875rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 0;
  }

  .research-markdown-table-stack tbody tr:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .research-markdown-table-stack tbody tr:last-child {
    padding-bottom: 0;
  }

  .research-markdown-table-stack tbody tr td {
    display: block;
    padding: 0;
    border-bottom: 0;
    max-width: none;
    width: 100%;
  }

  .research-markdown-table-stack tbody tr td:first-child {
    color: #111111;
    font-weight: 560;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    letter-spacing: -0.00813rem;
    margin-bottom: 0.5rem;
    padding: 0;
  }

  .research-markdown-table-stack tbody tr td:not(:first-child) {
    margin-top: 0.625rem;
  }

  .research-markdown-table-stack tbody tr td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.75rem;
    font-weight: 460;
    line-height: 1rem;
    letter-spacing: -0.0025rem;
    margin-bottom: 0.25rem;
  }

  .research-markdown-table-wrapper:has(.research-markdown-table-stack) {
    overflow-x: visible;
    padding-top: 0.5rem;
  }
}

@media screen and (max-width: 680px) {
  .research-table-wrapper {
    padding-top: 0.75rem;
  }
}

.research-table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding-top: 0.875rem;
}

.research-table-filters[hidden] {
  display: none;
}

.research-table-filter {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 480;
  line-height: 1.15rem;
  letter-spacing: -0.00563rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.research-table-filter:hover {
  color: rgba(0, 0, 0, 0.74);
  border-color: rgba(0, 0, 0, 0.2);
}

.research-table-filter.is-active {
  color: #111111;
  border-color: #111111;
  font-weight: 560;
}

.research-table-filter-count {
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.75rem;
  font-weight: 460;
  font-variant-numeric: tabular-nums;
}

.research-table-filter.is-active .research-table-filter-count {
  color: rgba(0, 0, 0, 0.55);
}

.research-table-filters + .research-table-wrapper {
  padding-top: 0.625rem;
}

/*
 * Shared column-width + cell rules for the named research-table variants.
 * Moved here from account/styles/usage.css so the table component lives with
 * its base definition and every page that renders these tables (dashboard,
 * account, server-rendered /runs) stays in sync.
 */
.research-table-usage th:nth-child(1),
.research-table-usage td:nth-child(1) {
  width: 43%;
}

.research-table-usage th:nth-child(2),
.research-table-usage td:nth-child(2),
.research-table-usage th:nth-child(3),
.research-table-usage td:nth-child(3) {
  width: 10%;
}

.research-table-usage th:nth-child(4),
.research-table-usage td:nth-child(4) {
  width: 27%;
}

.research-table-usage th:nth-child(5),
.research-table-usage td:nth-child(5) {
  width: 10%;
}

.research-table-topics th:nth-child(1),
.research-table-topics td:nth-child(1) {
  width: 52%;
}

.research-table-topics th:nth-child(2),
.research-table-topics td:nth-child(2),
.research-table-topics th:nth-child(3),
.research-table-topics td:nth-child(3),
.research-table-topics th:nth-child(4),
.research-table-topics td:nth-child(4) {
  width: 16%;
}

.research-table-entities th:nth-child(1),
.research-table-entities td:nth-child(1) {
  width: 52%;
}

.research-table-entities th:nth-child(2),
.research-table-entities td:nth-child(2),
.research-table-entities th:nth-child(3),
.research-table-entities td:nth-child(3),
.research-table-entities th:nth-child(4),
.research-table-entities td:nth-child(4) {
  width: 16%;
}

.home-entity-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.home-entity-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
}

.home-entity-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
}

.research-table-usage-admin {
  min-width: 74rem;
}

.research-table-usage-admin th:nth-child(1),
.research-table-usage-admin td:nth-child(1) {
  width: 24%;
}

.research-table-usage-admin th:nth-child(2),
.research-table-usage-admin td:nth-child(2) {
  width: 15%;
}

.research-table-usage-admin th:nth-child(3),
.research-table-usage-admin td:nth-child(3),
.research-table-usage-admin th:nth-child(4),
.research-table-usage-admin td:nth-child(4),
.research-table-usage-admin th:nth-child(5),
.research-table-usage-admin td:nth-child(5),
.research-table-usage-admin th:nth-child(6),
.research-table-usage-admin td:nth-child(6),
.research-table-usage-admin th:nth-child(7),
.research-table-usage-admin td:nth-child(7),
.research-table-usage-admin th:nth-child(8),
.research-table-usage-admin td:nth-child(8),
.research-table-usage-admin th:nth-child(9),
.research-table-usage-admin td:nth-child(9) {
  width: 7%;
}

.research-table-usage-admin th:nth-child(10),
.research-table-usage-admin td:nth-child(10) {
  width: 17%;
}

.research-table-usage tbody tr td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.research-table-skeleton-row td {
  height: 2.5rem;
}

/*
 * Canonical run/topic status color map.
 *
 * Three class families consume the same logical states (succeeded, running,
 * queued, paused, failed/cancelled, ...). They are kept as separate classes
 * because different JS surfaces emit different prefixes, but their colors are
 * defined together here so they can never drift:
 *
 *   .status-text-*   — inline status text in run/runs tables (research-table)
 *   .account-status-* — account/dashboard status text + topic states
 *
 * The .status-pill / .status-<state> pill variants (background + border + color)
 * live with the pill layout in /styles/job/status-message.css.
 */

/* --- Inline status text (run tables, server-rendered /runs) --- */
.status-text-succeeded {
  color: var(--success-color);
}

.status-text-running {
  color: #1d4ed8;
  animation: job-running-pill 2.2s ease-in-out infinite;
}

.status-text-queued {
  color: #4f46e5;
}

.status-text-paused {
  color: #b45309;
}

.status-text-failed,
.status-text-cancelled,
.status-text-canceled {
  color: var(--danger-color);
}

/* --- Account / dashboard status text + topic lifecycle states --- */
.account-status {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.45);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status-succeeded {
  color: #15803d;
}

.account-status-running {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-queued {
  color: #4f46e5;
}

.account-status-paused {
  color: #b45309;
}

.account-status-failed,
.account-status-canceled,
.account-status-cancelled {
  color: var(--danger-color);
}

/* Topic statuses — paused/archived fall through to the muted base color. */
.account-status-active {
  color: #15803d;
}

.account-status-bootstrapping {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-bootstrap-failed {
  color: var(--danger-color);
}

@keyframes account-running-status {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

code {
  position: relative;
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.9em;
  line-height: 1;
  color: rgba(0, 0, 0, 0.75);
  padding: 0.1rem 0.2rem;
}

code::before {
  pointer-events: none;
  content: "";
  position: absolute;
  transform: translateY(-1px);
  inset: -0.1em 0;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  z-index: -1;
}

pre code {
  display: block;
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

pre code::before {
  display: none;
}

ul,
ol {
  list-style: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 2rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  line-height: 1.25rem;
}

.footer a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.footer a::before {
  pointer-events: none;
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  border-radius: 2px;
  background: #d9d9d9;
  transition: background 0.18s ease, transform 0.18s ease;
}

.footer a:hover {
  color: #111111;
}

.footer a:hover::before {
  background: #666666;
  transform: translateY(-0.5px);
}

.footer-commit {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--muted);
}

site-footer {
  display: block;
}

::selection {
  color: var(--selection-color);
  background: var(--selection-bg);
}

::-moz-selection {
  color: var(--selection-color);
  background: var(--selection-bg);
}

:focus-visible {
  outline: 2px solid var(--focus-color);
}

@media screen and (max-width: 520px) {
  dl {
    grid-template-columns: 1fr;
  }

  .harness-node text {
    font-size: 15px;
  }
}

@media screen and (max-width: 900px) {
  .job-page main {
    width: min(100%, var(--researcher-page-width, 64rem));
  }
}

@media screen and (max-width: 680px) {
body.job-page {
  overflow-x: clip;
}

.job-page main {
  width: 100%;
  padding: 1.5rem 1rem 2rem;
  overflow-x: clip;
}

.job-page .site-nav {
  gap: 0.75rem;
  padding-bottom: 1.75rem;
}

/* Raised to `.job-page .job-header` (0,2,0) so this mobile column layout
   beats the base `.job-header { flex-direction: row }` in runs/job-shell.css,
   which is imported later in the cascade and would otherwise win at equal
   specificity — collapsing the title row to width 0 (one char per line). */
.job-page .job-header {
  flex-direction: column;
  gap: 0.75rem;
}

.job-heading,
.job-title-row,
.job-title-copy {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.job-title-copy {
  flex: 1 1 auto;
}

.job-heading h1 {
  max-width: 100%;
  font-size: 1.0625rem;
  line-height: 1.375rem;
  letter-spacing: -0.015rem;
  text-wrap: pretty;
}

.job-kicker {
  max-width: 100%;
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

.job-parent-run-inline {
  max-width: 100%;
}

.job-parent-run-inline .job-parent-run-link {
  flex: 1 1 auto;
  max-width: 100%;
}

.job-header-actions {
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.status-pill-has-detail::after {
  left: 0;
  right: auto;
  width: min(20rem, calc(100vw - 2rem));
}

.job-progress {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.job-progress ol {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem 0.75rem;
}

}

@media screen and (max-width: 680px) {
.job-summary {
  grid-template-columns: 1fr;
  margin-top: 0.75rem;
}

.job-summary > div,
.job-summary > div:nth-child(4n),
.job-summary > div:nth-child(2n) {
  border-right: 0;
}

.job-summary > div,
.job-summary > div:nth-last-child(-n + 4) {
  border-bottom: 1px solid var(--soft-line);
}

.job-summary > div:last-child,
.job-summary > div:nth-last-child(-n + 2):last-child {
  border-bottom: 0;
}

.job-summary p:not(.job-label) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.job-event-actions {
  justify-content: flex-start;
}

.job-dialog-actions {
  justify-content: stretch;
}

.job-dialog-button {
  width: 100%;
}

.job-primary-tabs,
.job-tabbar {
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.job-primary-tabs::-webkit-scrollbar,
.job-tabbar::-webkit-scrollbar {
  display: none;
}

.job-primary-tab,
.job-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.job-view {
  gap: 1.25rem;
  padding-top: 1.25rem;
}

.job-section,
.job-storage-group {
  gap: 0.625rem;
}

.job-section-heading,
.job-report-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

.job-report-title-block {
  gap: 0.5rem;
}

.job-report-title-block h2 {
  max-width: none;
  font-size: 1rem;
  line-height: 1.35rem;
  letter-spacing: -0.014rem;
  text-wrap: pretty;
}

.job-brief-actions {
  gap: 0.5rem;
  padding-top: 0;
}

}

@media screen and (max-width: 680px) {
.job-dialog {
  width: calc(100vw - 1rem);
}

.job-dialog-header,
.job-dialog-content {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.job-brief h3 {
  margin: 2rem 0 0.625rem;
}

.job-brief p,
.job-brief li {
  font-size: 0.8125rem;
  line-height: 1.3125rem;
}

.job-brief ul,
.job-brief ol {
  padding-left: 1.125rem;
}

}

@media screen and (max-width: 680px) {
.job-page .research-table-wrapper,
.job-page .research-markdown-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  padding-top: 0.25rem;
}

.job-page .research-table,
.job-page .research-markdown-table,
.job-page .research-markdown-table-wide {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.job-page .research-table thead,
.job-page .research-markdown-table thead,
.job-page .research-markdown-table-wide thead {
  display: none;
}

.job-page .research-table tbody,
.job-page .research-markdown-table tbody,
.job-page .research-markdown-table-wide tbody {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.job-page .research-table tbody tr,
.job-page .research-markdown-table tbody tr,
.job-page .research-markdown-table-wide tbody tr {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.job-page .research-table tbody tr:first-child,
.job-page .research-markdown-table tbody tr:first-child,
.job-page .research-markdown-table-wide tbody tr:first-child {
  border-top: 0;
}

.job-page .research-table tbody:hover tr,
.job-page .research-markdown-table tbody:hover tr,
.job-page .research-markdown-table-wide tbody:hover tr {
  opacity: 1;
}

.job-page .research-table tbody tr td,
.job-page .research-markdown-table tbody tr td,
.job-page .research-markdown-table-wide tbody tr td {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  border-bottom: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  vertical-align: top;
}

.job-page .research-table tbody tr td:first-child,
.job-page .research-table tbody tr td:last-child,
.job-page .research-markdown-table tbody tr td:first-child,
.job-page .research-markdown-table tbody tr td:last-child,
.job-page .research-markdown-table-wide tbody tr td:first-child,
.job-page .research-markdown-table-wide tbody tr td:last-child {
  padding-left: 0;
  padding-right: 0;
}

.job-page .research-table tbody tr td[data-label]:not([colspan]),
.job-page .research-markdown-table tbody tr td[data-label]:not([colspan]),
.job-page .research-markdown-table-wide tbody tr td[data-label]:not([colspan]) {
  display: grid;
  grid-template-columns: minmax(0, 5.75rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.job-page .research-table tbody tr td[data-label]:not([colspan])::before,
.job-page .research-markdown-table tbody tr td[data-label]:not([colspan])::before,
.job-page .research-markdown-table-wide tbody tr td[data-label]:not([colspan])::before {
  content: attr(data-label);
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 0.9375rem;
  letter-spacing: 0;
}

.job-page .research-table-empty {
  padding: 0.125rem 0 0;
}

.job-page .research-table td a {
  max-width: 100%;
}

.job-page .source-ref-list {
  margin-left: 0;
}

.job-page .source-ref,
.job-page .source-ref-more {
  max-width: 100%;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wrapper {
  max-width: 100%;
  overflow: visible;
  padding: 0.125rem 0 0;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-stack {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: auto;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table thead,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide thead {
  display: none;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody {
  display: grid;
  gap: 0;
  width: 100%;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody tr,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.625rem;
  width: 100%;
  padding: 0.875rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody tr:first-child,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody tr:first-child {
  border-top: 0;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody tr td,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody tr td {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: #111111;
  font-size: 0.8125rem;
  line-height: 1.3125rem;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  hyphens: auto;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody tr td[data-label]:not([colspan]),
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody tr td[data-label]:not([colspan]) {
  display: block;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table tbody tr td[data-label]:not([colspan])::before,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide tbody tr td[data-label]:not([colspan])::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 0.125rem;
  color: rgba(0, 0, 0, 0.48);
  font-size: 0.6875rem;
  font-weight: 520;
  line-height: 1rem;
  letter-spacing: 0;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table .research-markdown-cell-value,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide .research-markdown-cell-value {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table .source-ref-list,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-table-wide .source-ref-list {
  max-width: 100%;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-wrapper {
  overflow-x: auto;
  padding: 0;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table {
  display: table;
  min-width: 54rem;
  table-layout: fixed;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table thead {
  display: table-header-group;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table tbody {
  display: table-row-group;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table tbody tr {
  display: table-row;
  padding: 0;
  border-top: 0;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table thead tr th,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table tbody tr td {
  display: table-cell;
  width: auto;
  max-width: none;
  padding: 0.3125rem 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;
  line-height: 1.0625rem;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table tbody tr td[data-label]:not([colspan]) {
  display: table-cell;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-source-coverage-table tbody tr td[data-label]:not([colspan])::before {
  content: none;
  display: none;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-record-tables {
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-record-table {
  table-layout: fixed;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-record-table th,
.job-page :is(#job-report-view, #job-notes-view) .research-markdown-record-table td {
  padding: 0.4375rem 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.job-page :is(#job-report-view, #job-notes-view) .research-markdown-record-table th {
  width: 7.25rem;
  font-weight: 560;
}

}

@media (prefers-reduced-motion: reduce) {
  .harness-pulse,
  .harness-node rect {
    animation: none;
  }
}

.job-shell {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.job-page main {
  width: min(100%, var(--researcher-page-width, 64rem));
}

.runs-page main {
  width: min(100%, var(--researcher-page-width, 64rem));
}

/*
 * Canonical run/topic status color map.
 *
 * Three class families consume the same logical states (succeeded, running,
 * queued, paused, failed/cancelled, ...). They are kept as separate classes
 * because different JS surfaces emit different prefixes, but their colors are
 * defined together here so they can never drift:
 *
 *   .status-text-*   — inline status text in run/runs tables (research-table)
 *   .account-status-* — account/dashboard status text + topic states
 *
 * The .status-pill / .status-<state> pill variants (background + border + color)
 * live with the pill layout in /styles/job/status-message.css.
 */

/* --- Inline status text (run tables, server-rendered /runs) --- */
.status-text-succeeded {
  color: var(--success-color);
}

.status-text-running {
  color: #1d4ed8;
  animation: job-running-pill 2.2s ease-in-out infinite;
}

.status-text-queued {
  color: #4f46e5;
}

.status-text-paused {
  color: #b45309;
}

.status-text-failed,
.status-text-cancelled,
.status-text-canceled {
  color: var(--danger-color);
}

/* --- Account / dashboard status text + topic lifecycle states --- */
.account-status {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.45);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status-succeeded {
  color: #15803d;
}

.account-status-running {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-queued {
  color: #4f46e5;
}

.account-status-paused {
  color: #b45309;
}

.account-status-failed,
.account-status-canceled,
.account-status-cancelled {
  color: var(--danger-color);
}

/* Topic statuses — paused/archived fall through to the muted base color. */
.account-status-active {
  color: #15803d;
}

.account-status-bootstrapping {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-bootstrap-failed {
  color: var(--danger-color);
}

@keyframes account-running-status {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

/*
 * Shared research-table column-width + cell rules moved to
 * /styles/tables.css (see "Shared column-width" block). Account-specific
 * styling (usage rows, status colors, action buttons) remains below.
 */

.account-usage-skeleton {
  display: block;
  height: 0.625rem;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.25rem;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.035) 0%,
    rgba(0, 0, 0, 0.07) 45%,
    rgba(0, 0, 0, 0.035) 90%
  );
  background-size: 220% 100%;
  animation: account-usage-skeleton 1.2s ease-in-out infinite;
}

.account-usage-skeleton + .account-usage-skeleton {
  margin-top: 0.375rem;
}

.account-usage-skeleton-wide {
  width: min(18rem, 78%);
}

.account-usage-skeleton-short {
  width: min(7rem, 42%);
}

.account-usage-skeleton-price {
  width: 3.75rem;
}

.account-usage-skeleton-actions {
  width: 8.5rem;
}

@keyframes account-usage-skeleton {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-usage-skeleton {
    animation: none;
  }
}

.account-usage-topic-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.account-usage-thumbnail {
  width: 3.25rem;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.035);
  object-fit: cover;
}

.account-usage-topic,
.account-usage-time {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.account-usage-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.account-usage-dot {
  color: rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}

.account-usage-title,
.account-usage-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

/* .account-status / .account-status-* colors live in
 * /styles/components/status.css */

.account-usage-price,
.account-usage-cost {
  min-width: 0;
  color: rgba(0, 0, 0, 0.58);
  font-variant-numeric: tabular-nums;
}

.account-run-id {
  color: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.account-run-id-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.account-run-id-button:hover,
.account-run-id-button:focus-visible {
  color: #111111;
  text-decoration: underline;
}

.account-usage-actions {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  text-align: left;
}

.account-usage-actions-inner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.account-icon-button {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.account-icon-button:hover {
  color: #111111;
}

.account-usage-time {
  justify-items: start;
  color: rgba(0, 0, 0, 0.45);
}

.research-table-usage .account-secondary-link {
  min-width: 5.75rem;
  justify-content: center;
  padding: 0.375rem 0.625rem;
}

.research-table-usage .account-run-action {
  min-width: 3.75rem;
}

.account-error {
  color: var(--danger-color);
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.account-continuation-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-continuation-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.account-continuation-copy p {
  margin: 0;
}

.runs-table th:nth-child(1),
.runs-table td:nth-child(1) {
  width: 44%;
}

.runs-table th:nth-child(2),
.runs-table td:nth-child(2) {
  width: 10%;
}

.runs-table th:nth-child(3),
.runs-table td:nth-child(3) {
  width: 16%;
}

.runs-table th:nth-child(4),
.runs-table td:nth-child(4),
.runs-table th:nth-child(5),
.runs-table td:nth-child(5),
.runs-table th:nth-child(6),
.runs-table td:nth-child(6) {
  width: 10%;
}

.runs-table-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-top: 0.125rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.runs-table-mobile-summary {
  display: none;
}

.runs-table-debug-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.44);
  font-size: 0.71875rem;
  font-variant-numeric: tabular-nums;
  line-height: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-table-topic-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.runs-table-thumbnail {
  width: 3.25rem;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.035);
  object-fit: cover;
}

.runs-table-topic-copy {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.runs-table-title {
  display: block;
}

.runs-open-link {
  display: inline-flex;
  align-items: center;
  min-width: 3.75rem;
  justify-content: center;
  width: fit-content;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.66);
  padding: 0.375rem 0.625rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 560;
  line-height: 1.25rem;
  text-decoration: none;
  transition:
    border-color 110ms ease,
    background-color 110ms ease,
    color 110ms ease,
    transform 110ms ease;
}

.runs-open-link:hover {
  border-color: rgba(0, 0, 0, 0.22);
  color: #111111;
}

.runs-open-link:active {
  transform: translateY(1px);
}

.runs-table-dot {
  color: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.runs-table-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.runs-table-status-cell,
.runs-table-count,
.runs-table-duration {
  color: rgba(0, 0, 0, 0.58);
  font-variant-numeric: tabular-nums;
}

/* .status-text-* status colors live in /styles/components/status.css */

@media screen and (max-width: 680px) {
  body.runs-page {
    overflow-x: clip;
  }

  .runs-page main {
    width: 100%;
    padding: 1.25rem 1rem 2rem;
    overflow-x: clip;
  }

  .runs-page .site-nav {
    display: block;
    padding-bottom: 1.5rem;
    white-space: nowrap;
  }

  .runs-page .site-nav a:nth-of-type(2),
  .runs-page .site-nav a:nth-of-type(3),
  .runs-page .site-nav a:nth-of-type(4),
  .runs-page .site-nav a:nth-of-type(5) {
    display: none;
  }

  .runs-page .site-nav span {
    display: none;
  }

  .runs-page .job-header {
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0;
  }

  .runs-page .job-header h1 {
    font-size: 1.3125rem;
    line-height: 1.625rem;
  }

  .runs-page .job-header .lede {
    margin-top: 0.1875rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .runs-page .status-pill {
    display: none;
  }

  .runs-page .research-table-wrapper {
    overflow: visible;
    padding-top: 0.75rem;
  }

  .runs-page .research-table,
  .runs-page .research-table tbody,
  .runs-page .research-table tr,
  .runs-page .research-table td {
    display: block;
    width: 100%;
  }

  .runs-page .research-table thead {
    display: none;
  }

  .runs-page .research-table tbody {
    color: rgba(0, 0, 0, 0.62);
  }

  .runs-page .research-table tbody:hover tr {
    opacity: 1;
  }

  .runs-page .research-table tbody tr {
    display: block;
    padding: 0.625rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 0;
    background: transparent;
  }

  .runs-page .research-table tbody tr:first-child {
    border-top: 0;
  }

  .runs-page .research-table tbody tr:hover {
    background: transparent;
  }

  .runs-page .research-table tbody tr td {
    min-width: 0;
    max-width: none;
    padding: 0;
    border-bottom: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .runs-page .research-table tbody tr td:first-child {
    width: 100%;
  }

  .runs-page .research-table tbody tr td:nth-child(2),
  .runs-page .research-table tbody tr td:nth-child(3),
  .runs-page .research-table tbody tr td:nth-child(4),
  .runs-page .research-table tbody tr td:nth-child(5),
  .runs-page .research-table tbody tr td:nth-child(6) {
    display: none;
  }

  .runs-page .runs-table-topic-row {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .runs-page .runs-table-thumbnail {
    width: 3.25rem;
    margin-top: 0.0625rem;
    border-radius: 0.25rem;
  }

  .runs-page .runs-table-topic-copy {
    gap: 0.0625rem;
    min-width: 0;
  }

  .runs-page .research-table td a.runs-table-title {
    position: static;
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #111111;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.125rem;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .runs-page .research-table td a.runs-table-title:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
  }

  .runs-page .runs-table-meta,
  .runs-page .runs-table-debug-meta {
    gap: 0.25rem;
    padding-top: 0;
    overflow: hidden;
    font-size: 0.71875rem;
    line-height: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .runs-page .runs-table-meta {
    color: rgba(0, 0, 0, 0.48);
  }

  .runs-page .runs-table-debug-meta {
    color: rgba(0, 0, 0, 0.38);
    display: block;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .runs-page .runs-table-debug-meta span {
    display: inline;
  }

  .runs-page .research-table-empty {
    padding: 0.25rem 0;
  }
}

.job-page .job-header,
.job-page .job-message,
.job-page .job-summary,
.job-page .job-media-header,
.job-page .job-progress,
.job-page .job-chat-launch,
.job-page .job-primary-tabs,
.job-page .job-view,
.job-page .job-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.job-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.25rem;
}

/*
 * Base .job-section / .status-pill so the server-rendered /runs page is fully
 * styled by its own slim bundle (app-base + runs) without pulling in the whole
 * job tree. Canonical copies also live in /styles/job/report-shell/section-
 * layout.css and /styles/job/status-message.css; these are identical, so the
 * full app bundle (which loads both) renders the same either way.
 */
.job-section {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.status-pill {
  appearance: none;
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 4.5rem;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.6);
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: default;
}

.job-page.is-run-loading #job-title,
.entity-page.is-entity-loading #entity-name,
.entity-page.is-entity-loading #entity-kind,
.entity-page.is-entity-loading #entity-summary,
.job-value-loading,
.job-page.is-run-loading #job-status,
.entity-page.is-entity-loading #entity-status {
  position: relative;
  color: transparent;
  user-select: none;
}

.job-page.is-run-loading #job-title,
.entity-page.is-entity-loading #entity-name {
  width: min(30rem, 72vw);
  max-width: 100%;
}

.entity-page.is-entity-loading #entity-kind {
  display: inline-flex;
  width: 8rem;
  min-height: 1rem;
}

.entity-page.is-entity-loading #entity-summary {
  display: block;
  width: min(46rem, 100%);
  min-height: 2.7rem;
}

.job-value-loading {
  min-height: 1.125rem;
}

.job-page.is-run-loading #job-status,
.entity-page.is-entity-loading #entity-status {
  width: 4.75rem;
  border-color: var(--soft-line);
  background: #ffffff;
  animation: none;
}

.job-page.is-run-loading #job-title::after,
.entity-page.is-entity-loading #entity-name::after,
.entity-page.is-entity-loading #entity-kind::after,
.entity-page.is-entity-loading #entity-summary::before,
.entity-page.is-entity-loading #entity-summary::after,
.job-value-loading::after,
.job-page.is-run-loading #job-status::after,
.entity-page.is-entity-loading #entity-status::after,
.research-skeleton-line,
.research-table-loading-row td::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  max-width: 100%;
  height: 0.75rem;
  border-radius: 0.25rem;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.055) 0%,
    rgba(0, 0, 0, 0.095) 45%,
    rgba(0, 0, 0, 0.055) 100%
  );
  background-size: 180% 100%;
  transform: translateY(-50%);
  animation: job-skeleton 1.15s ease-in-out infinite;
}

.job-page.is-run-loading #job-title::after,
.entity-page.is-entity-loading #entity-name::after {
  height: 1.35rem;
}

.entity-page.is-entity-loading #entity-summary::before {
  top: 0.35rem;
  width: 100%;
  transform: none;
}

.entity-page.is-entity-loading #entity-summary::after {
  top: 1.8rem;
  width: min(36rem, 76%);
  transform: none;
}

.job-page.is-run-loading #job-status::after,
.entity-page.is-entity-loading #entity-status::after {
  inset: 0;
  height: auto;
  border-radius: inherit;
  transform: none;
}

.research-skeleton-stack {
  display: grid;
  gap: 0.4rem;
  width: min(46rem, 100%);
}

.research-skeleton-line {
  display: block;
  width: 100%;
  height: 0.75rem;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}

.research-skeleton-copy.is-medium {
  width: 74%;
}

.research-skeleton-copy.is-short {
  width: 48%;
}

.research-table-loading-row td {
  position: relative;
  color: transparent;
  user-select: none;
}

.research-table-loading-row td::after {
  width: var(--research-skeleton-width, 64%);
}

@keyframes job-skeleton {
  0% {
    background-position: 160% 0;
  }
  100% {
    background-position: -160% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entity-page.is-entity-loading #entity-name::after,
  .entity-page.is-entity-loading #entity-kind::after,
  .entity-page.is-entity-loading #entity-summary::before,
  .entity-page.is-entity-loading #entity-summary::after,
  .entity-page.is-entity-loading #entity-status::after,
  .research-skeleton-line,
  .research-table-loading-row td::after {
    animation: none;
  }
}

.status-pill {
  appearance: none;
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 4.5rem;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.6);
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: default;
}

.status-pill-has-detail {
  cursor: help;
}

.status-pill-has-detail::after {
  content: attr(data-status-detail);
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: min(22rem, calc(100vw - 2rem));
  border: 1px solid var(--soft-line);
  border-radius: 0.625rem;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.76);
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.25rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.status-pill-has-detail:hover::after,
.status-pill-has-detail:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.status-pending,
.status-queued {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.58);
}

.status-succeeded {
  border-color: rgba(101, 196, 102, 0.3);
  background: rgba(101, 196, 102, 0.1);
  color: var(--success-color);
}

.status-warning {
  border-color: rgba(180, 83, 9, 0.22);
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
}

.status-running,
.status-loading,
.status-generating-report {
  border-color: rgba(36, 128, 237, 0.22);
  background: rgba(36, 128, 237, 0.07);
  color: #1d4ed8;
}

.status-running,
.status-loading,
.status-generating-report,
.job-progress.is-running li.is-active .job-progress-track {
  will-change: transform, opacity, background-position, box-shadow;
}

.status-running,
.status-loading,
.status-generating-report {
  animation: job-running-pill 2.2s ease-in-out infinite;
}

.status-failed,
.status-auth {
  border-color: var(--danger-line);
  background: var(--danger-tint);
  color: var(--danger-color);
}

.status-cancelled,
.status-paused,
.status-missing {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.035);
  color: rgba(0, 0, 0, 0.58);
}

.status-awaiting-funding {
  border-color: rgba(180, 83, 9, 0.25);
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.job-message {
  margin-top: 1rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.68);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

.job-message-warning {
  border-color: rgba(180, 83, 9, 0.2);
  background: rgba(245, 158, 11, 0.06);
  color: #92400e;
}

.job-message-error {
  border-color: var(--danger-soft-line);
  background: var(--danger-tint);
  color: var(--danger-color);
}

.job-message-neutral {
  border-color: var(--soft-line);
  background: #ffffff;
  color: rgba(0, 0, 0, 0.68);
}

.job-funding-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  border: 1px dashed rgba(180, 83, 9, 0.3);
  border-radius: 0.625rem;
  background: rgba(245, 158, 11, 0.06);
  color: #92400e;
  padding: 0.875rem 1rem;
}

.job-funding-panel-lock {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.25rem;
}

.job-funding-panel-copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.job-funding-panel-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

.job-funding-panel-detail {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  font-weight: 460;
  line-height: 1.25rem;
  color: rgba(146, 64, 14, 0.8);
}

.job-funding-panel-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

.job-funding-panel-fund {
  appearance: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 999px;
  background: #92400e;
  color: #ffffff;
  padding: 0.3125rem 0.875rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 560;
  line-height: 1.25rem;
  text-decoration: none;
  cursor: pointer;
}

.job-funding-panel-fund:hover {
  background: #7c3a0c;
}

.job-funding-panel-resume {
  appearance: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #92400e;
  padding: 0.3125rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 560;
  line-height: 1.25rem;
  cursor: pointer;
}

.job-funding-panel-resume:hover {
  background: rgba(245, 158, 11, 0.12);
}

.job-funding-panel-resume:disabled {
  opacity: 0.6;
  cursor: default;
}

.job-dialog.job-funding-dialog {
  width: min(28rem, calc(100vw - 2rem));
  box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.12);
}

.job-funding-dialog-header {
  align-items: flex-start;
}

.job-funding-dialog-eyebrow,
.job-funding-dialog-header h2,
.job-funding-dialog-status,
.job-funding-address-description,
.job-funding-dialog-note {
  margin: 0;
}

.job-funding-dialog-eyebrow {
  color: rgba(0, 0, 0, 0.42);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 0.875rem;
  text-transform: uppercase;
}

.job-funding-dialog-header h2 {
  margin-top: 0.125rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25rem;
}

.job-funding-dialog-content {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.job-funding-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.625rem 0.75rem;
}

.job-funding-balance-row span {
  color: rgba(0, 0, 0, 0.48);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1rem;
}

.job-funding-balance-row strong {
  color: #111111;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.25rem;
}

.job-funding-dialog-status,
.job-funding-address-description,
.job-funding-dialog-note {
  color: rgba(0, 0, 0, 0.62);
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1.25rem;
}

.job-funding-dialog-status.is-error {
  color: var(--danger-color);
}

.job-funding-chain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.job-funding-chain-button {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1rem;
  padding: 0.375rem 0.625rem;
  cursor: pointer;
}

.job-funding-chain-button:hover {
  border-color: rgba(0, 0, 0, 0.14);
  color: #111111;
}

.job-funding-chain-button.is-active {
  border-color: #111111;
  color: #111111;
}

.job-funding-qr-frame {
  width: fit-content;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.75rem;
}

.job-funding-qr-frame img {
  display: block;
}

.job-funding-address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.5rem 0.625rem;
}

.job-funding-address-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-code);
  font-size: 0.75rem;
}

.job-funding-address-row button {
  flex-shrink: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.375rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.job-funding-dialog-actions {
  gap: 0.5rem;
}

.job-funding-dialog .job-dialog-button {
  min-height: 2.125rem;
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 560;
}

.account-page main {
  width: min(100%, var(--researcher-page-width, 64rem));
}

/* .site-nav + button styling (incl. the :has column-flow) now lives in the
   shared base nav-shell.css so every page with the + button matches. */

.account-page article {
  max-width: none;
}

.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-header-action-placeholder {
  display: block;
  flex-shrink: 0;
  width: 4.5rem;
  height: 2.25rem;
}

.account-login-state {
  display: grid;
  align-content: center;
  gap: 1.5rem;
  justify-items: center;
  padding-top: 0;
}

.account-conversion-shell {
  width: min(100%, 34rem);
  min-height: auto;
  margin-inline: auto;
  align-content: center;
}

.account-login-state.account-conversion-shell {
  min-height: max(12rem, calc(100svh - 17.5rem));
}

.account-conversion-copy {
  display: grid;
  gap: 1.125rem;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.account-conversion-copy h1 {
  max-width: 100%;
  margin: 0;
}

.account-conversion-lede {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
}

.account-login-cta {
  width: fit-content;
  min-height: 2.75rem;
  min-width: 12rem;
  justify-content: center;
  margin-top: 0.375rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .account-login-cta:hover {
    border-color: #000000;
    background: #000000;
    box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
  }
}

.account-login-cta:active {
  transform: translateY(0);
}

.account-login-cta:disabled,
.account-login-cta:disabled:hover,
.account-login-cta:disabled:active {
  background: #111111;
  box-shadow: none;
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.account-balance-panel {
  display: grid;
  gap: 0.875rem;
  padding-top: 2.25rem;
}

.account-balance-card {
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.account-balance-value {
  font-size: 2rem;
  font-weight: 560;
  line-height: 2rem;
  letter-spacing: -0.04em;
}

.account-show-address-button,
.account-hide-button {
  all: unset;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #111111;
  border-radius: 999px;
  color: #111111;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
}

.account-hide-button {
  border: 0;
  padding: 0;
  color: var(--muted);
}

.account-chain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.account-chain-pill {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.account-chain-pill.is-active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.account-chain-pill.is-outlined {
  color: rgba(0, 0, 0, 0.52);
}

.account-chain-pill.is-outlined-active {
  border-color: #111111;
  color: #111111;
}

.account-deposit-section {
  display: grid;
  gap: 1rem;
  padding-top: 0.25rem;
}

.account-qr-frame {
  width: fit-content;
  padding: 1rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
}

.account-qr-frame img {
  display: block;
}

.account-address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.625rem 0.75rem;
}

.account-address-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-code);
  font-size: 0.75rem;
}

.account-address-row button {
  flex-shrink: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.375rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.account-section {
  padding-top: 2.25rem;
}

.account-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-section-heading .section-label {
  padding-bottom: 0.75rem;
}

.account-section-heading .account-primary-button {
  flex-shrink: 0;
}

.account-agent-setup {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
}

.account-agent-setup .section-label {
  padding-bottom: 0;
}

.account-agent-setup .account-new-key {
  margin-top: 0;
}

.account-discord-empty {
  display: grid;
  gap: 0;
  padding-top: 0.25rem;
}

.account-discord-connected-list {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.account-discord-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
}

.account-discord-connected-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.055), #ffffff 48%);
  padding: 1rem;
}

.account-discord-card-copy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.account-discord-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.5rem;
  background: rgba(88, 101, 242, 0.08);
  color: #5865f2;
}

.account-discord-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.account-discord-connected-copy {
  min-width: 0;
}

.account-discord-connected-name {
  margin: 0;
  overflow: hidden;
  color: #111111;
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.35rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-discord-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.account-link-flow {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 34rem);
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 1rem;
}

.account-link-flow .section-label {
  padding-bottom: 0;
}

.account-link-flow h2 {
  margin: 0;
}

.account-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.section-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1rem;
  padding-bottom: 0.75rem;
  text-transform: uppercase;
}

.account-card {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.875rem;
}

.account-row,
.account-key-item,
.account-run-item,
.account-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.account-row span:first-child,
.account-muted,
.account-description {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 460;
  line-height: 1.25rem;
}

.account-description-faint {
  opacity: 0.5;
}

.account-auth-pending {
  pointer-events: none;
}

.account-skeleton-line,
.account-skeleton-section {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeeee;
}

.account-skeleton-line::after,
.account-skeleton-section::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: account-skeleton-sheen 1.2s ease-in-out infinite;
}

.account-skeleton-line {
  height: 0.875rem;
}

.account-skeleton-line.is-title {
  width: min(14rem, 72%);
  height: 1.25rem;
}

.account-skeleton-line.is-medium {
  width: min(24rem, 86%);
}

.account-skeleton-line.is-wide {
  width: min(34rem, 100%);
}

.account-skeleton-balance {
  width: min(8rem, 46%);
  height: 2rem;
  border-radius: 0.375rem;
}

.account-skeleton-button {
  position: relative;
  display: inline-flex;
  width: 8.75rem;
  height: 2.25rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeeee;
}

.account-skeleton-button-small {
  width: 4.25rem;
  height: 1.875rem;
  border-radius: 0.375rem;
}

.account-skeleton-section {
  width: 100%;
  height: 5.25rem;
  border-radius: 0.5rem;
}

.account-key-item-skeleton {
  min-height: 4.125rem;
}

.account-discord-skeleton-card {
  min-height: 4.375rem;
}

.account-discord-icon-skeleton {
  background: #eeeeee;
}

.account-skeleton-button::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: account-skeleton-sheen 1.2s ease-in-out infinite;
}

@keyframes account-skeleton-sheen {
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-skeleton-line::after,
  .account-skeleton-section::after,
  .account-skeleton-button::after {
    animation: none;
  }
}

.account-row span:last-child,
.account-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-empty {
  display: grid;
  gap: 1rem;
}

.account-key-form {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.875rem;
}

.account-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.625rem 0.75rem;
  outline: none;
}

.account-input:focus {
  border-color: #d9d9d9;
}

.account-select-shell {
  position: relative;
  display: block;
}

.account-select-shell::after {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid rgba(0, 0, 0, 0.58);
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.58);
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.account-select {
  width: 100%;
  appearance: none;
  cursor: pointer;
  padding-right: 2.25rem;
}

.account-select:disabled {
  cursor: default;
}

.account-field {
  display: grid;
  gap: 0.375rem;
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.8125rem;
  font-weight: 520;
  line-height: 1.25rem;
}

.account-form-error {
  margin: 0;
  color: var(--danger-color);
  font-size: 0.875rem;
  line-height: 1.35rem;
}

.account-modal-layer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.215, 0.61, 0.355, 1);
}

.account-modal-layer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(248, 248, 247, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.account-modal-positioner {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 29rem);
}

.account-modal {
  display: grid;
  gap: 1rem;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
  padding: 1rem;
  opacity: 0;
  transform: translateY(0.5rem) scale(0.98);
  transform-origin: center top;
  transition:
    opacity 160ms cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 160ms cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: opacity, transform;
}

.account-modal-layer.is-open .account-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.account-modal-layer.is-closing .account-modal {
  opacity: 0;
  transform: translateY(0.25rem) scale(0.99);
}

.account-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-modal-header .section-label {
  padding-bottom: 0.25rem;
}

.account-modal-close {
  display: inline-grid;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  cursor: pointer;
  padding: 0;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}

.account-modal-close:hover {
  border-color: rgba(0, 0, 0, 0.16);
  color: #111111;
  background: #f8f8f8;
}

.account-modal-close:disabled,
.account-modal-close[aria-disabled="true"] {
  cursor: default;
  opacity: 0.45;
}

.account-modal-key {
  margin-top: 0;
}

.account-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.account-modal-actions .account-primary-button,
.account-modal-actions .account-link-button {
  min-width: 6.5rem;
}

.account-modal :focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

.account-primary-button,
.account-link-button,
.account-secondary-button,
.account-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid #111111;
  border-radius: 0.5rem;
  background: #111111;
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 560;
  line-height: 1.25rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 110ms ease,
    background-color 110ms ease,
    color 110ms ease,
    transform 110ms ease;
}

.account-primary-button:active,
.account-link-button:active,
.account-secondary-button:active,
.account-secondary-link:active {
  transform: translateY(1px);
}

.account-primary-button:disabled,
.account-primary-button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.45;
}

.account-link-button:disabled,
.account-secondary-button:disabled,
.account-secondary-link:disabled,
.account-link-button[aria-disabled="true"],
.account-secondary-button[aria-disabled="true"],
.account-secondary-link[aria-disabled="true"] {
  cursor: default;
  opacity: 0.45;
}

.account-link-button,
.account-secondary-button,
.account-secondary-link {
  border-color: var(--soft-line);
  background: #ffffff;
  color: rgba(0, 0, 0, 0.66);
}

.account-danger-button {
  border-color: var(--danger-color);
  background: var(--danger-color);
  color: #ffffff;
}

.account-danger-button:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--danger-color-hover);
  background: var(--danger-color-hover);
}

.account-delete-run-title {
  color: rgba(0, 0, 0, 0.82);
  font-weight: 560;
  overflow-wrap: anywhere;
}

.account-new-key {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.875rem;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 0.5rem;
  background: rgba(34, 197, 94, 0.055);
  padding: 0.75rem 0.875rem;
}

.account-new-key p {
  color: #15803d;
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.account-copy-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy-row button,
.account-key-item button,
.account-code-block button {
  flex-shrink: 0;
  border: 1px solid var(--soft-line);
  border-radius: 0.375rem;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.account-key-list,
.account-run-list {
  display: grid;
  gap: 0.375rem;
  padding-top: 0.875rem;
}

.account-key-item,
.account-run-item {
  border: 1px solid var(--soft-line);
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.875rem 1rem;
  text-decoration: none;
}

.account-key-meta,
.account-run-meta {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.account-key-meta {
  flex: 1;
}

.account-key-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-key-actions,
.account-key-edit-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.account-key-edit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.account-key-edit-input {
  min-height: 2rem;
  padding: 0.375rem 0.5rem;
}

.account-run-item span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-run-item span:last-child,
.account-run-status {
  color: var(--muted);
  font-size: 0.75rem;
}

.account-run-status {
  flex-shrink: 0;
}

.account-code-block {
  padding-top: 0.875rem;
}

/*
 * Canonical run/topic status color map.
 *
 * Three class families consume the same logical states (succeeded, running,
 * queued, paused, failed/cancelled, ...). They are kept as separate classes
 * because different JS surfaces emit different prefixes, but their colors are
 * defined together here so they can never drift:
 *
 *   .status-text-*   — inline status text in run/runs tables (research-table)
 *   .account-status-* — account/dashboard status text + topic states
 *
 * The .status-pill / .status-<state> pill variants (background + border + color)
 * live with the pill layout in /styles/job/status-message.css.
 */

/* --- Inline status text (run tables, server-rendered /runs) --- */
.status-text-succeeded {
  color: var(--success-color);
}

.status-text-running {
  color: #1d4ed8;
  animation: job-running-pill 2.2s ease-in-out infinite;
}

.status-text-queued {
  color: #4f46e5;
}

.status-text-paused {
  color: #b45309;
}

.status-text-failed,
.status-text-cancelled,
.status-text-canceled {
  color: var(--danger-color);
}

/* --- Account / dashboard status text + topic lifecycle states --- */
.account-status {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.45);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status-succeeded {
  color: #15803d;
}

.account-status-running {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-queued {
  color: #4f46e5;
}

.account-status-paused {
  color: #b45309;
}

.account-status-failed,
.account-status-canceled,
.account-status-cancelled {
  color: var(--danger-color);
}

/* Topic statuses — paused/archived fall through to the muted base color. */
.account-status-active {
  color: #15803d;
}

.account-status-bootstrapping {
  color: #1d4ed8;
  animation: account-running-status 1.7s ease-in-out infinite;
}

.account-status-bootstrap-failed {
  color: var(--danger-color);
}

@keyframes account-running-status {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

/*
 * Shared research-table column-width + cell rules moved to
 * /styles/tables.css (see "Shared column-width" block). Account-specific
 * styling (usage rows, status colors, action buttons) remains below.
 */

.account-usage-skeleton {
  display: block;
  height: 0.625rem;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.25rem;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.035) 0%,
    rgba(0, 0, 0, 0.07) 45%,
    rgba(0, 0, 0, 0.035) 90%
  );
  background-size: 220% 100%;
  animation: account-usage-skeleton 1.2s ease-in-out infinite;
}

.account-usage-skeleton + .account-usage-skeleton {
  margin-top: 0.375rem;
}

.account-usage-skeleton-wide {
  width: min(18rem, 78%);
}

.account-usage-skeleton-short {
  width: min(7rem, 42%);
}

.account-usage-skeleton-price {
  width: 3.75rem;
}

.account-usage-skeleton-actions {
  width: 8.5rem;
}

@keyframes account-usage-skeleton {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-usage-skeleton {
    animation: none;
  }
}

.account-usage-topic-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.account-usage-thumbnail {
  width: 3.25rem;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.035);
  object-fit: cover;
}

.account-usage-topic,
.account-usage-time {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.account-usage-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.account-usage-dot {
  color: rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}

.account-usage-title,
.account-usage-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

/* .account-status / .account-status-* colors live in
 * /styles/components/status.css */

.account-usage-price,
.account-usage-cost {
  min-width: 0;
  color: rgba(0, 0, 0, 0.58);
  font-variant-numeric: tabular-nums;
}

.account-run-id {
  color: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.account-run-id-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.account-run-id-button:hover,
.account-run-id-button:focus-visible {
  color: #111111;
  text-decoration: underline;
}

.account-usage-actions {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  text-align: left;
}

.account-usage-actions-inner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.account-icon-button {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.62);
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.account-icon-button:hover {
  color: #111111;
}

.account-usage-time {
  justify-items: start;
  color: rgba(0, 0, 0, 0.45);
}

.research-table-usage .account-secondary-link {
  min-width: 5.75rem;
  justify-content: center;
  padding: 0.375rem 0.625rem;
}

.research-table-usage .account-run-action {
  min-width: 3.75rem;
}

.account-error {
  color: var(--danger-color);
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.account-continuation-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-continuation-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.account-continuation-copy p {
  margin: 0;
}

@media screen and (min-width: 768px) {
  .account-balance-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .account-login-state.account-conversion-shell {
    min-height: calc(100svh - 11.5rem);
  }
}

@media screen and (max-width: 680px) {
  .account-page main {
    padding: 1.25rem 1rem 2.25rem;
  }

  .account-login-state.account-conversion-shell {
    min-height: calc(100svh - 10rem);
  }

  .account-conversion-shell {
    gap: 1.25rem;
    padding-top: 0;
  }

  .account-login-cta {
    width: 100%;
    min-height: 3.5rem;
  }

  .account-key-form {
    flex-direction: column;
  }

  .account-section-heading {
    flex-direction: column;
  }

  .account-section-heading .account-primary-button {
    width: 100%;
  }

  .account-discord-card {
    grid-template-columns: 1fr;
  }

  .account-discord-connected-card {
    grid-template-columns: 1fr;
  }

  .account-discord-card .account-primary-button {
    width: 100%;
  }

  .account-discord-connected-card .account-secondary-button {
    width: 100%;
  }

  .account-key-form .account-primary-button {
    width: 100%;
    justify-content: center;
  }

  .account-key-item,
  .account-key-edit {
    align-items: stretch;
    flex-direction: column;
  }

  .account-key-actions,
  .account-key-edit-actions {
    width: 100%;
  }

  .account-key-actions button,
  .account-key-edit-actions button {
    flex: 1;
  }

  .account-continuation-banner {
    flex-direction: column;
  }

  .account-modal-actions {
    flex-direction: column-reverse;
  }

  .account-modal-actions .account-primary-button,
  .account-modal-actions .account-link-button {
    width: 100%;
  }

  .research-table-wrapper {
    padding-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-modal-layer,
  .account-modal {
    transition: none;
  }

  .account-modal {
    transform: none;
  }

  .account-modal-layer.is-open .account-modal,
  .account-modal-layer.is-closing .account-modal {
    transform: none;
  }
}
