﻿/* ===== SpotCalc Pro landing page ===== */

:root {
  --bg:        #0d0e0b;
  --panel:     #15160f;
  --panel-2:   #1b1c14;
  --line:      #2c2d22;
  --cream:     #f2efe6;
  --muted:     #a7a698;
  --gold:      #dcb45a;
  --gold-soft: #3a3220;
  --up:        #7fc08a;
  --down:      #d98a7a;

  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout tokens */
  --maxw:      1400px;                        /* standard content (nav, hero, footer) */
  --maxw-wide: 1680px;                        /* grids & card sections */
  --pad-x:     clamp(1.25rem, 5vw, 3.5rem);  /* fluid horizontal padding, all sections */
  --section-y: clamp(3.5rem, 7vw, 6rem);     /* fluid vertical padding, main sections */
}

/* ===== Reset & base ===== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

.gold { color: var(--gold); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f4d88c;
  outline-offset: 3px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .8em 1.4em;
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: var(--gold);
  color: #1a1505;
  box-shadow: 0 0 0 1px rgba(220,180,90,.25), 0 8px 24px rgba(220,180,90,.12);
}
.btn--gold:hover { background: #e6c270; }

.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn--lg { padding: 1em 1.8em; font-size: 1.05rem; }

.btn--install-ios {
  background: rgba(22,163,74,.12);
  color: #4ade80;
  justify-content: center;
  padding: .28em 1em;
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .06em;
  border-color: rgba(22,163,74,.5);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(22,163,74,.15), inset 0 0 8px rgba(22,163,74,.05);
}
.btn--install-ios:hover {
  background: rgba(22,163,74,.2);
  border-color: #4ade80;
  box-shadow: 0 0 16px rgba(74,222,128,.3), inset 0 0 10px rgba(22,163,74,.1);
  color: #86efac;
}

.btn--install-android {
  background: rgba(124,58,237,.12);
  color: #c084fc;
  justify-content: center;
  padding: .28em 1em;
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .06em;
  border-color: rgba(124,58,237,.5);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(124,58,237,.15), inset 0 0 8px rgba(124,58,237,.05);
}
.btn--install-android:hover {
  background: rgba(124,58,237,.2);
  border-color: #c084fc;
  box-shadow: 0 0 16px rgba(192,132,252,.3), inset 0 0 10px rgba(124,58,237,.1);
  color: #d8b4fe;
}

/* ===== Ticker ===== */

