/* TeraWiki — a quiet, consistent reading surface. */
:root {
  --sidebar: 224px;
  --pure-width: 920px;
  --pure-body: 14px;
}

body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: var(--pure-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a, button, summary { -webkit-tap-highlight-color: transparent; }
a:hover, button:hover { transform: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

/* A small header and a stable navigation rail. */
.topbar { gap: 24px; padding: 0 28px; background: #080a07f2; }
.brand { min-width: 166px; font-size: 20px; }
.brand img { width: 37px; height: 37px; }
.global-search-button {
  min-width: 230px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.global-search-button kbd { border: 0; color: #757b6d; background: transparent; }
.ip-button { min-width: 156px; border: 0; background: transparent; padding: 7px 29px 7px 0; }
.ip-button small { color: #7e8574; font-size: 8px; }
.ip-button strong { font-size: 13px; }
.ip-button > span { right: 0; }
.ip-button:hover { background: transparent; }
.ip-button:hover small { color: var(--muted); }
.ip-button:hover strong, .ip-button:hover > span { color: var(--gold); }
.ip-button.copied { background: transparent; }
.ip-button.copied :is(small, strong, span) { color: var(--gold); }
.mockup-tag, .reading-progress, .sidebar-bottom, .sidebar .nav-label,
.sidebar nav a > i, .hero-topline, .hero-shortcuts, .hero-coordinates,
.scroll-hint, .related-guides, .money-path, .craft-route, .two-paths { display: none; }
.sidebar { padding: 32px 15px; background: var(--bg); }
.sidebar nav { gap: 4px; }
.sidebar nav a {
  min-height: 39px;
  padding: 9px 12px;
  gap: 12px;
  font-size: 12px;
  color: #9ea591;
  border-radius: 6px;
}
.sidebar nav a > span { font-size: 15px; opacity: .85; }
.sidebar nav a.active { color: var(--text); background: #151911; box-shadow: inset 2px 0 var(--gold); }
.sidebar nav a:hover { color: var(--text); background: #11150e; }

/* Logo, one sentence, one action. */
.welcome {
  min-height: calc(100svh - var(--top));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.welcome-inner {
  width: min(800px, calc(100% - 80px));
  padding: 72px 0 88px;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}
.welcome .main-logo {
  width: min(600px, 100%);
  max-width: 100%;
  margin: 0 0 32px;
  align-self: center;
  filter: none;
}
.welcome h1 { display: none; }
.welcome-inner > p, .welcome .hero-description {
  max-width: 540px;
  margin: 0 0 26px;
  color: #aab19e;
  font-size: 15px;
  line-height: 1.7;
}
.welcome-inner > a, .welcome .primary-button {
  display: inline-flex;
  width: auto;
  gap: 16px;
  align-items: center;
  min-height: 42px;
  padding: 10px 19px;
  color: #171707;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}
.welcome-inner > a:hover, .welcome .primary-button:hover { background: #ffda65; border-color: #ffda65; }
.hero-actions { width: auto; margin: 0; }

/* The same title and spacing rhythm throughout the guide. */
.doc { width: min(var(--pure-width), calc(100% - 112px)); }
.doc-section {
  --section-body-text: 14px;
  --section-card-title: 19px;
  --section-caption: 12px;
  --section-eyebrow: 12px;
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--line);
}
.section-title { display: block; margin: 0 0 20px; }
.section-title > span, .section-title p { display: none; }
.section-title h1, .section-title h2 {
  display: inline-block;
  max-width: 100%;
  padding: 8px 13px 9px;
  color: var(--section-accent, var(--text));
  border: 1px solid color-mix(in srgb, var(--section-accent, var(--text)) 23%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--section-accent, var(--text)) 6%, transparent);
  font-size: clamp(26px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.035em;
}
.doc-section > .lead, .pure-lead {
  max-width: 680px;
  margin: 0 0 28px;
  color: #aab29e;
  font-size: 15px;
  line-height: 1.8;
}
.doc-section h3 { color: var(--text); font-size: 18px; font-weight: 550; letter-spacing: -.02em; line-height: 1.4; }
.doc-section h4 { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.5; }
.doc-section p { color: #a5ae98; }
.doc-section code { font-size: .94em; }
.doc-section strong { color: #d8decc; font-weight: 550; }
.doc-section a:not(.grade-shop-button) { text-underline-offset: 4px; }
.text-link, .small-guide-link, .creative-map-link { font-size: 13px; color: var(--gold); }
.eyebrow, .neutral-label, .rank-label, .prototype-note,
.rank-process, .milestones-heading, .milestones-grid { display: none; }
.fine-print, .verification { font-size: 12px !important; line-height: 1.7 !important; color: #89937e !important; }

/* Three essential actions, presented as a list rather than a dashboard. */
.essentials-list { display: grid; gap: 0; }
.essential-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 21px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.essential-row:first-child { border-top: 0; padding-top: 4px; }
.essential-row:last-child { padding-bottom: 2px; }
.essential-icon {
  display: grid;
  place-items: start center;
  padding-top: 2px;
  width: 40px;
  color: var(--gold);
  font-size: 23px;
  line-height: 1.5;
  background: transparent;
  border: 0;
}
.essential-icon img { width: 33px; height: 33px; object-fit: contain; }
.essential-row h3 { margin: 0 0 5px; font-size: 17px; }
.essential-row p { margin: 0 0 9px; max-width: 650px; font-size: 14px; line-height: 1.7; }
.essential-row a { display: inline; color: var(--gold); font-size: 13px; }
.essential-row a:hover { text-decoration: underline; }

/* The only expansion pattern: a title, a quiet separator, a clear affordance. */
.disclosure {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.disclosure:last-child { border-bottom: 0; }
.disclosure > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary > h3 { margin: 0; font-size: 17px; font-weight: 500; }
.disclosure > summary > span { flex: 0 0 20px; color: var(--section-accent, var(--gold)); font-size: 20px; font-weight: 300; line-height: 1; text-align: center; }
.disclosure > summary:hover h3 { color: #fff; }
.disclosure[open] > summary > span { transform: rotate(45deg); }
.disclosure-content { padding: 2px 0 32px; }
.doc-section > .disclosure:last-child:not([open]) > summary { padding-bottom: 8px; }
.doc-section > .disclosure:last-child > .disclosure-content { padding-bottom: 4px; }
.disclosure-content p, .disclosure-content li { font-size: 14px !important; line-height: 1.8; }
.disclosure-content p { margin: 0 0 16px; }
.disclosure-content p:last-child { margin-bottom: 0; }
.disclosure-content h3 { margin: 26px 0 12px; }
.disclosure-content h4 { margin: 22px 0 10px; text-transform: none; letter-spacing: 0; }
.disclosure-content img { max-width: 100%; height: auto; }
.disclosure-content figcaption { margin-top: 10px; color: #88947d; font-size: 12px; line-height: 1.6; }
.disclosure-content figure { margin: 22px 0; }

/* Remove inherited frames while preserving useful internal layouts. */
.disclosure-content :is(.feature-card, .bank-card, .subsection-card, .practical-card,
  .creative-panel, .casino-mini-card, .trophy-card, .map-doc, .worlds-legend,
  .rank-explanation, .rank-browser, .recipes-npcs, .alcohol-tip, .soft-note,
  .armor-tutorial, .tutorial-steps article, .tutorial-images figure, .bank-gui,
  .all-mob-heads-logo, .creative-lead) {
  min-height: 0;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.disclosure-content :is(.feature-card, .bank-card, .practical-card, .trophy-card) { gap: 28px; }
.disclosure-content :is(.feature-card, .feature-card-wide, .feature-card-copy, .bank-guide) { display: block; }
.disclosure-content .feature-card > div:first-child { max-width: none; }
.disclosure-content :is(.feature-card, .bank-card, .subsection-card, .creative-grid,
  .recipes-npcs, .armor-tutorial, .alcohol-tip, .soft-note) + :is(.feature-card,
  .bank-card, .subsection-card, .creative-grid, .recipes-npcs, .armor-tutorial,
  .alcohol-tip, .soft-note) { margin-top: 28px; }
.disclosure-content :is(.feature-card > div > span, .bank-card-copy > span,
  .creative-panel > span, .creative-panel > div > span, .recipes-npcs > div > span,
  .casino-compact-heading > div > span, .worlds-legend-eyebrow) { display: none; }
.disclosure-content :is(.feature-card-action, .useful-commands > div) {
  min-width: 0;
  width: auto;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.disclosure-content .feature-card-action small { display: none; }
.disclosure-content .feature-card-action code { font-size: 14px; font-weight: 500; }
.disclosure-content .feature-card-note { margin: 12px 0 0; color: #8d987f; font-size: 12px; }
.disclosure-content .useful-commands { min-width: 0; gap: 18px; }
.disclosure-content .useful-commands code { font-size: 13px; }
.disclosure-content .useful-commands span { font-size: 12px; }
.disclosure-content .bank-guide-columns { margin-top: 24px; gap: 38px; }
.disclosure-content :is(.bank-guide-steps, .bank-steps, .creative-steps) { margin-top: 16px; padding-top: 0; gap: 11px; }
.disclosure-content :is(.bank-guide-steps, .bank-steps, .creative-steps) li { align-items: flex-start; }
.disclosure-content :is(.bank-steps, .creative-steps) li > b {
  flex: 0 0 20px;
  width: 20px;
  height: 24px;
  color: #9ba88c;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
}
.disclosure-content .price-grid { margin-top: 22px; gap: 0 24px; }
.disclosure-content .price-grid article {
  padding: 15px 0;
  gap: 12px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ffffff0d;
  border-radius: 0;
}
.disclosure-content .price-grid img { width: 26px; }
.disclosure-content .price-grid span strong { font-size: 12px; font-weight: 500; }
.disclosure-content .price-grid span small { font-size: 10px; color: #6f7b63; }
.disclosure-content .price-grid article > b { color: var(--gold); font-size: 12px; font-weight: 500; white-space: nowrap; }
.disclosure-content .map-doc { grid-template-columns: 1fr; gap: 24px; }
.disclosure-content .map-doc > img { max-height: 340px; border-radius: 6px; object-fit: cover; }
.disclosure-content .map-doc > div { height: auto; max-height: none; padding: 0; overflow: visible; }
.disclosure-content .map-doc span { display: none; }
.disclosure-content .map-doc a { margin-top: 8px; padding: 0; background: transparent; color: var(--gold); font-size: 13px; }
.disclosure-content .worlds-legend { display: block; margin-top: 24px; }
.disclosure-content .worlds-legend-guidance { display: grid; gap: 20px; }
.disclosure-content .worlds-legend-guidance > div { padding: 0; border: 0; background: transparent; }
.disclosure-content .worlds-legend-figure { margin-top: 24px; }
.disclosure-content .worlds-legend img { max-height: 300px; width: 100%; object-fit: contain; }
.disclosure-content .armor-tutorial { display: block; }
.disclosure-content .tutorial-steps { display: grid; gap: 22px; }
.disclosure-content .tutorial-steps article { display: grid; grid-template-columns: 20px 1fr; gap: 15px; }
.disclosure-content .tutorial-steps article > b { padding-top: 2px; width: 20px; color: #99a58a; background: transparent; font-size: 12px; }
.disclosure-content .tutorial-steps h3 { margin: 0 0 6px; font-size: 16px; }
.disclosure-content .tutorial-images { gap: 24px; margin-top: 28px; }
.disclosure-content .tutorial-images img { max-height: 340px; object-fit: contain; }
.disclosure-content .bank-gui img { max-height: 340px; width: 100%; object-fit: contain; }
.disclosure-content .all-mob-heads-logo img { max-width: 400px; margin: 24px auto 0; filter: none; }
#collection .bank-card-copy, #collection .all-mob-heads-logo { min-width: 0; }
#collection .all-mob-heads-logo img { width: min(400px, 100%); max-width: 100%; }
.disclosure-content .recipes-npcs { gap: 36px; }
.disclosure-content .recipes-npcs h3 { margin-top: 0; font-size: 18px; }
.disclosure-content .alcohol-tip { margin-top: 20px; color: #9da98d; font-size: 13px; line-height: 1.8; }
.disclosure-content .creative-grid { grid-template-columns: 1fr; gap: 28px; }
.disclosure-content .creative-panel h3 { margin-top: 0; }
.disclosure-content .creative-perks { gap: 20px; padding: 18px 0 0; max-width: 380px; }
.disclosure-content .creative-perks > div { border: 0; padding: 0; background: transparent; }
.disclosure-content .creative-perks strong { font-size: 22px; color: var(--text); font-weight: 500; }
.disclosure-content .creative-perks span { font-size: 12px; }
.disclosure-content .creative-map-link { padding-top: 12px; }
.disclosure-content .casino-compact-heading { display: block; margin-bottom: 24px; }
.disclosure-content .casino-compact-grid { gap: 26px; }
.disclosure-content .casino-mini-card h4 { margin-top: 14px; font-size: 16px; }
.disclosure-content .casino-mini-card img { border-radius: 5px; }
.disclosure-content .casino-mini-card :is(p, small) { font-size: 12px !important; }
.disclosure-content .casino-warning { padding: 16px 0 0; border: 0; background: transparent; font-size: 12px; color: #929e83; }
.disclosure-content .trophy-card > img { width: 68px; height: 76px; object-fit: contain; }

/* Ranks keeps its explanation visible and its technical details optional. */
#ranks .pure-lead { max-width: 700px; }
.ranks-location {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a4ae97;
  font-size: 14px;
  line-height: 1.8;
}
.ranks-location img { display: inline-block; vertical-align: middle; width: 28px; height: 28px; margin-right: 10px; object-fit: contain; }
.ranks-location strong { color: var(--text); }
.points-grid { max-width: 420px; margin: 22px 0 26px; gap: 28px; }
.points-grid > div { padding: 0; border: 0; border-radius: 0; background: transparent; }
.points-grid b { color: var(--text); font-size: 27px; font-weight: 500; }
.points-grid span { margin-top: 5px; font-size: 12px; }
/* Empty vanilla frames explain the three advancement categories. */
.points-grid.points-frames { max-width: 420px; grid-template-columns: 1fr; gap: 14px; }
.points-frames > div { display: grid; grid-template-columns: minmax(108px, 130px) 24px 52px; align-items: center; gap: 12px; }
.points-frames .point-type { display: flex; align-items: baseline; gap: 12px; }
.points-frames .point-type span { margin: 0; color: var(--muted); font-size: 13px; }
.points-frames .point-arrow { margin: 0; color: var(--muted); font-size: 20px; text-align: center; }
.points-frames .advancement-frame { width: 52px; height: 52px; image-rendering: pixelated; }

/* Existing grade and rule details use the same unboxed reading grammar. */
.grade-list, .rules-list { gap: 0; }
.grade-doc, .rules-list details { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.grade-doc > summary { grid-template-columns: 1fr auto; gap: 24px; padding: 22px 0; }
.grade-doc > summary > span { display: none; }
.grade-doc summary h3 { font-size: 17px; color: var(--text); }
.grade-doc summary p { font-size: 13px; margin-top: 5px; }
.grade-doc summary > b { font-size: 20px; color: var(--gold); font-weight: 300; }
.grade-body { padding: 0 0 28px; border: 0; }
.grade-body h4 { margin: 14px 0; color: var(--text); font-size: 13px; text-transform: none; letter-spacing: 0; }
.grade-benefits ul { gap: 10px 28px; }
.grade-benefits li { font-size: 13px; color: #a6b099; }
.grade-body li::before { color: #738562; }
.grade-shop-button { margin-top: 20px; padding: 0; border: 0; background: transparent; color: var(--gold); font-size: 13px; }
.grade-shop-button:hover { color: #ffdd76; background: transparent; transform: none; }
.rules-list summary { padding: 21px 0; grid-template-columns: 72px 1fr auto; gap: 18px; }
.rules-list summary span { font-size: 11px; font-weight: 400; text-transform: none; }
.rules-list summary strong { font-size: 16px; font-weight: 500; }
.rules-list ul { gap: 10px 28px; padding: 0 0 24px; }
.rules-list li { padding: 0; background: transparent; border-radius: 0; color: #a5ae98; font-size: 14px; line-height: 1.8; }
.links-grid { gap: 0 32px; }
.links-grid > a { min-height: 88px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; grid-template-columns: 28px 1fr auto; gap: 17px; }
.links-grid > a:hover { transform: none; background: transparent; }
.links-grid > a > span { width: 28px; height: 32px; border-radius: 0; background: transparent; }
.links-grid strong { font-size: 14px; font-weight: 500; }
.links-grid small { font-size: 12px; line-height: 1.6; margin-top: 3px; }
footer { width: min(var(--pure-width), calc(100% - 112px)); padding: 32px 0 40px; gap: 16px; color: #78856a; font-size: 10px; }
footer small { font-size: 10px; }

@media (max-width: 1100px) {
  :root { --sidebar: 208px; }
  .doc, footer { width: calc(100% - 72px); }
  .sidebar nav a { padding: 9px 9px; gap: 9px; font-size: 11px; }
  .topbar { gap: 18px; }
  .disclosure-content .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .topbar { padding: 0 24px; gap: 18px; }
  .brand { min-width: 140px; }
  .global-search-button { width: 210px; min-width: 0; }
  .ip-button { min-width: 145px; }
  .mobile-menu summary { background: transparent; border-color: var(--line); }
  .mobile-menu nav a { font-size: 13px; padding: 11px; }
  .mobile-menu nav a > i { display: none; }
  .welcome-inner { width: min(680px, calc(100% - 72px)); padding: 64px 0 80px; }
  .doc-section { padding: 40px 0 28px; }
  .section-title h2 { font-size: 28px; }
  .disclosure-content :is(.bank-card, .recipes-npcs, .bank-guide-columns) { grid-template-columns: 1fr; }
  #collection .bank-card { grid-template-columns: minmax(0, 1fr); }
  .disclosure-content .bank-gui { margin-top: 25px; }
  .disclosure-content .bank-gui img { max-height: 320px; }
  footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .brand { min-width: 0; gap: 6px; }
  .brand img { width: 32px; height: 34px; }
  .brand span { font-size: 18px; }
  .global-search-button { width: 30px; min-width: 0; height: 36px; padding: 0; margin-left: auto; font-size: 0; }
  .global-search-button > span { font-size: 23px; }
  .global-search-button kbd { display: none; }
  .ip-button { width: 30px; min-width: 0; height: 36px; padding: 0; margin: 0; }
  .ip-button small, .ip-button strong { display: none; }
  .ip-button > span { position: static; font-size: 17px; text-align: center; }
  .mobile-menu summary { padding: 7px 9px; }
  .welcome { min-height: calc(100svh - var(--top)); }
  .welcome-inner { width: calc(100% - 44px); padding: 50px 0 72px; }
  .welcome .main-logo { width: 100%; max-width: 440px; margin: 0 0 26px; }
  .welcome-inner > p, .welcome .hero-description { max-width: 310px; margin-bottom: 25px; font-size: 14px; }
  .welcome-inner > a, .welcome .primary-button { font-size: 13px; padding: 10px 18px; min-height: 42px; }
  .doc, footer { width: calc(100% - 40px); }
  .doc-section { padding: 32px 0 20px; }
  .section-title { margin-bottom: 20px; }
  .section-title h2 { padding: 7px 11px 8px; font-size: 26px; }
  .doc-section > .lead, .pure-lead { font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
  .essential-row { grid-template-columns: 28px minmax(0, 1fr); gap: 15px; padding: 24px 0; }
  .essential-icon { width: 28px; font-size: 21px; }
  .essential-icon img { width: 27px; height: 27px; }
  .essential-row h3 { font-size: 16px; }
  .essential-row p { font-size: 14px; }
  .essential-row a { font-size: 13px; overflow-wrap: anywhere; }
  .disclosure > summary { padding: 20px 0; gap: 15px; }
  .disclosure > summary > h3 { font-size: 16px; line-height: 1.5; }
  .disclosure-content { padding-bottom: 28px; }
  .disclosure-content :is(.bank-guide-columns, .recipes-npcs, .tutorial-images, .casino-compact-grid, .useful-commands) { grid-template-columns: 1fr; gap: 26px; }
  .disclosure-content .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .disclosure-content .price-grid article { grid-template-columns: 22px minmax(0, 1fr); gap: 5px 9px; padding: 14px 0; }
  .disclosure-content .price-grid img { width: 21px; grid-row: 1 / 3; }
  .disclosure-content .price-grid article > b { grid-column: 2; font-size: 12px; }
  .disclosure-content .price-grid span strong { font-size: 12px; line-height: 1.4; }
  .disclosure-content .price-grid span small { display: none; }
  .disclosure-content .map-doc > img { max-height: 230px; }
  .disclosure-content .creative-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .disclosure-content .creative-perks span { font-size: 11px; }
  .disclosure-content .trophy-card { display: flex; align-items: flex-start; gap: 18px; }
  .disclosure-content .trophy-card > img { width: 45px; height: 58px; flex-shrink: 0; }
  .ranks-location { font-size: 13px; }
  .points-grid { gap: 20px; margin: 20px 0 24px; }
  .points-grid b { font-size: 24px; }
  .points-grid span { font-size: 11px; }
  .grade-doc > summary { padding: 20px 0; }
  .grade-doc summary p { font-size: 13px; }
  .grade-benefits ul, .rules-list ul { grid-template-columns: 1fr; }
  .rules-list summary { padding: 20px 0; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; }
  .rules-list summary strong { font-size: 15px; }
  .rules-list summary span { font-size: 10px; }
  .links-grid { grid-template-columns: 1fr; }
  .links-grid small { font-size: 12px; }
  footer { grid-template-columns: 1fr; gap: 14px; padding: 27px 0 34px; }
  footer p, footer small, footer nav { font-size: 10px; }
  .skip-link { left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .disclosure > summary > span { transition: none; }
}

/* Finishing rules for the reduced markup. */
.welcome h1.sr-only{display:block;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.global-search-button{min-width:0;width:auto;gap:9px}
.global-search-button>.search-button-label{color:var(--muted);font-size:12px;line-height:1.4}
.community-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px}
.community-links>a{display:flex;align-items:center;gap:16px;padding:22px 0;border-bottom:1px solid var(--line);color:var(--text)}
.community-links>a>span{width:26px;color:var(--gold);font-size:19px;flex-shrink:0;display:grid;place-items:center}
.community-links strong{font-size:15px;font-weight:500}
.community-links>a>b{margin-left:auto;color:#818c74;font-size:15px;font-weight:400}
.community-links>a:hover strong{color:var(--gold)}
.section-footnote{margin-top:20px;font-size:13px;color:var(--muted)}
.section-footnote a{color:var(--gold)}
@media(max-width:600px){.global-search-button{width:30px}.global-search-button>.search-button-label{display:none}.community-links{grid-template-columns:1fr}.community-links>a{padding:19px 0}}

/* A world is a destination with a purpose; a protection answers a concrete task. */
.world-list{margin-top:2px}
.world-group{display:grid;grid-template-columns:minmax(160px,.9fr) minmax(0,1.1fr);gap:36px;padding:24px 0;border-top:1px solid var(--line)}
.world-group:last-child{border-bottom:0;padding-bottom:8px}
.world-group h3{margin:0 0 7px;font-size:17px;font-weight:550}
.world-group p{max-width:300px;margin:0;font-size:13px;line-height:1.75}
.world-group ul{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.world-group li{font-size:15px;color:#e0e5d7}
.world-group a{color:var(--gold)}
.worlds-map-link{display:inline-flex;margin-top:12px}
.protection-primary{padding:0 0 4px}
.protection-primary h3{margin:0 0 13px;font-size:17px}
.protection-primary>code{font-size:16px;display:inline-block;margin:0 0 12px;color:var(--gold)}
.protection-primary p{font-size:14px;line-height:1.8;margin:0}
#protections>.section-footnote{margin:14px 0 26px}
#protections>.section-footnote:last-child{margin:22px 0 0}
.protection-actions>div{margin-bottom:20px}
.protection-actions>div>code{display:inline-block;margin-bottom:7px}
@media(max-width:600px){.world-group{grid-template-columns:1fr 1fr;gap:22px;padding:20px 0}.world-group:last-child{padding-bottom:8px}.world-group p{font-size:12px}.world-group li{font-size:14px}.world-group h3{font-size:16px}}

/* Chapter accents stay consistent between headings and navigation. */
:is(#debuter, #economie, a[href="#debuter"], a[href="#economie"]) {
  --section-accent: #a8ce89;
}
:is(#reglement, a[href="#reglement"]) {
  --section-accent: #cfaa91;
}
:is(#ranks, #grades, a[href="#ranks"], a[href="#grades"]) {
  --section-accent: #e3bf72;
}
:is(#map, a[href="#map"]) {
  --section-accent: #75c9ef;
}
:is(#creatif, a[href="#creatif"]) {
  --section-accent: #f2a07a;
}
:is(#liens, a[href="#liens"]) {
  --section-accent: #94bed1;
}
:is(#protections, #alcool, a[href="#protections"], a[href="#alcool"]) {
  --section-accent: #b6a1d4;
}
:is(#decoration, #loisirs, a[href="#decoration"], a[href="#loisirs"]) {
  --section-accent: #d2a093;
}
.sidebar nav a > span, .mobile-menu nav a > span {
  color: var(--section-accent, var(--gold));
}
.sidebar nav a.active, .mobile-menu nav a.active {
  color: var(--text);
  background: color-mix(in srgb, var(--section-accent, var(--gold)) 8%, var(--bg));
  box-shadow: inset 2px 0 var(--section-accent, var(--gold));
}
.sidebar nav a:hover, .mobile-menu nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--section-accent, var(--gold)) 5%, var(--bg));
}
.essential-icon, .rules-list summary b, .grade-doc summary > b {
  color: var(--section-accent, var(--gold));
}
.community-links > a:nth-last-child(-n+2), .links-grid > a:nth-last-child(-n+2) {
  border-bottom: 0;
}
@media (max-width: 600px) {
  .community-links > a, .links-grid > a { border-bottom: 1px solid var(--line); }
  .community-links > a:last-child, .links-grid > a:last-child { border-bottom: 0; }
}

/* The community symbols share the chapter colour, including SVG marks. */
.community-links .shop-icon svg,.community-links .youtube-icon svg{width:22px;height:22px;fill:none;stroke:var(--section-accent,var(--gold));stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.world-group:first-child{border-top:0;padding-top:2px}
.community-links>a>span{color:var(--section-accent,var(--gold))}
.community-links>a:hover strong{color:var(--section-accent,var(--gold))}

/* Progression cues describe availability, while the guide remains readable. */
.rank-gated>summary{justify-content:flex-start;gap:12px}
.rank-gated>summary>h3{flex:1;min-width:0;font-style:normal}
.disclosure>summary>.rank-gate,.rank-gate{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;vertical-align:middle;line-height:1}
.rank-gate img{display:block;width:24px;height:24px;object-fit:contain;image-rendering:pixelated}
.rank-gate-legend{display:flex;align-items:center;gap:9px;margin:-6px 0 22px;color:#8c9680;font-size:12px;line-height:1.6}
.grade-doc summary h3{display:flex;align-items:center;min-height:27px}
.grade-doc .grade-texture{display:block;height:27px;width:auto;max-width:100%;image-rendering:pixelated;object-fit:contain}
.creative-access{margin-top:5px}
.creative-command{display:flex;align-items:baseline;gap:22px;padding:13px 0;border-top:1px solid var(--line)}
.creative-command code{min-width:88px;font-size:14px}
.creative-command span{font-size:14px;color:#a5ae98}
.creative-access>.section-footnote{margin:13px 0;font-size:13px}
.creative-access>.text-link{display:inline-block;margin-top:8px}
.trophy-guide ol{list-style:decimal;padding-left:21px;margin:18px 0 22px}
.trophy-guide li{padding-left:4px;margin:9px 0;color:#a5ae98}
#liens{min-height:0;padding-bottom:12px}
footer{padding-top:16px;padding-bottom:24px}
@media(max-width:600px){.rank-gate-legend{font-size:11px}.creative-command{gap:12px}.creative-command code{min-width:78px}.creative-command span{font-size:13px}.grade-doc .grade-texture{height:27px}#liens{padding-bottom:10px}footer{padding-top:14px;padding-bottom:20px}}
.disclosure[open]>summary>.rank-gate{transform:none}

/* Commands stay with their grade, grouped by what the player wants to do. */
.grade-body .grade-commands{margin-top:10px;padding-top:0;border-top:0}
.grade-commands>h4{margin:12px 0;color:var(--text);font-size:14px;letter-spacing:0;text-transform:none}
.grade-command-note{margin:0 0 16px;font-size:12px;color:var(--muted)}
.grade-command-group{margin:0;padding:0;border:0;background:transparent}
.grade-command-group>h5{margin:22px 0 8px;color:var(--text);font-size:14px;font-weight:500;text-transform:none;letter-spacing:0}
.grade-commands .command-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px;row-gap:0;padding-bottom:14px}
.grade-commands .command-list>.grade-command-entry{min-width:0;padding:14px 0;border:0;border-top:1px solid #ffffff0a;border-radius:0;background:transparent;box-shadow:none;transform:none}
.grade-commands .command-list>.grade-command-entry:hover{background:transparent;box-shadow:none;transform:none}
.grade-commands .command-list code{display:block;overflow-wrap:anywhere;color:var(--gold);font-size:13px;line-height:1.6}
.grade-commands .command-list code+span{display:block;margin-top:5px;color:#a5ae98;font-size:12px;line-height:1.8}
.grade-commands .command-list>.command-rank-gated{position:relative;padding-left:30px}
.grade-command-entry>.rank-gate{position:absolute;left:0;top:15px;width:20px;height:20px}
.grade-command-entry>.rank-gate img{width:20px;height:20px}
.world-map-row{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap}
.world-map-row>a{font-size:12px;white-space:nowrap}

/* Give the footer its own rhythm and align its identity near the navigation rail. */
main.wiki-content>footer{width:calc(100% - 56px);max-width:none;margin:0 28px;padding:48px 0 30px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px}
footer>.footer-identity{display:block;min-width:0}
.footer-brand{display:flex;align-items:center;gap:9px;color:var(--text);font-size:14px}
.footer-brand img{width:30px;height:30px}
.footer-identity>p{display:block;margin:9px 0 5px;font-size:11px;color:#89937e}
.footer-identity>small{display:block;white-space:normal!important;font-size:10px;line-height:1.7;color:#78856a}
main.wiki-content>footer nav[aria-label="Informations légales TeraBot"]{margin-right:52px}
@media(max-width:900px){main.wiki-content>footer{grid-template-columns:1fr;gap:20px}main.wiki-content>footer nav[aria-label="Informations légales TeraBot"]{grid-column:auto!important;justify-content:flex-start;margin-right:0}}
@media(max-width:600px){.grade-commands .command-list{grid-template-columns:1fr}.grade-command-note{font-size:11px}.grade-commands .command-list>.grade-command-entry{padding-top:13px;padding-bottom:13px}.grade-commands .command-list>.command-rank-gated{padding-left:30px}main.wiki-content>footer{width:calc(100% - 40px);margin:0 20px;padding:40px 0 26px}.world-map-row{gap:8px}.world-map-row>a{font-size:11px}}

/* Exact world icons from the current TeraPack, paired with their visible names. */
.world-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; line-height: 1.5; }
.world-icon { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; image-rendering: pixelated; }
@media (max-width: 600px) { .world-name { gap: 8px; } }

