﻿/* =============================================================================================
   Jobcards components, on top of Bootstrap 5.3 (no other CSS framework).
   - Colours, logo and fonts come from the active theme: wwwroot/themes/{key}/theme.css sets the
     --tt-* tokens for light and dark; this file uses the tokens, not colour values.
   - Light/dark is the user's choice (profile menu), set on <html data-bs-theme> by the server.
   - Mobile first: 17px base text, 44px minimum tap targets, high contrast for sunlight.
   - All motion is short (<= 250ms) and switched off under prefers-reduced-motion.
   The /StyleGuide page shows every piece below, in every theme.
   ============================================================================================= */

/* ---- Bootstrap variables pointed at the tokens --------------------------------------------- */
:root,
[data-bs-theme] {
  --bs-body-bg: var(--tt-bg);
  --bs-body-color: var(--tt-text);
  --bs-secondary-color: var(--tt-muted);
  --bs-tertiary-bg: var(--tt-surface-2);
  --bs-border-color: var(--tt-border);
  --bs-primary: var(--tt-primary);
  --bs-primary-rgb: var(--tt-primary-rgb);
  --bs-link-color: var(--tt-primary);
  --bs-link-color-rgb: var(--tt-primary-rgb);
  --bs-link-hover-color: var(--tt-primary-hover);
  --bs-border-radius: .625rem;
  --bs-border-radius-lg: .875rem;
  --bs-focus-ring-color: color-mix(in srgb, var(--tt-focus) 45%, transparent);
  --bs-font-sans-serif: var(--tt-font-body);
}

/* ---- Base ---------------------------------------------------------------------------------- */
html {
  font-size: 106.25%;             /* 17px: readable on a phone without zooming */
}

body {
  background: var(--tt-bg);
  color: var(--tt-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

main {
  flex: 1 0 auto;
}

h1, .h1, h2, .h2, h3, .h3 { font-family: var(--tt-font-heading); }
h1, .h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2, .h2 { font-size: 1.3rem; font-weight: 700; }
h3, .h3 { font-size: 1.1rem; font-weight: 600; }
.text-muted, .text-body-secondary { color: var(--tt-muted) !important; }
.small, small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

a { text-underline-offset: .15em; }

:focus-visible {
  outline: 3px solid var(--tt-focus);
  outline-offset: 2px;
}

/* ---- Header / navigation ------------------------------------------------------------------- */
.app-header {
  background: var(--tt-surface);
  border-bottom: 1px solid var(--tt-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Thin brand stripe under the header (the theme's --tt-stripe, e.g. Tru-Temp's cyan into red) */
.app-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--tt-stripe);
}

.app-header .navbar { padding-block: .35rem; }

/* Logo: the theme sets the image (.brand-logo background-image, per colour mode) and its size, on an optional plate */
.brand-plate {
  display: inline-block;
  background: var(--tt-logo-plate);
  padding: var(--tt-logo-plate-padding);
  border-radius: .5rem;
}

.brand-logo {
  display: block;
  width: var(--tt-logo-width);
  height: var(--tt-logo-height);
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

/* Profile button + menu toggle, top right */
.header-actions {
  position: relative;            /* the profile menu lines up with the right edge of this group */
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
}

.header-actions .profile-menu { position: static; }

@media (min-width: 992px) {
  .header-actions { margin-left: .5rem; }
}

.app-header .nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-inline: .75rem !important;
  border-radius: .5rem;
  color: var(--tt-text);
  font-weight: 500;
  white-space: nowrap;
}

.app-header .nav-link:hover { background: var(--tt-surface-2); }
.app-header .nav-link.active { color: var(--tt-primary); background: var(--tt-primary-subtle); }

.app-header .navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--tt-border);
  border-radius: .5rem;
}

.app-footer {
  color: var(--tt-muted);
  font-size: .85rem;
  padding: 1rem 0 1.25rem;
}

.motto { font-style: italic; }

/* ---- Buttons ------------------------------------------------------------------------------- */
.btn {
  min-height: 44px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-border-radius: .625rem;
}