.ticker {
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: #0a0b08;
  font-family: var(--mono);
  font-size: .82rem;
}
.ticker__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .55rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ticker__quotes { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.quote { display: inline-flex; align-items: baseline; gap: .55rem; }
.quote__sym   { color: var(--muted); letter-spacing: .05em; }
.quote__price { color: var(--cream); }
.quote__chg.up   { color: var(--up); }
.quote__chg.down { color: var(--down); }

.ticker__src {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .04em;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px var(--up);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== Nav ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #0d0e0b;
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.nav__link {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  position: relative;
  transition: color .15s;
}
.nav__link:hover { color: var(--cream); }
.nav__link.is-active,
.light-page .nav__link.is-active {
  color: var(--gold);
}
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.5rem;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(226, 181, 80, .35);
}
.nav__cta { flex-shrink: 0; }
.mobile-menu {
  display: none;
  position: relative;
  flex-shrink: 0;
}
.mobile-menu__button {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(220, 180, 90, .38);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  cursor: pointer;
  list-style: none;
}
.mobile-menu__button::-webkit-details-marker { display: none; }
.mobile-menu__button span {
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: var(--cream);
}
.mobile-menu__panel {
  position: absolute;
  top: calc(100% + .75rem);
  right: 0;
  min-width: 13rem;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11120d;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
  display: grid;
  gap: .15rem;
}
.mobile-menu__panel a {
  color: var(--cream);
  padding: .72rem .85rem;
  border-radius: 6px;
  font-size: .92rem;
  font-weight: 650;
}
.mobile-menu__panel a:hover,
.mobile-menu__panel a:focus-visible {
  background: rgba(220, 180, 90, .12);
  color: #fff;
}
.mobile-menu__cta {
  background: linear-gradient(135deg, #f4d88c, var(--gold));
  color: #16120a !important;
  text-align: center;
}

/* ===== Widget bridge ===== */

.widget-spacer {
  background: #ffffff;
  height: clamp(8rem, 16vw, 14rem);
}

.widget-bridge {
  background: #ffffff;
  text-align: center;
  padding: 3rem var(--pad-x) 4.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: #7a7570;
}

.calculator-seo {
  background: #ffffff;
  color: #1a1a1a;
  text-align: center;
  padding: clamp(1.25rem, 3vw, 2rem) var(--pad-x) clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.calculator-seo__eyebrow {
  margin: 0 0 .35rem;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  color: #9a6e1a;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.calculator-seo h1 {
  margin: 0 auto .45rem;
  max-width: 28ch;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-align: center;
}
.calculator-seo__title {
  margin: 0 auto .85rem;
  color: #1f1a12;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
.calculator-seo p {
  max-width: 58ch;
  margin: 0 auto;
  color: #5f5a52;
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}
.calculator-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .4rem;
}
.calculator-steps span {
  border: 1px solid #d2bc82;
  border-radius: 5px;
  background: #fffaf0;
  color: #2f2a22;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .015em;
  padding: .46rem .72rem;
}
.calculator-seo__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .9rem;
}
.calculator-seo__link-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
  width: min(100%, 380px);
}
.calculator-seo__links a {
  border: 1px solid #c4a45a;
  border-radius: 5px;
  color: #60430f;
  background: #fffaf0;
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 700;
  padding: .5rem .78rem;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.calculator-seo__links a:hover {
  background: #f5edd8;
  border-color: #c4a45a;
}
.calculator-seo__links .calculator-seo__primary-link {
  width: min(100%, 380px);
  justify-content: center;
  background: var(--gold);
  border-color: var(--gold);
  color: #211803;
  font-size: .92rem;
  padding: .68rem .9rem;
  box-shadow: 0 8px 22px rgba(220,180,90,.18);
}
.calculator-seo__links .calculator-seo__primary-link:hover {
  background: #e6c270;
  border-color: #e6c270;
}
.calculator-seo__link-row a {
  flex: 1 1 0;
  background: linear-gradient(180deg, #ffffff 0%, #eef1f3 100%);
  border-color: #b8c0c7;
  color: #35414a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  white-space: nowrap;
}
.calculator-seo__link-row a:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e4e9ed 100%);
  border-color: #9ea9b2;
  color: #1f2a32;
}

.estimate-disclaimer,
.legal-note {
  max-width: 72ch;
  margin: 1rem auto 0;
  color: #6f675c;
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}
.disclaimer-band {
  background: #ffffff;
  padding: 0 var(--pad-x) 1.5rem;
}
.disclaimer-band .estimate-disclaimer {
  margin-top: 0;
  padding-top: 1rem;
}
.calculator-seo .legal-note {
  margin-top: 1.75rem;
}
.estimate-disclaimer a,
.legal-note a {
  color: #8c6a22;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .15em;
}
.calculator-embed .estimate-disclaimer {
  margin-top: .9rem;
}
.light-page .guide__section .estimate-disclaimer,
.light-page .guide__section .legal-note {
  color: #6f675c;
}

/* ===== Market dashboard ===== */

.market-dashboard {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f6f1e7 100%);
  color: #1a1a1a;
  padding: clamp(2rem, 5vw, 4rem) var(--pad-x);
  border-top: 1px solid #eee6d4;
}
.dashboard-head,
.market-status-grid,
.ai-summary,
.quick-actions__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.dashboard-head h2,
.market-preview h2,
.trending h2,
.quick-actions h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .45rem 0 0;
}
.dashboard-head h2 {
  max-width: 17ch;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
}
.market-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}
.market-status,
.market-confidence {
  min-height: 145px;
  border: 1px solid #ded2b8;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.market-status__metal,
.ai-summary__label,
.trend-list span,
.intelligence-card span {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8c6a22;
}
.market-status strong,
.market-confidence strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.05;
}
.market-status__change {
  color: #70685a;
  font-size: .84rem;
}
.market-status--gold { border-top: 4px solid #dcb45a; }
.market-status--silver { border-top: 4px solid #b7bcc4; }
.market-status--platinum { border-top: 4px solid #8ea2b5; }
.market-confidence {
  background: #15160f;
  color: var(--cream);
  border-color: #2c2d22;
}
.market-confidence .market-status__change { color: var(--muted); }
.ai-summary {
  margin-top: 1rem;
  border: 1px solid #ded2b8;
  border-radius: 8px;
  background: #fffaf0;
  padding: 1.1rem 1.25rem;
}
.ai-summary p {
  margin: .4rem 0 0;
  color: #4d4639;
  max-width: 86ch;
}

.market-preview .section__head {
  margin-bottom: 1.25rem;
}
.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.intelligence-card {
  min-height: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: border-color .15s, transform .15s, background .15s;
}
.intelligence-card:hover {
  border-color: var(--gold);
  background: #1f2118;
  transform: translateY(-2px);
}
.intelligence-card strong {
  font-size: 1.08rem;
}
.intelligence-card p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}
.trending {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.trend-list {
  display: grid;
  gap: .75rem;
}
.trend-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1rem 1.1rem;
}
.trend-list strong {
  display: block;
  margin-top: .35rem;
  line-height: 1.3;
}
.quick-actions {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad-x);
}
.quick-actions h2 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 4vw, 3rem);
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.4rem;
}
.action-grid a {
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  background: rgba(220,180,90,.05);
  color: var(--cream);
  font-weight: 700;
  padding: .9rem 1rem;
  transition: background .15s, border-color .15s, color .15s;
}
.action-grid a:hover {
  background: rgba(220,180,90,.12);
  border-color: var(--gold);
  color: var(--gold);
}
.platform-hubs .section__head {
  margin-bottom: 1.25rem;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.hub-grid article {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.2rem;
}
.hub-grid span {
  font-family: var(--mono);
  color: var(--gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hub-grid h3 {
  margin: .7rem 0 .6rem;
  font-size: 1.05rem;
  line-height: 1.25;
}
.hub-grid p {
  color: var(--muted);
  font-size: .93rem;
  margin: 0;
}

/* ===== Hub pages ===== */

.hub-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad-x);
}
.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hub-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: .8rem 0 1rem;
}
.hub-hero p {
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}
.hub-hero__panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.1rem;
}
.hub-hero__panel strong {
  display: block;
  color: var(--gold);
  margin-bottom: .45rem;
}
.hub-hero__panel p {
  font-size: .94rem;
}
.hub-section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line);
}
.hub-section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .5rem 0 1.2rem;
}
.hub-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.hub-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.2rem;
}
.hub-card span {
  font-family: var(--mono);
  color: var(--gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hub-card h3 {
  margin: .7rem 0 .55rem;
  font-size: 1.05rem;
}
.hub-card p {
  color: var(--muted);
  font-size: .94rem;
  margin: 0;
}
.hub-card__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.hub-card__link::after {
  content: ">";
  font-family: var(--mono);
  transition: transform .15s;
}
.hub-card__link:hover::after {
  transform: translateX(3px);
}
.comparison-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.comparison-row {
  display: grid;
  grid-template-columns: 1.1fr .8fr .8fr .6fr .5fr;
  gap: 1rem;
  padding: .9rem 1rem;
  border-top: 1px solid var(--line);
  align-items: center;
}
.comparison-row:first-child {
  border-top: none;
  background: var(--panel-2);
  color: var(--gold);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.comparison-row:not(:first-child) {
  background: var(--panel);
  color: var(--cream);
}
.comparison-row span {
  color: var(--muted);
}
.page-nav {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.chart-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.chart-card__head span {
  font-family: var(--mono);
  color: var(--gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chart-card__head strong {
  color: var(--cream);
  font-size: .92rem;
}
.chart-card .tradingview-widget-container,
.chart-card .tradingview-widget-container__widget {
  flex: 1;
  min-height: 360px;
  width: 100%;
}

/* ===== Light theme pages ===== */

.light-page {
  background: #ffffff;
  color: #1a1a1a;
}
.light-page .nav {
  background: #0d0e0b;
  border-bottom-color: var(--line);
}
.light-page .brand,
.light-page .nav__link {
  color: var(--cream);
}
.light-page .brand > span:first-child {
  background: transparent !important;
  mix-blend-mode: normal !important;
  margin-left: 0 !important;
}
.light-page .brand > span:first-child img {
  filter: sepia(1) saturate(4.2) hue-rotate(355deg) brightness(.92) contrast(1.08) !important;
  opacity: .95;
  mix-blend-mode: normal;
}
.light-page .brand > span:first-child > span {
  display: none !important;
}
.light-page .nav__link:hover {
  color: var(--gold);
}
.light-page .btn--ghost {
  color: #1a1a1a;
  border-color: #d8c28a;
}
.light-page .hub-hero,
.light-page .hub-section,
.light-page .footer {
  border-color: #ded4c0;
}
.light-page .hub-hero p,
.light-page .hub-card p,
.light-page .hub-hero__panel p,
.light-page .guide__hero p,
.light-page .guide__section p,
.light-page .guide__section li,
.light-page .guide__glossary dd,
.light-page .footer__links a,
.light-page .footer__copy {
  color: #5f5a52;
}
.light-page .hub-hero__panel,
.light-page .hub-card,
.light-page .chart-card,
.light-page .guide__card,
.light-page .faq__item,
.light-page .comparison-row:not(:first-child) {
  background: #ffffff;
  border-color: #ded4c0;
  color: #1a1a1a;
}
.light-page .comparison-row:first-child {
  background: #eee5d3;
  border-color: #ded4c0;
}
.light-page .comparison-table,
.light-page .comparison-row,
.light-page .chart-card__head {
  border-color: #ded4c0;
}
.light-page .chart-card__head strong {
  color: #1a1a1a;
}
.light-page .market-dashboard {
  background: #ffffff;
}
.light-page .market-confidence {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #ded4c0;
}
.light-page .market-confidence .market-status__change,
.light-page .comparison-row span {
  color: #5f5a52;
}
.light-page .guide__back,
.light-page .footer__guide-btn {
  border-color: #ded4c0;
  color: #5f5a52;
}
.light-page .guide__back:hover,
.light-page .footer__guide-btn:hover {
  border-color: var(--gold);
  color: #8c6a22;
}
.light-page .powered-by {
  background: #ebe4d4;
  border-top-color: #ded4c0;
  border-image: none;
}
.light-page .powered-by::before {
  background: #ded4c0;
  box-shadow: none;
}
.light-page .powered-by__text {
  color: #5f5a52;
}
.light-page .powered-by__text strong,
.light-page .powered-by__arrow {
  color: #8c6a22;
  text-shadow: none;
}
.light-page .guide__formula {
  background: #fffaf0;
  border-color: #cbb982;
  color: #1a1a1a;
}
.light-page .formula__part--value {
  background: #dff3df;
  color: #16703a;
}
.light-page .formula__part--weight {
  background: #dbeafe;
  color: #1d5fa8;
}
.light-page .formula__part--purity {
  background: #f7e5b3;
  color: #7b5614;
}
.light-page .formula__part--spot {
  background: #eadcff;
  color: #6a35a8;
}
.light-page .formula__operator {
  color: #6b6254;
}

/* ===== Markets terminal page ===== */

.market-page {
  background:
    linear-gradient(90deg, rgba(127,192,138,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(217,138,122,.07) 1px, transparent 1px),
    #070907;
  background-size: 72px 72px, 72px 72px, auto;
  color: var(--cream);
}
.market-page::before,
.market-page::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 3px;
  z-index: 1;
  pointer-events: none;
  opacity: .7;
}
.market-page::before {
  left: 0;
  background: linear-gradient(180deg, transparent, var(--up), transparent, var(--down), transparent);
}
.market-page::after {
  right: 0;
  background: linear-gradient(180deg, transparent, var(--down), transparent, var(--up), transparent);
}
.market-page .ticker {
  border-bottom-color: #243024;
  box-shadow: inset 0 -1px 0 rgba(127,192,138,.12);
}
.market-tape {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #243024;
  background: #050705;
  color: var(--cream);
  font-family: var(--mono);
  font-size: .72rem;
  white-space: nowrap;
}
.market-tape::before,
.market-tape::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 2;
  pointer-events: none;
}
.market-tape::before {
  left: 0;
  background: linear-gradient(90deg, #050705, transparent);
}
.market-tape::after {
  right: 0;
  background: linear-gradient(270deg, #050705, transparent);
}
.market-tape__track {
  display: inline-flex;
  gap: 2rem;
  min-width: max-content;
  padding: .55rem 0;
  animation: tape-scroll 36s linear infinite;
}
.market-tape__track span {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
}
.market-tape__track strong {
  color: #c8c8bd;
  letter-spacing: .08em;
}
.market-tape em {
  font-style: normal;
  font-weight: 700;
}
.up { color: #38d978; }
.down { color: #ff6b5f; }
.flat { color: var(--gold); }
@keyframes tape-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.market-page .hub-page {
  padding-top: clamp(1.5rem, 4vw, 2.8rem);
}
.market-page .hub-hero {
  border-color: #243024;
}
.market-terminal-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr);
  align-items: center;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}
.market-terminal-hero h1 {
  max-width: 11ch;
  margin-bottom: .55rem;
  color: var(--cream);
}
.market-terminal-hero p {
  color: #abb6a6;
  font-family: var(--mono);
  font-size: .92rem;
}
.market-page .hub-hero__panel,
.market-page .hub-card,
.market-page .chart-card,
.market-page .market-status,
.market-page .market-confidence,
.market-page .signal-strip article {
  background: rgba(11,15,11,.92);
  border-color: #243024;
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 50px rgba(0,0,0,.2);
}
.market-page .hub-hero__panel p,
.market-page .hub-card p,
.market-page .market-status__change,
.market-page .market-confidence .market-status__change {
  color: #9aa596;
}
.market-page .hub-section {
  border-color: #243024;
}
.market-page .hub-section h2 {
  color: var(--cream);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}
.analysis-page .hub-hero h1 {
  max-width: 13ch;
}
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.analysis-card,
.analysis-note,
.analysis-table {
  border: 1px solid #243024;
  border-radius: 8px;
  background: rgba(11,15,11,.92);
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 50px rgba(0,0,0,.18);
}
.analysis-card {
  padding: 1rem;
}
.analysis-card span,
.analysis-note span {
  display: block;
  color: var(--gold);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.analysis-card strong {
  display: block;
  margin: .55rem 0 .35rem;
  font-size: clamp(1.4rem, 3vw, 2.35rem);
  line-height: 1;
}
.analysis-card p,
.analysis-note p,
.analysis-table p {
  color: #9aa596;
  margin: 0;
}
.analysis-note {
  padding: 1.2rem;
}
.analysis-note h3 {
  margin: .55rem 0 .55rem;
}
.analysis-list {
  display: grid;
  gap: .7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.analysis-list li {
  border-left: 3px solid rgba(220,180,90,.75);
  padding: .1rem 0 .1rem .85rem;
  color: #cfd5c9;
}
.analysis-table {
  overflow: hidden;
}
.analysis-row {
  display: grid;
  grid-template-columns: .8fr 1fr 1.4fr;
  gap: 1rem;
  padding: .95rem 1rem;
  border-bottom: 1px solid #243024;
}
.analysis-row:last-child {
  border-bottom: 0;
}
.analysis-row b {
  color: var(--cream);
}
.analysis-row span {
  color: var(--gold);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.heatmap-tile {
  min-height: 112px;
  border: 1px solid #243024;
  border-radius: 8px;
  padding: .85rem;
  background: #0b0f0b;
  color: var(--cream);
}
.heatmap-tile strong {
  display: block;
  margin-bottom: .35rem;
}
.heatmap-tile em {
  display: block;
  color: #cfd5c9;
  font-style: normal;
  font-family: var(--mono);
}
.heatmap-tile--up {
  background: linear-gradient(145deg, rgba(56,217,120,.22), rgba(11,15,11,.96));
  border-color: rgba(56,217,120,.38);
}
.heatmap-tile--down {
  background: linear-gradient(145deg, rgba(255,107,95,.22), rgba(11,15,11,.96));
  border-color: rgba(255,107,95,.38);
}
.heatmap-tile--flat {
  background: linear-gradient(145deg, rgba(220,180,90,.18), rgba(11,15,11,.96));
  border-color: rgba(220,180,90,.34);
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.scenario-card {
  border: 1px solid #243024;
  border-radius: 8px;
  padding: 1.2rem;
  background: rgba(11,15,11,.92);
}
.scenario-card h3 {
  margin: .2rem 0 .55rem;
  color: var(--cream);
}
.scenario-card .probability {
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
}
.scenario-card p {
  color: #9aa596;
}
.section-row-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.session-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid #243024;
  border-radius: 999px;
  background: rgba(127,192,138,.08);
  color: #a9d8ae;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  padding: .4rem .7rem;
  white-space: nowrap;
}
.market-page .market-status {
  min-height: 132px;
  position: relative;
  overflow: hidden;
}
.market-page .market-status::after,
.market-page .market-confidence::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 36px;
  opacity: .42;
  background: linear-gradient(135deg, transparent 10%, rgba(56,217,120,.35) 11%, transparent 13%, transparent 30%, rgba(56,217,120,.28) 31%, transparent 33%);
}
.market-page .market-status--platinum::after {
  background: linear-gradient(135deg, transparent 10%, rgba(255,107,95,.35) 11%, transparent 13%, transparent 30%, rgba(255,107,95,.28) 31%, transparent 33%);
}
.market-page .market-status--gold { border-top-color: #38d978; }
.market-page .market-status--silver { border-top-color: var(--gold); }
.market-page .market-status--platinum { border-top-color: #ff6b5f; }
.market-page .market-confidence { border-top: 4px solid #38d978; }
.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .9rem;
}
.signal-strip article {
  border: 1px solid #243024;
  border-radius: 8px;
  padding: .85rem;
}
.signal-strip span {
  display: block;
  color: #7f887b;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.signal-strip strong {
  display: block;
  margin-top: .3rem;
  font-size: 1.05rem;
}
.signal-strip small {
  display: block;
  color: #9aa596;
  margin-top: .25rem;
}
.market-page .chart-card {
  min-height: 460px;
}
.market-page .chart-card__head {
  background: #090d09;
  border-bottom-color: #243024;
}
.market-page .chart-card__head strong {
  color: var(--cream);
}

/* ===== Compact hub pages ===== */

.compact-hub .hub-page {
  padding-top: clamp(1.4rem, 4vw, 2.4rem);
}
.compact-hub .hub-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding-bottom: clamp(1.2rem, 3vw, 2rem);
}
.compact-hub .hub-hero h1 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  margin: .45rem 0 .55rem;
}
.compact-hub .hub-hero p {
  max-width: 44ch;
  font-size: .98rem;
}
.compact-hub .hub-hero__panel {
  padding: .9rem 1rem;
  background:
    linear-gradient(135deg, rgba(220,180,90,.1), rgba(255,255,255,.72)),
    #ffffff;
}
.compact-hub .hub-hero__panel strong {
  margin-bottom: .25rem;
}
.compact-hub .hub-hero__panel p {
  font-size: .86rem;
  line-height: 1.4;
}
.compact-hub .hub-section {
  padding-top: clamp(1.5rem, 4vw, 2.6rem);
}
.compact-hub .hub-card-grid {
  margin-top: .2rem;
}
.compact-hub .hub-card {
  min-height: 170px;
  position: relative;
  overflow: hidden;
}
.compact-hub .hub-card::after {
  content: '';
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(196,164,90,.22);
  border-radius: 50%;
}
.buyer-option-list {
  display: grid;
  gap: 1rem;
}
.buyer-option {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid #ded4c0;
  border-radius: 8px;
  background: #ffffff;
  padding: 1.2rem;
}
.buyer-option__num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.buyer-option h3 {
  margin: 0 0 .55rem;
  font-size: 1.2rem;
}
.buyer-option p {
  color: #5f5a52;
  margin: .55rem 0 0;
}
.buyer-option a {
  color: #7b5a18;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-page .hub-section > p {
  max-width: 76ch;
  color: #5f5a52;
}
.purity-table {
  border: 1px solid #ded4c0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.2rem;
  background: #fff;
}
.purity-table > div {
  display: grid;
  grid-template-columns: .8fr .8fr 1.4fr;
  gap: 1rem;
  padding: .85rem 1rem;
  border-top: 1px solid #ded4c0;
}
.purity-table > div:first-child {
  border-top: none;
  background: #eee5d3;
  color: var(--gold);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.purity-table span {
  color: #5f5a52;
}

/* ===== Hero ===== */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--pad-x) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: rgba(220,180,90,.05);
  border-radius: 999px;
  padding: .4rem .9rem;
  letter-spacing: .03em;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 1.4rem 0 1.2rem;
}
.hero__lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38ch;
  margin: 0 0 2rem;
}
/* Button + install hint grouped so they share the same width */
.hero__cta {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: .6rem;
  min-width: 290px; /* widens button on desktop; hint stretches to match */
}

.hero__cta > .btn--gold {
  justify-content: center;
}

.hero__install-hint {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.02);
  font-size: .72rem;
  line-height: 1.45;
}
.hint__label {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .08rem;
}
.hint__os { color: var(--muted); }
.hint__os strong { color: var(--cream); font-weight: 600; }

/* ===== App screenshot (framed) ===== */

.phone {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.phone__bar {
  font-family: var(--sans);
  font-size: .72rem;
  color: var(--muted);
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  letter-spacing: .03em;
}
.phone__shot {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== iPhone frame ===== */

.iphone {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}

/* Volume buttons  -  left side (mute + vol up + vol down) */
.iphone::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 112px;
  width: 4px;
  height: 28px;
  background: #a0a0a0;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 44px 0 #a0a0a0, 0 86px 0 #a0a0a0;
  z-index: 0;
}

/* Power button  -  right side */
.iphone::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 156px;
  width: 4px;
  height: 58px;
  background: #a0a0a0;
  border-radius: 0 2px 2px 0;
  z-index: 0;
}

.iphone__outer {
  position: relative;
  background: linear-gradient(150deg, #e4e4e4 0%, #b4b4b4 50%, #d2d2d2 100%);
  border-radius: 50px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(0,0,0,.12),
    0 50px 120px rgba(0,0,0,.72),
    0 10px 36px rgba(0,0,0,.45);
}

.iphone__screen {
  position: relative;
  background: #000;
  border-radius: 41px;
  overflow: hidden;
}

/* Dynamic Island pill */
.iphone__island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 17px;
  z-index: 2;
  pointer-events: none;
}

.iphone__viewport {
  display: block;
  height: 620px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-top: 52px;
  background: #fff;
}
.iphone__viewport::-webkit-scrollbar { display: none; }
.iphone__viewport img {
  display: block;
  width: 100%;
  height: auto;
}

/* Home indicator bar */
.iphone__home-bar {
  height: 28px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.iphone__home-bar::after {
  content: '';
  width: 120px;
  height: 5px;
  background: rgba(0,0,0,.18);
  border-radius: 3px;
}

/* Scrollable phone variant  -  fixed viewport, image scrolls inside */
.phone--scroll .phone__scroll-body {
  height: 520px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.phone--scroll .phone__scroll-body::-webkit-scrollbar { display: none; }

/* ===== Stats band  -  full-width edge-to-edge ===== */

.stats-band {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat { display: flex; flex-direction: column; gap: .35rem; }
.stat__n {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}
.stat__l { color: var(--muted); font-size: .9rem; }

/* ===== Sections ===== */

.section {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
}

.section__head h2, .invoicing h2, .cta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .8rem 0 0;
}
.section__head { margin-bottom: 3rem; max-width: 32ch; }

/* ===== Features grid ===== */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem;
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: var(--gold-soft); transform: translateY(-3px); }
.feature__num {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--gold);
}
.feature h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin: .9rem 0 .55rem;
}
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ===== Feature pair (precision section) ===== */

.feature-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}
.feature-pair:first-child { border-top: none; }
.feature-pair--reverse { direction: rtl; }
.feature-pair--reverse > * { direction: ltr; }

.feature-pair__copy h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: .8rem 0 0;
}
.feature-pair__lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1.2rem 0 1.6rem;
  max-width: 40ch;
}

/* ===== Purity card mock ===== */

.purity-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.purity-card__bar {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.purity-card__body { padding: .8rem 1.1rem; }

.purity-group { margin-bottom: .6rem; }
.purity-group__hd {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .5rem 0 .4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .3rem;
}
.purity-row {
  display: grid;
  grid-template-columns: 4.5rem 4.5rem 1fr auto;
  align-items: center;
  gap: .5rem;
  padding: .3rem 0;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--cream);
  border-bottom: 1px solid rgba(44,45,34,.4);
}
.purity-row:last-child { border-bottom: none; }
.purity-default { color: var(--muted); font-size: .76rem; }
.purity-input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .28rem .5rem;
  text-align: right;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--cream);
}
.purity-row--edited .purity-input { border-color: var(--gold); color: var(--gold); }
.purity-unit { color: var(--muted); font-size: .76rem; }

