/**
 * SElabs — modern SaaS theme layer.
 *
 * Loaded LAST in index.html. It only re-points design tokens and restyles
 * existing classes; no IDs, data attributes or JS hooks are touched.
 * Delete the <link> to this file to fall back to the previous cream theme.
 *
 * Direction: cool neutral canvas, white surfaces, one indigo accent, hairline
 * borders, 8–12px radii, Inter. Status colours (green/amber/red) are reserved
 * for status.
 */

/* ------------------------------------------------------------------ tokens */
:root,
[data-theme="light"] {
  --saas-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --saas-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --saas-canvas: #f6f7f9;
  --saas-surface: #ffffff;
  --saas-subtle: #f9fafb;
  --saas-muted-bg: #f3f4f6;
  --saas-hover: #f3f4f6;
  --saas-border: #e5e7eb;
  --saas-border-strong: #d1d5db;
  --saas-hairline: #eef0f3;

  --saas-text: #0f172a;
  --saas-text-2: #475467;
  --saas-text-3: #667085;
  --saas-text-4: #98a2b3;

  --saas-brand: #4f46e5;
  --saas-brand-hover: #4338ca;
  --saas-brand-tint: #eef2ff;
  --saas-brand-ring: rgba(79, 70, 229, 0.18);

  --saas-green: #067647;
  --saas-green-tint: #ecfdf3;
  --saas-amber: #b54708;
  --saas-amber-tint: #fffaeb;
  --saas-red: #d92d20;
  --saas-red-tint: #fef3f2;

  --saas-radius: 12px;
  --saas-radius-sm: 8px;
  --saas-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --saas-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --saas-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.16), 0 4px 8px -4px rgba(16, 24, 40, 0.06);

  /* Re-point the existing Dew tokens so every stylesheet inherits the look. */
  --dew-font: var(--saas-font);
  --dew-sidebar-bg: var(--saas-surface);
  --dew-brand: var(--saas-brand);
  --dew-brand-hover: var(--saas-brand-hover);
  --dew-brand-tint: var(--saas-brand-tint);
  --dew-primary: var(--saas-brand);
  --dew-primary-hover: var(--saas-brand-hover);
  --dew-primary-tint: var(--saas-brand-tint);
  --dew-text: var(--saas-text);
  --dew-text-secondary: var(--saas-text-2);
  --dew-text-muted: var(--saas-text-3);
  --dew-text-faint: var(--saas-text-4);
  --dew-bg: var(--saas-canvas);
  --dew-surface: var(--saas-surface);
  --dew-surface-subtle: var(--saas-subtle);
  --dew-surface-faint: var(--saas-muted-bg);
  --dew-hairline: var(--saas-hairline);
  --dew-border: var(--saas-border);
  --dew-input-border: var(--saas-border-strong);
  --dew-purple: var(--saas-brand);
  --dew-purple-tint: var(--saas-brand-tint);
  --dew-green: var(--saas-green);
  --dew-green-tint: var(--saas-green-tint);
  --dew-amber: var(--saas-amber);
  --dew-amber-tint: var(--saas-amber-tint);
  --dew-red: var(--saas-red);
  --dew-red-tint: var(--saas-red-tint);
  --dew-teal: var(--saas-brand);
  --dew-teal-tint: var(--saas-brand-tint);
  --dew-sand-tint: var(--saas-muted-bg);
  --dew-clay-tint: var(--saas-muted-bg);
  --dew-radius-lg: var(--saas-radius);
  --dew-shadow-island: var(--saas-shadow-xs);
  --dew-shadow-card: var(--saas-shadow-sm);
  --dew-shadow-popover: var(--saas-shadow-lg);
  --dew-btn-radius: var(--saas-radius-sm);

  --bg: var(--saas-canvas);
  --surface: var(--saas-surface);
  --surface-elevated: var(--saas-muted-bg);
  --surface-muted: var(--saas-subtle);
  --surface-hover: var(--saas-hover);
  --border: var(--saas-border);
  --border-soft: var(--saas-hairline);
  --text: var(--saas-text);
  --muted: var(--saas-text-2);
  --accent: var(--saas-brand);
  --accent-hover: var(--saas-brand-hover);
  --accent-soft: var(--saas-brand);
  --accent-bg: var(--saas-brand-tint);
  --teal: var(--saas-brand);
  --teal-bg: var(--saas-brand-tint);
  --warm: var(--saas-amber);
  --warm-hover: #93370d;
  --warm-bg: var(--saas-amber-tint);
  --green: var(--saas-green);
  --green-bg: var(--saas-green-tint);
  --amber: var(--saas-amber);
  --amber-bg: var(--saas-amber-tint);
  --danger: var(--saas-red);
  --danger-bg: var(--saas-red-tint);
  --shadow-sm: var(--saas-shadow-xs);
  --shadow-md: var(--saas-shadow-sm);
  --shadow-lift: var(--saas-shadow-lg);
  --input-bg: var(--saas-surface);
  --topbar-bg: var(--saas-surface);
  --footer-bg: var(--saas-canvas);
  --splash-bg: var(--saas-canvas);
  --splash-glow: transparent;
  --sidebar-w: 240px;

  /* Crayons (fw-*) component tokens */
  --fw-primary-color: var(--saas-brand);
  --fw-primary-color-hover: var(--saas-brand-hover);
  --color-fill-brand: var(--saas-brand);
  --color-fill-semantic-info-bold: var(--saas-brand-hover);
  --color-text-brand: var(--saas-brand);
  --color-text-primary: var(--saas-text);
  --color-fill-surface: var(--saas-surface);
  --color-fill-container: var(--saas-subtle);
  --color-boundary-border-mildest: var(--saas-border-strong);
  --color-boundary-border-boldest: var(--saas-brand);
  --color-boundary-brand: var(--saas-brand);
  --fw-button-hover-background-color: var(--saas-brand-hover);
  --fw-button--lg-focus-border: var(--saas-brand);
  --fw-font-family: var(--saas-font);
}

