/* ================================================================
   Subnautica 2 - Deep Ocean / Blue Theme
   Loaded by every /subnautica2/ page after styles.css.
   ================================================================ */

:root {
  --sn2-primary: #46e2f8;            /* primary accent (cyan) */
  --sn2-primary-bright: #7ef2ff;     /* hover/highlight */
  --sn2-primary-dim: rgba(70, 226, 248, 0.16);
  --sn2-primary-soft: rgba(70, 226, 248, 0.08);
  --sn2-secondary: #e67c0b;          /* secondary accent (orange) */
  --sn2-secondary-bright: #ffa040;
  --sn2-secondary-dim: rgba(230, 124, 11, 0.16);
  --sn2-warning: #ffb454;             /* yellow/amber for warning boxes */
  --sn2-warning-dim: rgba(255, 180, 84, 0.14);
  --sn2-deep: #061320;
  --sn2-bg-dark: #0a1a2e;
  --sn2-bg-card: #11243d;
  --sn2-bg-elev: #173455;
  --sn2-border: rgba(70, 226, 248, 0.18);
  --sn2-border-strong: rgba(70, 226, 248, 0.35);
  --sn2-text: #e6f6ff;
  --sn2-text-dim: rgba(230, 246, 255, 0.72);
  --sn2-text-faint: rgba(230, 246, 255, 0.5);
}

/* ----------------------------------------------------------------
   Page background.
   ---------------------------------------------------------------- */
body[class*="sn2-"] {
  background:
    radial-gradient(ellipse 100% 70% at 50% -10%, rgba(70, 226, 248, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 110%, rgba(230, 124, 11, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a1a2e 0%, #061320 55%, #040c17 100%) !important;
  background-attachment: fixed !important;
  color: var(--sn2-text);
}
body[class*="sn2-"] .container { background: transparent !important; }
body[class*="sn2-"] .site-header { border-bottom-color: var(--sn2-border-strong) !important; }

/* Page <header> defaults to align-items: center which would centre the
   warning box, intro paragraphs and other prose blocks.  Stretch the
   children so they fill the column; the H1 keeps text-align: center. */
body[class*="sn2-"] header {
  align-items: stretch;
}
body[class*="sn2-"] header h1 {
  color: var(--sn2-primary-bright) !important;
  text-shadow: 0 0 28px rgba(70, 226, 248, 0.45);
}
body[class*="sn2-"] .breadcrumbs a { color: var(--sn2-primary-bright) !important; text-decoration: none; }
body[class*="sn2-"] .breadcrumbs a:hover { text-decoration: underline; }

/* ----------------------------------------------------------------
   .article-content cascade reset
   The site's default styles add big margins, top padding, borders
   on images, blue underlines on every link, etc.  Reset all of that
   inside subnautica2 pages and re-apply only what we want.
   ---------------------------------------------------------------- */
body[class*="sn2-"] .article-content {
  font-size: inherit;
  line-height: inherit;
  color: var(--sn2-text);
  overflow-x: visible;
}
body[class*="sn2-"] .article-content img {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  max-width: 100%;
  height: auto;
}
body[class*="sn2-"] .article-content a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}
body[class*="sn2-"] .article-content > p,
body[class*="sn2-"] .page-intro {
  font-size: 15px;
  line-height: 1.65;
  color: var(--sn2-text-dim);
  margin: 0 0 12px 0;
}
body[class*="sn2-"] .article-content > p a,
body[class*="sn2-"] .page-intro a {
  color: var(--sn2-primary-bright);
  text-decoration: underline;
  text-decoration-color: rgba(70, 226, 248, 0.45);
  text-underline-offset: 2px;
  font-weight: 600;
}
body[class*="sn2-"] .article-content > p a:hover,
body[class*="sn2-"] .page-intro a:hover {
  text-decoration-color: var(--sn2-primary-bright);
  text-decoration-thickness: 2px;
}
body[class*="sn2-"] .article-content > h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  margin: 28px 0 12px 0;
  line-height: 1.35;
  letter-spacing: -0.2px;
  border-bottom: none;
  padding-bottom: 0;
}
body[class*="sn2-"] .article-content > h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--sn2-text);
  margin: 22px 0 10px 0;
  line-height: 1.4;
}
body[class*="sn2-"] .article-content strong { color: var(--sn2-primary-bright); }
body[class*="sn2-"] .article-content table strong,
body[class*="sn2-"] .article-content .item-info strong,
body[class*="sn2-"] .article-content .description-cell strong { color: inherit; }