/* ===== Margin card mock ===== */

.margin-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.margin-card__bar {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.margin-card__body { padding: 1rem 1.2rem; }

.margin-block { margin-bottom: 1rem; }
.margin-block__hd {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .35rem;
}
.margin-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .4rem 0;
  font-family: var(--mono);
  font-size: .88rem;
  border-bottom: 1px solid rgba(44,45,34,.4);
}
.margin-line:last-child { border-bottom: none; }
.margin-label { color: var(--muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.margin-line--myval .margin-label { color: var(--cream); }
.margin-val { font-weight: 700; color: var(--cream); }
.margin-tag {
  font-size: .62rem;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 3px;
  padding: .1rem .35rem;
  letter-spacing: .03em;
}
.margin-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .7rem 0 .1rem;
  border-top: 1px solid var(--line);
  margin-top: .3rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
}
.margin-total .gold { font-size: 1.3rem; }

/* ===== Invoicing ===== */

.invoicing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.invoicing__lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1.2rem 0 1.6rem;
  max-width: 40ch;
}
.checks { list-style: none; margin: 0 0 1.8rem; padding: 0; }
.checks li {
  display: flex;
  gap: .7rem;
  padding: .55rem 0;
  color: var(--cream);
  font-size: .98rem;
}
.checks .arrow { color: var(--gold); font-family: var(--mono); flex-shrink: 0; }

