/* Tenant design system — extracted from homepage (Paperflow / Inter).
   Single source for storefront. Legacy aliases (--orange, --bg…) kept for existing CSS. */
:root {
  /* Brand / accent */
  --tenant-accent: #e65c00;
  --tenant-accent-hover: #c94e00;
  --tenant-accent-soft: #ffb380;
  --tenant-accent-muted: #fce9d3;

  --orange: var(--tenant-accent);
  --orange-hover: var(--tenant-accent-hover);
  --orange-soft: var(--tenant-accent-muted);

  /* Surfaces */
  --tenant-bg: #fdfbf7;
  --tenant-surface: #fdfbf7;
  --tenant-surface-muted: #f7f4eb;
  --tenant-surface-elevated: #ffffff;

  --bg: var(--tenant-bg);
  --card: var(--tenant-surface);

  /* Text */
  --tenant-text: #111827;
  --tenant-text-muted: #4b5563;
  --tenant-text-subtle: #6b7280;

  --text: var(--tenant-text);
  --muted: var(--tenant-text-muted);
  --c-text: var(--tenant-text);
  --c-text-muted: var(--tenant-text-muted);

  /* Lines & icons */
  --tenant-border: #e5e7eb;
  --tenant-icon: #9ca3af;

  --line: var(--tenant-border);
  --icon: var(--tenant-icon);

  /* Semantic */
  --tenant-error: #eb5757;
  --tenant-ok: #27ae60;
  --tenant-info: #209cdb;
  --tenant-danger-text: #b54545;
  --tenant-on-accent: #ffffff;

  --error: var(--tenant-error);
  --ok: var(--tenant-ok);
  --info: var(--tenant-info);

  /* Typography */
  --tenant-font-sans: Inter, "IBM Plex Sans", system-ui, sans-serif;
  --tenant-font-mono: "JetBrains Mono", ui-monospace, monospace;

  --font-h1-size: clamp(28px, 3.2vw, 40px);
  --font-h1-weight: 700;
  --font-h1-leading: 1.05;
  --font-h1-tracking: -0.03em;

  --font-h2-size: 28px;
  --font-h2-weight: 700;
  --font-h2-leading: 1.15;
  --font-h2-tracking: -0.035em;

  --font-h3-size: 18px;
  --font-h3-weight: 600;
  --font-h3-leading: 1.25;

  --font-body-size: 16px;
  --font-body-weight: 400;
  --font-body-leading: 1.6;

  --font-small-size: 14px;
  --font-small-weight: 400;
  --font-small-leading: 1.45;

  --font-caption-size: 13px;
  --font-caption-weight: 600;
  --font-caption-leading: 1.35;

  --font-price-size: 20px;
  --font-price-weight: 700;
  --font-price-tracking: -0.03em;
  --font-price-lg-size: clamp(24px, 2.5vw, 32px);

  --fs-price: var(--font-price-size);
  --fs-price-lg: var(--font-price-lg-size);
  --fs-caption: var(--font-caption-size);
  --fs-small: var(--font-small-size);
  --fs-body: var(--font-body-size);
  --r-sm: var(--tenant-radius-sm);
  --r-md: var(--tenant-radius-md);
  --r-lg: var(--tenant-radius-lg);

  --c-bg: var(--tenant-bg);
  --c-bg-media: var(--tenant-surface-muted);
  --c-border: var(--line);
  --s-4: var(--space-4);
  --s-5: var(--space-5);
  --sh-card: var(--tenant-shadow-sm);
  --sh-hover: var(--tenant-shadow-lg);
  --t-base: var(--tenant-duration) var(--tenant-ease);

  /* Layout */
  --tenant-container-max: 1440px;
  --page-gutter: 8px;
  --page-width: min(var(--tenant-container-max), calc(100% - 2 * var(--page-gutter)));

  --tenant-section-pad-y: 28px;
  --tenant-section-pad-y-sm: 20px;
  --tenant-shell-pad: 16px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;

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

  --radius-sm: var(--tenant-radius-sm);
  --radius-md: var(--tenant-radius-md);
  --radius: var(--tenant-radius-md);
  --radius-lg: var(--tenant-radius-lg);

  /* Shadows */
  --tenant-shadow-sm: 0 2px 10px -2px rgba(17, 24, 39, 0.04), 0 10px 24px -4px rgba(17, 24, 39, 0.06);
  --tenant-shadow-md: 0 10px 24px rgba(17, 24, 39, 0.06);
  --tenant-shadow-lg: 0 18px 32px -10px rgba(17, 24, 39, 0.14);
  --tenant-shadow-none: none;

  --shadow: var(--tenant-shadow-md);

  /* Motion */
  --tenant-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tenant-duration-fast: 0.15s;
  --tenant-duration: 0.28s;

  /* Status chips (cards) */
  --tenant-status-ok-bg: #ecfdf5;
  --tenant-status-ok-border: #a7f3d0;
  --tenant-status-ok-text: #047857;
  --tenant-status-ok-dot: #10b981;
  --tenant-status-busy-bg: #fff7ed;
  --tenant-status-busy-border: #fed7aa;
  --tenant-status-busy-text: #c2410c;
  --tenant-status-busy-dot: #f97316;

  --tenant-chip-bg: var(--tenant-surface-muted);
  --tenant-chip-text: var(--tenant-text-muted);

  --tenant-cart-in-bg: var(--tenant-text);
  --tenant-cart-in-hover: #1e293b;
}