/* ----------------------------------------------------------------
   Quick-link grid (top of hub page).
   Items can be enabled (<a>) or muted/disabled (<span class="muted">).
   ---------------------------------------------------------------- */
.sn2-quick-links {
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(70, 226, 248, 0.10) 0%, transparent 70%),
    linear-gradient(135deg, rgba(70, 226, 248, 0.05) 0%, rgba(10, 26, 46, 0.95) 50%, rgba(230, 124, 11, 0.04) 100%);
  border: 1px solid var(--sn2-border-strong);
  border-radius: 14px;
  padding: 16px 14px;
  margin: 22px -20px 18px -20px;
  width: calc(100% + 40px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  box-shadow: 0 0 30px rgba(70, 226, 248, 0.10);
}
.sn2-quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 102px;
  padding: 12px 8px;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  color: inherit;
  background: rgba(6, 19, 32, 0.5);
  border: 1px solid var(--sn2-border);
  box-sizing: border-box;
}
.sn2-quick-link::after { display: none !important; }
.sn2-quick-link:hover {
  background: rgba(70, 226, 248, 0.08);
  border-color: rgba(70, 226, 248, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}
.sn2-quick-link img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
.sn2-quick-link-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--sn2-primary-bright);
  line-height: 1;
}
.sn2-quick-link-name {
  font-size: 12px;
  color: var(--sn2-text);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  max-width: 11em;
}
/* Muted / "coming soon" quick-link variant */
.sn2-quick-link.muted {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: auto;
}
.sn2-quick-link.muted:hover {
  background: rgba(6, 19, 32, 0.5);
  border-color: var(--sn2-border);
  box-shadow: none;
  transform: none;
}
.sn2-quick-link.muted .sn2-quick-link-number {
  color: var(--sn2-text-faint);
}

@media (max-width: 1024px) {
  .sn2-quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 12px;
  }
  .sn2-quick-link {
    min-height: 96px;
    padding: 10px 6px;
  }
}
@media (max-width: 600px) {
  .sn2-quick-links {
    margin: 16px -10px 14px -10px;
    width: calc(100% + 20px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 10px;
    gap: 8px;
    border-radius: 12px;
  }
  .sn2-quick-link {
    min-height: 92px;
    padding: 10px 6px;
    gap: 6px;
    border-radius: 10px;
  }
  .sn2-quick-link img { width: 38px; height: 38px; }
  .sn2-quick-link-number { font-size: 18px; }
  .sn2-quick-link-name { font-size: 11px; max-width: 100%; }
}

/* ----------------------------------------------------------------
   Checklist page intros (hierarchy aligned with KCD2 checklist pages)
   ---------------------------------------------------------------- */
body[class*="sn2-"] .sn2-checklist-intro-overview {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  margin: 0 0 12px 0;
}
body[class*="sn2-"] .sn2-checklist-intro-section {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  margin: 20px 0 10px 0;
}
body[class*="sn2-"] .sn2-checklist-intro-locator {
  font-style: italic;
  color: var(--sn2-text-faint);
  border-left: 3px solid var(--sn2-primary);
  padding-left: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

/* ----------------------------------------------------------------
   Section heading
   ---------------------------------------------------------------- */
.sn2-section-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  margin: 28px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sn2-primary-dim);
}

/* Spreadsheet subsection (Subsection:) — sits under a Section h2 */
.sn2-subsection-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  margin: 22px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--sn2-primary-dim);
}

.article-content > .sn2-section-heading + .sn2-subsection-heading {
  margin-top: 14px;
}

/* ----------------------------------------------------------------
   Row list - flat, single-line title + arrow.
   ---------------------------------------------------------------- */