.invoice-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.invoice-card__bar {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.invoice-card__body { padding: 1.2rem 1.3rem; }
.invoice-card__row,
.invoice-card__total {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  font-size: .95rem;
  font-family: var(--mono);
}
.invoice-card__row  { border-bottom: 1px solid rgba(44,45,34,.6); color: var(--cream); }
.invoice-card__total { margin-top: .6rem; font-size: 1.1rem; font-weight: 700; }
.invoice-card__total .gold { font-size: 1.4rem; }
.invoice-card__exports {
  display: flex;
  gap: .6rem;
  margin-top: 1.1rem;
}
.invoice-card__exports span {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  padding: .6rem .3rem;
}

/* ===== Final CTA  -  full-width band ===== */

.cta {
  width: 100%;
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) var(--pad-x);
  border-top: 1px solid var(--line);
}
.cta h2 { margin: 0 auto; max-width: 18ch; }
.cta p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 1.2rem auto 2.2rem;
  max-width: 42ch;
}

/* ===== FAQ ===== */

.faq {
  width: 100%;
  border-top: 1px solid var(--line);
  padding: var(--section-y) var(--pad-x);
}
.faq__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.faq h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .8rem 0 2rem;
  max-width: 18ch;
}
.faq__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.faq__item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}
.faq__item h3 {
  margin: 0 0 .65rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.25;
}
.faq__item p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