@media (max-width: 720px) {
  :root {
    --font-h2-size: 24px;
    --font-h1-size: 32px;
  }
}

/* Typography utilities (homepage section titles & catalog headings) */
.type-h1 {
  font-family: var(--tenant-font-sans);
  font-size: var(--font-h1-size);
  font-weight: var(--font-h1-weight);
  line-height: var(--font-h1-leading);
  letter-spacing: var(--font-h1-tracking);
  color: var(--text);
}

.type-h2,
.catalog-scenarios__title,
.home-roots__title,
.home-howget__title,
.home-terms__title,
.home-b2b__title,
#homeFeedTitle,
.cat-page-head__title,
.catalog-hero__h1 {
  font-family: var(--tenant-font-sans);
  font-size: var(--font-h2-size);
  font-weight: var(--font-h2-weight);
  line-height: var(--font-h2-leading);
  letter-spacing: var(--font-h2-tracking);
  color: var(--text);
}

.type-h3 {
  font-family: var(--tenant-font-sans);
  font-size: var(--font-h3-size);
  font-weight: var(--font-h3-weight);
  line-height: var(--font-h3-leading);
  color: var(--text);
}

.type-body {
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  line-height: var(--font-body-leading);
  color: var(--text);
}

.type-small {
  font-size: var(--font-small-size);
  line-height: var(--font-small-leading);
  color: var(--muted);
}

.type-caption {
  font-size: var(--font-caption-size);
  font-weight: var(--font-caption-weight);
  line-height: var(--font-caption-leading);
  color: var(--muted);
}

.type-price {
  font-size: var(--font-price-size);
  font-weight: var(--font-price-weight);
  letter-spacing: var(--font-price-tracking);
  color: var(--text);
}

/* --- Component chrome (catalog / cart / PDP; homepage uses same tokens) --- */

body {
  font-family: var(--tenant-font-sans);
  color: var(--text);
  background: var(--bg);
}

.topbar {
  background: var(--tenant-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--tenant-shadow-none);
}

.logo {
  font-weight: 500;
  letter-spacing: -0.02em;
}

.catalog-shell {
  background: var(--tenant-bg);
  border-color: var(--line);
  border-radius: var(--tenant-radius-lg);
  box-shadow: var(--tenant-shadow-none);
}

.panel {
  background: var(--tenant-bg);
  border-color: var(--line);
  box-shadow: var(--tenant-shadow-none);
}

.trust {
  background: var(--tenant-bg);
}

.catalog-shell > .trust .trust__item {
  border: 1px solid var(--line);
  border-radius: var(--tenant-radius-lg);
  background: var(--tenant-surface-muted);
}

.catalog-shell > .trust .trust__item:last-child {
  border-bottom: 1px solid var(--line);
}

.tool {
  background: var(--tenant-surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--tenant-radius-lg);
  box-shadow: var(--tenant-shadow-none);
  transition:
    box-shadow var(--tenant-duration) var(--tenant-ease),
    transform var(--tenant-duration) var(--tenant-ease),
    border-color var(--tenant-duration-fast) ease;
}

