/* ==========================================================================
   Larney Coin — premium layer
   Loaded AFTER css/styles.css. Pure presentation: tokens, glass, depth,
   gold-dust hooks, crypto cues, and UX polish. No layout/logic changes.
   Sections:
     1. Tokens                 6. Buttons
     2. Ambient background     7. Forms & validation
     3. Glass surfaces         8. Tables, pills, hashes
     4. Header / sidebar       9. Page sections, hero, crypto cues
     5. Typography & numerals 10. Toasts/banners, empty states, footer
                              11. Gold dust canvas, reveal, a11y fallbacks
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* gold ramp */
  --lc-gold-50: #fff8e1;
  --lc-gold-100: #fbeebd;
  --lc-gold-200: #f6e2a8;
  --lc-gold-300: #f0d078;
  --lc-gold-400: #e4b445;
  --lc-gold-500: #c48a1a;
  --lc-gold-600: #8a5e12;
  /* dark ramp */
  --lc-ink-950: #060504;
  --lc-ink-900: #0b0906;
  --lc-ink-800: #12100c;
  --lc-ink-700: #1a1610;
  /* semantic */
  --lc-ok: #8fe3b0;
  --lc-warn: #f3c969;
  --lc-bad: #ffa898;
  --lc-info: #9cc9f5;

  /* glass: opaque-ish fallback first, translucent when backdrop-filter exists */
  --glass-fill: rgba(22, 18, 12, 0.94);
  --glass-fill-strong: rgba(18, 14, 9, 0.97);
  --glass-edge: rgba(240, 208, 120, 0.34);
  --glass-edge-soft: rgba(240, 208, 120, 0.18);
  --glass-hi: rgba(255, 240, 200, 0.16);
  --glass-blur: 0px;

  /* elevation */
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 14px -4px rgba(0, 0, 0, 0.45);
  --elev-2: 0 2px 4px rgba(0, 0, 0, 0.5), 0 14px 32px -8px rgba(0, 0, 0, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  --elev-3: 0 4px 8px rgba(0, 0, 0, 0.5), 0 24px 48px -10px rgba(0, 0, 0, 0.6), 0 50px 90px -40px rgba(0, 0, 0, 0.7);
  --glow-gold: 0 0 0 1px rgba(240, 208, 120, 0.35), 0 10px 40px -8px rgba(228, 180, 69, 0.3);

  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
  --radius-lg: 22px;
  --radius-md: 14px;

  --shadow: var(--elev-2); /* upgrades legacy token used by styles.css */
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass-fill: rgba(28, 22, 14, 0.52);
    --glass-fill-strong: rgba(20, 16, 10, 0.72);
    --glass-blur: 18px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-fill: rgba(22, 18, 12, 0.96);
    --glass-fill-strong: rgba(18, 14, 9, 0.98);
    --glass-blur: 0px;
  }
}

/* 2. Ambient background ---------------------------------------------------- */
body {
  background:
    radial-gradient(1000px 520px at 92% -8%, rgba(228, 180, 69, 0.16), transparent 58%),
    radial-gradient(760px 460px at -10% 6%, rgba(168, 104, 22, 0.14), transparent 55%),
    var(--lc-ink-950);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > .lc-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
/* faint hex grid, faded toward the edges */
.lc-ambient__hex {
  position: absolute;
  inset: 0;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23f0d078' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 98px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 80% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 70% at 80% 0%, #000 0%, transparent 70%);
}
.lc-ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.lc-ambient__orb--a {
  width: 46vmax; height: 46vmax;
  right: -14vmax; top: -22vmax;
  background: radial-gradient(circle, rgba(228, 180, 69, 0.32), transparent 65%);
  animation: lc-drift-a 38s ease-in-out infinite alternate;
}
.lc-ambient__orb--b {
  width: 38vmax; height: 38vmax;
  left: -12vmax; bottom: -18vmax;
  background: radial-gradient(circle, rgba(176, 104, 24, 0.28), transparent 65%);
  animation: lc-drift-b 46s ease-in-out infinite alternate;
}
.lc-ambient__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
@keyframes lc-drift-a { to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); } }
@keyframes lc-drift-b { to { transform: translate3d(7vmax, -4vmax, 0) scale(1.1); } }

/* grid children may shrink below nowrap table/pill content; tables scroll inside .table-scroll */
.stack > *, .wrap > section { min-width: 0; }
.table-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }

/* 3. Glass surfaces -------------------------------------------------------- */
.glass,
.gold-card,
.rate-panel,
.float-card,
.hero-points li,
.record-list li,
fieldset {
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}

