/* ============================================================================
   vNotes — Editorial Theme ("Ink & Clay")
   ----------------------------------------------------------------------------
   All rules are scoped to  html[data-theme="editorial"]  so toggling the
   theme attribute turns this entire file on/off with zero side effects on
   the original theme. No Tailwind classes are renamed — only their cascade
   is overridden.
   ============================================================================ */

/* ─── Tokens ──────────────────────────────────────────────────────────────── */
html[data-theme="editorial"] {
  --ds-ink:          #0B1220;
  --ds-bg:           #F5F1EA;
  --ds-surface:      #FFFFFF;
  --ds-accent:       #5B6BC9;
  --ds-clay:         #D4B896;
  --ds-accent-soft:  rgba(91,107,201,0.13);

  --ds-text-primary:   rgba(11,18,32,1.00);
  --ds-text-secondary: rgba(11,18,32,0.70);
  --ds-text-muted:     rgba(11,18,32,0.55);
  --ds-text-faint:     rgba(11,18,32,0.45);
  --ds-divider:        rgba(11,18,32,0.15);
  --ds-divider-soft:   rgba(11,18,32,0.08);

  --ds-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ds-font-sans:  'Inter Tight', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ds-font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --ds-radius-block: 2px;
  --ds-radius-pill:  999px;

  --ds-ease:     cubic-bezier(.2, .9, .25, 1);
  --ds-dur-rev:  0.9s;
  --ds-dur-hero: 1.1s;
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
html[data-theme="editorial"],
html[data-theme="editorial"] body {
  background: var(--ds-bg) !important;
  color: var(--ds-text-primary) !important;
  font-family: var(--ds-font-sans) !important;
}

html[data-theme="editorial"] body {
  line-height: 1.6;
}

/* Make the whole type system switch to the editorial pairing.
   Override Tailwind font-family utility classes by specificity. */
html[data-theme="editorial"] .font-headline,
html[data-theme="editorial"] .font-serif,
html[data-theme="editorial"] h1, html[data-theme="editorial"] h2,
html[data-theme="editorial"] h3, html[data-theme="editorial"] h4,
html[data-theme="editorial"] h5, html[data-theme="editorial"] h6 {
  font-family: var(--ds-font-serif) !important;
  font-weight: 300;
  letter-spacing: -0.02em;
}

html[data-theme="editorial"] .font-body,
html[data-theme="editorial"] .font-label,
html[data-theme="editorial"] .font-sans,
html[data-theme="editorial"] body,
html[data-theme="editorial"] input,
html[data-theme="editorial"] textarea,
html[data-theme="editorial"] select,
html[data-theme="editorial"] button {
  font-family: var(--ds-font-sans) !important;
}

html[data-theme="editorial"] .font-mono,
html[data-theme="editorial"] code,
html[data-theme="editorial"] kbd,
html[data-theme="editorial"] pre,
html[data-theme="editorial"] samp {
  font-family: var(--ds-font-mono) !important;
}

/* Make scroll-bar area warm-toned too */
html[data-theme="editorial"] ::-webkit-scrollbar {
  width: 10px; height: 10px;
}
html[data-theme="editorial"] ::-webkit-scrollbar-track { background: var(--ds-bg); }
html[data-theme="editorial"] ::-webkit-scrollbar-thumb {
  background: rgba(11,18,32,0.18);
  border-radius: 999px;
}
html[data-theme="editorial"] ::-webkit-scrollbar-thumb:hover { background: rgba(11,18,32,0.32); }

/* Selection */
html[data-theme="editorial"] ::selection {
  background: var(--ds-accent-soft);
  color: var(--ds-ink);
}

/* ─── Typography helpers (opt-in classes, safe to use in editorial markup) ── */
html[data-theme="editorial"] .ds-display {
  font-family: var(--ds-font-serif);
  font-weight: 300;
  font-size: clamp(72px, 11vw, 180px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ds-text-primary);
}
html[data-theme="editorial"] .ds-h2 {
  font-family: var(--ds-font-serif);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.03em;
}
html[data-theme="editorial"] .ds-h3 {
  font-family: var(--ds-font-serif);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
html[data-theme="editorial"] .ds-body {
  font-family: var(--ds-font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ds-text-secondary);
}
html[data-theme="editorial"] .ds-eyebrow {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ds-text-muted);
  font-weight: 400;
}
html[data-theme="editorial"] .ds-caption {
  font-family: var(--ds-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds-text-faint);
  font-weight: 400;
}
html[data-theme="editorial"] .ds-italic {
  font-style: italic;
  font-family: var(--ds-font-serif);
}

/* Lining figures */
html[data-theme="editorial"] .ds-figures {
  font-feature-settings: 'ss01', 'lnum';
}

/* ─── Override Tailwind palette tokens ─────────────────────────────────────
   The app's existing markup uses `bg-surface`, `text-on-surface`, `bg-primary`
   etc. We re-define those utility outputs via attribute selectors so every
   class site gracefully shifts without touching markup. */

/* Surfaces — warm off-white baseline, no pure white page bg */
html[data-theme="editorial"] .bg-surface,
html[data-theme="editorial"] .bg-background { background-color: var(--ds-bg) !important; }
html[data-theme="editorial"] .bg-surface-bright { background-color: var(--ds-surface) !important; }
html[data-theme="editorial"] .bg-surface-container-lowest { background-color: var(--ds-surface) !important; }
html[data-theme="editorial"] .bg-surface-container-low { background-color: #FBF8F2 !important; }
html[data-theme="editorial"] .bg-surface-container { background-color: #EFEAE1 !important; }
html[data-theme="editorial"] .bg-surface-container-high { background-color: #E7E0D3 !important; }
html[data-theme="editorial"] .bg-surface-container-highest { background-color: #DED6C6 !important; }
html[data-theme="editorial"] .bg-surface-dim { background-color: #E7E0D3 !important; }
html[data-theme="editorial"] .bg-surface-variant { background-color: #EFEAE1 !important; }

/* Slate / white utilities used across app */
html[data-theme="editorial"] .bg-white { background-color: var(--ds-surface) !important; }
html[data-theme="editorial"] .bg-slate-50 { background-color: var(--ds-bg) !important; }
html[data-theme="editorial"] .bg-slate-100\/50 { background-color: rgba(11,18,32,0.04) !important; }

/* Text */
html[data-theme="editorial"] .text-on-surface,
html[data-theme="editorial"] .text-on-background { color: var(--ds-text-primary) !important; }
html[data-theme="editorial"] .text-on-surface-variant { color: var(--ds-text-secondary) !important; }
html[data-theme="editorial"] .text-outline { color: var(--ds-text-muted) !important; }
html[data-theme="editorial"] .text-slate-500 { color: var(--ds-text-muted) !important; }
html[data-theme="editorial"] .text-slate-900 { color: var(--ds-text-primary) !important; }
html[data-theme="editorial"] .text-slate-400 { color: var(--ds-text-faint) !important; }

/* Primary (buttons etc.) ⇒ ink */
html[data-theme="editorial"] .bg-primary,
html[data-theme="editorial"] .bg-primary-container { background-color: var(--ds-ink) !important; }
html[data-theme="editorial"] .bg-primary\/10 { background-color: rgba(11,18,32,0.08) !important; }
html[data-theme="editorial"] .bg-primary\/90 { background-color: rgba(11,18,32,0.92) !important; }
html[data-theme="editorial"] .text-primary,
html[data-theme="editorial"] .text-primary-container { color: var(--ds-ink) !important; }
html[data-theme="editorial"] .text-on-primary { color: var(--ds-bg) !important; }
html[data-theme="editorial"] .text-blue-700 { color: var(--ds-ink) !important; }
html[data-theme="editorial"] .hover\:bg-primary\/90:hover { background-color: rgba(11,18,32,0.92) !important; }
html[data-theme="editorial"] .shadow-primary\/20 { box-shadow: 0 10px 24px rgba(11,18,32,0.12) !important; }

/* Secondary ⇒ lavender-blue accent, sparingly */
html[data-theme="editorial"] .bg-secondary,
html[data-theme="editorial"] .bg-secondary-container { background-color: var(--ds-accent-soft) !important; }
html[data-theme="editorial"] .text-secondary { color: var(--ds-accent) !important; }
html[data-theme="editorial"] .bg-secondary\/10 { background-color: var(--ds-accent-soft) !important; }

/* Tertiary ⇒ clay */
html[data-theme="editorial"] .bg-tertiary { background-color: var(--ds-clay) !important; }
html[data-theme="editorial"] .bg-tertiary\/10 { background-color: rgba(212,184,150,0.18) !important; }
html[data-theme="editorial"] .text-tertiary { color: #8A6A3A !important; }

/* Outlines / borders */
html[data-theme="editorial"] .border-outline-variant,
html[data-theme="editorial"] .border-outline-variant\/10,
html[data-theme="editorial"] .border-outline-variant\/20,
html[data-theme="editorial"] .border-outline-variant\/30,
html[data-theme="editorial"] .border-slate-100,
html[data-theme="editorial"] .border-slate-200\/50 { border-color: var(--ds-divider) !important; }

/* Remove Tailwind's soft drop shadows — editorial uses hairlines */
html[data-theme="editorial"] .shadow,
html[data-theme="editorial"] .shadow-sm,
html[data-theme="editorial"] .shadow-md,
html[data-theme="editorial"] .shadow-lg,
html[data-theme="editorial"] .shadow-xl {
  box-shadow: none !important;
  border: 1px solid var(--ds-divider);
}

/* ─── Button overrides (inks everything; removes gradients/shadows) ──────── */
html[data-theme="editorial"] button,
html[data-theme="editorial"] .btn,
html[data-theme="editorial"] [role="button"] {
  letter-spacing: 0.02em;
  transition: background 0.2s var(--ds-ease), transform 0.15s var(--ds-ease);
}

/* Primary CTA style — anything with both bg-primary + text-white (the app's
   conventional primary) gets the signature ink pill w/ trailing arrow disc. */
html[data-theme="editorial"] .bg-primary.text-white {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border: 0;
  border-radius: var(--ds-radius-pill) !important;
  font-family: var(--ds-font-sans) !important;
  font-size: 14px;
  font-weight: 500;
}

/* Chips / tags — mono, uppercase, pill */
html[data-theme="editorial"] .filter-btn,
html[data-theme="editorial"] .appt-type-btn {
  font-family: var(--ds-font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500 !important;
  border-radius: var(--ds-radius-pill) !important;
  border: 1px solid var(--ds-divider) !important;
  background: transparent !important;
  color: var(--ds-text-secondary) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .filter-btn.active,
html[data-theme="editorial"] .appt-type-btn.active {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-color: var(--ds-ink) !important;
}

/* ─── Rounded corners — sharper blocks, fully round pills ────────────────── */
html[data-theme="editorial"] .rounded,
html[data-theme="editorial"] .rounded-lg,
html[data-theme="editorial"] .rounded-xl,
html[data-theme="editorial"] .rounded-2xl,
html[data-theme="editorial"] .rounded-3xl { border-radius: var(--ds-radius-block) !important; }
html[data-theme="editorial"] .rounded-full { border-radius: var(--ds-radius-pill) !important; }

/* Restore pill shape on small pill-sized elements (chips, status dots, avatars) */
html[data-theme="editorial"] [class*="w-10"][class*="h-10"].rounded-xl,
html[data-theme="editorial"] [class*="w-16"][class*="h-16"].rounded-full,
html[data-theme="editorial"] [class*="rounded-full"] {
  border-radius: var(--ds-radius-pill) !important;
}

/* ─── Skeleton loader — warm-toned shimmer ────────────────────────────────── */
html[data-theme="editorial"] .skel {
  background: linear-gradient(90deg, #EFEAE1 25%, #E7E0D3 50%, #EFEAE1 75%) !important;
  border-radius: var(--ds-radius-block) !important;
}

/* ─── Status left-border indicators — ink family, hairline ───────────────── */
html[data-theme="editorial"] .soap-status-open        { border-left: 2px solid #5B6BC9 !important; }
html[data-theme="editorial"] .soap-status-ready       { border-left: 2px solid #0B1220 !important; }
html[data-theme="editorial"] .soap-status-generated   { border-left: 2px solid #5B6BC9 !important; }
html[data-theme="editorial"] .soap-status-pushed      { border-left: 2px solid #8A6A3A !important; }
html[data-theme="editorial"] .soap-status-done        { border-left: 2px solid rgba(11,18,32,0.35) !important; }
html[data-theme="editorial"] .soap-status-pend        { border-left: 2px solid #B3261E !important; }
html[data-theme="editorial"] .soap-status-no_encounter{ border-left: 2px solid rgba(11,18,32,0.15) !important; }

/* ─── Loading bar ────────────────────────────────────────────────────────── */
html[data-theme="editorial"] .loading-bar-fill { background: var(--ds-ink) !important; }

/* ─── Sidebar (dashboard nav) ─────────────────────────────────────────────── */
html[data-theme="editorial"] aside.bg-slate-50 {
  background: var(--ds-bg) !important;
  border-right: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] aside nav a {
  border-radius: var(--ds-radius-pill) !important;
  transition: background 0.2s var(--ds-ease);
}
html[data-theme="editorial"] aside nav a.bg-white {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
}
html[data-theme="editorial"] aside nav a.bg-white .material-symbols-outlined,
html[data-theme="editorial"] aside nav a.bg-white span { color: var(--ds-bg) !important; }
html[data-theme="editorial"] aside nav a span.uppercase {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em;
  font-weight: 500 !important;
  font-size: 11px !important;
}

/* ─── Title bar (Electron drag bar) ──────────────────────────────────────── */
html[data-theme="editorial"] #titleBar {
  background: var(--ds-bg) !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] #titleBar a span {
  font-family: var(--ds-font-mono) !important;
  color: var(--ds-ink) !important;
  letter-spacing: 0.16em !important;
  font-weight: 400 !important;
}
html[data-theme="editorial"] #userAvatar {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
}
html[data-theme="editorial"] #userName {
  font-family: var(--ds-font-sans) !important;
  color: var(--ds-ink) !important;
  font-weight: 500 !important;
}
html[data-theme="editorial"] #logoutBtn {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  color: var(--ds-text-muted) !important;
}

/* ─── Form controls ──────────────────────────────────────────────────────── */
html[data-theme="editorial"] input[type="text"],
html[data-theme="editorial"] input[type="search"],
html[data-theme="editorial"] input[type="email"],
html[data-theme="editorial"] input[type="password"],
html[data-theme="editorial"] input[type="date"],
html[data-theme="editorial"] input[type="number"],
html[data-theme="editorial"] input[type="tel"],
html[data-theme="editorial"] textarea,
html[data-theme="editorial"] select {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  color: var(--ds-text-primary) !important;
  font-family: var(--ds-font-sans) !important;
}
html[data-theme="editorial"] input:focus,
html[data-theme="editorial"] textarea:focus,
html[data-theme="editorial"] select:focus {
  outline: none !important;
  border-color: var(--ds-ink) !important;
  box-shadow: 0 0 0 1px var(--ds-ink) !important;
}
html[data-theme="editorial"] input::placeholder,
html[data-theme="editorial"] textarea::placeholder {
  color: var(--ds-text-faint) !important;
}

/* ─── Cards — replace shadows with hairlines ─────────────────────────────── */
html[data-theme="editorial"] .bg-surface-container-low.rounded-2xl,
html[data-theme="editorial"] .bg-white.rounded-2xl,
html[data-theme="editorial"] .bg-white.rounded-3xl,
html[data-theme="editorial"] .bg-surface-container-highest {
  box-shadow: none !important;
  border: 1px solid var(--ds-divider) !important;
  background: var(--ds-surface) !important;
}

/* Ghost-border utility used on settings page */
html[data-theme="editorial"] .ghost-border {
  border-color: var(--ds-divider) !important;
}

/* ─── Signature components (opt-in markup) ───────────────────────────────── */

html[data-theme="editorial"] .ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 34px;
  background: var(--ds-ink);
  color: var(--ds-bg);
  border: 0;
  border-radius: var(--ds-radius-pill);
  font-family: var(--ds-font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ds-ease), background 0.2s var(--ds-ease);
}
html[data-theme="editorial"] .ds-btn:hover { transform: translateY(-1px); }
html[data-theme="editorial"] .ds-btn::after {
  content: '→';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-size: 14px;
  line-height: 1;
}

html[data-theme="editorial"] .ds-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: transparent;
  color: var(--ds-text-primary);
  border: 0;
  border-bottom: 1px solid var(--ds-ink);
  border-radius: 0;
  font-family: var(--ds-font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
}
html[data-theme="editorial"] .ds-btn-secondary:hover { opacity: 0.7; }

html[data-theme="editorial"] .ds-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--ds-accent-soft);
  color: var(--ds-ink);
  border-radius: var(--ds-radius-pill);
  font-family: var(--ds-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[data-theme="editorial"] .ds-chip-outline {
  background: transparent;
  border: 1px solid var(--ds-divider);
}
html[data-theme="editorial"] .ds-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ds-accent);
  vertical-align: middle;
}
html[data-theme="editorial"] .ds-divider {
  border: 0;
  border-top: 1px solid var(--ds-divider);
  margin: 0;
}
html[data-theme="editorial"] .ds-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
html[data-theme="editorial"] .ds-list > li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
}
html[data-theme="editorial"] .ds-list > li::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: rgba(11,18,32,0.6);
  flex-shrink: 0;
  transform: translateY(-4px);
}

/* Image placeholder */
html[data-theme="editorial"] .ds-image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg,
    #EDE8DF 0 14px,
    rgba(11,18,32,0.05) 14px 15px);
  border-radius: var(--ds-radius-block);
  overflow: hidden;
}
html[data-theme="editorial"] .ds-image-placeholder .ds-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: var(--ds-text-faint);
}

/* Stat counter */
html[data-theme="editorial"] .ds-stat {
  font-family: var(--ds-font-serif);
  font-weight: 300;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-feature-settings: 'ss01', 'lnum';
}

/* ─── Ambient bloom ──────────────────────────────────────────────────────── */
html[data-theme="editorial"] .ds-bloom {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(91,107,201,0.35) 0%,
    transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  animation: ds-float 14s ease-in-out infinite;
  z-index: 0;
}
html[data-theme="editorial"] .ds-bloom-sm { width: 400px; height: 400px; animation-duration: 12s; }
html[data-theme="editorial"] .ds-bloom-lg { width: 800px; height: 800px; animation-duration: 16s; }
@keyframes ds-float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, -20px); }
}

