/* ============================================================
   Badge Hunt — a field guide to GitHub achievements
   One stylesheet. Paper, ink, and a little lime.
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --paper: #edf0e7;
  --paper-deep: #e3e7da;
  --card: #fbfcf6;
  --card-strong: #ffffff;
  --ink: #101910;
  --ink-soft: #29352c;
  --muted: #5c6b60;
  --faint: #8a968c;
  --line: #d1d8cb;
  --line-strong: #b3bfae;
  --green: #176b45;
  --green-deep: #0e4b2f;
  --green-soft: #dcebdd;
  --lime: #d8f064;
  --lime-deep: #b9d63c;
  --amber: #d9a12b;
  --amber-soft: #fbefd4;
  --rust: #b33a2b;
  --rust-soft: #f7e3df;
  --white: #f7f9f1;
  --radius: 18px;
  --radius-sm: 11px;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --sans: "Spline Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 22px 60px rgba(16, 25, 16, 0.1);
  --shadow-soft: 0 10px 30px rgba(16, 25, 16, 0.06);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% -8%, rgba(23, 107, 69, 0.11), transparent 30rem),
    radial-gradient(circle at -10% 28%, rgba(217, 161, 43, 0.09), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 200;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  bottom: 0;
  left: 1.5rem;
  height: 1px;
  background: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  flex-shrink: 0;
}

.brand-stamp {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  background: var(--green);
  color: var(--lime);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 4px var(--lime);
}

.brand-stamp svg {
  width: 17px;
  height: 17px;
}

.brand-text {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-text em {
  color: var(--green);
  font-style: normal;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.topnav a {
  position: relative;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.topnav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.32rem;
  left: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.topnav a:hover {
  color: var(--ink);
}

.topnav a:hover::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.cli-link {
  padding: 0.42rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cli-link span {
  color: var(--green);
}

.cli-link:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Star button, five sizes ---------- */
.star-btn {
  --star-pad: 0.62rem 0.8rem;
  --star-font: 0.76rem;
  --star-icon: 14px;
  --star-gap: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: var(--star-gap);
  padding: var(--star-pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: var(--star-font);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.star-btn:hover {
  background: var(--green-soft);
  border-color: var(--green);
  transform: translateY(-1px);
}

.star-icon {
  width: var(--star-icon);
  height: var(--star-icon);
  flex-shrink: 0;
  color: var(--green);
}

.star-count {
  padding-left: var(--star-gap);
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: calc(var(--star-font) - 0.04rem);
  font-weight: 400;
}

.star-btn[data-size="xs"] {
  --star-pad: 0.3rem 0.46rem;
  --star-font: 0.6rem;
  --star-icon: 10px;
  --star-gap: 0.26rem;
}

.star-btn[data-size="sm"] {
  --star-pad: 0.44rem 0.6rem;
  --star-font: 0.69rem;
  --star-icon: 12px;
  --star-gap: 0.33rem;
}

.star-btn[data-size="md"] {
  --star-pad: 0.58rem 0.78rem;
  --star-font: 0.76rem;
  --star-icon: 14px;
  --star-gap: 0.4rem;
}

.star-btn[data-size="lg"] {
  --star-pad: 0.74rem 0.98rem;
  --star-font: 0.84rem;
  --star-icon: 16px;
  --star-gap: 0.47rem;
}

.star-btn[data-size="xl"] {
  --star-pad: 1rem 1.28rem;
  --star-font: 0.97rem;
  --star-icon: 19px;
  --star-gap: 0.55rem;
}

.star-slot {
  display: inline-flex;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 1.5rem 4.6rem;
}

.eyebrow {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.35rem;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent);
  vertical-align: 0.08em;
}

.hero h1 {
  max-width: 11ch;
  margin: 0.9rem 0 1.2rem;
  font-family: var(--display);
  font-size: clamp(4rem, 8.2vw, 7.2rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.065em;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
}

.hero-lede {
  max-width: 53ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.68;
}

.hunt-form {
  margin-top: 2.2rem;
  padding: 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hunt-form > label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hunt-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.32rem 0.32rem 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hunt-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.hunt-input > span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
}

.hunt-input input {
  min-width: 0;
  flex: 1;
  padding: 0.62rem 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
}

.hunt-input input::placeholder {
  color: var(--faint);
}

.hunt-input button {
  flex-shrink: 0;
  padding: 0.72rem 1rem;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 7px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.hunt-input button:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.hunt-input button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.example-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.7rem;
}

.example-row > span {
  margin-right: 0.15rem;
  color: var(--faint);
  font-size: 0.65rem;
}

.example {
  padding: 0.24rem 0.43rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.example:hover {
  border-color: var(--green);
  color: var(--green);
}

.form-note {
  margin-top: 0.7rem;
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.5;
}

.hero-star-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.hero-star-row > span:last-child,
.how-support > span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.how-support {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* ---------- Hero wall ---------- */
.hero-wall {
  position: relative;
  padding: 1.35rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(216, 240, 100, 0.14), transparent 15rem),
    linear-gradient(160deg, #176b45, #0d3f29 72%);
  border: 1px solid var(--green-deep);
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: var(--white);
  transform: rotate(1.2deg);
}

.hero-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  pointer-events: none;
}

.wall-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(247, 249, 241, 0.2);
}

.mono {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.wall-head .mono {
  color: var(--lime);
}

.wall-count {
  color: rgba(247, 249, 241, 0.6);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.seal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  padding: 1.5rem 0 1.2rem;
}

.mini-seal {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-width: 76px;
  margin: 0 auto;
  border: 1px solid rgba(216, 240, 100, 0.45);
  border-radius: 50%;
  color: var(--lime);
  box-shadow: inset 0 0 0 4px rgba(216, 240, 100, 0.08);
  transform: rotate(-3deg);
}

.mini-seal:nth-child(2n) {
  transform: rotate(4deg);
  color: var(--white);
  border-color: rgba(247, 249, 241, 0.3);
}

.mini-seal:nth-child(3n) {
  transform: rotate(-1deg);
}

.mini-seal svg {
  width: 25%;
  height: 25%;
  stroke-width: 1.5;
}

.wall-note {
  position: relative;
  padding-top: 1rem;
  border-top: 1px solid rgba(247, 249, 241, 0.2);
  color: rgba(247, 249, 241, 0.62);
  font-family: var(--mono);
  font-size: 0.52rem;
  line-height: 1.7;
}

/* ---------- Hunt / results ---------- */
.hunt {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.loading-card,
.error-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
  padding: 1.2rem 1.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.loading-stamp {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 2px dashed var(--green);
  border-radius: 50%;
  animation: stamp-spin 3.5s linear infinite;
}

.loading-card p:last-child {
  color: var(--muted);
  font-size: 0.8rem;
}

.error-card {
  display: block;
  border-color: color-mix(in srgb, var(--rust) 35%, var(--line));
  background: var(--rust-soft);
}

.error-card h2 {
  margin: 0.4rem 0 0.3rem;
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.error-card > p:not(.eyebrow) {
  max-width: 65ch;
  color: var(--muted);
  font-size: 0.82rem;
}

.error-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* ---------- Start here ---------- */
.start-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 1rem 0 2rem;
  padding: 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.start-copy h2 {
  margin: 0.4rem 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.start-copy h2 em {
  color: var(--green);
  font-style: normal;
}

.start-copy > p:not(.eyebrow) {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.6;
}

.start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  list-style: none;
  align-self: center;
}

.start-steps li {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.start-steps li > span {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.start-steps strong {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.start-steps p {
  margin-top: 0.2rem;
  color: var(--faint);
  font-size: 0.65rem;
  line-height: 1.45;
}

@keyframes stamp-spin {
  to { transform: rotate(360deg); }
}

.results {
  padding: 1rem 0 0;
}

.profile-card {
  position: relative;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 1.5rem;
  left: 1.5rem;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--lime-deep), var(--amber));
  border-radius: 0 0 4px 4px;
}

.profile-id {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-id img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid var(--card);
  border-radius: 50%;
  outline: 1px solid var(--line-strong);
  outline-offset: 3px;
  object-fit: cover;
  background: var(--paper-deep);
}

.profile-id h2 {
  margin-top: 0.15rem;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.profile-id > div > a {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.profile-bio {
  max-width: 70ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-stats div {
  padding-right: 0.7rem;
  border-right: 1px solid var(--line);
}

.profile-stats div:last-child {
  border-right: 0;
}

.profile-stats dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stats dd {
  margin-top: 0.2rem;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.profile-source {
  margin-top: 0.8rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.55rem;
  line-height: 1.6;
}

.profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button--dark:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  transform: translateY(-1px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 500;
}

.text-link span {
  color: var(--green);
}

.text-link:hover {
  border-color: var(--green);
}

/* ---------- Sections ---------- */
.result-section {
  margin-top: 4rem;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.6fr);
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.section-head h2 {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.section-note {
  max-width: 50ch;
  padding-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.62;
}

.section-head--wide {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  margin-bottom: 2.2rem;
}

/* ---------- Badge wall ---------- */
.badge-wall {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
}

.seal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 178px;
  padding: 1.1rem 0.55rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.seal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.seal-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 0.8rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  color: var(--faint);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--line);
}

.seal-icon svg {
  width: 28px;
  height: 28px;
}

.seal--earned .seal-ring {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--green);
}

.seal--likely .seal-ring {
  border-style: dashed;
  border-color: var(--amber);
  color: #9a6b0c;
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--amber);
}

.seal--unknown .seal-ring {
  border-style: dashed;
}

.seal-tier {
  position: absolute;
  right: -7px;
  bottom: -4px;
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 0.3rem;
  background: var(--ink);
  border: 2px solid var(--card);
  border-radius: 999px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 500;
}

.seal h3 {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.seal-status {
  margin-top: auto;
  padding-top: 0.65rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.52rem;
  line-height: 1.35;
}

.seal--earned .seal-status {
  color: var(--green);
}

.seal--likely .seal-status {
  color: #8a5f09;
}

/* ---------- Progress ---------- */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.progress-card {
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.progress-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.progress-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: var(--green-soft);
  border-radius: 10px;
  color: var(--green);
}

.progress-icon svg {
  width: 19px;
  height: 19px;
}

.progress-head h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.progress-head p {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.tier-pill {
  margin-left: auto;
  padding: 0.22rem 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.5rem;
  white-space: nowrap;
}

.progress-track {
  height: 8px;
  margin-top: 1.2rem;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--lime-deep));
  border-radius: inherit;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.progress-advice {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

/* ---------- Next list ---------- */
.next-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.next-list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.next-index {
  padding-top: 0.1rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.next-list p {
  max-width: 80ch;
  font-size: 0.84rem;
  line-height: 1.58;
}

/* ---------- Advanced ---------- */
.advanced {
  margin-top: 3rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.advanced summary {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.advanced > p {
  max-width: 75ch;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.advanced textarea {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  resize: vertical;
}

.advanced-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.7rem;
}

#html-status {
  color: var(--green);
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Field guide ---------- */
.field-guide {
  width: 100%;
  margin-top: 6rem;
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
  background:
    radial-gradient(circle at 100% 0, rgba(216, 240, 100, 0.12), transparent 28rem),
    var(--ink);
  color: var(--white);
}

.field-guide > * {
  max-width: 1220px;
  margin-right: auto;
  margin-left: auto;
}

.field-guide .eyebrow {
  color: var(--lime);
}

.field-guide h2 {
  color: var(--white);
}

.field-guide h2 em {
  color: var(--lime);
  font-style: normal;
}

.field-guide .section-note {
  color: rgba(247, 249, 241, 0.62);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1.1rem;
  background: rgba(247, 249, 241, 0.055);
  border: 1px solid rgba(247, 249, 241, 0.13);
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.guide-card:hover {
  background: rgba(247, 249, 241, 0.09);
  border-color: rgba(216, 240, 100, 0.4);
}

.guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.guide-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: rgba(216, 240, 100, 0.12);
  border: 1px solid rgba(216, 240, 100, 0.3);
  border-radius: 50%;
  color: var(--lime);
}

.guide-icon svg {
  width: 17px;
  height: 17px;
}

.guide-number {
  color: rgba(247, 249, 241, 0.35);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.guide-card h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.guide-card > p:not(.guide-tiers) {
  margin-top: 0.5rem;
  color: rgba(247, 249, 241, 0.62);
  font-size: 0.72rem;
  line-height: 1.55;
}

.guide-tiers {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(247, 249, 241, 0.12);
  color: rgba(216, 240, 100, 0.64);
  font-family: var(--mono);
  font-size: 0.5rem;
  line-height: 1.5;
}

/* ---------- How ---------- */
.how {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6.5rem) 1.5rem;
}

.how-copy h2 {
  margin: 0.55rem 0 1.2rem;
  font-family: var(--display);
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.how-copy h2 em {
  color: var(--green);
  font-style: normal;
}

.how-copy > p:not(.eyebrow) {
  max-width: 44ch;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.68;
}

.how-steps {
  list-style: none;
  border-top: 1px solid var(--line);
}

.how-steps li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}

.how-steps li > span {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.how-steps h3 {
  font-family: var(--display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.how-steps p {
  max-width: 50ch;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--green-deep);
  color: var(--white);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1.5rem;
}

.footer-cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 4rem;
}

.footer-cta .eyebrow {
  color: var(--lime);
}

.footer-cta h2 {
  margin: 0.6rem 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.2vw, 5.1rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.06em;
}

.footer-cta h2 em {
  color: var(--lime);
  font-style: normal;
}

.footer-cta p:not(.eyebrow) {
  max-width: 46ch;
  color: rgba(247, 249, 241, 0.62);
  font-size: 0.8rem;
}

.footer .star-btn {
  background: transparent;
  border-color: rgba(247, 249, 241, 0.3);
  color: var(--white);
}

.footer .star-btn:hover {
  background: rgba(216, 240, 100, 0.1);
  border-color: var(--lime);
}

.footer .star-icon {
  color: var(--lime);
}

.footer .star-count {
  border-color: rgba(247, 249, 241, 0.2);
  color: rgba(247, 249, 241, 0.6);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(247, 249, 241, 0.16);
  color: rgba(247, 249, 241, 0.48);
  font-size: 0.64rem;
}

.footer-bottom a {
  border-bottom: 1px solid transparent;
}

.footer-bottom a:hover {
  color: var(--white);
  border-color: rgba(247, 249, 241, 0.4);
}

.footer-bottom nav {
  display: flex;
  gap: 1rem;
}

.star-slot--tiny {
  opacity: 0.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 2.5rem;
  }

  .topnav {
    gap: 1rem;
  }

  .badge-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topnav {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    font-size: clamp(4.1rem, 15vw, 6.8rem);
  }

  .hero-wall {
    max-width: 560px;
    transform: rotate(0.7deg);
  }

  .seal-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .mini-seal {
    max-width: 66px;
  }

  .section-head,
  .section-head--wide {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .section-note {
    max-width: 62ch;
  }

  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 1rem;
  }

  .profile-stats div:nth-child(2) {
    border-right: 0;
  }

  .progress-grid {
    grid-template-columns: 1fr;
  }

  .start-card {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.8rem 1rem;
  }

  .topbar::after {
    right: 1rem;
    left: 1rem;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .brand-stamp {
    width: 32px;
    height: 32px;
  }

  .cli-link {
    display: none;
  }

  .hero {
    padding: 2.5rem 1rem 3.2rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 18vw, 5.4rem);
  }

  .hero-lede {
    font-size: 0.88rem;
  }

  .hunt-form {
    padding: 0.8rem;
  }

  .hunt-input {
    flex-wrap: wrap;
    padding: 0.55rem 0.55rem 0.55rem 0.7rem;
  }

  .hunt-input input {
    flex-basis: calc(100% - 1.2rem);
    padding: 0.35rem 0;
  }

  .hunt-input button {
    width: 100%;
    margin-top: 0.35rem;
  }

  .hunt {
    padding: 0 1rem;
  }

  .start-card {
    padding: 1.1rem;
  }

  .start-steps {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .profile-card {
    padding: 1.15rem;
  }

  .profile-id h2 {
    font-size: 1.55rem;
  }

  .profile-stats dd {
    font-size: 1.3rem;
  }

  .profile-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .badge-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seal {
    min-height: 166px;
  }

  .seal:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.35rem);
    justify-self: center;
  }

  .result-section {
    margin-top: 3rem;
  }

  .next-list li {
    grid-template-columns: 1.8rem minmax(0, 1fr);
  }

  .field-guide {
    padding: 3rem 1rem;
    margin-top: 4rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    min-height: 185px;
  }

  .how {
    padding: 3.5rem 1rem;
  }

  .footer-inner {
    padding: 3.2rem 1rem 1.2rem;
  }

  .footer-cta {
    padding-bottom: 2.8rem;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 0.6rem;
  }

  .footer-bottom p {
    width: 100%;
  }

  .footer-bottom .star-slot {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 3.35rem;
  }

  .badge-wall {
    grid-template-columns: 1fr;
  }

  .seal:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
  }

  .seal {
    min-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
