/* Layout: an oil-boom handbill printed over an old geological survey. The
   page is still a borehole: each section is the next formation down, from a
   dusty sky to the pay zone, sepia-toned and patterned the way survey maps
   and mud logs draw rock. Woodtype headlines, gold-leaf fittings, a wooden
   derrick. Day shift is sunbaked paper; night shift is lantern light. */
:root {
  --sky-top: #e2b468;
  --sky-low: #f4e3bf;
  --mesa: #b98a55;
  --star: transparent;
  --ink: #2b1a0e;
  --muted: #6a4e33;
  --paper: #f6ead0;
  --accent: #c8932c;
  --accent-hover: #ddaa3f;
  --on-accent: #2b1a0e;
  --gild-hi: #f1d27c;
  --gild: #cf9b34;
  --gild-lo: #8d5f19;
  --rust: #9b3a1c;
  --on-rust: #fbf0d8;
  --wood: #7a5230;
  --glint: rgba(255, 248, 222, 0.6); /* light on the gold coin, same in both shifts */
  --sun: #e0862a;
  --steel: #4a2e19;
  --hole: #1f140b;
  --pipe: #c9b48e;

  --soil: #4d3420;    --soil-mark: #6b4a2e;
  --redbed: #8e3d22;  --redbed-mark: #a8532f;
  --sand: #e8cf98;    --sand-mark: #c4a160;  --on-sand: #2b1a0e;
  --salt: #f1e7d1;    --salt-mark: #cdbb98;  --on-salt: #2b1a0e;
  --lime: #c9b28a;    --lime-mark: #a48c63;  --on-lime: #24160b;
  --shale: #5b4838;   --shale-mark: #6f5a48; --on-shale: #f3e6cb;
  --pay: #1c120a;     --pay-mark: #3a2816;   --on-pay: #f2e3c2;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.29 0 0 0 0 0.18 0 0 0 0 0.08 0 0 0 0.55 -0.14'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");

  --fg: var(--ink);

  --font-poster: 'Ultra', 'Rockwell Extra Bold', 'Arial Black', serif;
  --font-western: 'Rye', 'Rockwell', Georgia, serif;
  --font-slab: 'Alfa Slab One', 'Rockwell', Georgia, serif;
  --font-body: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-mono: 'Courier Prime', 'Courier New', ui-monospace, monospace;

  --lith-soil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14'%3E%3Ccircle cx='3' cy='4' r='1.3'/%3E%3Ccircle cx='12' cy='10' r='1.6'/%3E%3Ccircle cx='17' cy='3' r='1'/%3E%3C/svg%3E");
  --lith-redbed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10'%3E%3Cpath d='M0 3h18M24 3h16M6 8h22' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
  --lith-sand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='4.5' cy='4.5' r='1.8'/%3E%3Ccircle cx='13.5' cy='13.5' r='1.8'/%3E%3C/svg%3E");
  --lith-salt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M11 5v12M5 11h12' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  --lith-lime: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18'%3E%3Cpath d='M0 1h36M0 10h36M1 1v9M19 10v8' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  --lith-shale: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath d='M2 3h11M16 9h10' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
  --lith-pay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M7 3c2 3 3.5 4.6 3.5 6.3a3.5 3.5 0 0 1-7 0C3.5 7.6 5 6 7 3z'/%3E%3Ccircle cx='19' cy='19' r='2'/%3E%3C/svg%3E");
  --mesa-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='40' viewBox='0 0 640 40'%3E%3Cpath d='M0 40V31h36l10-14h84l8 14h52l6-6h40l6 6h70V21l12-11h120l10 11v10h60l8-8h46l8 8h64v9z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-top: #110b07;
    --sky-low: #2e1e12;
    --mesa: #3d2817;
    --star: rgba(255, 236, 190, 0.7);
    --ink: #f0e0bd;
    --muted: #c4aa85;
    --paper: #24180f;
    --accent: #d9a640;
    --accent-hover: #ebbd5a;
    --on-accent: #1a1009;
    --gild-hi: #f3d78a;
    --gild: #d4a23f;
    --gild-lo: #93661f;
    --rust: #b54a25;
    --on-rust: #fbf0d8;
    --wood: #9a7048;
    --sun: #efdca6;
    --steel: #c7ab80;
    --hole: #0a0604;
    --pipe: #8a7556;
    --soil: #2a1c11;    --soil-mark: #3f2a19;
    --redbed: #4d2112;  --redbed-mark: #66301b;
    --sand: #4c3b1b;    --sand-mark: #66512b;  --on-sand: #f5e6c6;
    --salt: #37312a;    --salt-mark: #4e463b;  --on-salt: #f2e6cf;
    --lime: #3c3424;    --lime-mark: #554a35;  --on-lime: #efe2c6;
    --shale: #1f1913;   --shale-mark: #2d241b; --on-shale: #eadcc0;
    --pay: #090604;     --pay-mark: #241809;   --on-pay: #f2e3c2;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0 0.65 0 0 0 0.3 -0.1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --sky-top: #110b07;
  --sky-low: #2e1e12;
  --mesa: #3d2817;
  --star: rgba(255, 236, 190, 0.7);
  --ink: #f0e0bd;
  --muted: #c4aa85;
  --paper: #24180f;
  --accent: #d9a640;
  --accent-hover: #ebbd5a;
  --on-accent: #1a1009;
  --gild-hi: #f3d78a;
  --gild: #d4a23f;
  --gild-lo: #93661f;
  --rust: #b54a25;
  --on-rust: #fbf0d8;
  --wood: #9a7048;
  --sun: #efdca6;
  --steel: #c7ab80;
  --hole: #0a0604;
  --pipe: #8a7556;
  --soil: #2a1c11;    --soil-mark: #3f2a19;
  --redbed: #4d2112;  --redbed-mark: #66301b;
  --sand: #4c3b1b;    --sand-mark: #66512b;  --on-sand: #f5e6c6;
  --salt: #37312a;    --salt-mark: #4e463b;  --on-salt: #f2e6cf;
  --lime: #3c3424;    --lime-mark: #554a35;  --on-lime: #efe2c6;
  --shale: #1f1913;   --shale-mark: #2d241b; --on-shale: #eadcc0;
  --pay: #090604;     --pay-mark: #241809;   --on-pay: #f2e3c2;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0 0.65 0 0 0 0.3 -0.1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

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

html { background: var(--sky-top); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--sky-top);
  background-image: var(--grain);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
h1, h2 { text-wrap: balance; }
img, canvas { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-slab);
}
.skip:focus { top: 12px; }

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

