/* ============================================================
   SOS GUIDEBOOK V2
   External stylesheet.
   Batch 01: outer shell, left nav, main page layout.
   No tag-specific styling yet.
   ============================================================ */

.sos-guidebook-shell {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}

/* LEFT GUIDEBOOK NAV */
.sos-guidebook-nav {
  flex: 0 0 260px;
  width: 260px;
  box-sizing: border-box;

  position: sticky;
  top: 72px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;

  background: #050B0F;
  border: 1px solid rgba(163, 124, 84, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 8px 24px rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 14px;
}

.sos-guidebook-nav::-webkit-scrollbar {
  width: 6px;
}

.sos-guidebook-nav::-webkit-scrollbar-track {
  background: #091317;
}

.sos-guidebook-nav::-webkit-scrollbar-thumb {
  background: rgba(163, 124, 84, 0.65);
  border-radius: 99px;
}

/* NAV CATEGORY GROUPS */
.sos-guide-nav-category {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.22);
}

.sos-guide-nav-category:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.sos-guide-nav-category h3 {
  margin: 0 0 8px 0;
  padding: 7px 9px;

  background: rgba(163, 124, 84, 0.08);
  border: 1px solid rgba(163, 124, 84, 0.25);
  border-radius: 6px;

  color: #A37C54;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.sos-guide-nav-category ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sos-guide-nav-category li {
  margin: 4px 0;
}

.sos-guide-nav-category li a {
  display: block;
  padding: 6px 8px;

  border-radius: 5px;
  color: #d4d6d6;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.35;
  text-decoration: none;
}

.sos-guide-nav-category li a:hover,
.sos-guide-nav-category li.active a {
  background: rgba(163, 124, 84, 0.13);
  color: #f1e7d8;
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.45);
}

/* MAIN GUIDEBOOK PANEL */
.sos-guidebook-page {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;

  background:
    linear-gradient(rgba(5, 11, 15, 0.88), rgba(5, 11, 15, 0.88)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border: 1px solid rgba(163, 124, 84, 0.45);
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.35);
  border-radius: 8px;
  padding: 24px;
}

/* PAGE HEADING AREA */
.sos-guidebook-page > p:first-child {
  display: inline-block;
  margin: 0 0 10px 0;
  padding: 5px 9px;

  background: rgba(163, 124, 84, 0.09);
  border: 1px solid rgba(163, 124, 84, 0.25);
  border-radius: 999px;

  color: #d7c3a4;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guidebook-page h1 {
  margin: 0 0 14px 0;
  color: #A37C54;
  font-size: 3rem;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.75);
}

.sos-guidebook-page hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid rgba(163, 124, 84, 0.35);
}

/* MAIN CONTENT FLOW */
.sos-guidebook-body,
.sos-guidebook-part-body {
  color: #BCBDBD;
}

.sos-guidebook-part {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(163, 124, 84, 0.28);
}

