/* Shared route chrome and controls. Page-specific composition lives beside each page. */
:root,
:root[data-theme] {
  --accent: var(--accent-text);
  --brand-blue: var(--action);
  --brand-blue-hover: var(--action-hover);
  --ink: var(--text);
  --muted: var(--quiet);
  --paper: var(--canvas);
  --surface: var(--panel);
  --line: var(--rule);
  --border: var(--rule);
  --soft: var(--selection);
  --positive: var(--accent-text);
  --control: var(--tint);
  --dark: var(--inverse);
  background: var(--canvas);
  color: var(--text);
  font-family: var(--ui-font);
}
body {
  background-color: var(--canvas);
  color: var(--text);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
:is(h1, h2, h3, h4, .eyebrow, .metric strong) {
  font-family: var(--ui-font);
}
:is(button, a, summary, input, select, textarea):focus-visible {
  outline-color: var(--focus);
}
button.quiet-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--quiet);
}
button.quiet-icon:enabled:hover { background: var(--tint); color: var(--text); }
button.quiet-icon:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
button.quiet-icon:disabled { opacity: .45; }
button.quiet-icon[hidden] { display: none; }
button.quiet-icon .ui-icon { width: 20px; height: 20px; }
.btn,
.public-site .btn {
  border-radius: var(--radius);
  min-height: var(--control-height);
  font-size: 14px;
  font-weight: 550;
  gap: 8px;
  transition:
    background-color 190ms var(--ease),
    border-color 190ms var(--ease),
    color 190ms var(--ease),
    transform 180ms var(--ease);
}
.btn:not(.secondary),
[data-theme="dark"] .btn:not(.secondary),
.skip-link {
  background: var(--action);
  color: var(--on-action);
  border-color: transparent;
}
.btn:not(.secondary):hover:not(:disabled),
[data-theme="dark"] .btn:not(.secondary):hover:not(:disabled) {
  background-color: var(--action-hover);
  transform: none;
}
.btn.secondary {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--edge);
}
.btn.secondary:hover:not(:disabled) {
  background: var(--tint);
  border-color: var(--focus);
  transform: none;
}
.btn.secondary.icon-only {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
}
.btn.secondary.icon-only .ui-icon { width: 17px; height: 17px; }
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  cursor: not-allowed;
}
.route-actions,
.account-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.route-actions > a,
.account-header-actions > a {
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  font-size: 14px;
  text-decoration: none;
}
.route-actions > a:hover,
.account-header-actions > a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.in-footer {
  background: var(--inverse);
  color: var(--on-inverse);
  font-family: var(--ui-font);
}
.in-footer h2,
.in-footer .in-footer-signature {
  font-family: var(--ui-font);
}
.in-footer h2,
.in-footer p,
.in-footer a small,
.in-footer-bottom {
  color: var(--inverse-quiet);
}
.in-footer a,
.in-footer .in-footer-brand,
.in-footer-brand > span {
  color: var(--on-inverse);
}
.in-footer a:hover,
.in-footer a:focus-visible {
  color: var(--inverse-quiet);
}
.in-footer-grid,
.in-footer-bottom {
  border-color: var(--inverse-rule);
}
.in-footer .in-footer-top {
  padding-bottom: 20px;
}
.in-footer .in-footer-grid {
  padding-block: 20px;
}
.in-footer .in-footer-signature {
  display: none;
}