.glass,
.gold-card {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 236, 190, 0.1) 0%, rgba(255, 236, 190, 0.02) 34%, rgba(0, 0, 0, 0.12) 100%),
    var(--glass-fill);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    var(--elev-2);
  transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s var(--ease);
}
/* luminous hairline along the top edge */
.gold-card::after,
.glass::after {
  content: "";
  position: absolute;
  left: 14%; right: 14%; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 200, 0.7), transparent);
  opacity: 0.55;
  pointer-events: none;
}
/* pointer spotlight (positions set by premium.js) */
.gold-card::before,
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 224, 150, 0.12), transparent 70%);
  transition: opacity 0.35s ease;
}
.gold-card:hover::before,
.gold-card:focus-within::before,
.glass:hover::before { opacity: 1; }
.gold-card:hover {
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(0, 0, 0, 0.35), var(--elev-3);
}
.gold-card.link-card { cursor: pointer; }
.gold-card.link-card:hover,
.gold-card.link-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(246, 226, 168, 0.7);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-3), var(--glow-gold);
}
.gold-card.link-card:active { transform: translateY(-1px); }
.gold-card.link-card h3::after {
  content: "→";
  display: inline-block;
  margin-left: 8px;
  color: var(--lc-gold-300);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}
.gold-card.link-card:hover h3::after,
.gold-card.link-card:focus-visible h3::after { opacity: 1; transform: none; }
.gold-card.flush { padding: 0; }
.result-card { transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s var(--ease); }
@media (min-width: 901px) {
  .result-card { position: sticky; top: 92px; }
}
.formula-card.is-active {
  border-color: rgba(246, 226, 168, 0.75);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2), var(--glow-gold);
}
.result-card.is-loss {
  border-color: rgba(255, 168, 152, 0.6);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2), 0 0 40px -10px rgba(255, 120, 100, 0.3);
}

.float-card {
  background: linear-gradient(155deg, rgba(255, 236, 190, 0.12), rgba(10, 8, 6, 0.4)), var(--glass-fill-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2);
  border-radius: 18px;
}
.hero-points li {
  background: linear-gradient(160deg, rgba(255, 236, 190, 0.08), rgba(0, 0, 0, 0.1)), var(--glass-fill);
  border-color: var(--glass-edge-soft);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-1);
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.hero-points li:hover { transform: translateY(-2px); border-color: var(--glass-edge); }
.rate-panel {
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2);
}
.record-list li { background: rgba(0, 0, 0, 0.22); }
fieldset {
  border-color: var(--glass-edge-soft);
  background: rgba(0, 0, 0, 0.14);
}

.risk-banner {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(228, 180, 69, 0.2), rgba(228, 180, 69, 0.04) 70%),
    var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2), 0 0 50px -20px rgba(228, 180, 69, 0.35);
}
.note {
  border-left-color: var(--lc-gold-400);
  background: linear-gradient(90deg, rgba(228, 180, 69, 0.12), rgba(228, 180, 69, 0.03));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.05);
}
.math {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.32));
  border-color: var(--glass-edge-soft);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
}

/* 4. Header / sidebar ------------------------------------------------------ */
.top-risk {
  background: linear-gradient(90deg, rgba(228, 180, 69, 0.14), rgba(22, 19, 12, 0.7) 40%, rgba(228, 180, 69, 0.14));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}
.site-header {
  background: linear-gradient(180deg, rgba(14, 11, 7, 0.78), rgba(10, 8, 5, 0.6));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(160%);
  backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(160%);
  border-bottom-color: var(--glass-edge-soft);
  box-shadow: 0 1px 0 rgba(255, 240, 200, 0.05), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(10, 8, 5, 0.96); }
}
html.lc-scrolled .site-header { box-shadow: 0 1px 0 rgba(255, 240, 200, 0.08), 0 18px 40px -16px rgba(0, 0, 0, 0.9); }
.brand { transition: transform 0.3s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand-mark { filter: drop-shadow(0 4px 10px rgba(228, 180, 69, 0.35)); transition: transform 0.6s var(--ease), filter 0.3s ease; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 6px 16px rgba(240, 208, 120, 0.55)); }
.header-chip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge-soft);
  background: rgba(0, 0, 0, 0.25);
  color: var(--lc-gold-100);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (min-width: 640px) { .header-chip { display: inline-flex; } }