/* Survey-note labels: typewritten, with a ruled tail */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 120px;
  border-top: 1px solid currentColor;
  opacity: 0.6;
}

h2 {
  font-family: var(--font-western);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.5rem + 3.2vw, 4rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
/* Oxford rule under section titles: thick over thin, like a handbill */
h2::after {
  content: "";
  display: block;
  width: min(280px, 70%);
  height: 7px;
  margin-top: 16px;
  border-top: 3px solid currentColor;
  border-bottom: 1px solid currentColor;
}

h3 { font-family: var(--font-slab); font-weight: 400; font-size: 1.15rem; line-height: 1.3; letter-spacing: 0.01em; }

/* Buttons: brass plates with a rivet at each end ------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  font-family: var(--font-slab);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  color: var(--on-accent);
  background-color: var(--gild);
  background-image:
    radial-gradient(circle at 11px 50%, var(--gild-lo) 0 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 11px) 50%, var(--gild-lo) 0 2.5px, transparent 3px),
    linear-gradient(180deg, var(--gild-hi), var(--gild) 55%, var(--gild-lo));
  border: 2px solid var(--fg);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--fg);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, filter 120ms ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--fg); }
.btn-sm { min-height: 42px; padding: 0 22px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { filter: none; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
  background: transparent;
  color: var(--fg);
  border-style: dashed;
}

/* Header -------------------------------------------------------------- */

.site-head { position: relative; z-index: 2; }
.head-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-western);
  font-size: 1.75rem;
  line-height: 1;
}
.mark { width: 48px; height: 48px; flex: none; }

.nav { display: none; gap: 28px; margin-inline: auto; }
.nav a {
  font-family: var(--font-slab);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .head-actions { margin-left: 0; }
}

.shift {
  min-height: 42px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  border: 2px dashed var(--fg);
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 420px) {
  .head-row { gap: 12px; }
  .brand { font-size: 1.45rem; gap: 8px; }
  .mark { width: 36px; height: 36px; }
  .shift { padding: 0 10px; letter-spacing: 0.06em; }
  .head-actions .btn-sm { padding: 0 16px; }
}
.shift:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); }

/* Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  background:
    var(--grain),
    radial-gradient(1.2px 1.2px at 12% 18%, var(--star), transparent),
    radial-gradient(1px 1px at 34% 8%, var(--star), transparent),
    radial-gradient(1.4px 1.4px at 58% 22%, var(--star), transparent),
    radial-gradient(1px 1px at 76% 12%, var(--star), transparent),
    radial-gradient(1.2px 1.2px at 91% 30%, var(--star), transparent),
    radial-gradient(1px 1px at 22% 40%, var(--star), transparent),
    linear-gradient(180deg, var(--sky-top), var(--sky-low));
}
.hero-grid {
  display: grid;
  gap: 40px;
  padding-block: 32px 40px;
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; padding-block: 44px 48px; }
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* The token coin. A glint sweeps across it every few seconds. */
.coin { position: relative; display: block; flex: none; aspect-ratio: 1; max-width: 100%; border-radius: 50%; }
.coin img { display: block; width: 100%; height: auto; filter: drop-shadow(5px 6px 0 color-mix(in srgb, var(--hole) 35%, transparent)); }
.coin::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 38%, var(--glint) 50%, transparent 62%) no-repeat;
  background-size: 300% 100%;
  background-position: 120% 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glint 7s ease-in-out infinite;
}
@keyframes glint {
  0%, 72% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
.hero-badge { display: flex; align-items: center; gap: 18px; }
.hero-badge .eyebrow { flex: 1; min-width: 0; }
.coin-hero { width: clamp(84px, 9vw, 132px); transform: rotate(-8deg); transition: transform 300ms ease; }
.coin-hero:hover { transform: rotate(4deg) scale(1.04); }

h1 {
  font-family: var(--font-poster);
  font-weight: 400;
  font-size: clamp(2.9rem, 1.4rem + 5.4vw, 6rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
/* Painted sign, nailed up a little crooked */
.plate {
  display: inline-block;
  margin-top: 0.1em;
  padding: 0.06em 0.2em 0.02em;
  color: var(--on-rust);
  background: var(--grain), var(--rust);
  border: 3px solid var(--ink);
  border-radius: 3px;
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-2deg);
}

.lede { max-width: 30em; font-size: 1.2rem; line-height: 1.55; }

.ca {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 34rem;
  padding: 8px 8px 8px 14px;
  background: var(--grain), var(--paper);
  color: var(--ink);
  border: 2px dashed var(--ink);
  border-radius: 4px;
}
.ca-coin { width: 28px; height: 28px; flex: none; margin-right: -4px; }
.ca-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ca code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  user-select: all;
}
.ca-copy {
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  font-family: var(--font-slab);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--gild-hi), var(--gild) 55%, var(--gild-lo));
  border: 2px solid var(--ink);
  border-radius: 3px;
  cursor: pointer;
}
.ca-copy:disabled { opacity: 0.55; cursor: not-allowed; background: transparent; color: var(--ink); }
.ca-status { min-height: 1.2em; margin-top: -14px; font-family: var(--font-mono); font-size: 0.8rem; }
.ca-status:empty { display: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* The rig: a framed survey plate with a brass readout */
.console {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 540px;
  justify-self: center;
  padding: 14px;
  background: var(--grain), var(--paper);
  color: var(--ink);
  border: 6px double var(--ink);
  border-radius: 4px;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--ink) 35%, transparent);
  --fg: var(--ink);
}
.console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.console-head b { font-family: var(--font-slab); font-weight: 400; letter-spacing: 0.04em; }
.console-formation { color: var(--muted); }
.console canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 520 / 560;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--sky-low);
  touch-action: pan-y;
}
.readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.readout div {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--paper) 70%, var(--gild-hi));
  min-width: 0;
}
.readout dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.readout dd {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 460px) {
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.btn-drill {
  width: 100%;
  min-height: 60px;
  font-size: 1.35rem;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.btn-drill.is-drilling { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--fg); filter: brightness(1.1); }
.btn-drill.is-struck { background: var(--grain), var(--rust); color: var(--on-rust); }
.console figcaption { font-size: 0.9rem; font-style: italic; color: var(--muted); }
.console figcaption:empty { display: none; }

/* Mesas on the horizon, then topsoil and red beds */
.ground { display: grid; grid-template-rows: 40px 22px 34px; }
.ground::before {
  content: "";
  background: var(--mesa);
  -webkit-mask-image: var(--mesa-shape);
  mask-image: var(--mesa-shape);
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-position: bottom left;
  mask-position: bottom left;
}
.ground span { display: block; position: relative; }
.ground-soil { background: var(--soil); }
.ground-red { background: var(--redbed); }
.ground span::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}
.ground-soil::after { background: var(--soil-mark); -webkit-mask-image: var(--lith-soil); mask-image: var(--lith-soil); }
.ground-red::after { background: var(--redbed-mark); -webkit-mask-image: var(--lith-redbed); mask-image: var(--lith-redbed); }

/* Formation bands ------------------------------------------------------- */