/* ---------------------------------------------------------------- base */
html body {
  font-family: var(--saas-font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--saas-canvas);
  color: var(--saas-text);
  letter-spacing: -0.006em;
}
html body h1,
html body h2,
html body h3 {
  letter-spacing: -0.02em;
}
::selection {
  background: var(--saas-brand-ring);
}
:focus-visible {
  outline: 2px solid var(--saas-brand);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- sidebar */
html .sidebar {
  background: var(--saas-surface);
  border-right: 1px solid var(--saas-border);
  padding: 16px 0 12px;
}
html .sidebar-head {
  padding: 0 16px 18px;
}
html .sidebar-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
html .sidebar-brand-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--saas-text);
}
html .sidebar-nav {
  padding: 0 10px;
  gap: 2px;
}
html .sidebar-nav-divider {
  margin: 10px 8px;
  background: var(--saas-hairline);
  border-color: var(--saas-hairline);
}
html .nav-item,
html fw-button.nav-item {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: var(--saas-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--saas-text-2);
  gap: 10px;
}
html .nav-icon,
html .nav-icon svg,
html .nav-icon-text {
  color: var(--saas-text-3);
}
html .nav-icon svg {
  width: 17px;
  height: 17px;
}
html .nav-item:hover {
  background: var(--saas-hover);
  color: var(--saas-text);
}
html .nav-item.active,
html fw-button.nav-item.active {
  background: var(--saas-brand-tint);
  color: var(--saas-brand);
  font-weight: 600;
}
html .nav-item.active .nav-icon,
html .nav-item.active .nav-icon svg,
html .nav-item.active .nav-icon-text {
  color: var(--saas-brand);
  --fw-icon-color: var(--saas-brand);
}
html .nav-grp {
  color: var(--saas-text-4);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 14px 10px 6px;
}
html .sidebar-foot {
  border-top: 1px solid var(--saas-hairline);
  padding-top: 10px;
  margin: 0 10px;
}
html .sidebar-user {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--saas-radius-sm);
  padding: 8px;
}
html .sidebar-user:hover {
  background: var(--saas-hover);
}
html .sidebar-user-avatar {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  width: 32px;
  height: 32px;
}
html .sidebar-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--saas-text);
}
html .sidebar-user-role {
  font-size: 12px;
  color: var(--saas-text-3);
}