.nav-toggle,
.sidebar-close {
  background: rgba(255, 236, 190, 0.04);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.nav-toggle:hover,
.sidebar-close:hover { border-color: var(--lc-gold-300); box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 24px -6px rgba(228, 180, 69, 0.4); }
.nav-toggle:active,
.sidebar-close:active { transform: scale(0.97); }

.site-sidebar {
  background:
    linear-gradient(180deg, rgba(228, 180, 69, 0.12), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 40%),
    rgba(14, 11, 7, 0.9);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(150%);
  backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(150%);
  border-right: 1px solid var(--glass-edge-soft);
  box-shadow: inset -1px 0 0 rgba(255, 240, 200, 0.04), 18px 0 50px -30px rgba(0, 0, 0, 0.9);
}
.side-link {
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.side-link:hover { transform: translateX(2px); }
html.sidebar-closed .side-link:hover { transform: none; }
.side-link:hover,
.side-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(228, 180, 69, 0.2), rgba(228, 180, 69, 0.05));
}
.side-link[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--lc-gold-400), 0 0 28px -12px rgba(228, 180, 69, 0.6);
}
.side-link[aria-current="page"] .side-svg { filter: drop-shadow(0 0 6px rgba(240, 208, 120, 0.55)); }
.side-link-gold,
.side-link-gold:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px -8px rgba(196, 138, 26, 0.5);
}
.side-btn { cursor: pointer; }
.side-btn:hover { color: var(--lc-gold-100); }
@media (max-width: 900px) {
  .site-sidebar { background: rgba(14, 11, 7, 0.96); }
  html.sidebar-open .sidebar-backdrop {
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

/* 5. Typography & numerals ------------------------------------------------- */
h1 { letter-spacing: -0.035em; }
.page-hero h1,
.hero h1 { text-shadow: 0 2px 30px rgba(228, 180, 69, 0.12); }
.eyebrow { color: var(--lc-gold-300); letter-spacing: 0.16em; }
.eyebrow .dot,
.dot { animation: lc-pulse 2.8s ease-in-out infinite; }
@keyframes lc-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--lc-gold-400), 0 0 0 0 rgba(228, 180, 69, 0.45); }
  50% { box-shadow: 0 0 12px var(--lc-gold-300), 0 0 0 6px rgba(228, 180, 69, 0); }
}
.lede { color: #f1e6d1; line-height: 1.7; }
.help, .fine-print { line-height: 1.55; }

/* monospace tabular numerals for money, rates & ledger values */
.num,
.stat-figure,
.result-figure,
.float-figure,
.level-pct,
.hero-points strong,
.rate-table td,
.rate-table tbody th,
.data-table td.num,
#result-total,
.badge {
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "zero" 1;
}
.stat-figure,
.result-figure,
.float-figure {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.045em;
}
.float-figure { font-size: 2.3rem; }
.level-pct { font-family: var(--display); }
.rate-table td,
.rate-table tbody th { font-family: var(--mono); font-size: 0.94rem; }
.rate-table tbody th { color: var(--lc-gold-200); font-weight: 500; }
.badge {
  font-family: var(--mono);
  background: rgba(228, 180, 69, 0.08);
  border-color: var(--glass-edge);
  letter-spacing: 0.06em;
}
.stat-label { color: var(--lc-gold-300); }
/* small gold coin before a label (add class "coin") */
.stat-label.coin::before {
  content: "";
  display: inline-block;
  width: 1.05em; height: 1.05em;
  margin-right: 8px;
  vertical-align: -0.16em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='3' y1='2' x2='21' y2='22' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23fff4cc'/%3E%3Cstop offset='.5' stop-color='%23f0c14b'/%3E%3Cstop offset='1' stop-color='%23a56b12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12' r='11' fill='url(%23g)'/%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%236b4710' stroke-opacity='.55'/%3E%3Cpath d='M9.2 8h5.6M12 8v8.4M9.6 11h4.8' stroke='%236b4710' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(240, 208, 120, 0.4));
}
/* gold shimmer sweep for balances / live figures (opt-in via .shimmer) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .shimmer {
    background: linear-gradient(100deg, var(--lc-gold-200) 0%, var(--lc-gold-200) 38%, #fffbe9 50%, var(--lc-gold-200) 62%, var(--lc-gold-200) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: lc-shimmer 7s ease-in-out infinite;
  }
  .result-card.is-loss .result-figure.shimmer { background: none; color: var(--danger); animation: none; }
}
@keyframes lc-shimmer {
  0%, 55% { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}
.result-figure,
.stat-figure,
.float-figure { color: var(--lc-gold-200); text-shadow: 0 0 28px rgba(228, 180, 69, 0.22); }
.result-figure.shimmer, .stat-figure.shimmer, .float-figure.shimmer { text-shadow: none; }

/* 6. Buttons --------------------------------------------------------------- */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.3s ease, background 0.25s ease, border-color 0.25s ease, color 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-gold {
  background: linear-gradient(180deg, #fbefbd 0%, #efc558 46%, #c48a1a 100%);
  border-color: rgba(255, 244, 204, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 0 rgba(120, 78, 10, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 10px 24px -6px rgba(196, 138, 26, 0.5);
}
.btn-gold::after {  /* diagonal sheen */
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn-gold:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 0 rgba(120, 78, 10, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 16px 34px -6px rgba(228, 180, 69, 0.6);
}
.btn-gold:hover::after { transform: translateX(120%); }
.btn-gold:active { transform: translateY(0) scale(0.985); filter: brightness(0.97); }
.btn-ghost {
  background: rgba(255, 236, 190, 0.04);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(228, 180, 69, 0.14);
  border-color: var(--lc-gold-300);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 26px -10px rgba(228, 180, 69, 0.5);
}
.btn-ghost:active { transform: translateY(0) scale(0.985); }
.btn:focus-visible,
.tab:focus-visible,
.preset:focus-visible,
.nav-toggle:focus-visible,
.side-link:focus-visible {
  outline: 2px solid var(--lc-gold-100);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(240, 208, 120, 0.22);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.4);
  box-shadow: none;
}
.btn.is-loading {
  color: transparent !important;
  text-shadow: none;
  pointer-events: none;
  cursor: progress;
}
.btn.is-loading::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(26, 18, 6, 0.25);
  border-top-color: var(--ink);
  animation: lc-spin 0.7s linear infinite;
}
.btn-ghost.is-loading::before { border-color: rgba(246, 226, 168, 0.25); border-top-color: var(--lc-gold-200); }
@keyframes lc-spin { to { transform: rotate(360deg); } }

.tab, .preset {
  background: rgba(255, 236, 190, 0.04);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: background 0.2s ease, transform 0.2s var(--ease), border-color 0.2s ease, box-shadow 0.2s ease;
}
.tab:hover, .preset:hover { background: rgba(228, 180, 69, 0.16); border-color: var(--lc-gold-300); transform: translateY(-1px); }
.preset[aria-pressed="true"],
.tab[aria-selected="true"] {
  background: linear-gradient(180deg, #fbefbd, #e4b445);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 20px -6px rgba(196, 138, 26, 0.55);
}
.tabs {
  display: inline-flex;
  padding: 5px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}
.tabs .tab { border-color: transparent; background: transparent; box-shadow: none; }
.tabs .tab:hover { border-color: transparent; }
.tabs .tab[aria-selected="true"] {
  border-color: transparent;
  background: linear-gradient(180deg, #fbefbd, #e4b445);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px -6px rgba(196, 138, 26, 0.6);
}
/* five+ link cards: flow instead of leaving an orphan row */
@media (min-width: 901px) {
  .grid-4:has(> :nth-child(5)) { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}

/* 7. Forms & validation ---------------------------------------------------- */
.field label,
.check { color: var(--lc-gold-100); letter-spacing: 0.01em; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.26));
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 240, 200, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
  font-variant-numeric: tabular-nums;
}
input[type="number"] { font-family: var(--mono); letter-spacing: -0.01em; }
input:hover, select:hover { border-color: var(--glass-edge); }
input:focus,
select:focus {
  outline: none;
  border-color: var(--lc-gold-300);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.32));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(240, 208, 120, 0.25), 0 0 24px -4px rgba(228, 180, 69, 0.35);
}
input:disabled, select:disabled { opacity: 0.5; cursor: not-allowed; }
input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(255, 168, 152, 0.85);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 120, 100, 0.16);
}
input[aria-invalid="true"]:focus { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 120, 100, 0.3); }
.field-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--lc-bad);
  animation: lc-fade-up 0.3s var(--ease);
}
.field-error:not(:empty)::before {
  content: "!";
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  display: grid; place-items: center;
  font: 800 0.72rem/1 var(--display);
  color: #3a0f08;
  background: var(--lc-bad);
}
input[type="checkbox"], input[type="radio"] { cursor: pointer; }
.check, .segment-opt { cursor: pointer; }
.segment { gap: 10px; }
.segment-opt {
  padding: 10px 14px;
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.segment-opt:hover { border-color: var(--glass-edge); background: rgba(228, 180, 69, 0.08); }
.segment-opt:has(input:checked) { border-color: var(--lc-gold-300); background: rgba(228, 180, 69, 0.14); }
.segment-opt:has(input:focus-visible) { outline: 2px solid var(--lc-gold-100); outline-offset: 2px; }
::placeholder { color: rgba(231, 220, 200, 0.55); }

/* password reveal (injected by premium.js) */
.input-wrap { position: relative; display: block; }
.input-wrap > input { padding-right: 52px; }
.input-reveal {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lc-gold-200);
  transition: background 0.2s ease;
}
.input-reveal:hover { background: rgba(228, 180, 69, 0.14); }
.input-reveal svg { width: 20px; height: 20px; }

