/*
 * The Eternal City Wiki — TEC parchment skin
 * Sidebar pass based on the current Wikidot visual language.
 */

:root {
  --tec-olive: #234707;
  --tec-olive-dark: #173104;
  --tec-olive-soft: #48652c;
  --tec-parchment: #e8ddb7;
  --tec-parchment-light: #f2e9cb;
  --tec-parchment-deep: #d9c894;
  --tec-ink: #2b271d;
  --tec-muted: #665f49;
  --tec-bronze: #9c6a3b;
  --tec-line: #8d8659;
  --tec-table: #404040;
  --tec-table-alt: #363636;
  --tec-table-head: #e4e2da;
  --tec-sidebar-width: 12.2rem;
}

html,
body {
  min-height: 100%;
  background:
    radial-gradient(circle at 78% 34%, rgba(167,143,91,.35), transparent 27rem),
    radial-gradient(circle at 68% 68%, rgba(55,73,35,.35), transparent 35rem),
    linear-gradient(115deg, #536044 0%, #72725b 38%, #384735 100%);
  background-attachment: fixed;
}

body {
  color: var(--tec-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 10px;
  z-index: 1000;
  background:
    linear-gradient(90deg,
      #9c6a3b 0 3px,
      #efe7c7 3px 8px,
      #9c6a3b 8px 11px,
      #efe7c7 11px 16px);
  background-size: 16px 10px;
  border-top: 2px solid #9c6a3b;
  border-bottom: 2px solid #9c6a3b;
}

/* Header */
.md-header {
  top: 10px;
  background: rgba(239,231,199,.98);
  color: var(--tec-ink);
  box-shadow: none;
  border-bottom: 4px solid var(--tec-olive-dark);
}

.md-header__inner {
  max-width: none;
  min-height: 70px;
  padding-left: 2.2rem;
  padding-right: 1.2rem;
}

.md-header__title {
  min-width: 0;
  flex: 1 1 auto;
  margin-left: .35rem;
  overflow: visible;
}

.md-header__topic {
  overflow: visible;
  white-space: normal;
}

.md-header__topic:first-child {
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: .23em;
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.08;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.md-header__topic:first-child::after {
  content: "UNOFFICIAL WIKI FOR THE ETERNAL CITY MUD";
  display: block;
  margin-top: .28rem;
  font-size: .45rem;
  font-weight: 600;
  letter-spacing: .17em;
  color: #4d4a36;
  white-space: nowrap;
}

.md-header__button,
.md-search__icon {
  color: var(--tec-olive-dark);
}

/* Main layout: wide like Wikidot, not centered like docs software. */
.md-main {
  background: transparent;
}

.md-main__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1rem .8rem 0;
  display: grid;
  grid-template-columns: var(--tec-sidebar-width) minmax(0, 1fr);
  gap: .55rem;
}

/* Remove documentation-style right rail completely on desktop. */
.md-sidebar--secondary {
  display: none !important;
}

.md-content {
  min-width: 0;
  max-width: none;
  background:
    linear-gradient(rgba(235,222,178,.90), rgba(235,222,178,.90)),
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.20), transparent 34rem);
  border-left: 1px solid rgba(109,100,60,.55);
  border-right: 1px solid rgba(109,100,60,.55);
  min-height: calc(100vh - 7rem);
}

.md-content__inner {
  max-width: none;
  margin: 0;
  padding: .85rem 1.55rem 3rem;
}

/* PRIMARY SIDEBAR — styled to resemble the Wikidot menu blocks. */
.md-sidebar--primary {
  position: relative;
  width: var(--tec-sidebar-width);
  min-width: var(--tec-sidebar-width);
  height: auto;
  align-self: start;
  padding: .45rem .42rem .7rem;
  background:
    linear-gradient(rgba(225,216,180,.96), rgba(216,205,166,.96));
  border: 1px solid #494a36;
  border-radius: 3px;
  box-shadow:
    inset 0 0 18px rgba(75,66,39,.18),
    0 1px 2px rgba(0,0,0,.25);
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  margin: 0;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

.md-sidebar--primary .md-sidebar__inner {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.md-sidebar--primary .md-sidebar__inner {
  padding: 0;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Hide the generic big wiki title plaque. */
.md-sidebar--primary > .md-sidebar__scrollwrap > .md-sidebar__inner > .md-nav > .md-nav__title {
  display: none;
}

.md-sidebar--primary .md-nav {
  font-size: .62rem;
}

/* Top-level section labels become the beveled plaques from Wikidot. */
.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--section {
  margin: 0 0 .72rem;
}

.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
  display: block;
  margin: 0 0 .18rem;
  padding: .33rem .35rem;
  text-align: center;
  color: #f3eed8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: none;
  text-shadow: 0 1px 1px #222;
  border: 1px solid #4b4d3d;
  border-radius: 2px;
  background:
    linear-gradient(#8d8f7a 0%, #676956 45%, #444638 100%);
  box-shadow:
    inset 0 1px rgba(255,255,255,.38),
    inset 0 -1px rgba(0,0,0,.25),
    0 1px 2px rgba(0,0,0,.25);
}

/* Nested links are the compact ruled rows in the screenshots. */
.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav {
  margin: 0;
}

.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav > .md-nav__list {
  padding: 0 .18rem;
}

.md-sidebar--primary .md-nav__item {
  padding: 0;
}

.md-sidebar--primary .md-nav__link {
  min-height: 0;
  margin: 0;
  padding: .17rem .18rem .15rem;
  color: #35362a;
  font-size: .59rem;
  line-height: 1.18;
  border-bottom: 1px solid rgba(117,107,68,.33);
}

.md-sidebar--primary .md-nav__link:hover {
  color: #244e0a;
  background: rgba(255,255,255,.18);
}

.md-sidebar--primary .md-nav__link--active {
  color: #1d4308;
  font-weight: 700;
}

/* Keep nested caret controls tiny and old-school. */
.md-sidebar--primary .md-nav__icon {
  width: .8rem;
  height: .8rem;
}

/* Article typography */
.md-typeset {
  font-size: .78rem;
  line-height: 1.58;
  color: var(--tec-ink);
}

.md-typeset h1 {
  margin: 0 0 .6rem;
  padding: 0 0 .22rem 1.2rem;
  color: #39452d;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(108,119,61,.42);
}

.md-typeset h2 {
  margin: .95rem 0 .6rem;
  padding: .12rem .65rem;
  background: var(--tec-olive);
  color: #f0e7bf;
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

.md-typeset h3 {
  margin: 1rem 0 .5rem;
  padding: 0 0 .16rem 1.15rem;
  color: #4a513b;
  border-bottom: 1px solid var(--tec-line);
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .76rem;
  font-weight: 400;
}

.md-typeset a {
  color: #244a6b;
  text-decoration-color: rgba(36,74,107,.42);
  text-underline-offset: .08em;
}

.md-typeset a:visited {
  color: #4b4267;
}

.md-typeset a:hover,
.md-typeset a:focus {
  color: #153651;
  text-decoration: underline;
}

.md-typeset table:not([class]) {
  display: table;
  width: max-content;
  max-width: none;
  border-collapse: collapse;
  background: var(--tec-table);
  color: #f2f2f2;
  border: 1px solid #2b2b2b;
  box-shadow: none;
}

.md-typeset table:not([class]) th {
  background: var(--tec-table-head);
  color: #242424;
  border: 1px solid #777;
  text-align: center;
}

.md-typeset table:not([class]) td {
  border: 1px solid #575757;
  padding: .32rem .5rem;
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: var(--tec-table-alt);
}

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid #818052;
  border-left-width: 3px;
  background: rgba(245,237,202,.72);
  box-shadow: none;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: rgba(77,103,37,.14);
  color: var(--tec-olive-dark);
}

.md-search__form {
  background: rgba(117,111,82,.48);
  border: 1px solid rgba(55,65,35,.35);
}

.md-footer {
  background: var(--tec-olive-dark);
}

/* On desktop the old wiki had almost no wasted outer whitespace. */
@media screen and (min-width: 76.25em) {
  .md-grid {
    max-width: none;
  }

  .md-sidebar--primary {
    position: sticky;
    top: calc(var(--tec-header-stack-height, 103px) + .35rem);
    align-self: start;
    max-height: calc(100vh - var(--tec-header-stack-height, 103px) - .8rem);
    overflow: hidden;
  }

  .md-sidebar--primary .md-sidebar__scrollwrap {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - var(--tec-header-stack-height, 103px) - 1.4rem) !important;
    height: auto !important;
    scrollbar-width: thin;
  }

  .md-sidebar--primary .md-sidebar__inner {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }
}

/* Mobile: revert to a normal single-column layout. */
@media screen and (max-width: 76.234375em) {
  .md-main__inner {
    display: block;
    padding: 0;
  }

  .md-sidebar--primary {
    position: fixed !important;
    top: var(--tec-header-stack-height, 93px) !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 20 !important;
    width: min(17rem, 86vw) !important;
    min-width: 0 !important;
    height: calc(100dvh - var(--tec-header-stack-height, 93px)) !important;
    max-height: none !important;
    padding: .5rem .45rem .8rem !important;
    overflow: hidden !important;
    background: linear-gradient(rgba(232,223,188,.99), rgba(218,207,168,.99)) !important;
    border: 0 !important;
    border-right: 1px solid #494a36 !important;
    border-radius: 0 !important;
    box-shadow: 4px 0 12px rgba(0,0,0,.28) !important;
    transform: translateX(-105%);
    transition: transform .18s ease;
  }

  [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary {
    transform: translateX(0);
  }

  .md-sidebar--primary .md-sidebar__scrollwrap {
    margin: 0 !important;
    height: 100% !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .md-sidebar--primary .md-sidebar__inner {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .md-content {
    border: 0;
  }

  .md-header__topic:first-child {
    font-size: .88rem;
    letter-spacing: .13em;
  }

  .md-header__topic:first-child::after {
    display: none;
  }
}

@media screen and (max-width: 44.984375em) {
  .md-content {
    width: 100%;
    min-width: 0;
  }

  .md-content__inner {
    padding: .8rem .72rem 2rem;
  }

  .md-header__inner {
    min-height: 58px;
    padding-left: .5rem;
    padding-right: .5rem;
  }

  .md-header__topic:first-child {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
    letter-spacing: .12em;
  }

  .md-typeset {
    font-size: .76rem;
  }

  .md-typeset h1 {
    padding-left: 0;
  }

  .tec-side {
    font-size: .66rem;
  }

  .tec-side__plaque {
    font-size: .7rem;
  }
}


/* TEC/Wikidot-style thin utility navigation beneath the masthead */
.tec-topnav {
  position: relative;
  top: auto;
  z-index: 9;
  width: 100%;
  flex: 0 0 23px;
  height: 23px;
  background: #183500;
  border-top: 1px solid #0d2000;
  border-bottom: 1px solid #071500;
  color: #f1e7c1;
  font-family: Georgia, "Times New Roman", serif;
}

.tec-topnav__inner {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  height: 100%;
  padding-left: calc(var(--tec-sidebar-width) + .7rem);
}

.tec-topnav__item {
  position: relative;
  height: 100%;
}

.tec-topnav__button {
  display: block;
  min-width: 3.5rem;
  height: 20px;
  margin-top: 1px;
  padding: 0 .6rem;
  border: 1px solid #d9c98f;
  border-radius: 2px;
  background: #173200;
  color: #f5e9bd;
  font: 600 .58rem/18px Georgia, "Times New Roman", serif;
  cursor: pointer;
}

.tec-topnav__button:hover,
.tec-topnav__item.is-open > .tec-topnav__button,
.tec-topnav__item:hover > .tec-topnav__button {
  background: #284b08;
  color: #fff5d5;
}

.tec-topnav__menu {
  display: none;
  position: absolute;
  top: 21px;
  left: 0;
  width: 12.5rem;
  padding: .25rem 0 .35rem;
  background: #183500;
  border: 1px solid #0b2100;
  box-shadow: 0 3px 7px rgba(0,0,0,.35);
}

.tec-topnav__item:hover > .tec-topnav__menu,
.tec-topnav__item.is-open > .tec-topnav__menu {
  display: block;
}

.tec-topnav__menu a {
  display: block;
  padding: .16rem .65rem;
  color: #fff4c8;
  font-size: .62rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: normal;
}

.tec-topnav__menu a:hover {
  background: #2f550d;
  color: white;
}

@media screen and (max-width: 76.234375em) {
  .tec-topnav {
    display: block;
    position: relative;
    top: auto;
    z-index: 9;
  }

  .tec-topnav__inner {
    padding-left: .25rem;
    gap: .12rem;
    flex-wrap: nowrap;
  }

  .tec-topnav__button {
    min-width: 0;
    padding: 0 .35rem;
    font-size: .52rem;
  }

  .tec-topnav__menu {
    width: min(12.5rem, 88vw);
  }
}


/* Full TEC sidebar generated from the legacy nav_side-v2 menu */
.tec-side { font-size: .59rem; line-height: 1.18; }
.tec-side__section { margin: 0 0 .72rem; }
.tec-side__plaque {
  margin: 0 0 .18rem;
  padding: .33rem .35rem;
  text-align: center;
  color: #f3eed8;
  font: 700 .64rem Georgia, "Times New Roman", serif;
  text-shadow: 0 1px 1px #222;
  border: 1px solid #4b4d3d;
  border-radius: 2px;
  background: linear-gradient(#8d8f7a 0%, #676956 45%, #444638 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.38), inset 0 -1px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.25);
}
.tec-side__link,
.tec-side__toggle {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: .17rem .2rem .15rem;
  color: #35362a;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(117,107,68,.33);
  text-align: left;
  font: inherit;
  line-height: 1.18;
  text-decoration: none;
  cursor: pointer;
}
.tec-side__link:hover,
.tec-side__toggle:hover { color: #244e0a; background: rgba(255,255,255,.18); }
.tec-side__strong { font-weight: 700; color: #1f2d13; }
.tec-side__sub { padding-left: .72rem; }
.tec-side__sub2 { padding-left: 1.15rem; }
.tec-side__sign {
  display: inline-block;
  width: .75rem;
  margin-right: .1rem;
  font-size: .8rem;
  font-weight: 700;
  color: #1d2d11;
}
.tec-side__children { display: none; }
.tec-side__group.is-open > .tec-side__children { display: block; }
.tec-side__discord {
  display: block;
  margin: .12rem .18rem .2rem;
  padding: .14rem .2rem;
  background: #7389e7;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font: .65rem/1.05 Arial, sans-serif;
  border-radius: 2px;
}
.tec-side__discord strong { font-size: .88rem; letter-spacing: .03em; }


/* Character biography index */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .55rem;
  margin: .6rem 0 1rem;
}
.bio-card {
  padding: .55rem .65rem;
  background: rgba(244,236,203,.72);
  border: 1px solid #8d8659;
  box-shadow: inset 0 0 8px rgba(78,65,35,.08);
}
.bio-card h3 {
  margin: 0 0 .3rem !important;
  padding: 0 0 .18rem !important;
  font-size: .72rem !important;
  letter-spacing: .05em !important;
  text-transform: none !important;
}
.bio-card p {
  margin: 0 0 .35rem;
  font-size: .61rem;
  line-height: 1.35;
}
.bio-card__more {
  font-size: .58rem;
  font-weight: 700;
}


/* Table link contrast: global TEC green is too dark on charcoal rows. */
.md-typeset table:not([class]) td a {
  color: #c9e3ff;
  font-weight: 600;
  text-decoration-color: rgba(201,227,255,.6);
}
.md-typeset table:not([class]) td a:visited {
  color: #d8c9ff;
}
.md-typeset table:not([class]) td a:hover,
.md-typeset table:not([class]) td a:focus {
  color: #ffffff;
  text-decoration: underline;
}
.md-typeset table:not([class]) th a {
  color: #244a6b;
}

/* Bold text on the dark table rows and skill boxes: white, as on the old wiki. */
.md-typeset table:not([class]) td strong,
.md-typeset table.tec-skill-overview-table td strong,
.md-typeset .skill-template strong {
  color: #ffffff;
}
.md-typeset table:not([class]) td a strong,
.md-typeset table.tec-skill-overview-table td a strong,
.md-typeset .skill-template a strong {
  color: inherit;
}


/* Readability pass: keep TEC styling in the chrome, not in every text accent. */
.md-typeset p,
.md-typeset li,
.md-typeset td {
  letter-spacing: .002em;
}

.md-typeset strong {
  color: #2d2b24;
}

.md-typeset table:not([class]) {
  font-size: .73rem;
  line-height: 1.42;
}

.md-typeset table:not([class]) th {
  font-weight: 700;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset {
    font-size: .82rem;
  }
}


/* Local TEC background asset */
html, body {
  background-image:
    linear-gradient(rgba(45,52,34,.38), rgba(45,52,34,.38)),
    url("/assets/wikidot/files/colosseum-690384.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}


/* Final readability and responsive polish */
.md-typeset {
  font-size: .81rem;
  line-height: 1.62;
}

.md-typeset p,
.md-typeset li {
  max-width: 92ch;
}

/* Anchor links (#Section) stop below the fixed header and nav bar, not under them.
   Most anchors are an empty <a id> just above the heading, so cover every id. */
.md-typeset [id],
.md-typeset :target {
  scroll-margin-top: calc(var(--tec-header-stack-height, 103px) + .6rem);
}

/* Tables are central to TEC. Keep them dense, readable, and scrollable. */
.md-typeset__table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: .7rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.md-typeset table:not([class]) {
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: .75rem;
  line-height: 1.45;
}

.md-typeset table:not([class]) th {
  padding: .38rem .5rem;
  vertical-align: middle;
}

.md-typeset table:not([class]) td {
  padding: .34rem .5rem;
  vertical-align: top;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: #4a4a43;
}

.md-typeset table:not([class]) code {
  color: #fff2c4;
  background: rgba(0,0,0,.18);
}

/* Images and maps should never overflow the parchment column. */
.md-typeset img {
  max-width: 100%;
  height: auto;
}

.md-typeset a > img {
  cursor: zoom-in;
}

.md-typeset figure,
.md-typeset p > img:only-child,
.md-typeset p > a:only-child > img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Cleaner code/pre blocks for calculators, scripts and command examples. */
.md-typeset pre {
  max-width: 100%;
  overflow-x: auto;
  background: #302f2b;
  color: #f5f0dc;
  border: 1px solid #545044;
}

.md-typeset code {
  font-size: .92em;
}

/* Strong keyboard-focus visibility. */
.md-typeset a:focus-visible,
.tec-topnav__button:focus-visible,
.tec-side__link:focus-visible,
.tec-side__toggle:focus-visible {
  outline: 3px solid #2f6f9f;
  outline-offset: 2px;
}

/* Make active sidebar links easier to locate without returning to green-on-green. */
.tec-side__link[aria-current="page"],
.md-sidebar--primary .md-nav__link--active {
  color: #173d5c;
  font-weight: 700;
  background: rgba(255,255,255,.28);
}

/* Keep long sidebar labels usable. */
.tec-side__link,
.tec-side__toggle {
  overflow-wrap: anywhere;
}

/* Mobile reading: preserve table scroll, enlarge touch targets, simplify parchment. */
@media screen and (max-width: 44.984375em) {
  .md-content__inner {
    padding: .9rem .8rem 2rem;
  }

  .md-typeset {
    font-size: .86rem;
    line-height: 1.66;
  }

  .md-typeset h2 {
    letter-spacing: .10em;
  }

  .md-typeset table:not([class]) {
    font-size: .76rem;
  }

  .tec-side__link,
  .tec-side__toggle {
    min-height: 2rem;
    padding-top: .38rem;
    padding-bottom: .38rem;
  }

  html, body {
    background-attachment: scroll;
  }
}

/* Reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}


/* Let prose-heavy TEC tables wrap instead of becoming screen-width monsters. */
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.md-typeset table:not([class]) td:first-child,
.md-typeset table:not([class]) th:first-child {
  overflow-wrap: normal;
}

@media screen and (min-width: 60em) {
  .md-typeset table:not([class]) {
    min-width: min(100%, 32rem);
  }
}


/* Restore the visual language of the original Wikidot skill template. */

/* Trainer/flavor quotations used by FLAVORTEXT in skill-template. */
.md-typeset blockquote {
  margin: .55rem 1.2rem .8rem;
  padding: .65rem .85rem;
  color: #403b2d;
  background:
    linear-gradient(rgba(247,239,207,.92), rgba(230,216,169,.92));
  border: 1px solid #a79a67;
  border-left: 4px solid #8b7a46;
  border-radius: 4px;
  box-shadow:
    inset 0 1px rgba(255,255,255,.42),
    0 1px 2px rgba(61,52,30,.12);
}

.md-typeset blockquote p {
  margin: .25rem 0;
  max-width: none;
}

.md-typeset blockquote::before {
  content: "“";
  float: left;
  margin: -.18rem .35rem -.2rem -.1rem;
  color: rgba(91,76,41,.42);
  font: 2rem/1 Georgia, "Times New Roman", serif;
}

/* Combat/action examples from the original skill-template backend. */
.md-typeset .skill-template {
  margin: .2rem 10% 1rem 1rem;
  padding: .6rem .75rem .7rem;
  color: #f1f1ed;
  background: rgba(32,32,32,.84);
  border: 1px dashed #8e8e7d;
  border-radius: 7px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: .92em;
  line-height: 1.48;
  white-space: pre-line;
  box-shadow: inset 0 0 10px rgba(0,0,0,.18);
}

.md-typeset .skill-template p {
  margin: .2rem 0;
  color: inherit;
}

/* The label immediately preceding a skill example. */
.md-typeset p:has(+ .skill-template) {
  margin-left: 1rem;
  margin-bottom: .15rem;
  color: #4a513b;
  font-size: .92em;
}

/* Command usage appended to skill headings should read as secondary metadata. */
.md-typeset h3 em {
  margin-left: .65rem;
  color: #67604e;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: .74em;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset blockquote {
    margin-left: .25rem;
    margin-right: .25rem;
  }

  .md-typeset .skill-template {
    margin-left: .25rem;
    margin-right: .25rem;
  }
}


/* Legacy-density typography: smaller than the earlier accessibility pass, while retaining contrast. */
.md-typeset {
  font-size: .68rem;
  line-height: 1.52;
}

.md-typeset h1 {
  font-size: 1.08rem;
}

.md-typeset h2 {
  font-size: .76rem;
}

.md-typeset h3 {
  font-size: .70rem;
}

.md-typeset table:not([class]) {
  font-size: .66rem;
  line-height: 1.36;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: .27rem .42rem;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset {
    font-size: .75rem;
    line-height: 1.56;
  }

  .md-typeset table:not([class]) {
    font-size: .69rem;
  }
}

/* Skill pages: mirror the old Wikidot rhythm more closely. */
.tec-skill-page .tec-skill-section-title {
  margin: .75rem 0 .55rem !important;
  padding: .13rem .55rem .12rem 1.4rem !important;
  background: #315f00 !important;
  color: #f3ebc2 !important;
  border: 0 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .17em !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
}

.tec-skill-page .tec-skill-action-title {
  position: relative;
  margin: 1.2rem 0 .45rem !important;
  padding: .05rem 0 .18rem 1.8rem !important;
  color: #2f5c0a !important;
  background: transparent !important;
  border-bottom: 1px solid #557a2e !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .82rem !important;
  font-weight: 400 !important;
  letter-spacing: .16em !important;
  line-height: 1.3 !important;
  text-transform: uppercase !important;
}

.tec-skill-page .tec-skill-action-title::before {
  content: "#";
  position: absolute;
  left: .55rem;
  top: .05rem;
  color: #315f00;
  font-weight: 700;
}

.tec-skill-page .tec-skill-action-title em {
  margin-left: 1rem;
  color: #7a8061 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: .62em !important;
  font-style: italic;
  font-weight: 400 !important;
  letter-spacing: .23em !important;
  text-transform: uppercase !important;
}

.tec-skill-page .tec-skill-example-label {
  margin: .5rem 0 .22rem .75rem !important;
  color: #315f00 !important;
  font-size: .62rem !important;
  font-weight: 400 !important;
}

.tec-skill-page .skill-template {
  margin: .18rem 9% .18rem .25rem !important;
  padding: .55rem .65rem !important;
  min-height: 2.4rem;
  color: #fff !important;
  background: rgba(58,56,48,.91) !important;
  border: 1px dashed rgba(210,205,179,.55) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px rgba(255,255,255,.05) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: .58rem !important;
  line-height: 1.38 !important;
  white-space: pre-line;
}

.tec-skill-page .skill-template p {
  margin: 0 !important;
  color: inherit !important;
  max-width: none !important;
}

/* Shrink-to-fit so only the words are clickable, still on its own line at the right. */
.tec-skill-page .tec-backtop {
  display: table;
  margin: .45rem 2rem .7rem auto;
  color: #47702a !important;
  font-size: .58rem;
  text-decoration: underline;
}

@media screen and (max-width: 44.984375em) {
  .tec-skill-page .tec-skill-action-title {
    font-size: .76rem !important;
    letter-spacing: .10em !important;
  }

  .tec-skill-page .skill-template {
    margin-right: .25rem !important;
    font-size: .64rem !important;
  }
}


/* Responsive embedded videos migrated from Wikidot. */
.md-typeset .tec-video {
  display: block;
  width: min(100%, 444px);
  max-width: 100%;
  aspect-ratio: 444 / 240;
  height: auto;
  margin: .4rem 0 1rem auto;
  border: 0;
}


/* Legacy-style tabsets used by Veteran Character trainer tables. */
.tec-tabs {
  margin: .55rem 0 1rem;
  border: 1px solid #59772e;
  background: rgba(238,228,190,.82);
}

.tec-tabs__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: .18rem .2rem 0;
  background: rgba(207,198,153,.72);
  border-bottom: 1px solid #59772e;
}

.tec-tabs__tab {
  appearance: none;
  margin: 0 .12rem .12rem 0;
  padding: .22rem .55rem;
  border: 1px solid #59772e;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #f1e8c4;
  color: #315f00;
  font: 600 .58rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}

.tec-tabs__tab:hover,
.tec-tabs__tab:focus-visible {
  background: #e5d9a8;
}

.tec-tabs__tab[aria-selected="true"] {
  background: #315f00;
  color: #fff3c7;
}

.tec-tabs__panel {
  padding: .55rem .65rem .7rem;
}

.tec-tabs__source-heading {
  display: none;
}

.tec-tabs__panel pre {
  margin: 0 !important;
  font-size: .60rem !important;
  line-height: 1.36 !important;
  border: 0 !important;
}

@media screen and (max-width: 44.984375em) {
  .tec-tabs__bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tec-tabs__tab {
    flex: 0 0 auto;
    font-size: .64rem;
  }

  .tec-tabs__panel {
    padding: .4rem;
  }
}

/* Multi-tier top navigation flyouts. */
.tec-topnav__fly {
  position: relative;
}

.tec-topnav__flylink {
  display: flex !important;
  justify-content: space-between;
  gap: .6rem;
  align-items: center;
}

.tec-topnav__arrow {
  margin-left: auto;
}

.tec-topnav__submenu {
  display: none;
  position: absolute;
  top: -.26rem;
  left: 100%;
  min-width: 12.5rem;
  max-height: 78vh;
  overflow-y: auto;
  padding: .25rem 0 .35rem;
  background: #183500;
  border: 1px solid #0b2100;
  box-shadow: 0 3px 7px rgba(0,0,0,.35);
}

.tec-topnav__fly:hover > .tec-topnav__submenu,
.tec-topnav__fly:focus-within > .tec-topnav__submenu {
  display: block;
}

.tec-topnav__submenu a {
  display: block;
  padding: .16rem .65rem;
  color: #fff4c8;
  font-size: .62rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.tec-topnav__submenu a:hover,
.tec-topnav__submenu a:focus {
  background: #2f550d;
  color: white;
}


/* Force legacy two-tier top-nav behavior. */
.tec-topnav .tec-topnav__menu {
  overflow: visible !important;
}

.tec-topnav .tec-topnav__menu > .tec-topnav__fly {
  position: relative !important;
  display: block !important;
}

.tec-topnav .tec-topnav__menu > .tec-topnav__fly > .tec-topnav__flylink {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
}

.tec-topnav .tec-topnav__menu > .tec-topnav__fly > .tec-topnav__submenu {
  display: none !important;
  position: absolute !important;
  top: -1px !important;
  left: calc(100% - 1px) !important;
  z-index: 1002 !important;
  min-width: 12.5rem !important;
  width: max-content !important;
  max-width: 18rem;
  max-height: 78vh;
  overflow-y: auto;
  padding: .25rem 0 .35rem !important;
  background: #183500 !important;
  border: 1px solid #0b2100 !important;
  box-shadow: 0 3px 7px rgba(0,0,0,.35) !important;
}

.tec-topnav .tec-topnav__menu > .tec-topnav__fly:hover > .tec-topnav__submenu,
.tec-topnav .tec-topnav__menu > .tec-topnav__fly:focus-within > .tec-topnav__submenu {
  display: block !important;
}

.tec-topnav .tec-topnav__submenu > a {
  display: block !important;
  white-space: nowrap !important;
}

.tec-topnav .tec-topnav__arrow {
  display: inline-block;
  margin-left: .65rem;
}


/* Embedded interactive wiki tools */
.tec-tool-frame {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}
.tec-rb-frame {
  min-height: 560px;
  height: 72vh;
  max-height: 760px;
}
@media (max-width: 700px) {
  .tec-rb-frame {
    min-height: 680px;
    height: 82vh;
  }
}

/* Rank Bonus Calculator */
#tec-rb-calculator { max-width: 760px; margin: .8rem 0 1.6rem; }
.tec-rb-shell { border: 1px solid #7f7b62; border-radius: 12px; overflow: hidden; background: rgba(226,219,186,.88); color: #322e1e; }
.tec-rb-toolbar { min-height: 38px; display:flex; align-items:center; gap:12px; padding:5px 8px; border-bottom:1px solid #8d876d; }
.tec-rb-toolbar strong { flex:1; font-size:.84rem; font-family: Georgia, "Times New Roman", serif; }
.tec-rb-tools { display:flex; gap:5px; align-items:center; }
.tec-rb-tools button { width:28px; height:28px; min-width:28px; border:1px solid #6e6a56; border-radius:6px; background-color:#eee7c8; background-position:center; background-repeat:no-repeat; background-size:22px 22px; cursor:pointer; }
.tec-rb-tools button:hover { background-color:#d9c986; }
.tec-rb-tools button:disabled { opacity:.35; cursor:default; }
.tec-rb-sword { background-image:url("/assets/wikidot/rank-bonus-calculator/swords.png"); }
.tec-rb-shield { background-image:url("/assets/wikidot/rank-bonus-calculator/shield.png"); }
.tec-rb-tree { background-image:url("/assets/wikidot/rank-bonus-calculator/tree.png"); }
.tec-rb-five-col { background-image:url("/assets/wikidot/rank-bonus-calculator/five-column.png"); }
.tec-rb-three-col { background-image:url("/assets/wikidot/rank-bonus-calculator/three-column.png"); }
.tec-rb-five-row { background-image:url("/assets/wikidot/rank-bonus-calculator/five-row.png"); }
.tec-rb-three-row { background-image:url("/assets/wikidot/rank-bonus-calculator/three-row.png"); }
.tec-rb-one-row { background-image:url("/assets/wikidot/rank-bonus-calculator/one-row.png"); }
.tec-rb-dec { position:relative; padding:0!important; font-family:verdana, arial, helvetica, sans-serif; font-weight:700; line-height:1; color:#2f2f24; }
.tec-rb-dec::before, .tec-rb-dec::after { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; white-space:pre; }
.tec-rb-dec-none::before { content:".0"; font-size:15px; color:#79796a; }
.tec-rb-dec-none::after { content:"\2573"; font-size:12px; }
.tec-rb-dec-one::after { content:".0"; font-size:15px; }
.tec-rb-dec-two::after { content:".00"; font-size:12px; }
.tec-rb-dec-three::after { content:".000"; font-size:9px; }
.tec-rb-dec-infin::after { content:".000\A  000\A  000"; font-size:8px; line-height:1; text-align:left; }
.tec-rb-body { display:grid; grid-template-columns:150px minmax(0,1fr); gap:18px; align-items:center; padding:16px 18px; }
.tec-rb-inputs { display:grid; gap:10px; }
.tec-rb-inputs input, .tec-rb-copy-inputs input { width:100%; box-sizing:border-box; font-size:13px; padding:6px 8px; border:1px solid #444; border-radius:4px; background:#fffdf5; color:#322e1e; }
.md-typeset table.tec-rb-results { display:table; width:100%; margin:0; min-width:0; border-collapse:separate; border-spacing:6px 4px; background:transparent; box-shadow:none; }
.md-typeset table.tec-rb-results th, .md-typeset table.tec-rb-results td { border:0!important; background:transparent!important; padding:0!important; color:#322e1e!important; font-size:.65rem; text-align:center; }
.md-typeset table.tec-rb-results tbody th { text-align:right; padding-right:3px!important; font-weight:400; }
.tec-rb-results input { width:100%; min-width:0; box-sizing:border-box; border:0; border-radius:4px; background:#fff; padding:4px 5px; text-align:center; color:#322e1e; font-size:.7rem; }
.tec-rb-add { display:block; width:40%; height:50px; margin:20px auto 0; padding:0; border:1px solid transparent; border-radius:25px; background:url("/assets/wikidot/rank-bonus-calculator/plus.png") no-repeat center / 40px; cursor:pointer; transition:background-color .25s, transform .15s, border-color .25s; }
.tec-rb-add:hover { background-color:#dcc475; border-color:#6e6e5e; transform:scale(1.02); }
.tec-rb-add:active { transform:scale(.97); }
.tec-rb-copy { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; padding:12px; border:1px solid #8d876d; border-radius:8px; background:rgba(226,219,186,.7); }
.tec-rb-copy-inputs { display:grid; gap:8px; }
.tec-rb-copy-value { align-self:center; font-size:.72rem; }
@media(max-width:700px){
  .tec-rb-body { grid-template-columns:1fr; }
  .tec-rb-results-wrap { overflow-x:auto; }
  .tec-rb-copy { grid-template-columns:1fr; }
}


/* Money Calculator */
#tec-money-calculator { max-width: 900px; margin: 1rem 0 1.5rem; }
.tec-money-card { border:1px solid #7f7b62; border-radius:10px; background:rgba(226,219,186,.88); padding:14px; color:#322e1e; }
.tec-money-heading { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin-bottom:10px; }
.tec-money-heading strong, .tec-money-total-title { font-family:Georgia,"Times New Roman",serif; font-size:.9rem; color:#39461f; }
.tec-money-heading span { font-size:.65rem; }
.tec-money-total-title { margin:14px 0 7px; }
.tec-money-scroll { overflow-x:auto; }
.md-typeset table.tec-money-input-table,
.md-typeset table.tec-money-total-table { display:table; width:100%; min-width:620px; margin:0; border-collapse:collapse; background:#f3eed7; box-shadow:none; }
.md-typeset table.tec-money-input-table th,
.md-typeset table.tec-money-total-table th { background:#686d37!important; color:#fff!important; border:1px solid #77735e!important; text-align:center; padding:5px 6px!important; font-size:.66rem; }
.md-typeset table.tec-money-input-table td,
.md-typeset table.tec-money-total-table td { background:#f8f3df!important; color:#322e1e!important; border:1px solid #aaa38a!important; text-align:center; padding:4px!important; font-size:.67rem; }
.tec-money-input-table input { width:78px; max-width:100%; box-sizing:border-box; padding:5px 6px; border:1px solid #8d876d; border-radius:4px; background:#fffdf4; color:#322e1e; text-align:right; font-size:.7rem; }
.tec-money-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tec-money-actions button { border:1px solid #5f6237; border-radius:5px; padding:6px 11px; background:#d8cc97; color:#322e1e; cursor:pointer; font-size:.68rem; }
.tec-money-actions button:hover { background:#caba73; }
@media(max-width:700px){
  .tec-money-heading { display:block; }
  .tec-money-heading span { display:block; margin-top:3px; }
}


/* Fight It Calculator */
#fight-it-app {
  max-width: 1100px;
  margin: 1rem 0 1.5rem;
  color: #322e1e;
}

.fight-it-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr);
  gap: 14px;
  align-items: start;
}

.fight-it-panel {
  margin: 0;
  border: 1px solid #77735e;
  border-radius: 8px;
  background: rgba(243,238,215,.92);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(50,46,30,.12);
}

.fight-it-values {
  grid-row: span 2;
}

.fight-it-panel legend {
  padding: 0 6px;
  color: #4d5229;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .86rem;
  font-weight: 700;
}

.fight-it-panel label {
  display: inline-block;
  margin: 4px 6px 4px 0;
  font-size: .68rem;
  font-weight: 600;
}

.fight-it-panel select,
.fight-it-panel input[type="text"] {
  min-height: 30px;
  margin: 3px 12px 7px 0;
  padding: 4px 7px;
  border: 1px solid #8d876d;
  border-radius: 4px;
  background: #fffdf4;
  color: #322e1e;
  font-size: .68rem;
  box-sizing: border-box;
}

.fight-it-panel select {
  min-width: 165px;
}

.fight-it-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  accent-color: #686d37;
  margin-right: 9px;
}

.fight-it-results {
  margin-top: 14px;
  border: 1px solid #77735e;
  border-radius: 8px;
  background: rgba(226,219,186,.92);
  padding: 14px;
}

.fight-it-calc-button {
  border: 1px solid #4d5229;
  border-radius: 5px;
  background: #686d37;
  color: #fff;
  padding: 8px 14px;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}

.fight-it-calc-button:hover {
  background: #565c2f;
}

.fight-it-results-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 10px;
}

.fight-it-result-primary,
.fight-it-result-detail {
  border: 1px solid #aaa38a;
  border-radius: 6px;
  background: #f8f3df;
  padding: 9px 11px;
  min-height: 54px;
}

.fight-it-results p {
  margin: 4px 0;
  font-size: .68rem;
}

.fight-it-result-primary p:first-child:not(:empty),
.fight-it-result-primary p:nth-child(2):not(:empty),
.fight-it-result-primary p:nth-child(3):not(:empty) {
  font-weight: 700;
  color: #39461f;
}

@media (max-width: 900px) {
  .fight-it-grid {
    grid-template-columns: 1fr;
  }

  .fight-it-values {
    grid-row: auto;
  }

  .fight-it-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .fight-it-panel label {
    display: block;
    margin-top: 7px;
  }

  .fight-it-panel select,
  .fight-it-panel input[type="text"] {
    width: 100% !important;
    min-width: 0;
    margin-right: 0;
  }
}


/* National Lores */
.tec-national-lores > h2 {
  margin-top: 1.5rem;
  padding: .3rem .55rem;
  border-bottom: 2px solid #566126;
  background: rgba(104,109,55,.10);
  color: #39461f;
}

.tec-national-lores .tec-lore-card {
  margin: .8rem 0 .9rem 1rem;
  border: 1px solid #aaa38a;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(248,243,223,.84);
}

.tec-national-lores .tec-lore-card > h4 {
  margin: 0;
  padding: .45rem .7rem;
  border: 0;
  border-bottom: 1px solid #aaa38a;
  background: rgba(226,219,186,.96);
  color: #39461f;
  font-size: .78rem;
}

.tec-national-lores .tec-lore-card > p {
  margin: 0;
  padding: .45rem .75rem 0;
  background: transparent;
}

.tec-national-lores .tec-lore-card > p:last-child {
  padding-bottom: .65rem;
}

@media (max-width: 700px) {
  .tec-national-lores .tec-lore-card {
    margin-left: .3rem;
  }
}


/* Stats page */
.stats-page > h3 {
  margin-top: 1.45rem;
  padding: .32rem .55rem;
  border-bottom: 2px solid #566126;
  background: rgba(104,109,55,.10);
  color: #39461f;
}

.stats-page .tec-stat-card {
  margin: .8rem 0 .9rem .8rem;
  border: 1px solid #aaa38a;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(248,243,223,.84);
}

.stats-page .tec-stat-card > h4 {
  margin: 0;
  padding: .42rem .65rem;
  border-bottom: 1px solid #aaa38a;
  background: rgba(226,219,186,.96);
  color: #39461f;
  font-size: .78rem;
}

.stats-page .tec-stat-card > p,
.stats-page .tec-stat-card > ul {
  margin-left: .7rem;
  margin-right: .7rem;
}

.stats-page .tec-stat-card > p:first-of-type {
  margin-top: .6rem;
}

.stats-page .tec-stat-card > p:last-child,
.stats-page .tec-stat-card > ul:last-child {
  margin-bottom: .65rem;
}

.stats-page table {
  max-width: 720px;
}

@media (max-width: 700px) {
  .stats-page .tec-stat-card {
    margin-left: .25rem;
  }
}


/* Shops app */
#tec-shops-app { max-width: 1100px; margin: 1rem 0 1.5rem; color:#322e1e; }
.tec-shops-loading,.tec-shops-error,.tec-shops-empty { border:1px solid #aaa38a; border-radius:7px; padding:14px; background:#f8f3df; }
.tec-shops-controls { max-width: 760px; border:1px solid #77735e; border-radius:8px; background:rgba(243,238,215,.94); padding:12px; box-shadow:0 1px 2px rgba(50,46,30,.12); }
.tec-shops-search-row { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; }
.tec-shops-search-icon { font-size:1.25rem; color:#686d37; line-height:1; }
.tec-shops-search-row input { width:100%; min-width:0; box-sizing:border-box; border:1px solid #8d876d; border-radius:5px; padding:9px 10px; background:#fffdf4; color:#322e1e; font-size:.72rem; }
.tec-shops-search-row button { border:1px solid #565c2f; border-radius:5px; padding:8px 11px; background:#686d37; color:white; font-size:.68rem; cursor:pointer; }
.tec-shops-options { display:grid; gap:7px; margin-top:10px; padding-top:10px; border-top:1px solid #c1b99b; font-size:.67rem; }
.tec-shops-options label { display:flex; align-items:center; gap:7px; }
.tec-shops-options input { accent-color:#686d37; }
.tec-shops-options small { color:#665f49; font-style:italic; }
.tec-shops-locations { max-width:1060px; margin:14px 0; border:1px solid #aaa38a; border-radius:7px; background:rgba(226,219,186,.88); padding:10px 12px; }
.tec-shops-locations > strong { display:block; margin-bottom:5px; color:#39461f; font-family:Georgia,"Times New Roman",serif; }
.tec-shops-location-links { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:.66rem; }
.tec-shop-location { margin:1rem 0 1.4rem; }
.tec-shop-location > h2 { margin:0 0 .55rem; padding:.32rem .55rem; border-bottom:2px solid #566126; background:rgba(104,109,55,.12); color:#39461f; font-size:.95rem; }
.tec-shop-location > h2 a { color:#39461f; }
.tec-shop-card { max-width:860px; margin:0 0 .65rem .7rem; border:1px solid #aaa38a; border-radius:7px; overflow:hidden; background:rgba(248,243,223,.84); }
.tec-shop-card h3 { margin:0; padding:.4rem .6rem; background:#686d37; color:#fff; font-size:.72rem; font-family:Georgia,"Times New Roman",serif; }
.tec-shop-card h3 span { font-weight:400; opacity:.9; }
.md-typeset .tec-shop-card table { display:table; width:100%; margin:0; min-width:0; border:0; background:transparent; box-shadow:none; }
.md-typeset .tec-shop-card td { border:0!important; border-bottom:1px dotted #c0b89b!important; padding:.27rem .55rem!important; background:transparent!important; color:#322e1e!important; font-size:.66rem; }
.md-typeset .tec-shop-card tr:last-child td { border-bottom:0!important; }
.md-typeset .tec-shop-card tbody tr:nth-child(odd) td {
  background:#f8f3df!important;
  color:#322e1e!important;
}
.md-typeset .tec-shop-card tbody tr:nth-child(even) td {
  background:#eee7cc!important;
  color:#322e1e!important;
}
.md-typeset .tec-shop-card tbody tr:hover td {
  background:#e2d8b5!important;
  color:#322e1e!important;
}
.md-typeset .tec-shop-card td:last-child { width:130px; white-space:nowrap; text-align:right; font-weight:600; }
.tec-shop-rotating { color:#456b20; font-weight:700; }
.tec-shop-info { display:inline-flex; align-items:center; justify-content:center; width:1.15em; height:1.15em; border-radius:50%; background:#686d37; color:#fff; font-size:.58rem; cursor:help; }
.tec-shops-results-count { margin:.75rem 0 .4rem; font-size:.66rem; color:#5f5a48; }
.tec-shops-table-wrap { max-width:1060px; overflow-x:auto; border:1px solid #aaa38a; border-radius:7px; background:#f8f3df; }
.md-typeset table.tec-shops-results-table { display:table; width:100%; min-width:720px; margin:0; border-collapse:collapse; background:transparent; box-shadow:none; }
.md-typeset table.tec-shops-results-table th { background:#686d37!important; color:#fff!important; border:1px solid #565c2f!important; padding:.42rem .55rem!important; font-size:.66rem; text-align:left; }
.md-typeset table.tec-shops-results-table td { background:#f8f3df!important; color:#322e1e!important; border:0!important; border-bottom:1px solid #c7bea0!important; padding:.38rem .55rem!important; font-size:.66rem; }
.md-typeset table.tec-shops-results-table tr:nth-child(even) td { background:#eee7cc!important; }
.md-typeset table.tec-shops-results-table td:nth-child(2) { white-space:nowrap; }
@media(max-width:700px){
  .tec-shops-search-row { grid-template-columns:auto 1fr; }
  .tec-shops-search-row button { grid-column:2; justify-self:start; }
  .tec-shop-card { margin-left:.2rem; }
}


/* Collapsible recipe/lore table section labels restored from Wikidot colspans. */
.md-typeset details table .tec-skill-table-section {
  background: #686d37 !important;
  color: #fffdf4 !important;
  text-align: left !important;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .34rem .5rem !important;
}


/* Universal responsive table wrapper for migrated/raw HTML and Markdown tables. */
.tec-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: .7rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.tec-table-scroll > table {
  margin: 0 !important;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset__table,
  .tec-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .md-typeset__table > table,
  .tec-table-scroll > table {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
  }
}


/* Page history app */
.tec-history-app {
  max-width: 1050px;
  margin: 1rem 0 2rem;
}
.tec-history-loading,
.tec-history-error,
.tec-history-header,
.tec-history-entry,
.tec-history-detail {
  background: rgba(244,238,207,.94);
  border: 1px solid #8f8969;
  border-radius: 6px;
}
.tec-history-loading,
.tec-history-error {
  padding: .9rem 1rem;
}
.tec-history-header {
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:center;
  padding:.7rem .85rem;
  margin-bottom:.75rem;
}
.tec-history-current {
  white-space:nowrap;
}
.tec-history-list {
  display:grid;
  gap:.55rem;
}
.tec-history-entry {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.7rem .8rem;
}
.tec-history-entry__title {
  font-weight:700;
  color:#30351e;
}
.tec-history-entry__meta {
  margin-top:.18rem;
  font-size:.82em;
  color:#6d6854;
}
.tec-history-current-badge {
  display:inline-block;
  margin-left:.35rem;
  padding:.08rem .34rem;
  border-radius:999px;
  background:#687038;
  color:#fffdf4;
  font-size:.78em;
}
.tec-history-entry__actions {
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.tec-history-entry__actions button,
.tec-history-close {
  border:1px solid #646b35;
  background:#687038;
  color:#fffdf4;
  border-radius:4px;
  padding:.32rem .52rem;
  cursor:pointer;
  font:inherit;
}
.tec-history-entry__actions button:hover,
.tec-history-close:hover {
  background:#555d2d;
}
.tec-history-entry__actions button:disabled {
  opacity:.6;
  cursor:wait;
}
.tec-history-detail {
  margin-top:1rem;
  overflow:hidden;
}
.tec-history-detail__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.6rem .75rem;
  background:#646b35;
  color:#fffdf4;
}
.tec-history-detail__head h2 {
  margin:0 !important;
  color:#fffdf4 !important;
  border:0 !important;
  padding:0 !important;
  font-size:1rem !important;
}
.tec-history-detail__body {
  padding:.75rem;
}
.tec-history-summary {
  margin-bottom:.65rem;
}
.tec-history-add { color:#2f6a2d; font-weight:700; }
.tec-history-del { color:#8a342d; font-weight:700; }
.tec-history-diff,
.tec-history-version {
  margin:0;
  max-height:65vh;
  overflow:auto;
  background:#2f302c;
  color:#f2f0e5;
  border:1px solid #1f201d;
  border-radius:4px;
  font: .74rem/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.tec-history-diff__line {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  padding:0 .55rem;
}
.tec-history-diff__line.is-add { background:#263e29; }
.tec-history-diff__line.is-del { background:#4a2926; }
.tec-history-diff__line.is-meta { background:#343d50; color:#d5def7; }
.tec-history-version {
  padding:.7rem;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
@media screen and (max-width: 44.984375em) {
  .tec-history-header,
  .tec-history-entry {
    align-items:flex-start;
    flex-direction:column;
  }
  .tec-history-entry__actions {
    width:100%;
    justify-content:flex-start;
  }
}

/* Deployment retry: page history interface */


/* Grouped trainer tables are assigned this class by tec-skill-pages.js.
   Keep the same TEC table skin used by ordinary Markdown tables. */
.md-typeset table.tec-skill-overview-table {
  display: table;
  width: auto;
  min-width: min(100%, 32rem);
  max-width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: var(--tec-table);
  color: #f2f2f2;
  border: 1px solid #2b2b2b;
  box-shadow: none;
  font-size: .66rem;
  line-height: 1.36;
}

.md-typeset table.tec-skill-overview-table th {
  background: var(--tec-table-head);
  color: #242424;
  border: 1px solid #777;
  text-align: center;
  font-weight: 700;
  padding: .27rem .42rem;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.md-typeset table.tec-skill-overview-table td {
  border: 1px solid #575757;
  padding: .27rem .42rem;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.md-typeset table.tec-skill-overview-table tbody tr:nth-child(even) {
  background: var(--tec-table-alt);
}

.md-typeset table.tec-skill-overview-table tbody tr:hover {
  background: #4a4a43;
}

.md-typeset table.tec-skill-overview-table td a {
  color: #c9e3ff;
  font-weight: 600;
  text-decoration-color: rgba(201,227,255,.6);
}

.md-typeset table.tec-skill-overview-table td a:visited {
  color: #d8c9ff;
}

.md-typeset table.tec-skill-overview-table td a:hover,
.md-typeset table.tec-skill-overview-table td a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.md-typeset table.tec-skill-overview-table th a {
  color: #244a6b;
}

.md-typeset table.tec-skill-overview-table td:first-child,
.md-typeset table.tec-skill-overview-table th:first-child {
  overflow-wrap: normal;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset table.tec-skill-overview-table {
    font-size: .69rem;
  }
}


/* Make fifth-level headings visually distinct from body copy. */
.md-typeset h5 {
  margin: .78rem 0 .32rem;
  padding-bottom: .1rem;
  color: #465032;
  border-bottom: 1px dotted rgba(85, 122, 46, .55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Character biography pages use the original quote-style presentation. */
.tec-bio-page .tec-bio-quote {
  margin: .55rem 0 1.2rem;
  padding: .8rem 1rem;
}
.tec-bio-page .tec-bio-quote > :first-child { margin-top: 0; }
.tec-bio-page .tec-bio-quote > :last-child { margin-bottom: 0; }

/* Map images may use the full article column rather than prose width. */
.md-typeset p:has(> a.tec-map-image-link),
.md-typeset p:has(> a > img) {
  max-width: none;
}
.md-typeset a.tec-map-image-link {
  display: block;
  width: 100%;
}
.md-typeset a.tec-map-image-link img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}


/* Multiple RB calculators created by the classic-style + control. */
.tec-rb-stack {
  display: grid;
}
.tec-rb-calculator-card {
  margin: 0;
  animation: tec-rb-fade-in .3s ease-in-out;
}
.tec-rb-calculator-card + .tec-rb-calculator-card {
  border-top: 1px solid #8d876d;
}
@keyframes tec-rb-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tec-rb-calculator-card { animation: none; }
  .tec-rb-add, .tec-rb-add:hover, .tec-rb-add:active { transition: none; transform: none; }
}


/* Mobile calculator usability pass: Money + Fight It.
   Training Cost has page-local styles because its legacy calculator is self-contained. */
@media screen and (max-width: 600px) {
  #tec-money-calculator,
  #fight-it-app {
    max-width: 100%;
    margin-top: .65rem;
  }

  .tec-money-card {
    padding: 9px;
    border-radius: 7px;
  }

  .tec-money-scroll {
    margin-left: -2px;
    margin-right: -2px;
    padding-bottom: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .md-typeset table.tec-money-input-table {
    min-width: 34rem;
  }

  .md-typeset table.tec-money-total-table {
    min-width: 31rem;
  }

  .tec-money-input-table input {
    width: 4.25rem;
    min-height: 40px;
    padding: 7px 6px;
    font-size: 16px;
  }

  .tec-money-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .tec-money-actions button {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    font-size: .8rem;
  }

  .tec-money-heading strong,
  .tec-money-total-title {
    font-size: .95rem;
  }

  .tec-money-heading span {
    font-size: .75rem;
    line-height: 1.4;
  }

  .fight-it-grid {
    gap: 10px;
  }

  .fight-it-panel,
  .fight-it-results {
    padding: 10px;
    border-radius: 6px;
  }

  .fight-it-panel legend {
    font-size: .95rem;
  }

  .fight-it-panel label {
    display: block;
    margin: 9px 0 3px;
    font-size: .78rem;
    line-height: 1.35;
  }

  .fight-it-panel select,
  .fight-it-panel input[type="text"] {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 8px 9px;
    font-size: 16px;
  }

  .fight-it-panel input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 3px 8px 7px 0;
  }

  .fight-it-calc-button {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font-size: .82rem;
  }

  .fight-it-results-grid {
    gap: 9px;
  }

  .fight-it-result-primary,
  .fight-it-result-detail {
    padding: 10px;
    min-height: 0;
  }

  .fight-it-results p {
    font-size: .78rem;
    line-height: 1.45;
  }
}


/* Mobile Shops pass: preserve desktop tables, but make search/browse genuinely phone-friendly. */
@media screen and (max-width: 600px) {
  #tec-shops-app {
    max-width: 100%;
    margin-top: .65rem;
  }

  .tec-shops-controls {
    max-width: none;
    padding: 9px;
    border-radius: 7px;
  }

  .tec-shops-search-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .tec-shops-search-icon {
    display: none;
  }

  .tec-shops-search-row input {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .tec-shops-search-row button {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    font-size: .8rem;
  }

  .tec-shops-options {
    gap: 10px;
    font-size: .78rem;
  }

  .tec-shops-options label {
    min-height: 36px;
    gap: 9px;
    line-height: 1.35;
  }

  .tec-shops-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .tec-shops-options small {
    font-size: .72rem;
    line-height: 1.4;
  }

  .tec-shops-locations {
    margin: 10px 0 14px;
    padding: 9px;
  }

  .tec-shops-location-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: .72rem;
  }

  .tec-shops-location-links a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 5px 7px;
    border: 1px solid rgba(119,115,94,.45);
    border-radius: 5px;
    background: rgba(255,253,244,.55);
    line-height: 1.2;
  }

  .tec-shop-location {
    margin: .8rem 0 1.15rem;
  }

  .tec-shop-location > h2 {
    margin-bottom: .45rem;
    padding: .38rem .48rem;
    font-size: .88rem;
  }

  .tec-shop-card {
    width: 100%;
    max-width: none;
    margin: 0 0 .65rem;
    border-radius: 6px;
  }

  .tec-shop-card h3 {
    padding: .48rem .55rem;
    font-size: .78rem;
    line-height: 1.3;
  }

  .tec-shop-card h3 span {
    display: block;
    margin-top: 2px;
  }

  .md-typeset .tec-shop-card td {
    padding: .4rem .48rem !important;
    font-size: .74rem;
    line-height: 1.35;
  }

  .md-typeset .tec-shop-card td:first-child {
    overflow-wrap: anywhere;
  }

  .md-typeset .tec-shop-card td:last-child {
    width: 6.6rem;
    padding-left: .3rem !important;
  }

  .tec-shop-info {
    width: 1.45rem;
    height: 1.45rem;
    font-size: .68rem;
    vertical-align: middle;
  }

  .tec-shops-results-count {
    margin: .65rem 0 .4rem;
    font-size: .75rem;
  }

  /* Search results become stacked records instead of a 720px horizontal table. */
  .tec-shops-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .md-typeset table.tec-shops-results-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
  }

  .md-typeset table.tec-shops-results-table thead {
    display: none;
  }

  .md-typeset table.tec-shops-results-table tbody {
    display: grid;
    gap: 8px;
  }

  .md-typeset table.tec-shops-results-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
    padding: 9px 10px;
    border: 1px solid #aaa38a;
    border-radius: 7px;
    background: #f8f3df;
  }

  .md-typeset table.tec-shops-results-table tr:nth-child(even) {
    background: #eee7cc;
  }

  .md-typeset table.tec-shops-results-table td {
    display: block;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: .75rem;
    line-height: 1.35;
  }

  .md-typeset table.tec-shops-results-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .md-typeset table.tec-shops-results-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
    text-align: right;
    font-weight: 700;
  }

  .md-typeset table.tec-shops-results-table td:nth-child(3),
  .md-typeset table.tec-shops-results-table td:nth-child(4) {
    grid-column: 1 / -1;
    color: #5f5a48 !important;
    font-size: .7rem;
  }

  .md-typeset table.tec-shops-results-table td:nth-child(3)::before {
    content: "Shop: ";
    font-weight: 700;
  }

  .md-typeset table.tec-shops-results-table td:nth-child(4)::before {
    content: "Location: ";
    font-weight: 700;
  }

  .tec-shops-empty,
  .tec-shops-loading,
  .tec-shops-error {
    padding: 11px;
    font-size: .78rem;
    line-height: 1.45;
  }
}

@media screen and (max-width: 360px) {
  .tec-shops-location-links {
    grid-template-columns: 1fr;
  }
}


/* Wikidot-style unresolved page links. */
.md-typeset a.tec-missing-link,
.md-typeset a.tec-missing-link:visited,
.md-typeset table a.tec-missing-link,
.md-typeset table a.tec-missing-link:visited {
  color: #a51f1f !important;
  text-decoration: underline dotted !important;
  text-decoration-color: rgba(165,31,31,.75) !important;
  text-underline-offset: .1em;
}

.md-typeset a.tec-missing-link:hover,
.md-typeset a.tec-missing-link:focus {
  color: #7e1010 !important;
  background: rgba(165,31,31,.08);
}


/* Large illustrative artwork should not be mistaken for a full-width map. */
.md-typeset a.tec-feature-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: .55rem auto 1rem;
}

.md-typeset img.tec-feature-image {
  display: block;
  width: auto;
  max-width: min(100%, 900px);
  max-height: 68vh;
  height: auto;
  object-fit: contain;
}

@media screen and (max-width: 44.984375em) {
  .md-typeset a.tec-feature-image-link {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .md-typeset img.tec-feature-image {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }
}


/* TEC shortcut bar is part of the sticky Material header stack. */
.md-header > .tec-topnav {
  width: 100%;
}

.md-header {
  height: auto;
}


/* Search must layer above the TEC shortcut row when expanded. */
.md-header .md-search {
  position: relative;
  z-index: 30;
}

.md-header .md-search__form,
.md-header .md-search__output {
  position: relative;
  z-index: 31;
}

@media screen and (max-width: 59.984375em) {
  .md-header .md-search {
    z-index: 1001;
  }

  .md-header .md-search__overlay,
  .md-header .md-search__inner,
  .md-header .md-search__output {
    z-index: 1002;
  }
}


/* Material search is an overlay; do not let its expanded results affect
   the measured masthead + TEC-nav stack. */
.md-header .md-search__output {
  position: absolute;
}

body:has([data-md-toggle="search"]:checked) .tec-topnav {
  visibility: hidden;
  pointer-events: none;
}


/* Account page: distinct topic navigation and section hierarchy. */
.tec-account-jump {
  margin: .65rem 0 1.15rem;
  padding: .65rem .8rem;
  border: 1px solid #aaa38a;
  border-radius: 7px;
  background: rgba(226,219,186,.78);
  font-size: .72rem;
  line-height: 1.5;
}

.tec-account-jump p {
  margin: 0;
}

.tec-account-jump a {
  font-weight: 700;
  white-space: nowrap;
}

.md-typeset .tec-account-jump ~ h2 {
  margin-top: 1.7rem;
  padding: .42rem .62rem;
  border-top: 1px solid #8f8969;
  border-bottom: 2px solid #566126;
  background: linear-gradient(90deg, rgba(104,109,55,.16), rgba(226,219,186,.28));
  color: #39461f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.md-typeset .tec-account-jump ~ h2 + p {
  margin-top: .7rem;
}

.md-typeset .tec-account-jump ~ h3 {
  margin-top: 1.1rem;
  padding-bottom: .18rem;
  border-bottom: 1px dotted rgba(86,97,38,.55);
  color: #465032;
}

.md-typeset .tec-account-jump ~ h5 {
  margin-top: 1rem;
  padding: .32rem .48rem;
  border-left: 3px solid #686d37;
  border-bottom: 0;
  background: rgba(104,109,55,.08);
  font-size: .78rem;
}

@media screen and (max-width: 600px) {
  .tec-account-jump {
    padding: .55rem .65rem;
    font-size: .76rem;
  }

  .tec-account-jump a {
    display: inline-block;
    margin: .15rem .2rem .15rem 0;
  }

  .md-typeset .tec-account-jump ~ h2 {
    margin-top: 1.3rem;
    font-size: .95rem;
  }
}


/* MkDocs replacement for legacy Wikidot ListPages indexes. */
.tec-listpages {
  margin: .45rem 0 1rem;
}

.tec-listpages ul {
  margin: 0;
  padding-left: 1.15rem;
}

.tec-listpages li {
  margin: .22rem 0;
}

.tec-listpages a {
  font-size: 1.2em;
  font-weight: 600;
}

.tec-listpages--empty {
  color: #665f49;
  font-style: italic;
  font-size: .76rem;
}


/* General Rules: restore the old two-column desktop layout. */
.tec-general-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(19rem, .82fr);
  gap: 1.1rem;
  align-items: start;
  margin-top: .6rem;
}

.tec-general-rules-column {
  min-width: 0;
}

.tec-general-rules-column > :first-child {
  margin-top: 0;
}

.tec-general-rules-column > h2:first-child {
  margin-top: 0;
}

.tec-general-rules-contact {
  padding-left: 1rem;
  border-left: 1px solid rgba(86,97,38,.38);
}

.tec-general-rules-contact h2 {
  margin-top: 1.35rem;
  padding: .35rem .5rem;
  border-bottom: 2px solid #566126;
  background: rgba(104,109,55,.1);
  color: #39461f;
}

.tec-general-rules-contact h2:first-child {
  margin-top: 0;
}

.tec-general-rules-contact h5 {
  margin-top: .85rem;
}

@media screen and (max-width: 62rem) {
  .tec-general-rules-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .tec-general-rules-contact {
    padding-left: 0;
    border-left: 0;
    padding-top: .9rem;
    border-top: 2px solid rgba(86,97,38,.45);
  }
}


/* Stats page: two-column attribute/reference layout with readable mobile fallback. */
.tec-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: .75rem 0 1rem;
}

.tec-stat-card {
  min-width: 0;
  padding: .7rem .8rem .78rem;
  border: 1px solid #aaa38a;
  border-radius: 7px;
  background: rgba(248,243,223,.72);
}

.tec-stat-card > :first-child {
  margin-top: 0;
}

.tec-stat-card h4 {
  margin: 0 0 .4rem;
  padding-bottom: .22rem;
  border-bottom: 1px solid rgba(86,97,38,.34);
  color: #39461f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
}

.tec-stat-card p:last-child,
.tec-stat-card ul:last-child {
  margin-bottom: 0;
}

.tec-stats-reference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .78fr);
  gap: 1rem;
  align-items: start;
  margin: 1rem 0 1.2rem;
}

.tec-stats-reference-panel {
  min-width: 0;
  padding: .75rem .85rem;
  border: 1px solid #aaa38a;
  border-radius: 7px;
  background: rgba(226,219,186,.5);
}

.tec-stats-reference-panel > :first-child {
  margin-top: 0;
}

.tec-stats-reference-panel h2 {
  margin: 0 0 .65rem;
  padding: .38rem .48rem;
  border-bottom: 2px solid #566126;
  background: rgba(104,109,55,.11);
  color: #39461f;
  font-size: 1rem;
}

.tec-stats-reference-panel h4 {
  margin-top: .9rem;
}

.tec-stats-reference-panel table {
  width: 100%;
}

.md-typeset .tec-stat-grid ~ h2,
.md-typeset .tec-stats-reference-grid ~ h2 {
  margin-top: 1.6rem;
  padding: .38rem .5rem;
  border-bottom: 2px solid #566126;
  background: linear-gradient(90deg, rgba(104,109,55,.13), transparent);
  color: #39461f;
}

@media screen and (max-width: 62rem) {
  .tec-stat-grid,
  .tec-stats-reference-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .tec-stat-card,
  .tec-stats-reference-panel {
    padding: .6rem .65rem;
  }

  .tec-stat-card h4 {
    font-size: .86rem;
  }
}
