/* The Coin Shop — light/dark theme (html.dark) */
:root {
  --tcs-gold: #c9a227;
  --tcs-gold-soft: #e8d48b;
  --tcs-red: #690b0b;
  --tcs-blue: #0b3b95;
  --tcs-ease: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

html {
  transition: color-scheme 0.2s ease;
}

/* Smooth theme cross-fade (surfaces only — keep it snappy) */
html.tcs-theme-ready body,
html.tcs-theme-ready nav,
html.tcs-theme-ready footer,
html.tcs-theme-ready header,
html.tcs-theme-ready .bg-white,
html.tcs-theme-ready .bg-slate-50,
html.tcs-theme-ready .bg-slate-900,
html.tcs-theme-ready .rounded-3xl,
html.tcs-theme-ready .rounded-2xl,
html.tcs-theme-ready .tcs-theme-toggle {
  transition:
    background-color var(--tcs-ease),
    border-color var(--tcs-ease),
    color 0.2s ease,
    box-shadow var(--tcs-ease);
}

/* ========== Page shell ========== */
html.dark body.bg-slate-50,
html.dark body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(11, 59, 149, 0.18), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(105, 11, 11, 0.12), transparent 55%),
    #070b14 !important;
  color: #e2e8f0 !important;
  min-height: 100%;
}

/* ========== Surfaces ========== */
html.dark .bg-white {
  background-color: rgba(17, 24, 39, 0.92) !important;
  color: #e2e8f0;
}

html.dark .bg-slate-50 {
  background-color: rgba(15, 23, 42, 0.85) !important;
}

html.dark .bg-slate-100 {
  background-color: #1e293b !important;
}

html.dark .bg-slate-900 {
  background:
    linear-gradient(180deg, #0f172a 0%, #0a1020 100%) !important;
  color: #f8fafc !important;
}

html.dark .bg-black,
html.dark .hover\:bg-black:hover {
  background-color: #020617 !important;
}

html.dark .bg-amber-50 {
  background-color: rgba(201, 162, 39, 0.12) !important;
}

html.dark .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.1) !important;
}

html.dark .bg-red-50,
html.dark .hover\:bg-red-50:hover {
  background-color: rgba(105, 11, 11, 0.25) !important;
}

/* ========== Text ========== */
html.dark .text-slate-800,
html.dark .text-slate-900,
html.dark .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-600 {
  color: #94a3b8 !important;
}

html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-slate-400 {
  color: #64748b !important;
}

html.dark .text-slate-300 {
  color: #cbd5e1 !important;
}

html.dark .gold {
  color: #e8d48b !important;
  text-shadow: 0 0 24px rgba(201, 162, 39, 0.25);
}

html.dark .blue {
  color: #7eb6ff !important;
}

html.dark .text-\[\#0b3b95\] {
  color: #7eb6ff !important;
}

html.dark .text-\[\#690b0b\] {
  color: #f0a0a0 !important;
}

html.dark .text-\[\#C9A227\],
html.dark .hover\:text-\[\#C9A227\]:hover {
  color: #e8d48b !important;
}

html.dark .hover\:text-\[\#690b0b\]:hover {
  color: #f0a0a0 !important;
}

html.dark .text-emerald-600 {
  color: #34d399 !important;
}

html.dark .text-red-600 {
  color: #f87171 !important;
}

html.dark .text-white\/90 {
  color: rgba(248, 250, 252, 0.92) !important;
}

html.dark .text-white\/75,
html.dark .text-white\/70 {
  color: rgba(226, 232, 240, 0.78) !important;
}

/* ========== Borders ========== */
html.dark .border,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300 {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

html.dark .border-amber-200 {
  border-color: rgba(201, 162, 39, 0.35) !important;
}

html.dark .border-b,
html.dark .border-t {
  border-color: rgba(148, 163, 184, 0.14) !important;
}

html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html.dark .border-slate-100 {
  border-color: rgba(148, 163, 184, 0.14) !important;
}

/* ========== Nav / sticky glass ========== */
html.dark nav.bg-white,
html.dark nav.sticky {
  background: rgba(8, 12, 22, 0.82) !important;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html.dark nav a {
  color: #cbd5e1;
}

html.dark nav a:hover {
  color: #e8d48b !important;
}

/* Mobile drawer */
html.dark #mobile-drawer .bg-white,
html.dark #drawer-panel {
  background: linear-gradient(180deg, #0f172a 0%, #0a1020 100%) !important;
  color: #e2e8f0;
  border-right: 1px solid rgba(201, 162, 39, 0.15);
}

html.dark #mobile-drawer .hover\:bg-slate-100:hover {
  background-color: rgba(148, 163, 184, 0.12) !important;
}

/* ========== Cards / elevation ========== */
html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-2xl {
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.45) !important;
}

html.dark .rounded-3xl.bg-white,
html.dark .rounded-2xl.bg-white,
html.dark .rounded-3xl.shadow-sm,
html.dark .rounded-2xl.shadow-sm {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.1),
    0 16px 48px rgba(0, 0, 0, 0.4) !important;
}