/* -------------------------------------------------------------- top bar */
html .main-content {
  padding: 0 32px 48px;
}
html .main-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 60px;
  padding: 12px 32px;
  margin: 0 -32px 24px;
  background: color-mix(in srgb, var(--saas-canvas) 85%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--saas-border);
}
html .topbar-date-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--saas-text-3);
}
html .global-search-input {
  height: 36px;
  --fw-input-min-height: 36px;
}
html .topbar-action {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--saas-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
html .topbar-action--primary {
  background: var(--saas-brand);
  color: #fff;
  box-shadow: var(--saas-shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html .topbar-action--primary:hover {
  background: var(--saas-brand-hover);
  filter: none;
}
html .topbar-action--secondary {
  border: 1px solid var(--saas-border-strong);
  background: var(--saas-surface);
  color: var(--saas-text);
  box-shadow: var(--saas-shadow-xs);
}
html .topbar-action--secondary:hover {
  background: var(--saas-subtle);
}
html .topbar-action--icon {
  width: 36px;
  border-color: var(--saas-border-strong);
}

/* ---------------------------------------------------------------- cards */
html fw-card,
html .card,
html .dash-section > fw-card,
html .launch-kpi-card,
html .launch-activity-card,
html .task-board-card {
  --fw-card-border-radius: var(--saas-radius);
  border-radius: var(--saas-radius);
  border-color: var(--saas-border);
  box-shadow: var(--saas-shadow-xs);
}

/* -------------------------------------------------------------- dashboard */
html .launch-hero::before {
  display: none;
}
html .launch-hero {
  margin-bottom: 20px;
}
html .launch-greeting {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
html .launch-kpi-grid {
  gap: 16px;
}
html .launch-kpi-card {
  min-height: 0;
  padding: 18px 20px;
  gap: 14px;
  background: var(--saas-surface);
  border: 1px solid var(--saas-border);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
html .launch-kpi-card[data-kpi-nav]:hover {
  border-color: var(--saas-border-strong);
  box-shadow: var(--saas-shadow-sm);
  transform: none;
}
html .launch-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--saas-text-3);
}
html .launch-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--saas-radius-sm);
  border: 1px solid var(--saas-border);
  background: var(--saas-surface) !important;
  color: var(--saas-text-2) !important;
  font-size: 14px;
  box-shadow: var(--saas-shadow-xs);
}
html .launch-kpi-value {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
html .launch-kpi-delta {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--saas-muted-bg);
}
html .launch-kpi-delta.good {
  color: var(--saas-green);
  background: var(--saas-green-tint);
}
html .launch-kpi-delta.warn {
  color: var(--saas-red);
  background: var(--saas-red-tint);
}
html .launch-kpi-delta.muted {
  color: var(--saas-text-3);
}

/* Recent activity rows */
html .launch-activity-head {
  border-bottom: 1px solid var(--saas-hairline);
}
html .launch-activity-row {
  border-color: var(--saas-hairline);
  transition: background 120ms ease;
}
html .launch-activity-row:hover {
  background: var(--saas-subtle);
}
html .launch-activity-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--saas-radius-sm);
  position: relative;
}
html .launch-activity-icon.tile-teal {
  background: var(--saas-brand-tint);
  color: var(--saas-brand);
}
html .launch-activity-icon.tile-sand,
html .launch-activity-icon.tile-clay {
  background: var(--saas-amber-tint);
  color: var(--saas-amber);
}
/* The crayons icon set falls back to a broken "image" glyph here; swap in
   crisp inline icons keyed off the row type. */