/* ===== Guide page ===== */

.guide {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--pad-x);
}
.guide__back {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding: .5rem .75rem;
  transition: border-color .15s, color .15s;
}
.guide__back:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.guide__hero {
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.guide__hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: .8rem 0 1rem;
}
.guide__hero p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 1.75rem;
}
.guide__section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line);
}
.guide__section h2,
.guide__cta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
}
.guide__section p,
.guide__section li,
.guide__glossary dd {
  color: var(--muted);
  font-size: 1rem;
}
.guide__formula {
  border: 1px solid var(--gold-soft);
  background: linear-gradient(135deg, rgba(220,180,90,.08), rgba(255,255,255,.025));
  font-family: var(--mono);
  font-size: clamp(.78rem, 1.8vw, .98rem);
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  line-height: 1.6;
}
.formula__part {
  border-radius: 999px;
  padding: .22rem .55rem;
  font-weight: 700;
  white-space: nowrap;
}
.formula__part--value {
  background: rgba(127,192,138,.12);
  color: #9ee6a8;
}
.formula__part--weight {
  background: rgba(96,165,250,.12);
  color: #93c5fd;
}
.formula__part--purity {
  background: rgba(220,180,90,.14);
  color: #f2cb70;
}
.formula__part--spot {
  background: rgba(192,132,252,.12);
  color: #d8b4fe;
}
.formula__operator {
  color: var(--muted);
  font-weight: 700;
}
.guide__steps {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}
.guide__steps li { padding: .25rem 0; }
.guide__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.guide__card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.guide__card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.guide__card h3 {
  margin: 1rem 1.2rem .55rem;
  font-size: 1rem;
}
.guide__card p {
  margin: 0;
  padding: 0 1.2rem 1.2rem;
  font-size: .94rem;
}
.guide__glossary {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: .75rem 1.25rem;
  margin: 0;
}
.guide__glossary dt {
  color: var(--cream);
  font-weight: 700;
}
.guide__glossary dd { margin: 0; }
.guide__related h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.guide__related p {
  max-width: 52ch;
}
.guide__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.2rem;
}
.guide__chips span {
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(220,180,90,.04);
  color: var(--gold);
  font-family: var(--mono);
  font-size: .72rem;
  padding: .32rem .58rem;
}
.guide__cta {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 0;
}
.guide__cta p {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 42ch;
}