.btn-sm { min-height: 36px; }      /* desktop-only tables; never the main action on a phone */
.btn-lg { min-height: 52px; --bs-btn-font-size: 1.1rem; }

.btn-primary {
  --bs-btn-color: var(--tt-on-primary);
  --bs-btn-bg: var(--tt-primary);
  --bs-btn-border-color: var(--tt-primary);
  --bs-btn-hover-color: var(--tt-on-primary);
  --bs-btn-hover-bg: var(--tt-primary-hover);
  --bs-btn-hover-border-color: var(--tt-primary-hover);
  --bs-btn-active-color: var(--tt-on-primary);
  --bs-btn-active-bg: var(--tt-primary-active);
  --bs-btn-active-border-color: var(--tt-primary-active);
  --bs-btn-disabled-color: var(--tt-on-primary);
  --bs-btn-disabled-bg: var(--tt-primary);
  --bs-btn-disabled-border-color: var(--tt-primary);
  --bs-btn-focus-shadow-rgb: var(--tt-primary-rgb);
}

.btn-outline-primary {
  --bs-btn-color: var(--tt-primary);
  --bs-btn-border-color: var(--tt-primary);
  --bs-btn-hover-color: var(--tt-on-primary);
  --bs-btn-hover-bg: var(--tt-primary);
  --bs-btn-hover-border-color: var(--tt-primary);
  --bs-btn-active-color: var(--tt-on-primary);
  --bs-btn-active-bg: var(--tt-primary-active);
  --bs-btn-active-border-color: var(--tt-primary-active);
  --bs-btn-disabled-color: var(--tt-primary);
  --bs-btn-disabled-border-color: var(--tt-primary);
}

.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tt-danger);
  --bs-btn-border-color: var(--tt-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tt-danger-hover);
  --bs-btn-hover-border-color: var(--tt-danger-hover);
  --bs-btn-active-bg: var(--tt-danger-hover);
}

[data-bs-theme="dark"] .btn-danger { --bs-btn-color: #0e1418; --bs-btn-hover-color: #0e1418; }

.btn-outline-danger {
  --bs-btn-color: var(--tt-danger);
  --bs-btn-border-color: var(--tt-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tt-danger);
  --bs-btn-hover-border-color: var(--tt-danger);
}

.btn-outline-secondary {
  --bs-btn-color: var(--tt-text);
  --bs-btn-border-color: var(--tt-border);
  --bs-btn-hover-color: var(--tt-text);
  --bs-btn-hover-bg: var(--tt-surface-2);
  --bs-btn-hover-border-color: var(--tt-border);
  --bs-btn-active-color: var(--tt-text);
  --bs-btn-active-bg: var(--tt-surface-2);
}

/* Toggle buttons (e.g. the style guide's Light / Dark) */
.btn-outline-secondary[aria-pressed="true"] {
  --bs-btn-color: var(--tt-primary);
  --bs-btn-border-color: var(--tt-primary);
  --bs-btn-bg: var(--tt-primary-subtle);
  --bs-btn-hover-color: var(--tt-primary);
  z-index: 1;
}

/* The one big action on the scan page */
.btn-scan {
  min-height: 72px;
  font-size: 1.25rem;
  border-radius: 1rem;
  box-shadow: var(--tt-shadow);
}

.btn-scan .icon { width: 1.75rem; height: 1.75rem; }

/* Busy state: set by app.js on submit, or by code while waiting */
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }

/* ---- Icons (inline SVG sprite in _Icons.cshtml) -------------------------------------------- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Forms --------------------------------------------------------------------------------- */
.form-control,
.form-select {
  min-height: 48px;
  font-size: 1.05rem;            /* >= 16px stops iOS zooming on focus */
  background-color: var(--tt-surface);
  border-color: var(--tt-border);
  border-width: 1.5px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tt-primary);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--tt-focus) 35%, transparent);
}

.form-floating > .form-control,
.form-floating > .form-select { min-height: 58px; }

.form-label { font-weight: 600; margin-bottom: .3rem; }
.validation-summary-valid { display: none; }   /* empty server summary: don't show an empty alert */
.text-primary { color: var(--tt-primary) !important; }
.form-text { color: var(--tt-muted); }
.field-validation-error, .text-danger { color: var(--tt-danger) !important; }
.input-validation-error { border-color: var(--tt-danger) !important; }

