/* ==========================================================================
   Youranke · Design System
   Restrained developer-platform aesthetic: light-first neutral canvas,
   crisp white cards, 1px hairlines, cobalt blue accent, tabular numerals.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --paper: #f7f8fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --soft: #f1f5f9;
  --soft-2: #e2e8f0;

  /* Ink */
  --ink: #0f172a;
  --ink-2: #334155;
  --quiet: #475569;
  --faint: #64748b;
  --muted: var(--quiet);

  /* Hairlines */
  --line: #e5e7eb;
  --line-strong: #d1d5db;

  /* Brand · Cobalt Blue */
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --brand-ink: #1d4ed8;
  --deep: #2563eb;
  --deep-hover: #1d4ed8;
  --focus: #2563eb;
  --focus-ring: rgba(37, 99, 235, 0.22);

  /* Table & Chart */
  --table-head: #f8fafc;
  --row-hover: #f8fafc;
  --row-stripe: #fcfcfd;
  --chart-bar: #2563eb;

  /* Semantic Status */
  --success: #059669;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --info-border: #bfdbfe;

  /* Toast & Code */
  --notice-bg: #0f172a;
  --notice-ink: #f8fafc;
  --code-bg: #0f172a;
  --code-surface: #1e293b;
  --code-border: #1e293b;
  --code-ink: #e2e8f0;
  --code-dim: #94a3b8;

  /* Legacy aliases kept for compatibility */
  --hero-bg: var(--surface);
  --hero-muted: var(--quiet);
  --hero-stat: var(--ink);
  --terrain-bg: var(--soft);
  --terrain-caption: var(--quiet);

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px -12px rgba(15, 23, 42, 0.16);

  /* Geometry */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --header-h: 60px;
  --page-w: 1240px;

  /* Typography */
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--brand);
  scrollbar-color: var(--line-strong) transparent;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root[data-resolved-theme="dark"] {
  color-scheme: dark;

  --paper: #0b0f19;
  --surface: #111827;
  --surface-raised: #161f30;
  --soft: #172033;
  --soft-2: #1e293b;

  --ink: #f8fafc;
  --ink-2: #cbd5e1;
  --quiet: #94a3b8;
  --faint: #64748b;

  --line: #1e293b;
  --line-strong: #334155;

  --brand: #60a5fa;
  --brand-hover: #93c5fd;
  --brand-soft: rgba(37, 99, 235, 0.16);
  --brand-border: rgba(96, 165, 250, 0.34);
  --brand-ink: #93c5fd;
  --deep: #2563eb;
  --deep-hover: #3b82f6;
  --focus: #60a5fa;
  --focus-ring: rgba(96, 165, 250, 0.28);

  --table-head: #0f1624;
  --row-hover: #151e30;
  --row-stripe: #0e1522;
  --chart-bar: #60a5fa;

  --success: #34d399;
  --success-soft: rgba(5, 150, 105, 0.15);
  --success-border: rgba(52, 211, 153, 0.32);
  --warning: #fbbf24;
  --warning-soft: rgba(217, 119, 6, 0.16);
  --warning-border: rgba(251, 191, 36, 0.32);
  --danger: #f87171;
  --danger-bg: rgba(220, 38, 38, 0.16);
  --danger-border: rgba(248, 113, 113, 0.34);
  --info: #60a5fa;
  --info-soft: rgba(37, 99, 235, 0.16);
  --info-border: rgba(96, 165, 250, 0.34);

  --notice-bg: #f8fafc;
  --notice-ink: #0f172a;
  --code-bg: #070b14;
  --code-surface: #0f172a;
  --code-border: #1e293b;
  --code-ink: #e2e8f0;
  --code-dim: #7c8ba1;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.72);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
}

body[data-layout="site"] {
  background: var(--paper);
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

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

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
}

.mono,
code,
pre,
kbd {
  font-family: var(--mono);
}

code {
  font-size: 0.9em;
}

::selection {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.skip {
  position: absolute;
  top: -6rem;
  left: 1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 60;
}

.skip:focus {
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ==========================================================================
   Global Header & Site Banner
   ========================================================================== */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.mast-inner {
  height: 100%;
  width: min(100% - 3rem, var(--page-w));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
  flex: none;
  color: var(--ink);
}

.brand img {
  width: 26px;
  height: 26px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 2.1rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--quiet);
  white-space: nowrap;
  transition: color 0.14s, background 0.14s;
}

.nav a:hover {
  color: var(--ink);
  background: var(--soft);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--soft);
}

.mast-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}

.mast-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.15rem;
  flex: none;
  width: 13.5rem;
  padding: 0 0.55rem 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--faint);
  font-size: 0.85rem;
  text-align: left;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}

.mast-search:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--quiet);
}

.mast-search-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast-search kbd {
  font-size: 0.7rem;
  padding: 0.08rem 0.35rem;
  background: var(--surface);
}

.mast-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--quiet);
  transition: background 0.14s, color 0.14s;
}

.mast-icon-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

.locale-picker .select {
  height: 2.1rem;
  min-height: 0;
  border-color: transparent;
  background: transparent;
  color: var(--quiet);
  font-size: 0.85rem;
  padding: 0 1.65rem 0 0.55rem;
  max-width: 9.5rem;
}

.locale-picker .select:hover {
  background: var(--soft);
  color: var(--ink);
  border-color: transparent;
}

kbd {
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--quiet);
  min-width: 1.3rem;
  text-align: center;
  padding: 0.06rem 0.3rem;
  line-height: 1.35;
}

/* Global Site Announcement Banner */
.site-banner {
  border-bottom: 1px solid var(--info-border);
  background: var(--info-soft);
  color: var(--brand-ink);
  font-size: 0.85rem;
  line-height: 1.5;
}

.site-banner[data-level="info"] {
  border-bottom-color: var(--info-border);
  background: var(--info-soft);
  color: var(--brand-ink);
}

.site-banner[data-level="warning"] {
  border-bottom-color: var(--warning-border);
  background: var(--warning-soft);
  color: var(--warning);
}

.site-banner[data-level="success"] {
  border-bottom-color: var(--success-border);
  background: var(--success-soft);
  color: var(--success);
}

.site-banner-inner,
.site-banner > div {
  width: min(100% - 3rem, var(--page-w));
  margin-inline: auto;
  padding: 0.55rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
  flex-wrap: wrap;
}

.site-banner p,
.site-banner span {
  margin: 0;
}