html .launch-activity-row .launch-activity-icon fw-icon {
  display: none;
}
html .launch-activity-row .launch-activity-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--saas-ico) center / contain no-repeat;
  mask: var(--saas-ico) center / contain no-repeat;
}
html .launch-activity-row.dash-call-link .launch-activity-icon {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}
html .launch-activity-row.dash-brief-link .launch-activity-icon {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
}
html .launch-activity-title {
  font-weight: 600;
  color: var(--saas-text);
}
html .launch-activity-status {
  color: var(--saas-text-3);
}
html .launch-activity-when {
  color: var(--saas-text-4);
  font-size: 12px;
}
html .launch-activity-viewall {
  color: var(--saas-brand);
  font-weight: 600;
}
html .dash-section-title {
  font-size: 15px;
  font-weight: 650;
}

/* Task board */
html .task-section-header {
  font-family: var(--saas-font);
  color: var(--saas-text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------- data tables (lists) */
html table th,
html .lc-table th {
  font-family: var(--saas-font);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--saas-text-3);
  background: var(--saas-subtle);
}
html table td {
  border-color: var(--saas-hairline);
}

/* ------------------------------------------------------------------ login */
html .login-page {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(99, 102, 241, 0.10), transparent 70%),
    var(--saas-canvas);
}

/* ------------------------------------------------------- shared controls */
:root {
  --color-boundary-border-milder: var(--saas-border-strong);
}
html .btn-wire {
  border-color: var(--saas-border-strong);
  border-radius: var(--saas-radius-sm);
  box-shadow: var(--saas-shadow-xs);
  color: var(--saas-text);
  padding: 6px 12px;
  font-size: 12.5px;
}
html .btn-wire:hover {
  background: var(--saas-subtle);
}
html .pill {
  border-radius: 999px;
  font-weight: 600;
}
html .prep-form-eyebrow,
html .dew-mono-label,
html .eyebrow {
  font-family: var(--saas-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--saas-text-3);
}

/* Inputs: one border per field (the shell), crisp focus ring. */
html .nb-input-shell {
  border-color: var(--saas-border-strong);
  border-radius: var(--saas-radius-sm);
  min-height: 42px;
  box-shadow: var(--saas-shadow-xs);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
html .nb-input-shell:focus-within {
  border-color: var(--saas-brand);
  box-shadow: 0 0 0 3px var(--saas-brand-ring);
}
html .nb-input-shell fw-input {
  --color-boundary-border-milder: transparent;
  --color-boundary-border-boldest: transparent;
}
html .nb-input-shell fw-input::part(fw-input-inner-container),
html .nb-input-shell fw-input::part(fw-input-container) {
  border: none !important;
  box-shadow: none !important;
}
html .nb-context-section fw-textarea {
  --color-boundary-border-milder: var(--saas-border-strong);
  --fw-textarea-border-radius: var(--saas-radius-sm);
}
html .nb-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--saas-text);
}
html .nb-hint {
  color: var(--saas-text-3);
}
html .nb-form-card,
html #view-precall .nb-form-card {
  border: 1px solid var(--saas-border);
  border-radius: var(--saas-radius);
  box-shadow: var(--saas-shadow-sm);
}
html .nb-form-heading h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
html .nb-generate-btn {
  border-radius: var(--saas-radius-sm);
  background: var(--saas-brand);
  box-shadow: var(--saas-shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  min-height: 44px;
  font-weight: 600;
}
html .nb-generate-btn:not(.prep-cta-disabled):hover {
  background: var(--saas-brand-hover);
}
html .nb-generate-btn.prep-cta-disabled {
  background: var(--saas-muted-bg);
  color: var(--saas-text-4);
  box-shadow: none;
}
html .nb-attach-btn {
  border-radius: var(--saas-radius-sm);
  border-color: var(--saas-border-strong);
  background: var(--saas-surface);
}
html .prep-form-reason.warn {
  border-radius: var(--saas-radius-sm);
}

/* --------------------------------------------------- pre-call brief view */
html #prep-result-view {
  background: transparent;
}
html .prep-result-header {
  background: transparent;
  padding: 8px 0 0;
}
html .prep-result-back {
  padding: 0;
}
html .prep-result-back .lifecycle-back {
  border: none;
  box-shadow: none;
  background: transparent;
  color: var(--saas-text-3);
  padding: 4px 0;
  font-weight: 500;
}
html .prep-result-back .lifecycle-back:hover {
  color: var(--saas-text);
  background: transparent;
}
html .prep-logo {
  border-radius: 10px;
  background: var(--saas-brand);
}
html .prep-company-name {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
html .prep-domain-link {
  color: var(--saas-text-3);
  text-decoration: none;
}
html .prep-v9-card,
html #prep-result-view .prep-grid-kit fw-card.prep-card {
  border: 1px solid var(--saas-border);
  border-radius: var(--saas-radius);
  box-shadow: var(--saas-shadow-xs);
  background: var(--saas-surface);
}
html .prep-v9-card-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
html .prep-v9-read-legend,
html .prep-v9-read-kicker {
  font-family: var(--saas-font);
}
html .prep-v9-read-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--saas-text-3);
}
html .prep-v9-empty-box {
  border-radius: var(--saas-radius-sm);
  border-color: var(--saas-border);
  background: var(--saas-subtle);
}
html .prep-v9-empty-box p {
  font-size: 13.5px;
  line-height: 1.55;
}
html .prep-v9-tile,
html .prep-v9-stack-box,
html .prep-v9-stack-platform {
  border-radius: var(--saas-radius-sm);
}
html .prep-v9-src {
  border-radius: 6px;
}
html fw-tabs {
  --fw-tabs-active-color: var(--saas-brand);
  --fw-tab-active-border-color: var(--saas-brand);
}