/* The ISO shell uses a quiet rail, a single active state and a slim tools row. */
.shell {
  grid-template-columns: 208px minmax(0, 1fr);
}
.shell .sidebar {
  width: 208px;
  padding: 24px 12px;
  border-inline-end: 1px solid var(--rule);
  background: var(--tint);
  color: var(--text);
}
.shell .sidebar > a {
  padding-left: 10px;
  color: var(--text);
}
.shell .sidebar .brand {
  margin-bottom: 24px;
  font-size: 29px;
}
.sidebar #portal-navigation {
  gap: 2px;
}
.sidebar #portal-navigation :is(button, a, summary),
.side-bottom :is(.settings-link, .profile) {
  color: var(--quiet);
  border-radius: 7px;
  min-height: 44px;
  font-weight: 470;
}
.sidebar #portal-navigation button {
  margin: 0;
  padding-block: 8px;
}
.sidebar #portal-navigation button.active {
  color: var(--accent-text);
  background: var(--selection);
  box-shadow: inset 2px 0 var(--focus);
  font-weight: 600;
}
.sidebar #portal-navigation button.active .ui-icon,
.sidebar .nav-blog .ui-icon {
  color: inherit;
}
.sidebar #portal-navigation :is(button, a, summary):hover,
.side-bottom :is(.settings-link, .profile):hover {
  color: var(--text);
  background: var(--selection);
}
.sidebar details,
.sidebar .profile,
.side-bottom {
  border-color: var(--rule);
}
.sidebar .profile small,
.sidebar details > summary,
.sidebar .settings-link {
  color: var(--quiet);
}
.sidebar .mobile-menu-toggle {
  color: var(--text);
  border-color: var(--edge);
}
.shell .topbar {
  min-height: 62px;
  height: auto;
  padding-block: 7px;
  background: var(--canvas);
  border-bottom: 1px solid var(--rule);
}
.top-actions {
  gap: 8px;
}
.top-actions .demo-label {
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--quiet);
  font-size: 12px;
}
.top-actions #portal-switch {
  background-color: var(--panel);
  border-color: var(--edge);
  color: var(--text);
}
.shell .page-heading h1 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 560;
  letter-spacing: -0.035em;
}
.shell .page-heading p {
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.6;
}
.shell .content {
  padding-top: 20px;
}
.shell
  :is(
    .category-item,
    .service-card,
    .metric,
    .pipeline-column,
    .settings-section,
    .rank-card,
    .leader-card
  ) {
  border-radius: var(--radius);
  box-shadow: none;
}
.shell :is(.status, .demo-label, .level, .pill, .role-chip) {
  border-radius: 5px;
}
.shell .category-item {
  background: transparent;
  border-color: var(--rule);
}
.shell .category-item.selected {
  background: var(--selection);
  border-color: var(--edge);
  color: var(--text);
}
.shell .category-item .category-symbol {
  border-color: var(--edge);
  background: var(--panel);
  color: var(--accent-text);
}
.account-header {
  border-bottom: 1px solid var(--rule);
  background: var(--canvas);
}
.account-header .brand {
  color: var(--text);
}
@media (max-width: 980px) {
  .top-actions .demo-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .shell .sidebar {
    width: 100%;
    padding: 8px 14px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--rule);
  }
  .shell .sidebar > a {
    padding-left: 0;
  }
  .shell .sidebar .brand {
    margin-bottom: 0;
    font-size: 26px;
  }
  .shell .topbar {
    min-height: 54px;
    padding-block: 4px;
  }
  .shell .content {
    padding-top: 20px;
  }
}

/* Vendor controls share the same grid and status language as the product editor. */
.vw-app .vw-chrome {
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: var(--canvas);
  box-shadow: none;
}
.vw-app .vw-chrome .vw-header,
.vw-app .vw-chrome .vw-companybar {
  width: 100%;
  max-width: 1280px;
  padding-inline: 24px;
  margin-inline: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}