/* 8. Tables, pills, hashes ------------------------------------------------- */
.table-scroll.gold-card.flush,
.table-scroll.gold-card.flush:hover { padding: 0; overflow-x: auto; transform: none; }
.rate-table, .data-table { font-size: 0.95rem; }
.rate-table thead th,
.data-table thead th {
  position: sticky; top: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--lc-gold-200);
  border-bottom: 1px solid var(--glass-edge);
  white-space: nowrap;
}
.rate-table tbody tr,
.data-table tbody tr { transition: background 0.2s ease; }
.rate-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd) { background: rgba(228, 180, 69, 0.035); }
.rate-table tbody tr:hover,
.data-table tbody tr:hover { background: rgba(228, 180, 69, 0.11); }
.rate-table tbody tr:last-child td,
.rate-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table th.num, .data-table td.num { text-align: right; font-family: var(--mono); }
.data-table td.num { white-space: nowrap; }
.rate-panel h3 {
  background: linear-gradient(90deg, #fbefbd, #e4b445 52%, #b8861f);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.rate-table caption,
.data-table caption { color: var(--cream-soft); font-size: 0.85rem; }

/* status pills + pips */
.pip {
  --pip: var(--lc-gold-400);
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pip);
  box-shadow: 0 0 8px var(--pip);
  flex: none;
}
.pip--live { animation: lc-pulse 2.4s ease-in-out infinite; --pip: var(--lc-ok); }
.pill {
  --pill: var(--lc-gold-300);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pill) 45%, transparent);
  background: color-mix(in srgb, var(--pill) 12%, transparent);
  color: var(--pill);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill .pip { --pip: var(--pill); width: 7px; height: 7px; }