/* ------------------------------------------- post-call scorecard / call */
html .call-record-title {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
html .call-record-back {
  color: var(--saas-text-3);
}
html .call-record .mcard {
  border-radius: var(--saas-radius);
  border-color: var(--saas-border);
  box-shadow: var(--saas-shadow-xs);
  padding: 16px 18px;
}
html .call-record .mcard::before {
  display: none;
}
html .call-record .mcard .lab {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--saas-text-3);
}
html .call-record .mcard .big {
  font-size: 30px;
  font-weight: 650;
}
html .call-record .mcard .sentiment {
  font-size: 20px;
  font-weight: 650;
}
html .call-record .meter {
  height: 6px;
  background: var(--saas-muted-bg);
}
html .star-card,
html .card-wire,
html .call-record .card,
html .qip-scorecard {
  border-radius: var(--saas-radius);
  border-color: var(--saas-border);
  box-shadow: var(--saas-shadow-xs);
}
html .star-overall-pill {
  border-radius: 999px;
  background: var(--saas-brand-tint);
  color: var(--saas-brand);
  border: none;
}
html .star-overall-pill b {
  font-family: var(--saas-font);
}
html .call-record-tablist {
  border-bottom: 1px solid var(--saas-border);
  gap: 4px;
}
html .call-record-tab {
  font-weight: 500;
  color: var(--saas-text-3);
  border-radius: 0;
}
html .call-record-tab.on {
  color: var(--saas-brand);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--saas-brand);
}
html .call-stakeholder-avatar {
  background: var(--saas-muted-bg);
  color: var(--saas-text-2);
}
html .call-deal-context {
  background: var(--saas-surface);
}