.vw-app .vw-chrome .vw-header {
  border-bottom: 1px solid var(--rule);
}
.vw-app .vw-chrome .vw-header:only-child {
  border-bottom: 0;
}
.vw-header :is(.vw-mode, .vw-header-end > a, .vw-account),
.vw-companybar nav button {
  color: var(--quiet);
}
.vw-header .vw-mode {
  border-inline-start: 1px solid var(--rule);
  padding-inline-start: 14px;
}
.vw-app .vw-companybar nav button[aria-current="page"] {
  color: var(--accent-text);
  border-bottom-color: var(--focus);
}
.vw-main :is(.vw-heading h1, .vw-section-heading h1) {
  font-weight: 565;
  letter-spacing: -0.035em;
}
.vw-app .vw-main .vw-product-list {
  gap: 12px;
}
.vw-app .vw-catalog-card {
  border-color: var(--rule);
  background: var(--panel);
  padding: 16px 20px;
  box-shadow: none;
}
.vw-app .vw-catalog-image {
  color: var(--accent-text);
  background: var(--tint);
  border-color: var(--rule);
}
.vw-app .vw-catalog-cost h3,
.vw-app .vw-catalog-split {
  color: var(--quiet);
}
.vw-app .vw-publication-gate {
  background: var(--tint);
  border-color: var(--rule);
}
.vw-app .vw-visibility-control {
  border-color: var(--rule);
  background: var(--tint);
}
.vw-app .vw-visibility-control button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--accent-text);
  border-color: var(--edge);
  box-shadow: none;
}
@media (max-width: 680px) {
  .vw-app .vw-chrome .vw-header,
  .vw-app .vw-chrome .vw-companybar {
    padding-inline: 12px;
  }
  .vw-app .vw-chrome .vw-header-end,
  .route-actions,
  .account-header-actions {
    gap: 4px;
  }
  .vw-header .vw-mode {
    display: none;
  }
  .vw-header .brand { width: 112px; }
  .vw-app .vw-catalog-card {
    padding: 14px;
  }
}
@media (max-width: 380px) {
  .landnav nav > ascend-search .site-search-trigger {
    padding-inline: 6px;
  }
  .landnav nav > ascend-search .site-search-trigger svg {
    width: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn,
  .theme-toggle,
  .surface-link,
  .home-reading a,
  :is(.surface-link, .home-reading a) .public-arrow {
    transition: none;
  }
}

body > .skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  border-radius: 6px;
  padding: 10px 14px;
}
body > .skip-link:focus {
  top: 8px;
}
@media (max-width: 520px) {
  .shell .topbar .breadcrumb {
    display: none;
  }
  .shell .topbar {
    padding-inline: 12px;
  }
  .shell .top-actions {
    width: 100%;
    gap: 4px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .shell .top-actions #portal-switch {
    min-width: 0;
    width: auto;
    max-width: 136px;
  }
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.shell .category-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-block: 0 20px;
  border-block: 1px solid var(--rule);
  padding: 6px 0;
}
.shell .category-rail .category-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  width: auto;
  padding: 5px 8px;
  gap: 6px;
  border: 0;
  border-radius: 6px;
}
.shell .category-rail .category-symbol {
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.shell .category-rail .category-symbol .ui-icon {
  width: 17px;
  height: 17px;
  display: block;
}
.shell .category-rail strong {
  white-space: nowrap;
}
.shell .category-rail button:not([aria-pressed="true"]):hover {
  background: var(--tint);
}
.shell .program-grid {
  display: block;
  border-top: 1px solid var(--rule);
}
.shell .program-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.92fr) minmax(
      140px,
      0.43fr
    );
  gap: 16px 24px;
  align-items: center;
  position: relative;
  padding: 16px 12px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  transition: background-color 190ms var(--ease);
}
.shell .program-card:hover {
  transform: none;
  background: var(--panel);
}
.shell .program-identity {
  min-width: 0;
}
.shell .program-top {
  min-height: 22px;
  justify-content: flex-start;
}
.shell .program-top .save-icon {
  position: absolute;
  right: 14px;
  top: 8px;
  margin: 0;
  color: var(--quiet);
}
.shell .program-top .save-icon.is-saved {
  color: var(--accent-text);
}
.shell .program-name {
  min-height: 44px;
  padding: 0;
}
.shell .program-name .supplier-logo {
  font-size: 22px;
  font-weight: 560;
  color: var(--text);
  letter-spacing: -0.035em;
}
.shell .program-description {
  margin: 3px 0 0;
  max-width: 52ch;
  min-height: 0;
  color: var(--quiet);
  line-height: 1.5;
}
.shell .program-proof {
  border: 0;
  padding-top: 0;
}
.shell .program-proof strong {
  font: 550 19px/1.15 var(--ui-font);
  letter-spacing: -0.04em;
}
.shell .program-proof .score-value {
  min-height: 44px;
}
.shell .program-bottom {
  min-height: 0;
  padding: 8px 0 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.shell .program-bottom .availability {
  margin-inline-start: auto;
  font-size: 10px;
  background: transparent;
  padding: 2px 0;
}
.shell .program-bottom .at-capacity {
  color: var(--caution);
}
.shell .program-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  padding: 20px 28px 0 0;
}
.shell .program-actions :is(button, a, label) {
  min-height: 36px;
  padding-block: 4px;
}
.shell .program-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.shell .program-actions .ui-icon {
  width: 14px;
  height: 14px;
}
@media (max-width: 1050px) {
  .shell .program-card {
    grid-template-columns: minmax(0, 1fr) minmax(214px, 0.8fr);
    gap: 8px 16px;
  }
  .shell .program-actions {
    grid-column: 1/-1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0;
  }
  .shell .program-proof {
    padding-inline-end: 36px;
  }
}
@media (max-width: 600px) {
  .shell .category-rail {
    gap: 3px 7px;
  }
  .shell .category-rail .category-item {
    font-size: 12px;
  }
  .shell .program-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 4px;
    gap: 10px;
  }
  .shell .program-identity {
    padding-inline-end: 40px;
  }
  .shell .program-proof {
    padding-inline-end: 0;
  }
  .shell .program-top .save-icon {
    right: 0;
  }
  .shell .program-actions :is(button, a, label) {
    min-height: 44px;
  }
}