.form-check-input { width: 1.4em; height: 1.4em; margin-top: .1em; }
.form-check-input:checked { background-color: var(--tt-primary); border-color: var(--tt-primary); }
.form-check { min-height: 44px; display: flex; align-items: center; gap: .5rem; padding-left: 0; }
.form-check .form-check-input { float: none; margin-left: 0; }

/* Password field with a show/hide button (gloves: no need to retype) */
.password-field { position: relative; }
.password-field .form-control { padding-right: 3.25rem; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: .25rem;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--tt-muted);
  border-radius: .5rem;
  z-index: 5;
}

/* ---- Cards / surfaces ---------------------------------------------------------------------- */
.card {
  --bs-card-bg: var(--tt-surface);
  --bs-card-border-color: var(--tt-border);
  --bs-card-border-radius: .875rem;
  box-shadow: var(--tt-shadow);
}

/* Home page tiles: whole card is the link */
.tile {
  text-decoration: none;
  color: var(--tt-text);
  min-height: 44px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.tile:hover { border-color: var(--tt-primary); color: var(--tt-text); }
.tile:active { transform: scale(.99); }
.tile-icon { width: 1.75rem; height: 1.75rem; color: var(--tt-primary); margin-bottom: .4rem; }
.tile-title { font-weight: 700; font-size: 1.1rem; }

/* Page title row with an optional action on the right */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.page-header h1 { margin: 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.auth-card {
  max-width: 420px;
  margin: 1.5rem auto;
}

.page-narrow { max-width: 760px; margin-inline: auto; }

/* ---- Badges, status pill, chips ------------------------------------------------------------ */
.badge {
  font-weight: 600;
  font-size: .8rem;
  padding: .4em .6em;
  border-radius: .45rem;
}

.badge-soft { background: var(--tt-surface-2); color: var(--tt-text); border: 1px solid var(--tt-border); }
.badge-service { background: var(--tt-success-subtle); color: var(--tt-success-text); }
.badge-repair { background: var(--tt-warning-subtle); color: var(--tt-warning-text); }
.badge-sale { background: var(--tt-info-subtle); color: var(--tt-info-text); }
.badge-danger { background: var(--tt-danger); color: #fff; }
.badge-warning { background: #ffc107; color: #1a1a1a; }
.badge-success { background: var(--tt-success); color: #fff; }
.badge-muted { background: var(--tt-surface-2); color: var(--tt-muted); border: 1px solid var(--tt-border); }
[data-bs-theme="dark"] .badge-danger,
[data-bs-theme="dark"] .badge-success { color: #0e1418; }

/* Hub connection status */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: var(--tt-surface-2);
  color: var(--tt-muted);
  border: 1px solid var(--tt-border);
}

.status-pill::before {
  content: "";
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: currentColor;
}

.status-pill[data-state="connected"] { color: var(--tt-success-text); background: var(--tt-success-subtle); border-color: transparent; }
.status-pill[data-state="reconnecting"] { color: var(--tt-warning-text); background: var(--tt-warning-subtle); border-color: transparent; }
.status-pill[data-state="reconnecting"]::before { animation: tt-pulse 1s ease-in-out infinite; }
.status-pill[data-state="site-offline"] { color: var(--tt-warning-text); background: var(--tt-warning-subtle); border-color: transparent; }
.status-pill[data-state="disconnected"] { color: var(--tt-danger-text); background: var(--tt-danger-subtle); border-color: transparent; }

/* Fault chip: "48 Inspect Unit" */
.fault-chip {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--tt-chip-bg);
  color: var(--tt-chip-text);
  font-size: .875rem;
  line-height: 1.3;
}

.fault-code {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---- Alerts and state panels --------------------------------------------------------------- */
.alert { border-radius: .75rem; border-width: 1px; }
.alert-success { --bs-alert-bg: var(--tt-success-subtle); --bs-alert-color: var(--tt-success-text); --bs-alert-border-color: transparent; }
.alert-danger { --bs-alert-bg: var(--tt-danger-subtle); --bs-alert-color: var(--tt-danger-text); --bs-alert-border-color: transparent; }
.alert-warning { --bs-alert-bg: var(--tt-warning-subtle); --bs-alert-color: var(--tt-warning-text); --bs-alert-border-color: transparent; }
.alert-info { --bs-alert-bg: var(--tt-info-subtle); --bs-alert-color: var(--tt-info-text); --bs-alert-border-color: transparent; }

/* A full-width message with an icon, a title, text and an optional action */
.state-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .9rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: .875rem;
  background: var(--tt-surface);
  border: 1px solid var(--tt-border);
  border-left-width: 5px;
}

.state-panel .state-icon {
  grid-row: span 3;
  width: 2rem;
  height: 2rem;
  margin-top: .1rem;
}

.state-panel .state-title { font-weight: 700; font-size: 1.05rem; }
.state-panel .state-text { color: var(--tt-text); }
.state-panel .state-action { margin-top: .5rem; }

.state-panel[data-kind="info"] { border-left-color: var(--tt-primary); }
.state-panel[data-kind="info"] .state-icon { color: var(--tt-primary); }
.state-panel[data-kind="warning"] { border-left-color: #e0a100; }
.state-panel[data-kind="warning"] .state-icon { color: #b88400; }
[data-bs-theme="dark"] .state-panel[data-kind="warning"] .state-icon { color: #ffc107; }
.state-panel[data-kind="danger"] { border-left-color: var(--tt-danger); }
.state-panel[data-kind="danger"] .state-icon { color: var(--tt-danger); }
.state-panel[data-kind="success"] { border-left-color: var(--tt-success); }
.state-panel[data-kind="success"] .state-icon { color: var(--tt-success); }

/* ---- Loading ------------------------------------------------------------------------------- */
/* Thin indeterminate bar for "waiting for the site service" */
.progress-indeterminate {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: var(--tt-primary-subtle);
  overflow: hidden;
}

.progress-indeterminate::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: var(--tt-primary);
  animation: tt-slide 1.1s ease-in-out infinite;
}

/* Skeleton placeholders use Bootstrap's .placeholder; tint them for the theme */
.placeholder { background-color: var(--tt-border); opacity: 1; border-radius: .35rem; }
.skeleton-card { pointer-events: none; }

/* ---- Unit history -------------------------------------------------------------------------- */
.unit-card .unit-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }

.field-list {
  display: grid;
  grid-template-columns: minmax(7.5rem, max-content) 1fr;
  column-gap: .9rem;
  row-gap: .25rem;
  margin: 0;
}

.field-list dt { font-weight: 500; color: var(--tt-muted); }
.field-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }

.jobcard-card .jobcard-number { font-weight: 800; font-variant-numeric: tabular-nums; }
.jobcard-card .card-body { padding: .9rem 1rem; }

.notes {
  margin-top: .5rem;
  border-top: 1px dashed var(--tt-border);
  padding-top: .4rem;
}

.notes summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--tt-primary);
  cursor: pointer;
}

.notes-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Jobcard details (staff): collapsed under the summary, opened per card or with "Expand all" */
.jobcard-details {
  margin-top: .25rem;
  border-top: 1px solid var(--tt-border);
}

.jobcard-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--tt-primary);
  cursor: pointer;
}