/* --------------------------------------------------------- list views */
html .brief-list-table-card,
html .lifecycle-list-view .card-wire {
  border-radius: var(--saas-radius);
  overflow: hidden;
}
html .brief-list-grid-header {
  background: var(--saas-subtle);
  border-bottom: 1px solid var(--saas-border);
}
html .brief-list-row:hover,
html .lifecycle-list-item:hover {
  background: var(--saas-subtle);
}
html .brief-list-mono,
html .nb-recent-mono {
  border-radius: 8px;
  background: var(--saas-brand-tint);
  color: var(--saas-brand);
}
html .brief-list-heading,
html .lifecycle-list-view h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 720px) {
  html .main-content {
    padding: 0 16px 40px;
  }
  html .main-topbar {
    padding: 10px 16px;
    margin: 0 -16px 16px;
  }
  html .launch-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  html .launch-kpi-card {
    padding: 14px;
    gap: 10px;
  }
  html .launch-kpi-value {
    font-size: 26px;
  }
  html .launch-kpi-icon {
    display: none;
  }
  html .launch-kpi-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  html .launch-greeting {
    font-size: 22px;
  }
  html .sidebar-toggle {
    --fw-button-hover-background-color: var(--saas-hover);
    border: 1px solid var(--saas-border-strong);
    border-radius: var(--saas-radius-sm);
    background: var(--saas-surface);
  }
  html .prep-result-header {
    padding: 4px 0 0;
  }
  html .prep-tab-body,
  html .prep-tab-panel-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ------------------------------------------------------- round 2 fixes */
:root {
  --color-boundary-border: var(--saas-border-strong);
  --color-boundary-border-mild: var(--saas-border-strong);
}
html #prep-tabs,
html #prep-result-view fw-tabs,
html .prep-result-back {
  background: transparent;
}
html .prep-v9-stack-card {
  background: var(--saas-surface);
}
html .prep-v9-stack-platform {
  background: var(--saas-amber-tint);
  border-color: color-mix(in srgb, var(--saas-amber) 25%, transparent);
}
html .prep-v9-stack-box {
  border-color: var(--saas-border-strong);
  background: var(--saas-surface);
}
html .prep-v9-seats-pill {
  border-radius: 999px;
}

/* Demo prep: "sixty seconds" hero + call-plan ribbon (colours are inline from JS) */
html .prep-v9-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 70%);
  border-radius: var(--saas-radius);
  color: #f8fafc;
  box-shadow: var(--saas-shadow-sm);
}
html .prep-v9-hero-kicker {
  font-family: var(--saas-font);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #a5b4fc;
}
html .prep-v9-hero-grid {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
html .prep-v9-hero-tile {
  background: rgba(255, 255, 255, 0.04);
}
html .prep-v9-hero-value { color: #f8fafc; }
html .prep-v9-hero-sub { color: #94a3b8; }
html .prep-v9-conf-bar { background: rgba(255, 255, 255, 0.14); }
html .prep-v9-ribbon-seg:nth-child(1) .prep-v9-ribbon-bar { background: #c7d2fe !important; }
html .prep-v9-ribbon-seg:nth-child(2) .prep-v9-ribbon-bar { background: #818cf8 !important; }
html .prep-v9-ribbon-seg:nth-child(3) .prep-v9-ribbon-bar { background: #4f46e5 !important; }
html .prep-v9-ribbon-seg:nth-child(n+4) .prep-v9-ribbon-bar { background: #312e81 !important; }
html .prep-v9-call-length {
  border-radius: 999px;
  background: var(--saas-subtle);
}

/* KPI tile icons: swap unicode glyphs (☑ ☎ ↻ ✎) for consistent line icons */
html .launch-kpi-icon {
  position: relative;
  font-size: 0 !important;
}
html .launch-kpi-icon::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--saas-ico) center / contain no-repeat;
  mask: var(--saas-ico) center / contain no-repeat;
}
html .launch-kpi-icon.tile-clay {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
}
html .launch-kpi-icon.tile-teal {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}
html .launch-kpi-icon.tile-loop {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 2v6h-6'/%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M3 22v-6h6'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3C/svg%3E");
}
html .launch-kpi-icon.tile-sand {
  --saas-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
}
html .launch-kpi-icon:not(.tile-clay):not(.tile-teal):not(.tile-loop):not(.tile-sand) {
  font-size: 14px !important;
}
html .launch-kpi-icon:not(.tile-clay):not(.tile-teal):not(.tile-loop):not(.tile-sand)::after {
  display: none;
}

/* Mobile: flex children default to min-width:auto, which let the call record
   overflow the 390px viewport. Let them shrink. */
@media (max-width: 720px) {
  html .main-content > .view-panel,
  html .lifecycle-panel,
  html .lifecycle-detail,
  html .call-record-page {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  html .call-record-page {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  html .call-record-title {
    font-size: 20px;
  }
}
@media (max-width: 720px) {
  html .call-record-tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  html .call-record-tab {
    white-space: nowrap;
    flex: none;
  }
}
