/* Account console (/app) components. Loads after the legacy sheets and
   uses ui-tokens names. Order matters: (1) the account console rules
   migrated verbatim from the legacy sheets — selector-scoped to
   .app-page / body[data-brand-page=app] / the account component classes,
   with #brand-site rewritten to body[data-brand-page=app] and element
   #ids rewritten to the matching classes added in app.html; (2) the S3
   job-history DataRow + overflow menu components; (3) the S3
   intended-change overrides; (4) verbatim incumbent copies for shared
   rules that used to win ties against migrated rules. Later sections win
   the ties they won when these components lived in ui-account.css ahead
   of the migration. */

/* ── migrated from styles.css ── */
.agent-strip {
  display: flex;
  align-items: center;
}
.agent-strip a,
.agent-strip span {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 760;
}
.app-card p {
  color: var(--muted);
}
.job-history-row.has-compensation {
  border-color: color-mix(in srgb, var(--coral) 38%, var(--line));
}
.agent-strip {
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  margin: 28px auto 0;
}
.agent-strip span,
.agent-strip a {
  padding: 9px 13px;
}
.agent-strip a {
  border-color: rgba(36, 87, 230, 0.24);
  color: var(--blue);
}
.app-grid {
  display: grid;
  gap: 18px;
}
.app-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.76);
}
.app-card {
  min-width: 0;
  padding: 22px;
}
.app-card :not(pre) > code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.app-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 18px;
}
.app-card h2 {
  font-size: clamp(1.28rem, 1.8vw, 1.75rem);
  line-height: 1.08;
}
.app-card p,
.app-card li {
  font-size: 0.98rem;
  line-height: 1.55;
}
.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.app-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.app-card.wide {
  grid-column: 1 / -1;
}
.app-card-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}
.app-card-head h2 {
  margin-bottom: 8px;
}
.auth-screen {
  display: grid;
  align-items: start;
  justify-items: center;
  /* 60rem is the resolved card's tallest measured box plus the section
     padding: whichever capability answer lands, the screen never gets
     shorter, so the footer below it never moves. */
  min-height: max(60rem, calc(100vh - 190px));
  padding: 26px 0 64px;
}
/* Pending capability: the email panel keeps its resolved box but stays
   invisible until the capability response flips it to shown or is-hidden,
   so the reveal never pushes the content below. */
.app-page .email-auth-panel.is-pending {
  visibility: hidden;
}
/* Status text arrives late; reserve the two lines the card can take so a
   longer error or note does not shift the layout. */
.app-page .app-status {
  min-height: 2lh;
}
/* The social-login note empties once the capability answer lands; keep its
   line reserved so the card does not shrink. */