.tool:hover {
  border-color: var(--tenant-accent-soft);
  box-shadow: var(--tenant-shadow-md);
  transform: translateY(-2px);
}

.tool .rent-pill__add,
#pdpPills .rent-pill__add {
  background: var(--orange);
  border-radius: var(--tenant-radius-md);
}

.tool .rent-pill__add:hover,
#pdpPills .rent-pill__add:hover {
  background: var(--orange-hover);
}

.tool .rent-pill.is-in-cart .rent-pill__add,
#pdpPills .rent-pill.is-in-cart .rent-pill__add {
  background: var(--tenant-cart-in-bg);
}

.tool .rent-pill.is-in-cart .rent-pill__add:hover,
#pdpPills .rent-pill.is-in-cart .rent-pill__add:hover {
  background: var(--tenant-cart-in-hover);
}

.tool__img {
  border-radius: var(--tenant-radius-md);
  background: linear-gradient(180deg, var(--tenant-surface-muted) 0%, var(--tenant-bg) 70%, transparent 100%);
  color: var(--muted);
}

.tool__rubric {
  color: var(--muted);
}

.tool__chips span {
  color: var(--tenant-text-muted);
  background: var(--tenant-bg);
}

.tool__status {
  background: var(--tenant-status-ok-bg);
  border-color: var(--tenant-status-ok-border);
  color: var(--tenant-status-ok-text);
}

.tool__status::before {
  background: var(--tenant-status-ok-dot);
}

.tool__status.is-busy {
  background: var(--tenant-status-busy-bg);
  border-color: var(--tenant-status-busy-border);
  color: var(--tenant-status-busy-text);
}

.tool__status.is-busy::before {
  background: var(--tenant-status-busy-dot);
}

.tool .rent-pill,
#pdpPills .rent-pill {
  border-top-color: var(--line);
}

.tool .rent-pill__price strong,
#pdpPills .rent-pill__price strong {
  color: var(--text);
}

.cat-page-head__lead,
.catalog-hero__lead {
  color: var(--muted);
  font-size: var(--font-small-size);
}

.mode-chip {
  border-color: var(--line);
  background: var(--tenant-surface-elevated);
  color: var(--muted);
  transition:
    background var(--tenant-duration-fast),
    color var(--tenant-duration-fast),
    border-color var(--tenant-duration-fast);
}

.mode-chip:hover {
  border-color: var(--icon);
}

.mode-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--tenant-on-accent);
}

.root-tile__img,
.shop-child-row__img {
  background: var(--tenant-surface-muted);
  border-radius: var(--tenant-radius-md);
}

.root-tile__ph {
  color: var(--icon);
}

.shop-child-row {
  border: 1px solid var(--line);
  border-radius: var(--tenant-radius-md);
  background: var(--tenant-surface-muted);
}

.shop-child-row:hover {
  border-color: var(--tenant-accent-soft);
}

/* Legacy: prefer .t-btn--primary (components.css) */

.side-tab.is-active {
  color: var(--orange);
  font-weight: 700;
}

.cart-item {
  background: var(--tenant-surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--tenant-radius-lg);
}

.cart-clear {
  color: var(--tenant-danger-text);
}

.cart-badge {
  background: var(--orange-soft);
  color: var(--orange-hover);
}

.avatar-btn:hover {
  border-color: var(--line);
  background: var(--tenant-surface-muted);
}

.chip.is-active,
.cat-leaf.is-active,
.cat-root__btn.is-active {
  color: var(--orange-hover);
}

.catalog-scenario-card,
.home-root-card,
.home-b2b__stop {
  background: var(--tenant-surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--tenant-radius-lg);
  box-shadow: var(--tenant-shadow-none);
}

.catalog-scenario-card:hover,
.home-root-card:hover {
  border-color: var(--tenant-accent-soft);
  box-shadow: var(--tenant-shadow-md);
}

.home-howget__kicker,
.home-b2b__kicker {
  color: var(--orange);
  font-family: var(--tenant-font-mono);
}

.home-howget__stop,
.home-b2b__stop {
  background: var(--tenant-surface-muted);
  border-color: var(--line);
}

.home-howget__stop:hover,
.home-b2b__stop:hover {
  border-color: var(--tenant-accent-soft);
}