/* Feature tiles */
html.dark .rounded-2xl.bg-slate-50 {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

/* How a Visit Works — numbered step badges */
.tcs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tcs-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(145deg, #124199 0%, #0b3b95 55%, #082a6b 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 3px rgba(11, 59, 149, 0.18),
    0 8px 20px rgba(11, 59, 149, 0.28);
}
.tcs-step-num span {
  display: block;
  transform: translateY(0.5px);
}
.tcs-step h4 {
  text-align: center;
  width: 100%;
}
.tcs-step p {
  text-align: center;
  max-width: 18rem;
}

html.dark .tcs-step-num {
  color: #0b1220;
  background: linear-gradient(145deg, #f0d878 0%, #c9a227 48%, #9a7b1a 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 3px rgba(201, 162, 39, 0.28),
    0 0 28px rgba(201, 162, 39, 0.22),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

/* Feature cards — icon + title spacing (works without Tailwind me-*) */
.tcs-feature-title {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.35;
}
.tcs-feature-icon {
  flex: 0 0 auto;
  width: 1.15em;
  margin-top: 0.12em;
  color: #0b3b95;
  text-align: center;
}
html.dark .tcs-feature-icon {
  color: #7eb6ff;
}

/* Notifications CTA — stay in touch (stock / specials / hours) */
.tcs-notify-link {
  color: #0b3b95 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tcs-notify-link:hover {
  color: #690b0b !important;
}
html.dark .tcs-notify-link {
  color: #e8c96a !important;
  text-shadow: 0 0 18px rgba(201, 162, 39, 0.25);
}
html.dark .tcs-notify-link:hover {
  color: #f0d878 !important;
}

.tcs-notify-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(11, 59, 149, 0.06), rgba(201, 162, 39, 0.1));
  border: 1px solid rgba(11, 59, 149, 0.14);
}
.tcs-notify-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.tcs-notify-card-title i {
  color: #0b3b95;
}
.tcs-notify-card-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
}
.tcs-notify-card .tcs-notify-link {
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 0.25rem;
}
.tcs-notify-card .tcs-notify-link:hover {
  text-decoration: underline;
}

html.dark .tcs-notify-card {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.12), rgba(30, 41, 59, 0.9));
  border-color: rgba(201, 162, 39, 0.28);
}
html.dark .tcs-notify-card-title {
  color: #f1f5f9;
}
html.dark .tcs-notify-card-title i {
  color: #e8c96a;
}
html.dark .tcs-notify-card-text {
  color: #94a3b8;
}

/* Compact inline strip (after charts, etc.) */
.tcs-notify-strip {
  margin-top: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(11, 59, 149, 0.06);
  border: 1px solid rgba(11, 59, 149, 0.12);
  text-align: center;
  font-size: 0.95rem;
  color: #334155;
}
html.dark .tcs-notify-strip {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.25);
  color: #cbd5e1;
}

/* ========== Hero — CDXList-style depth (navy gradient + pattern + orbs) ========== */
.tcs-hero,
header.tcs-hero.bg-slate-900 {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, #071525 0%, #0c2340 45%, #1a4d8c 100%) !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.tcs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(201, 162, 39, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(45, 108, 181, 0.28), transparent 55%);
}

