/* Minerals section (prospectortrails.com/minerals): same tokens as the homepage (home.css). Copied to www/minerals.css by build_story.py. */
:root {
  --bg: #05080a; --bg2: #0a1013; --panel: rgba(10, 16, 18, 0.74); --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.14);
  --text: #eef3f1; --muted: #9aa7a3; --faint: #75827e; --lime: #dcff3c; --teal: #5fe0c8;
  --head: "Inter Tight", Inter, system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 18px; --ease: cubic-bezier(.2, .7, .2, 1); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.025em; margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.btn { --h: 44px; display: inline-flex; align-items: center; gap: 8px; height: var(--h); padding: 0 20px; border-radius: 999px; background: var(--lime); color: #0b1200;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -6px rgba(220, 255, 60, .45); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--line2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .09); box-shadow: none; }
.btn.sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { --h: 52px; padding: 0 26px; font-size: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 600; font-size: 17px; }
.kick { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--lime)); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.kick a { text-decoration: none; color: var(--muted); }
.kick a:hover { color: var(--text); }
.kick span { color: var(--faint); }
.kick .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.grad { background: linear-gradient(92deg, #fff 0%, var(--lime) 45%, var(--teal) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: #c9d4d0; max-width: 580px; margin-top: 20px; line-height: 1.55; }
.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.note { font-size: 12.5px; color: var(--faint); margin-top: 14px; line-height: 1.5; }
.text-link { display: inline-flex; gap: 6px; margin-top: 16px; color: var(--c, var(--lime)); text-decoration: none; font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- globe stage (sticky behind the chapters) ---- */
.mstory { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: radial-gradient(60% 60% at 70% 50%, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%), var(--bg); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); touch-action: pan-y; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.ready .stage canvas, .stage.ready canvas { opacity: 1; }
.stage-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 8, 10, .78) 0%, rgba(5, 8, 10, .25) 40%, transparent 60%), linear-gradient(0deg, var(--bg) 0%, transparent 16%); }
.glabels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glabel { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; color: var(--muted); font-family: var(--mono); transition: opacity .3s;
  padding: 3px 8px; border-radius: 6px; background: rgba(5, 8, 10, .62); border: 1px solid var(--line); margin: -26px 0 0 8px; }
.glabel b { color: var(--text); font-weight: 500; font-family: Inter, sans-serif; margin-right: 4px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--c); }
.dots { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.dots li { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); transition: transform .3s, background .3s; }
.dots li.on { background: var(--c); transform: scale(1.6); }
.chapters { position: relative; margin-top: -100vh; margin-top: -100svh; z-index: 2; pointer-events: none; }
.chapter { min-height: 105vh; display: flex; align-items: center; padding: 96px 24px 64px; max-width: 1180px; margin: 0 auto; }
.chapter > * { pointer-events: auto; }
.chapter.hero { min-height: 100vh; min-height: 100svh; position: relative; }
.hero-copy { max-width: 640px; width: 100%; min-width: 0; }
.title { display: flex; align-items: center; gap: 20px; }
.elem { width: 88px; height: 88px; flex: none; border-radius: 16px; display: grid; place-items: center; position: relative;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 30%, transparent), rgba(255, 255, 255, .02)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 0 60px -10px var(--c), inset 0 1px 0 rgba(255, 255, 255, .15); }
.elem b { font-family: var(--head); font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -.045em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 30px; max-width: 620px; }
.kpi { border-left: 2px solid var(--c); padding: 4px 0 4px 12px; }
.kpi b { display: block; font-family: var(--head); font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.scroll-cue { position: absolute; left: 24px; bottom: 30px; width: 26px; height: 42px; border: 1.5px solid var(--line2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--c); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.card { width: min(440px, 100%); max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; border-radius: var(--r); padding: 26px 26px 22px; opacity: .35; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.card.wide { width: min(620px, 100%); }
.chapter.on .card { opacity: 1; transform: none; }
.step { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); margin-bottom: 10px; }
.card h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin-bottom: 12px; }
.card > p { color: #c9d4d0; font-size: 15.5px; }
.sub-s { font-size: 13.5px; color: var(--muted); }
.rank { margin-top: 18px; display: grid; gap: 7px; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 112px 1fr 52px; align-items: center; gap: 10px; font-size: 13.5px; }
.rank .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d4d0; }
.rank .bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--c); width: var(--w); min-width: 2px; transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
.chapter.on .rank .bar { transform: none; }
.rank b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin: 14px 0 4px; }
.seg button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; border-radius: 8px; padding: 6px 12px; cursor: pointer; line-height: 1.2; }
.seg button small { display: block; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.seg button[aria-selected="true"] { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); }
.yr { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.yr input { flex: 1; accent-color: var(--c); }
.yr b { font-family: var(--mono); font-size: 18px; min-width: 48px; text-align: right; }
.flows { margin-top: 14px; display: grid; gap: 8px; }
.flows li { display: grid; grid-template-columns: 1fr 70px 64px; align-items: center; gap: 10px; font-size: 13.5px; }
.flows li span { color: #c9d4d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flows li i { height: 6px; border-radius: 3px; background: var(--c); width: var(--w); min-width: 2px; opacity: .8; }
.flows li b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.lists { margin-top: 16px; display: grid; gap: 8px; }
.lists li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 8px; }
.lists li b { flex: none; min-width: 120px; font-weight: 600; }
.lists li span { color: var(--muted); font-size: 12.5px; }
.ops { margin-top: 6px; display: grid; gap: 2px; }
.ops li { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; }
.ops li b { display: block; font-weight: 600; }
.ops li span { color: var(--muted); font-size: 12.5px; }

.offt { margin-top: 16px; }
.offt h3 { font-size: 15px; margin-bottom: 6px; }
.offt li { border-top: 1px solid var(--line); padding: 7px 0; font-size: 13px; color: #c9d4d0; }
.offt li b { color: var(--text); }
.offt li span { display: block; color: var(--faint); font-size: 12px; }
.offt a { color: var(--muted); }

/* ---- charts ---- */
.chart { margin: 14px 0 0; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--line2); }
.chart .tick { fill: var(--faint); font: 11px var(--mono); }
.chart .headlbl, .chart .val { fill: var(--text); font: 500 12px var(--mono); }
.chart .cross { stroke: var(--line2); stroke-dasharray: 3 3; }
.chart .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: #0d1517; border: 1px solid var(--line2); padding: 4px 8px; border-radius: 6px;
  font: 12px var(--mono); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; }
