/* ==========================================================================
   PRIMAL SURVIVAL — Wiki design system
   Aqua Axolotl Studios · Minecraft Bedrock add-on documentation
   Ink #04070a · Aqua #25e0ce · Syne / Inter / JetBrains Mono
   No frameworks. No build step. Mobile first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces — ink, near-black, hairline separated */
  --ink:        #04070a;
  --ink-1:      #06090e;
  --ink-2:      #090e14;
  --ink-3:      #0d141b;
  --ink-4:      #111a22;

  /* Hairlines */
  --line:       #1a242e;
  --line-soft:  #131c24;
  --line-loud:  #26343f;

  /* Text — all values contrast-checked against --ink */
  --text:       #e9eff4;   /* 17.6:1 */
  --text-dim:   #a6b4bf;   /*  8.1:1 */
  --text-mute:  #8695a1;   /*  6.0:1 */

  /* Single accent: aqua. Used for accents, states and data — never for prose */
  --aqua:       #25e0ce;
  --aqua-deep:  #1bb3a5;
  --aqua-ink:   #032420;
  --aqua-a12:   rgba(37, 224, 206, 0.12);
  --aqua-a22:   rgba(37, 224, 206, 0.22);
  --aqua-a40:   rgba(37, 224, 206, 0.40);

  /* Type */
  --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-2xs: 0.6875rem;                                  /* 11px — mono meta */
  --fs-xs:  0.75rem;                                    /* 12px */
  --fs-sm:  0.8125rem;                                  /* 13px */
  --fs-md:  0.9375rem;                                  /* 15px — body */
  --fs-lg:  1.0625rem;                                  /* 17px — lede */
  --fs-xl:  clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --fs-3xl: clamp(1.9rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-4xl: clamp(2.4rem, 1.2rem + 5.4vw, 5.25rem);

  --lh-tight: 1.08;
  --lh-snug:  1.25;
  --lh-body:  1.62;

  --tr-tight: -0.02em;
  --tr-wide:  0.16em;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  --section-y: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --shell: 1240px;
  --shell-narrow: 74ch;

  /* Geometry — technical, near-square corners */
  --r-1: 2px;
  --r-2: 3px;
  --r-3: 5px;

  --nav-h: 60px;
  --hairline: 1px solid var(--line);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word;   /* long mono tokens never punch out of a narrow card */
}

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

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  color: var(--text);
  text-wrap: balance;
}

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--aqua); }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15rem; }
li { margin-bottom: var(--s-2); }
li::marker { color: var(--aqua-deep); }

strong { font-weight: 600; color: var(--text); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--aqua);
  background: var(--ink-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-1);
  padding: 0.1em 0.38em;
}

hr {
  border: 0;
  border-top: var(--hairline);
  margin: var(--s-7) 0;
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection { background: var(--aqua-a40); color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  border-top: var(--hairline);
}

.section--flush { border-top: 0; }

.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.5;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 0%, transparent 78%);
}

.section > .shell { position: relative; z-index: 1; }

.section-head {
  max-width: var(--shell-narrow);
  margin-bottom: var(--s-6);
}

.section-head--wide { max-width: 88ch; }

.kicker {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--aqua);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--aqua);
  flex: none;
}

.kicker--plain { color: var(--text-mute); }
.kicker--plain::before { background: var(--line-loud); }

.section-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--s-4);
}

.section-lede {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 68ch;
}

.sub-title {
  font-size: var(--fs-xl);
  margin: var(--s-7) 0 var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: var(--hairline);
}

.sub-title:first-child { margin-top: 0; }

.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--tight { gap: var(--s-3); }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split {
  display: grid;
  gap: var(--s-6);
  align-items: start;
}

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s-8); }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stack > * + * { margin-top: var(--s-4); }
.stack--lg > * + * { margin-top: var(--s-6); }

.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 200;
  padding: var(--s-3) var(--s-4);
  background: var(--aqua);
  color: var(--aqua-ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--r-2);
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: var(--s-3); color: var(--aqua-ink); }

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(4, 7, 10, 0.88);
  border-bottom: var(--hairline);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex: none;
  min-width: 0;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line-loud);
  border-radius: var(--r-2);
  image-rendering: pixelated;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__name em {
  font-style: normal;
  color: var(--aqua);
}