.tcs-hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.tcs-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(2px);
  opacity: 0.55;
}

.tcs-hero-orb--gold {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  left: -8%;
  bottom: -30%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.35) 0%, rgba(201, 162, 39, 0.08) 45%, transparent 70%);
}

.tcs-hero-orb--blue {
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  right: -12%;
  top: -35%;
  background: radial-gradient(circle, rgba(45, 108, 181, 0.45) 0%, rgba(26, 77, 140, 0.12) 48%, transparent 72%);
}

.tcs-hero-orb--red {
  width: min(28vw, 280px);
  height: min(28vw, 280px);
  left: 42%;
  top: 55%;
  background: radial-gradient(circle, rgba(105, 11, 11, 0.28) 0%, transparent 70%);
  opacity: 0.4;
}

.tcs-hero-inner {
  position: relative;
  z-index: 1;
}

.tcs-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e8c96a;
  margin: 0 auto 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 201, 106, 0.28);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.12);
}

.tcs-hero-eyebrow i {
  font-size: 0.8rem;
  color: #e8c96a;
}

.tcs-hero-title {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}

.tcs-hero-sub {
  text-shadow: 0 0 28px rgba(201, 162, 39, 0.35);
}

.tcs-hero-lead {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}

.tcs-hero-ghost-btn {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Dark mode: amp the glow, deeper navy, soft drift animation */
html.dark .tcs-hero,
html.dark header.tcs-hero.bg-slate-900,
html.dark header.bg-slate-900:not(.tcs-hero) {
  background: linear-gradient(155deg, #050b14 0%, #0a1a30 42%, #123a6e 100%) !important;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .tcs-hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 18% 100%, rgba(201, 162, 39, 0.2), transparent 62%),
    radial-gradient(ellipse 70% 55% at 92% 12%, rgba(45, 108, 181, 0.35), transparent 58%),
    radial-gradient(ellipse 40% 40% at 50% 0%, rgba(232, 201, 106, 0.08), transparent 50%);
}

html.dark .tcs-hero-pattern {
  opacity: 0.06;
}

html.dark .tcs-hero-orb--gold {
  opacity: 0.75;
  animation: tcs-orb-drift 14s ease-in-out infinite alternate;
}

html.dark .tcs-hero-orb--blue {
  opacity: 0.7;
  animation: tcs-orb-drift 18s ease-in-out infinite alternate-reverse;
}

html.dark .tcs-hero-orb--red {
  opacity: 0.5;
  animation: tcs-orb-drift 22s ease-in-out infinite alternate;
}

html.dark .tcs-hero-eyebrow {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(232, 201, 106, 0.4);
  box-shadow: 0 0 32px rgba(201, 162, 39, 0.2);
  color: #f0d878;
}

html.dark .tcs-hero .gold-btn {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 32px rgba(201, 162, 39, 0.35);
}

html.dark .tcs-hero-ghost-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(232, 201, 106, 0.35) !important;
}

/* Non-home slate headers (About, Contact, etc.) — same vibe in dark */
html.dark header.bg-slate-900:not(.tcs-hero) {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #050b14 0%, #0a1a30 45%, #123a6e 100%) !important;
}

html.dark header.bg-slate-900:not(.tcs-hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 15% 100%, rgba(201, 162, 39, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 50% at 90% 15%, rgba(45, 108, 181, 0.28), transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

html.dark header.bg-slate-900:not(.tcs-hero) > * {
  position: relative;
  z-index: 1;
}

@keyframes tcs-orb-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(18px, -22px, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html.dark .tcs-hero-orb--gold,
  html.dark .tcs-hero-orb--blue,
  html.dark .tcs-hero-orb--red {
    animation: none;
  }
}

/* ========== Footer ========== */
html.dark footer.bg-slate-900 {
  background:
    linear-gradient(180deg, #0a1020 0%, #05080f 100%) !important;
  border-top: 1px solid rgba(201, 162, 39, 0.15);
}

/* ========== Buttons ========== */
html.dark .red-btn {
  box-shadow: 0 0 0 1px rgba(240, 160, 160, 0.15), 0 8px 24px rgba(105, 11, 11, 0.45);
}

html.dark .gold-btn {
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.25);
}

html.dark a.bg-slate-900,
html.dark button.bg-slate-900 {
  background: linear-gradient(180deg, #1e293b, #0f172a) !important;
  border: 1px solid rgba(201, 162, 39, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

html.dark a.bg-slate-900:hover,
html.dark button.bg-slate-900:hover,
html.dark .hover\:bg-black:hover {
  background: linear-gradient(180deg, #334155, #1e293b) !important;
  border-color: rgba(201, 162, 39, 0.4);
}

/* Outline borders that go light in dark */
html.dark .border-red-600 {
  border-color: #f87171 !important;
}

html.dark .text-red-600 {
  color: #fca5a5 !important;
}

/* details / FAQ */
html.dark details {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html.dark details[open],
html.dark details.open\:bg-slate-50[open],
html.dark .open\:bg-slate-50:is([open], .open) {
  background: rgba(30, 41, 59, 0.75) !important;
}

/* Forms / inputs if any */
html.dark input,
html.dark textarea,
html.dark select {
  background-color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #e2e8f0 !important;
}

/* Images slightly lift on dark */
html.dark img.rounded-3xl,
html.dark img.rounded-2xl,
html.dark figure img {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* Pre-footer white band */
html.dark .bg-white.border-t {
  background: rgba(10, 16, 32, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

/* Liberty modal shell + close bar */
html.dark #liberty-modal > div,
html.dark #liberty-modal .bg-white {
  background: #0f172a !important;
  border: 1px solid rgba(201, 162, 39, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65) !important;
  color: #e2e8f0;
}
html.dark #liberty-modal .border-t {
  border-color: rgba(148, 163, 184, 0.22) !important;
  background: #0b1220;
}
html.dark #liberty-modal .text-red-600 {
  color: #fca5a5 !important;
}
html.dark #liberty-modal .hover\:text-red-700:hover,
html.dark #liberty-modal button.text-red-600:hover {
  color: #fecaca !important;
}
html.dark #liberty-modal #chatbot-container {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}

/* Price accents on home */
html.dark .gold-price {
  color: #e8d48b !important;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.35);
}

html.dark .silver-price {
  color: #cbd5e1 !important;
  text-shadow: 0 0 24px rgba(148, 163, 184, 0.35);
}

/* ========== Theme toggle control ========== */
.tcs-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  color: #0f172a;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tcs-theme-toggle:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  border-color: rgba(201, 162, 39, 0.55);
}

.tcs-theme-toggle:focus-visible {
  outline: 2px solid var(--tcs-gold);
  outline-offset: 2px;
}

.tcs-theme-toggle .tcs-theme-icon {
  position: absolute;
  font-size: 1rem;
  line-height: 1;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tcs-theme-toggle .tcs-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.tcs-theme-toggle .tcs-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
  color: #e8d48b;
}

html.dark .tcs-theme-toggle {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-color: rgba(201, 162, 39, 0.45);
  color: #e8d48b;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.12),
    0 0 24px rgba(201, 162, 39, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

html.dark .tcs-theme-toggle .tcs-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

html.dark .tcs-theme-toggle .tcs-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  filter: drop-shadow(0 0 8px rgba(232, 212, 139, 0.65));
}

/* Floating fallback if nav not found */
.tcs-theme-toggle--float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

html.dark .tcs-theme-toggle--float {
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.25),
    0 0 32px rgba(201, 162, 39, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ========== Skip link (a11y) ========== */
.tcs-skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10000;
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: top 0.15s ease;
}
.tcs-skip-link:focus,
.tcs-skip-link:focus-visible {
  top: 0.75rem;
  outline: 2px solid var(--tcs-gold);
  outline-offset: 2px;
}
html.dark .tcs-skip-link {
  background: #e8d48b;
  color: #0f172a;
}

/* Desktop header page links — explicit gap so prebuilt tailwind.min.css
   (home) never collapses when a utility like gap-x-7 is missing */
nav .hidden.md\:flex.items-center.text-sm.font-medium,
nav .hidden.lg\:flex.items-center.text-sm.font-medium {
  column-gap: 1.5rem; /* same as gap-x-6; slightly tighter than original gap-x-8 */
}

/* Service area — same vertical rhythm as other home sections (py-12 only).
   Home prebuilt tailwind has py-12; do not add extra margin or it doubles the gap. */
#service-area.tcs-service-area,
section#service-area {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 3rem;    /* match .py-12 */
  padding-bottom: 3rem;
  display: block;
}

/* ========== Active nav / footer page indicator ========== */
nav a.tcs-nav-active,
#drawer-panel a.tcs-nav-active {
  color: #690b0b !important;
  font-weight: 700;
  position: relative;
}
nav .hidden.md\:flex a.tcs-nav-active::after,
nav .hidden.lg\:flex a.tcs-nav-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #c9a227, #690b0b);
}
footer a.tcs-nav-active {
  color: #e8d48b !important;
  font-weight: 600;
}
html.dark nav a.tcs-nav-active,
html.dark #drawer-panel a.tcs-nav-active {
  color: #e8d48b !important;
}
html.dark nav .hidden.md\:flex a.tcs-nav-active::after,
html.dark nav .hidden.lg\:flex a.tcs-nav-active::after {
  background: linear-gradient(90deg, #e8d48b, #c9a227);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.45);
}

/* Clearer keyboard focus on header/footer links */
nav a:focus-visible,
footer a:focus-visible,
#drawer-panel a:focus-visible {
  outline: 2px solid var(--tcs-gold);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

/* Liberty modal: respect dark surface when open */
html.dark #liberty-modal > div.bg-white {
  background-color: rgba(17, 24, 39, 0.98) !important;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
html.dark #liberty-modal .border-t {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

/* SpotPro board iframe — soft border in dark mode (any page) */
html.dark #iFrameDisplayBoard,
html.dark iframe.responsive-iframe {
  border-color: rgba(148, 163, 184, 0.22) !important;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html.tcs-theme-ready body,
  html.tcs-theme-ready body *,
  .tcs-theme-toggle,
  .tcs-theme-toggle .tcs-theme-icon {
    transition: none !important;
  }
}

/* Logo — keep natural aspect ratio (source is 300×112) */
nav a#logo-link img.tcs-logo,
nav a#logo-link img,
#drawer-panel a[href="/"] img.tcs-logo,
#drawer-panel a[href="/"] img,
nav img.tcs-logo {
  height: 3rem; /* h-12 */
  width: auto !important;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}
#drawer-panel a[href="/"] img.tcs-logo,
#drawer-panel a[href="/"] img {
  height: 2.5rem; /* h-10 */
}

/* Logo plate — same box size in light & dark so theme toggle does not shift nav.
   Transparent plate in light; white rounded backdrop only in dark. */
nav a#logo-link,
#drawer-panel a[href="/"] {
  display: inline-flex;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.3rem 0.55rem;
  line-height: 0;
  background: transparent;
  box-shadow: none;
}

html.dark nav a#logo-link,
html.dark #drawer-panel a[href="/"] {
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Fallback if logo link has no id / different href — reserve padding always */
nav img[alt="The Coin Shop"]:not(a#logo-link img),
#drawer-panel img[alt="The Coin Shop"]:not(a[href="/"] img) {
  border-radius: 0.65rem;
  padding: 0.35rem 0.5rem;
  background: transparent;
  box-shadow: none;
  box-sizing: content-box;
  height: 3rem;
  width: auto !important;
  object-fit: contain;
}

html.dark nav img[alt="The Coin Shop"]:not(a#logo-link img),
html.dark #drawer-panel img[alt="The Coin Shop"]:not(a[href="/"] img) {
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Sticky top bar on home if present */
html.dark .bg-slate-900.text-white {
  border-color: rgba(201, 162, 39, 0.1);
}

/* Hamburger / icon buttons in nav */
html.dark .text-slate-700 {
  color: #cbd5e1 !important;
}

html.dark .hover\:text-\[\#690b0b\]:hover {
  color: #e8d48b !important;
}

/* Soft blue-btn / gold-btn on dark pages */
html.dark .blue-btn {
  box-shadow: 0 0 0 1px rgba(126, 182, 255, 0.2), 0 8px 24px rgba(11, 59, 149, 0.35);
}

/* selection */
html.dark ::selection {
  background: rgba(201, 162, 39, 0.35);
  color: #fff;
}

/* Scrollbar (webkit) */
html.dark::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html.dark::-webkit-scrollbar-track {
  background: #0a0f1a;
}
html.dark::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9a227, #334155);
  border-radius: 8px;
}

/* ========== About Us story prose (inline styles override) ========== */
html.dark .tcs-story p {
  color: #cbd5e1 !important;
}
html.dark .tcs-story h3 {
  color: #f1f5f9 !important;
}
html.dark .tcs-story a {
  color: #7eb6ff !important;
}
html.dark .tcs-story strong {
  color: #f8fafc;
}

/* ========== Coin Care warning box ========== */
html.dark .warning-box {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.35) 0%, rgba(69, 10, 10, 0.45) 100%) !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
  border-left-color: #f87171 !important;
}
html.dark .warning-box h2,
html.dark .text-red-800 {
  color: #fecaca !important;
}
html.dark .text-red-700,
html.dark .text-red-700\/80 {
  color: #fca5a5 !important;
}
html.dark .bg-red-100 {
  background-color: rgba(127, 29, 29, 0.55) !important;
  color: #fecaca !important;
}

