/* ============================================================================
 * TradesMen Network — public design system (TMN)
 * Light-first, premium skilled-trades SaaS feel.
 *  - Blue gradient #1e3a5f → #2563eb → #1e40af for hero / auth / CTA moments
 *  - White cards on a soft #f0f2f5 canvas
 *  - 1200px container, 24px page padding
 *  - 96 / 64 / 48 px section padding (desktop / tablet / mobile)
 *  - 16px main card radius, 8px button radius, soft shadows only
 *  - Apple/system stack — no novelty fonts
 *
 * The system exposes both the canonical --tmn-* tokens and the legacy class
 * names (.btn, .card, .navbar, .footer, .table, .badge, .stat, .alert,
 * .hero, .grid-2/3/4, etc.) so existing views render in the new light look
 * without a per-view rewrite. New components use the .tmn-* family.
 * ========================================================================== */

:root {
  /* Primary brand */
  --tmn-primary:         #2563eb;
  --tmn-primary-hover:   #1d4ed8;
  --tmn-primary-dark:    #1e40af;
  --tmn-primary-deep:    #1e3a5f;
  --tmn-primary-soft:    #dbeafe;
  --tmn-primary-softest: #eff6ff;

  --tmn-brand-gradient: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1e40af 100%);

  /* Text */
  --tmn-ink:       #111827;
  --tmn-ink-soft:  #1f2937;
  --tmn-body:      #4b5563;
  --tmn-muted:     #6b7280;
  --tmn-disabled:  #9ca3af;
  --tmn-on-brand:  #ffffff;

  /* Surfaces */
  --tmn-canvas:        #f0f2f5;
  --tmn-surface:       #ffffff;
  --tmn-surface-soft:  #f9fafb;
  --tmn-surface-muted: #f3f4f6;

  /* Borders */
  --tmn-border:        #e5e7eb;
  --tmn-border-strong: #d1d5db;

  /* Status */
  --tmn-success: #10b981;
  --tmn-warning: #f59e0b;
  --tmn-danger:  #ef4444;
  --tmn-rating:  #f59e0b;

  /* Footer */
  --tmn-footer-dark:    #111827;
  --tmn-footer-text:    #d1d5db;
  --tmn-footer-heading: #ffffff;

  /* Radii */
  --tmn-radius-sm:   8px;
  --tmn-radius-md:   12px;
  --tmn-radius-lg:   16px;
  --tmn-radius-xl:   24px;
  --tmn-radius-pill: 999px;

  /* Shadows */
  --tmn-shadow-sm:    0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.10);
  --tmn-shadow-md:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --tmn-shadow-lg:    0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --tmn-shadow-focus: 0 0 0 3px rgba(59,130,246,.35);

  /* Layout */
  --tmn-container:        1200px;
  --tmn-section-y:        96px;
  --tmn-section-y-tablet: 64px;
  --tmn-section-y-mobile: 48px;
  --tmn-container-x:      24px;

  /* Legacy aliases — keep existing class snippets compiling. */
  --bg:         var(--tmn-canvas);
  --bg-deep:    var(--tmn-canvas);
  --card:       var(--tmn-surface);
  --card-2:     var(--tmn-surface-soft);
  --surface:    var(--tmn-surface-muted);
  --blue:       var(--tmn-primary);
  --blue-light: var(--tmn-primary);
  --blue-dark:  var(--tmn-primary-hover);
  --blue-deep:  var(--tmn-primary-deep);
  --purple:     var(--tmn-primary-dark);
  --cyan:       var(--tmn-primary);
  --text:       var(--tmn-ink);
  --muted:      var(--tmn-body);
  --dim:        var(--tmn-muted);
  --ok:         var(--tmn-success);
  --warn:       var(--tmn-warning);
  --danger:     var(--tmn-danger);
  --line:       var(--tmn-border);
  --line-strong:var(--tmn-border-strong);
  --radius:     var(--tmn-radius-lg);
  --radius-sm:  var(--tmn-radius-sm);
  --radius-lg:  var(--tmn-radius-xl);
  --shadow-card: var(--tmn-shadow-sm);
  --shadow-pop:  var(--tmn-shadow-lg);
}

/* -- Reset / base ---------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { color-scheme: light; }
body {
  background: var(--tmn-canvas);
  color: var(--tmn-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a {
  color: var(--tmn-primary);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--tmn-primary-hover); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--tmn-border); margin: 24px 0; }

h1, h2, h3, h4, h5 { color: var(--tmn-ink); letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin: 0 0 12px; }
h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; margin: 32px 0 12px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tmn-muted); margin: 0 0 12px; font-weight: 600; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: var(--tmn-surface-muted);
  padding: 14px 16px;
  border-radius: var(--tmn-radius-sm);
  border: 1px solid var(--tmn-border);
  overflow: auto;
  font-size: 13px;
  color: var(--tmn-ink-soft);
}
code {
  background: var(--tmn-surface-muted);
  border: 1px solid var(--tmn-border);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 0.92em;
  color: var(--tmn-ink-soft);
}

::selection { background: var(--tmn-primary-soft); color: var(--tmn-primary-deep); }

/* -- Public shell + section system ----------------------------------------- */
.tmn-public-shell { display: flex; flex-direction: column; min-height: 100vh; }