.nav-scroller {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-scroller::-webkit-scrollbar { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.nav-links li { margin: 0; }

.nav-links a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--r-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav-links a:hover { color: var(--text); background: var(--ink-3); }

.nav-links a[aria-current="true"] {
  color: var(--aqua);
  background: var(--aqua-a12);
}

.nav-cta { flex: none; }

/* Mobile: links collapse into a panel toggled by the button */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (max-width: 899px) {
  .nav-scroller {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: var(--ink-1);
    border-bottom: 1px solid transparent;
    transition: max-height 0.22s var(--ease), border-color 0.22s var(--ease);
  }
  .nav-scroller[data-open="true"] {
    max-height: 70vh;
    overflow-y: auto;
    border-bottom-color: var(--line);
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-2) clamp(1.15rem, 4vw, 2.5rem) var(--s-4);
  }
  .nav-links a {
    padding: 0.7rem 0;
    font-size: var(--fs-xs);
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .nav-cta .btn { padding: 0.5rem 0.8rem; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.68rem 1.1rem;
  border: 1px solid var(--line-loud);
  border-radius: var(--r-2);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease), transform 0.15s var(--ease);
}

.btn:hover {
  color: var(--text);
  border-color: var(--aqua-a40);
  background: var(--ink-3);
}

.btn--primary {
  background: var(--aqua);
  border-color: var(--aqua);
  color: var(--aqua-ink);
  font-weight: 700;
}
.btn--primary:hover {
  background: #4deadd;
  border-color: #4deadd;
  color: var(--aqua-ink);
}

.btn--ghost { border-color: var(--line); color: var(--text-dim); }
.btn--ghost:hover { color: var(--text); }

.btn--sm { padding: 0.45rem 0.75rem; font-size: var(--fs-2xs); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6.5rem));
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(90% 70% at 15% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(90% 70% at 15% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

.hero__title {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  margin: 0 0 var(--s-4);
}

.hero__title span { display: block; }

.hero__title .hero__title-accent {
  color: var(--aqua);
  font-weight: 800;
}

.hero__line {
  font-size: var(--fs-lg);
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: var(--s-5);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: var(--hairline);
}

.hero__meta dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2px;
}

.hero__meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text);
}

.hero__meta > div { min-width: 0; }

/* Spec panel — mono data block beside the hero copy */
.panel {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
}

.panel--flush { padding: 0; overflow: hidden; }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  background: var(--ink-1);
}

.panel__body { padding: var(--s-5); }

.panel__dots { display: flex; gap: 5px; }
.panel__dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-loud);
}
.panel__dots i:first-child { background: var(--aqua); }

.spec-list {
  margin: 0;
  display: grid;
  gap: var(--s-3);
}

.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-soft);
}
.spec-list > div:last-child { border-bottom: 0; padding-bottom: 0; }

.spec-list dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.spec-list dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text);
  text-align: right;
}

.spec-list dd .aqua { color: var(--aqua); }

/* --------------------------------------------------------------------------
   7. Stats band
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--ink-1);
  overflow: hidden;
}

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.stat {
  padding: var(--s-5) var(--s-4);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat--accent .stat__num { color: var(--aqua); }

.stat__label {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Cards, panels, lists
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.card:hover { border-color: var(--line-loud); background: var(--ink-2); }

.card--accent { border-left: 2px solid var(--aqua); }

.card__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--s-3);
}

.card__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: var(--s-2);
}

.card__text { color: var(--text-dim); font-size: var(--fs-md); }
.card__foot {
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-mute);
}

/* Definition-style key/value rows used inside cards */
.kv {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  font-size: var(--fs-sm);
}
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line-soft);
}
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--text-mute); }
.kv dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text);
  text-align: right;
}

/* Plain data lists */
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.ticks li {
  position: relative;
  margin: 0;
  padding-left: var(--s-5);
  color: var(--text-dim);
  font-size: var(--fs-md);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 1px;
  background: var(--aqua-deep);
}
.ticks strong { color: var(--text); }