.pill--confirmed { --pill: var(--lc-ok); }
.pill--pending { --pill: var(--lc-warn); }
.pill--pending .pip { animation: lc-pulse 1.8s ease-in-out infinite; }
.pill--rejected { --pill: var(--lc-bad); }
.pill--neutral { --pill: var(--lc-info); }
.pill--admin { --pill: var(--lc-gold-200); margin-left: 8px; }
.type-tag { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.type-tag svg { width: 16px; height: 16px; flex: none; color: var(--lc-gold-300); }

/* trade countdown (trade.php) */
.trade-count {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243, 201, 105, 0.4);
  background: rgba(243, 201, 105, 0.1);
  color: var(--lc-warn);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  white-space: nowrap;
}
.data-table td:has(> .trade-count) { white-space: nowrap; }

/* hashes, addresses, references */
.hash {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-edge-soft);
  background: rgba(0, 0, 0, 0.3);
  color: var(--lc-gold-200);
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hash--trunc { max-width: 15ch; }
.address {
  position: relative;
  padding: 14px 16px 14px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.32));
  border: 1px dashed var(--glass-edge);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  word-break: break-all;
}
.address::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--lc-gold-200), var(--lc-gold-500));
  box-shadow: 0 0 10px rgba(228, 180, 69, 0.6);
}
.demo-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
}
.demo-flag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lc-ok);
  box-shadow: 0 0 8px var(--lc-ok);
  animation: lc-pulse 2.4s ease-in-out infinite;
}

/* 9. Page sections, hero, crypto cues ------------------------------------- */
.page-hero { position: relative; padding: 40px 0 12px; }
.page-hero > .wrap { position: relative; }
/* faint chain-node cluster on the right of page heroes */
.page-hero > .wrap::after {
  content: "";
  position: absolute;
  right: -6px; top: -6px;
  width: 260px; height: 150px;
  pointer-events: none;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='150' viewBox='0 0 260 150' fill='none' stroke='%23f0d078' stroke-width='1'%3E%3Cpath stroke-opacity='.35' d='M20 110 70 70 130 96 190 40 244 72'/%3E%3Cpath stroke-opacity='.18' d='M70 70 100 20 190 40M130 96 150 140M190 40 230 8'/%3E%3Cg fill='%23080705'%3E%3Ccircle cx='20' cy='110' r='4' stroke-opacity='.6'/%3E%3Ccircle cx='70' cy='70' r='6' stroke-opacity='.8'/%3E%3Ccircle cx='130' cy='96' r='4' stroke-opacity='.6'/%3E%3Ccircle cx='190' cy='40' r='7' stroke-opacity='.9'/%3E%3Ccircle cx='244' cy='72' r='4' stroke-opacity='.6'/%3E%3Ccircle cx='100' cy='20' r='3' stroke-opacity='.4'/%3E%3Ccircle cx='150' cy='140' r='3' stroke-opacity='.4'/%3E%3Ccircle cx='230' cy='8' r='3' stroke-opacity='.4'/%3E%3C/g%3E%3Ccircle cx='190' cy='40' r='2.2' fill='%23f6e2a8' stroke='none'/%3E%3Ccircle cx='70' cy='70' r='1.8' fill='%23f6e2a8' stroke='none'/%3E%3C/svg%3E") no-repeat right top / contain;
}
@media (max-width: 760px) { .page-hero > .wrap::after { display: none; } }