.band {
  position: relative;
  background: var(--grain), var(--bg);
  color: var(--fg);
  padding-block: 0 96px;
  --card: color-mix(in srgb, var(--bg) 40%, var(--paper));
  --rule: color-mix(in srgb, var(--fg) 30%, transparent);
}
.band::before {
  content: "";
  display: block;
  height: 30px;
  background: var(--mk);
  -webkit-mask-image: var(--lith);
  mask-image: var(--lith);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  border-bottom: 3px double var(--rule);
}
.band > .wrap { display: flex; flex-direction: column; gap: 22px; padding-top: 56px; }
.band-sand  { --bg: var(--sand);  --mk: var(--sand-mark);  --fg: var(--on-sand);  --lith: var(--lith-sand); }
.band-salt  { --bg: var(--salt);  --mk: var(--salt-mark);  --fg: var(--on-salt);  --lith: var(--lith-salt); }
.band-lime  { --bg: var(--lime);  --mk: var(--lime-mark);  --fg: var(--on-lime);  --lith: var(--lith-lime); }

.prose { display: flex; flex-direction: column; gap: 16px; max-width: 36em; min-width: 0; }
.sub { max-width: 30em; margin-top: -4px; font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); font-style: italic; line-height: 1.5; }

/* The pair: the two tokens and the pipes between them */
.pair-grid { display: grid; gap: 32px; }
@media (min-width: 940px) {
  .pair-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "prose pipe" "prose spec";
    column-gap: 56px;
    align-items: start;
  }
  .pair-grid .prose { grid-area: prose; }
  .pipeline { grid-area: pipe; }
  .spec { grid-area: spec; }
}

.pipeline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tank-coin {
  flex: none;
  width: clamp(62px, 17vw, 88px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(3px 3px 0 color-mix(in srgb, var(--fg) 35%, transparent));
}
.pipes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pipe {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 2px solid var(--fg);
  border-radius: 4px;
  overflow: hidden;
  background-image: repeating-linear-gradient(90deg, var(--mk) 0 14px, transparent 14px 28px);
  background-size: 28px 100%;
  animation: flow-left 1.2s linear infinite;
}
.pipe-sell { animation-name: flow-right; }
.pipe span {
  padding: 1px 8px;
  border-radius: 2px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: clamp(0.56rem, 0.48rem + 0.4vw, 0.72rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 12px);
}
@keyframes flow-left { to { background-position: -28px 0; } }
@keyframes flow-right { to { background-position: 28px 0; } }

.spec, .netinfo, .permit dl { display: flex; flex-direction: column; }
.spec {
  background: var(--grain), var(--card);
  border: 6px double var(--fg);
  border-radius: 3px;
  padding: 6px 18px;
}
.spec div, .netinfo div, .permit dl div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 12px;
  padding-block: 10px;
  border-top: 1px solid var(--rule);
}
.spec div:first-child, .netinfo div:first-child, .permit dl div:first-child { border-top: 0; }
.spec dt, .netinfo dt, .permit dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 0.15em;
}
.spec dd { min-width: 0; overflow-wrap: anywhere; }
/* Token icons side by side, overlapping, the way DEXs show a pair */
.pair-icons { display: inline-flex; vertical-align: -7px; margin-right: 10px; }
.pair-icons img { width: 26px; height: 26px; border-radius: 50%; }
.pair-icons img + img { margin-left: -9px; }
.inline-link { margin-left: 6px; font-family: var(--font-mono); font-size: 0.8rem; }
@media (max-width: 460px) {
  .spec div, .netinfo div, .permit dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* How to buy: steps hang off a rope, numbered on gold coins */
.steps {
  list-style: none;
  padding: 0;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: step;
}
.steps li {
  position: relative;
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 20px 22px 22px 86px;
  background: var(--grain), var(--card);
  border: 6px double var(--fg);
  border-radius: 3px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--fg);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gild-hi), var(--gild) 55%, var(--gild-lo));
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gild-lo) 55%, transparent);
  color: var(--on-accent);
  font-family: var(--font-poster);
  font-size: 1.35rem;
  line-height: 1;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 38px;
  top: 64px;
  bottom: -26px;
  width: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--wood) 0 4px, var(--gild-lo) 4px 7px);
}
.steps p { max-width: 38em; }
.netinfo {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 4px 14px;
  border: 1.5px dashed var(--rule);
  border-radius: 2px;
}
.netinfo dd { min-width: 0; overflow-wrap: anywhere; user-select: all; }
.netinfo div { grid-template-columns: 6.5rem minmax(0, 1fr); padding-block: 7px; }
.steps .btn { align-self: flex-start; }
.step-status { font-family: var(--font-mono); font-size: 0.8rem; }
.step-status:empty { display: none; }
.step-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) {
  .steps li { padding: 78px 18px 20px; }
  .steps li::before { left: 16px; }
  .steps li:not(:last-child)::after { display: none; }
}