.jobcard-details[open] > summary { margin-bottom: .25rem; }

/* The hidden attribute must win over Bootstrap's display utilities (d-flex etc.) */
[hidden] { display: none !important; }

/* Client record picker (user forms) */
.client-results { max-height: 18rem; overflow-y: auto; }
.client-results .list-group-item { cursor: pointer; }

/* ---- Profile menu (header, top right) ------------------------------------------------------ */
.profile-button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--tt-primary-subtle);
  color: var(--tt-primary);
  border: 1.5px solid color-mix(in srgb, var(--tt-primary) 35%, transparent);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: background-color 150ms ease;
}

.profile-button:hover .profile-avatar,
.profile-button[aria-expanded="true"] .profile-avatar { background: var(--tt-primary); color: var(--tt-on-primary); }

.profile-dropdown {
  --bs-dropdown-bg: var(--tt-surface);
  --bs-dropdown-border-color: var(--tt-border);
  --bs-dropdown-color: var(--tt-text);
  --bs-dropdown-link-color: var(--tt-text);
  --bs-dropdown-link-hover-color: var(--tt-text);
  --bs-dropdown-link-hover-bg: var(--tt-surface-2);
  --bs-dropdown-link-active-color: var(--tt-text);
  --bs-dropdown-link-active-bg: var(--tt-surface-2);
  --bs-dropdown-divider-bg: var(--tt-border);
  --bs-dropdown-border-radius: .875rem;
  --bs-dropdown-padding-y: .4rem;
  width: min(20rem, calc(100vw - 1.5rem));
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

/* Catches the tap outside an open profile menu (app.js); the header stays above it */
.menu-backdrop { position: fixed; inset: 0; z-index: 1015; }

.profile-head { padding: .5rem 1rem .6rem; overflow-wrap: anywhere; }
.profile-name { font-weight: 700; font-size: 1.05rem; }

.profile-company {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .2rem;
  color: var(--tt-muted);
  font-size: .9rem;
}

.profile-dropdown .dropdown-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-inline: 1rem;
  font-weight: 500;
}