.sn2-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sn2-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--sn2-bg-card);
  border: 1px solid var(--sn2-border);
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: inherit !important;
}
.sn2-row::after { display: none !important; }
.sn2-row:hover {
  border-color: var(--sn2-primary);
  background: linear-gradient(180deg, rgba(70, 226, 248, 0.06) 0%, var(--sn2-bg-card) 100%);
  transform: translateX(3px);
  box-shadow: 0 4px 18px rgba(70, 226, 248, 0.12);
}
.sn2-row.featured {
  border-color: var(--sn2-primary);
  background: linear-gradient(135deg, rgba(70, 226, 248, 0.08) 0%, var(--sn2-bg-card) 100%);
}
.sn2-row-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn2-row-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
.sn2-row-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--sn2-primary-bright);
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}
.sn2-row-arrow {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--sn2-primary);
  transition: transform 0.2s ease;
}
.sn2-row:hover .sn2-row-arrow { transform: translateX(3px); color: var(--sn2-primary-bright); }
/* Disabled / "Coming soon" row */
.sn2-row.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.sn2-row.disabled:hover {
  transform: none;
  border-color: var(--sn2-border);
  background: var(--sn2-bg-card);
  box-shadow: none;
}

/* Hub guide links: wide thumbnail instead of square icon */
.sn2-row.sn2-row-with-thumb {
  align-items: center;
  padding: 12px 16px;
  gap: 16px;
}
.sn2-row-thumb {
  flex: 0 0 240px;
  width: 240px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--sn2-border-strong);
  background: rgba(6, 19, 32, 0.85);
  box-shadow: inset 0 0 0 1px rgba(70, 226, 248, 0.06);
}
.sn2-row-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
@media (max-width: 520px) {
  .sn2-row.sn2-row-with-thumb {
    flex-wrap: wrap;
    align-items: center;
  }
  .sn2-row-thumb {
    flex: 1 1 100%;
    width: 100%;
    max-height: 200px;
  }
  .sn2-row.sn2-row-with-thumb .sn2-row-title {
    flex: 1;
    min-width: 0;
  }
}

.sn2-soon-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--sn2-secondary-bright);
  background: var(--sn2-secondary-dim);
  border: 1px solid rgba(230, 124, 11, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ----------------------------------------------------------------
   Boxes - tip / important / warning.
   The icon must be vertically centred against the body text.
   Three semantic variants:
     .sn2-box.normal   -> Blue Normal (default cyan tone)
     .sn2-box.important -> Blue Important (stronger left-stripe)
     .sn2-box.warning   -> Warning / amber
   Backwards-compatible aliases: .tip, .depth, .warn keep working.
   ---------------------------------------------------------------- */
.sn2-box {
  display: flex;
  align-items: center;     /* vertical centring of icon vs text */
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--sn2-border);
  background: var(--sn2-primary-soft);
  margin: 12px 0;
}
.sn2-box-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn2-box-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
.sn2-box-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sn2-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 4px 0;
}
.sn2-box-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sn2-text);
}

/* Variants */
.sn2-box.normal,
.sn2-box.tip {
  background: var(--sn2-primary-soft);
  border-color: var(--sn2-border-strong);
}
.sn2-box.important,
.sn2-box.depth {
  background: linear-gradient(90deg, rgba(70, 226, 248, 0.12) 0%, rgba(6, 19, 32, 0.92) 100%);
  border-color: var(--sn2-border-strong);
  border-left: 4px solid var(--sn2-primary);
}
.sn2-box.warning,
.sn2-box.warn {
  background: var(--sn2-warning-dim);
  border-color: rgba(255, 180, 84, 0.45);
  border-left: 4px solid var(--sn2-warning);
}
.sn2-box.warning .sn2-box-title,
.sn2-box.warn .sn2-box-title {
  color: var(--sn2-warning);
}

/* Hub launch notice: multi-paragraph + list (icon aligned to top) */
.sn2-box.sn2-hub-launch-notice {
  align-items: flex-start;
}
.sn2-box.sn2-hub-launch-notice .sn2-box-icon {
  margin-top: 2px;
}
.sn2-box-body ul {
  margin: 12px 0 0 0;
  padding-left: 1.25em;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sn2-text);
}
.sn2-box-body li {
  margin: 0.35em 0;
}

/* ----------------------------------------------------------------
   Stats / progress card on checklist pages
   ---------------------------------------------------------------- */