/* Badges & tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.44rem;
  border: 1px solid var(--line-loud);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.badge--accent { border-color: var(--aqua-a40); color: var(--aqua); background: var(--aqua-a12); }
.badge--quiet { border-color: var(--line); color: var(--text-mute); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* --------------------------------------------------------------------------
   9. Data tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--ink-1);
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 560px;
}

table.data caption {
  caption-side: top;
  text-align: left;
  padding: var(--s-4) var(--s-5) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

table.data th,
table.data td {
  padding: 0.62rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

table.data thead th {
  position: sticky;
  top: 0;
  background: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
  z-index: 2;
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--ink-2); }

table.data td.num,
table.data th.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data td.name { color: var(--text); font-weight: 500; white-space: nowrap; }
table.data td.muted { color: var(--text-dim); }

table.data tr[data-tier="4"] td.name { color: var(--aqua); }

/* --------------------------------------------------------------------------
   10. Ore tiers
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 760px) {
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tier {
  padding: var(--s-5);
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-top-width: 2px;
  border-radius: var(--r-3);
}

.tier--1 { border-top-color: rgba(37, 224, 206, 0.30); }
.tier--2 { border-top-color: rgba(37, 224, 206, 0.50); }
.tier--3 { border-top-color: rgba(37, 224, 206, 0.72); }
.tier--4 { border-top-color: var(--aqua); }

.tier__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.tier__name {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.tier__equiv {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.metal-list {
  list-style: none;
  margin: 0 0 var(--s-4);
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.metal-list li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line-soft);
}

.metal-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--aqua);
  opacity: 0.45;
}

.tier--4 .metal-list li::before { opacity: 1; }

.tier__note {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  font-family: var(--font-mono);
  line-height: 1.55;
  margin: 0;
}

/* --------------------------------------------------------------------------
   11. Creature gallery
   -------------------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
}

@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.creature {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color 0.15s var(--ease);
}

.creature:hover { border-color: var(--aqua-a40); }

.creature__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 90% at 50% 20%, var(--ink-4) 0%, var(--ink-2) 70%);
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.creature__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  padding: var(--s-2);
}

.creature__hp {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  padding: 0.1rem 0.34rem;
  background: rgba(4, 7, 10, 0.82);
  border: 1px solid var(--line-loud);
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.creature__body {
  padding: var(--s-3) var(--s-4) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex: 1;
}

.creature__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.creature__habitat {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0;
}

.creature__flags {
  margin-top: auto;
  padding-top: var(--s-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* Gallery filters — driven by data-filter on the gallery container */
.gallery[data-filter="hostile"]   .creature:not([data-behaviour="hostile"]),
.gallery[data-filter="neutral"]   .creature:not([data-behaviour="neutral"]),
.gallery[data-filter="passive"]   .creature:not([data-behaviour="passive"]),
.gallery[data-filter="tameable"]  .creature:not([data-tags~="tameable"]),
.gallery[data-filter="breedable"] .creature:not([data-tags~="breedable"]) { display: none; }

/* Behaviour states — accent reserved for the hostile state */
.creature[data-behaviour="hostile"] .creature__hp { border-color: var(--aqua-a40); color: var(--aqua); }
.creature[data-behaviour="neutral"] .creature__hp { color: var(--text-dim); }
.creature[data-behaviour="passive"] .creature__hp { color: var(--text-mute); }

/* --------------------------------------------------------------------------
   12. Bosses
   -------------------------------------------------------------------------- */

.bosses {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 900px) {
  .bosses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.boss {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-top: 2px solid var(--aqua);
  border-radius: var(--r-3);
  overflow: hidden;
}

.boss__frame {
  aspect-ratio: 16 / 10;
  background: radial-gradient(120% 100% at 50% 10%, var(--ink-4) 0%, var(--ink) 78%);
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
}

.boss__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  padding: var(--s-3);
}

.boss__body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }

.boss__name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  margin: 0 0 var(--s-2);
}

.boss__hp {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--aqua);
  letter-spacing: 0.06em;
  margin-bottom: var(--s-4);
}

.boss__facts {
  margin: 0 0 var(--s-4);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-2);
}

.boss__facts li {
  position: relative;
  margin: 0;
  padding-left: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.boss__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--aqua-deep);
}