/* section heads: eyebrow + trailing ledger rule with a node */
.section-head .eyebrow { margin-bottom: 12px; font-family: var(--mono); font-weight: 500; }
.section-head .eyebrow::after {
  content: "";
  flex: 0 1 140px;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-edge), transparent);
  position: relative;
}
.section-head h2 { margin-bottom: 12px; }
.section-head h2::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--lc-gold-300), transparent);
}
.section { padding: 40px 0; }
.section.tight { padding-top: 14px; }

/* step markers become hexagonal "blocks" */
.step-no {
  border-radius: 0;
  width: 42px; height: 46px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, #fbefbd, #e4b445 55%, #a8700f);
  font-family: var(--mono);
  filter: drop-shadow(0 4px 10px rgba(228, 180, 69, 0.4));
}
.step { gap: 16px; }
@media (min-width: 901px) {
  /* chain link between steps */
  .steps.cols-3 > .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 38px; right: -17px; left: auto; bottom: auto;
    width: 18px; height: 2px;
    background: linear-gradient(90deg, var(--lc-gold-400), rgba(228, 180, 69, 0.2));
    box-shadow: 0 0 8px rgba(228, 180, 69, 0.5);
    opacity: 1;
    z-index: 2;
  }
}

/* hero */
.hero { padding: 30px 0 12px; }
.hero-art {
  border-radius: 30px;
  border-color: var(--glass-edge);
  background:
    radial-gradient(420px 280px at 70% 30%, rgba(240, 192, 80, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(30, 24, 14, 0.7), rgba(8, 7, 5, 0.85));
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-3), 0 0 70px -24px rgba(228, 180, 69, 0.45);
}
.hero-art::before {   /* ledger grid */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(240, 208, 120, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 208, 120, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.hero-art svg { position: relative; }
.float-card .eyebrow { font-family: var(--mono); font-weight: 500; }
.hero-points strong { font-family: var(--mono); font-weight: 500; font-size: 1.05rem; }
.grad-text { text-shadow: none; }

.cta-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 200px at 85% 50%, rgba(228, 180, 69, 0.24), transparent 62%),
    linear-gradient(180deg, rgba(28, 22, 12, 0.6), rgba(12, 9, 5, 0.8));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-block-color: var(--glass-edge-soft);
}
.cta-band::before {   /* hex lattice on the right */
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23f0d078' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 98px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.cta-inner { position: relative; }

/* 10. Banners, empty states, footer --------------------------------------- */
.banner-ok, .banner-error {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding: 16px 48px 16px 16px;
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2);
  animation: lc-toast-in 0.55s var(--ease) both;
}
.banner-ok > *, .banner-error > * { margin: 0; grid-column: 2; }
.banner-ok::before, .banner-error::before { grid-column: 1; grid-row: 1; }
.banner-ok {
  border-color: rgba(143, 227, 176, 0.5);
  background: linear-gradient(120deg, rgba(143, 227, 176, 0.16), rgba(228, 180, 69, 0.07)), var(--glass-fill);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2), 0 0 44px -18px rgba(143, 227, 176, 0.5);
}
.banner-error {
  border-color: rgba(255, 168, 152, 0.6);
  background: linear-gradient(120deg, rgba(255, 110, 90, 0.18), rgba(60, 14, 10, 0.4)), var(--glass-fill);
  color: #ffe8e2;
}
.banner-ok::before, .banner-error::before {
  content: "";
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
}
.banner-ok::before {
  background-color: var(--lc-ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2a17' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  box-shadow: 0 0 14px rgba(143, 227, 176, 0.6);
}
.banner-error::before {
  background-color: var(--lc-bad);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a0f08' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M12 5v9M12 19v.01'/%3E%3C/svg%3E");
}
.banner-ok h2, .banner-title { font-size: 1.15rem; }
.banner-ok > .banner-dismiss, .banner-error > .banner-dismiss { grid-column: auto; }
.banner-dismiss {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.banner-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.banner-dismiss svg { width: 16px; height: 16px; }
.banner-out { opacity: 0; transform: translateY(-6px) scale(0.98); transition: opacity 0.3s ease, transform 0.3s ease; }
@keyframes lc-toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes lc-fade-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  padding: 38px 20px;
  border: 1px dashed var(--glass-edge);
  border-radius: var(--radius-lg);
  background: radial-gradient(300px 120px at 50% 0%, rgba(228, 180, 69, 0.1), transparent 70%), var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.empty-state svg { width: 46px; height: 46px; color: var(--lc-gold-300); opacity: 0.85; margin-bottom: 4px; }
.empty-state strong { font-family: var(--display); font-size: 1.1rem; color: #fff6e4; }
.empty-state p { margin: 0; max-width: 52ch; color: var(--cream-soft); }

.site-footer {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 11, 7, 0.55), rgba(8, 6, 4, 0.9));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-top-color: var(--glass-edge-soft);
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lc-gold-300), transparent);
  opacity: 0.5;
}
.footer-grid a { color: var(--cream-soft); transition: color 0.2s ease, transform 0.2s var(--ease); display: inline-block; }
.footer-grid a:hover { color: var(--lc-gold-100); transform: translateX(3px); }
.footer-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: min(1120px, calc(100% - 32px)); margin: 14px auto 0; }
.footer-tools .risk-line { margin: 0; padding: 0; border: 0; width: auto; flex: 1 1 320px; }
.dust-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge-soft);
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.dust-toggle:hover { border-color: var(--lc-gold-300); color: var(--lc-gold-100); }
.dust-toggle[aria-pressed="true"] .pip { --pip: var(--lc-gold-300); }
.dust-toggle[aria-pressed="false"] .pip { --pip: #6b6254; box-shadow: none; }
.dust-toggle:focus-visible { outline: 2px solid var(--lc-gold-100); outline-offset: 3px; }
.dust-toggle[hidden] { display: none !important; }

/* 11. Gold dust canvas, reveal, a11y fallbacks ---------------------------- */
.gold-dust-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2147483000;
  pointer-events: none;
  contain: strict;
}
html.lc-js .reveal { opacity: 0; transform: translateY(18px); }
html.lc-js .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }

:focus-visible { outline-color: var(--lc-gold-100); }
a:focus-visible { border-radius: 4px; }
.skip:focus { box-shadow: var(--elev-2); }

@media (max-width: 640px) {
  .gold-card, .glass { padding: 18px; border-radius: 18px; }
  .site-header { --header: 66px; }
  .page-hero { padding-top: 26px; }
  .section { padding: 28px 0; }
  .tabs { display: flex; }
  .tabs .tab { flex: 1; }
  .data-table th, .data-table td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-ambient__orb, .dot, .pip, .shimmer { animation: none !important; }
  html.lc-js .reveal { opacity: 1; transform: none; }
  .btn-gold::after { display: none; }
}
@media (forced-colors: active) {
  .gold-card, .glass, .btn, input, select { border: 1px solid CanvasText; }
  .lc-ambient { display: none; }
}
@media print {
  .lc-ambient, .gold-dust-canvas, .dust-toggle { display: none !important; }
  html.lc-js .reveal { opacity: 1 !important; transform: none !important; }
}

/* 12. Minimal cards, responsive tables, nav groups, confirm modal ---------- */

/* Cards: calmer borders/shadows, no lift on hover (link cards lift slightly). */
.gold-card {
  padding: 18px 20px;
  border-radius: 16px;
  border-color: rgba(240, 208, 120, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px -14px rgba(0, 0, 0, 0.6);
}
.gold-card:hover {
  border-color: rgba(240, 208, 120, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 30px -14px rgba(0, 0, 0, 0.65);
}
.gold-card.link-card:hover,
.gold-card.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(246, 226, 168, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 14px 30px -14px rgba(0, 0, 0, 0.7);
}
.gold-card h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
.gold-card h3 { font-size: 1.05rem; }
.gold-card .help { margin-bottom: 0; }
h2.card-title, .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin: 0 0 12px;
}

.card-ico {
  --accent: var(--lc-gold-300);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card-ico svg { width: 16px; height: 16px; }

.stat-card { --accent: var(--lc-gold-400); display: grid; gap: 6px; align-content: start; }
.stat-card--ok { --accent: var(--lc-ok); }
.stat-card--warn { --accent: var(--lc-warn); }
.stat-card--info { --accent: var(--lc-info); }
.stat-card .card-ico { --accent: inherit; color: var(--accent); }
.stat-card::after {
  left: 20px; right: auto; width: 32px; height: 2px; top: -1px;
  background: var(--accent);
  opacity: 0.85;
  border-radius: 2px;
}
.stat-card .stat-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--cream-soft);
}
.stat-card .stat-figure,
.stat-card .level-pct { margin: 0; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; }
.stat-figure small {
  font-family: var(--sans);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cream-soft);
  -webkit-text-fill-color: currentColor;
}
.stat-card .help { font-size: 0.84rem; }