.site-banner a {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* ==========================================================================
   Page Frame
   ========================================================================== */
main {
  flex: 1;
  width: min(100% - 3rem, var(--page-w));
  margin-inline: auto;
  padding-block: 2rem 4rem;
}

main:focus {
  outline: none;
}

body[data-layout="site"] main,
body[data-layout="console"] main,
body[data-layout="auth"] main {
  width: 100%;
  padding: 0;
}

body[data-layout="console"] .footer,
body[data-layout="auth"] .footer {
  display: none;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.15rem 0 1.4rem;
}

.page-head > div {
  min-width: 0;
}

.page-head h1 {
  font-size: 1.5rem;
}

.page-head p {
  margin-top: 0.35rem;
  color: var(--quiet);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 48rem;
}

/* ==========================================================================
   Buttons, Chips, Sub-tabs, Inputs, Progress
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 2.25rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background 0.14s, border-color 0.14s, color 0.14s, box-shadow 0.14s;
}

.btn:hover {
  background: var(--soft);
  border-color: var(--line-strong);
}

.btn.sm {
  height: 1.9rem;
  padding: 0 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn.lg {
  height: 2.7rem;
  padding: 0 1.2rem;
  font-size: 0.94rem;
  border-radius: 10px;
}

.btn.primary {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.22);
}

.btn.primary:hover {
  background: var(--deep-hover);
  border-color: var(--deep-hover);
}

.btn.danger {
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn.danger:hover {
  background: var(--danger-bg);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}

.btn.ghost:hover {
  background: var(--soft);
  color: var(--ink);
}

button:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: none;
  padding: 0.15rem 0.1rem;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 500;
}

.text-btn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--faint);
  transition: background 0.14s, color 0.14s;
}

.icon-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

.icon-btn[aria-pressed="true"] {
  color: #d97706;
}

.icon-btn[aria-pressed="true"] .icon {
  fill: currentColor;
}

/* Filter Chip Bar & Chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--soft);
}

.chip[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-ink);
  border-color: var(--brand-border);
  font-weight: 600;
}

.chip .icon {
  width: 0.92rem;
  height: 0.92rem;
}

/* Sub-tabs */
.sub-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

@supports not (scrollbar-width: none) {
  .sub-tabs::-webkit-scrollbar,
  .tabs-line::-webkit-scrollbar {
    display: none;
  }
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--quiet);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}

.sub-tab:hover {
  color: var(--ink);
}

.sub-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* Native Progress Bar (CSP-safe replacement for inline width bars) */
progress.meter-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
  accent-color: var(--brand);
}

progress.meter-bar::-webkit-progress-bar {
  background: var(--soft);
  border-radius: 999px;
}

progress.meter-bar::-webkit-progress-value {
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.2s ease;
}

progress.meter-bar::-moz-progress-bar {
  background: var(--brand);
  border-radius: 999px;
}

progress.meter-bar.is-ok::-webkit-progress-value,
progress.meter-bar.is-ok::-moz-progress-bar {
  background: var(--success);
}

progress.meter-bar.is-warn::-webkit-progress-value,
progress.meter-bar.is-warn::-moz-progress-bar {
  background: var(--warning);
}

progress.meter-bar.is-err::-webkit-progress-value,
progress.meter-bar.is-err::-moz-progress-bar {
  background: var(--danger);
}

/* Status Pills & Dots */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.55rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.is-ok {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

.status-pill.is-warn {
  background: var(--warning-soft);
  border-color: var(--warning-border);
  color: var(--warning);
}

.status-pill.is-err {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.status-pill.is-info {
  background: var(--info-soft);
  border-color: var(--info-border);
  color: var(--brand-ink);
}

.status-pill.is-muted {
  background: var(--soft);
  border-color: var(--line);
  color: var(--quiet);
}

.status-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* Selects & Search */
.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.select {
  appearance: none;
  height: 2.25rem;
  min-height: 2.25rem;
  max-width: 100%;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.86rem;
  cursor: pointer;
  text-overflow: ellipsis;
}

.select:hover {
  border-color: var(--faint);
}

.select-wrap > .icon {
  position: absolute;
  right: 0.55rem;
  width: 0.88rem;
  height: 0.88rem;
  pointer-events: none;
  color: var(--faint);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--faint);
  width: min(28rem, 100%);
  transition: border-color 0.14s, box-shadow 0.14s;
}

.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
}

.search input:focus-visible {
  outline: 0;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}