/* ─── Dark section inversion ─────────────────────────────────────────────── */
html[data-theme="editorial"] .ds-section-dark {
  background: var(--ds-ink);
  color: var(--ds-bg);
  position: relative;
  overflow: hidden;
}
html[data-theme="editorial"] .ds-section-dark .ds-display,
html[data-theme="editorial"] .ds-section-dark .ds-h2,
html[data-theme="editorial"] .ds-section-dark .ds-h3 { color: var(--ds-bg) !important; }
html[data-theme="editorial"] .ds-section-dark .ds-body { color: rgba(245,241,234,0.70) !important; }
html[data-theme="editorial"] .ds-section-dark .ds-eyebrow,
html[data-theme="editorial"] .ds-section-dark .ds-caption { color: rgba(245,241,234,0.55) !important; }

/* ─── Motion primitives ──────────────────────────────────────────────────── */
html[data-theme="editorial"] .ds-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--ds-dur-rev) var(--ds-ease),
    transform var(--ds-dur-rev) var(--ds-ease);
}
html[data-theme="editorial"] .ds-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="editorial"] .ds-hero-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: baseline;
}
html[data-theme="editorial"] .ds-hero-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--ds-dur-hero) var(--ds-ease);
}
html[data-theme="editorial"] .ds-hero-word.is-visible > span {
  transform: translateY(0);
}