/* The plan: a claim deed and the casing points */
.plan-grid { display: grid; gap: 40px; }
@media (min-width: 940px) {
  .plan-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
}
.permit {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 20px;
  background: var(--grain), var(--paper);
  color: var(--ink);
  border: 8px double var(--ink);
  border-radius: 2px;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--ink) 35%, transparent);
  --fg: var(--ink);
  --rule: color-mix(in srgb, var(--ink) 25%, transparent);
  overflow: hidden;
}
.permit header { border-bottom: 3px double var(--ink); padding-bottom: 12px; }
.permit-kicker { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.permit h3 { font-family: var(--font-western); font-size: 2.4rem; line-height: 1.05; letter-spacing: 0.02em; }
.permit dd { font-family: var(--font-mono); font-size: 0.92rem; min-width: 0; overflow-wrap: anywhere; }
.permit dd.is-pending { color: var(--muted); font-style: italic; }
.permit-note { font-size: 0.9rem; font-style: italic; color: var(--muted); }
.stamp {
  position: absolute;
  top: 58px;
  right: 18px;
  padding: 4px 10px 2px;
  border: 4px double var(--rust);
  border-radius: 4px;
  color: var(--rust);
  font-family: var(--font-slab);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.88;
}

.casing { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.casing > h3 { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.phases { list-style: none; padding: 0; display: flex; flex-direction: column; }
.phases li {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-block: 16px;
  border-top: 3px double var(--rule);
}
.phases li:last-child { border-bottom: 3px double var(--rule); }
.phase-depth { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; padding-top: 0.3em; font-variant-numeric: tabular-nums; }
.phases h4 { font-family: var(--font-slab); font-weight: 400; font-size: 1.3rem; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.03em; }
.phases p { font-size: 1rem; }
.chip {
  padding: 3px 10px 2px;
  border-radius: 3px;
  border: 2px solid var(--fg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip.is-done { background: var(--fg); color: var(--bg); }
.chip.is-next { background: linear-gradient(180deg, var(--gild-hi), var(--gild) 55%, var(--gild-lo)); color: var(--on-accent); }
.chip.is-planned { border-style: dashed; }
@media (max-width: 520px) {
  .phases li { grid-template-columns: minmax(0, 1fr) auto; }
  .phase-depth { grid-column: 1 / -1; padding-top: 0; }
}

/* Pay zone footer ------------------------------------------------------ */

.pay {
  position: relative;
  background: var(--grain), var(--pay);
  color: var(--on-pay);
  --fg: var(--on-pay);
  padding-block: 0 calc(96px + env(safe-area-inset-bottom, 0px));
}
.pay::before {
  content: "";
  display: block;
  height: 30px;
  background: var(--gild-hi);
  opacity: 0.4;
  -webkit-mask-image: var(--lith-pay);
  mask-image: var(--lith-pay);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}
.pay-inner { display: flex; flex-direction: column; gap: 22px; padding-top: 56px; }
/* Gold leaf lettering */
.pay-word {
  font-family: var(--font-western);
  font-size: clamp(3.6rem, 15vw, 12rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--gild-lo), var(--gild-hi) 25%, var(--gild) 45%, var(--gild-hi) 65%, var(--gild-lo) 85%, var(--gild-hi));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 220% 0; } }
.pay-brand { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(14px, 3vw, 36px); }
.coin-pay { width: clamp(88px, 16vw, 190px); }
.pay-line { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); font-style: italic; }
.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.links a { font-family: var(--font-slab); letter-spacing: 0.06em; text-transform: uppercase; text-underline-offset: 5px; }
.disclaimer { max-width: 70ch; font-size: 0.85rem; color: color-mix(in srgb, var(--on-pay) 72%, transparent); }

/* Depth gauge: a brass tag that follows the scroll */
.depth-pill {
  position: fixed;
  z-index: 20;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 5px 10px;
  background: linear-gradient(180deg, var(--gild-hi), var(--gild) 60%, var(--gild-lo));
  color: var(--on-accent);
  border: 2px solid var(--on-accent);
  border-radius: 3px;
  box-shadow: 2px 2px 0 var(--on-accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.depth-bit {
  width: 10px;
  height: 12px;
  background: var(--rust);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

@media (prefers-reduced-motion: reduce) {
  .pipe, .pay-word, .coin::after { animation: none; }
  .coin-hero { transition: none; }
  .btn, .btn-drill { transition: none; }
}