.profile-dropdown .dropdown-item .icon { color: var(--tt-muted); }
.profile-dropdown .company-switcher { padding: .25rem 1rem .5rem; }

/* Light/dark switch drawn inside the menu item (the button itself has role="switch") */
.mode-switch {
  position: relative;
  width: 2.6rem;
  height: 1.5rem;
  margin-left: auto;
  flex: none;
  border-radius: 999px;
  background: var(--tt-border);
  transition: background-color 150ms ease;
}

.mode-switch::after {
  content: "";
  position: absolute;
  top: .2rem;
  left: .2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--tt-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  transition: transform 150ms ease;
}

[aria-checked="true"] > .mode-switch { background: var(--tt-primary); }
[aria-checked="true"] > .mode-switch::after { transform: translateX(1.1rem); }

/* ---- Camera -------------------------------------------------------------------------------- */
.camera-box {
  position: relative; /* qr-scanner positions its scan-region overlay inside the video's parent */
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
}

.camera-box video { display: block; width: 100%; }

/* ---- Tables (admin, desktop) --------------------------------------------------------------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--tt-text); }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { color: var(--tt-muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Toasts -------------------------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  z-index: 1090;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 420px);
  display: grid;
  gap: .5rem;
}

.toast {
  --bs-toast-bg: var(--tt-surface);
  --bs-toast-border-color: var(--tt-border);
  --bs-toast-color: var(--tt-text);
  width: 100%;
  border-left: 5px solid var(--tt-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  font-size: 1rem;
}

.toast[data-kind="success"] { border-left-color: var(--tt-success); }
.toast[data-kind="danger"] { border-left-color: var(--tt-danger); }
.toast[data-kind="warning"] { border-left-color: #e0a100; }
.toast .toast-body { display: flex; gap: .6rem; align-items: center; min-height: 52px; }

/* ---- Motion -------------------------------------------------------------------------------- */
.fade-in { animation: tt-fade-in 180ms ease-out both; }

/* History lines: each card fades/slides in with a small stagger (set via --i, capped in JS) */
.enter { animation: tt-enter 200ms ease-out both; animation-delay: calc(var(--i, 0) * 30ms); }

main > .page-content { animation: tt-fade-in 160ms ease-out both; }

@keyframes tt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tt-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tt-slide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes tt-pulse { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep loading visible without movement */
  .progress-indeterminate::after { left: 0; width: 100%; opacity: .6; }
  .placeholder-glow .placeholder { animation: none; }
}

/* ---- Style guide page ---------------------------------------------------------------------- */
.swatch {
  border-radius: .75rem;
  border: 1px solid var(--tt-border);
  overflow: hidden;
  background: var(--tt-surface);
}

.swatch-color { height: 64px; }
.swatch-meta { padding: .5rem .65rem; font-size: .85rem; }
.sg-section { scroll-margin-top: 80px; }