.tmn-section { padding: var(--tmn-section-y) 0; }
.tmn-section--soft   { background: var(--tmn-surface-soft); }
.tmn-section--muted  { background: var(--tmn-surface-muted); }
.tmn-section--brand  {
  background: var(--tmn-brand-gradient);
  color: var(--tmn-on-brand);
}
.tmn-section--brand h1, .tmn-section--brand h2, .tmn-section--brand h3 { color: var(--tmn-on-brand); }
.tmn-section--brand p { color: rgba(255, 255, 255, 0.85); }

.tmn-section__container,
.tmn-container {
  max-width: var(--tmn-container);
  margin: 0 auto;
  padding: 0 var(--tmn-container-x);
}

.tmn-section__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tmn-primary);
  margin-bottom: 12px;
}
.tmn-section__title {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.tmn-section__subtitle {
  color: var(--tmn-body);
  font-size: 17px;
  max-width: 720px;
  margin: 0 0 24px;
}

@media (max-width: 1024px) {
  .tmn-section { padding: var(--tmn-section-y-tablet) 0; }
}
@media (max-width: 640px) {
  .tmn-section { padding: var(--tmn-section-y-mobile) 0; }
}

.main { /* legacy container used by views/public/layout.php */
  max-width: var(--tmn-container);
  margin: 0 auto;
  padding: 32px var(--tmn-container-x) 64px;
}

/* -- Top navigation -------------------------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--tmn-border);
}
.navbar > * { /* normal child layout when no inner wrapper */
  max-width: var(--tmn-container);
  margin: 0 auto;
}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--tmn-container-x); }
.navbar .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--tmn-ink); font-weight: 700; font-size: 15px;
}
.navbar .brand img { width: 28px; height: 28px; border-radius: 8px; }
.navbar .nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.navbar .nav a {
  color: var(--tmn-body); font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: var(--tmn-radius-sm);
  text-decoration: none;
}
.navbar .nav a:hover { color: var(--tmn-ink); background: var(--tmn-surface-muted); }
.navbar .nav a.cta {
  color: var(--tmn-on-brand); background: var(--tmn-primary);
  padding: 9px 16px; font-weight: 600;
}
.navbar .nav a.cta:hover { background: var(--tmn-primary-hover); color: var(--tmn-on-brand); text-decoration: none; }

@media (max-width: 720px) {
  .navbar { padding: 10px 16px; flex-wrap: wrap; }
  .navbar .nav { gap: 2px; }
  .navbar .nav a { padding: 6px 10px; font-size: 13px; }
}