/* ===== Footer  -  full-width with inner container ===== */

.footer {
  width: 100%;
  border-top: 1px solid var(--line);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .75rem 1rem; margin-left: auto; max-width: 880px; }
.footer__links a { color: var(--muted); font-size: .9rem; transition: color .15s, border-color .15s; }
.footer__links a:hover { color: var(--cream); }
.footer__guide-btn {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .45rem .7rem;
}
.footer__guide-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.footer__copy { color: var(--muted); font-family: var(--mono); font-size: .82rem; }

/* ===== Powered-by banner (page bottom, cyber theme) ===== */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .85rem 2rem;
  background: linear-gradient(135deg, #0b0d1a 0%, #0f1128 60%, #130d1f 100%);
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, #7c3aed 25%, #06b6d4 75%, transparent) 1;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background .2s;
}
.powered-by::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7c3aed 20%, #06b6d4 80%, transparent);
  box-shadow: 0 0 16px 2px rgba(124,58,237,.5), 0 0 40px 4px rgba(6,182,212,.25);
}
.powered-by__text {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: rgba(180,190,220,.7);
}
.powered-by__text strong {
  color: #06b6d4;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(6,182,212,.6);
}
.powered-by__arrow {
  font-size: .8rem;
  color: #7c3aed;
  text-shadow: 0 0 8px rgba(124,58,237,.8);
  transition: transform .2s, color .2s;
}
.powered-by:hover .powered-by__arrow {
  transform: translateX(4px);
  color: #06b6d4;
  text-shadow: 0 0 12px rgba(6,182,212,.9);
}
.powered-by:hover .powered-by__text strong {
  text-shadow: 0 0 16px rgba(6,182,212,.9);
}