body[class*="sn2-"] .location-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0 12px 0;
}
body[class*="sn2-"] .stat-item {
  padding: 10px 22px;
  background: var(--sn2-bg-card);
  border-radius: 10px;
  border: 1px solid var(--sn2-border);
  text-align: center;
}
body[class*="sn2-"] .stat-value {
  font-size: 22px;
  font-weight: 700;
  display: block;
  color: var(--sn2-primary-bright);
}
body[class*="sn2-"] .stat-label {
  font-size: 11px;
  color: var(--sn2-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
  display: block;
}
body[class*="sn2-"] .stat-item.progress-zero { border-color: rgba(70, 226, 248, 0.3); }
body[class*="sn2-"] .stat-item.progress-zero .stat-value { color: var(--sn2-text-faint); }
body[class*="sn2-"] .stat-item.progress-low { border-color: var(--sn2-warning); }
body[class*="sn2-"] .stat-item.progress-low .stat-value { color: var(--sn2-warning); }
body[class*="sn2-"] .stat-item.progress-medium,
body[class*="sn2-"] .stat-item.progress-high {
  border-color: var(--sn2-primary);
}
body[class*="sn2-"] .stat-item.progress-medium .stat-value,
body[class*="sn2-"] .stat-item.progress-high .stat-value {
  color: var(--sn2-primary);
}
body[class*="sn2-"] .stat-item.progress-complete {
  border-color: var(--sn2-primary-bright);
  box-shadow: 0 0 12px rgba(70, 226, 248, 0.35);
}

/* Progress counters in section headers */
body[class*="sn2-"] .progress-counter.progress-zero { color: var(--sn2-text-faint) !important; }
body[class*="sn2-"] .progress-counter.progress-low { color: var(--sn2-warning) !important; }
body[class*="sn2-"] .progress-counter.progress-medium,
body[class*="sn2-"] .progress-counter.progress-high { color: var(--sn2-primary) !important; }
body[class*="sn2-"] .progress-counter.progress-complete { color: var(--sn2-primary-bright) !important; }

/* ----------------------------------------------------------------
   Checklist tables
   ---------------------------------------------------------------- */
body[class*="sn2-"] .card {
  background: linear-gradient(180deg, rgba(17, 36, 61, 0.9) 0%, rgba(6, 19, 32, 0.95) 100%) !important;
  border: 1px solid var(--sn2-border) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(70, 226, 248, 0.04) !important;
}
body[class*="sn2-"] .section-header {
  background: linear-gradient(to right, rgba(70, 226, 248, 0.10) 0%, transparent 100%) !important;
  border-left: 4px solid var(--sn2-primary) !important;
  padding: 10px 14px !important;
}
body[class*="sn2-"] .section-header h2,
body[class*="sn2-"] .section-header h3,
body[class*="sn2-"] .section-header .sn2-card-table-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: var(--sn2-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}
body[class*="sn2-"] .section-header h2 strong,
body[class*="sn2-"] .section-header h3 strong,
body[class*="sn2-"] .section-header .sn2-card-table-title strong { font-weight: 600 !important; }
body[class*="sn2-"] .section-title { color: var(--sn2-primary-bright) !important; }

/* Table chrome */
body[class*="sn2-"] table thead tr {
  background: linear-gradient(180deg, rgba(70, 226, 248, 0.10) 0%, rgba(70, 226, 248, 0.03) 100%);
  border-bottom: 2px solid var(--sn2-primary);
}
body[class*="sn2-"] table thead th {
  color: var(--sn2-text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 6px !important;
  line-height: 1.2 !important;
}
body[class*="sn2-"] table tbody tr {
  background: rgba(17, 36, 61, 0.55);
  border-bottom: 1px solid var(--sn2-border);
}
body[class*="sn2-"] table tbody tr:hover { background: rgba(70, 226, 248, 0.06); }

body[class*="sn2-"] input[type="checkbox"] {
  border-color: rgba(70, 226, 248, 0.5) !important;
  background: rgba(6, 19, 32, 0.7) !important;
}
body[class*="sn2-"] input[type="checkbox"]:checked {
  background: var(--sn2-primary) !important;
  border-color: var(--sn2-primary-bright) !important;
  box-shadow: 0 0 8px rgba(70, 226, 248, 0.6);
}

body[class*="sn2-"] .collapse-btn,
body[class*="sn2-"] .options-btn {
  border-color: var(--sn2-border-strong) !important;
  color: var(--sn2-text) !important;
}
body[class*="sn2-"] .collapse-btn:hover,
body[class*="sn2-"] .options-btn:hover {
  background: var(--sn2-primary-dim) !important;
  border-color: var(--sn2-primary) !important;
  color: var(--sn2-primary-bright) !important;
}
body[class*="sn2-"] .table-action-btn { color: var(--sn2-primary-bright) !important; }
body[class*="sn2-"] .table-action-btn:hover { background: var(--sn2-primary-dim) !important; }

/* Item info column - Name / Biome / Category */
body[class*="sn2-"] .item-info .item-name {
  color: var(--sn2-text);
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
body[class*="sn2-"] .item-info .item-biome {
  font-size: 12px;
  color: var(--sn2-text-dim);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
body[class*="sn2-"] .item-info .item-biome .sn2-biome-field-label {
  flex-shrink: 0;
  color: inherit;
}
body[class*="sn2-"] .item-info .item-biome .sn2-biome-pill-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
body[class*="sn2-"] .item-info .item-type {
  font-size: 11px;
  color: var(--sn2-text-faint);
  font-style: italic;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Biomes checklist: biome title is the colored pill (align with sn2-biome-pill scale in item-name) */
body.sn2-biomes-checklist .item-info .item-name .sn2-biome-pill {
  font-size: 13px;
  padding: 2px 10px;
}

/* Description column - smaller font */
body[class*="sn2-"] .description-cell {
  color: var(--sn2-text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}
body[class*="sn2-"] .description-cell p { margin: 0 0 4px 0; }
body[class*="sn2-"] .description-cell p:last-child { margin-bottom: 0; }
body[class*="sn2-"] .description-cell strong { color: var(--sn2-primary-bright); }

/* Cross-links inside checklist table descriptions (distinct from biome pill links) */
body[class*="sn2-"] .description-cell a:not(.sn2-biome-pill) {
  color: var(--sn2-primary-bright);
  text-decoration: underline;
  text-decoration-color: rgba(70, 226, 248, 0.45);
  text-underline-offset: 2px;
  font-weight: 600;
}
body[class*="sn2-"] .description-cell a:not(.sn2-biome-pill):hover {
  color: var(--sn2-primary-bright);
  text-decoration-color: var(--sn2-primary-bright);
  text-decoration-thickness: 2px;
}

/* Inline reference images below description copy (never above the paragraphs) */
body[class*="sn2-"] .description-cell .sn2-description-media {
  margin: 12px 0 0 0;
  padding: 0;
}
body[class*="sn2-"] .description-cell .sn2-description-img {
  display: block;
  max-width: min(520px, 100%);
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--sn2-border);
}

/* Bigger checklist icons */
body[class*="sn2-"] .checklist-icon {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  object-fit: contain !important;
  border: 0 !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
  display: block;
}
body[class*="sn2-"] table tbody tr td:nth-child(2) {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  padding: 8px 4px !important;
  text-align: center;
  vertical-align: middle;
  overflow: visible !important;
}

@media (max-width: 768px) {
  body[class*="sn2-"] .checklist-icon {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
  }
  body[class*="sn2-"] table tbody tr td:nth-child(2) {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
  }

  /*
   Checklist markup uses colgroup 50px / 70px / 220px / * ; the fixed 220px item column
   steals the viewport on phones. (Tables without colgroup, e.g. guide parts tables, skip this.)
   */
  body[class*="sn2-"] .article-content table:has(colgroup) {
    table-layout: fixed !important;
    width: 100% !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) colgroup col:nth-child(1) {
    width: 42px !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) colgroup col:nth-child(2) {
    width: 52px !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) colgroup col:nth-child(3) {
    width: 24% !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) colgroup col:nth-child(4) {
    width: auto !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) thead th:first-child,
  body[class*="sn2-"] .article-content table:has(colgroup) tbody td:first-child {
    width: 42px !important;
    max-width: 42px !important;
    padding: 6px 4px !important;
    box-sizing: border-box;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) tbody td:first-child {
    vertical-align: middle !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) thead th:nth-child(3),
  body[class*="sn2-"] .article-content table:has(colgroup) tbody td:nth-child(3) {
    min-width: 0 !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 8px 6px !important;
    vertical-align: middle !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) thead th:nth-child(4),
  body[class*="sn2-"] .article-content table:has(colgroup) tbody td:nth-child(4) {
    min-width: 0 !important;
    padding: 8px 6px !important;
    vertical-align: middle !important;
  }
  body[class*="sn2-"] .article-content table:has(colgroup) .item-info {
    min-width: 0;
  }
  /* Biome label on its own line; pills wrap below so they never squeeze beside "Biome:" */
  body[class*="sn2-"] .item-info .item-biome {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  body[class*="sn2-"] .item-info .item-biome .sn2-biome-pill-row {
    width: 100%;
  }
}

/* Biome / region pills */
.sn2-biome-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sn2-primary-dim);
  color: var(--sn2-primary-bright);
  border: 1px solid var(--sn2-border-strong);
}
.sn2-biome-pill.shallow { background: rgba(123, 240, 255, 0.14); color: #b5f6ff; border-color: rgba(123, 240, 255, 0.4); }
/* Habitat / Cyclops fabricator style hub (not Shallows water biome) */
.sn2-biome-pill.sn2-biome-base {
  background: rgba(148, 156, 172, 0.18);
  color: #d2d8e3;
  border-color: rgba(148, 156, 172, 0.5);
}
.sn2-biome-pill.kelp { background: rgba(132, 240, 110, 0.14); color: #b8f5a3; border-color: rgba(132, 240, 110, 0.4); }
.sn2-biome-pill.grand-reef { background: rgba(160, 110, 240, 0.16); color: #d3b5ff; border-color: rgba(160, 110, 240, 0.45); }
.sn2-biome-pill.deep { background: rgba(230, 124, 11, 0.16); color: var(--sn2-secondary-bright); border-color: rgba(230, 124, 11, 0.45); }

/* Named biome pills: one distinct colour token per biome (shared across checklist cross-links). */
.sn2-biome-pill.sn2-bm-starting-shallows {
  background: rgba(72, 196, 255, 0.16);
  color: #93eaff;
  border-color: rgba(100, 210, 255, 0.48);
}
.sn2-biome-pill.sn2-bm-stone-pillars {
  background: rgba(118, 142, 168, 0.22);
  color: #c9dce9;
  border-color: rgba(138, 165, 192, 0.5);
}
.sn2-biome-pill.sn2-bm-camp-one {
  background: rgba(255, 142, 110, 0.16);
  color: #ffccb8;
  border-color: rgba(255, 155, 120, 0.48);
}
.sn2-biome-pill.sn2-bm-stone-mushrooms {
  background: rgba(175, 150, 210, 0.14);
  color: #dfd0f5;
  border-color: rgba(188, 160, 220, 0.42);
}
.sn2-biome-pill.sn2-bm-old-habitat {
  background: rgba(200, 115, 88, 0.18);
  color: #f0c4ac;
  border-color: rgba(210, 128, 100, 0.48);
}
.sn2-biome-pill.sn2-bm-cicada-wreck {
  background: rgba(68, 105, 210, 0.2);
  color: #aec8ff;
  border-color: rgba(88, 125, 230, 0.52);
}
.sn2-biome-pill.sn2-bm-infested-caves {
  background: rgba(125, 55, 95, 0.34);
  color: #f0b8d4;
  border-color: rgba(155, 75, 118, 0.55);
}
.sn2-biome-pill.sn2-bm-necrolei-forest {
  background: rgba(196, 75, 255, 0.2);
  color: #eab4ff;
  border-color: rgba(212, 100, 255, 0.55);
}
.sn2-biome-pill.sn2-bm-coral-desert {
  background: rgba(255, 160, 120, 0.18);
  color: #ffd4c0;
  border-color: rgba(255, 175, 130, 0.5);
}
.sn2-biome-pill.sn2-bm-coral-forest {
  background: rgba(74, 180, 130, 0.2);
  color: #a8f0d0;
  border-color: rgba(90, 200, 150, 0.5);
}
.sn2-biome-pill.sn2-bm-sulfur-pyres {
  background: rgba(255, 56, 20, 0.24);
  color: #ffae94;
  border-color: rgba(255, 90, 40, 0.58);
}
.sn2-biome-pill.sn2-bm-hot-cave {
  background: rgba(255, 175, 70, 0.24);
  color: #ffe8b8;
  border-color: rgba(255, 188, 90, 0.56);
}
.sn2-biome-pill.sn2-bm-the-cliff {
  background: rgba(212, 186, 128, 0.22);
  color: #f5ebd0;
  border-color: rgba(222, 198, 140, 0.5);
}
.sn2-biome-pill.sn2-bm-sparse-plains {
  background: rgba(88, 102, 118, 0.32);
  color: #c5d4e3;
  border-color: rgba(105, 122, 140, 0.52);
}
.sn2-biome-pill.sn2-bm-alien-ruins {
  background: rgba(26, 198, 168, 0.18);
  color: #6effde;
  border-color: rgba(40, 215, 185, 0.5);
}
.sn2-biome-pill.sn2-bm-red-grass-mesa {
  background: rgba(185, 30, 85, 0.3);
  color: #ff9ebd;
  border-color: rgba(220, 55, 105, 0.58);
}
/* Legacy token; same visuals as Red Grass Mesa. */
.sn2-biome-pill.sn2-bm-red-grass-canyons {
  background: rgba(185, 30, 85, 0.3);
  color: #ff9ebd;
  border-color: rgba(220, 55, 105, 0.58);
}
.sn2-biome-pill.sn2-bm-metal-farms {
  background: rgba(220, 200, 64, 0.22);
  color: #fff3a8;
  border-color: rgba(240, 210, 80, 0.52);
}
.sn2-biome-pill.sn2-bm-void {
  background: rgba(26, 34, 92, 0.58);
  color: #a8bcf5;
  border-color: rgba(52, 68, 160, 0.62);
}
.sn2-biome-pill.sn2-bm-unknown {
  background: rgba(110, 125, 150, 0.16);
  color: #cdd6e3;
  border-color: rgba(130, 145, 170, 0.45);
}
.sn2-biome-pill.sn2-bm-all-biomes {
  background: rgba(90, 220, 200, 0.12);
  color: #9cf0e8;
  border-color: rgba(96, 210, 195, 0.42);
}
.sn2-biome-pill.sn2-bm-prologue {
  background: rgba(100, 150, 200, 0.16);
  color: #b8dbf5;
  border-color: rgba(120, 170, 210, 0.48);
}

a.sn2-biome-pill {
  text-decoration: none;
  cursor: pointer;
}
a.sn2-biome-pill:hover {
  filter: brightness(1.06);
}
a.sn2-biome-pill:focus-visible {
  outline: 2px solid var(--sn2-primary-bright);
  outline-offset: 2px;
}

.sn2-danger {
  color: var(--sn2-secondary-bright);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11.5px;
}

/* Fauna temperament opener (pairs with .sn2-danger for hostile entries) */
.sn2-temperament-peaceful {
  color: var(--sn2-primary-bright);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11.5px;
}

.sn2-temperament-corpse {
  color: #b0b8c4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11.5px;
}

/* Buttons */
.sn2-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid var(--sn2-primary);
  background: var(--sn2-primary-dim);
  color: var(--sn2-primary-bright);
  cursor: pointer;
}
.sn2-btn:hover {
  background: var(--sn2-primary);
  color: var(--sn2-deep);
  box-shadow: 0 4px 18px rgba(70, 226, 248, 0.35);
}
.sn2-btn.secondary {
  border-color: var(--sn2-secondary);
  background: var(--sn2-secondary-dim);
  color: var(--sn2-secondary-bright);
}
.sn2-btn.secondary:hover {
  background: var(--sn2-secondary);
  color: #1a0a00;
  box-shadow: 0 4px 18px rgba(230, 124, 11, 0.35);
}

/* Box-style label heading above the box examples */
.sn2-boxes-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--sn2-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 18px 0 6px 0;
}

/* ----------------------------------------------------------------
   Element stash - reusable design pieces in one place.
   Each card shows the element + the filename / class to copy.
   ---------------------------------------------------------------- */
.sn2-stash-section {
  margin-top: 32px;
  padding: 18px 18px 22px 18px;
  border: 1px dashed var(--sn2-border-strong);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(70, 226, 248, 0.04) 0%, rgba(6, 19, 32, 0.6) 100%);
}
.sn2-stash-section > .sn2-stash-intro {
  font-size: 13.5px;
  color: var(--sn2-text-dim);
  margin: 0 0 14px 0;
}
.sn2-stash-section code {
  background: rgba(70, 226, 248, 0.10);
  border: 1px solid var(--sn2-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--sn2-primary-bright);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.sn2-stash-group {
  margin: 18px 0 0 0;
}
.sn2-stash-group:first-of-type { margin-top: 0; }
.sn2-stash-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sn2-primary-bright);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--sn2-border);
}

/* Icon library grid */
.sn2-stash-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.sn2-stash-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(6, 19, 32, 0.6);
  border: 1px solid var(--sn2-border);
  border-radius: 10px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.sn2-stash-icon:hover {
  border-color: var(--sn2-primary);
  transform: translateY(-2px);
}
.sn2-stash-icon img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.sn2-stash-icon .sn2-stash-file {
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--sn2-text-dim);
  word-break: break-all;
  line-height: 1.3;
}

/* Generic stash row: a card with the element on the left and its
   class/usage label on the right. */
.sn2-stash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(6, 19, 32, 0.55);
  border: 1px solid var(--sn2-border);
  border-radius: 10px;
  margin: 0 0 10px 0;
}
.sn2-stash-row:last-child { margin-bottom: 0; }
.sn2-stash-row-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--sn2-text-dim);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.sn2-stash-row-label strong {
  display: block;
  color: var(--sn2-primary-bright) !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.sn2-stash-row-demo > * { margin: 0 !important; }

/* Inline pill row used to demo all biome/danger pills together */
.sn2-stash-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 700px) {
  .sn2-stash-row {
    grid-template-columns: 1fr;
  }
  .sn2-stash-row-label { order: 2; }
  .sn2-stash-row-demo { order: 1; }
}