.app-page #social-login-note {
  min-height: 1lh;
}
.auth-card.account-entry {
  margin: 0 auto;
}
.account-entry .compact-form.auth-form {
  padding: 0;
  border: 0;
  background: transparent;
}
.auth-intent {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(31, 91, 216, 0.24);
  border-radius: var(--r-md);
  background: rgba(234, 241, 255, 0.72);
}
.plan-note {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.plan-note a {
  color: var(--signal);
  font-weight: 700;
}
.job-lookup-details {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}
.job-lookup-details summary {
  cursor: pointer;
  font-weight: 700;
}
.job-lookup-details[open] summary {
  margin-bottom: 0.85rem;
}
.auth-intent {
  display: grid;
  gap: 4px;
}
.auth-intent strong,
.auth-intent span {
  display: block;
}
.auth-intent strong {
  color: var(--blue);
}
.auth-intent span {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.42;
}
.auth-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(216, 85, 69, 0.28);
  border-radius: var(--r-md);
  background: rgba(255, 244, 241, 0.86);
}
.auth-alert.is-error {
  box-shadow: 0 14px 30px rgba(216, 85, 69, 0.1);
}
.auth-alert strong,
.auth-alert span {
  display: block;
}
.auth-alert strong {
  color: #9f2b1f;
}
.auth-alert span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.42;
}
.auth-alert button {
  border: 1px solid rgba(159, 43, 31, 0.26);
  border-radius: var(--r-md);
  background: #fff;
  color: #9f2b1f;
  cursor: pointer;
  font: inherit;
  font-weight: 820;
  padding: 10px 12px;
  white-space: nowrap;
}
.app-card.is-focus {
  border-color: rgba(31, 91, 216, 0.5);
  box-shadow: 0 18px 42px rgba(31, 91, 216, 0.14);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.auth-step-heading h2 {
  margin: 8px 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.05;
}
.auth-step-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.back-action {
  justify-self: start;
  margin: 0 0 6px;
}
.password-recovery {
  padding-top: 2px;
}
.auth-step-heading {
  margin-bottom: 18px;
  text-align: left;
}
.account-dashboard {
  display: block;
}
.account-dashboard.is-hidden {
  display: none;
}
html.has-cached-account .auth-screen {
  display: none !important;
}
html.has-cached-account .account-dashboard.is-hidden {
  display: block !important;
}
html.has-cached-account[data-initial-account-route="overview"]
  [data-account-section]:not([data-account-section="overview"]),
html.has-cached-account[data-initial-account-route="history"]
  [data-account-section]:not([data-account-section="history"]),
html.has-cached-account[data-initial-account-route="billing"]
  [data-account-section]:not([data-account-section="billing"]),
html.has-cached-account[data-initial-account-route="developer"]
  [data-account-section]:not([data-account-section="developer"]),
html.has-cached-account[data-initial-account-route="invite"]
  [data-account-section]:not([data-account-section="invite"]) {
  display: none !important;
}
html.has-cached-account[data-initial-account-route="overview"]
  [data-account-section="overview"][hidden],
html.has-cached-account[data-initial-account-route="history"]
  [data-account-section="history"][hidden],
html.has-cached-account[data-initial-account-route="billing"]
  [data-account-section="billing"][hidden],
html.has-cached-account[data-initial-account-route="developer"]
  [data-account-section="developer"][hidden],
html.has-cached-account[data-initial-account-route="invite"]
  [data-account-section="invite"][hidden] {
  display: block !important;
}
.account-section-nav {
  position: sticky;
  z-index: 8;
  top: 78px;
  display: flex;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 24px rgba(45, 32, 20, 0.06);
}
.account-section-nav a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}
.account-section-nav a.active {
  background: var(--ink);
  color: #fff;
}
.account-dashboard .app-shell {
  display: block;
}
.account-dashboard .app-grid {
  width: 100%;
}
.billing-checkout-panel {
  margin-top: 20px;
}
.billing-choice-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(180px, 0.55fr) minmax(
      320px,
      1.28fr
    );
  gap: 12px;
}
.billing-choice-grid .select-row + .select-row {
  margin-top: 0;
}
.app-page .billing-checkout-row .billing-action-status {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 720;
}
.app-page .billing-checkout-row .billing-action-status.is-error {
  color: #9f2b1f;
}
.billing-account-status {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.plan-change-banner {
  margin-top: 16px;
}
.plan-change-banner-inner,
.billing-current-plan-inner {
  padding: 14px 16px;
  border: 1px solid rgba(40, 113, 83, 0.26);
  border-radius: var(--r-lg);
  background: rgba(232, 247, 239, 0.58);
}
.plan-change-banner-inner strong,
.billing-current-plan-inner strong {
  display: block;
  color: var(--ink);
}
.plan-change-banner-inner p,
.billing-current-plan-inner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.plan-change-banner-inner .button-row,
.billing-current-plan-inner .button-row {
  margin-top: 12px;
}
.billing-current-plan {
  margin-top: 12px;
}
.account-overview {
  margin-bottom: 28px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(23, 19, 15, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(
      130deg,
      rgba(255, 253, 248, 0.98),
      rgba(255, 240, 232, 0.76) 58%,
      rgba(232, 242, 236, 0.78)
    ),
    var(--surface);
  box-shadow: var(--shadow);
}
.account-overview-head,
.account-head-actions {
  display: flex;
  align-items: center;
}
.account-overview-head {
  gap: 24px;
  justify-content: space-between;
}
.app-page .account-overview .dashboard-title {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 850;
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  .app-page .account-overview .dashboard-title {
    font-size: 32px;
    line-height: 36px;
  }
}
.account-overview .eyebrow {
  margin-bottom: 8px;
}
.app-page .account-overview .session-summary {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.app-page .account-overview .session-summary.is-pending {
  color: var(--amber);
}
.account-head-actions {
  flex: 0 0 auto;
  gap: 10px;
}
.account-primary-metrics {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px;
  margin-top: 30px;
}
.account-primary-metrics-compact {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
}
.account-primary-metrics article {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}
.account-primary-metrics .credit-balance-card {
  border-color: rgba(230, 83, 34, 0.32);
  background: var(--ink);
  color: #fff;
}
.account-primary-metrics span,
.account-primary-metrics strong,
.account-primary-metrics small {
  display: block;
}
.account-primary-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.account-primary-metrics strong {
  margin: 8px 0 6px;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1;
}
.account-primary-metrics small {
  color: var(--muted);
  line-height: 1.4;
}
.account-primary-metrics .credit-balance-card span,
.account-primary-metrics .credit-balance-card small {
  color: rgba(255, 255, 255, 0.7);
}
.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.account-settings-grid-simple {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
}
.account-access-details {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}
.account-access-details summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 820;
}
.account-access-details summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}
.account-access-details[open] summary {
  margin-bottom: 18px;
}
.account-access-details .connected-methods {
  margin-bottom: 14px;
}
.account-password-form {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.account-password-form.is-hidden {
  display: none;
}
.form-feedback {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 700;
}
.form-feedback.is-error {
  color: #9f2b1f;
}
.connected-methods {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(36, 87, 230, 0.16);
  border-radius: var(--r-md);
  background: rgba(243, 247, 255, 0.68);
}
.connected-methods > strong {
  color: var(--ink);
  font-size: 0.9rem;
}
.connected-methods > small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.connected-method-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.method-chip {
  width: auto;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}
.method-chip.is-connected {
  border-color: rgba(40, 113, 83, 0.28);
  background: rgba(232, 247, 239, 0.9);
  color: var(--green);
}
.method-chip.is-available,
.method-chip.is-pending {
  background: rgba(255, 255, 255, 0.62);
}
button.method-chip.method-connect {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.account-overview .account-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}
.app-card button,
.lookup-form button {
  border: 0;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 11px 14px;
  white-space: nowrap;
}
.app-card button:disabled,
.lookup-form button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
.app-card button.ghost-action {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 11px 14px;
  white-space: nowrap;
}
.lookup-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.lookup-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}
.account-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.account-strip span {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(36, 87, 230, 0.06);
}
.account-strip strong,
.account-strip em {
  display: block;
}
.account-strip strong {
  color: var(--muted);
  font-size: 0.78rem;
}
.account-strip em {
  overflow: hidden;
  color: var(--ink);
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.secret-box {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(55, 126, 91, 0.32);
  border-radius: var(--r-lg);
  background: rgba(234, 247, 239, 0.9);
}
.secret-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.secret-box-head > div {
  display: grid;
  gap: 2px;
}
.secret-box-head span {
  color: var(--green);
  font-weight: 850;
}
.secret-box-head small,
.secret-copy-status {
  color: var(--muted);
}
.secret-box code {
  overflow-x: auto;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
  user-select: all;
  white-space: nowrap;
}
.secret-copy-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.9rem;
}
.api-key-inventory {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.api-key-inventory-head strong,
.api-key-inventory-head span {
  display: block;
}
.api-key-inventory-head strong {
  color: var(--ink);
  font-size: 1rem;
}
.api-key-inventory-head span {
  max-width: 62ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.developer-setup {
  align-content: start;
}
.table-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.button-row,
.lookup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.lookup-form input {
  flex: 1 1 260px;
}
.meter {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}
.meter span {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}
.meter span::before {
  display: block;
  width: var(--value, 42%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  content: "";
}
.meter small {
  color: var(--muted);
}
@media (max-width: 980px) {
  .app-shell,
.auth-screen {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  .account-primary-metrics,
.account-settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  .app-grid,
.account-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .billing-choice-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .account-overview {
    padding: 18px;
  }
}
@media (max-width: 640px) {
  .account-overview-head,
.account-head-actions {
    align-items: flex-start;
  }
}
@media (max-width: 640px) {
  .account-overview-head {
    display: grid;
  }
}
@media (max-width: 640px) {
  .account-head-actions {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .account-head-actions > * {
    flex: 1 1 0;
    justify-content: center;
  }
}
@media (max-width: 640px) {
  .account-primary-metrics,
.account-settings-grid,
.account-overview .account-strip {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .app-grid,
.account-strip {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .auth-screen {
    padding-top: 18px;
  }
}
@media (max-width: 640px) {
  .app-card-head {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .app-card-head {
    display: grid;
  }
}
@media (max-width: 640px) {
  .secret-box-head {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  .secret-box-head button {
    min-height: 46px;
    width: 100%;
  }
}
@media (max-width: 640px) {
  .agent-strip {
    display: none;
  }
}
@media (max-width: 480px) {
  .account-section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
  }
}
@media (max-width: 480px) {
  .account-section-nav a {
    text-align: center;
  }
}
.billing-discount-active {
  margin: 0;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--green-soft);
}
.redeem-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 19, 15, 0.45);
}
.redeem-dialog[hidden] {
  display: none;
}
.redeem-card {
  width: min(100%, 400px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.redeem-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.redeem-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.redeem-preview {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--coral-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}
.redeem-preview[hidden] {
  display: none;
}
.redeem-preview strong {
  color: var(--ink);
}
.redeem-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.redeem-actions button[type="submit"] {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--signal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.redeem-actions button[type="submit"]:hover {
  background: var(--signal-strong);
}
.redeem-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--green-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}
.redeem-result[hidden] {
  display: none;
}
.redeem-result strong {
  color: var(--green);
}

/* ── migrated from parity-review.css ── */
:is(.app-page .developer-setup) .connection-tabs {
  transition: grid-template-columns 250ms var(--ease-enter);
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] {
  transition:
    min-height 250ms var(--ease-enter),
    background-color 150ms var(--ease-enter),
    color 150ms var(--ease-enter),
    border-color 150ms var(--ease-enter);
}
:is(.app-page .developer-setup) .connection-panel {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 250ms ease-in-out,
    transform 250ms var(--ease-enter);
}
:is(.app-page .developer-setup) .connection-panel.is-entering {
  opacity: 0;
  transform: translateY(8px);
}
.billing-select-value,
.billing-select-option {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.billing-recommendation {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  color: var(--signal-strong);
  font: 800 0.62rem/1 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.billing-select-option[aria-selected="true"] .billing-recommendation {
  color: #fffdf8;
}
.billing-select-list {
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top center;
  transition:
    opacity 150ms var(--ease-enter),
    transform 250ms var(--ease-enter),
    display 150ms allow-discrete;
}
@starting-style {
  .billing-select-list:not([hidden]) {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.app-page .billing-value-strip {
  margin: 14px 0 18px;
}
.app-page .billing-builder-head small {
  display: none;
}
.app-page .billing-step-label em {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--evergreen) 12%, var(--surface));
  color: var(--evergreen);
  font: 780 0.66rem/1.2 var(--sans);
  font-style: normal;
}
.app-page .billing-checkout-summary small {
  font-size: 0;
}
.app-page .billing-checkout-summary small::after {
  content: "Secure checkout";
  font-size: 0.82rem;
  font-weight: 720;
}
.app-page .billing-management-row span {
  max-width: 35ch;
}
@media (prefers-reduced-motion: reduce) {
  :is(.app-page .developer-setup) .connection-tabs,
:is(.app-page .developer-setup) .connection-tabs [role="tab"],
:is(.app-page .developer-setup) .connection-panel,
.billing-select-list {
    transition: none !important;
  }
}
.history-limit-note {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
}
.app-page .job-history-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px 18px;
}
.app-page .job-history-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.app-page .job-primary-action,
.app-page .job-more-actions > summary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
}
.app-page .job-primary-action {
  background: var(--ink);
  color: #fffdf8;
}
.app-page .job-more-actions {
  position: relative;
}
.app-page .job-more-actions > summary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.app-page .job-more-actions > summary::-webkit-details-marker {
  display: none;
}
.app-page .job-more-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: min(260px, calc(100vw - 40px));
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(51, 37, 24, 0.14);
}
.app-page .job-more-menu > * {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  box-shadow: none;
}
.app-page .job-more-menu > *:hover {
  background: var(--paper-deep);
  color: var(--ink);
}
.activity-usage-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}
.activity-usage-head h2 {
  margin-bottom: 0;
}
.activity-usage-head p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.app-page .activity-usage-card .usage-list {
  margin-top: 18px;
}
.api-key-hero {
  align-items: center;
}
.api-key-hero > div {
  max-width: 760px;
}
.api-key-hero h2 {
  margin-top: 8px;
}
#api-key-plan-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.api-key-create-flow {
  width: min(100%, 360px);
  flex: 0 0 auto;
}
.api-key-create-flow > summary {
  width: fit-content;
  margin-left: auto;
  padding: 13px 18px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fffdf8;
  cursor: pointer;
  font-weight: 820;
  list-style-position: inside;
}
.api-key-create-flow[open] > summary {
  border-radius: 8px 8px 0 0;
}
.api-key-workspace {
  display: block;
  margin-top: 20px;
}
.api-key-inventory {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}
.api-key-inventory .table-list {
  margin-top: 14px;
}
.api-key-inventory-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.api-key-inventory-head > div,
.api-key-inventory-head strong,
.api-key-inventory-head span {
  display: block;
}
.api-key-inventory-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}
.api-key-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 253, 248, 0.72);
  text-align: center;
}
.api-key-empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.api-key-empty-title {
  font-size: 0.92rem;
  font-weight: 750;
}
.api-key-empty-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.developer-setup > summary {
  cursor: pointer;
  list-style: none;
}
.developer-setup > summary::-webkit-details-marker {
  display: none;
}
.developer-setup-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.developer-setup-summary span:first-child,
.developer-setup-summary strong,
.developer-setup-summary small {
  display: block;
}
.developer-setup-summary small,
.developer-setup-summary > span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}
.developer-setup-summary small {
  margin-top: 4px;
}
.developer-setup[open] .developer-setup-summary {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.developer-setup-body {
  padding-top: 22px;
}
.developer-setup-head {
  max-width: 760px;
}
.developer-setup-head h2 {
  margin-top: 8px;
}
.developer-connection-state {
  display: flex;
  gap: 10px 18px;
  align-items: baseline;
  margin-top: 18px;
  padding: 12px 14px;
  border-block: 1px solid var(--line);
}
.developer-connection-state strong {
  color: var(--ink);
}
.developer-connection-state span {
  color: var(--muted);
  font-size: 0.84rem;
}
.developer-connection-state .doc-link {
  margin-left: auto;
}
.billing-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 14px;
  margin-top: 20px;
}
.billing-builder {
  margin: 0;
}
.billing-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.billing-step-label {
  display: flex;
  gap: 9px;
  align-items: center;
}
.billing-step-label b {
  color: var(--signal-strong);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.billing-choice-grid select {
  width: 100%;
}
.billing-order {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(255, 253, 248, 0.82);
}
.billing-order .billing-checkout-summary {
  margin: 0;
}
.app-page .billing-order > .checkout-button {
  width: 100%;
  min-height: 48px;
}
.billing-management-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.billing-management-row strong,
.billing-management-row span {
  display: block;
}
.billing-management-row strong {
  color: var(--ink);
  font-size: 0.84rem;
}
.billing-management-row span {
  max-width: 40ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}
.billing-management-row button {
  flex: 0 0 auto;
}
.app-page .billing-order .billing-action-status,
.billing-order .billing-account-status {
  margin: 0;
}
@media (max-width: 980px) {
  .billing-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .api-key-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .api-key-hero,
.activity-usage-head,
.billing-management-row {
    display: grid;
  }
}
@media (max-width: 760px) {
  .api-key-hero > button,
.billing-management-row button {
    width: fit-content;
  }
}
@media (max-width: 760px) {
  .api-key-create-flow,
.api-key-create-flow > summary {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .api-key-create-flow > summary {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  .developer-connection-state {
    display: grid;
    align-items: start;
  }
}
@media (max-width: 760px) {
  .developer-connection-state .doc-link {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  .history-limit-note {
    width: fit-content;
  }
}
@media (min-width: 721px) {
  :is(.app-page .developer-setup) .connection-tabs {
    align-items: center;
    transition: grid-template-columns 240ms var(--ease-enter);
  }
}
@media (min-width: 721px) {
  :is(.app-page .developer-setup)
    .connection-tabs:has([data-connection-tab="api"][aria-selected="true"]) {
    grid-template-columns: 1.42fr 0.79fr 0.79fr;
  }
}
@media (min-width: 721px) {
  :is(.app-page .developer-setup)
    .connection-tabs:has([data-connection-tab="cli"][aria-selected="true"]) {
    grid-template-columns: 0.79fr 1.42fr 0.79fr;
  }
}
@media (min-width: 721px) {
  :is(.app-page .developer-setup)
    .connection-tabs:has([data-connection-tab="mcp"][aria-selected="true"]) {
    grid-template-columns: 0.79fr 0.79fr 1.42fr;
  }
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] {
  min-height: 104px;
  align-content: center;
  transition:
    min-height 240ms var(--ease-enter),
    padding 240ms var(--ease-enter),
    background-color 180ms ease,
    color 180ms ease;
}
:is(.app-page .developer-setup)
  .connection-tabs [role="tab"][aria-selected="true"] {
  min-height: 150px;
}
:is(.app-page .developer-setup) .connection-method-code {
  order: -2;
  margin-bottom: 6px;
  color: var(--signal-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
:is(.app-page .developer-setup)
  .connection-tabs [role="tab"][aria-selected="true"]
  .connection-method-code {
  color: #fffdf8;
}
:is(.app-page .developer-setup)
  .connection-tabs [role="tab"]
  strong {
  max-width: none;
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.15;
}
:is(.app-page .developer-setup) .connection-method-detail {
  margin-top: 3px;
  opacity: 0.78;
}
:is(.app-page .developer-setup) .connection-panel h2 {
  max-width: 15ch;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 0.98;
  text-wrap: balance;
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup)
    .connection-tabs [role="tab"],
:is(.app-page .developer-setup)
    .connection-tabs [role="tab"][aria-selected="true"] {
    min-height: 92px;
  }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-method-code {
    font-size: 1.55rem;
  }
}
.billing-native-select {
  display: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.billing-select {
  position: relative;
  min-width: 0;
}
.billing-select-trigger {
  display: flex;
  width: 100%;
  min-height: 58px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
  font: 780 0.98rem/1.25 var(--sans);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.billing-select-trigger:hover,
.billing-select.is-open .billing-select-trigger {
  border-color: var(--signal-strong);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(45, 32, 20, 0.1);
}
.billing-select-trigger:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.billing-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-select-arrow {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--signal-strong);
  font: 820 0.72rem/1 var(--mono);
  transition: transform 160ms ease;
}
.billing-select.is-open .billing-select-arrow {
  transform: rotate(180deg);
}
.billing-select-list {
  position: absolute;
  z-index: 14;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 260px;
  gap: 4px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(45, 32, 20, 0.18);
}
.billing-select-list[hidden] {
  display: none;
}
.billing-select-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 720 0.9rem/1.3 var(--sans);
  text-align: left;
}
.billing-select-option:hover,
.billing-select-option:focus-visible {
  background: color-mix(in srgb, var(--signal-soft) 58%, var(--surface));
}
.billing-select-option:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--signal);
}
.billing-select-option[aria-selected="true"] {
  background: var(--ink);
  color: #fffdf8;
}
.app-page .billing-builder .billing-select-trigger,
.app-page .billing-builder .billing-select.is-open .billing-select-trigger {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
.app-page .billing-builder .billing-select-trigger:hover,
.app-page .billing-builder .billing-select-trigger:focus-visible,
.app-page .billing-builder .billing-select.is-open .billing-select-trigger {
  border-color: var(--signal-strong);
  background: color-mix(in srgb, var(--signal-soft) 30%, var(--surface));
}
.app-page .billing-builder .billing-select-option {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.app-page .billing-builder .billing-select-option:hover,
.app-page .billing-builder .billing-select-option:focus-visible {
  background: color-mix(in srgb, var(--signal-soft) 58%, var(--surface));
  color: var(--ink);
}
.app-page .billing-builder .billing-select-option[aria-selected="true"] {
  background: var(--ink);
  color: #fffdf8;
}
@media (max-width: 720px) {
  .app-page .billing-select-trigger {
    min-height: 64px;
    align-items: flex-start;
  }
}
@media (max-width: 720px) {
  .app-page .billing-select-value,
.app-page .billing-select-option {
    flex-wrap: wrap;
    align-items: flex-start;
    white-space: normal;
  }
}
@media (max-width: 720px) {
  .app-page .billing-select-value {
    overflow: visible;
    text-overflow: clip;
  }
}
@media (max-width: 720px) {
  .app-page .billing-select-value > span:first-child,
.app-page .billing-select-option > span:first-child {
    min-width: 0;
    flex: 1 1 180px;
    overflow-wrap: anywhere;
  }
}
.app-page .account-overview {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(22px, 3.5vw, 38px);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 12px 32px rgba(45, 32, 20, 0.06);
}
.app-page .account-state-heading {
  min-width: 0;
}
.app-page .account-overview .dashboard-title {
  max-width: none;
  margin: 5px 0 8px;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
}
@media (max-width: 640px) {
  .app-page .account-overview .dashboard-title {
    font-size: 32px;
    line-height: 36px;
  }
}
.app-page .account-display-name {
  color: var(--ink);
  font-weight: 720;
}
.app-page .account-primary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}
.app-page .account-primary-metrics article,
.app-page .account-primary-metrics .credit-balance-card {
  min-height: 132px;
  padding: 18px 20px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}
.app-page .account-primary-metrics .credit-balance-card span,
.app-page .account-primary-metrics .credit-balance-card small {
  color: var(--muted);
}
.app-page .account-primary-metrics strong {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}
.app-page .account-overview-usage {
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}
.app-page .account-overview-usage .activity-usage-head {
  align-items: center;
}
.app-page .account-overview-usage .activity-usage-head h2 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}
.app-page .account-plan-action {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 8px 11px;
  border-radius: 7px;
  background: var(--ink);
  color: #fffdf8;
  font-weight: 780;
  text-decoration: none;
}
.app-page .account-settings-grid-simple {
  grid-template-columns: 1fr;
}
.app-page .account-profile-details {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}
.app-page .account-profile-details > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 820;
}
.app-page .account-profile-details > summary > span:first-child,
.app-page .account-profile-details > summary strong,
.app-page .account-profile-details > summary small {
  display: block;
}
.app-page .account-profile-details > summary small,
.app-page .account-profile-details > summary > span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}
.app-page .account-profile-details > summary small {
  margin-top: 4px;
}
.app-page .account-profile-details[open] > summary {
  margin-bottom: 16px;
}
.app-page .account-profile-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 0;
  border: 0;
  background: transparent;
}
.app-page .account-profile-form .form-feedback {
  grid-column: 1 / -1;
}
.app-page .account-access-details {
  min-height: 0;
}
.app-page .activity-usage-head .doc-link {
  flex: 0 0 auto;
  margin: 0;
}
.app-page .activity-usage-card .usage-list {
  display: grid;
  gap: 12px;
}
.app-page .usage-receipt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}
.app-page .usage-receipt-heading span,
.app-page .usage-receipt-heading strong,
.app-page .usage-receipt-totals span {
  display: block;
}
.app-page .usage-receipt-heading > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.app-page .usage-receipt-heading strong {
  margin-top: 6px;
  font-family: "Newsreader", serif;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
}
.app-page .usage-receipt-totals {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}
.app-page .usage-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
}
.app-page .usage-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--blue-soft);
}
.app-page .usage-progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--green);
}
.app-page .usage-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--green);
}
.app-page .usage-balance-summary {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.app-page .usage-empty-state p {
  margin: 0 0 8px;
}
@media (max-width: 720px) {
  .app-page .account-overview-head,
.app-page .usage-receipt {
    display: grid;
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .app-page .account-head-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .app-page .account-primary-metrics {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .app-page .account-profile-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .app-page .job-history-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .app-page .job-history-actions {
    justify-content: stretch;
  }
}
@media (max-width: 720px) {
  .app-page .job-primary-action {
    flex: 1 1 auto;
  }
}
@media (max-width: 720px) {
  .app-page .job-more-actions {
    flex: 0 0 auto;
  }
}
@media (max-width: 720px) {
  .app-page .job-more-menu {
    position: fixed;
    inset: auto 12px 12px;
    width: auto;
  }
}
@media (max-width: 720px) {
  .api-key-inventory-head,
.developer-setup-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 720px) {
  .app-page .usage-receipt-totals {
    justify-content: space-between;
  }
}
@media (max-width: 720px) {
  .app-page .usage-progress {
    grid-column: 1;
  }
}
@media (max-width: 720px) {
  .app-page .billing-order .billing-checkout-summary > div {
    min-width: 0;
  }
}
@media (max-width: 720px) {
  .app-page .billing-order .billing-checkout-summary strong,
.app-page .billing-order .billing-checkout-summary small,
.app-page .billing-order .billing-account-status {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 720px) {
  .app-page .billing-order > .checkout-button {
    padding-inline: 12px;
    line-height: 1.25;
    white-space: normal;
  }
}
:is(.app-page .developer-setup) .connection-workspace {
  max-width: 1080px;
  margin: 0 auto 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 16px 42px rgba(51, 37, 24, 0.08);
}
:is(.app-page .developer-setup) .connection-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] {
  display: grid;
  min-height: 86px;
  gap: 3px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  box-shadow: none;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] strong,
:is(.app-page .developer-setup) .connection-tabs [role="tab"] span {
  display: block;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] strong {
  color: inherit;
  font-size: 1.12rem;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] span {
  font-size: 0.78rem;
  font-weight: 560;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
}
:is(.app-page .developer-setup) .connection-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 26px;
  margin-top: 12px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}
:is(.app-page .developer-setup) .connection-panel h2 {
  max-width: 19ch;
  margin: 10px 0 16px;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  line-height: 1;
}
:is(.app-page .developer-setup) .connection-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  line-height: 1.45;
}
:is(.app-page .developer-setup) .connection-decision {
  max-width: 46ch;
  margin: -5px 0 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}
:is(.app-page .developer-setup) .connection-panel-setup,
:is(.app-page .developer-setup) .connection-actions {
  display: grid;
  gap: 10px;
}
:is(.app-page .developer-setup) .connection-panel-setup .code-frame {
  margin: 0;
}
:is(.app-page .developer-setup) .connection-panel-setup .code-frame code {
  color: #fffdf8;
}
:is(.app-page .developer-setup) .connection-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr) auto;
  align-items: center;
}
:is(.app-page .developer-setup) .connection-actions > * {
  min-width: 0;
}
:is(.app-page .developer-setup) .connection-actions > button:first-child {
  min-height: 46px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
}
:is(.app-page .developer-setup) .connection-actions .doc-link {
  padding-inline: 8px;
  text-align: center;
}
:is(.app-page .developer-setup) .connection-status {
  min-height: 20px;
  margin: 8px 6px 0;
  color: var(--muted);
  font-size: 0.78rem;
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-tabs {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"] {
    min-height: 64px;
  }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
.app-page .developer-setup
  .connection-tabs [role="tab"]
  > .connection-method-code {
  margin-bottom: 7px;
  color: var(--signal-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.app-page .developer-setup
  .connection-tabs [role="tab"][aria-selected="true"]
  > .connection-method-code {
  color: #fffdf8;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)
  > summary {
  list-style: none;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)
  > summary::-webkit-details-marker {
  display: none;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)
  .when-open {
  display: none;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)[open]
  .when-closed {
  display: none;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)[open]
  .when-open {
  display: inline;
}
.disclosure-cue {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)[open]
  .disclosure-arrow {
  transform: rotate(180deg);
}
:is(.app-page .account-profile-details, .app-page .account-access-details, .app-page .developer-setup)
  > summary:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
:is(.app-page .developer-setup)
  .connection-panel-setup
  .code-frame
  pre.copyable-code {
  margin: 0;
  padding: 20px 22px;
}
:is(.app-page .developer-setup) .connection-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
:is(.app-page .developer-setup) .connection-actions > * {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
:is(.app-page .developer-setup)
  .connection-actions
  > button:first-child {
  min-height: 50px;
}
:is(.app-page .developer-setup) .connection-actions .doc-link {
  margin: 0;
  padding: 10px 14px;
}
.app-page .account-api-keys-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none;
}
.app-page :is(.account-profile-details, .account-access-details) > summary {
  min-height: 44px;
  border-radius: 7px;
}
.app-page :is(.account-profile-details, .account-access-details) .disclosure-cue,
.app-page .developer-setup .disclosure-cue {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
  white-space: nowrap;
}
.app-page .account-access-details > summary > .disclosure-cue small {
  max-width: 24ch;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  :is(.app-page .developer-setup) .connection-actions {
    grid-template-columns: 1fr;
  }
}

/* ── migrated from surface-polish.css ── */
.app-page :is(.account-overview, .app-card) {
  border-color: var(--surface-rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: none;
}
.app-page .account-overview { padding: clamp(24px, 4vw, 40px); }
.app-page .account-section-nav {
  border-color: var(--surface-rule);
  background: var(--paper);
  box-shadow: none;
}
.app-page .account-section-nav a { min-height: 44px; }
.app-page .account-section-nav a:hover { background: var(--surface-inset); color: var(--ink); }
.app-page .account-section-nav a.active { background: var(--ink); color: var(--surface); }
.app-page :is(.account-primary-metrics article, .account-access-details, .account-setting-panel,
  .connected-methods, .account-strip > span, .overview-grid > span, .compact-form) {
  border-color: var(--surface-rule);
  background: var(--paper);
  box-shadow: none;
}
.app-page .account-primary-metrics .credit-balance-card {
  border-color: transparent;
  background: #e8ebe0;
  color: var(--ink);
}
.app-page .account-primary-metrics .credit-balance-card :is(span, small) { color: #56614e; }
.app-page .account-primary-metrics strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.app-page .account-avatar { border: 0; background: var(--green); box-shadow: none; }
.app-page :is(.app-card h2, .account-setting-panel h2) { font-weight: 600; line-height: 1.2; }
.app-page :is(.app-card p, .account-setting-panel p, .empty-state) { color: var(--surface-quiet); line-height: 1.6; }
.app-page .table-row { border-color: var(--surface-rule); }
.app-page .table-row:not(.table-head):hover { background: color-mix(in srgb, var(--paper) 64%, transparent); }
:is(.auth-intent, .auth-alert) {
  border-color: var(--surface-rule);
  background: var(--paper);
}
.auth-alert.is-error { border-color: #d6a28b; background: #faeade; }
:is(.app-page) :is(input, select, textarea) {
  border-color: var(--surface-input-line);
  background: var(--surface);
  color: var(--ink);
}
:is(.app-page) :is(input, select, textarea):focus {
  border-color: var(--signal-strong);
  outline: 2px solid var(--signal-strong);
  outline-offset: 2px;
  box-shadow: none;
}
:is(.app-page) :is(input, textarea)::placeholder { color: #7d7063; opacity: 1; }
:is(.app-page) button {
  min-height: 44px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
:is(.app-page) .ghost-action { border-color: var(--surface-rule-strong); background: var(--surface); color: var(--ink); }
:is(.app-page) .text-action { background: transparent; color: var(--surface-quiet); }
:is(.app-page) :is(.ghost-action, .text-action):not(:disabled):hover { background: var(--surface-inset); color: var(--ink); }
:is(.app-page .developer-setup) .connection-panel-setup .code-frame code { color: var(--code-ink); }
@media (max-width: 760px) {
  .app-page .account-overview { padding: 22px 18px; }
}
@media (max-width: 760px) {
  .app-page :is(.account-overview-head, .account-head-actions) { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .app-page :is(.account-settings-grid, .account-setting-panel, .account-primary-metrics) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app-page .account-access-details summary { gap: 12px; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .app-page .account-section-nav { width: 100%; }
}
@media (max-width: 760px) {
  .app-page .account-section-nav a { padding-inline: 12px; font-size: .82rem; }
}
@media (max-width: 760px) {
  :is(.app-page) :is(input, select, textarea) { font-size: var(--fs-body); }
}
.billing-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-self: start;
  max-width: 100%;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--signal) 22%, var(--line-strong));
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--blue-soft) 54%, var(--surface));
}
.billing-segmented-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  justify-self: stretch;
  width: 100%;
  border-radius: 14px;
}
.billing-segmented-plans .billing-segmented-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  border-radius: 10px;
  white-space: normal;
  line-height: 1.25;
}
.billing-segmented-plans .billing-segmented-option[aria-checked="true"]::after {
  margin-left: auto;
}
.billing-segmented .billing-segmented-option[hidden] { display: none !important; }
.billing-segmented .billing-segmented-option[aria-checked="true"]::after {
  content: "→";
  margin-left: 7px;
  opacity: 0.7;
}
.billing-segmented .billing-segmented-option {
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 780 0.84rem/1 var(--sans);
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.billing-segmented .billing-segmented-option:hover { color: var(--ink); }
.billing-segmented .billing-segmented-option[aria-checked="true"] {
  background: var(--ink);
  color: #fffdf8;
  box-shadow: 0 6px 16px rgba(27, 26, 23, 0.22);
}
.billing-segmented .billing-segmented-option:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.billing-segmented .billing-segmented-option:disabled { opacity: 0.5; cursor: default; }
body[data-brand-page=app] .app-page .billing-checkout-summary small {
  font-size: 0;
}
.api-key-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.api-key-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--signal-strong);
}
.api-key-row-copy { display: grid; gap: 3px; min-width: 0; }
.api-key-row-copy strong,
.api-key-row-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-key-create-flow { width: 100%; margin-top: 4px; }
.api-key-create-flow > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-left: 0;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  list-style: none;
  transition: border-color 150ms ease, background 150ms ease;
}
.api-key-create-flow > summary::-webkit-details-marker { display: none; }
.api-key-create-flow > summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.8em;
  transition: transform 160ms ease;
}
.api-key-create-flow[open] > summary {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}
.api-key-create-flow[open] > summary::after { transform: rotate(180deg); }
.api-key-create-flow > summary:hover { border-color: var(--signal); }
.api-key-create-flow summary .api-key-icon { color: var(--signal-strong); }
.secret-value-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.secret-value-row code {
  flex: 1 1 auto;
  min-width: 0;
}
.app-page .secret-box .copy-api-key.ghost-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 640px) {
  .secret-value-row { flex-direction: column; }
}
@media (max-width: 640px) {
  .app-page .secret-box .copy-api-key.ghost-action {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }
}
.api-key-agent-strip { margin-top: 14px; }
.api-key-agent-strip:empty { display: none; }
.api-key-agent-strip.agent-install {
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: var(--r-lg);
  text-align: left;
}
.api-key-agent-strip.agent-install .agent-install-text {
  flex: 1 1 auto;
  white-space: normal;
}
.api-key-agent-strip.agent-install .agent-install-button {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.api-key-agent-strip.agent-install .agent-install-button:hover {
  opacity: 1;
  border-color: var(--signal);
}
@media (prefers-reduced-motion: reduce) {
  :is(.app-page) :is(a, button, input, textarea) { transition: none; }
}
.billing-plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-0);
  background: transparent;
}
.billing-plan-cards .billing-segmented-option.billing-plan-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 5px;
  align-items: stretch;
  min-height: 0;
  padding: 13px 15px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  white-space: normal;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.billing-plan-cards .billing-plan-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.billing-plan-cards .billing-segmented-option[aria-checked="true"] {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 10px 24px rgba(27, 26, 23, 0.1);
  color: var(--ink);
}
.billing-plan-cards .billing-segmented-option[aria-checked="true"]::after {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
  opacity: 0.55;
}
.billing-workspace {
  grid-template-columns: minmax(0, 1fr);
}
.billing-plan-cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.billing-plan-cards .billing-segmented-option.billing-plan-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.app-page .job-history-actions .job-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
}
.app-page .job-history-actions .job-secondary-action:hover {
  border-color: var(--ink);
}
.api-key-agent-strip.agent-install {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 22px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--blue-soft) 30%, var(--surface));
}
.api-key-agent-strip.agent-install::before {
  content: "Connect an AI agent";
  grid-column: 1 / -1;
  font: 700 0.68rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.api-key-agent-strip.agent-install .agent-install-status {
  grid-column: 1 / -1;
}
.billing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: flex-end;
  margin-bottom: 4px;
}
.billing-toolbar .select-row { min-width: 0; }
.billing-builder .billing-segmented .billing-segmented-option[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.billing-builder .billing-segmented-plans .billing-segmented-option[aria-checked="true"] {
  background: color-mix(in srgb, var(--blue-soft) 40%, var(--surface));
}
.app-page .billing-order > .checkout-button {
  min-width: 300px;
  min-height: 54px;
  padding: 15px 30px;
  font-size: 1.02rem;
  font-weight: 800;
}
.billing-order .billing-checkout-summary {
  padding: 13px 16px;
}
.billing-order .billing-management-row {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.billing-order .billing-management-row strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.billing-order .billing-management-row span {
  font-size: 0.76rem;
  color: var(--muted);
}
.billing-plan-cards .billing-segmented-option.billing-plan-card {
  gap: 7px;
  padding: 15px 17px;
}
.app-page .job-history-actions .job-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
}
.app-page .job-history-actions .job-primary-action:hover {
  border-color: var(--ink);
}
.app-page .account-plan-action {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
}
.app-page .account-plan-action:hover {
  border-color: var(--ink);
}
.app-page .account-overview-usage .doc-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
}
.app-page .account-overview-usage .doc-link:hover {
  border-color: var(--ink);
}
.app-page .app-card button.create-api-key,
.app-page 
.app-card button.confirm-api-key-remove {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}
.app-page .app-card button.create-api-key:hover,
.app-page 
.app-card button.confirm-api-key-remove:hover {
  border-color: var(--ink);
}
.app-page .ghost-action {
  border-color: var(--line-strong);
  background: var(--surface);
}
.app-page .ghost-action:not(:disabled):hover {
  border-color: var(--ink);
}
.app-page .job-history-actions .job-primary-action,
.app-page .job-history-actions .job-secondary-action,
.app-page .ghost-action,
.app-page .account-plan-action,
.app-page .account-overview-usage .doc-link,
.billing-builder .billing-segmented .billing-segmented-option[aria-checked="true"],
.billing-plan-cards .billing-segmented-option {
  box-shadow: none;
}
.app-page .account-section-nav {
  position: static;
  top: auto;
  margin: 0 auto 46px;
}
.billing-checkout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.app-page .billing-checkout-row .billing-action-status {
  grid-column: 1 / -1;
  margin: 0;
}
.app-page .billing-checkout-row .checkout-button {
  min-width: 300px;
  min-height: 54px;
  padding: 15px 30px;
  font-size: 1.02rem;
  font-weight: 800;
}
@media (max-width: 640px) {
  .billing-checkout-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .app-page .billing-checkout-row .checkout-button { width: 100%; }
}
.app-page .billing-order {
  display: block;
  padding: 4px 6px 0;
  border: 0;
  background: transparent;
}
.app-page .billing-order .billing-management-row {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.billing-segmented .billing-segmented-option[aria-checked="true"]::after { content: none; }
.billing-checkout-row .billing-checkout-summary {
  margin-top: 0;
  border-color: var(--line-strong);
  background: var(--surface-warm, rgba(255, 253, 248, 0.82));
}
.billing-checkout-row .billing-summary-mark { display: none; }
.billing-builder .billing-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.billing-builder .billing-step-label em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.api-key-agent-block {
  padding: 16px 20px;
}
.api-key-agent-block .api-key-agent-strip.agent-install {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.plan-summary-card .plan-renew-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.plan-summary-card .plan-renew-row small {
  margin: 0;
  font-weight: 700;
  color: var(--signal-strong);
  letter-spacing: 0.02em;
}
.plan-summary-card .account-plan-action {
  margin-top: 0;
}
.app-page [hidden] {
  display: none !important;
}
.app-page .account-section-nav a,
.app-page .ghost-action,
.app-page .account-plan-action,
.app-page .doc-link,
.billing-builder .billing-segmented-option,
.app-page 
.billing-checkout-row .checkout-button,
.app-page .job-history-actions
  :is(.job-primary-action, .job-secondary-action, .job-more-actions > summary) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.credit-balance-card strong,
.plan-summary-card .plan-renew-row small,
.billing-plan-card .plan-amount,
.billing-plan-card .plan-credits-hero {
  font-variant-numeric: tabular-nums;
}
body[data-brand-page=app] .checkout-button {
  border: 1px solid color-mix(in srgb, var(--accent) 80%, #000 20%);
  border-radius: 10px;
  background: var(--accent);
  color: #fffdf8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px -12px color-mix(in srgb, var(--accent) 70%, transparent);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}
body[data-brand-page=app] .checkout-button:hover {
  border-color: color-mix(in srgb, var(--accent) 68%, #000 32%);
  background: color-mix(in srgb, var(--accent) 88%, #000 12%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 26px -12px color-mix(in srgb, var(--accent) 78%, transparent);
  transform: translateY(-1px);
}
body[data-brand-page=app] .checkout-button:active {
  transform: translateY(0);
}
.billing-checkout-row {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
}
.app-page .billing-checkout-row .checkout-button {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  font-size: 1.02rem;
  font-weight: 800;
}
.app-page .billing-checkout-row .billing-action-status {
  margin: 0;
}
.plan-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
  align-items: start;
}
.plan-summary-card > span,
.plan-summary-card > .plan-title-row,
.plan-summary-card > .plan-renew-row {
  grid-column: 1;
}
.plan-summary-card > .account-plan-action {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  margin-top: 0;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}
.app-page .account-api-keys-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.app-page .account-api-keys-link svg {
  flex: none;
  color: var(--green);
}
.app-page .job-history-actions {
  align-items: stretch;
}
.app-page .job-history-actions .job-primary-action,
.app-page .job-history-actions .job-secondary-action,
.app-page .job-history-actions .job-more-actions > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: 700 0.84rem/1 var(--sans);
  cursor: pointer;
}
.app-page .job-history-actions .job-more-actions > summary {
  list-style: none;
}
.app-page .job-history-actions .job-more-actions > summary::-webkit-details-marker {
  display: none;
}
.app-page .job-history-list .pill,
.app-page .activity-list .pill,
.app-page .table-list .pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.app-page .job-history-list .pill[data-status]::before,
.app-page .activity-list .pill[data-status]::before,
.app-page .table-list .pill[data-status]::before {
  flex: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  content: "";
}
.app-page .pill[data-status="succeeded"]::before {
  content: "✓";
  width: auto;
  height: auto;
  color: var(--green);
  font-weight: 900;
  font-size: 0.85em;
  line-height: 1;
}
.app-page .pill[data-status="running"]::before,
.app-page .pill[data-status="queued"]::before {
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: job-status-spin 0.9s linear infinite;
}
.app-page .pill[data-status="failed"]::before,
.app-page .pill[data-status="attention"]::before {
  content: "!";
  width: auto;
  height: auto;
  font-weight: 900;
  font-size: 0.85em;
  line-height: 1;
}
.app-page .pill[data-status="cancelled"]::before,
.app-page .pill[data-status="canceled"]::before,
.app-page .pill[data-status="removed"]::before {
  content: "⊘";
  width: auto;
  height: auto;
  font-weight: 800;
  font-size: 0.8em;
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .app-page .pill[data-status="running"]::before,
.app-page .pill[data-status="queued"]::before {
    animation: none;
  }
}
.app-page .account-head-actions .ghost-action,
.app-page .account-plan-action,
.app-page .account-overview-usage .doc-link {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
}
.app-page .account-head-actions .ghost-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.app-page .job-history-actions {
  flex-wrap: nowrap;
  align-items: center;
}
.app-page .job-history-actions .job-more-actions {
  display: flex;
  align-items: stretch;
  margin: 0;
  min-height: 40px;
}
.app-page .job-history-actions .job-more-actions > summary {
  height: 100%;
  box-sizing: border-box;
}
.app-page .job-history-list .table-row > .api-key-row-main,
.app-page .job-history-list .table-row > div:first-child {
  min-width: 0;
}
.app-page .job-history-list .pill[data-status],
.app-page .activity-list .pill[data-status],
.app-page .table-list .pill[data-status] {
  gap: 0;
  min-width: 26px;
  min-height: 26px;
  padding: 4px;
  justify-content: center;
  border-radius: var(--r-pill);
}
.app-page .pill[data-status="succeeded"]::before,
.app-page .pill[data-status="failed"]::before,
.app-page .pill[data-status="attention"]::before,
.app-page .pill[data-status="cancelled"]::before,
.app-page .pill[data-status="canceled"]::before,
.app-page .pill[data-status="removed"]::before {
  font-size: var(--fs-label);
}
.app-page .api-key-name-field {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.app-page .api-key-name-field input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: 500 0.82rem/1.3 var(--sans);
}
.app-page .api-key-name-field input:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.app-page .job-history-actions .job-primary-action,
.app-page .job-history-actions .job-secondary-action {
  margin-top: 0;
}
body[data-brand-page=app] .app-page .job-history-actions .job-more-actions > summary {
  font-size: 0.84rem;
}
.app-page .billing-plan-cards .billing-segmented-option.billing-plan-card {
  padding: 16px 18px;
  border: 1px solid var(--line-strong, #d8d2c4);
  border-radius: 14px;
  background: var(--surface, #fffdf8);
  box-shadow: 0 1px 3px rgba(30, 26, 18, 0.05);
  text-align: left;
}
.app-page .billing-plan-cards .billing-segmented-option.billing-plan-card:hover {
  border-color: var(--accent);
}
.app-page .billing-plan-cards .billing-segmented-option.billing-plan-card[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 14px color-mix(in srgb, var(--accent) 16%, transparent);
}
.app-page .pill[data-status="active"] {
  gap: 0;
  min-width: 26px;
  min-height: 26px;
  padding: 4px;
  justify-content: center;
  border-radius: var(--r-pill);
}
.app-page .pill[data-status="active"]::before {
  flex: none;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: var(--green, #4f6248);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green, #68785c) 22%, transparent);
}
.app-page .table-list .api-key-row { padding-block: 10px; }
.app-page .secret-box { padding: 14px 16px; }
.app-page .api-key-create-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong, #d8d2c4);
  border-radius: 10px;
  background: var(--surface, #fffdf8);
  color: var(--ink);
  font: 700 0.875rem/1 var(--sans, sans-serif);
  cursor: pointer;
}
.app-page .api-key-create-trigger:hover:not(:disabled) { border-color: var(--accent); }
.app-page .api-key-create-trigger:disabled { opacity: 0.55; cursor: not-allowed; }
.app-page .app-card .api-key-empty .api-key-create-trigger .api-key-icon {
  color: currentColor;
}
.app-page .api-key-create-dialog .api-key-name-field {
  display: grid;
  gap: 6px;
  margin: 12px 0 4px;
  font: 700 0.8rem/1.3 var(--sans, sans-serif);
  color: var(--ink-soft);
}
.app-page .api-key-create-dialog .api-key-name-field input {
  padding: 10px 12px;
  border: 1px solid var(--line-strong, #d8d2c4);
  border-radius: 9px;
  background: var(--surface, #fffdf8);
  color: var(--ink);
  font: 500 0.9rem/1.3 var(--sans, sans-serif);
}
.app-page .api-key-create-dialog .api-key-name-field input:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.app-page .table-list .pill[data-status="succeeded"]::before { content: "✓"; width: auto; height: auto; }
.app-page .table-list .pill[data-status="failed"]::before,
.app-page .table-list .pill[data-status="attention"]::before { content: "!"; width: auto; height: auto; }
.app-page .table-list .pill[data-status="cancelled"]::before,
.app-page .table-list .pill[data-status="canceled"]::before,
.app-page .table-list .pill[data-status="removed"]::before { content: "⊘"; width: auto; height: auto; }
.app-page .account-section-nav { margin-bottom: 18px; }
.app-page .table-list .pill[data-status] {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--r-0);
  background: transparent;
  box-shadow: none;
}
.app-page .table-list .pill[data-status="succeeded"] { color: var(--green, #4f6248); }
.app-page .table-list .pill[data-status="running"],
.app-page .table-list .pill[data-status="queued"] { color: var(--accent); }
.app-page .table-list .pill[data-status="failed"],
.app-page .table-list .pill[data-status="attention"] { color: #a2452c; }
.app-page .table-list .pill[data-status="cancelled"],
.app-page .table-list .pill[data-status="canceled"],
.app-page .table-list .pill[data-status="removed"] { color: var(--muted, #6b635a); }
.app-page .table-list .pill[data-status]::before { width: 16px; height: 16px; }
.app-page .table-list .pill[data-status="succeeded"]::before,
.app-page .table-list .pill[data-status="failed"]::before,
.app-page .table-list .pill[data-status="attention"]::before,
.app-page .table-list .pill[data-status="cancelled"]::before,
.app-page .table-list .pill[data-status="canceled"]::before,
.app-page .table-list .pill[data-status="removed"]::before {
  font-size: var(--fs-body);
  line-height: 16px;
}
.app-page .pill[data-status="running"]::before,
.app-page .pill[data-status="queued"]::before {
  border-width: 2.5px;
  border-color: color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-right-color: currentColor;
}
.app-page .billing-plan-cards .billing-segmented-option.billing-plan-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px;
  border: 1px solid var(--line-strong, #d8d2c4);
  border-radius: var(--r-xl);
  background: #fffcf6;
  box-shadow: 0 1px 3px rgba(30, 26, 18, 0.05);
  text-align: left;
}
.app-page .billing-plan-card .plan-name {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 2px;
  font-weight: 800;
  font-family: var(--sans, sans-serif);
  line-height: 1.2;
}
.app-page .billing-plan-card .plan-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0 0 10px;
  line-height: 1;
}
.app-page .billing-plan-card .plan-currency { font: 600 0.95rem/1 var(--sans, sans-serif); color: var(--ink); }
.app-page .billing-plan-card .plan-amount {
  font: 650 2.4rem/1 var(--sans, sans-serif);
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.app-page .billing-plan-card .plan-period {
  font-weight: 600;
  font-family: var(--sans, sans-serif);
  font-variant-numeric: normal;
}
.app-page .billing-plan-card .plan-credits-hero {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 10px;
  padding: 8px 11px;
  border: 1px solid var(--line, #e4dfd2);
  border-radius: var(--r-md);
  background: rgba(255, 253, 248, 0.7);
}
.app-page .billing-plan-card .plan-credits-hero strong {
  font: 800 1.3rem/1 var(--sans, sans-serif);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.app-page .billing-plan-card .plan-credits-hero span { font: 600 0.75rem/1.35 var(--sans, sans-serif); color: var(--muted, #6b635a); }
.app-page .billing-plan-card .plan-capacity-line {
  display: block;
  margin-bottom: 8px;
  font: 500 0.75rem/1.4 var(--sans, sans-serif);
  color: var(--muted, #6b635a);
}
.app-page .billing-plan-card .plan-features-lite {
  display: block;
  font: 500 0.75rem/1.45 var(--sans, sans-serif);
  color: var(--ink-soft);
}
.app-page .billing-plan-card .plan-badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--signal-strong, #155f4e);
  color: #fffdf8;
  font: 800 0.58rem/1.2 var(--sans, sans-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.app-page .billing-plan-card .plan-badge[hidden] { display: none; }
.app-page .billing-step-label .billing-details-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface, #fff));
  font: 600 0.8rem/1 var(--sans, sans-serif);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}
.app-page .billing-step-label .billing-details-link:hover {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface, #fff));
  border-color: var(--accent);
}
.app-page .billing-step-label .billing-details-link:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.account-sync-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--s-3, 12px);
  padding: 0 2px;
  color: var(--muted, #74695f);
  font-size: 0.78rem;
  line-height: 1.4;
}
.account-sync-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green, var(--success));
  transition: background-color 160ms ease;
}
.account-sync-line.is-syncing .account-sync-dot {
  background: var(--blue, #e65322);
}
.account-sync-line.is-error {
  color: var(--coral, #e65322);
}
.account-sync-line.is-error .account-sync-dot {
  background: var(--coral, #e65322);
}
.account-refresh-button {
  margin-left: auto;
  font-size: 0.78rem;
  padding: 3px 10px;
}
@media (prefers-reduced-motion: no-preference) {
  .account-sync-line.is-syncing .account-sync-dot {
    animation: sync-dot-pulse 1s ease-in-out infinite;
  }
}
/* Skeleton component (base .skeleton + .skeleton-line/-metric/-row/-sheet)
   lives in surface-polish.css — loaded on every page including /admin. */

/* ── migrated from page-polish.css ── */
:is(.app-page .developer-setup) .docs-connect-intro { margin: 40px auto 30px; }
:is(.app-page .developer-setup) .docs-connect-intro h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); line-height: 1.02; letter-spacing: -.035em; white-space: normal; }
:is(.app-page .developer-setup) .docs-connect-intro > p:last-child { max-width: 62ch; font-size: 1rem; line-height: 1.6; }
:is(.app-page .developer-setup) .connection-workspace { padding: 0; border: 0; border-radius: var(--r-0); background: none; box-shadow: none; }
:is(.app-page .developer-setup) .connection-tabs,
:is(.app-page .developer-setup) .connection-tabs:has([data-connection-tab][aria-selected="true"]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  transition: none;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"],
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected] {
  min-height: 126px;
  align-content: start;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--page-polish-line);
  border-radius: var(--r-md);
  background: transparent;
  color: #756b5f;
  box-shadow: none;
  transform: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
:is(.app-page .developer-setup) .connection-tabs [role="tab"] > .connection-method-code { margin-bottom: 3px; color: var(--green); font-size: 1.6rem; font-weight: 650; letter-spacing: -.035em; }
:is(.app-page .developer-setup) .connection-tabs [role="tab"] strong { max-width: none; font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.35; }
:is(.app-page .developer-setup) .connection-tabs [role="tab"] .connection-method-detail { font-size: .8rem; line-height: 1.45; }
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected="true"] { border-color: #849687; background: #e9ece2; color: var(--ink); }
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected="true"] > .connection-method-code { color: var(--green); }
:is(.app-page .developer-setup) .connection-tabs [role="tab"]:hover { border-color: #849687; background: #efeee5; }
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected="true"]:hover { background: #e9ece2; }
:is(.app-page .developer-setup) .connection-panel { gap: 36px; margin-top: 24px; padding: 28px; border: 0; border-radius: 10px; background: var(--page-polish-surface); box-shadow: none; }
:is(.app-page .developer-setup) .connection-panel h2 { max-width: 17ch; margin: 10px 0 16px; font-size: clamp(1.8rem, 2.7vw, 2.5rem); line-height: 1.07; letter-spacing: -.025em; }
:is(.app-page .developer-setup) .connection-panel .metric-tag { padding: 0; border: 0; border-radius: var(--r-0); background: none; color: var(--green); font: 600 .75rem/1.4 var(--mono); }
:is(.app-page .developer-setup) .connection-decision { color: #675e54; line-height: 1.65; }
:is(.app-page .developer-setup) .connection-steps { gap: 10px; font-size: .875rem; line-height: 1.6; }
:is(.app-page .developer-setup) .connection-steps li::marker { color: var(--green); font-weight: 600; }
:is(.app-page .developer-setup) .connection-panel-setup { align-content: start; gap: 14px; }
:is(.app-page .developer-setup) .connection-actions { gap: 8px; }
:is(.app-page .developer-setup) .connection-actions > * { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 12px; border-color: var(--page-polish-line); border-radius: 7px; background: transparent; color: var(--ink); font-size: .85rem; font-weight: 600; box-shadow: none; transition: background-color 160ms ease, border-color 160ms ease; }
:is(.app-page .developer-setup) .connection-actions > button:first-child { min-height: 46px; border-color: var(--ink); background: var(--ink); color: var(--surface); }
:is(.app-page .developer-setup) .connection-actions > button:first-child:hover { background: #352f26; }
:is(.app-page .developer-setup) .connection-actions > :not(:first-child):hover { background: #eee9df; border-color: #b7ad9e; }
:is(.app-page .developer-setup) .connection-auth-prompt { padding: 18px 22px; border: 1px solid #b2c0b1; border-radius: var(--r-md); background: #edf0e6; box-shadow: none; }
:is(.app-page .developer-setup) .code-frame { border: 1px solid #e3ded2; border-radius: var(--r-md); background: #faf8f1; box-shadow: none; }
:is(.app-page .developer-setup) .code-toolbar { min-height: 48px; padding: 6px 10px; border-bottom: 1px solid #e3ded2; background: #f0ede4; }
:is(.app-page .developer-setup) .code-scroll { overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #b4b7a8 #faf8f1; }
:is(.app-page .developer-setup) .code-frame pre.copyable-code,
:is(.app-page .developer-setup) .connection-panel-setup .code-frame pre.copyable-code { margin: 0; padding: 20px; border: 0; border-radius: var(--r-0); background: transparent; }
:is(.app-page .developer-setup) .code-frame code,
:is(.app-page .developer-setup) .connection-panel-setup .code-frame code { color: #403c33; font-family: var(--mono); font-size: .82rem; font-weight: 450; line-height: 1.8; white-space: pre; overflow-wrap: normal; }
:is(.app-page .developer-setup) .code-toolbar .copy-button { min-height: 36px; padding: 7px 11px; border-color: #d4d6c9; border-radius: 5px; background: transparent; color: #5b6255; font-size: .75rem; font-weight: 550; box-shadow: none; }
:is(.app-page .developer-setup) .code-toolbar .copy-button:hover { background: #e7e9de; }
:is(.app-page .developer-setup) .code-scroll:focus-visible { outline: 2px solid transparent; outline-offset: 0; box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--signal); }
:is(.app-page .developer-setup) .technical-details { border-color: var(--page-polish-line); }
:is(.app-page .developer-setup) .technical-details .t-acc-head { border-color: var(--page-polish-line); background: transparent; box-shadow: none; }
:is(.app-page .developer-setup) .docs-guide-controls { border-color: var(--page-polish-line); border-radius: var(--r-md); background: var(--page-polish-surface); box-shadow: none; }
:is(.app-page .developer-setup) .docs-copy-toolbar { border-color: var(--page-polish-line); background: transparent; }
:is(.app-page .developer-setup) .docs-copy-toolbar button { min-height: 44px; border-color: var(--page-polish-line); border-radius: var(--r-sm); box-shadow: none; }
:is(.app-page .developer-setup) .technical-details .doc-nav { border-color: var(--page-polish-line); border-radius: var(--r-md); background: var(--paper); }
:is(.app-page .developer-setup) .doc-section { border-color: var(--page-polish-line); background: transparent; box-shadow: none; }
:is(.app-page .developer-setup) .doc-section h2 { line-height: 1.12; letter-spacing: -.02em; }
:is(.app-page .developer-setup) .doc-callout { border: 0; border-left: 2px solid #96a78f; border-radius: var(--r-0); background: #ecefe5; }
@media (max-width: 940px) {
  :is(.app-page .developer-setup) .connection-panel { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 940px) {
  :is(.app-page .developer-setup) .connection-panel h2 { max-width: 26ch; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .docs-connect-intro { margin-top: 28px; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-tabs,
:is(.app-page .developer-setup) .connection-tabs:has([data-connection-tab][aria-selected="true"]) { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"],
:is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected] { min-height: 88px; padding: 16px 18px; gap: 5px; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"] > .connection-method-code { font-size: 1.3rem; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-panel { padding: 20px; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .connection-actions { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :is(.app-page .developer-setup) .code-frame pre.copyable-code,
:is(.app-page .developer-setup) .connection-panel-setup .code-frame pre.copyable-code { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"],
:is(.app-page .developer-setup) .connection-panel {animation: none;transition: none;}
}
:is(.app-page .developer-setup) .code-frame code,
:is(.app-page .developer-setup) .connection-panel-setup .code-frame code {
  font-size: var(--fs-sm);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
:is(.app-page .developer-setup) .connection-panel { min-width: 0; }
:is(.app-page .developer-setup) .connection-panel-copy .metric-tag { display: none; }
html:has(.app-page) { scroll-behavior: auto; }
.app-page .account-head-actions .sign-out-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-page .account-head-actions .sign-out-button::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3H3.5A1.5 1.5 0 0 0 2 4.5v7A1.5 1.5 0 0 0 3.5 13H6M10.5 11 13.5 8l-3-3M13.5 8H6' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.7;
}
.api-key-hero h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-key-icon {
  flex: none;
  color: var(--accent, #b6542e);
}
.plan-period-summary {
  display: block;
}
.plan-expiry-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.plan-expiry-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: color-mix(in oklab, currentColor 10%, transparent);
}
.plan-expiry-chip.is-active {
  color: #1d6b3f;
  background: color-mix(in oklab, #1d6b3f 12%, transparent);
}
.plan-expiry-chip.is-ending {
  color: #9a5b13;
  background: color-mix(in oklab, #9a5b13 14%, transparent);
}
.plan-expiry-chip.is-expired {
  color: #a3271f;
  background: color-mix(in oklab, #a3271f 12%, transparent);
}
.plan-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.plan-cadence {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #6b6353);
  white-space: nowrap;
}
.pill.is-muted {
  opacity: 0.7;
}
.job-removed-note {
  display: block;
  margin-top: 4px;
  opacity: 0.75;
}
.app-page .account-email-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.app-page .account-email-status.is-verified::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6.4' fill='%233d7a4a'/%3E%3Cpath d='m4.4 7.4 1.8 1.8 3.6-4.2' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.account-section-nav a.active .header-account-icon {color:#fff}

/* ── migrated from detail-polish.css ── */
.app-page [data-account-section] { scroll-margin-top: 140px; }
.app-page .account-overview .ghost-action { box-shadow: none; }
.app-page .developer-setup .connection-workspace { background: transparent; border: 0; padding: 0; box-shadow: none; }
.app-page .developer-setup .connection-tabs { padding: 0; border: 0; background: none; box-shadow: none; }
@media(max-width:720px) {
  :is(.app-page .developer-setup) .connection-tabs,
:is(.app-page .developer-setup) .connection-tabs:has([data-connection-tab][aria-selected="true"]) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
}
@media(max-width:720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"][aria-selected] { min-height: 118px; padding: 12px 10px; gap: 7px; }
}
@media(max-width:720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"] strong { font-size: .76rem; line-height: 1.35; }
}
@media(max-width:720px) {
  :is(.app-page .developer-setup) .connection-tabs [role="tab"] .connection-method-detail { display: none; }
}

/* ── migrated from brand.css ── */
body[data-brand-page=app] :is(.app-card, .account-overview, .account-history-card) { background:var(--brand-surface); border:1px solid var(--brand-line); border-radius:var(--r-lg); box-shadow:none; }
body[data-brand-page=app] :is(.account-dashboard h2) { font-family:'Newsreader',serif; letter-spacing:-.025em; }
body[data-brand-page=app] :is(.credit-balance-card>span, .credit-balance-card>small, .credit-balance-card>p, .plan-summary-card>span, .plan-summary-card>small, .plan-summary-card>p, .account-plan-action, .usage-receipt-heading span, .usage-receipt-heading p, .usage-receipt-totals span, .usage-balance-summary) { font-size:var(--fs-sm); }
body[data-brand-page=app] :is(.app-page small, .history-limit-note, .disclosure-cue span, .developer-connection-state span, .billing-step-label b, .billing-select-arrow) { font-size:var(--fs-sm); }
body[data-brand-page=app] :is(.billing-step-label em,.billing-recommendation) { display:none; }
body[data-brand-page=app] :is(.api-key-inventory-head span,.billing-management-row strong,.billing-management-row span) { font-size:var(--fs-sm); }
body[data-brand-page=app] .account-section-nav a { font-size:var(--fs-sm); }

/* ── Job history DataRow: icon status / filename / mono meta / one
      primary action / ··· overflow ── */
.app-page .job-history-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.app-page .job-history-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.app-page .job-history-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-page .job-history-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

/* ── Overflow menu: ··· trigger + WAI-ARIA menu popover ── */
.app-page .job-more-actions > .job-more-trigger {
  display: inline-grid;
  align-self: center;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: var(--fill-1);
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-lede);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  padding: 0 0 4px;
}
.app-page .job-more-trigger:hover {
  background: var(--fill-2);
}
.app-page .job-more-trigger[aria-expanded="true"] {
  background: var(--fill-2);
  color: var(--text-strong);
}
/* Positioning, width, item rows and hover for the popover come from the
   existing .job-more-menu rules (position:absolute + --surface card); the
   global body[data-brand-ui] [hidden] fallback closes it. */
.app-page .job-more-menu :is(a, button)[role="menuitem"]:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--signal);
}

/* Uniform menuitems: the elements carry their outside-menu styles
   (.doc-link filled button, .secondary, .ghost-action borders) — inside the
   menu every row is the same text size, weight, padding and alignment, with
   a fixed 14px icon slot and no per-item chrome. */
.app-page .job-more-menu :is(a, button)[role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}
.app-page .job-more-menu [role="menuitem"] > svg {
  width: 14px;
  height: 14px;
  flex: none;
}
/* Items without an icon keep the same slot so the labels line up. */
.app-page .job-more-menu [role="menuitem"]:not(:has(> svg))::before {
  content: "";
  width: 14px;
  flex: none;
}
/* Destructive entry: last, separated by a 1px divider, danger token. */
.app-page .job-more-menu [role="menuitem"][data-delete-job] {
  margin-top: 4px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
  color: var(--danger);
}
.app-page .job-more-menu [role="menuitem"][data-delete-job]:hover {
  border-top-color: var(--line);
  color: var(--danger);
}

/* ── S3 intended changes — these rules deliberately override the migrated
      originals above and are the whitelisted computed-style diff ── */

/* Item 5: section headings ("Plan usage", "Job history" and the other
   card-level section headings) — Plex Sans 600 at the --fs-h3 token.
   Scoped to section heads only; dialog titles and the developer intro
   heading keep their display serif. */
.app-page :is(.activity-usage-head h2, .account-history-card h2, .app-card-head h2) {
  font-family: var(--sans);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: var(--lh-h3);
}

/* Item 5: metric values, credit counts, and table numbers — Plex Sans 500
   with tabular numerals. */
.app-page :is(
  .account-primary-metrics strong,
  .usage-receipt-totals span,
  .job-history-meta,
  .plan-credits-hero,
  .plan-amount,
  .plan-price,
  .usage-balance-summary strong,
  .account-display-name
) {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Item 7: on phones the account section tabs stay one horizontally
   scrollable row instead of wrapping into a 2×2 grid. */
@media (max-width: 640px) {
  .app-page .account-section-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .app-page .account-section-nav::-webkit-scrollbar {
    display: none;
  }
  .app-page .account-section-nav a {
    flex: 0 0 auto;
  }
}

/* ── Invite program (referral) ─────────────────────────────────────── */

/* Floating body-level chip — must stay outside the transformed `main`
   (an identity transform would anchor position:fixed to the page, not the
   viewport) and is stacked left of the feedback launcher / toast column so
   it never overlaps them or shifts page content. */
.invite-prompt {
  position: fixed;
  z-index: 75;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3, 12px);
  max-width: min(340px, calc(100vw - 96px));
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(23, 19, 15, 0.2);
  font-size: 0.82rem;
}
.invite-prompt[hidden] {
  display: none !important;
}
.invite-prompt-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
}
.invite-prompt-body {
  flex: 1 1 150px;
  min-width: 0;
}
.invite-prompt-body p {
  margin: 0;
}
.invite-prompt-body strong {
  white-space: nowrap;
}
.invite-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.invite-prompt button {
  border: 0;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 11px 14px;
  white-space: nowrap;
  box-shadow: none;
}
.invite-prompt button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
.invite-prompt .ghost-action {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
}
.invite-prompt .ghost-action:not(:disabled):hover {
  border-color: var(--ink);
}
@media (max-width: 820px) {
  body.has-task-toast .invite-prompt {
    bottom: max(140px, calc(env(safe-area-inset-bottom) + 122px));
  }
}

.app-page .invite-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3, 12px);
  margin-top: var(--s-4, 16px);
}
.app-page .invite-code {
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-h3, 20px);
  letter-spacing: 0.04em;
  padding: var(--s-2, 8px) var(--s-3, 12px);
  border: 1px solid var(--rule-strong, rgba(23, 19, 15, 0.24));
  border-radius: var(--r-md, 8px);
  background: var(--surface-sunken, #f0eadd);
  color: var(--text-strong, #17130f);
}
.app-page .invite-share-row {
  margin-top: var(--s-4, 16px);
}
.app-page .invite-share-url {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-sm, 14px);
  padding: var(--s-2, 8px) var(--s-3, 12px);
  border: 1px solid var(--rule, rgba(23, 19, 15, 0.11));
  border-radius: var(--r-sm, 6px);
  background: var(--surface-sunken, #f0eadd);
  color: var(--text-muted, #6c6257);
  overflow-wrap: anywhere;
  margin-bottom: var(--s-3, 12px);
}
.app-page .invite-disable-action {
  color: var(--danger, #b42318);
}
.app-page .invite-friends {
  margin-top: var(--s-6, 24px);
  border-top: 1px solid var(--rule, rgba(23, 19, 15, 0.11));
  padding-top: var(--s-4, 16px);
}
.app-page .invite-friends h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3, 12px);
  font-size: var(--fs-sm, 14px);
  font-weight: 600;
  margin: 0 0 var(--s-3, 12px);
}
.app-page .invite-friends .table-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-page .invite-count {
  color: var(--text-muted, #6c6257);
  font-size: var(--fs-sm, 14px);
  font-weight: 400;
  white-space: nowrap;
}
.app-page .invite-empty {
  color: var(--text-muted, #6c6257);
  font-size: var(--fs-sm, 14px);
  margin: 0;
}
.app-page .load-error-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3, 12px);
  padding: var(--s-3, 12px);
  color: var(--danger, #b42318);
}

/* "Have an invite code?" — same bordered sub-block as the friends list.
   The input shares the Redeem dialog field's treatment (styles.css); here
   it only sizes inside the row. Apply stretches to the input's height on
   one row and stacks below it at 480px and under. */
.app-page .invite-apply-block {
  margin-top: var(--s-6, 24px);
  border-top: 1px solid var(--rule, rgba(23, 19, 15, 0.11));
  padding-top: var(--s-4, 16px);
}
.app-page .invite-apply-block h3 {
  font-size: var(--fs-sm, 14px);
  font-weight: 600;
  margin: 0 0 var(--s-3, 12px);
}
.app-page .invite-apply-form {
  display: flex;
  align-items: stretch;
  gap: var(--s-2, 8px);
}
.app-page .invite-apply-form input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
}
.app-page .invite-apply-form input:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}
.app-page .invite-apply-form button {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .app-page .invite-apply-form {
    flex-direction: column;
  }
}
.app-page .invite-apply-block code {
  font-family: var(--font-mono, monospace);
  font-size: 0.95em;
}

/* Incumbent copies: these shared-component rules used to win their
   specificity ties against the migrated .app-card button / form rules
   because page-polish loaded later. ui-account.css now loads last, so the
   verbatim rules are re-emitted here to preserve the same winners on /app. */
.code-language-tabs button { position: relative; border: 0; border-radius: 5px; min-height: 38px; padding: 6px 10px; background: transparent; color: #746c5e; font: 550 .8rem var(--sans); cursor: pointer; }
.code-language-tabs button[aria-selected="true"] { color: #302c24; }
.code-language-tabs button:hover { color: var(--signal-strong); }
