.referral-page, .ref-banner {
  --ref-art: url("../images/command/hero-command-banner-v2.webp");
  --ref-accent: #ffbf7d;
  --ref-muted: #c0b8ac;
  --ref-line: #564638;
  --ref-display: "Big Shoulders Display", "Noto Sans SC", system-ui, sans-serif;
  --ref-mono: "Share Tech Mono", ui-monospace, monospace;
}
.referral-page .skip-link:not(:focus) {clip-path:inset(50%)}
.referral-page [hidden], .ref-banner[hidden] {display:none!important}
.ref-hero {
  background: linear-gradient(90deg,#100d0a 6%,#100d0aeb 33%,#100d0a54 72%,#100d0a20), var(--ref-art) center 46% / cover;
  border-block-end:1px solid #743d2c;
}
.ref-hero-layout {
  min-height: clamp(21rem, 36vw, 33rem);
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:2rem;
  padding-block:clamp(2rem,5vw,5rem);
}
.ref-back {display:inline-block;color:var(--ref-accent);font-weight:700;margin-block-end:1.35rem}
.ref-hero h1 {
  color:var(--command-cream);
  font-family:var(--ref-display);
  font-size:clamp(2.4rem, 1.2rem + 5vw, 6rem);
  line-height:1.03;
  margin:0;
  letter-spacing:-.025em;
}
.ref-hero p {color:#e0d7c9;max-width:30rem;font-size:clamp(1rem,.85rem + .65vw,1.35rem);margin:1rem 0 1.6rem}
.ref-points {
  padding:1rem clamp(1rem,3vw,2.8rem);
  background:linear-gradient(110deg,#32190fd9,#110c08e8);
  border:1px solid #ab673d;
  border-inline-start:4px solid #da7b39;
  display:grid;
  color:var(--ref-accent);
}
.ref-points strong {font:800 clamp(2.5rem,1.25rem + 5vw,6.25rem)/1 var(--ref-display);font-variant-numeric:tabular-nums}
.ref-points span {font-weight:700;margin-top:.3rem}
.ref-content {
  padding-block:clamp(1.25rem,4vw,3.75rem);
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  align-items:start;
  gap:clamp(1.25rem,4vw,4rem);
}
.ref-panel {
  padding:clamp(1rem,3vw,2.3rem);
  background:linear-gradient(140deg,#211a14,#131310 58%);
  border:1px solid var(--ref-line);
  box-shadow:inset 0 3px #8f3f29;
  scroll-margin-top:7rem;
}
.ref-panel h2,.ref-rules h2 {margin:0 0 1rem;font-size:clamp(1.5rem,1.2rem + 1vw,2rem);color:var(--command-cream)}
.ref-panel label {display:block;font-weight:650;color:#ded4c4}
.ref-copy {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem;margin:.4rem 0 1rem}
.ref-copy input {
  min-width:0;width:100%;box-sizing:border-box;
  border:1px solid #6a5747;background:#0d0e0b;color:#fff2de;
  padding:.7rem;font:1rem var(--ref-mono);border-radius:2px;
}
.ref-action,.ref-copy button {
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #e9a062;border-radius:2px;
  background:#a44b29;color:#fff7e9;padding:.62rem 1rem;text-decoration:none;
  font:inherit;font-weight:700;line-height:1.25;cursor:pointer;
}
.ref-action:hover,.ref-copy button:hover {background:#c16336;color:#fff}
.ref-action:disabled {opacity:.65;cursor:wait}
#ref-status,#ref-counts,#ref-incoming,.ref-rules p {color:var(--ref-muted)}
#ref-status:empty {margin:0}
#ref-incoming {border-top:1px solid var(--ref-line);padding-top:.75rem;margin-bottom:0}
.ref-rules ol {margin:0;padding:0;counter-reset:ref-step;list-style:none}
.ref-rules li {display:grid;grid-template-columns:2.2rem minmax(0,1fr);gap:.65rem;padding:.85rem 0;border-bottom:1px solid var(--ref-line)}
.ref-rules li::before {counter-increment:ref-step;content:counter(ref-step,decimal-leading-zero);font:700 1.15rem/1.5 var(--ref-mono);color:var(--ref-accent)}
.ref-rules h3 {margin:0;color:var(--command-cream);font-size:1rem}
.ref-rules p {margin:.25rem 0 0}
.ref-details {margin-top:1rem}
.ref-details summary {color:var(--ref-accent);cursor:pointer;min-height:44px;align-content:center}
.ref-banner {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;
  gap:1rem;min-height:8.25rem;margin:1.25rem auto;padding:1rem clamp(1rem,3vw,2rem);
  box-sizing:border-box;border:1px solid #87553a;border-inline-start:4px solid #d26a34;
  background:linear-gradient(90deg,#1a100cf5,#21110ad9 38%,#28160d40 66%,#1b0e0810),var(--ref-art) calc(50% + clamp(90px,20vw,280px)) 39% / cover;
  background-color:#1a100c;
  color:#fff1e3;text-decoration:none;
}
.ref-banner:hover,.ref-banner:focus-visible {color:#fff;border-color:#f1a166}
.ref-banner-copy {display:grid;gap:.2rem}
.ref-banner-copy strong {font:800 clamp(1.4rem,1rem + 1vw,2.25rem)/1.2 var(--ref-display)}
.ref-banner-copy span {color:#ffcc98;font-weight:650}
.ref-banner-cta {
  justify-self:start;display:inline-flex;align-items:center;min-height:44px;
  border:1px solid #dda170;color:#fff3e4;background:#431e12e8;padding:.45rem .85rem;font-weight:700;
}
.ref-banner:hover .ref-banner-cta {background:#80401f}
@media (max-width:48rem) {
  .ref-content {grid-template-columns:1fr}
  .ref-hero-layout {min-height:0;grid-template-columns:1fr;gap:1.2rem}
  .ref-hero {background-position:70% center;background-image:linear-gradient(90deg,#110d09f5,#110d09bc 62%,#110d0960),var(--ref-art)}
  .ref-points {justify-self:start}
}
@media (max-width:30rem) {
  .ref-copy {grid-template-columns:1fr}
  .ref-banner {grid-template-columns:1fr;min-height:0;gap:.75rem;background-position:center,calc(50% + 90px) 39%}
}