/* Strip the auto-arrow that styles.css adds to ::after on links. */
body[class*="sn2-"] .sn2-btn::after,
body[class*="sn2-"] .sn2-row::after,
body[class*="sn2-"] .sn2-quick-link::after { content: none !important; display: none !important; }

/* ----------------------------------------------------------------
   Guide pages (long-form articles, e.g. subnautica2/guides/*.html)
   ---------------------------------------------------------------- */
body.sn2-guide .article-content.sn2-guide-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--sn2-text-dim);
}
body.sn2-guide .article-content.sn2-guide-body > p {
  margin: 0 0 14px 0;
}
body.sn2-guide header h1 {
  color: var(--sn2-primary-bright);
  font-size: 1.75rem;
  line-height: 1.25;
  margin-bottom: 18px;
}
body.sn2-guide .sn2-section-heading {
  margin-top: 28px;
  margin-bottom: 12px;
}
body.sn2-guide .sn2-guide-subhead {
  font-size: 15px;
  font-weight: 600;
  color: var(--sn2-text);
  margin: 22px 0 8px 0;
}
body.sn2-guide .sn2-guide-list {
  margin: 0 0 16px 0;
  padding-left: 1.25em;
  color: var(--sn2-text-dim);
}
body.sn2-guide .sn2-guide-list li {
  margin: 6px 0;
}
body.sn2-guide .article-content a {
  color: var(--sn2-primary-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.sn2-guide .article-content a:hover {
  color: var(--sn2-secondary-bright);
}
body.sn2-guide .sn2-guide-media {
  margin: 22px 0;
  padding: 0;
}
body.sn2-guide .sn2-guide-media-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--sn2-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
body.sn2-guide .sn2-guide-table-card {
  overflow-x: auto;
  padding: 12px 14px !important;
}
body.sn2-guide .sn2-guide-parts-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}
body.sn2-guide .sn2-guide-parts-table th,
body.sn2-guide .sn2-guide-parts-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
body.sn2-guide .sn2-guide-parts-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sn2-primary-bright);
}