/* -- Hero ------------------------------------------------------------------ */
.tmn-hero {
  position: relative; overflow: hidden;
  background: var(--tmn-brand-gradient);
  color: var(--tmn-on-brand);
  padding: clamp(72px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
}
.tmn-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.10), transparent 36%),
    radial-gradient(circle at 88% 84%, rgba(255, 255, 255, 0.08), transparent 40%);
}
.tmn-hero__content {
  position: relative; z-index: 1;
  max-width: var(--tmn-container);
  margin: 0 auto;
  padding: 0 var(--tmn-container-x);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.tmn-hero__copy h1 {
  color: var(--tmn-on-brand);
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.tmn-hero__copy h1 .tmn-hero__highlight {
  background: linear-gradient(90deg, #ffffff 0%, #dbeafe 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tmn-hero__copy p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  max-width: 560px;
}
.tmn-hero__copy .tmn-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95); font-weight: 700;
  padding: 6px 12px; border-radius: var(--tmn-radius-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  margin-bottom: 18px;
}
.tmn-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.tmn-hero__trust {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px;
  color: rgba(255, 255, 255, 0.85); font-size: 13px;
}
.tmn-hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.tmn-hero__trust span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffffff;
}

@media (max-width: 900px) {
  .tmn-hero__content { grid-template-columns: 1fr; gap: 40px; }
}

/* -- Hero product preview (decorative) ------------------------------------- */
.tmn-hero-preview {
  position: relative;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--tmn-radius-xl);
  padding: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -20px rgba(15, 28, 60, 0.45);
}
.tmn-hero-preview__topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--tmn-radius-md);
  margin-bottom: 12px;
  color: var(--tmn-ink);
}
.tmn-hero-preview__topbar .tmn-hero-preview__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--tmn-border-strong);
}
.tmn-hero-preview__topbar .tmn-hero-preview__search {
  flex: 1; padding: 6px 10px;
  background: var(--tmn-surface-muted);
  border-radius: var(--tmn-radius-pill);
  color: var(--tmn-muted); font-size: 12px;
}
.tmn-hero-preview__body {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--tmn-radius-md);
  padding: 14px;
  color: var(--tmn-ink);
}
.tmn-hero-preview__rail { display: flex; flex-direction: column; gap: 8px; }
.tmn-hero-preview__rail-item {
  height: 32px; border-radius: var(--tmn-radius-sm);
  background: var(--tmn-surface-muted);
}
.tmn-hero-preview__rail-item.is-active {
  background: var(--tmn-primary-soft);
  border-left: 3px solid var(--tmn-primary);
}
.tmn-hero-preview__feed { display: grid; gap: 10px; }
.tmn-hero-preview__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--tmn-surface-soft);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-md);
}
.tmn-hero-preview__row .tmn-avatar { flex-shrink: 0; }
.tmn-hero-preview__row .tmn-hero-preview__meta {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.tmn-hero-preview__row .tmn-hero-preview__name {
  font-weight: 600; font-size: 13px; color: var(--tmn-ink);
}
.tmn-hero-preview__row .tmn-hero-preview__snippet {
  font-size: 12px; color: var(--tmn-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tmn-hero-preview__row .tmn-hero-preview__when {
  font-size: 11px; color: var(--tmn-muted); flex-shrink: 0;
}

/* -- Buttons --------------------------------------------------------------- */
.tmn-button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  min-height: 44px;
  border-radius: var(--tmn-radius-sm);
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease, box-shadow 200ms ease, border-color 140ms ease;
  line-height: 1; white-space: nowrap;
  background: transparent; color: var(--tmn-ink);
}
.tmn-button:focus-visible, .btn:focus-visible {
  outline: none; box-shadow: var(--tmn-shadow-focus);
}
.tmn-button--primary, .btn.primary {
  background: var(--tmn-primary); color: var(--tmn-on-brand);
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-button--primary:hover, .btn.primary:hover {
  background: var(--tmn-primary-hover); color: var(--tmn-on-brand);
  text-decoration: none; box-shadow: var(--tmn-shadow-md);
}
.tmn-button--primary:active, .btn.primary:active { transform: translateY(1px); }
.tmn-button--secondary, .btn.secondary {
  background: var(--tmn-surface); color: var(--tmn-ink);
  border-color: var(--tmn-border-strong);
}
.tmn-button--secondary:hover, .btn.secondary:hover {
  background: var(--tmn-surface-soft); color: var(--tmn-ink);
  text-decoration: none;
}
.tmn-button--white {
  background: var(--tmn-on-brand); color: var(--tmn-primary-deep);
}
.tmn-button--white:hover { background: var(--tmn-primary-softest); color: var(--tmn-primary-deep); text-decoration: none; }
.tmn-button--outline-white {
  background: transparent; color: var(--tmn-on-brand);
  border-color: rgba(255, 255, 255, 0.50);
}
.tmn-button--outline-white:hover {
  background: rgba(255, 255, 255, 0.12); color: var(--tmn-on-brand);
  text-decoration: none; border-color: rgba(255, 255, 255, 0.70);
}
.tmn-button--ghost, .btn.ghost {
  background: transparent; color: var(--tmn-ink);
  border-color: var(--tmn-border-strong);
}
.tmn-button--ghost:hover, .btn.ghost:hover {
  background: var(--tmn-surface-muted); color: var(--tmn-ink); text-decoration: none;
}
.tmn-button--danger, .btn.danger {
  background: var(--tmn-danger); color: var(--tmn-on-brand);
}
.tmn-button--danger:hover, .btn.danger:hover { filter: brightness(0.95); color: var(--tmn-on-brand); text-decoration: none; }
.btn.warn  { background: var(--tmn-warning); color: var(--tmn-ink); }
.btn.warn:hover { filter: brightness(0.96); color: var(--tmn-ink); text-decoration: none; }
.btn.success { background: var(--tmn-success); color: var(--tmn-on-brand); }
.btn.success:hover { filter: brightness(0.96); color: var(--tmn-on-brand); text-decoration: none; }

.btn.small, .tmn-button--sm  { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn.large, .tmn-button--lg  { padding: 14px 26px; font-size: 16px; min-height: 52px; }
.btn.block, .tmn-button--block { width: 100%; }
.btn[disabled], .btn:disabled, .tmn-button:disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

/* -- Cards ----------------------------------------------------------------- */
.tmn-card, .card {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  padding: 24px;
  box-shadow: var(--tmn-shadow-sm);
  color: var(--tmn-ink);
}
.tmn-card h3, .card h3 { color: var(--tmn-ink); margin: 0 0 8px; }
.tmn-card p, .card p   { color: var(--tmn-body); margin: 0; }
.tmn-card p + p, .card p + p { margin-top: 8px; }
.tmn-card--featured {
  border-color: var(--tmn-primary-soft);
  box-shadow: var(--tmn-shadow-md);
}
.tmn-card--compact { padding: 16px; }
.tmn-card.hover-lift, .card.hover-lift {
  transition: transform 160ms ease, box-shadow 200ms ease, border-color 160ms ease;
}
.tmn-card.hover-lift:hover, .card.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--tmn-shadow-md);
  border-color: var(--tmn-primary-soft);
}
.card.cta {
  background: var(--tmn-primary-softest);
  border-color: var(--tmn-primary-soft);
}
.tmn-glass-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--tmn-radius-lg);
  padding: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card.feature .icon {
  width: 40px; height: 40px;
  border-radius: var(--tmn-radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tmn-primary-soft);
  color: var(--tmn-primary);
  margin-bottom: 14px;
}

/* -- Grids ----------------------------------------------------------------- */
.grid-2, .tmn-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3, .tmn-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid-4, .tmn-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* -- Badges / status pills ------------------------------------------------- */
.tmn-badge, .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--tmn-radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4;
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface-muted);
  color: var(--tmn-body);
  white-space: nowrap;
}
.tmn-badge--success, .badge.ok       { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.tmn-badge--warning, .badge.warn     { color: #b45309; background: #fffbeb; border-color: #fcd34d; }
.tmn-badge--danger,  .badge.danger   { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.tmn-badge--info,    .badge.info     { color: #1d4ed8; background: var(--tmn-primary-softest); border-color: var(--tmn-primary-soft); }
.tmn-badge--brand,   .badge.brand    { color: var(--tmn-on-brand); background: var(--tmn-brand-gradient); border-color: transparent; }
.badge.dim                            { color: var(--tmn-muted); }

.status { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tmn-disabled); }
.status.ok       { color: #047857; }
.status.ok::before { background: var(--tmn-success); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18); }
.status.down,
.status.danger   { color: #b91c1c; }
.status.down::before, .status.danger::before { background: var(--tmn-danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16); }
.status.warn     { color: #b45309; }
.status.warn::before { background: var(--tmn-warning); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }

/* -- Alerts ---------------------------------------------------------------- */
.alert {
  display: flex; gap: 12px; padding: 14px 16px;
  border-radius: var(--tmn-radius-sm);
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface-soft);
  color: var(--tmn-ink-soft);
  margin: 0 0 16px;
}
.alert .icon { flex-shrink: 0; color: var(--tmn-primary); }
.alert.error,   .error    { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert.warning, .warning  { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.alert.success, .ok       { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.alert.info               { border-color: var(--tmn-primary-soft); background: var(--tmn-primary-softest); color: var(--tmn-primary-dark); }

/* -- Forms ----------------------------------------------------------------- */
.tmn-form, form {}
form label { display: block; margin: 0 0 14px; font-size: 14px; color: var(--tmn-ink); font-weight: 500; }
form label > input,
form label > select,
form label > textarea { margin-top: 6px; }
form .help        { font-size: 12px; color: var(--tmn-muted); margin-top: 6px; }
form .field-error { font-size: 12px; color: #b91c1c; margin-top: 6px; }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=search], input[type=url],
input[type=datetime-local], input[type=date], input[type=tel],
select, textarea, .tmn-input {
  width: 100%; max-width: 600px;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 14px;
  color: var(--tmn-ink);
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border-strong);
  border-radius: var(--tmn-radius-sm);
  font-family: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
textarea { font-family: inherit; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .tmn-input:focus {
  outline: none;
  border-color: var(--tmn-primary);
  box-shadow: var(--tmn-shadow-focus);
}
input::placeholder, textarea::placeholder { color: var(--tmn-disabled); }
input[type=checkbox], input[type=radio] { accent-color: var(--tmn-primary); width: auto; min-height: 0; }

.input-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input-group input { flex: 1 1 220px; }

/* -- Tables ---------------------------------------------------------------- */
.table-wrap, .tmn-table-wrap {
  width: 100%; overflow-x: auto;
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  box-shadow: var(--tmn-shadow-sm);
}
.table, .tmn-table { width: 100%; border-collapse: collapse; background: var(--tmn-surface); }
.table th, .table td,
.tmn-table th, .tmn-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--tmn-border);
  font-size: 14px; vertical-align: top;
  color: var(--tmn-ink-soft);
}
.table th, .tmn-table th {
  background: var(--tmn-surface-soft);
  color: var(--tmn-muted);
  text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.06em; font-weight: 600;
  position: sticky; top: 0;
}
.table tr:last-child td, .tmn-table tr:last-child td { border-bottom: none; }
.table tbody tr, .tmn-table tbody tr { transition: background 120ms ease; }
.table tbody tr:hover, .tmn-table tbody tr:hover { background: var(--tmn-primary-softest); }
.table .mono, .tmn-table .mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--tmn-muted);
}
.table .actions, .tmn-table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn.small + .btn.small,
.tmn-table .actions .btn.small + .btn.small { margin-left: 6px; }

/* -- Empty state ----------------------------------------------------------- */
.tmn-empty-state, .empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--tmn-surface);
  border: 1px dashed var(--tmn-border-strong);
  border-radius: var(--tmn-radius-lg);
  color: var(--tmn-body);
}
.tmn-empty-state .icon, .empty-state .icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--tmn-radius-md);
  background: var(--tmn-primary-softest);
  border: 1px solid var(--tmn-primary-soft);
  color: var(--tmn-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.tmn-empty-state h3, .empty-state h3 { margin: 0 0 6px; color: var(--tmn-ink); }
.tmn-empty-state p,  .empty-state p  { color: var(--tmn-muted); margin: 0; }

/* -- Footer (dark) --------------------------------------------------------- */
.footer {
  background: var(--tmn-footer-dark);
  color: var(--tmn-footer-text);
  padding: 64px var(--tmn-container-x) 36px;
  margin-top: 80px;
}
.footer-grid {
  max-width: var(--tmn-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
}
.footer h4 {
  color: var(--tmn-footer-heading);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 14px;
}
.footer .lockup { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer .lockup img { width: 28px; height: 28px; border-radius: 8px; }
.footer .lockup strong { color: var(--tmn-footer-heading); font-size: 16px; }
.footer p { color: var(--tmn-footer-text); font-size: 14px; margin: 0; }
.footer a { display: block; color: #9ca3af; font-size: 14px; margin: 6px 0; }
.footer a:hover { color: var(--tmn-on-brand); text-decoration: none; }
.footer-bottom {
  max-width: var(--tmn-container);
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid #374151;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #9ca3af; font-size: 13px;
}
.footer-bottom strong { color: #d1d5db; }

/* -- Legal article --------------------------------------------------------- */
article.legal {
  background: var(--tmn-surface);
  padding: 32px;
  border-radius: var(--tmn-radius-lg);
  border: 1px solid var(--tmn-border);
  box-shadow: var(--tmn-shadow-sm);
  color: var(--tmn-ink-soft);
}
article.legal h1 { margin-top: 0; }
article.legal h2 { font-size: 22px; margin-top: 32px; }
article.legal h3 { font-size: 17px; margin-top: 22px; }
article.legal pre { background: var(--tmn-surface-muted); }
article.legal .legal-body { color: var(--tmn-body); line-height: 1.65; }
article.legal .legal-body :first-child { margin-top: 0; }
article.legal .legal-body h2 { color: var(--tmn-ink); font-size: 20px; margin: 30px 0 10px; letter-spacing: -0.01em; }
article.legal .legal-body h3 { color: var(--tmn-ink); font-size: 16px; margin: 22px 0 8px; letter-spacing: -0.005em; }
article.legal .legal-body h4 { color: var(--tmn-ink); font-size: 14px; text-transform: none; letter-spacing: 0; margin: 18px 0 6px; }
article.legal .legal-body p { margin: 0 0 12px; }
article.legal .legal-body p:last-child { margin-bottom: 0; }
article.legal .legal-body strong { color: var(--tmn-ink); }
article.legal .legal-body em { color: var(--tmn-body); font-style: italic; }
article.legal .legal-body ul,
article.legal .legal-body ol { margin: 0 0 14px; padding-left: 22px; }
article.legal .legal-body li { margin: 4px 0; }
article.legal .legal-body code {
  background: var(--tmn-surface-muted);
  border: 1px solid var(--tmn-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.92em;
}
article.legal .legal-body .tmn-table-wrap { margin: 14px 0 18px; }
article.legal .legal-body a { color: var(--tmn-primary); }
article.legal .legal-body a:hover { color: var(--tmn-primary-hover); }

.legal-nav {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-md);
  background: var(--tmn-surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13px;
}
.legal-nav__label {
  color: var(--tmn-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  margin-right: 4px;
}
.legal-nav a {
  color: var(--tmn-body);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--tmn-radius-pill);
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface-soft);
}
.legal-nav a:hover { color: var(--tmn-primary-dark); border-color: var(--tmn-primary-soft); background: var(--tmn-primary-softest); text-decoration: none; }
.legal-nav a[aria-current="page"] {
  color: var(--tmn-primary-dark);
  background: var(--tmn-primary-softest);
  border-color: var(--tmn-primary-soft);
  font-weight: 600;
}

/* -- Hero (legacy class used inside .main on smaller pages) --------------- */
.hero { padding: 48px 0 24px; }
.hero .eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--tmn-primary);
  background: var(--tmn-primary-soft);
  padding: 6px 12px; border-radius: var(--tmn-radius-pill);
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); margin: 0 0 14px; max-width: 900px; color: var(--tmn-ink); }
.hero h1 .grad,
.hero h1 .tmn-hero__highlight {
  background: var(--tmn-brand-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  color: var(--tmn-body);
  max-width: 720px;
  font-size: 17px;
}
.hero .lead strong { color: var(--tmn-ink); }
.cta-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* -- Trust strip ----------------------------------------------------------- */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 18px 0 0; padding: 0;
}
.trust-strip li {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--tmn-body);
  padding: 6px 12px; border-radius: var(--tmn-radius-pill);
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface);
}
.trust-strip li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tmn-primary);
}