/* ===== Responsive breakpoints ===== */

/* Desktop  -  tighten gaps and fix single-child section alignment */
@media (min-width: 769px) {
  .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .feature-pair { padding-top: 1.5rem; padding-bottom: 1.5rem; }

  /* My Value copy lost its right-column partner  -  collapse to single column */
  #precision .feature-pair { grid-template-columns: 1fr; }
  #precision .feature-pair__copy { max-width: 700px; }

  /* Invoicing lost its card partner  -  collapse to single column */
  .invoicing { grid-template-columns: 1fr; }
  .invoicing__copy { max-width: 700px; }

  /* Center both text-only blocks on the page */
  #precision .feature-pair__copy,
  .invoicing__copy {
    margin-inline: auto;
  }
}

/* Tablet landscape  -  tighten features */
@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .faq__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide__cards { grid-template-columns: 1fr; }
  .market-status-grid,
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-hero { grid-template-columns: 1fr; }
  .compact-hub .hub-hero { grid-template-columns: 1fr; }
  .hub-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-grid,
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heatmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .signal-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-nav .nav__link,
  .page-nav .nav__cta { display: none !important; }
  .mobile-menu { display: block; }
}

/* Tablet portrait  -  stack primary layouts */
@media (max-width: 768px) {
  .feature-pair { grid-template-columns: 1fr; }
  .iphone { max-width: 300px; }
  .iphone__viewport { height: 560px; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }
  .hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero__lede { margin-inline: auto; }
  /* Compress section and feature-pair vertical padding so stacked iPhones don't gap */
  .section { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .feature-pair { padding-top: .75rem; padding-bottom: .75rem; }
  .phone { max-width: 480px; }
  .invoicing { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
  .dashboard-head,
  .trending {
    grid-template-columns: 1fr;
    display: grid;
  }
  .dashboard-head { align-items: start; }

  /* On mobile, let the button be its natural width; hint auto-matches via flex stretch */
  .hero__cta { min-width: 0; }

  /* Hero copy: scale down at tablet */
  .badge       { font-size: .72rem; padding: .32rem .75rem; }
  .hero__title { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 1rem 0 .9rem; }
  .hero__lede  { font-size: 1rem; margin-bottom: 1.5rem; }
  .calculator-seo p { font-size: .8rem; }
}

/* Mobile  -  single column */
@media (max-width: 640px) {
  .hero__install-hint {
    font-size: .62rem;
    padding: .35rem .55rem;
    gap: .1rem;
  }
  .hint__label { font-size: .54rem; }

  .features  { grid-template-columns: 1fr; }
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .footer__links { margin-left: 0; flex-wrap: wrap; gap: 1rem 1.5rem; }

  /* Ticker: single row, tighter  -  hide LIVE source up to 640px so 3 quotes always fit */
  .ticker { font-size: .72rem; }
  .ticker__inner { padding: .4rem var(--pad-x); gap: .5rem; flex-wrap: nowrap; }
  .ticker__quotes { gap: .85rem; flex-wrap: nowrap; }
  .quote { gap: .3rem; white-space: nowrap; }
  .ticker__src { display: none; }
  .market-status-grid,
  .intelligence-grid,
  .action-grid,
  .hub-grid,
  .hub-card-grid,
  .analysis-grid,
  .scenario-grid,
  .heatmap-grid,
  .signal-strip { grid-template-columns: 1fr; }
  .analysis-row { grid-template-columns: 1fr; gap: .35rem; }
  .section-row-head {
    align-items: start;
    flex-direction: column;
  }
  .market-tape { font-size: .66rem; }
  .market-tape__track { gap: 1.2rem; animation-duration: 28s; }
  .market-status,
  .market-confidence,
  .intelligence-card,
  .hub-grid article { min-height: auto; }
  .comparison-row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
  /* Nav: compact at mobile (justify-content: space-between handles positioning) */
  .nav { padding-top: .75rem; padding-bottom: .75rem; }
  .brand { font-size: .95rem; }
  .mobile-menu__button {
    width: 2.5rem;
    height: 2.5rem;
  }
  .mobile-menu__panel {
    right: calc(var(--pad-x) * -1);
    min-width: min(17rem, calc(100vw - 2rem));
  }
  .faq__grid { grid-template-columns: 1fr; }
  .calculator-seo__links { flex-direction: column; align-items: stretch; }
  .calculator-seo__links a { text-align: center; }
  .guide__glossary { grid-template-columns: 1fr; gap: .25rem; }
  .guide__glossary dd { margin-bottom: .8rem; }

  /* Hero copy: further reduction at mobile */
  .badge       { font-size: .62rem; padding: .25rem .6rem; }
  .hero__title { font-size: clamp(1.6rem, 7.5vw, 2.2rem); margin: .75rem 0 .75rem; }
  .hero__lede  { font-size: .93rem; margin-bottom: 1.25rem; }
}

/* Small mobile */
@media (max-width: 430px) {
  .btn--lg { width: 100%; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

  /* Ticker: also hide % changes at smallest sizes so 3 prices stay on one line */
  .quote__chg  { display: none; }
  .ticker { font-size: .64rem; }
  .ticker__quotes { gap: .45rem; }
  .quote { gap: .22rem; }
}

/* Shared black footer across light and dark pages */
.footer {
  background: #0d0e0b;
  color: var(--cream);
}
.light-page .footer {
  background: #0d0e0b;
  border-top-color: var(--line);
}
.light-page .footer .brand,
.light-page .footer__links a {
  color: var(--cream);
}
.light-page .footer__copy {
  color: var(--muted);
}
.light-page .footer .brand > span:first-child {
  background: #000 !important;
  mix-blend-mode: screen !important;
  margin-left: -6px !important;
}
.light-page .footer .brand > span:first-child img {
  filter: invert(1) !important;
  opacity: 1;
}
.light-page .footer .brand > span:first-child > span {
  display: block !important;
}
.light-page .powered-by {
  background: linear-gradient(135deg, #0b0d1a 0%, #0f1128 60%, #130d1f 100%);
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, #7c3aed 25%, #06b6d4 75%, transparent) 1;
}
.light-page .powered-by::before {
  background: linear-gradient(90deg, transparent, #7c3aed 20%, #06b6d4 80%, transparent);
  box-shadow: 0 0 16px 2px rgba(124,58,237,.5), 0 0 40px 4px rgba(6,182,212,.25);
}
.light-page .powered-by__text {
  color: rgba(180,190,220,.7);
}
.light-page .powered-by__text strong {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6,182,212,.6);
}
.light-page .powered-by__arrow {
  color: #7c3aed;
  text-shadow: 0 0 8px rgba(124,58,237,.8);
}

/* ===== Programmatic calculator landing pages ===== */
.crumbs {
  max-width: 820px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 .35rem; opacity: .5; }
.light-page .crumbs { color: #8a8378; }

.calculator-embed {
  max-width: 820px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}
.calculator-embed #scrap-calculator { margin: 0 auto; }

.guide__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}
.guide__related-link {
  display: block;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .15s, color .15s, background .15s;
}
.guide__related-link:hover { border-color: var(--gold); color: var(--gold); }
.light-page .guide__related-link {
  background: #fff;
  border-color: #ded4c0;
  color: #1a1a1a;
}
.light-page .guide__related-link:hover { border-color: var(--gold); color: #9a6e1a; }

/* ===== Comparison guide tables ===== */
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cmp-table th, .cmp-table td {
  padding: .7rem .9rem;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.cmp-table thead th {
  border-top: none;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cmp-table tbody th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.light-page .cmp-table { border-color: #ded4c0; background: #fff; }
.light-page .cmp-table th, .light-page .cmp-table td { border-top-color: #ded4c0; }
.light-page .cmp-table thead th { background: #f6efe0; color: #9a6e1a; }
.light-page .cmp-table tbody th { color: #5f5a52; }
.light-page .cmp-table td { color: #1a1a1a; }
@media (max-width: 560px) {
  .cmp-table { font-size: .85rem; }
  .cmp-table th, .cmp-table td { padding: .55rem .55rem; }
}