.sos-guidebook-part > h2 {
  margin: 0 0 14px 0;
  padding: 9px 12px;

  background: rgba(9, 19, 23, 0.9);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 7px;

  color: #A37C54;
  font-size: 1.75rem;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Batch 03: tabs, modal popups, and staff-only warnings.
   Functional behavior already works; this is the pretty layer.
   ============================================================ */

/* TABS */
.sos-guide-tabs {
  margin: 18px 0;
  background: rgba(5, 11, 15, 0.52);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 8px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
  overflow: hidden;
}

.sos-guide-tab-list {
  display: flex;
  align-items: stretch;
  gap: 0;

  background: rgba(9, 19, 23, 0.92);
  border-bottom: 1px solid rgba(163, 124, 84, 0.35);
}

.sos-guide-tab-button {
  flex: 1 1 0;
  appearance: none;
  border: 0;
  border-right: 1px solid rgba(163, 124, 84, 0.25);
  background: transparent;
  color: #BCBDBD;
  cursor: pointer;

  padding: 11px 12px;
  font: inherit;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.sos-guide-tab-button:last-child {
  border-right: 0;
}

.sos-guide-tab-button:hover,
.sos-guide-tab-button:focus {
  background: rgba(163, 124, 84, 0.12);
  color: #f1e7d8;
  outline: none;
}

.sos-guide-tab-button.is-active {
  background:
    linear-gradient(rgba(163, 124, 84, 0.18), rgba(163, 124, 84, 0.08));
  color: #d7c3a4;
  box-shadow: inset 0 -3px 0 #A37C54;
  font-weight: normal;
}

.sos-guide-tab-panels {
  padding: 18px;
}

.sos-guide-tab-panel {
  color: #BCBDBD;
}

.sos-guide-tab-panel > h3 {
  margin: 0 0 12px 0;
  color: #A37C54;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-tab-body {
  color: #BCBDBD;
}

/* POPUP TRIGGER */
.sos-guide-popup {
  display: inline-block;
  margin: 6px 6px 6px 0;
}

.sos-guide-popup-trigger {
  appearance: none;
  display: inline-block;
  cursor: pointer;

  background: rgba(163, 124, 84, 0.12);
  border: 1px solid rgba(163, 124, 84, 0.48);
  border-radius: 999px;
  color: #d7c3a4;

  padding: 8px 13px;
  font: inherit;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-popup-trigger:hover,
.sos-guide-popup-trigger:focus {
  background: rgba(163, 124, 84, 0.2);
  color: #f1e7d8;
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.55);
  outline: none;
}

/* POPUP MODAL */
.sos-guide-popup-modal {
  z-index: 1000000;
}

.sos-guide-popup-backdrop {
  background:
    radial-gradient(circle at center, rgba(7, 19, 23, 0.45), rgba(0, 0, 0, 0.86));
}

.sos-guide-popup-dialog {
  width: min(760px, 82vw);
  max-height: 78vh;
  overflow: auto;

  background:
    linear-gradient(rgba(5, 11, 15, 0.94), rgba(5, 11, 15, 0.94)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border: 1px solid rgba(163, 124, 84, 0.6);
  border-radius: 9px;
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.55),
    0 18px 55px rgba(0,0,0,0.85);

  color: #BCBDBD;
  padding: 24px 28px;
}

.sos-guide-popup-dialog h3 {
  margin: 0 32px 14px 0;
  padding-bottom: 8px;

  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-popup-body {
  color: #BCBDBD;
  line-height: 1.7;
}

.sos-guide-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;

  width: 30px;
  height: 30px;
  padding: 0;

  background: rgba(5, 11, 15, 0.85);
  border: 1px solid rgba(163, 124, 84, 0.5);
  border-radius: 50%;
  color: #d7c3a4;
  cursor: pointer;

  font-size: 1.4rem;
  line-height: 26px;
  text-align: center;
}

.sos-guide-popup-close:hover,
.sos-guide-popup-close:focus {
  background: rgba(163, 124, 84, 0.18);
  color: #f1e7d8;
  outline: none;
}

/* STAFF-ONLY WARNINGS */
.sos-guide-staff-warnings {
  margin: 0 0 18px 0;
  padding: 14px 16px;

  background:
    linear-gradient(rgba(76, 38, 32, 0.72), rgba(20, 8, 7, 0.78));
  border: 1px solid rgba(199, 117, 87, 0.65);
  border-left: 5px solid #c77557;
  border-radius: 8px;
  box-shadow:
    inset 0 0 14px rgba(0,0,0,0.45),
    0 6px 18px rgba(0,0,0,0.32);

  color: #f1ded5;
}

.sos-guide-staff-warnings h2 {
  margin: 0 0 8px 0;
  color: #f0b79f;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-staff-warnings p {
  margin: 0 0 10px 0;
  color: #ead0c5;
}

.sos-guide-staff-warnings ul {
  margin: 0;
  padding-left: 20px;
}

.sos-guide-staff-warnings li {
  margin: 6px 0;
  line-height: 1.5;
}

.sos-guide-staff-warnings strong {
  color: #f0b79f;
}

.sos-guide-staff-warnings code {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;

  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(240, 183, 159, 0.32);
  border-radius: 4px;
  color: #ffe8de;
  font-family: monospace;
  font-size: 0.95rem;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Small fix: anchor jump offset for sticky site nav.
   Prevents linked sections from hiding under the fixed navbar.
   ============================================================ */

.sos-guidebook-page [id] {
  scroll-margin-top: 90px;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Batch 04: system families, item cards, tables, IC/OOC blocks.
   Styles the repeated guidebook tag families without touching layout.
   ============================================================ */

/* LARGE SYSTEM WRAPPERS */
.sos-guide-playguide,
.sos-guide-questkey,
.sos-guide-mqwalkthrough,
.sos-guide-encounterrules,
.sos-guide-deathrules,
.sos-guide-statblock,
.sos-guide-acblock,
.sos-guide-trainingrules,
.sos-guide-explorationrules,
.sos-guide-profiletabs,
.sos-guide-inventorytab,
.sos-guide-trackertab,
.sos-guide-companionrules,
.sos-guide-craftingrules,
.sos-guide-magicrules,
.sos-guide-magiclaw,
.sos-guide-loomlaw,
.sos-guide-restrictedmagic,
.sos-guide-oathwoven,
.sos-guide-passivemagic,
.sos-guide-orgcompare,
.sos-guide-guild,
.sos-guide-faction {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.54);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
}

/* SYSTEM WRAPPER HEADINGS */
.sos-guide-playguide > h3,
.sos-guide-questkey > h3,
.sos-guide-mqwalkthrough > h3,
.sos-guide-encounterrules > h3,
.sos-guide-deathrules > h3,
.sos-guide-statblock > h3,
.sos-guide-acblock > h3,
.sos-guide-trainingrules > h3,
.sos-guide-explorationrules > h3,
.sos-guide-profiletabs > h3,
.sos-guide-inventorytab > h3,
.sos-guide-trackertab > h3,
.sos-guide-companionrules > h3,
.sos-guide-craftingrules > h3,
.sos-guide-magicrules > h3,
.sos-guide-magiclaw > h3,
.sos-guide-loomlaw > h3,
.sos-guide-restrictedmagic > h3,
.sos-guide-oathwoven > h3,
.sos-guide-passivemagic > h3,
.sos-guide-orgcompare > h3,
.sos-guide-guild > h3,
.sos-guide-faction > h3 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

/* INTRO / OVERVIEW STRIPS */
.sos-guide-playguide-intro,
.sos-guide-labelkey-intro,
.sos-guide-questkey-intro,
.sos-guide-mqwalkthrough-intro,
.sos-guide-encounterrules-intro,
.sos-guide-deathrules-intro,
.sos-guide-statblock-intro,
.sos-guide-acblock-intro,
.sos-guide-trainingrules-intro,
.sos-guide-explorationrules-intro,
.sos-guide-profiletabs-intro,
.sos-guide-inventorytab-intro,
.sos-guide-trackertab-intro,
.sos-guide-craftingrules-body,
.sos-guide-companionrules-body,
.sos-guide-magicrules-intro,
.sos-guide-magiclaw-intro,
.sos-guide-orgcompare-intro,
.sos-guide-guild-intro {
  margin: 0 0 14px 0;
  padding: 12px 14px;
  background: rgba(163, 124, 84, 0.07);
  border: 1px solid rgba(163, 124, 84, 0.25);
  border-radius: 7px;
  color: #BCBDBD;
}

/* REPEATED ITEM GROUPS */
.sos-guide-labelitems,
.sos-guide-questtypes,
.sos-guide-encountertypes,
.sos-guide-encountermodes,
.sos-guide-encounterrarities,
.sos-guide-riskrules,
.sos-guide-consequences,
.sos-guide-adjustments,
.sos-guide-statcards,
.sos-guide-acfactors,
.sos-guide-armorchoices,
.sos-guide-trainingreqs,
.sos-guide-exploresteps,
.sos-guide-rarityrules,
.sos-guide-harvestrules,
.sos-guide-inventoryfields,
.sos-guide-trackerfields,
.sos-guide-equipmentnotes,
.sos-guide-craftmethods,
.sos-guide-orgtypes,
.sos-guide-guildsteps,
.sos-guide-guildupgrades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

/* SINGLE ITEM CARDS */
.sos-guide-labelitem,
.sos-guide-questtype,
.sos-guide-questsection,
.sos-guide-questexample,
.sos-guide-mqpost,
.sos-guide-mqtask,
.sos-guide-encountertype,
.sos-guide-encountermode,
.sos-guide-encounterrarity,
.sos-guide-customencounter,
.sos-guide-responseguide,
.sos-guide-rewardnote,
.sos-guide-riskrule,
.sos-guide-consequence,
.sos-guide-adjustment,
.sos-guide-statcard,
.sos-guide-acfactor,
.sos-guide-armorchoice,
.sos-guide-trainingreq,
.sos-guide-lingeringinjury,
.sos-guide-explorestep,
.sos-guide-rarityrule,
.sos-guide-harvestrule,
.sos-guide-inventoryfield,
.sos-guide-trackerfield,
.sos-guide-equipmentnote,
.sos-guide-companiontype,
.sos-guide-acquirestep,
.sos-guide-companionlimit,
.sos-guide-craftstep,
.sos-guide-reciperules,
.sos-guide-craftmethod,
.sos-guide-ruleitem,
.sos-guide-lawitem,
.sos-guide-orgtype,
.sos-guide-guildstep,
.sos-guide-guildupgrade {
  margin: 0;
  padding: 13px 14px;
  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

/* ITEM HEADINGS */
.sos-guide-labelitem h4,
.sos-guide-questtype h4,
.sos-guide-questsection h3,
.sos-guide-questexample h3,
.sos-guide-mqpost h4,
.sos-guide-mqtask h5,
.sos-guide-encountertype h4,
.sos-guide-encountermode h4,
.sos-guide-encounterrarity h4,
.sos-guide-customencounter h4,
.sos-guide-responseguide h4,
.sos-guide-rewardnote h4,
.sos-guide-riskrule h4,
.sos-guide-consequence h4,
.sos-guide-adjustment h4,
.sos-guide-statcard h4,
.sos-guide-acfactor h4,
.sos-guide-armorchoice h4,
.sos-guide-trainingreq h4,
.sos-guide-lingeringinjury h4,
.sos-guide-explorestep h4,
.sos-guide-rarityrule h4,
.sos-guide-harvestrule h4,
.sos-guide-inventoryfield h4,
.sos-guide-trackerfield h4,
.sos-guide-equipmentnote h4,
.sos-guide-companiontype h4,
.sos-guide-acquirestep h4,
.sos-guide-companionlimit h4,
.sos-guide-craftstep h4,
.sos-guide-reciperules h4,
.sos-guide-craftmethod h4,
.sos-guide-ruleitem h4,
.sos-guide-lawitem h4,
.sos-guide-orgtype h4,
.sos-guide-guildstep h4,
.sos-guide-guildupgrade h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* BADGES / CODES / LABELS */
.sos-guide-labelitem-code,
.sos-guide-questtype-code,
.sos-guide-mqpost-role,
.sos-guide-encounterrarity-label,
.sos-guide-rarityrule-label,
.sos-guide-companiontype-label,
.sos-guide-craftmethod-label,
.sos-guide-orgtype-label,
.sos-guide-statcard-label,
.sos-guide-inventoryfield-label,
.sos-guide-trackerfield-label {
  display: inline-block;
  margin-right: 7px;
  padding: 3px 7px;
  background: rgba(163, 124, 84, 0.16);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 999px;
  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* MODIFIER TABLE */
.sos-guide-modtable {
  margin: 16px 0;
  padding: 14px;
  background: rgba(5, 11, 15, 0.58);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 8px;
}

.sos-guide-modtable > h4 {
  margin: 0 0 10px 0;
  color: #A37C54;
  font-size: 1.35rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-modtable-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 7px;
}

.sos-guide-modtable-table th {
  padding: 9px 10px;
  background: rgba(163, 124, 84, 0.14);
  border-bottom: 1px solid rgba(163, 124, 84, 0.35);
  color: #d7c3a4;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.sos-guide-modtable-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.18);
  color: #BCBDBD;
}

.sos-guide-modtable-table tr:last-child td {
  border-bottom: 0;
}

.sos-guide-modrow-stat,
.sos-guide-modrow-modifier {
  color: #d7c3a4;
  font-weight: bold;
}

/* IC / OOC / PARTICIPANTS */
.sos-guide-ic,
.sos-guide-ooc,
.sos-guide-participants {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(163, 124, 84, 0.32);
}

.sos-guide-ic h5,
.sos-guide-ooc h5,
.sos-guide-participants h5 {
  margin: 0;
  padding: 8px 11px;
  background: rgba(163, 124, 84, 0.12);
  color: #d7c3a4;
  font-size: 1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sos-guide-ic-body,
.sos-guide-ooc-body,
.sos-guide-participants-intro {
  padding: 11px 12px;
  background: rgba(5, 11, 15, 0.46);
}

.sos-guide-ooc {
  border-style: dashed;
}

.sos-guide-ooc h5 {
  background: rgba(73, 83, 91, 0.28);
}

/* MAGIC PORTAL */
.sos-guide-magicportal {
  margin: 16px 0;
  padding: 15px;
  background: rgba(163, 124, 84, 0.08);
  border: 1px solid rgba(163, 124, 84, 0.38);
  border-radius: 8px;
}

.sos-guide-magicportal h3 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.45rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-magicportal-link {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(163, 124, 84, 0.15);
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 999px;
  color: #d7c3a4;
  font-style: normal;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sos-guide-magicportal-link:hover {
  background: rgba(163, 124, 84, 0.24);
  color: #f1e7d8;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Batch 05: Start Here, World, Races, Culture, Sergekeepers.
   Broad styling for remaining major guidebook families.
   ============================================================ */

/* START HERE / CHARACTER CREATION */
.sos-guide-quickstart,
.sos-guide-creationmap,
.sos-guide-htmlrules {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.54);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
}

.sos-guide-quickstart > h3,
.sos-guide-creationmap > h3,
.sos-guide-htmlrules > h3 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-creationsteps,
.sos-guide-approvalreqs,
.sos-guide-profilefields,
.sos-guide-htmlrules-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.sos-guide-creationstep,
.sos-guide-approvalreq,
.sos-guide-profilefield,
.sos-guide-htmlrule {
  padding: 13px 14px;
  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

.sos-guide-creationstep h4,
.sos-guide-approvalreq h4,
.sos-guide-profilefield h4,
.sos-guide-htmlrule h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-checklist {
  margin: 16px 0;
  padding: 14px;
  background: rgba(5, 11, 15, 0.50);
  border: 1px solid rgba(163, 124, 84, 0.32);
  border-radius: 8px;
}

.sos-guide-checklist > h3 {
  margin: 0 0 10px 0;
  color: #A37C54;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sos-guide-checkitem {
  position: relative;
  margin: 8px 0;
  padding: 9px 10px 9px 34px;
  background: rgba(9, 19, 23, 0.62);
  border: 1px solid rgba(163, 124, 84, 0.22);
  border-radius: 7px;
}

.sos-guide-checkitem::before {
  content: "✓";
  position: absolute;
  left: 11px;
  top: 9px;
  color: #A37C54;
  font-weight: bold;
}

/* WORLD / ATLAS */
.sos-guide-atlas,
.sos-guide-worldregion,
.sos-guide-mapregion,
.sos-guide-timeline {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.54);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
}

.sos-guide-atlas > h3,
.sos-guide-worldregion > h3,
.sos-guide-mapregion > h3,
.sos-guide-timeline > h3 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-worldregions,
.sos-guide-mapregions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.sos-guide-worldregion,
.sos-guide-mapregion {
  margin: 0;
  padding: 14px;
  background: rgba(9, 19, 23, 0.72);
}

.sos-guide-worldregion h4,
.sos-guide-mapregion h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* TIMELINE */
.sos-guide-timeline {
  position: relative;
}

.sos-guide-era {
  margin: 18px 0;
  padding: 14px;
  background: rgba(163, 124, 84, 0.07);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
}

.sos-guide-era > h4 {
  margin: 0 0 10px 0;
  color: #d7c3a4;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-events {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.sos-guide-event {
  padding: 13px 14px;
  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

.sos-guide-event h5 {
  margin: 0 0 7px 0;
  color: #A37C54;
  font-size: 1.18rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-event-date,
.sos-guide-event-label {
  display: inline-block;
  margin: 0 6px 7px 0;
  padding: 3px 7px;
  background: rgba(163, 124, 84, 0.16);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 999px;
  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-detail {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(5, 11, 15, 0.46);
  border-left: 3px solid rgba(163, 124, 84, 0.5);
  border-radius: 6px;
}

/* RACES */
.sos-guide-racegroup,
.sos-guide-racetype,
.sos-guide-traitlist,
.sos-guide-treatmentnote,
.sos-guide-legalstatus,
.sos-guide-shifternote,
.sos-guide-bondednote,
.sos-guide-dragonnote,
.sos-guide-variantmagic {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.54);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
}

.sos-guide-racegroup > h3,
.sos-guide-racetype > h4,
.sos-guide-traitlist > h4,
.sos-guide-treatmentnote > h4,
.sos-guide-legalstatus > h4,
.sos-guide-shifternote > h4,
.sos-guide-bondednote > h4,
.sos-guide-dragonnote > h4,
.sos-guide-variantmagic > h4 {
  margin: 0 0 10px 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.35);
  color: #A37C54;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-racetypes,
.sos-guide-bondaspects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.sos-guide-racetype,
.sos-guide-bondaspect {
  margin: 0;
  padding: 13px 14px;
  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

.sos-guide-bondaspect h5 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.15rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-traitlist ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sos-guide-traitlist li {
  position: relative;
  margin: 8px 0;
  padding-left: 22px;
}

.sos-guide-traitlist li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  color: #A37C54;
}

/* CULTURE / INSTITUTIONS */
.sos-guide-institution,
.sos-guide-cultureblock {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.54);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.35);
}

.sos-guide-institution > h3,
.sos-guide-cultureblock > h3 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-institution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px 0;
}

.sos-guide-institution-type,
.sos-guide-institution-location,
.sos-guide-institution-status {
  display: inline-block;
  padding: 3px 7px;
  background: rgba(163, 124, 84, 0.16);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 999px;
  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* SERGEKEEPERS */
.sos-guide-sergekeepers,
.sos-guide-keeperfunction,
.sos-guide-deployment,
.sos-guide-rankgroup,
.sos-guide-trainingblock,
.sos-guide-pinrules,
.sos-guide-weaving {
  margin: 18px 0;
  padding: 18px;
  background: rgba(5, 11, 15, 0.56);
  border: 1px solid rgba(163, 124, 84, 0.38);
  border-radius: 9px;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.36);
}

.sos-guide-sergekeepers > h3,
.sos-guide-keeperfunction > h4,
.sos-guide-deployment > h4,
.sos-guide-rankgroup > h4,
.sos-guide-trainingblock > h4,
.sos-guide-pinrules > h4,
.sos-guide-weaving > h4 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-deployitems,
.sos-guide-ranks,
.sos-guide-specialties,
.sos-guide-trainingitems,
.sos-guide-pintiers,
.sos-guide-oathrules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.sos-guide-deployitem,
.sos-guide-rank,
.sos-guide-specialty,
.sos-guide-trainingitem,
.sos-guide-pintier,
.sos-guide-oathrule {
  padding: 13px 14px;
  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);
}

.sos-guide-deployitem h5,
.sos-guide-rank h5,
.sos-guide-specialty h5,
.sos-guide-trainingitem h5,
.sos-guide-pintier h5,
.sos-guide-oathrule h5 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-rankgroup-label,
.sos-guide-rank-label,
.sos-guide-specialty-label,
.sos-guide-pintier-label {
  display: inline-block;
  margin: 0 6px 7px 0;
  padding: 3px 7px;
  background: rgba(163, 124, 84, 0.16);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 999px;
  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Timeline override: vertical spine with alternating event cards.
   This intentionally overrides the broad Batch 05 timeline styling.
   ============================================================ */

.sos-guide-timeline {
  position: relative;
  margin: 22px 0;
  padding: 24px 18px;

  background:
    linear-gradient(rgba(5, 11, 15, 0.66), rgba(5, 11, 15, 0.66)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 10px;
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.25);
}

.sos-guide-timeline > h3 {
  margin: 0 0 22px 0;
  padding: 9px 14px;

  background: rgba(5, 11, 15, 0.82);
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 6px;

  color: #A37C54;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* Era sections sit around the central spine */
.sos-guide-era {
  position: relative;
  margin: 26px 0;
  padding: 0;
  background: transparent;
  border: 0;
}

/* Era title centered over the spine */
.sos-guide-era > h4 {
  position: relative;
  z-index: 3;

  width: max-content;
  max-width: 70%;
  margin: 0 auto 20px auto;
  padding: 8px 18px;

  background: rgba(5, 11, 15, 0.9);
  border: 1px solid rgba(163, 124, 84, 0.55);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0,0,0,0.55);

  color: #A37C54;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

/* The event list becomes the vertical timeline grid */
.sos-guide-events {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 28px 0;
  margin: 0;
  padding: 8px 0 18px 0;
}

/* Central vertical spine */
.sos-guide-events::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;

  background: linear-gradient(
    to bottom,
    rgba(163, 124, 84, 0.15),
    rgba(163, 124, 84, 0.82),
    rgba(163, 124, 84, 0.15)
  );
  box-shadow: 0 0 9px rgba(163, 124, 84, 0.35);
}

/* Event cards */
.sos-guide-event {
  position: relative;
  z-index: 2;

  margin: 0;
  padding: 0;
  background: rgba(5, 11, 15, 0.78);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 7px;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.36),
    0 6px 18px rgba(0,0,0,0.32);

  overflow: visible;
}

/* Alternating card placement */
.sos-guide-event:nth-child(odd) {
  grid-column: 1;
  margin-right: 16px;
}

.sos-guide-event:nth-child(even) {
  grid-column: 3;
  margin-left: 16px;
}

/* Card header */
.sos-guide-event h5 {
  margin: 0;
  padding: 11px 13px;

  background: rgba(163, 124, 84, 0.10);
  border-bottom: 1px solid rgba(163, 124, 84, 0.32);

  color: #A37C54;
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

/* Date / label chips */
.sos-guide-event-date,
.sos-guide-event-label {
  display: inline-block;
  margin: 10px 4px 0 10px;
  padding: 3px 7px;

  background: rgba(163, 124, 84, 0.16);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 999px;

  color: #d7c3a4;
  font-size: 0.85rem;
  line-height: 1.1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Event body spacing */
.sos-guide-event-body {
  padding: 11px 13px 13px 13px;
}

/* Connector lines from cards to spine */
.sos-guide-event::before {
  content: "";
  position: absolute;
  top: 24px;
  width: 16px;
  height: 1px;
  background: rgba(163, 124, 84, 0.75);
  box-shadow: 0 0 6px rgba(163, 124, 84, 0.35);
}

.sos-guide-event:nth-child(odd)::before {
  right: -17px;
}

.sos-guide-event:nth-child(even)::before {
  left: -17px;
}

/* Spine node */
.sos-guide-event::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 13px;
  height: 13px;

  background: rgba(5, 11, 15, 0.95);
  border: 2px solid #A37C54;
  border-radius: 50%;
  box-shadow:
    0 0 8px rgba(163, 124, 84, 0.45),
    inset 0 0 4px rgba(0,0,0,0.65);
}

.sos-guide-event:nth-child(odd)::after {
  right: -43px;
}

.sos-guide-event:nth-child(even)::after {
  left: -43px;
}

/* Details inside timeline cards */
.sos-guide-detail {
  margin: 10px 13px 13px 13px;
  padding: 10px 12px;

  background: rgba(5, 11, 15, 0.52);
  border-left: 3px solid rgba(163, 124, 84, 0.55);
  border-radius: 6px;

  color: #BCBDBD;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Timeline override v2: matches current rendered guidebook HTML.
   Uses .sos-guide-eras / .sos-guide-era / .sos-guide-event.
   ============================================================ */

.sos-guide-timeline {
  position: relative;
  margin: 22px 0;
  padding: 24px 18px;

  background:
    linear-gradient(rgba(5, 11, 15, 0.62), rgba(5, 11, 15, 0.62)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 10px;
  box-shadow:
    inset 0 0 18px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.25);
}

.sos-guide-timeline > h3 {
  width: max-content;
  max-width: 82%;
  margin: 0 auto 12px auto;
  padding: 8px 18px;

  background: rgba(5, 11, 15, 0.88);
  border: 1px solid rgba(163, 124, 84, 0.52);
  border-radius: 6px;

  color: #A37C54;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-timeline-intro {
  max-width: 720px;
  margin: 0 auto 22px auto;
  padding: 10px 14px;

  background: rgba(5, 11, 15, 0.58);
  border: 1px solid rgba(163, 124, 84, 0.28);
  border-radius: 7px;

  color: #BCBDBD;
  text-align: center;
}

/* Whole timeline body, with one continuous spine */
.sos-guide-eras {
  position: relative;
  padding: 4px 0 18px 0;
}

.sos-guide-eras::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;

  background: linear-gradient(
    to bottom,
    rgba(163, 124, 84, 0.08),
    rgba(163, 124, 84, 0.82),
    rgba(163, 124, 84, 0.08)
  );
  box-shadow: 0 0 9px rgba(163, 124, 84, 0.35);
}

/* Era wrapper */
.sos-guide-era {
  position: relative;
  margin: 30px 0;
  padding: 0;

  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Era heading centered over the spine */
.sos-guide-era > h3 {
  position: relative;
  z-index: 3;

  width: max-content;
  max-width: 70%;
  margin: 0 auto 4px auto;
  padding: 8px 18px;

  background: rgba(5, 11, 15, 0.92);
  border: 1px solid rgba(163, 124, 84, 0.58);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0,0,0,0.55);

  color: #A37C54;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

/* Era date/subtitle */
.sos-guide-era-dates {
  position: relative;
  z-index: 3;

  width: max-content;
  max-width: 60%;
  margin: 0 auto 14px auto;
  padding: 2px 8px;

  background: rgba(5, 11, 15, 0.78);
  border-radius: 999px;

  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-era-intro {
  max-width: 640px;
  margin: 0 auto 18px auto;
  padding: 10px 13px;

  background: rgba(5, 11, 15, 0.45);
  border: 1px solid rgba(163, 124, 84, 0.22);
  border-radius: 7px;

  color: #BCBDBD;
  text-align: center;
}

/* Event grid: left | spine gutter | right */
.sos-guide-events {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 28px 0;
  margin: 0;
  padding: 8px 0 18px 0;
}

/* Cards */
.sos-guide-event {
  position: relative;
  z-index: 2;

  margin: 0;
  padding: 0;

  background: rgba(5, 11, 15, 0.78);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-radius: 7px;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.36),
    0 6px 18px rgba(0,0,0,0.32);

  overflow: visible;
}

/* Alternate inside each era */
.sos-guide-event:nth-of-type(odd) {
  grid-column: 1;
  margin-right: 16px;
}

.sos-guide-event:nth-of-type(even) {
  grid-column: 3;
  margin-left: 16px;
}

/* Event meta strip */
.sos-guide-event-meta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;

  margin: 0;
  padding: 10px 12px;

  background:
    linear-gradient(90deg, rgba(163, 124, 84, 0.20), rgba(163, 124, 84, 0.07));
  border-bottom: 1px solid rgba(163, 124, 84, 0.32);

  color: #d7c3a4;
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-event-date,
.sos-guide-event-type {
  display: inline-block;
  padding: 3px 7px;

  background: rgba(5, 11, 15, 0.62);
  border: 1px solid rgba(163, 124, 84, 0.40);
  border-radius: 999px;

  color: #d7c3a4;
}

.sos-guide-event-meta-sep {
  color: rgba(215, 195, 164, 0.45);
}

/* Event title */
.sos-guide-event h4 {
  margin: 0;
  padding: 11px 13px 4px 13px;

  color: #A37C54;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

/* Event body */
.sos-guide-event-summary {
  padding: 8px 13px 13px 13px;
  color: #BCBDBD;
  text-align: justify;
}

/* Connector line from card to central spine */
.sos-guide-event::before {
  content: "";
  position: absolute;
  top: 22px;
  width: 17px;
  height: 2px;

  background: rgba(163, 124, 84, 0.78);
  box-shadow: 0 0 6px rgba(163, 124, 84, 0.35);
}

.sos-guide-event:nth-of-type(odd)::before {
  right: -18px;
}

.sos-guide-event:nth-of-type(even)::before {
  left: -18px;
}

/* Spine node */
.sos-guide-event::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 14px;
  height: 14px;

  background: rgba(5, 11, 15, 0.95);
  border: 2px solid #A37C54;
  border-radius: 50%;
  box-shadow:
    0 0 8px rgba(163, 124, 84, 0.45),
    inset 0 0 4px rgba(0,0,0,0.65);
}

.sos-guide-event:nth-of-type(odd)::after {
  right: -44px;
}

.sos-guide-event:nth-of-type(even)::after {
  left: -44px;
}

/* Timeline detail dropdown inside card */
.sos-guide-event-details {
  padding: 0 13px 13px 13px;
}

.sos-guide-event-details .sos-guide-detail {
  margin: 4px 0 0 0;
  padding: 0;

  background: rgba(5, 11, 15, 0.46);
  border: 1px solid rgba(163, 124, 84, 0.30);
  border-radius: 6px;
  overflow: hidden;
}

.sos-guide-event-details .sos-guide-detail > summary {
  display: block;
  cursor: pointer;
  list-style: none;

  padding: 8px 11px;
  background: rgba(163, 124, 84, 0.10);
  color: #d7c3a4;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sos-guide-event-details .sos-guide-detail > summary::-webkit-details-marker {
  display: none;
}

.sos-guide-detail-body {
  padding: 10px 12px;
  color: #BCBDBD;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Timeline sequencing fix.
   Forces alternating cards to stack downward instead of sharing rows.
   First event starts on the right, then left, then right.
   ============================================================ */

.sos-guide-events {
  display: flex;
  flex-direction: column;
  gap: 34px;
  position: relative;
}

/* Each card takes one vertical step */
.sos-guide-event {
  width: calc(50% - 43px);
}

/* Odd events sit on the right side of the spine */
.sos-guide-event:nth-of-type(odd) {
  align-self: flex-end;
  margin-left: 43px;
  margin-right: 0;
}

/* Even events sit on the left side of the spine */
.sos-guide-event:nth-of-type(even) {
  align-self: flex-start;
  margin-left: 0;
  margin-right: 43px;
}

/* Right-side cards connect leftward to the spine */
.sos-guide-event:nth-of-type(odd)::before {
  left: -18px;
  right: auto;
}

.sos-guide-event:nth-of-type(odd)::after {
  left: -44px;
  right: auto;
}

/* Left-side cards connect rightward to the spine */
.sos-guide-event:nth-of-type(even)::before {
  right: -18px;
  left: auto;
}

.sos-guide-event:nth-of-type(even)::after {
  right: -44px;
  left: auto;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Timeline sequencing fix.
   Forces alternating cards to stack downward instead of sharing rows.
   First event starts on the right, then left, then right.
   ============================================================ */

.sos-guide-events {
  display: flex;
  flex-direction: column;
  gap: 34px;
  position: relative;
}

/* Each card takes one vertical step */
.sos-guide-event {
  width: calc(50% - 43px);
}

/* Odd events sit on the right side of the spine */
.sos-guide-event:nth-of-type(odd) {
  align-self: flex-end;
  margin-left: 43px;
  margin-right: 0;
}

/* Even events sit on the left side of the spine */
.sos-guide-event:nth-of-type(even) {
  align-self: flex-start;
  margin-left: 0;
  margin-right: 43px;
}

/* Right-side cards connect leftward to the spine */
.sos-guide-event:nth-of-type(odd)::before {
  left: -18px;
  right: auto;
}

.sos-guide-event:nth-of-type(odd)::after {
  left: -44px;
  right: auto;
}

/* Left-side cards connect rightward to the spine */
.sos-guide-event:nth-of-type(even)::before {
  right: -18px;
  left: auto;
}

.sos-guide-event:nth-of-type(even)::after {
  right: -44px;
  left: auto;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Batch 06: general reading polish, lists, tables, nested blocks.
   Broad cleanup pass before small manual tweaks.
   ============================================================ */

/* Better spacing between major rendered blocks */
.sos-guidebook-page section + section,
.sos-guidebook-page article + article,
.sos-guidebook-page details + details {
  margin-top: 14px;
}

/* Nested blocks should not feel like they are floating in a soup bowl */
.sos-guidebook-page .sos-guide-section .sos-guide-callout,
.sos-guidebook-page .sos-guide-section .sos-guide-quickfact,
.sos-guidebook-page .sos-guide-section .sos-guide-example,
.sos-guidebook-page .sos-guide-section .sos-guide-card,
.sos-guidebook-page .sos-guide-section .sos-guide-drop,
.sos-guidebook-page .sos-guide-card .sos-guide-callout,
.sos-guidebook-page .sos-guide-card .sos-guide-quickfact,
.sos-guidebook-page .sos-guide-card .sos-guide-example,
.sos-guidebook-page .sos-guide-card .sos-guide-drop {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* LISTS */
.sos-guidebook-page ul,
.sos-guidebook-page ol {
  margin: 10px 0 12px 0;
  padding-left: 26px;
}

.sos-guidebook-page li {
  margin: 6px 0;
  line-height: 1.6;
}

.sos-guidebook-page ul li::marker {
  color: #A37C54;
}

.sos-guidebook-page ol li::marker {
  color: #d7c3a4;
}

/* Plain lists inside styled cards */
.sos-guide-card ul,
.sos-guide-callout ul,
.sos-guide-example ul,
.sos-guide-drop-body ul,
.sos-guide-card ol,
.sos-guide-callout ol,
.sos-guide-example ol,
.sos-guide-drop-body ol {
  margin-bottom: 0;
}

/* BLOCKQUOTES */
.sos-guidebook-page blockquote {
  margin: 14px 0;
  padding: 12px 16px;

  background: rgba(5, 11, 15, 0.48);
  border-left: 4px solid rgba(163, 124, 84, 0.58);
  border-radius: 7px;

  color: #d7d2ca;
  line-height: 1.7;
}

/* CODE / TAG EXAMPLES */
.sos-guidebook-page code,
.sos-guidebook-page kbd {
  display: inline-block;
  padding: 2px 6px;

  background: rgba(5, 11, 15, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.32);
  border-radius: 4px;

  color: #d7c3a4;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

.sos-guidebook-page pre {
  margin: 14px 0;
  padding: 14px;

  background: rgba(5, 11, 15, 0.76);
  border: 1px solid rgba(163, 124, 84, 0.34);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.35);

  color: #d7c3a4;
  overflow-x: auto;
  white-space: pre-wrap;
}

.sos-guidebook-page pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}

/* GENERIC TABLES, EXCLUDING THE SPECIAL STAT MODIFIER TABLE */
.sos-guidebook-page table:not(.sos-guide-modtable-table) {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;

  background: rgba(5, 11, 15, 0.56);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 8px;
  overflow: hidden;
}

.sos-guidebook-page table:not(.sos-guide-modtable-table) th {
  padding: 9px 10px;

  background: rgba(163, 124, 84, 0.14);
  border-bottom: 1px solid rgba(163, 124, 84, 0.35);

  color: #d7c3a4;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.sos-guidebook-page table:not(.sos-guide-modtable-table) td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(163, 124, 84, 0.18);
  color: #BCBDBD;
}

.sos-guidebook-page table:not(.sos-guide-modtable-table) tr:last-child td {
  border-bottom: 0;
}

/* DETAILS / DROPDOWN FOCUS CLEANUP */
.sos-guidebook-page summary:focus {
  outline: 1px solid rgba(163, 124, 84, 0.65);
  outline-offset: -3px;
}

.sos-guidebook-page summary {
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    text-shadow 0.18s ease;
}

.sos-guidebook-page summary:hover {
  color: #f1e7d8;
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.45);
}

/* Better breathing room for empty-ish helper wrappers */
.sos-guidebook-page .sos-guide-event-details:empty,
.sos-guidebook-page .sos-guide-institution-meta:empty,
.sos-guidebook-page .sos-guide-equipmentnotes:empty,
.sos-guidebook-page .sos-guide-guildsteps:empty,
.sos-guidebook-page .sos-guide-guildupgrades:empty {
  display: none;
}

/* Subtle separators inside long content */
.sos-guidebook-page .sos-guidebook-part-body > hr,
.sos-guidebook-page .sos-guide-section-body > hr,
.sos-guidebook-page .sos-guide-card-body > hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid rgba(163, 124, 84, 0.28);
}

/* Tiny cleanup for buttons grouped together */
.sos-guide-button + .sos-guide-button,
.sos-guide-magicportal-link + .sos-guide-magicportal-link {
  margin-left: 4px;
}

/* Let long titles/text wrap gracefully instead of shoving the layout */
.sos-guidebook-page h1,
.sos-guidebook-page h2,
.sos-guidebook-page h3,
.sos-guidebook-page h4,
.sos-guidebook-page h5,
.sos-guidebook-page p,
.sos-guidebook-page li,
.sos-guidebook-page a {
  overflow-wrap: anywhere;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Dropdown polish patch.
   Makes guidebook dropdowns/details feel more finished.
   ============================================================ */

.sos-guide-drop,
.sos-guide-detail {
  background:
    linear-gradient(rgba(5, 11, 15, 0.66), rgba(5, 11, 15, 0.66)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 9px;
  box-shadow:
    inset 0 0 14px rgba(0,0,0,0.42),
    0 5px 14px rgba(0,0,0,0.24);
  overflow: hidden;
}

.sos-guide-drop > summary,
.sos-guide-detail > summary {
  display: block;
  position: relative;
  cursor: pointer;
  list-style: none;

  padding: 12px 46px 12px 16px;

  background:
    linear-gradient(90deg, rgba(163, 124, 84, 0.18), rgba(9, 19, 23, 0.88));
  border-bottom: 1px solid rgba(163, 124, 84, 0.18);

  color: #A37C54;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
}

.sos-guide-drop > summary::-webkit-details-marker,
.sos-guide-detail > summary::-webkit-details-marker {
  display: none;
}

.sos-guide-drop > summary::before,
.sos-guide-detail > summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;

  background: rgba(163, 124, 84, 0.72);
  box-shadow: 0 0 8px rgba(163, 124, 84, 0.45);
}

.sos-guide-drop > summary::after,
.sos-guide-detail > summary::after {
  content: "▾";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);

  color: #d7c3a4;
  font-size: 1rem;
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.45);
}

.sos-guide-drop[open] > summary,
.sos-guide-detail[open] > summary {
  background:
    linear-gradient(90deg, rgba(163, 124, 84, 0.24), rgba(9, 19, 23, 0.95));
  border-bottom: 1px solid rgba(163, 124, 84, 0.38);
}

.sos-guide-drop[open] > summary::after,
.sos-guide-detail[open] > summary::after {
  content: "▴";
}

.sos-guide-drop-body,
.sos-guide-detail-body {
  padding: 15px 17px;

  background: rgba(5, 11, 15, 0.56);
  color: #BCBDBD;
  line-height: 1.7;
}

.sos-guide-drop:hover,
.sos-guide-detail:hover {
  border-color: rgba(163, 124, 84, 0.62);
}

/* ============================================================
   SOS GUIDEBOOK V2
   Batch 07: de-grid readability patch.
   Reduces crowded two-column layouts across most guidebook tag groups.
   Timeline, tabs, mod tables, and layout shell are left alone.
   ============================================================ */

/* Most repeated tag groups should read vertically, not like cramped filing cards. */
.sos-guide-labelitems,
.sos-guide-questtypes,
.sos-guide-encountertypes,
.sos-guide-encountermodes,
.sos-guide-encounterrarities,
.sos-guide-riskrules,
.sos-guide-consequences,
.sos-guide-adjustments,
.sos-guide-statcards,
.sos-guide-acfactors,
.sos-guide-armorchoices,
.sos-guide-trainingreqs,
.sos-guide-exploresteps,
.sos-guide-rarityrules,
.sos-guide-harvestrules,
.sos-guide-inventoryfields,
.sos-guide-trackerfields,
.sos-guide-equipmentnotes,
.sos-guide-craftmethods,
.sos-guide-orgtypes,
.sos-guide-guildsteps,
.sos-guide-guildupgrades,
.sos-guide-creationsteps,
.sos-guide-approvalreqs,
.sos-guide-profilefields,
.sos-guide-htmlrules-list,
.sos-guide-worldregions,
.sos-guide-mapregions,
.sos-guide-racetypes,
.sos-guide-bondaspects,
.sos-guide-deployitems,
.sos-guide-ranks,
.sos-guide-specialties,
.sos-guide-trainingitems,
.sos-guide-pintiers,
.sos-guide-oathrules {
  display: block;
  margin: 14px 0;
}

/* Give stacked cards consistent breathing room. */
.sos-guide-labelitem,
.sos-guide-questtype,
.sos-guide-questsection,
.sos-guide-questexample,
.sos-guide-mqpost,
.sos-guide-mqtask,
.sos-guide-encountertype,
.sos-guide-encountermode,
.sos-guide-encounterrarity,
.sos-guide-customencounter,
.sos-guide-responseguide,
.sos-guide-rewardnote,
.sos-guide-riskrule,
.sos-guide-consequence,
.sos-guide-adjustment,
.sos-guide-statcard,
.sos-guide-acfactor,
.sos-guide-armorchoice,
.sos-guide-trainingreq,
.sos-guide-lingeringinjury,
.sos-guide-explorestep,
.sos-guide-rarityrule,
.sos-guide-harvestrule,
.sos-guide-inventoryfield,
.sos-guide-trackerfield,
.sos-guide-equipmentnote,
.sos-guide-companiontype,
.sos-guide-acquirestep,
.sos-guide-companionlimit,
.sos-guide-craftstep,
.sos-guide-reciperules,
.sos-guide-craftmethod,
.sos-guide-ruleitem,
.sos-guide-lawitem,
.sos-guide-orgtype,
.sos-guide-guildstep,
.sos-guide-guildupgrade,
.sos-guide-creationstep,
.sos-guide-approvalreq,
.sos-guide-profilefield,
.sos-guide-htmlrule,
.sos-guide-worldregion,
.sos-guide-mapregion,
.sos-guide-racetype,
.sos-guide-bondaspect,
.sos-guide-deployitem,
.sos-guide-rank,
.sos-guide-specialty,
.sos-guide-trainingitem,
.sos-guide-pintier,
.sos-guide-oathrule {
  margin: 0 0 13px 0;
}

/* Last card in a group does not need a dangling bottom gap. */
.sos-guide-labelitem:last-child,
.sos-guide-questtype:last-child,
.sos-guide-questsection:last-child,
.sos-guide-questexample:last-child,
.sos-guide-mqpost:last-child,
.sos-guide-mqtask:last-child,
.sos-guide-encountertype:last-child,
.sos-guide-encountermode:last-child,
.sos-guide-encounterrarity:last-child,
.sos-guide-riskrule:last-child,
.sos-guide-consequence:last-child,
.sos-guide-adjustment:last-child,
.sos-guide-statcard:last-child,
.sos-guide-acfactor:last-child,
.sos-guide-armorchoice:last-child,
.sos-guide-trainingreq:last-child,
.sos-guide-explorestep:last-child,
.sos-guide-rarityrule:last-child,
.sos-guide-harvestrule:last-child,
.sos-guide-inventoryfield:last-child,
.sos-guide-trackerfield:last-child,
.sos-guide-craftmethod:last-child,
.sos-guide-orgtype:last-child,
.sos-guide-guildstep:last-child,
.sos-guide-guildupgrade:last-child,
.sos-guide-creationstep:last-child,
.sos-guide-approvalreq:last-child,
.sos-guide-profilefield:last-child,
.sos-guide-htmlrule:last-child,
.sos-guide-worldregion:last-child,
.sos-guide-mapregion:last-child,
.sos-guide-racetype:last-child,
.sos-guide-bondaspect:last-child,
.sos-guide-deployitem:last-child,
.sos-guide-rank:last-child,
.sos-guide-specialty:last-child,
.sos-guide-trainingitem:last-child,
.sos-guide-pintier:last-child,
.sos-guide-oathrule:last-child {
  margin-bottom: 0;
}

/* Generic grids default to one column for readability.
   Specific visual galleries can be re-gridded later if needed. */
.sos-guide-grid,
.sos-guide-grid--cols-2,
.sos-guide-grid--cols-3,
.sos-guide-grid--cols-4 {
  grid-template-columns: 1fr;
}

/* Give long cards a more book-like reading width inside the panel. */
.sos-guide-section-body,
.sos-guide-card-body,
.sos-guide-callout-body,
.sos-guide-example-body,
.sos-guide-drop-body,
.sos-guide-tab-body {
  max-width: 100%;
}

/* Make card text feel less crushed now that cards are stacked. */
.sos-guidebook-page article,
.sos-guidebook-page section,
.sos-guidebook-page details {
  line-height: 1.7;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Straggler styling patch.
   Catches tag classes that missed the broad styling passes.
   ============================================================ */

/* Missed / under-styled wrapper blocks */
.sos-guide-labelkey,
.sos-guide-proofnote,
.sos-guide-magiccrafting,
.sos-guide-participants,
.sos-guide-companiontype,
.sos-guide-acquirestep,
.sos-guide-companionlimit,
.sos-guide-craftstep,
.sos-guide-reciperules,
.sos-guide-ruleitem,
.sos-guide-lawitem {
  margin: 16px 0;
  padding: 14px 16px;

  background: rgba(9, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.32);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.28);

  color: #BCBDBD;
}

/* Headings inside missed blocks */
.sos-guide-labelkey > h3,
.sos-guide-proofnote > h3,
.sos-guide-magiccrafting > h3,
.sos-guide-participants > h3,
.sos-guide-companiontype > h4,
.sos-guide-acquirestep > h4,
.sos-guide-companionlimit > h4,
.sos-guide-craftstep > h4,
.sos-guide-reciperules > h4,
.sos-guide-ruleitem > h4,
.sos-guide-lawitem > h4 {
  margin: 0 0 9px 0;
  padding-bottom: 7px;

  border-bottom: 1px solid rgba(163, 124, 84, 0.35);
  color: #A37C54;

  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Missed group wrappers, stacked for readability */
.sos-guide-companiontypes,
.sos-guide-acquiresteps,
.sos-guide-companionlimits,
.sos-guide-craftsteps,
.sos-guide-ruleitems,
.sos-guide-lawitems {
  display: block;
  margin: 14px 0;
}

/* Stacked children spacing */
.sos-guide-companiontypes > *,
.sos-guide-acquiresteps > *,
.sos-guide-companionlimits > *,
.sos-guide-craftsteps > *,
.sos-guide-ruleitems > *,
.sos-guide-lawitems > * {
  margin-bottom: 13px;
}

.sos-guide-companiontypes > *:last-child,
.sos-guide-acquiresteps > *:last-child,
.sos-guide-companionlimits > *:last-child,
.sos-guide-craftsteps > *:last-child,
.sos-guide-ruleitems > *:last-child,
.sos-guide-lawitems > *:last-child {
  margin-bottom: 0;
}

/* Proof notes should read like important helper notes */
.sos-guide-proofnote {
  border-left: 4px solid #A37C54;
  background:
    linear-gradient(rgba(163, 124, 84, 0.09), rgba(5, 11, 15, 0.62));
}

/* Participants should feel like an OOC/meta helper block */
.sos-guide-participants {
  border-style: dashed;
  background: rgba(5, 11, 15, 0.58);
}

.sos-guide-participants ul {
  margin-bottom: 0;
}

/* Magic crafting wrapper should visually contain craft methods */
.sos-guide-magiccrafting {
  background:
    linear-gradient(rgba(5, 11, 15, 0.68), rgba(5, 11, 15, 0.68)),
    url("https://i.imgur.com/jd9Pxwk.jpeg") center center / cover fixed;
  border-color: rgba(163, 124, 84, 0.42);
}

/* If magic crafting has nested craft methods, keep them tucked in nicely */
.sos-guide-magiccrafting .sos-guide-craftmethod {
  margin-top: 12px;
}

/* Generic safety net for any sos-guide block with a title that somehow stayed plain */
.sos-guidebook-page [class^="sos-guide-"]:not(.sos-guidebook-shell):not(.sos-guidebook-nav):not(.sos-guidebook-page):not(.sos-guidebook-body):not(.sos-guidebook-part):not(.sos-guidebook-part-body) > h3:first-child,
.sos-guidebook-page [class^="sos-guide-"] > h4:first-child,
.sos-guidebook-page [class^="sos-guide-"] > h5:first-child {
  color: #A37C54;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Core block recovery patch.
   Reasserts styling for section / callout / quickfact / images /
   grid / cards / examples / tooltips / guidebook links.
   ============================================================ */

/* SECTION */
.sos-guide-section {
  margin: 18px 0;
  padding: 18px;

  background: rgba(5, 11, 15, 0.58);
  border: 1px solid rgba(163, 124, 84, 0.38);
  border-radius: 9px;
  box-shadow:
    inset 0 0 14px rgba(0,0,0,0.35),
    0 6px 18px rgba(0,0,0,0.22);
}

.sos-guide-section > h2,
.sos-guide-section > h3 {
  margin: 0 0 12px 0;
  padding-bottom: 8px;

  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
  color: #A37C54;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-section-body {
  color: #BCBDBD;
}

/* CALLOUT */
.sos-guide-callout {
  margin: 16px 0;
  padding: 14px 16px;

  background: rgba(9, 19, 23, 0.82);
  border: 1px solid rgba(163, 124, 84, 0.40);
  border-left: 4px solid #A37C54;
  border-radius: 8px;
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.35),
    0 4px 14px rgba(0,0,0,0.22);
}

.sos-guide-callout > h3,
.sos-guide-callout > h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-callout-body {
  color: #BCBDBD;
}

/* QUICKFACT */
.sos-guide-quickfact {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;

  margin: 16px 0;
  padding: 12px;

  background: rgba(163, 124, 84, 0.08);
  border: 1px solid rgba(163, 124, 84, 0.35);
  border-radius: 8px;
}

.sos-guide-quickfact-label {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px;
  background: rgba(5, 11, 15, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.32);
  border-radius: 6px;

  color: #A37C54;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-quickfact-body {
  color: #BCBDBD;
}

/* IMAGE + INSTRUCTION IMAGE */
.sos-guide-image,
.sos-guide-instructionimage {
  margin: 18px 0;
  padding: 12px;

  background: rgba(5, 11, 15, 0.45);
  border: 1px solid rgba(163, 124, 84, 0.28);
  border-radius: 8px;
}

.sos-guide-image img,
.sos-guide-instructionimage img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;

  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.sos-guide-image figcaption,
.sos-guide-instructionimage figcaption,
.sos-guide-image-caption,
.sos-guide-instructionimage-caption {
  margin-top: 8px;
  color: #d7c3a4;
  font-size: 0.96rem;
  line-height: 1.4;
  text-align: center;
}

/* GRID + CARDS */
/* Default single column, then opt into multi-column when a grid class/data attr exists */
.sos-guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0;
}

.sos-guide-grid--cols-2,
.sos-guide-grid[data-columns="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sos-guide-grid--cols-3,
.sos-guide-grid[data-columns="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sos-guide-grid--cols-4,
.sos-guide-grid[data-columns="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sos-guide-card {
  margin: 0;
  padding: 14px;

  background: rgba(5, 11, 15, 0.58);
  border: 1px solid rgba(163, 124, 84, 0.33);
  border-radius: 8px;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.3);
}

.sos-guide-card > h3,
.sos-guide-card > h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-card-body {
  color: #BCBDBD;
}

/* EXAMPLE */
.sos-guide-example {
  margin: 16px 0;
  padding: 14px 16px;

  background: rgba(5, 11, 15, 0.48);
  border: 1px dashed rgba(163, 124, 84, 0.55);
  border-radius: 8px;
}

.sos-guide-example > h3,
.sos-guide-example > h4 {
  margin: 0 0 8px 0;
  color: #d7c3a4;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sos-guide-example-body {
  color: #BCBDBD;
}

/* TOOLTIP */
.sos-guide-tip {
  position: relative;
  display: inline-block;
  cursor: help;

  color: #d7c3a4;
  border-bottom: 1px dotted rgba(215, 195, 164, 0.65);
}

.sos-guide-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);

  width: max-content;
  max-width: 260px;
  padding: 7px 9px;

  background: rgba(5, 11, 15, 0.96);
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);

  color: #BCBDBD;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.sos-guide-tip:hover::after,
.sos-guide-tip:focus::after {
  opacity: 1;
}

/* GUIDEBOOK LINK */
.sos-guide-link,
.sos-guidebook-page a.sos-guide-link {
  color: #d7c3a4;
  border-bottom: 1px dotted rgba(215, 195, 164, 0.65);
  text-decoration: none;
}

.sos-guide-link:hover,
.sos-guidebook-page a.sos-guide-link:hover {
  color: #f1e7d8;
  border-bottom-color: #f1e7d8;
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.55);
}

/* ============================================================
   SOS GUIDEBOOK V2
   Button/link recovery patch.
   Reasserts styling for guidebook buttons like "Jump to Dropdown".
   ============================================================ */

.sos-guide-button,
.sos-guidebook-page .sos-guide-button,
.sos-guidebook-page a.sos-guide-button,
.sos-guide-btn,
.sos-guidebook-page .sos-guide-btn,
.sos-guidebook-page a.sos-guide-btn {
  display: inline-block;
  margin: 8px 8px 8px 0;
  padding: 8px 13px;

  background: rgba(163, 124, 84, 0.12);
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 999px;
  box-shadow:
    inset 0 0 8px rgba(0,0,0,0.28),
    0 4px 12px rgba(0,0,0,0.22);

  color: #d7c3a4 !important;
  font-style: normal;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sos-guide-button:hover,
.sos-guidebook-page .sos-guide-button:hover,
.sos-guidebook-page a.sos-guide-button:hover,
.sos-guide-btn:hover,
.sos-guidebook-page .sos-guide-btn:hover,
.sos-guidebook-page a.sos-guide-btn:hover {
  background: rgba(163, 124, 84, 0.22);
  color: #f1e7d8 !important;
  border-color: rgba(215, 195, 164, 0.75);
  text-shadow: 0 0 6px rgba(163, 124, 84, 0.55);
}

/* ============================================================
   SOS GUIDEBOOK QUICKSTART / FOUNDATIONAL PAGE POLISH
   Append-only styling pass.
   Purpose: make Quickstart and other beginner-facing guide pages
   feel more finished, readable, and welcoming.
   ============================================================ */

/* Main Quickstart welcome panel */
.sos-guide-quickstart {
  position: relative;
  margin: 18px 0 22px 0;
  padding: 26px 30px;
  background:
    linear-gradient(135deg, rgba(163, 124, 84, 0.13), rgba(7, 19, 23, 0.88) 42%, rgba(7, 19, 23, 0.95)),
    rgba(7, 19, 23, 0.92);
  border: 1px solid rgba(163, 124, 84, 0.68);
  border-radius: 18px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.36),
    inset 0 0 26px rgba(163, 124, 84, 0.07);
  overflow: hidden;
}

.sos-guide-quickstart::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(163, 124, 84, 0.18);
  border-radius: 14px;
  pointer-events: none;
}

.sos-guide-quickstart h3 {
  position: relative;
  margin: 0 0 14px 0;
  padding-bottom: 12px;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(163, 124, 84, 0.42);
}

.sos-guide-quickstart .sos-guide-quickstart-body,
.sos-guide-quickstart-body {
  position: relative;
  color: #d7d0c7;
  font-size: 16px;
  line-height: 1.75;
}

.sos-guide-quickstart p {
  margin: 0 0 12px 0;
}

.sos-guide-quickstart p:last-child {
  margin-bottom: 0;
}

/* Callouts: make beginner notes feel intentional */
.sos-guide-callout {
  margin: 18px 0;
  padding: 18px 20px;
  background: rgba(7, 19, 23, 0.88);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-left: 5px solid #A37C54;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.sos-guide-callout h3 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.sos-guide-callout-body {
  color: #d0cbc3;
  line-height: 1.68;
}

.sos-guide-callout-body p {
  margin: 0 0 10px 0;
}

.sos-guide-callout-body p:last-child {
  margin-bottom: 0;
}

.sos-guide-callout--tip {
  border-left-color: #A37C54;
  background:
    linear-gradient(90deg, rgba(163, 124, 84, 0.12), rgba(7, 19, 23, 0.88) 34%),
    rgba(7, 19, 23, 0.88);
}

.sos-guide-callout--warning {
  border-left-color: #c89b62;
  background:
    linear-gradient(90deg, rgba(200, 155, 98, 0.13), rgba(7, 19, 23, 0.9) 34%),
    rgba(7, 19, 23, 0.9);
}

/* Checklist: make it feel like a usable task list */
.sos-guide-checklist {
  margin: 18px 0 22px 0;
  padding: 20px 22px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(163, 124, 84, 0.48);
  border-radius: 16px;
}

.sos-guide-checklist h3 {
  margin: 0 0 14px 0;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 23px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sos-guide-checklist ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sos-guide-checkitem {
  position: relative;
  margin: 0 0 10px 0;
  padding: 10px 12px 10px 38px;
  background: rgba(7, 19, 23, 0.72);
  border: 1px solid rgba(163, 124, 84, 0.24);
  border-radius: 10px;
  color: #d7d0c7;
  line-height: 1.5;
}

.sos-guide-checkitem:last-child {
  margin-bottom: 0;
}

.sos-guide-checkitem::before {
  content: "✓";
  position: absolute;
  left: 13px;
  top: 9px;
  color: #A37C54;
  font-weight: bold;
  font-size: 16px;
}

/* Creation map: turn steps into a clear path */
.sos-guide-creationmap {
  margin: 22px 0;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(163, 124, 84, 0.08), rgba(0, 0, 0, 0.18)),
    rgba(7, 19, 23, 0.86);
  border: 1px solid rgba(163, 124, 84, 0.52);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.sos-guide-creationmap h3 {
  margin: 0 0 16px 0;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 27px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-align: center;
}

.sos-guide-creationmap-intro {
  margin: 0 0 18px 0;
  color: #d0cbc3;
  line-height: 1.65;
}

.sos-guide-creationmap-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.sos-guide-creationstep {
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 74px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(163, 124, 84, 0.34);
  border-radius: 14px;
  box-shadow: inset 0 0 16px rgba(163, 124, 84, 0.04);
}

.sos-guide-creationstep::before {
  content: "";
  position: absolute;
  left: 42px;
  top: 46px;
  bottom: -18px;
  width: 1px;
  background: rgba(163, 124, 84, 0.26);
}

.sos-guide-creationstep:last-child::before {
  display: none;
}

.sos-guide-creationstep-order {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(163, 124, 84, 0.14);
  border: 1px solid rgba(163, 124, 84, 0.58);
  border-radius: 999px;
  color: #d7c3a4;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.sos-guide-creationstep h4 {
  margin: 0 0 8px 0;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 21px;
  letter-spacing: 0.035em;
}

.sos-guide-creationstep-body {
  color: #d0cbc3;
  line-height: 1.65;
}

.sos-guide-creationstep-body p {
  margin: 0 0 10px 0;
}

.sos-guide-creationstep-body p:last-child {
  margin-bottom: 0;
}

/* Grids and cards: keep desktop layout steady */
.sos-guide-grid {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.sos-guide-grid--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.sos-guide-grid--cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.sos-guide-grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sos-guide-grid--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sos-guide-card {
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.23);
  border: 1px solid rgba(163, 124, 84, 0.38);
  border-radius: 15px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 0 16px rgba(163, 124, 84, 0.035);
}

.sos-guide-card h3 {
  margin: 0 0 10px 0;
  color: #A37C54;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sos-guide-card-body {
  color: #d0cbc3;
  line-height: 1.65;
}

.sos-guide-card-body p {
  margin: 0 0 10px 0;
}

.sos-guide-card-body p:last-child {
  margin-bottom: 0;
}

/* Buttons: stronger, cleaner destination links */
.sos-guide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px 8px 0 0;
  padding: 8px 13px;
  background:
    linear-gradient(180deg, rgba(163, 124, 84, 0.18), rgba(0, 0, 0, 0.24)),
    rgba(7, 19, 23, 0.88);
  border: 1px solid rgba(163, 124, 84, 0.66);
  border-radius: 999px;
  color: #d7c3a4 !important;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  text-transform: uppercase;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.26);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.sos-guide-button:hover,
.sos-guide-button:focus {
  background:
    linear-gradient(180deg, rgba(163, 124, 84, 0.28), rgba(0, 0, 0, 0.18)),
    rgba(7, 19, 23, 0.94);
  border-color: rgba(215, 195, 164, 0.85);
  color: #f0dcc0 !important;
  transform: translateY(-1px);
}

/* Sections: a little more air on real guide pages */
.sos-guide-section {
  margin: 22px 0;
}

.sos-guide-section > h2 {
  margin-bottom: 14px;
}

/* Make useful resources / link-heavy cards less cramped */
.sos-guide-card .sos-guide-button {
  margin-top: 10px;
}

/* Paragraph rhythm inside guidebook parts */
.sos-guidebook-part-body p,
.sos-guidebook-body p {
  line-height: 1.68;
}

/* Quickstart: make grid cards stretch evenly */
.sos-guide-grid {
  align-items: stretch;
}

.sos-guide-grid > .sos-guide-card {
  height: 100%;
}

.sos-guide-card-body {
  display: flex;
  flex-direction: column;
}

.sos-guide-card-body .sos-guide-button {
  align-self: flex-start;
}

/* Quickstart: stop MyBB line breaks from becoming accidental grid items */
.sos-guide-grid > br {
  display: none !important;
}

/* Quickstart: keep grid cards aligned at the top and stretched evenly */
.sos-guide-grid {
  align-items: stretch !important;
}

.sos-guide-grid > .sos-guide-card {
  height: 100% !important;
  align-self: stretch !important;
}

/* Quickstart: force guide grids to ignore MyBB spacing junk and align cards */
.sos-guide-grid {
  align-items: stretch !important;
}

.sos-guide-grid > br,
.sos-guide-grid > p:empty,
.sos-guide-grid > div:empty {
  display: none !important;
}

.sos-guide-grid--cols-2 {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  align-items: stretch !important;
}

.sos-guide-grid--cols-2 > .sos-guide-card {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
}

.sos-guide-grid--cols-2 > .sos-guide-card + .sos-guide-card {
  margin-top: 0 !important;
}

/* ============================================================
   SOS GUIDEBOOK VISUAL TAG KEY - GLOBAL READABILITY PASS
   Append-only polish.
   Purpose: make the staff Visual Tag Key easier to scan before
   we do section-specific styling.
   ============================================================ */

/* Give the visual key page better breathing room overall */
.sos-guidebook-body .sos-guide-section,
.sos-guidebook-part-body .sos-guide-section {
  margin: 28px 0;
}

/* Make section headings feel more like dividers */
.sos-guide-section > h2 {
  margin: 0 0 16px 0 !important;
  padding: 12px 16px !important;
  background:
    linear-gradient(90deg, rgba(163, 124, 84, 0.14), rgba(7, 19, 23, 0.72) 55%, rgba(7, 19, 23, 0.92)),
    rgba(7, 19, 23, 0.9);
  border: 1px solid rgba(163, 124, 84, 0.45);
  border-radius: 12px;
  color: #A37C54 !important;
  text-align: center;
  letter-spacing: 0.08em;
}

/* General examples should stand apart from normal cards */
.sos-guide-example,
.sos-guide-tag-example,
.sos-guide-visual-example {
  margin: 18px 0;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(163, 124, 84, 0.36);
  border-radius: 15px;
  box-shadow:
    inset 0 0 18px rgba(163, 124, 84, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

/* Labels like "What staff types" / "What it looks like" */
.sos-guide-example-label,
.sos-guide-tag-label,
.sos-guide-demo-label {
  display: inline-block;
  margin: 0 0 8px 0;
  padding: 4px 9px;
  background: rgba(163, 124, 84, 0.12);
  border: 1px solid rgba(163, 124, 84, 0.5);
  border-radius: 999px;
  color: #d7c3a4;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Code/pre boxes used in the visual key */
.sos-guide-code,
.sos-guide-codebox,
.sos-guide-tag-code,
.sos-guidebook-body pre,
.sos-guidebook-part-body pre {
  display: block;
  margin: 10px 0 16px 0 !important;
  padding: 14px 16px !important;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(7, 19, 23, 0.92)),
    rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(163, 124, 84, 0.42);
  border-left: 5px solid #A37C54;
  border-radius: 12px;
  color: #d7c3a4;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-shadow: none;
}

/* Inline code, useful for tag names in instructions */
.sos-guidebook-body code,
.sos-guidebook-part-body code {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(163, 124, 84, 0.38);
  border-radius: 6px;
  color: #d7c3a4;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  text-shadow: none;
}

/* Make cards inside the visual key easier to read */
.sos-guide-card {
  overflow: hidden;
}

.sos-guide-card h3 {
  line-height: 1.2;
}

/* Reduce the "all boxes look identical" problem a little */
.sos-guide-grid .sos-guide-card:nth-child(odd) {
  background:
    linear-gradient(180deg, rgba(163, 124, 84, 0.045), rgba(0, 0, 0, 0.23)),
    rgba(0, 0, 0, 0.23);
}

.sos-guide-grid .sos-guide-card:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(73, 83, 91, 0.12), rgba(0, 0, 0, 0.23)),
    rgba(0, 0, 0, 0.23);
}

/* Better spacing when a card contains several buttons/code samples */
.sos-guide-card .sos-guide-button,
.sos-guide-card pre,
.sos-guide-card code {
  margin-top: 10px;
}

/* Keep guide grids from becoming sardine cans */
.sos-guide-grid--cols-3,
.sos-guide-grid--cols-4 {
  gap: 18px !important;
}

/* Four-column grids are too cramped for tag-key explanations.
   Force them into two wider desktop columns. */
.sos-guide-grid--cols-4 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

/* Three-column grids stay three columns, but get safer card text */
.sos-guide-grid--cols-3 .sos-guide-card h3,
.sos-guide-grid--cols-4 .sos-guide-card h3 {
  font-size: 20px;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Tiny instruction text should not look like a wall */
.sos-guidebook-body p,
.sos-guidebook-part-body p {
  margin-bottom: 12px;
}

/* Extra divider option if the visual key uses hr */
.sos-guidebook-body hr,
.sos-guidebook-part-body hr {
  margin: 26px 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(163, 124, 84, 0.55), transparent);
}

/* ============================================================
   SOS GUIDEBOOK V2
   Fixed left navigation fallback.
   Use because sticky is being blocked by the surrounding MyBB page
   structure even though .sos-guidebook-nav is correctly targeted.

   Desktop-preserving:
   - keeps the nav on the left
   - keeps the page content beside it
   - does not add mobile stacking/reflow
   ============================================================ */

/* Reserve space for the fixed nav so the main guidebook page
   does not slide underneath it. */
.sos-guidebook-shell {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  box-sizing: border-box !important;

  /* 260px nav + 18px original gap */
  padding-left: 278px !important;
}

/* Fixed guidebook navigation */
.sos-guidebook-nav {
  position: fixed !important;

  /* Adjust top if it sits too high/low beneath the site nav. */
  top: 72px !important;

  /* This keeps it near the left edge of the guidebook area on desktop. */
  left: max(20px, calc((100vw - 1400px) / 2 + 20px)) !important;

  width: 260px !important;
  max-width: 260px !important;

  /* Keeps the nav usable on long menus. */
  max-height: calc(100vh - 96px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;

  z-index: 5000 !important;
}

/* Main guidebook page stays beside the fixed nav. */
.sos-guidebook-page {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Keep the nav scrollbar usable and themed. */
.sos-guidebook-nav::-webkit-scrollbar {
  width: 6px;
}

.sos-guidebook-nav::-webkit-scrollbar-track {
  background: #091317;
}

.sos-guidebook-nav::-webkit-scrollbar-thumb {
  background: rgba(163, 124, 84, 0.65);
  border-radius: 99px;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Measured fixed navigation controller.
   Replaces the blunt always-fixed fallback.

   What this does:
   - Nav sits normally while the banner/top page area is visible.
   - Nav becomes fixed only while reading the guidebook.
   - Browser measures the correct left alignment.
   - No mobile stacking/reflow added.
   ============================================================ */

.sos-guidebook-shell {
  --sos-guide-nav-width: 260px;
  --sos-guide-nav-gap: 18px;
  --sos-guide-fixed-top: 90px;
  --sos-guide-fixed-left: 20px;

  display: flex !important;
  align-items: flex-start !important;
  gap: var(--sos-guide-nav-gap) !important;
  padding-left: 0 !important;
  position: relative !important;
  overflow: visible !important;
}

/* Default: nav stays in normal guidebook layout */
.sos-guidebook-nav {
  position: relative !important;
  top: auto !important;
  left: auto !important;

  flex: 0 0 var(--sos-guide-nav-width) !important;
  width: var(--sos-guide-nav-width) !important;
  max-width: var(--sos-guide-nav-width) !important;

  max-height: calc(100vh - 96px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;

  z-index: 5000 !important;

  /* remove the temporary test flare */
  outline: none !important;
  background: #050B0F !important;
}

/* When script says the nav should follow the viewport */
.sos-guidebook-shell.sos-guide-nav-fixed {
  display: block !important;
  padding-left: calc(var(--sos-guide-nav-width) + var(--sos-guide-nav-gap)) !important;
}

.sos-guidebook-shell.sos-guide-nav-fixed .sos-guidebook-nav {
  position: fixed !important;
  top: var(--sos-guide-fixed-top) !important;
  left: var(--sos-guide-fixed-left) !important;
}

/* When script says the nav has reached the bottom of the guidebook */
.sos-guidebook-shell.sos-guide-nav-bottom {
  display: block !important;
  padding-left: calc(var(--sos-guide-nav-width) + var(--sos-guide-nav-gap)) !important;
}

.sos-guidebook-shell.sos-guide-nav-bottom .sos-guidebook-nav {
  position: absolute !important;
  top: auto !important;
  left: 0 !important;
  bottom: 0 !important;
}

/* Main page remains beside the nav */
.sos-guidebook-page {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* ============================================================
   SOS GUIDEBOOK V2
   Measured fixed navigation controller.
   Replaces the blunt always-fixed fallback.

   What this does:
   - Nav sits normally while the banner/top page area is visible.
   - Nav becomes fixed only while reading the guidebook.
   - Browser measures the correct left alignment.
   - No mobile stacking/reflow added.
   ============================================================ */

.sos-guidebook-shell {
  --sos-guide-nav-width: 260px;
  --sos-guide-nav-gap: 18px;
  --sos-guide-fixed-top: 72px;
  --sos-guide-fixed-left: 20px;

  display: flex !important;
  align-items: flex-start !important;
  gap: var(--sos-guide-nav-gap) !important;
  padding-left: 0 !important;
  position: relative !important;
  overflow: visible !important;
}

/* Default: nav stays in normal guidebook layout */
.sos-guidebook-nav {
  position: relative !important;
  top: auto !important;
  left: auto !important;

  flex: 0 0 var(--sos-guide-nav-width) !important;
  width: var(--sos-guide-nav-width) !important;
  max-width: var(--sos-guide-nav-width) !important;

  max-height: calc(100vh - 96px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;

  z-index: 5000 !important;

  /* remove the temporary test flare */
  outline: none !important;
  background: #050B0F !important;
}

/* When script says the nav should follow the viewport */
.sos-guidebook-shell.sos-guide-nav-fixed {
  display: block !important;
  padding-left: calc(var(--sos-guide-nav-width) + var(--sos-guide-nav-gap)) !important;
}

.sos-guidebook-shell.sos-guide-nav-fixed .sos-guidebook-nav {
  position: fixed !important;
  top: var(--sos-guide-fixed-top) !important;
  left: var(--sos-guide-fixed-left) !important;
}

/* When script says the nav has reached the bottom of the guidebook */
.sos-guidebook-shell.sos-guide-nav-bottom {
  display: block !important;
  padding-left: calc(var(--sos-guide-nav-width) + var(--sos-guide-nav-gap)) !important;
}

.sos-guidebook-shell.sos-guide-nav-bottom .sos-guidebook-nav {
  position: absolute !important;
  top: auto !important;
  left: 0 !important;
  bottom: 0 !important;
}

/* Main page remains beside the nav */
.sos-guidebook-page {
  min-width: 0 !important;
  box-sizing: border-box !important;
}