.published-products { margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.published-products h2, .market-example-title { margin-bottom: 10px; font-size: 21px; }
.published-message { color: var(--quiet); font-size: 14px; line-height: 1.5; }
.published-content > .text-button { display: inline-flex; align-items: center; min-height: 44px; }
.published-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.published-filters label { display: grid; gap: 6px; color: var(--quiet); font-size: 13px; flex: 1 1 180px; max-width: 370px; }
.published-filters :is(input, select) { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--edge); border-radius: 8px; background-color: var(--panel); color: var(--text); padding: 8px 10px; font-size: 16px; }
.published-product { border-top: 1px solid var(--rule); }
.published-product summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 8px 0; cursor: pointer; }
.published-product summary strong { display: block; overflow-wrap: anywhere; }
.published-product summary small { display: block; color: var(--quiet); margin-top: 3px; }
.published-view, .published-actions a { flex-shrink: 0; color: var(--accent-text); font-size: 13px; }
.published-product[open] .published-view { visibility: hidden; }
.published-product-details { padding: 0 0 12px; max-width: 700px; color: var(--text); }
.published-product-details h3 { margin: 12px 0 6px; font-size: 14px; }
.published-description { margin: 4px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.published-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.published-actions a { display: inline-flex; min-height: 44px; align-items: center; }
.published-actions a:hover { text-decoration: underline; }

.top-actions .vendor-portal-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-inline: 8px; color: var(--accent-text); text-decoration: none; font-size: 13px; font-weight: 550; white-space: nowrap; }
.top-actions .vendor-portal-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-actions .vendor-portal-link svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .shell .top-actions #portal-switch { display: none; }
}
@media (max-width: 760px) {
  .shell .top-actions,
  .shell:has(incentive-live) .top-actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 4px;
  }
  .shell .top-actions .vendor-portal-link { margin-inline-start: auto; }
}
.commercial-lock { margin-block: 6px; font-size: 13px; color: var(--quiet); }
.commercial-lock summary { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; cursor: pointer; color: var(--text); font-weight: 600; }
.commercial-lock summary::-webkit-details-marker { display: none; }
.commercial-lock summary::marker { content: ""; }
.commercial-lock summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.commercial-lock .ui-icon { width: 15px; height: 15px; }
.commercial-lock p { max-width: 44ch; margin: 0 0 8px; }
.receipt-id { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 0 6px; font-size: 13px; color: var(--quiet); }
.receipt-id code { overflow-wrap: anywhere; user-select: all; color: var(--text); }
.receipt-id .quiet-icon { width: 44px; height: 44px; }
.receipt-id .quiet-icon .ui-icon { width: 16px; height: 16px; }
.field-help { font-size: 13px; color: var(--quiet); }
.field-help > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent-text);
  cursor: pointer;
  font-weight: 600;
}
.field-help > summary::-webkit-details-marker { display: none; }
.field-help > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field-help > summary .ui-icon { width: 16px; height: 16px; }
.field-help > p { max-width: 48ch; margin: 0 0 8px; }

/* Profile photos in the account button (account-identity.js). */
incentive-account-identity .avatar { overflow: hidden; }
incentive-account-identity .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Links to the other side of Ascend show only for Ascend staff. */
.vendor-portal-link[hidden], .vs-portal-link[hidden], a[data-vw="iso"][hidden] { display: none !important; }

/* View as: the bar at the top of a tab the Ascend admin opened as another person. */
.view-as-bar {
  position: sticky; top: 0; z-index: 10000;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: #fde68a; color: #1f1a00; font-size: 13px; line-height: 1.4;
}
.view-as-bar button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: #1f1a00; color: #fde68a; border: 0; border-radius: 6px; padding: 6px 12px; min-height: 32px;
}
.va-note { max-width: 70ch; }
.va-filter { display: grid; gap: 4px; max-width: 420px; margin: 12px 0; }
.va-table th small { display: block; font-weight: 400; opacity: .7; }
.am-add-vendor { margin: 0 0 20px; }
.am-add-vendor form { display: grid; gap: 10px; max-width: 460px; margin-top: 10px; }
.am-add-vendor label { display: grid; gap: 4px; }
.am-add-vendor .am-check { display: flex; gap: 8px; align-items: center; }
.am-created-actions, .am-org-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