/* -- Avatar (used by previews) -------------------------------------------- */
.tmn-avatar, .preview-row .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tmn-brand-gradient);
  color: var(--tmn-on-brand); font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

/* -- Preview card on home (legacy) ---------------------------------------- */
.preview-card {
  position: relative; padding: 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--tmn-radius-xl);
  color: var(--tmn-ink);
}
.preview-chats { display: flex; flex-direction: column; gap: 10px; }
.preview-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--tmn-radius-md);
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
}
.preview-row .avatar { width: 36px; height: 36px; }
.preview-row .meta { flex: 1; min-width: 0; }
.preview-row .name { font-weight: 600; font-size: 14px; color: var(--tmn-ink); }
.preview-row .snippet { font-size: 12px; color: var(--tmn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-row .when { font-size: 11px; color: var(--tmn-muted); }
.preview-row .lock { color: var(--tmn-primary); font-size: 11px; }

/* -- Utilities ------------------------------------------------------------- */
.muted { color: var(--tmn-muted); }
.dim   { color: var(--tmn-disabled); }
.text-center { text-align: center; }
.small { font-size: 13px; }
.tiny  { font-size: 12px; }
.mono  { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.spacer-sm { height: 12px; }
.spacer    { height: 24px; }
.spacer-lg { height: 48px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.col   { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }
.no-shrink { flex-shrink: 0; }

.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li {
  padding: 10px 0;
  border-bottom: 1px solid var(--tmn-border);
  display: flex; gap: 10px; align-items: center;
  color: var(--tmn-body);
}
.list-clean li:last-child { border-bottom: none; }
.list-clean li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tmn-primary);
  flex-shrink: 0;
}

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--tmn-muted); }
.kv dd { margin: 0; color: var(--tmn-ink); }
@media (max-width: 540px) {
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 8px; }
}