.chart .tip.on { opacity: 1; }
.chart .tip b { color: var(--muted); font-weight: 400; margin-right: 6px; }
.chart .empty, .usetext { color: var(--muted); font-size: 14px; }
.donut { display: flex; gap: 20px; align-items: center; }
.donut svg { width: 128px; flex: none; }
.donut ul { display: grid; gap: 5px; font-size: 13px; flex: 1; }
.donut li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.donut li i { width: 10px; height: 10px; border-radius: 3px; }
.donut li span { color: #c9d4d0; text-transform: capitalize; }
.donut li b { font-weight: 500; font-variant-numeric: tabular-nums; }
.hb { display: grid; gap: 6px; }
.hb li { display: grid; grid-template-columns: 96px 1fr 70px; gap: 8px; align-items: center; font-size: 12.5px; }
.hb li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d4d0; }
.hb li i { height: 8px; width: var(--w); min-width: 2px; border-radius: 0 4px 4px 0; }
.hb li b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- the detail ---- */
.deep { position: relative; z-index: 3; background: var(--bg); padding: 100px 0 40px; border-top: 1px solid var(--line); }
.deep-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.prose h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 18px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p { color: #c9d4d0; margin-bottom: 12px; }
.watch { margin-top: 28px; padding: 18px 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 6%, transparent); }
.watch h3 { margin: 0 0 8px; font-size: 16px; }
.watch li { padding-left: 18px; position: relative; color: #c9d4d0; font-size: 14.5px; margin: 4px 0; }
.watch li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.usgs { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.usgs summary { cursor: pointer; color: var(--muted); font-size: 14.5px; }
.usgs h3 { font-size: 15px; }
.usgs p { font-size: 14px; color: var(--muted); }
.side { display: grid; gap: 14px; position: sticky; top: 90px; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--bg2); }
.panel h3 { font-size: 15px; margin-bottom: 4px; }
.panel .note { margin-top: 8px; font-size: 12px; }
.ctrl li { font-size: 13px; border-top: 1px solid var(--line); padding: 8px 0; }
.ctrl li span { display: block; color: var(--faint); font-size: 12px; }
.srcs li { font-size: 12.5px; padding: 4px 0; color: var(--muted); }
.srcs a { color: var(--muted); }
.pn { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--line); }
.pn a { text-decoration: none; }
.pn span { display: block; font-size: 12px; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.pn b { font-family: var(--head); font-size: 22px; font-weight: 600; }
.pn .next { text-align: right; }
.pn .all { color: var(--muted); font-size: 14px; }
.pn a:hover b { color: var(--c); }

/* ---- index ---- */
.ihero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.ihero .stage { position: absolute; inset: 0; height: auto; }
.ihero.ready .stage canvas { opacity: 1; }
.ihero-copy { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.ihero-copy > * { pointer-events: auto; max-width: 620px; }
.ihero h1 { font-size: clamp(44px, 7.2vw, 92px); line-height: .98; }
.now { margin-top: 30px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); font-family: var(--mono); min-height: 40px; }
.now .sw { width: 10px; height: 10px; border-radius: 50%; flex: none; background: conic-gradient(#c084fc, #ff8a4c, #fbbf24, #5fe0c8, #38bdf8, #c084fc); }
.now b { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact b { display: block; font-family: var(--head); font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; font-weight: 600; }
.fact span { color: var(--muted); font-size: 14px; }
.sec-head { max-width: 720px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; }
.sec-head .sub { color: var(--muted); margin-top: 14px; font-size: 17px; }
.catalogue { padding-top: 110px; }
.group { margin-bottom: 44px; }
.group header { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.group h3 { font-size: 20px; }
.group header p { color: var(--faint); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile { position: relative; display: grid; grid-template-rows: auto auto auto 1fr; padding: 14px 14px 0; height: 150px; border-radius: 14px; text-decoration: none; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 12%, transparent), rgba(255, 255, 255, .015) 60%); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 16px 40px -18px var(--c); }
.tile .sym { font-family: var(--head); font-size: 30px; font-weight: 600; letter-spacing: -.03em; color: var(--c); line-height: 1; }
.tile .nm { font-weight: 600; margin-top: 6px; }
.tile .top { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.tile .spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; }
.tile .sa { fill: var(--c); opacity: .14; }
.tile .sl { fill: none; stroke: var(--c); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .8; }
.conc { padding: 90px 24px 40px; }
.concchart { display: grid; gap: 3px; }
.cc-axis, .cc-row { display: grid; grid-template-columns: 150px 1fr 180px; gap: 14px; align-items: center; }
.cc-axis { font: 11px var(--mono); color: var(--faint); }
.cc-axis span:first-child { grid-column: 2; display: flex; justify-content: space-between; }
.cc-axis { grid-template-columns: 150px 1fr 180px; }
.cc-axis span { display: none; }
.cc-row { text-decoration: none; padding: 3px 6px; border-radius: 6px; font-size: 13.5px; }
.cc-row:hover { background: rgba(255, 255, 255, .04); }
.cc-n { color: #c9d4d0; }
.cc-t { position: relative; height: 18px; }
.cc-t::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line2); }
.cc-t::after { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: var(--line2); }
.cc-t i { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; background: rgba(255, 255, 255, .25); }
.cc-t b { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 2px solid var(--bg); }
.cc-c { color: var(--muted); font-size: 12.5px; }
.cc-c em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.cta { text-align: center; padding: 110px 24px; }
.cta h2 { font-size: clamp(32px, 4.4vw, 54px); }
.cta .sub { color: var(--muted); margin: 14px auto 0; max-width: 560px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; justify-content: center; }
.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); position: relative; z-index: 3; background: var(--bg); }
.foot-inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; justify-self: end; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot p { grid-column: 1 / -1; max-width: 900px; line-height: 1.6; color: var(--faint); }

@media (max-width: 900px) {
  .stage-shade { background: linear-gradient(0deg, rgba(5, 8, 10, .9) 0%, rgba(5, 8, 10, .2) 55%, transparent 75%); }
  .chapter { align-items: flex-end; padding: 80px 14px 28px; }
  .chapter.hero { align-items: flex-end; padding-bottom: 90px; }
  .card { width: 100%; padding: 18px; max-height: 58vh; }
  .card > p { font-size: 14.5px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .chapter { min-height: 120vh; }
  .dots { display: none; }
  .deep-grid { grid-template-columns: 1fr; gap: 36px; }
  .side { position: static; }
  .facts { grid-template-columns: 1fr; }
  .cc-axis, .cc-row { grid-template-columns: 96px 1fr 104px; gap: 8px; }
  .ihero { align-items: flex-end; padding-bottom: 60px; }
  .title { gap: 14px; }
  .elem { width: 64px; height: 64px; }
  .elem b { font-size: 28px; }
  .foot-inner { grid-template-columns: 1fr; }
  .foot nav { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .card { transition: none; opacity: 1; transform: none; }
  .chart .draw { animation: none; stroke-dashoffset: 0; }
}
/* Related minerals strip under a story, and the guides links on the index (build_story.py). */
.related { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 28px; font-size: 14px; }
.related span { color: var(--faint); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.related a { padding: 5px 12px; border: 1px solid var(--line2); border-radius: 999px; text-decoration: none; background: rgba(255, 255, 255, .03); }
.related a:hover { border-color: var(--c, var(--lime)); }
.guides { padding: 56px 24px 8px; }
.guides .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