html[data-theme="editorial"] .ds-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1.5px;
  width: 0%;
  background: var(--ds-ink);
  z-index: 10000;
  transition: width 0.05s linear;
  pointer-events: none;
}

/* Marquee row */
html[data-theme="editorial"] .ds-marquee {
  overflow: hidden;
  background: var(--ds-ink);
  color: var(--ds-bg);
  padding: 24px 0;
  white-space: nowrap;
}
html[data-theme="editorial"] .ds-marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: ds-marquee 40s linear infinite;
  font-family: var(--ds-font-serif);
  font-style: italic;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 300;
}
@keyframes ds-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Custom cursor removed — native pointer is used instead. */

/* ─── Reduce-motion guard ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="editorial"] .ds-reveal,
  html[data-theme="editorial"] .ds-hero-word > span,
  html[data-theme="editorial"] .ds-bloom,
  html[data-theme="editorial"] .ds-marquee-track {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ─── Modals / overlays ──────────────────────────────────────────────────── */
html[data-theme="editorial"] .modal,
html[data-theme="editorial"] [role="dialog"],
html[data-theme="editorial"] .workflow-modal {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  box-shadow: 0 20px 60px rgba(11,18,32,0.18) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .modal-backdrop,
html[data-theme="editorial"] .workflow-modal-backdrop {
  background: rgba(11,18,32,0.55) !important;
  backdrop-filter: blur(2px);
}

/* ─── Encounter review, patient chart, workflow — shared surfaces ────────── */
html[data-theme="editorial"] .encounter-card,
html[data-theme="editorial"] .patient-card,
html[data-theme="editorial"] .workflow-step,
html[data-theme="editorial"] .appointment-card {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}

/* Tabs (profile tabs, settings tabs, etc.) */
html[data-theme="editorial"] .profile-tab,
html[data-theme="editorial"] [data-profile-tab] {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px !important;
  font-weight: 500 !important;
}
html[data-theme="editorial"] .profile-tab.active,
html[data-theme="editorial"] [data-profile-tab].active,
html[data-theme="editorial"] .profile-tab[class*="border-primary"] {
  color: var(--ds-ink) !important;
  border-color: var(--ds-ink) !important;
}

/* ============================================================================
   Data-dense surface overrides
   ----------------------------------------------------------------------------
   Targets page-specific class names defined in:
     - workflow-modal-styles.css   (Stage workflow modal + SOAP editor)
     - styles.css                  (global shared cards, modals, alerts)
     - pwa.css                     (PWA chrome — install sheets, update banner)
     - login.html embedded style   (login page illustration/hero)
   Rule of thumb: replace soft shadows with hairlines, swap blue/gradient
   accents for ink/clay, square off radii, and let the serif/mono palette
   push through on headings and status chips.
   ============================================================================ */

/* ─── Workflow modal: stages progress bar ─────────────────────────────────── */
html[data-theme="editorial"] .workflow-stages {
  background: var(--ds-bg) !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] .stage-circle {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  color: var(--ds-text-muted) !important;
  font-family: var(--ds-font-mono) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .stage.active .stage-circle {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-color: var(--ds-ink) !important;
  box-shadow: 0 0 0 3px rgba(11,18,32,0.08) !important;
}
html[data-theme="editorial"] .stage.completed .stage-circle {
  background: var(--ds-clay) !important;
  border-color: var(--ds-clay) !important;
  color: var(--ds-ink) !important;
}
html[data-theme="editorial"] .stage-label {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  color: var(--ds-text-muted) !important;
}
html[data-theme="editorial"] .stage.active .stage-label,
html[data-theme="editorial"] .stage.completed .stage-label {
  color: var(--ds-ink) !important;
}

/* ─── Workflow Stage 1: pending items list ────────────────────────────────── */
html[data-theme="editorial"] .pending-item {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
  transition: border-color 0.2s var(--ds-ease), background 0.2s var(--ds-ease);
}
html[data-theme="editorial"] .pending-item:hover {
  border-color: var(--ds-ink) !important;
  background: #FBF8F2 !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .pending-item.selected {
  border-color: var(--ds-ink) !important;
  background: var(--ds-accent-soft) !important;
}

/* ─── Workflow Stage 2: transcription / recording ─────────────────────────── */
html[data-theme="editorial"] .record-button {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  box-shadow: none !important;
  border: 1px solid var(--ds-ink) !important;
}
html[data-theme="editorial"] .record-button:hover {
  background: rgba(11,18,32,0.92) !important;
}
html[data-theme="editorial"] .record-button.recording {
  background: #B3261E !important;
  border-color: #B3261E !important;
  color: var(--ds-bg) !important;
}
html[data-theme="editorial"] .transcript-box {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  font-family: var(--ds-font-sans) !important;
  color: var(--ds-text-primary) !important;
}
html[data-theme="editorial"] .transcript-box:focus,
html[data-theme="editorial"] .transcript-box:focus-within {
  border-color: var(--ds-ink) !important;
  box-shadow: 0 0 0 1px var(--ds-ink) !important;
}

/* ─── Workflow Stage 2/3: summary & selection panels ─────────────────────── */
html[data-theme="editorial"] .summary-section {
  background: #FBF8F2 !important;
  border-left: 2px solid var(--ds-accent) !important;
  border-radius: 0 !important;
}
html[data-theme="editorial"] .summary-section .content {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .selection-group {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .checkbox-item {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  transition: background 0.15s var(--ds-ease), border-color 0.15s var(--ds-ease);
}
html[data-theme="editorial"] .checkbox-item:hover {
  background: var(--ds-accent-soft) !important;
  border-color: var(--ds-ink) !important;
}
html[data-theme="editorial"] .checkbox-item input[type="checkbox"]:checked + label,
html[data-theme="editorial"] .checkbox-item.selected {
  background: var(--ds-accent-soft) !important;
  border-color: var(--ds-ink) !important;
}

/* ─── Workflow Stage 4: review + push summary ────────────────────────────── */
html[data-theme="editorial"] .push-summary {
  background: #FBF8F2 !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .summary-stat {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .summary-stat .stat-value,
html[data-theme="editorial"] .summary-stat [data-stat-value] {
  font-family: var(--ds-font-serif) !important;
  font-weight: 300 !important;
  letter-spacing: -0.02em !important;
}
html[data-theme="editorial"] .summary-stat .stat-label {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  color: var(--ds-text-muted) !important;
}

/* ─── SOAP editor tabs ────────────────────────────────────────────────────── */
html[data-theme="editorial"] .soap-tabs-container {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .soap-tabs {
  background: #FBF8F2 !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] .soap-tab {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--ds-text-muted) !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
}
html[data-theme="editorial"] .soap-tab.active {
  background: var(--ds-surface) !important;
  color: var(--ds-ink) !important;
  border-bottom-color: var(--ds-ink) !important;
}

/* ─── Diagnosis & order items ─────────────────────────────────────────────── */
html[data-theme="editorial"] .diagnosis-box {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .diagnosis-header {
  background: #FBF8F2 !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] .diagnosis-header:hover {
  background: var(--ds-accent-soft) !important;
}
html[data-theme="editorial"] .order-item {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  transition: border-color 0.15s var(--ds-ease);
}
html[data-theme="editorial"] .order-item:hover {
  border-color: var(--ds-ink) !important;
}

/* ─── Vitals ─────────────────────────────────────────────────────────────── */
html[data-theme="editorial"] .vitals-section {
  background: rgba(212,184,150,0.12) !important;
  border: 1px solid var(--ds-clay) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .vital-item {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .vital-item .vital-value,
html[data-theme="editorial"] .vital-item [data-vital-value] {
  font-family: var(--ds-font-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
}
html[data-theme="editorial"] .no-vitals-banner {
  background: rgba(212,184,150,0.25) !important;
  border: 1px solid var(--ds-clay) !important;
  color: #6B4F24 !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .vitals-entry-form {
  background: #FBF8F2 !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}

/* ─── History dropdown (patient chart / encounter) ────────────────────────── */
html[data-theme="editorial"] .history-dropdown {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}
html[data-theme="editorial"] .dropdown-header {
  background: #FBF8F2 !important;
  border-bottom: 1px solid var(--ds-divider) !important;
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  color: var(--ds-text-secondary) !important;
}
html[data-theme="editorial"] .dropdown-header:hover {
  background: var(--ds-accent-soft) !important;
}
html[data-theme="editorial"] .history-item {
  border-bottom: 1px solid var(--ds-divider-soft) !important;
}
html[data-theme="editorial"] .history-item:hover {
  background: var(--ds-accent-soft) !important;
}

/* ─── Global shared surfaces (styles.css) ────────────────────────────────── */
html[data-theme="editorial"] .header {
  background: var(--ds-bg) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ds-divider) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
html[data-theme="editorial"] .main-content {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .patient-card {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
  transition: border-color 0.2s var(--ds-ease), transform 0.2s var(--ds-ease);
}
html[data-theme="editorial"] .patient-card:hover {
  border-color: var(--ds-ink) !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}
html[data-theme="editorial"] .encounter-badge {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-radius: var(--ds-radius-pill) !important;
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

/* Modal chrome */
html[data-theme="editorial"] .modal-content {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: 0 20px 60px rgba(11,18,32,0.18) !important;
}
html[data-theme="editorial"] .modal-header {
  background: var(--ds-bg) !important;
  border-bottom: 1px solid var(--ds-divider) !important;
  border-radius: 0 !important;
}
html[data-theme="editorial"] .patient-info {
  background: #FBF8F2 !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}

/* Alerts — semantic color preserved but de-saturated to editorial palette */
html[data-theme="editorial"] .alert {
  border-radius: var(--ds-radius-block) !important;
  border: 1px solid var(--ds-divider) !important;
  background: #FBF8F2 !important;
  color: var(--ds-text-primary) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .alert-info {
  border-left: 2px solid var(--ds-accent) !important;
  background: var(--ds-accent-soft) !important;
}
html[data-theme="editorial"] .alert-success {
  border-left: 2px solid var(--ds-clay) !important;
  background: rgba(212,184,150,0.15) !important;
  color: #6B4F24 !important;
}
html[data-theme="editorial"] .alert-error {
  border-left: 2px solid #B3261E !important;
  background: rgba(179,38,30,0.06) !important;
  color: #7A1A14 !important;
}
html[data-theme="editorial"] .alert-warning {
  border-left: 2px solid var(--ds-clay) !important;
  background: rgba(212,184,150,0.18) !important;
}

/* Assessment / SOAP display surfaces */
html[data-theme="editorial"] .assessment-text,
html[data-theme="editorial"] .soap-note-display,
html[data-theme="editorial"] .imaging-text {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  font-family: var(--ds-font-sans) !important;
  color: var(--ds-text-primary) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .extracted-details {
  background: #FBF8F2 !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
}

/* Tables — lab values, orders */
html[data-theme="editorial"] .lab-values-table {
  font-family: var(--ds-font-sans) !important;
  border-collapse: collapse !important;
}
html[data-theme="editorial"] .lab-values-table thead {
  background: #FBF8F2 !important;
}
html[data-theme="editorial"] .lab-values-table thead th {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  color: var(--ds-text-secondary) !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] .lab-values-table tbody td {
  border-bottom: 1px solid var(--ds-divider-soft) !important;
}
html[data-theme="editorial"] .abnormal-flag {
  background: rgba(179,38,30,0.1) !important;
  color: #7A1A14 !important;
  border: 1px solid rgba(179,38,30,0.3) !important;
  border-radius: var(--ds-radius-pill) !important;
  font-family: var(--ds-font-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

/* Review card, athena section, correction banner */
html[data-theme="editorial"] .review-note-card {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .athena-section {
  background: #FBF8F2 !important;
  border-left: 2px solid var(--ds-clay) !important;
  border-radius: 0 !important;
}
html[data-theme="editorial"] .correction-section {
  background: var(--ds-accent-soft) !important;
  border-left: 2px solid var(--ds-accent) !important;
  border-radius: 0 !important;
  color: var(--ds-text-primary) !important;
}

/* Notification toast */
html[data-theme="editorial"] .notification-toast {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-radius: var(--ds-radius-pill) !important;
  box-shadow: 0 10px 24px rgba(11,18,32,0.28) !important;
  font-family: var(--ds-font-sans) !important;
  font-size: 13px !important;
  letter-spacing: 0.01em !important;
}

/* ─── PWA chrome (pwa.css) ───────────────────────────────────────────────── */
html[data-theme="editorial"] .pwa-offline-toast {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-radius: var(--ds-radius-pill) !important;
  box-shadow: 0 10px 24px rgba(11,18,32,0.28) !important;
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
}
html[data-theme="editorial"] .pwa-update-banner {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--ds-divider) !important;
}
html[data-theme="editorial"] .pwa-install-sheet,
html[data-theme="editorial"] .pwa-ios-card {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: 0 20px 60px rgba(11,18,32,0.18) !important;
}
html[data-theme="editorial"] .pwa-ios-overlay {
  background: rgba(11,18,32,0.55) !important;
  backdrop-filter: blur(4px) !important;
}

/* ─── Login page specifics ───────────────────────────────────────────────── */
html[data-theme="editorial"] body:has(#loginForm),
html[data-theme="editorial"] body:has([data-login-page]) {
  background: var(--ds-bg) !important;
}
html[data-theme="editorial"] #loginForm,
html[data-theme="editorial"] [data-login-card] {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: 0 20px 60px rgba(11,18,32,0.12) !important;
  backdrop-filter: none !important;
}
/* Tailwind backdrop-blur card on login — strip the blur + tint */
html[data-theme="editorial"] .backdrop-blur-xl {
  backdrop-filter: none !important;
  background: var(--ds-surface) !important;
}
/* Login submit button signature */
html[data-theme="editorial"] #loginForm button[type="submit"],
html[data-theme="editorial"] [data-login-submit] {
  background: var(--ds-ink) !important;
  color: var(--ds-bg) !important;
  border-radius: var(--ds-radius-pill) !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: var(--ds-font-sans) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
}

/* ─── Stage transitions + progress lines ─────────────────────────────────── */
html[data-theme="editorial"] .stage-connector,
html[data-theme="editorial"] .workflow-progress-line {
  background: var(--ds-divider) !important;
}
html[data-theme="editorial"] .stage-connector.completed,
html[data-theme="editorial"] .workflow-progress-line.completed {
  background: var(--ds-ink) !important;
}

/* ─── Loading / progress indicators ──────────────────────────────────────── */
html[data-theme="editorial"] .progress-bar,
html[data-theme="editorial"] [role="progressbar"] {
  background: var(--ds-divider) !important;
  border-radius: var(--ds-radius-pill) !important;
}
html[data-theme="editorial"] .progress-bar > *,
html[data-theme="editorial"] [role="progressbar"] > * {
  background: var(--ds-ink) !important;
}

/* ─── Dropdowns (search results, autocomplete) ───────────────────────────── */
html[data-theme="editorial"] .dropdown-results,
html[data-theme="editorial"] .autocomplete-list,
html[data-theme="editorial"] .search-results {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: 0 10px 24px rgba(11,18,32,0.12) !important;
}
html[data-theme="editorial"] .dropdown-results li:hover,
html[data-theme="editorial"] .autocomplete-list li:hover,
html[data-theme="editorial"] .search-results li:hover {
  background: var(--ds-accent-soft) !important;
}

/* ─── Links (generic inline anchors) ─────────────────────────────────────── */
html[data-theme="editorial"] a:not([class]) {
  color: var(--ds-ink);
  text-decoration: underline;
  text-decoration-color: var(--ds-divider);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s var(--ds-ease);
}
html[data-theme="editorial"] a:not([class]):hover {
  text-decoration-color: var(--ds-ink);
}

/* ─── Charts / analytics canvas frames (api-analytics.html) ──────────────── */
html[data-theme="editorial"] .chart-container,
html[data-theme="editorial"] [data-chart-container] {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .metric-card {
  background: var(--ds-surface) !important;
  border: 1px solid var(--ds-divider) !important;
  border-radius: var(--ds-radius-block) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .metric-card .metric-value {
  font-family: var(--ds-font-serif) !important;
  font-weight: 300 !important;
  letter-spacing: -0.02em !important;
  font-feature-settings: 'lnum' !important;
}
html[data-theme="editorial"] .metric-card .metric-label {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 10px !important;
  color: var(--ds-text-muted) !important;
}

/* ─── Settings page form styling tweaks ──────────────────────────────────── */
html[data-theme="editorial"] .settings-section h3 {
  font-family: var(--ds-font-serif) !important;
  font-weight: 300 !important;
  letter-spacing: -0.02em !important;
}
html[data-theme="editorial"] .settings-section .material-symbols-outlined {
  color: var(--ds-ink) !important;
}

/* ============================================================================
   Hover effect overrides — editorial palette
   ---------------------------------------------------------------------------
   The original theme uses blue shadows + lifts. Editorial uses ink borders,
   no shadows, cream tints, and minimal transforms.
   ============================================================================ */

/* ── Buttons — ink border glow, no colored shadows ─────────────────────────── */
html[data-theme="editorial"] .btn-primary:hover:not(:disabled),
html[data-theme="editorial"] .btn-success:hover:not(:disabled),
html[data-theme="editorial"] .btn-secondary:hover:not(:disabled) {
  box-shadow: none !important;
  transform: translateY(-1px);
}
html[data-theme="editorial"] .btn-primary:hover:not(:disabled) {
  background: rgba(11,18,32,0.85) !important;
}
html[data-theme="editorial"] .btn-icon:hover:not(:disabled) {
  background: rgba(11,18,32,0.85) !important;
  box-shadow: none !important;
}

/* ── Modal close — cream tint ──────────────────────────────────────────────── */
html[data-theme="editorial"] .modal-close:hover {
  background-color: #FBF8F2 !important;
  color: var(--ds-ink) !important;
}

/* ── Tabs — cream hover tint ───────────────────────────────────────────────── */
html[data-theme="editorial"] .tab:hover,
html[data-theme="editorial"] .main-tab:hover {
  background-color: rgba(11,18,32,0.04) !important;
}

/* ── Filter buttons — ink hover, no transform ──────────────────────────────── */
html[data-theme="editorial"] .filter-btn:hover {
  border-color: var(--ds-ink) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Cards & sections — ink border, no shadow ──────────────────────────────── */
html[data-theme="editorial"] .review-note-card:hover {
  border-color: var(--ds-ink) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}
html[data-theme="editorial"] .automation-section:hover {
  border-color: var(--ds-divider) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .provider-section:hover {
  box-shadow: none !important;
}

/* ── Date picker, correction textarea — ink border ─────────────────────────── */
html[data-theme="editorial"] .date-picker:hover,
html[data-theme="editorial"] .correction-textarea:hover {
  border-color: var(--ds-text-muted) !important;
}

/* ── Encounter badge, status badge — no scale ──────────────────────────────── */
html[data-theme="editorial"] .encounter-badge:hover {
  background: rgba(11,18,32,0.85) !important;
  transform: none !important;
}
html[data-theme="editorial"] .status-badge:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ── Lab table rows — cream tint ───────────────────────────────────────────── */
html[data-theme="editorial"] .lab-values-table tbody tr:hover {
  background-color: #FBF8F2 !important;
}

/* ── Toggle switch — ink glow ──────────────────────────────────────────────── */
html[data-theme="editorial"] .toggle-switch:hover:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(11,18,32,0.1) !important;
}

/* ── Appointment card — no shadow, ink border ──────────────────────────────── */
html[data-theme="editorial"] .appointment-card:hover {
  box-shadow: none !important;
}

/* ── Workflow modal: selections, summaries, vitals — ink palette ────────────── */
html[data-theme="editorial"] .selection-group:hover {
  border-color: var(--ds-divider) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .summary-section:hover {
  box-shadow: none !important;
  transform: translateY(-1px);
}
html[data-theme="editorial"] .summary-stat:hover {
  border-color: var(--ds-ink) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .vital-item:hover {
  box-shadow: none !important;
  border: 1px solid var(--ds-divider);
}
html[data-theme="editorial"] .vital-input input:hover {
  border-color: var(--ds-text-muted) !important;
}
html[data-theme="editorial"] .vital-input input:focus {
  border-color: var(--ds-ink) !important;
  box-shadow: 0 0 0 3px rgba(11,18,32,0.08) !important;
}
html[data-theme="editorial"] .transcript-box:hover {
  border-color: var(--ds-text-muted) !important;
}

/* ── Dropdown header — cream tint ──────────────────────────────────────────── */
html[data-theme="editorial"] .dropdown-header:hover {
  background: #FBF8F2 !important;
}

/* ── PA wizard — ink overrides ──────────────────────────────────────────────── */
html[data-theme="editorial"] .pa-questions-panel:hover {
  border-color: var(--ds-ink) !important;
  box-shadow: none !important;
}
html[data-theme="editorial"] .pa-pill:hover {
  box-shadow: none !important;
}
html[data-theme="editorial"] .pa-letter-body tbody tr:hover {
  background: rgba(11,18,32,0.04) !important;
}