.skeleton {
  background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
  background-size: 200% 100%;
  animation: skeleton 1.4s linear infinite;
  border-radius: var(--tmn-radius-sm);
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

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

/* -- Numbered step cards (How it works) ----------------------------------- */
.tmn-steps { counter-reset: tmn-step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tmn-step {
  position: relative;
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  padding: 24px;
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-step::before {
  counter-increment: tmn-step;
  content: counter(tmn-step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--tmn-radius-pill);
  background: var(--tmn-primary-soft);
  color: var(--tmn-primary-dark);
  font-weight: 700; font-size: 15px;
  margin-bottom: 12px;
}
.tmn-step h3 { margin: 0 0 6px; }
.tmn-step p  { color: var(--tmn-body); margin: 0; }

/* -- Highlight stats strip ------------------------------------------------- */
.tmn-stats {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 20px;
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-stat-item { text-align: left; }
.tmn-stat-item .tmn-stat-num {
  display: block;
  font-size: 28px; font-weight: 800; line-height: 1;
  color: var(--tmn-primary);
  letter-spacing: -0.02em;
}
.tmn-stat-item .tmn-stat-label {
  display: block; margin-top: 6px;
  font-size: 13px; color: var(--tmn-body);
}

/* -- Side-by-side compare list -------------------------------------------- */
.tmn-compare { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tmn-compare__col {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  padding: 24px;
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-compare__col h3 { margin: 0 0 4px; }
.tmn-compare__col .tmn-compare__sub { color: var(--tmn-muted); font-size: 13px; margin-bottom: 14px; }
.tmn-compare__col ul { list-style: none; padding: 0; margin: 0; }
.tmn-compare__col li {
  padding: 8px 0;
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--tmn-ink-soft); font-size: 14px;
  border-bottom: 1px solid var(--tmn-border);
}
.tmn-compare__col li:last-child { border-bottom: none; }
.tmn-compare__col li::before {
  content: ""; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 50%;
  margin-top: 2px;
  background: var(--tmn-surface-muted);
}
.tmn-compare__col.is-good li::before {
  background: #ecfdf5 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
  border: 1px solid #a7f3d0;
}
.tmn-compare__col.is-bad li::before {
  background: #fef2f2 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>") center/12px no-repeat;
  border: 1px solid #fecaca;
}
.tmn-compare__col.is-good { border-color: #a7f3d0; }
.tmn-compare__col.is-good h3 { color: #047857; }

/* -- FAQ (uses native <details>) ------------------------------------------ */
.tmn-faq { display: flex; flex-direction: column; gap: 12px; }
.tmn-faq details {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-md);
  padding: 0;
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-faq details + details { /* spacing handled by gap */ }
.tmn-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  color: var(--tmn-ink);
  font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.tmn-faq summary::-webkit-details-marker { display: none; }
.tmn-faq summary::after {
  content: "+";
  color: var(--tmn-primary);
  font-size: 22px; line-height: 1; font-weight: 400;
}
.tmn-faq details[open] summary::after { content: "–"; }
.tmn-faq details[open] summary {
  border-bottom: 1px solid var(--tmn-border);
}
.tmn-faq .tmn-faq__body {
  padding: 16px 20px 20px;
  color: var(--tmn-body);
  font-size: 15px;
  line-height: 1.65;
}
.tmn-faq .tmn-faq__body p { margin: 0 0 10px; }
.tmn-faq .tmn-faq__body p:last-child { margin-bottom: 0; }

/* -- Use-case row (icon + title + bullet list) ---------------------------- */
.tmn-use-case {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  padding: 24px;
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-use-case__head {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px;
}
.tmn-use-case__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: var(--tmn-radius-md);
  background: var(--tmn-primary-soft);
  color: var(--tmn-primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.tmn-use-case__title h3 { margin: 0; }
.tmn-use-case__title p { margin: 2px 0 0; color: var(--tmn-muted); font-size: 13px; }
.tmn-use-case ul { list-style: none; padding: 0; margin: 0; }
.tmn-use-case li {
  padding: 8px 0;
  color: var(--tmn-body); font-size: 14px;
  display: flex; gap: 10px; align-items: flex-start;
  border-bottom: 1px solid var(--tmn-border);
}
.tmn-use-case li:last-child { border-bottom: none; }
.tmn-use-case li::before {
  content: ""; flex-shrink: 0;
  margin-top: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tmn-primary);
}

/* -- "Built for" tile ------------------------------------------------------ */
.tmn-built-for {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.tmn-built-for__tile {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--tmn-ink-soft); font-weight: 500;
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-built-for__tile::before {
  content: ""; flex-shrink: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tmn-primary);
}

/* -- Live status dashboard ------------------------------------------------ */
.tmn-status-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  border-radius: var(--tmn-radius-lg);
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface);
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-status-banner.is-operational { border-color: #a7f3d0; background: #ecfdf5; }
.tmn-status-banner.is-degraded    { border-color: #fcd34d; background: #fffbeb; }
.tmn-status-banner.is-down        { border-color: #fecaca; background: #fef2f2; }
.tmn-status-banner__dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tmn-disabled);
  position: relative; flex-shrink: 0;
}
.tmn-status-banner.is-operational .tmn-status-banner__dot { background: var(--tmn-success); }
.tmn-status-banner.is-degraded    .tmn-status-banner__dot { background: var(--tmn-warning); }
.tmn-status-banner.is-down        .tmn-status-banner__dot { background: var(--tmn-danger); }
.tmn-status-banner__dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid currentColor; opacity: 0.35;
  animation: tmn-pulse 2.2s ease-out infinite;
}
.tmn-status-banner.is-operational .tmn-status-banner__dot::after { color: var(--tmn-success); }
.tmn-status-banner.is-degraded    .tmn-status-banner__dot::after { color: var(--tmn-warning); }
.tmn-status-banner.is-down        .tmn-status-banner__dot::after { color: var(--tmn-danger); }
@keyframes tmn-pulse {
  0%   { transform: scale(0.7); opacity: 0.65; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
.tmn-status-banner__title {
  font-size: 18px; font-weight: 700; color: var(--tmn-ink); line-height: 1.2;
}
.tmn-status-banner__sub {
  margin-top: 2px; color: var(--tmn-body); font-size: 14px;
}
.tmn-status-banner__refresh {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--tmn-muted);
}
.tmn-status-banner__refresh button {
  background: transparent; border: 1px solid var(--tmn-border);
  color: var(--tmn-body); border-radius: var(--tmn-radius-pill);
  padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.tmn-status-banner__refresh button:hover { background: var(--tmn-surface-muted); }

.tmn-component-card {
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-lg);
  padding: 22px;
  box-shadow: var(--tmn-shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.tmn-component-card__head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.tmn-component-card__head h3 { margin: 0; font-size: 16px; }
.tmn-component-card__detail { color: var(--tmn-body); font-size: 14px; margin: 0; }
.tmn-component-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--tmn-muted);
}
.tmn-component-card__meta .tmn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--tmn-radius-pill);
  background: var(--tmn-surface-muted);
  border: 1px solid var(--tmn-border);
  color: var(--tmn-body);
}
.tmn-component-card__meta .tmn-pill strong { color: var(--tmn-ink); font-weight: 600; }
.tmn-component-card.is-degraded { border-color: #fcd34d; }
.tmn-component-card.is-down     { border-color: #fecaca; }

/* Mini latency bar — purely decorative, fixed scale (0..500ms cap). */
.tmn-latency {
  display: inline-flex; align-items: center; gap: 8px;
}
.tmn-latency__bar {
  width: 80px; height: 6px; border-radius: 3px;
  background: var(--tmn-surface-muted);
  overflow: hidden;
}
.tmn-latency__fill {
  display: block; height: 100%;
  background: var(--tmn-success);
  border-radius: 3px;
  transition: width 240ms ease;
}
.tmn-latency.is-slow .tmn-latency__fill { background: var(--tmn-warning); }
.tmn-latency.is-down .tmn-latency__fill { background: var(--tmn-danger); }

/* Worker tile list (compact). */
.tmn-worker-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.tmn-worker-tile {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--tmn-surface-soft);
  border: 1px solid var(--tmn-border);
  border-radius: var(--tmn-radius-md);
  font-size: 13px;
}
.tmn-worker-tile__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--tmn-success); flex-shrink: 0;
}
.tmn-worker-tile.is-stale { border-color: #fcd34d; background: #fffbeb; }
.tmn-worker-tile.is-stale .tmn-worker-tile__dot { background: var(--tmn-warning); }
.tmn-worker-tile__name { font-weight: 600; color: var(--tmn-ink); }
.tmn-worker-tile__age  { color: var(--tmn-muted); margin-left: auto; }

/* Incident timeline */
.tmn-incident-row {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--tmn-border);
}
.tmn-incident-row:last-child { border-bottom: none; }
.tmn-incident-row__sev {
  flex-shrink: 0;
}
.tmn-incident-row__body { flex: 1; min-width: 0; }
.tmn-incident-row__when { color: var(--tmn-muted); font-size: 12px; }
.tmn-incident-row__status { font-size: 13px; color: var(--tmn-body); margin-top: 2px; }

/* -- Pricing-style note card (single column) ------------------------------ */
.tmn-callout {
  background: var(--tmn-primary-softest);
  border: 1px solid var(--tmn-primary-soft);
  border-radius: var(--tmn-radius-lg);
  padding: 24px 28px;
  color: var(--tmn-ink-soft);
}
.tmn-callout h3 { margin: 0 0 6px; color: var(--tmn-primary-deep); }
.tmn-callout p  { margin: 0; color: var(--tmn-ink-soft); }

/* -- Maintenance mode ------------------------------------------------------ */
.tmn-maintenance-hero {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(37, 99, 235, 0.16), transparent 60%),
    var(--tmn-surface);
  border-bottom: 1px solid var(--tmn-border);
}
.tmn-maintenance-hero .tmn-section__eyebrow {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  padding: 6px 14px;
  border-radius: var(--tmn-radius-pill);
  display: inline-block;
}
.tmn-maintenance-status {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 14px 22px;
  border-radius: var(--tmn-radius-pill);
  background: var(--tmn-surface);
  border: 1px solid var(--tmn-border);
  box-shadow: var(--tmn-shadow-sm);
}
.tmn-maintenance-status__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tmn-warning);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18);
  animation: tmn-maintenance-pulse 1.6s ease-in-out infinite;
}
@keyframes tmn-maintenance-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18); }
  50%      { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.08); }
}
.tmn-maintenance-status__copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left;
  font-size: 14px;
}
.tmn-maintenance-status__copy strong { color: var(--tmn-ink); }
.tmn-maintenance-status__copy span   { color: var(--tmn-body); }
.tmn-maintenance-cta {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 12px; margin-top: 28px;
}

/* -- Admin maintenance panel ---------------------------------------------- */
.tmn-maintenance-state {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: var(--tmn-radius-lg);
  border: 1px solid var(--tmn-border);
  background: var(--tmn-surface);
  margin-bottom: 18px;
}
.tmn-maintenance-state.is-on { border-color: #fcd34d; background: #fffbeb; }
.tmn-maintenance-state__dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tmn-success);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.18);
}
.tmn-maintenance-state.is-on .tmn-maintenance-state__dot {
  background: var(--tmn-warning);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.2);
}
.tmn-maintenance-state__copy strong { display: block; color: var(--tmn-ink); font-size: 15px; }
.tmn-maintenance-state__copy span   { color: var(--tmn-body); font-size: 13px; }