/* Amber callouts (mistakes box, dealer CTA, market notes) */
html.dark .bg-amber-50,
html.dark .bg-amber-100 {
  background-color: rgba(120, 53, 15, 0.28) !important;
}
html.dark .border-amber-200,
html.dark .border-amber-400 {
  border-color: rgba(251, 191, 36, 0.35) !important;
}
html.dark .text-amber-600,
html.dark .text-amber-800 {
  color: #fbbf24 !important;
}

/* Generic headings inside white cards that lack text-* utilities */
html.dark .bg-white h2,
html.dark .bg-white h3,
html.dark .bg-white h4,
html.dark .bg-white h5,
html.dark .rounded-3xl h2,
html.dark .rounded-3xl h3,
html.dark .rounded-3xl h4 {
  color: #f1f5f9;
}

/* Font-awesome icon blues already via .blue */

/* Google review cards injected on home */
html.dark .review-rotator-card {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
  color: #e2e8f0;
}

/* Chart host on home — ensure no white flash around embeds */
html.dark .spotpro-metal-chart-card {
  background: #0f172a !important;
}

/* Chart “move mouse over…” inspect bar (the div, not just text) */
html.dark .spotpro-metal-hover-inspect,
html.dark .spotpro-metal-chart-card .spotpro-metal-hover-inspect,
html.dark .spotpro-metal-chart--gold .spotpro-metal-hover-inspect,
html.dark .spotpro-metal-chart--silver .spotpro-metal-hover-inspect,
html.dark .spotpro-metal-chart--platinum .spotpro-metal-hover-inspect,
html.dark .spotpro-metal-chart--palladium .spotpro-metal-hover-inspect {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px dashed rgba(148, 163, 184, 0.45) !important;
  color: #e2e8f0 !important;
}

html.dark .spotpro-metal-hover-inspect.is-active,
html.dark .spotpro-metal-chart--gold .spotpro-metal-hover-inspect.is-active,
html.dark .spotpro-metal-chart--silver .spotpro-metal-hover-inspect.is-active,
html.dark .spotpro-metal-chart--platinum .spotpro-metal-hover-inspect.is-active,
html.dark .spotpro-metal-chart--palladium .spotpro-metal-hover-inspect.is-active {
  background: #243044 !important;
  background-color: #243044 !important;
  border: 1px solid rgba(148, 163, 184, 0.5) !important;
  color: #f1f5f9 !important;
}

html.dark .spotpro-metal-hover-hint,
html.dark .spotpro-metal-hover-date,
html.dark .spotpro-metal-hover-price {
  color: #e2e8f0 !important;
}