/* Forms */
.stack,
.form-stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea,
.inline-form input,
.panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.panel select:not(.select),
.panel textarea {
  display: block;
  width: 100%;
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.89rem;
  font-weight: 400;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-form input:focus,
.panel input:focus,
.panel select:focus,
.panel textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.field textarea,
.panel textarea {
  line-height: 1.6;
  resize: vertical;
}

.field input[type="password"],
.inline-form input[type="password"] {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.inline-form input {
  flex: 1;
  min-width: 10rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.button-row,
.panel-head,
.inline-form,
.actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.actions-end {
  justify-content: flex-end;
}

details summary {
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--quiet);
  font-size: 0.86rem;
  font-weight: 500;
}

details summary:hover {
  color: var(--ink);
}

details[open] > summary {
  margin-bottom: 0.6rem;
}

/* ==========================================================================
   KPI Cards
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.85rem;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--quiet);
  letter-spacing: 0.01em;
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-meta {
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.45;
}

/* ==========================================================================
   Panels, Callouts, Lists & Code Blocks
   ========================================================================== */
.panel {
  min-width: 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel + .panel,
.panel + section,
section + .panel {
  margin-top: 1rem;
}

.panel h2 {
  font-size: 1.02rem;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel > p,
.callout p,
.help {
  color: var(--quiet);
  font-size: 0.87rem;
  line-height: 1.65;
}

.panel > .stack {
  margin-top: 0.9rem;
}

.callout,
.empty,
.message {
  padding: 0.85rem 1rem;
  background: var(--soft);
  border-radius: var(--radius);
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 0.87rem;
}

.callout {
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
}

.empty {
  margin: 0.5rem 0;
  padding: 2.75rem 1.25rem;
  text-align: center;
  color: var(--quiet);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty .text-btn,
.empty .btn {
  margin-left: 0.5rem;
}

.message:empty {
  display: none;
}

.error,
.message.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.workspace-list {
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.workspace-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.workspace-item > div {
  min-width: 0;
}

.workspace-item strong,
.workspace-item small {
  display: block;
  overflow-wrap: anywhere;
}

.workspace-item strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.workspace-item small {
  margin-top: 0.2rem;
  color: var(--quiet);
  font-size: 0.8rem;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.description {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.secret {
  display: block;
  margin: 0.8rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font: 500 0.87rem/1.7 var(--mono);
  word-break: break-all;
  white-space: pre-wrap;
}

.doc-list {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.2rem;
  line-height: 1.7;
  font-size: 0.91rem;
  color: var(--ink-2);
}

.doc-list ::marker {
  color: var(--faint);
}

pre {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-block,
.output {
  color-scheme: dark;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--code-border);
}

.output {
  min-height: 6rem;
  max-height: 36rem;
  overflow: auto;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0.85rem 0 0.45rem;
  font-size: 0.82rem;
  color: var(--quiet);
}

.stat {
  font: 500 0.85rem var(--mono);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.muted,
.model-id {
  color: var(--faint);
}

/* ==========================================================================
   Responsive Data Tables
   ========================================================================== */
.table-frame,
.data-table-wrap {
  overflow: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

table.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

table.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.65rem 0.9rem;
  background: var(--table-head);
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

td {
  padding: 0.78rem 0.9rem;
  font-size: 0.87rem;
  vertical-align: middle;
}

table.data-table tbody td {
  border-bottom: 1px solid var(--line);
}

table.data-table tbody tr:last-child td {
  border-bottom: 0;
}

table.data-table tbody tr:nth-child(even) {
  background: var(--row-stripe);
}

th:first-child,
td:first-child {
  padding-left: 1.15rem;
}

th:last-child,
td:last-child {
  padding-right: 1.15rem;
}

tbody tr + tr {
  border-top: 1px solid var(--line);
}

table.data-table tbody tr + tr {
  border-top: 0;
}

tbody tr:hover,
table.data-table tbody tr:hover {
  background: var(--row-hover);
}

.cell-mono {
  font-family: var(--mono);
  font-size: 0.81rem;
  color: var(--ink-2);
}

.cell-num {
  font-family: var(--mono);
  font-size: 0.83rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  white-space: nowrap;
  text-align: right;
}

.row-actions .btn + .btn {
  margin-left: 0.35rem;
}

.row-actions .icon-btn {
  display: inline-grid;
  vertical-align: middle;
}

.table-empty {
  padding: 2.75rem 1.25rem;
  text-align: center;
  color: var(--quiet);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.model-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  padding: 0.1rem 0;
  border: 0;
  background: none;
  text-align: left;
}

.model-link > span:last-child {
  min-width: 0;
}

.model-id {
  display: block;
  margin-top: 0.14rem;
  font: 0.76rem/1.45 var(--mono);
  overflow-wrap: anywhere;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--quiet);
  font-size: 0.85rem;
}

/* ==========================================================================
   Publisher Marks
   ========================================================================== */
.mark {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  border-radius: 9px;
  background: var(--soft);
  color: var(--ink-2);
  font: 660 0.88rem/1 var(--sans);
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mark img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.mark.official-mark {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

:root[data-resolved-theme="dark"] .mark.official-mark {
  box-shadow: none;
}

.mark.c0 { background: #e8eefe; color: #1d4ed8; }
.mark.c1 { background: #fef0e6; color: #b45309; }
.mark.c2 { background: #e6f6ef; color: #047857; }
.mark.c3 { background: #f1ebfd; color: #6d28d9; }

.mark.c5 { background: #f1f5f9; color: #334155; }
.mark.c6 { background: #fdebf0; color: #be123c; }
.mark.c7 { background: #fbf5df; color: #854d0e; }

:root[data-resolved-theme="dark"] .mark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
:root[data-resolved-theme="dark"] .mark.c0 { background: #172554; color: #93c5fd; }
:root[data-resolved-theme="dark"] .mark.c1 { background: #3b2314; color: #fdba74; }
:root[data-resolved-theme="dark"] .mark.c2 { background: #0f2f24; color: #6ee7b7; }
:root[data-resolved-theme="dark"] .mark.c3 { background: #2a1d4a; color: #c4b5fd; }

:root[data-resolved-theme="dark"] .mark.c5 { background: #1e293b; color: #cbd5e1; }
:root[data-resolved-theme="dark"] .mark.c6 { background: #3b1525; color: #fda4af; }
:root[data-resolved-theme="dark"] .mark.c7 { background: #33270f; color: #fde047; }

.mark.sm {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
}

/* ==========================================================================
   Native Dialog, Setup Modal & Toast Notice
   ========================================================================== */
dialog {
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100dvh - 3rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

dialog.wide {
  width: min(70rem, calc(100vw - 2rem));
}

.dialog-inner {
  padding: 1.5rem;
}

.dialog-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-title-row h2 {
  font-size: 1.18rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dialog-title-row > .icon-btn {
  margin: -0.35rem -0.35rem 0 0;
}

.dialog-body {
  margin-top: 1rem;
}

/* Client One-Click Setup Modal */

.setup-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.setup-tabs button {
  height: 1.95rem;
  padding: 0 0.8rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--quiet);
  font-size: 0.82rem;
  font-weight: 500;
}

.setup-tabs button:hover {
  color: var(--ink);
}

.setup-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
  margin: 0.8rem 0;
}

.detail-grid > div {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-grid.metric-grid {
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 0;
}

.detail-grid.metric-grid > div {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.metric-grid dt {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--quiet);
}

.metric-grid dd {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

dt {
  margin-bottom: 0.25rem;
  color: var(--faint);
  font-size: 0.78rem;
}

dd {
  margin: 0;
  font-size: 0.91rem;
  overflow-wrap: anywhere;
}

.notice {
  position: fixed;
  z-index: 60;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  box-shadow: var(--shadow-lg);
  font-size: 0.87rem;
  font-weight: 500;
}

.notice:empty {
  display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  width: min(100% - 3rem, var(--page-w));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.35rem;
  color: var(--quiet);
  font-size: 0.84rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-brand span {
  padding-left: 0.55rem;
  border-left: 1px solid var(--line-strong);
}

.footer-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Public Homepage
   ========================================================================== */
.home {
  display: block;
}

.base-url {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  width: min(100%, 31rem);
  height: 2.95rem;
  padding: 0 0.35rem 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.base-url > span {
  flex: none;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
  padding-right: 0.6rem;
  border-right: 1px solid var(--line);
}

.base-url code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  color: var(--ink);
}

.base-url .btn {
  height: 2.2rem;
  box-shadow: none;
}

/* Interactive Quickstart Code Card */

/* Home Sections */

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-title h2 {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-title p {
  margin-top: 0.4rem;
  color: var(--quiet);
  font-size: 0.93rem;
  max-width: 38rem;
  line-height: 1.62;
}

/* Featured Models Grid on Homepage */

/* Ecosystem Clients Strip */

/* Provider Grid (kept compatible) */

/* 6 Capability Cards */

.feature {
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.feature h3 {
  margin-top: 0.95rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.feature p {
  margin-top: 0.45rem;
  color: var(--quiet);
  font-size: 0.88rem;
  line-height: 1.68;
}

/* Bottom Action Band */

/* ==========================================================================
   Public Service Status Page
   ========================================================================== */
.status-page {
  display: grid;
  gap: 1.5rem;
}

.status-hero {
  display: grid;
  gap: 1.1rem;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.status-banner.is-ok {
  border-color: var(--success-border);
  background: var(--success-soft);
}

.status-banner.is-warn {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.status-banner.is-err {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.status-banner-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.status-banner-main .status-dot {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.42rem;
}

.status-banner.is-ok .status-banner-main .status-dot { color: var(--success); }
.status-banner.is-warn .status-banner-main .status-dot { color: var(--warning); }
.status-banner.is-err .status-banner-main .status-dot { color: var(--danger); }
.status-banner.is-muted .status-banner-main .status-dot { color: var(--faint); }

.status-banner h1 {
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--ink);
}

.status-banner p {
  margin-top: 0.25rem;
  color: var(--quiet);
  font-size: 0.89rem;
}

.status-banner-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--quiet);
}

.status-section {
  display: grid;
  gap: 0.85rem;
}

.status-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-section-head h2 {
  font-size: 1.1rem;
}

.status-section-head p {
  font-size: 0.84rem;
  color: var(--quiet);
}

.status-provider-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.proto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.proto-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.proto-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.proto-card h3 {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
}

.proto-card p {
  font-size: 0.83rem;
  color: var(--quiet);
  line-height: 1.55;
}

.proto-endpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.proto-endpoints code {
  font-size: 0.74rem;
  padding: 0.16rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink-2);
}

/* ==========================================================================
   Model Catalog
   ========================================================================== */
.catalog-page {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.advanced {
  border: 0;
}

.advanced > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  padding: 0.1rem 0;
  font-size: 0.84rem;
}

.advanced > summary::-webkit-details-marker {
  display: none;
}

.checkout-panels:not(:empty) {
  margin-top: 1rem;
}

/* ==========================================================================
   Console Shell & Dashboard (.console / .ws-shell / .dash-grid)
   ========================================================================== */

.rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.rail a .icon {
  color: var(--faint);
}

.rail a:hover {
  background: var(--soft);
  color: var(--ink);
}

.rail [aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
}

.rail [aria-current="page"] .icon {
  color: var(--brand);
}

#team-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

#team-switcher select {
  max-width: min(23rem, 74vw);
}

/* Admin Tab Bar */
.admin-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.admin-tabs button,
.admin-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.4rem;
  padding: 0 0.85rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--quiet);
  font-size: 0.87rem;
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: color 0.14s, border-color 0.14s;
}

.admin-tabs button:hover,
.admin-tabs a:hover {
  color: var(--ink);
}

.admin-tabs [aria-selected="true"],
.admin-tabs [aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* Dashboard Charts & Quick Actions */

/* Inline Rail Layout */
.work-grid {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.work-grid > .rail {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

/* ==========================================================================
   Multimodal Playground (.pg-shell) & Markdown Preview
   ========================================================================== */

.pg-sidebar {
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.pg-modes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  width: fit-content;
  max-width: 100%;
}

.pg-modes button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--quiet);
  font-size: 0.84rem;
  font-weight: 500;
}

.pg-modes button[aria-selected="true"],
.pg-modes button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.pg-output {
  min-height: 12rem;
  max-height: 38rem;
  overflow: auto;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.md-think {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--quiet);
  font-size: 0.85rem;
}

/* ==========================================================================
   Interactive Docs Center (.docs-shell)
   ========================================================================== */

.sdk-tabs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
  scrollbar-width: none;
}

.sdk-tabs button {
  height: 2.05rem;
  padding: 0 0.8rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--quiet);
  font-size: 0.81rem;
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: -1px;
}

.sdk-tabs button[aria-selected="true"] {
  background: var(--code-bg);
  color: var(--code-ink);
  border-color: var(--code-bg);
}

/* ==========================================================================
   Sign-in / Auth Page
   ========================================================================== */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: calc(100dvh - var(--header-h));
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.5rem clamp(2rem, 5vw, 4.5rem);
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.auth-aside > div {
  margin-block: auto;
}

.auth-aside h2 {
  margin-top: 1.5rem;
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  line-height: 1.24;
  letter-spacing: -0.025em;
  font-weight: 650;
}

.auth-aside > div > p {
  margin-top: 0.8rem;
  color: var(--quiet);
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: 28rem;
}

.auth-points {
  display: grid;
  gap: 0.9rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.auth-points .feature-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--brand);
  flex: none;
}

.auth-points .feature-icon .icon {
  width: 1rem;
  height: 1rem;
}

.auth-points strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.auth-points span,
.auth-points div > span {
  color: var(--quiet);
  font-size: 0.85rem;
}

.auth-foot {
  color: var(--faint);
  font-size: 0.8rem;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--paper);
}

.auth-main > #workspace-panel {
  width: min(100%, 26rem);
}

.access {
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.access .panel-head {
  margin-bottom: 1.25rem;
}

.access .panel-head h2 {
  font-size: 1.32rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.access-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  margin: 0 0 1.4rem;
  padding: 3px;
  border-radius: 10px;
  background: var(--soft);
}

.access-tabs .chip {
  justify-content: center;
  height: 2.1rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--quiet);
  font-size: 0.84rem;
}

.access-tabs .chip[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

.access .stack {
  max-width: none;
}

.access button[type="submit"] {
  width: 100%;
  height: 2.55rem;
}

.access .button-row {
  justify-content: space-between;
}

.access .button-row button[type="submit"] {
  width: auto;
  flex: 1;
}

.access details summary {
  font-size: 0.84rem;
}

.passkey-login:not(:empty) {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.passkey-login .btn {
  width: 100%;
  height: 2.45rem;
}

.oidc-options:not(:empty) {
  display: grid;
  margin-top: 1rem;
}

.oidc-options .btn {
  width: 100%;
}

#download-result:not(:empty) {
  margin-top: 0.75rem;
}

/* ==========================================================================
   Feature Modules (Usage, Channels, Conversations, Plugins, Command Palette)
   ========================================================================== */
.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bench-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  width: fit-content;
  margin: 0 0 1.25rem;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.bench-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 7px;
  color: var(--quiet);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.bench-nav a:hover {
  color: var(--ink);
}

.bench-nav a[aria-current] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.job-access {
  margin-bottom: 1rem;
}

.job-access .field {
  max-width: 39rem;
}

.job-list-section {
  margin-top: 1.25rem;
}

.job-list-section h3 {
  font-size: 0.95rem;
}

.job-detail {
  max-height: 60vh;
}

.site-prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.email-step {
  margin-block-start: 1rem;
}

.channel-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.channel-flag input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}

.channel-panel .button-row {
  flex-wrap: wrap;
}

.channel-panel form {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1rem;
}

.channel-panel form h4 {
  margin: 0;
  font-size: 1rem;
}

.channel-panel .help {
  margin-block: 0.25rem;
}

.funding-history {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0 0.8rem;
}

.funding-history summary {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.funding-history summary .review-flag {
  margin-inline-start: 0.5rem;
}

.funding-history ol {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
}

.funding-history li {
  padding: 0.9rem;
  border-inline-start: 2px solid var(--brand-border);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.funding-history li + li {
  margin-top: 0.5rem;
}

.funding-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.funding-id code {
  font: 600 0.85rem/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.review-flag {
  display: inline-block;
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 0.73rem;
  font-weight: 600;
}

.funding-history .help {
  margin: 0.25rem 0;
  font-size: 0.78rem;
}

.funding-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
  gap: 0.75rem 1.2rem;
  margin: 0.85rem 0;
}

.funding-figures dt {
  color: var(--quiet);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.funding-figures dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.plugin-marketplace {
  container-type: inline-size;
}

.plugin-release {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem 1.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.plugin-release > * {
  min-width: 0;
  margin: 0;
}

.plugin-release .help {
  margin: 0.2rem 0 0;
}

.plugin-release select {
  width: 100%;
  max-width: 100%;
}

.plugin-marketplace .button-row {
  flex-wrap: wrap;
}

@container (min-width: 38rem) {
  .plugin-release {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.65fr);
    align-items: end;
  }
}

.route-history {
  margin-top: 1rem;
  overflow-wrap: anywhere;
}

.route-history summary {
  cursor: pointer;
  font-weight: 600;
}

.route-history ol {
  margin: 0.45rem 0 0;
  padding-inline-start: 1.4rem;
}

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(0, 2fr);
  align-items: start;
  gap: 1rem;
}

.conversation-layout > .panel {
  margin: 0;
}

.conversation-layout .panel-head {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.conversation-controls {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.conversation-messages {
  display: grid;
  gap: 0.65rem;
}

.conversation-entry,
.conversation-turn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  overflow-wrap: anywhere;
}

.conversation-entry {
  display: grid;
  gap: 0.25rem;
  text-align: start;
  color: inherit;
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}

.conversation-entry[aria-current="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.conversation-entry small {
  color: var(--muted);
}

.conversation-turn .panel-head {
  margin-bottom: 0.4rem;
}

.conversation-text {
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
}

.conversation-turn textarea {
  width: 100%;
}

.conversation-composer {
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
  align-items: start;
}

#voucher-admin .stack {
  grid-template-columns: minmax(0, 1fr);
}

#voucher-admin [data-table] {
  min-width: 0;
}

#voucher-admin .actions {
  flex-wrap: wrap;
}

.funding-panel {
  overflow-wrap: anywhere;
}

.funding-panel .help {
  margin: 0;
}

.funding-current {
  font-weight: 600;
}

.operator-tool .button-row {
  flex-wrap: wrap;
}

.operator-tool .help,
.dialog-body .help {
  overflow-wrap: anywhere;
}

.operator-tool .operator-trial {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.65rem;
}

.operator-tool .operator-trial h3 {
  font-size: 0.98rem;
  margin: 0.35rem 0;
}

.operator-trial > .button-row {
  margin-top: 0.75rem;
}

.operator-tool .code-block {
  max-height: 20rem;
  overflow: auto;
}

.processing-list {
  display: grid;
  gap: 0.55rem;
  margin-block: 0.85rem;
}

.processing-line {
  display: grid;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}

.processing-line small {
  display: block;
  color: var(--quiet);
  margin-top: 0.2rem;
}

.processing-line strong,
.processing-line small {
  overflow-wrap: anywhere;
}

.processing-line .btn {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
}

.rule-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.7rem;
}

.rule-columns .field {
  min-width: 0;
}

.identity-admin .panel-head,
.identity-detail .panel-head {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.identity-admin .identity-detail,
.identity-binding,
.identity-confirm {
  overflow-wrap: anywhere;
  min-width: 0;
}

.identity-detail h4 {
  margin: 1rem 0 0.4rem;
}

.identity-detail .detail-grid {
  margin: 0.5rem 0;
}

.identity-binding {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.identity-delete {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.8rem;
}

.identity-delete .btn,
.identity-confirm [data-confirm] {
  color: var(--danger);
}

.task-channel-panel .panel-head {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.task-channel-panel .field {
  max-width: 100%;
}

.task-channel-panel select {
  max-width: 100%;
  min-width: 0;
}

.task-route-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.4rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem;
  margin: 0;
}

.task-route-choices legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.task-route-choices label {
  min-height: 2.5rem;
  padding-inline: 0.4rem;
  overflow-wrap: anywhere;
}

.task-route-choices input {
  flex: none;
}

.task-channel-panel [data-plugin-id],
.plugin-format dd {
  overflow-wrap: anywhere;
}

.plugin-format:empty {
  display: none;
}

.plugin-format {
  font-size: 0.82rem;
}

.plugin-format dt {
  font-weight: 600;
}

.plugin-format dd {
  margin: 0 0 0.35rem;
}

.plugin-format code {
  display: block;
  white-space: pre-wrap;
}

.task-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.task-progress progress {
  width: 6rem;
  max-width: 100%;
  height: 0.55rem;
  accent-color: var(--brand);
}

.key-budget-fields {
  min-inline-size: 0;
  margin: 0;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.key-budget-fields legend,
.key-budget-summary h3,
.key-budget-receipt h3 {
  font-size: 0.86rem;
  font-weight: 600;
}

.key-budget-fields .help {
  margin: 0.5rem 0 0;
}

.key-budget-summary h3 {
  margin: 0.65rem 0 0.25rem;
}

.key-budget-summary dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0;
}

.key-budget-summary dt {
  color: var(--quiet);
  font-size: 0.75rem;
}

.key-budget-summary dd {
  margin: 0;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.key-budget-receipt h3 {
  margin-block: 0.5rem;
}

.plan-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0.6rem 0;
}

.plan-details div {
  min-width: 0;
}

.plan-details dt {
  font-size: 0.78rem;
  color: var(--quiet);
}

.plan-details dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.publisher-controls {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.publisher-manager [data-package] {
  padding-block-start: 0.6rem;
  border-top: 1px solid var(--line);
}

.publisher-manager h3 {
  margin-block: 0.75rem 0.5rem;
  font-size: 0.98rem;
}

.publisher-manager .button-row,
.publisher-manager [data-import] {
  margin-block-start: 0.6rem;
}

.publisher-manager .plan-details dd {
  max-inline-size: 65ch;
  overflow-wrap: anywhere;
}

.publisher-versions ul {
  list-style: none;
  padding: 0;
  max-height: 18rem;
  overflow: auto;
}

.publisher-versions li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.publisher-versions li > * {
  display: block;
}

.publisher-versions code,
.publisher-versions small {
  color: var(--quiet);
}

.route-request {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.route-request h3,
.route-request h4,
.route-request h5 {
  margin: 0.5rem 0;
}

.route-request h3 {
  font-family: var(--mono);
  font-size: 0.94rem;
}

.route-request h4 {
  font-size: 0.91rem;
}

.route-request h5,
.route-request > small,
.route-candidates small {
  font-size: 0.78rem;
  color: var(--quiet);
}

.route-attempts {
  padding-inline-start: 1.5rem;
  margin: 0.45rem 0;
  font-size: 0.86rem;
}

.route-decision-detail > summary {
  color: var(--brand);
  cursor: pointer;
  padding: 0.55rem 0;
  width: fit-content;
}

.route-round {
  border-inline-start: 2px solid var(--line);
  padding-inline-start: 0.85rem;
  margin: 1rem 0;
}

.route-round .detail-grid {
  margin: 0.5rem 0;
}

.route-candidates {
  padding: 0;
  margin: 0;
  list-style: none;
}

.route-candidates li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.2rem 0.65rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

.route-candidates strong {
  font-family: var(--mono);
}

.route-lookup {
  display: grid;
  grid-template-columns: minmax(0, 21rem) auto;
  align-items: end;
  justify-content: start;
  gap: 0.4rem 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  margin-top: 1.1rem;
}

.route-lookup > .help,
.route-lookup > .message,
.route-lookup > [data-lookup-result] {
  grid-column: 1 / -1;
  margin: 0;
}

.route-lookup > .field {
  min-width: 0;
  margin: 0;
}

.route-lookup > .message:empty,
.route-lookup > [data-lookup-result]:empty {
  display: none;
}

.route-lookup > [data-lookup-result] {
  overflow-wrap: anywhere;
}

.brand-admin-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

/* Command Palette (Cmd+K / Ctrl+K) */
.cmd-dialog {
  width: min(38rem, calc(100% - 1.5rem));
  padding: 0;
  overflow: hidden;
}

.cmd-shell {
  display: flex;
  flex-direction: column;
  max-height: min(34rem, calc(100dvh - 4rem));
}

.cmd-search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
}

.cmd-search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
}

.cmd-results {
  overflow-y: auto;
  padding: 0.45rem;
  display: grid;
  gap: 0.15rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}

.cmd-item:hover,
.cmd-item.active {
  background: var(--soft);
}

.cmd-item-text {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.12rem;
}

.cmd-item-text strong {
  font-size: 0.88rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmd-item-text small {
  font-size: 0.74rem;
  color: var(--quiet);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmd-tag {
  flex: none;
  font-size: 0.7rem;
  color: var(--quiet);
  border-radius: var(--radius-sm);
  padding: 0.14rem 0.42rem;
  background: var(--soft);
}

.cmd-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--quiet);
  font-size: 0.88rem;
}

.cmd-footer {
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
  background: var(--soft);
  color: var(--quiet);
  font-size: 0.75rem;
}

/* ==========================================================================
   Responsive Breakpoints & Accessibility
   ========================================================================== */

@media (max-width: 980px) {
  .proto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catalog-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-aside {
    display: none;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .work-grid > .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 56px;
  }
  .mast-inner,
  main,
  .footer-inner,
  .site-banner-inner,
  .site-banner > div {
    width: calc(100% - 2rem);
  }
  .mast-inner {
    gap: 0.7rem;
  }
  .brand span {
    display: none;
  }
  .nav {
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
  }
  .nav a {
    padding: 0 0.55rem;
    font-size: 0.86rem;
  }

  main {
    padding-block: 1.25rem 3rem;
  }
  .proto-grid,
  .two-col,
  .detail-grid,
  .conversation-layout,
  .conversation-composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-title,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel,
  .dialog-inner {
    padding: 1.1rem;
  }
  .access {
    padding: 1.4rem;
  }
  .page-head h1 {
    font-size: 1.32rem;
  }
  .workspace-item {
    align-items: flex-start;
  }
  .cmd-trigger kbd {
    display: none;
  }
}

@media (max-width: 38rem) {
  .route-round .detail-grid,
  .route-candidates li,
  .route-lookup {
    grid-template-columns: minmax(0, 1fr);
  }
  .route-lookup > .btn {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .chip[aria-pressed="true"],
  .cmd-item.active,
  .rail [aria-current="page"] {
    outline: 2px solid Highlight;
  }
  .btn.primary {
    border: 2px solid ButtonText;
  }
}

/* Visual QA polish: catalog stats bar, model cards, checkbox/range/empty-pre */
input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
label.pg-toggle,
label.field.pg-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.field-head {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}
pre:empty,
code.empty:empty {
  display: none;
}

.kpi-card .kpi-value.status-pill {
  width: fit-content;
  padding: 0.15rem 0.65rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

/* Official provider SVG brand marks */
.mark.brand-svg-mark {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem;
}
.mark.brand-svg-mark .provider-svg {
  width: 100%;
  height: 100%;
  display: block;
}

:root[data-resolved-theme="dark"] .mark.brand-svg-mark {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: #f8fafc;
}

/* ==========================================================================
   Youranke · v5 Design Layer — authoritative foundation, keep after v1–v3.
   Neutral graphite canvas, hairline structure, one signal colour.
   Surfaces carry no tint; colour is reserved for links, focus, status and
   data. Primary actions are solid ink so provider marks and charts stay the
   most colourful things on screen. Theme presets still recolour --brand.
   ========================================================================== */
:root {
  color-scheme: light;

  /* Surfaces */
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --soft: #f4f4f5;
  --soft-2: #e9e9ec;
  --bg-subtle: #fafafa;

  /* Ink */
  --ink: #0b0b0d;
  --ink-2: #2c2c31;
  --quiet: #5f5f69;
  --faint: #74747e;
  --muted: var(--quiet);
  --text: var(--ink);
  --text-muted: var(--quiet);

  /* Hairlines */
  --line: #e8e8eb;
  --line-strong: #d4d4d9;
  --border: var(--line);
  --border-subtle: var(--line);

  /* Brand · solid ink by default; presets replace these with a hue */
  --brand: #111114;
  --brand-hover: #2a2a2f;
  --brand-active: #000000;
  --on-brand: #ffffff;
  --brand-soft: #f1f1f3;
  --brand-border: #d4d4d9;
  --brand-ink: #0b0b0d;
  --deep: var(--brand);
  --deep-hover: var(--brand-hover);

  /* Signal · the one accent: links, focus, selection, primary data series */
  --accent: #2f5bea;
  --link: #2450d8;
  --focus: #2f5bea;
  --focus-ring: rgba(47, 91, 234, 0.2);
  --chart-bar: #2f5bea;

  /* Tables */
  --table-head: transparent;
  --row-hover: #f7f7f8;
  --row-stripe: transparent;

  /* Semantic status */
  --success: #0a7d4f;
  --success-soft: #ecf8f2;
  --success-border: #b9e4cf;
  --warning: #a8590a;
  --warning-soft: #fdf6e7;
  --warning-border: #f1d9a4;
  --danger: #cf2a2a;
  --danger-bg: #fdf0f0;
  --danger-soft: var(--danger-bg);
  --danger-border: #f3c3c3;
  --info: #2450d8;
  --info-soft: #eef2fe;
  --info-border: #c6d3fb;

  /* Toast & code */
  --notice-bg: #111114;
  --notice-ink: #fafafa;
  --code-bg: #0e0e10;
  --code-surface: #17171a;
  --code-border: #26262b;
  --code-ink: #ededf0;
  --code-dim: #8b8b96;

  /* Elevation · flat by default; shadows are for things that float */
  --shadow-xs: 0 0 0 0 transparent;
  --shadow-sm: 0 1px 2px rgba(11, 11, 13, 0.05);
  --shadow-md: 0 8px 24px -8px rgba(11, 11, 13, 0.14), 0 2px 6px -2px rgba(11, 11, 13, 0.06);
  --shadow-lg: 0 24px 56px -16px rgba(11, 11, 13, 0.24), 0 4px 12px -4px rgba(11, 11, 13, 0.08);

  /* Geometry */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --header-h: 56px;
  --page-w: 1200px;

  /* Typography */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", "Inter", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  accent-color: var(--accent);
  scrollbar-color: var(--line-strong) transparent;
}

:root[data-resolved-theme="dark"] {
  color-scheme: dark;

  --paper: #0a0a0b;
  --surface: #101012;
  --surface-raised: #17171a;
  --soft: #19191c;
  --soft-2: #242428;
  --bg-subtle: #0d0d0f;

  --ink: #f4f4f5;
  --ink-2: #d6d6da;
  --quiet: #a1a1ab;
  --faint: #7d7d88;

  --line: #222226;
  --line-strong: #34343a;

  --brand: #f4f4f5;
  --brand-hover: #ffffff;
  --brand-active: #d6d6da;
  --on-brand: #0a0a0b;
  --brand-soft: #1c1c20;
  --brand-border: #34343a;
  --brand-ink: #f4f4f5;

  --accent: #7c9cff;
  --link: #93adff;
  --focus: #7c9cff;
  --focus-ring: rgba(124, 156, 255, 0.3);
  --chart-bar: #7c9cff;

  --table-head: transparent;
  --row-hover: #151518;
  --row-stripe: transparent;

  --success: #3ecf8e;
  --success-soft: rgba(62, 207, 142, 0.12);
  --success-border: rgba(62, 207, 142, 0.3);
  --warning: #f2b544;
  --warning-soft: rgba(242, 181, 68, 0.12);
  --warning-border: rgba(242, 181, 68, 0.3);
  --danger: #f47272;
  --danger-bg: rgba(244, 114, 114, 0.12);
  --danger-border: rgba(244, 114, 114, 0.32);
  --info: #93adff;
  --info-soft: rgba(124, 156, 255, 0.13);
  --info-border: rgba(124, 156, 255, 0.32);

  --notice-bg: #1f1f23;
  --notice-ink: #f4f4f5;
  --code-bg: #070708;
  --code-surface: #111113;
  --code-border: #222226;
  --code-ink: #ededf0;
  --code-dim: #7d7d88;

  --shadow-xs: 0 0 0 0 transparent;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 32px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 28px 64px -16px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body {
  background: var(--paper);
  color: var(--ink);
}

::selection {
  background: color-mix(in oklab, var(--accent) 24%, transparent);
  color: var(--ink);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
  }
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.07rem;
  line-height: 1.35;
}

h3 {
  font-size: 0.93rem;
  line-height: 1.4;
}

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

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--brand);
}

.mono,
code,
pre,
kbd,
.num {
  font-variant-numeric: tabular-nums;
}

/* Header */
.mast {
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.brand {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  gap: 0.5rem;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nav {
  gap: 0.1rem;
}

.nav a {
  height: 2rem;
  padding: 0 0.7rem;
  border-radius: 7px;
  color: var(--quiet);
  font-size: 0.9rem;
  font-weight: 450;
  background: transparent;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--soft);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: transparent;
  font-weight: 500;
}

.mast-search {
  height: 2rem;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.86rem;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.mast-search:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--quiet);
}

.mast-search kbd {
  border-bottom-width: 1px;
  background: transparent;
  color: var(--faint);
}

.mast-icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
}

kbd {
  border-bottom-width: 1px;
  border-radius: 5px;
  font-size: 0.7rem;
}

/* Buttons & links */
.btn {
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--line-strong);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.btn:active:not(:disabled) {
  background: var(--soft-2);
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  box-shadow: none;
  font-weight: 500;
}

.btn.primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--on-brand);
  box-shadow: none;
}

.btn.primary:active:not(:disabled) {
  background: var(--brand-active);
  border-color: var(--brand-active);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--quiet);
  box-shadow: none;
}

.btn.ghost:hover:not(:disabled) {
  background: var(--soft);
  border-color: transparent;
  color: var(--ink);
}

.btn.danger {
  background: transparent;
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn.danger:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

a.hx-link {
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  white-space: nowrap;
}

a.hx-link:hover {
  color: var(--link);
}

.hx-link .icon {
  width: 0.9rem;
  height: 0.9rem;
}

/* Surfaces · one hairline, no lift */
.panel,
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: none;
}

.kpi-card:hover {
  transform: none;
  border-color: var(--line-strong);
  box-shadow: none;
}

/* Chips, segmented controls, underline tabs, and pill tabs */
.chip {
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: none;
  font-size: 0.8125rem;
  font-weight: 450;
  padding: 0.28rem 0.7rem;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.chip:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--soft);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--quiet);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 450;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* Pill tabs (.sub-tabs + ui.js variant:"pill") */
.sub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  max-width: 100%;
}

.sub-tabs button[role="tab"],
.sub-tabs.ui-tablist button {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--quiet);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 450;
  padding: 0.32rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.sub-tabs button[role="tab"]:hover:not(:disabled),
.sub-tabs.ui-tablist button:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
}

.sub-tabs button[role="tab"][aria-selected="true"],
.sub-tabs button[role="tab"][aria-pressed="true"],
.sub-tabs.ui-tablist button[aria-selected="true"] {
  background: var(--surface);
  border-color: transparent;
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.tabs-line {
  display: flex;
  gap: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin: 0 0 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tabs-line button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--quiet);
  padding: 0.62rem 0.1rem 0.58rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.tabs-line button:hover {
  color: var(--ink);
}

.tabs-line button[aria-pressed="true"],
.tabs-line button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}

/* Playground mode bar spacing & active accent */
.pg-modes {
  margin-bottom: 1rem;
  padding: 2px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.pg-modes button[aria-selected="true"],
.pg-modes button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  border: 0;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* SDK tabs in Docs */
.sdk-tabs {
  background: transparent;
}

.sdk-tabs button:hover {
  color: var(--ink);
}

.sdk-tabs button[aria-selected="true"] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

/* Capability pills */

/* Brand marks */
.mark {
  border-radius: 7px;
}

.mark.brand-svg-mark {
  background: #ffffff;
  border: 1px solid var(--line);
}

:root[data-resolved-theme="dark"] .mark.brand-svg-mark,
:root[data-resolved-theme="dark"] .mark.official-mark {
  background: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #0b0b0d;
}

.mark.mark-monogram {
  background: var(--soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}

:root[data-resolved-theme="dark"] .mark.mark-monogram {
  background: var(--soft);
  color: var(--ink-2);
  border-color: var(--line);
}

.mark.xs {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  border-radius: 4px;
  padding: 0.125rem;
  font-size: 0.625rem;
}

/* ---------- Home ---------- */

/* ---------- Catalog ---------- */

/* ---------- Rankings ---------- */
.rk-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.rk-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.rk-head h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.rk-head p {
  color: var(--quiet);
  margin: 0;
}

.rk-block {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.rk-block:last-child {
  border-bottom: 0;
}

.rk-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rk-block-head h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
}

.share-bar {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.share-legend {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem 1.5rem;
}

.share-legend button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}

.share-legend button:disabled {
  cursor: default;
}

.share-legend button:not(:disabled):hover span:not(.mark) {
  color: var(--link);
}

.share-legend button > span:not(.mark):not(.seg-dot) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-legend b {
  font-weight: 500;
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.seg-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 3px;
  flex: 0 0 auto;
}

.seg-0 { fill: #3b5bdb; background: #3b5bdb; }
.seg-1 { fill: #7c3aed; background: #7c3aed; }
.seg-2 { fill: #0ea5e9; background: #0ea5e9; }
.seg-3 { fill: #10b981; background: #10b981; }
.seg-4 { fill: #f59e0b; background: #f59e0b; }
.seg-5 { fill: #f97316; background: #f97316; }
.seg-6 { fill: #ec4899; background: #ec4899; }
.seg-7 { fill: #94a3b8; background: #94a3b8; }

:root[data-resolved-theme="dark"] .seg-0 { fill: #748ffc; background: #748ffc; }
:root[data-resolved-theme="dark"] .seg-1 { fill: #a78bfa; background: #a78bfa; }
:root[data-resolved-theme="dark"] .seg-2 { fill: #38bdf8; background: #38bdf8; }
:root[data-resolved-theme="dark"] .seg-3 { fill: #34d399; background: #34d399; }

.rk-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rk-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.rk-list li:last-child {
  border-bottom: 0;
}

.rk-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.8rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rk-row:hover strong {
  color: var(--link);
}

.rk-num {
  width: 1.75rem;
  flex: 0 0 auto;
  font-size: 0.875rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.rk-num.top {
  color: var(--brand-ink);
  font-weight: 650;
}

.rk-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rk-name strong {
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-name small {
  font-size: 0.75rem;
  color: var(--quiet);
}

.rk-metric {
  font-size: 0.8125rem;
  color: var(--ink-2);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .share-legend {
    grid-template-columns: 1fr 1fr;
  }
  .rk-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Console ---------- */

.console-main .page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.console-main .page-head h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.console-main .page-head p {
  color: var(--quiet);
  font-size: 0.88rem;
  margin: 0.25rem 0 0;
}

/* Stacked on a phone, the title stays on the left edge with the content. */
@media (max-width: 760px) {
  .console-main .page-head {
    align-items: flex-start;
  }
}

.kpi-grid {
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  padding: 1.05rem 1.15rem;
  background: var(--surface);
}

.kpi-card .kpi-label {
  font-size: 0.76rem;
  color: var(--quiet);
  font-weight: 500;
}

.kpi-card .kpi-value {
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-card .kpi-sub {
  color: var(--faint);
  font-size: 0.75rem;
}

/* ---------- Status: provider directory ---------- */
.provider-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.provider-dir-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.provider-dir-card:hover {
  background: var(--row-hover);
  transform: none;
}

.provider-dir-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.provider-dir-meta strong {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.provider-dir-meta small {
  font-size: 0.72rem;
  color: var(--quiet);
}

/* Active tab hover contrast + strict zero mobile overflow */
.admin-tabs .chip[aria-pressed="true"],
.admin-tabs .chip[aria-pressed="true"]:hover,
.sub-tabs .chip[aria-pressed="true"],
.sub-tabs .chip[aria-pressed="true"]:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.pg-sidebar,
.panel {
  min-width: 0;
  max-width: 100%;
}

.table-wrap,
.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 760px) {
  .mast .nav {
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
  }
  .mast .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* No-fake-data pass: rankings empty state + Safari gradient brand image fit */
img.provider-svg {
  object-fit: contain;
}

.rk-empty {
  padding: 2.25rem 1.5rem;
  margin-top: 0.75rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.rk-empty p {
  margin: 0 0 0.5rem;
}

.rk-empty .help {
  max-width: 34rem;
  margin: 0 auto 1.1rem;
  line-height: 1.55;
}

.rk-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}