.action-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.action-card .card-ico { width: 36px; height: 36px; border-radius: 10px; }
.action-card .card-ico svg { width: 18px; height: 18px; }
.action-card h3 { margin: 0; font-size: 1rem; }
.action-card p { margin: 2px 0 0; font-size: 0.84rem; color: var(--cream-soft); }
.action-card h3::after { display: none !important; }
.grid-4.actions { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chips .badge { margin: 0; }

/* Deposit address panel */
.deposit-box {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.18);
}
.deposit-box > * { margin: 0; }
.deposit-box .stat-label { display: flex; align-items: center; gap: 10px; color: var(--cream-soft); }
.deposit-row { display: flex; gap: 10px; align-items: stretch; }
.deposit-row .address { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; font-size: 0.9rem; }
.deposit-row .btn { flex: none; align-self: stretch; }
.deposit-send { font-family: var(--mono); font-size: 0.92rem; color: var(--lc-gold-100); }
.deposit-send strong { color: var(--lc-gold-200); }
@media (max-width: 520px) {
  .deposit-row { flex-direction: column; }
}

/* Tables: one consistent responsive approach.
   - .data-table stacks into labelled cards on small screens (td[data-label]).
   - .rate-table is a numeric matrix, so it keeps scrolling inside .table-scroll. */
.table-scroll { overflow-x: auto; }
.data-table caption.vh { caption-side: top; }
@media (max-width: 640px) {
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; width: 100%; }
  .data-table thead {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .data-table tbody tr {
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-edge-soft);
  }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table tbody tr:nth-child(odd) { background: rgba(228, 180, 69, 0.035); }
  .data-table td,
  .data-table td.num {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    border: 0;
    text-align: right;
    white-space: normal;
  }
  .data-table td::before {
    content: attr(data-label);
    flex: none;
    max-width: 45%;
    color: var(--lc-gold-300);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
  }
  .data-table td:not([data-label])::before { content: none; }
  .data-table td .cell { min-width: 0; }
  .data-table td .form-actions { justify-content: flex-end; }
  .data-table td .form-actions .btn { width: auto; }
  .rate-table th, .rate-table td { padding: 8px; font-size: 0.86rem; }
}

/* Sidebar groups and user chip */
.side-group {
  margin: 12px 0 2px;
  padding: 0 12px;
  color: var(--lc-gold-300);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}
.sidebar-links > .side-group:first-child { margin-top: 0; }
.nav-auth { border-top: 1px solid var(--glass-edge-soft); }
.nav-user {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 2px 12px 4px;
  color: var(--cream-soft);
  font-size: 0.88rem;
}
.nav-user-name { font-weight: 700; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nav-user .pill--admin { margin-left: 0; }
@media (min-width: 901px) {
  html.sidebar-closed .side-group {
    height: 1px;
    margin: 10px 14px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    background: var(--glass-edge-soft);
  }
  html.sidebar-closed .nav-user { display: none; }
}

/* Confirm dialog */
dialog.lc-modal {
  width: min(420px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  color: var(--cream);
  background: linear-gradient(160deg, rgba(255, 236, 190, 0.08), rgba(0, 0, 0, 0.1)), var(--lc-ink-800);
  box-shadow: var(--elev-3);
}
dialog.lc-modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.lc-modal h2 { margin: 0 0 8px; font-size: 1.25rem; }
.lc-modal p { margin: 0; color: var(--cream-soft); overflow-wrap: anywhere; }
.lc-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn-danger {
  background: linear-gradient(180deg, rgba(255, 130, 110, 0.35), rgba(120, 30, 20, 0.55));
  border-color: rgba(255, 168, 152, 0.6);
  color: #ffe8e2;
}
.btn-danger:hover { color: #fff; }

@media (max-width: 640px) {
  .gold-card, .glass { padding: 16px; }
  .stat-card::after { left: 16px; }
}