.boss__loot {
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   13. Callouts & notes
   -------------------------------------------------------------------------- */

.callout {
  padding: var(--s-4) var(--s-5);
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--aqua);
  border-radius: var(--r-2);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.callout strong { color: var(--text); }
.callout--plain { border-left-color: var(--line-loud); }

.callout__label {
  display: block;
  margin-bottom: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aqua);
}

.callout--plain .callout__label { color: var(--text-mute); }

/* --------------------------------------------------------------------------
   14. Skill nodes
   -------------------------------------------------------------------------- */

.nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.nodes li {
  margin: 0;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}

.nodes .node-tier {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--aqua-deep);
  letter-spacing: 0.06em;
}

.nodes .node-name { color: var(--text); font-weight: 500; font-size: var(--fs-sm); }
.nodes .node-effect { display: block; color: var(--text-mute); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   15. Classes
   -------------------------------------------------------------------------- */

.class-grid {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 700px) {
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.class-card {
  padding: var(--s-5);
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.class-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 var(--s-4);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}

.class-card__name span {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.ability {
  display: grid;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
  padding-left: var(--s-4);
  border-left: 1px solid var(--line-loud);
}

.ability dt {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.ability dd { margin: 0 0 var(--s-3); font-size: var(--fs-sm); color: var(--text-dim); }
.ability dd:last-child { margin-bottom: 0; }
.ability dd b { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   16. Details / FAQ
   -------------------------------------------------------------------------- */

.faq {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--ink-1);
  overflow: hidden;
}

.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--aqua);
  line-height: 1;
}

.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { background: var(--ink-2); }

.faq .faq__answer {
  padding: 0 var(--s-5) var(--s-5);
  color: var(--text-dim);
  font-size: var(--fs-sm);
  max-width: 78ch;
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: var(--hairline);
  padding-block: var(--s-7) var(--s-6);
  background: var(--ink-1);
}

.site-footer__grid {
  display: grid;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}

@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
}

.site-footer__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  margin: 0 0 var(--s-3);
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.site-footer a { color: var(--text-dim); font-size: var(--fs-sm); }
.site-footer a:hover { color: var(--aqua); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   18. Utilities
   -------------------------------------------------------------------------- */

.mono { font-family: var(--font-mono); }
.aqua { color: var(--aqua); }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.measure { max-width: var(--shell-narrow); }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   19. Motion & accessibility
   -------------------------------------------------------------------------- */

@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;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-dim: #c3ced6;
    --text-mute: #a9b6c0;
    --line: #2a3742;
    --line-soft: #1e2831;
  }
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-nav, .nav-toggle, .skip-link, .hero::before, .section--grid::before { display: none; }
  body { background: #fff; color: #111; }
  .card, .panel, .tier, .creature, .boss, .faq, .stats, .table-wrap { border-color: #ccc; background: #fff; }
  .section { border-top-color: #ddd; page-break-inside: avoid; }
}




/* ---------- tratamiento de imágenes, copiado del sitio del estudio ----------
   El estudio no deja imágenes sueltas: el hero las usa de fondo con cover y un
   filtro que las oscurece para que el texto se lea, y los banners llevan
   aspect-ratio fijo con object-fit: cover. */
.hero {
  background-image:
    linear-gradient(180deg, rgba(4, 7, 10, .80) 0%, rgba(4, 7, 10, .90) 55%, rgba(4, 7, 10, .97) 100%),
    url("brand/keyart.jpg");
  background-size: cover;
  background-position: 50% 32%;
  background-repeat: no-repeat;
}

.brand-band {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, .06);
}
.brand-band img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1336 / 136;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(.95) brightness(.62);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.site-foot__logo {
  display: block;
  width: 96px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-block-end: 1.25rem;
  filter: saturate(.95) brightness(.95);
}


/* ---------- redes en el pie ---------- */
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1.5rem;
  margin-block-start: 2.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid rgba(255, 255, 255, .07);
  font-size: var(--fs-sm, .875rem);
}
.site-footer__social-label {
  color: #25e0ce;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.site-footer__social a {
  color: var(--fg-mute, #8b9aa3);
  text-decoration: none;
  border-block-end: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-footer__social a:hover,
.site-footer__social a:focus-visible {
  color: #25e0ce;
  border-block-end-color: #25e0ce;
}
