/* ==========================================================================
   Warcastle Wiki — design system (loaded last, overrides extra.css / wiki-editor.css)
   Palette: parchment, leather, gold, steel. Every color in the other stylesheets
   points to these tokens.
   ========================================================================== */

:root {
  /* Warm neutral scale (fixed values, used for always-dark surfaces like dialogs) */
  --wc-ink-50: #faf7f1;
  --wc-ink-100: #f3ede3;
  --wc-ink-200: #e6dccc;
  --wc-ink-300: #d2c5b1;
  --wc-ink-400: #ab9c86;
  --wc-ink-500: #7f715f;
  --wc-ink-700: #514639;
  --wc-ink-800: #3b3329;
  --wc-ink-850: #322b23;
  --wc-ink-900: #29231c;
  --wc-ink-950: #1c1813;

  --wc-gold-50: #fdf8ec;
  --wc-gold-100: #faefd2;
  --wc-gold-200: #f3dca0;
  --wc-gold-300: #ecc66a;
  --wc-gold-400: #e0a93c;
  --wc-gold-500: #c48a22;
  --wc-gold-600: #9f6a15;

  --wc-leather-600: #7a4a24;
  --wc-leather-700: #5e381b;
  --wc-leather-800: #452914;
  --wc-leather-900: #2e1b0d;

  --wc-blood-200: #f2b8ae;
  --wc-blood-300: #e58e80;
  --wc-blood-400: #d0604f;
  --wc-blood-500: #b4402f;
  --wc-blood-600: #8f2e21;

  --wc-moss-200: #b9dcb0;
  --wc-moss-500: #4f8a45;
  --wc-steel-300: #8fb7d6;
  --wc-steel-600: #3f6c91;

  /* Semantic tokens (switch with the theme) */
  --wc-bg: #fcfaf6;
  --wc-surface: #ffffff;
  --wc-surface-2: #f6f1e8;
  --wc-border: #e6dccc;
  --wc-border-strong: #d2c5b1;
  --wc-text: #2b241c;
  --wc-text-muted: #6f6253;
  --wc-heading: #3a2414;
  --wc-accent: #a8701a;
  --wc-accent-strong: #8a5a10;
  --wc-accent-soft: rgba(196, 138, 34, 0.12);
  --wc-shadow: 0 1px 2px rgba(46, 27, 13, 0.06), 0 6px 18px rgba(46, 27, 13, 0.08);
  --wc-radius: 10px;

  --wc-font-display: "Cormorant Garamond", "PT Serif", Georgia, "Times New Roman", serif;
}

[data-md-color-scheme="slate"] {
  --md-hue: 30; /* warm tint for all Material "slate" greys */
  --wc-bg: #1a1612;
  --wc-surface: #231e18;
  --wc-surface-2: #2b241d;
  --wc-border: #3b3329;
  --wc-border-strong: #514639;
  --wc-text: #ece4d6;
  --wc-text-muted: #b3a690;
  --wc-heading: #f3dca0;
  --wc-accent: #e0a93c;
  --wc-accent-strong: #ecc66a;
  --wc-accent-soft: rgba(224, 169, 60, 0.14);
  --wc-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Material palette on top of "brown/amber" (body carries both attributes) */
[data-md-color-scheme][data-md-color-primary] {
  --md-primary-fg-color: var(--wc-leather-800);
  --md-primary-fg-color--light: var(--wc-leather-600);
  --md-primary-fg-color--dark: var(--wc-leather-900);
  --md-accent-fg-color: var(--wc-accent);
  --md-accent-fg-color--transparent: var(--wc-accent-soft);
  --md-typeset-a-color: var(--wc-accent-strong);
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: var(--wc-bg);
  --md-default-fg-color: rgba(43, 36, 28, 0.87);
  --md-default-fg-color--light: rgba(43, 36, 28, 0.62);
  --md-default-fg-color--lighter: rgba(43, 36, 28, 0.32);
  --md-default-fg-color--lightest: rgba(43, 36, 28, 0.1);
  --md-code-bg-color: var(--wc-surface-2);
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--wc-bg);
  --md-default-fg-color--light: rgba(236, 228, 214, 0.7);
  --md-code-bg-color: var(--wc-surface-2);
}

/* ---------------------------------------------------------------------------
   Icons, focus, motion
   --------------------------------------------------------------------------- */
.wc-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  vertical-align: -0.18em;
}

.wc-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--wc-gold-400) !important;
  outline-offset: 2px !important;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------------- */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.wc-hero__title,
.md-header__topic:first-child,
.wc-step__num,
.wc-404__code,
.wc-cat-tile__name,
.wc-footer__brand strong {
  font-family: var(--wc-font-display);
  letter-spacing: 0.005em;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.md-typeset h1 {
  color: var(--wc-heading);
  font-weight: 700;
  font-size: 2.35em;
  line-height: 1.12;
  margin: 0;
}

.md-typeset h2 {
  color: var(--wc-heading);
  font-weight: 700;
  font-size: 1.75em;
  line-height: 1.2;
}

.md-typeset h3 {
  font-weight: 700;
  font-size: 1.35em;
}

.md-typeset {
  color: var(--wc-text);
}

.md-nav__link {
  color: var(--md-default-fg-color--light);
}

.md-nav__item--section > .md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  font-weight: 600;
  color: var(--md-default-fg-color);
}

/* ---------------------------------------------------------------------------
   Header: full title, wide search, one style of icon buttons
   --------------------------------------------------------------------------- */
.md-header {
  background: linear-gradient(180deg, var(--wc-leather-800), var(--wc-leather-900));
  box-shadow: 0 1px 0 rgba(236, 198, 106, 0.18), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.md-header__title {
  flex-grow: 1;
  min-width: 6.5rem;
  margin-right: 0.4rem;
}

.md-header__topic:first-child {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--wc-gold-200);
}

.md-header .wc-home-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.md-header .wc-home-link:hover {
  color: var(--wc-gold-300);
}

.md-header__topic[data-md-component="header-topic"] {
  cursor: pointer;
}

@media screen and (min-width: 76.25em) {
  .md-search__inner {
    width: 15rem;
  }
}

/* All custom header buttons share one look */
.md-header .wiki-header-btn,
.md-header .wiki-random-btn,
.md-header #btn-wiki-new-article,
.md-header .wiki-bookmarks-btn,
.md-header .wiki-auth-header-btn,
.md-header .wiki-user-chip-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box !important;
  height: 2.1rem !important;
  min-height: 0 !important;
  min-width: 2.1rem;
  padding: 0 0.55rem !important;
  line-height: 1 !important;
  margin: 0 0.15rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(243, 220, 160, 0.18) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--wc-ink-50) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transform: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.md-header .wiki-header-btn:hover,
.md-header .wiki-random-btn:hover,
.md-header #btn-wiki-new-article:hover,
.md-header .wiki-bookmarks-btn:hover,
.md-header .wiki-auth-header-btn:hover,
.md-header .wiki-user-chip-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(243, 220, 160, 0.4) !important;
}

/* Icon-only by default, labels only where they help */
.md-header .wiki-btn-label {
  display: none !important;
}

.md-header .wiki-auth-header-btn {
  background: var(--wc-gold-500) !important;
  border-color: var(--wc-gold-400) !important;
  color: var(--wc-ink-950) !important;
}

.md-header .wiki-auth-header-btn:hover {
  background: var(--wc-gold-400) !important;
}

@media screen and (min-width: 60em) {
  .md-header .wiki-auth-header-btn .wiki-btn-label,
  .md-header .wiki-user-chip-btn .wiki-user-email {
    display: inline !important;
  }
}

/* "Create article" is shown to editors only */
body:not(.wc-can-edit) #btn-wiki-new-article {
  display: none !important;
}

.md-header #wiki-bookmarks-wrap,
.md-header #wiki-auth-widget-container,
.md-header .wiki-user-chip-wrap {
  display: flex !important;
  align-items: center;
  margin: 0 !important;
}

.md-header .wiki-header-btn .wc-icon,
.md-header .wiki-random-btn .wc-icon,
.md-header .wiki-bookmarks-btn .wc-icon {
  width: 1.05rem;
  height: 1.05rem;
}

/* Bookmark counter: digit centred in a round badge */
.md-header .wiki-bookmarks-count {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem !important;
  border-radius: 1rem;
  background: var(--wc-gold-400) !important;
  color: var(--wc-ink-950) !important;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
}

.md-header .wiki-role-badge,
.md-header .wiki-chip-arrow {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   Article header: breadcrumbs → title + actions → meta line
   --------------------------------------------------------------------------- */
.md-typeset .wiki-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
  padding: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 0.72rem;
  color: var(--wc-text-muted);
}

.md-typeset .wiki-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--wc-text-muted);
}

.md-typeset .wiki-breadcrumbs a:hover {
  color: var(--wc-accent-strong);
}

.wc-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.wc-title-row > h1 {
  flex: 1;
  min-width: 0;
}

.wc-article-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  padding-top: 0.35rem;
  position: relative;
}

.wc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  color: var(--wc-text-muted) !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wc-icon-btn:hover {
  color: var(--wc-accent-strong) !important;
  border-color: var(--wc-accent);
  background: var(--wc-accent-soft);
}

.wc-icon-btn .wc-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.wc-icon-btn.is-active {
  color: var(--wc-gold-500) !important;
  border-color: var(--wc-gold-400);
}

.wc-icon-btn.is-active .wc-icon {
  fill: currentColor;
}

.wc-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 13rem;
  padding: 0.35rem;
  border-radius: var(--wc-radius);
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  box-shadow: var(--wc-shadow);
}

.wc-menu[hidden] {
  display: none;
}

.wc-menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--wc-text);
  font-size: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.wc-menu button:hover {
  background: var(--wc-accent-soft);
}

.wc-menu button.danger {
  color: var(--wc-blood-500);
}

.wc-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin: 0 0 1.4rem;
  font-size: 0.72rem;
  color: var(--wc-text-muted);
}

.wc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.md-typeset .wc-meta-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 1rem;
  background: var(--wc-accent-soft);
  color: var(--wc-accent-strong);
  font-weight: 600;
}

.wc-meta-item.wc-meta-stale {
  display: inline;
  line-height: 1.6;
}

.wc-meta-stale .wc-icon {
  margin-right: 0.25rem;
}

.wc-meta-stale a,
.wc-meta-stale button {
  padding: 0;
  border: none;
  background: none;
  color: var(--wc-accent-strong);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.wc-article-meta .md-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
}

.wc-article-meta .md-tag {
  margin: 0 !important;
  padding: 0.05rem 0.45rem !important;
  font-size: 0.68rem !important;
  border-radius: 1rem !important;
  background: var(--wc-surface-2) !important;
  color: var(--wc-text-muted) !important;
}

/* Old bulky controls stay in the DOM (their handlers are reused) but are hidden */
#btn-wiki-edit-article,
#btn-wiki-article-history,
.wc-legacy-actions,
.wiki-dynamic-article-wrapper .wc-legacy-chips {
  display: none !important;
}

/* Mobile table of contents */
.wc-mobile-toc {
  margin: -0.6rem 0 1.4rem;
  border: 1px solid var(--wc-border);
  border-radius: var(--wc-radius);
  background: var(--wc-surface);
  font-size: 0.78rem;
}

.wc-mobile-toc summary {
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.wc-mobile-toc ol {
  margin: 0 0 0.6rem 2rem !important;
}

/* Material shows the sidebar TOC from 60em */
@media screen and (min-width: 60em) {
  .md-typeset details.wc-mobile-toc {
    display: none;
  }
}

/* <details> inside .md-typeset is styled as an admonition by Material: reset it */
.md-typeset details.wc-mobile-toc {
  border: 1px solid var(--wc-border);
  border-left-width: 1px;
  box-shadow: none;
}

.md-typeset details.wc-mobile-toc > summary {
  padding: 0.6rem 2rem 0.6rem 0.9rem;
  background: none;
  font-weight: 600;
}

.md-typeset details.wc-mobile-toc > summary::before {
  display: none;
}

.md-typeset details.wc-mobile-toc > summary::after {
  top: 0.65rem;
  background-color: var(--wc-text-muted);
}

/* Card-like links: no text underline (inherits from .md-typeset a in extra.css) */
.md-typeset .wc-step,
.md-typeset .wc-step *,
.md-typeset .wc-cat-tile,
.md-typeset .wc-cat-tile *,
.md-typeset .wc-hero__chips a,
.md-typeset .wc-meta-cat,
.md-typeset .md-tag,
.md-typeset .wc-icon-btn,
.md-typeset .wc-link-list a,
.md-typeset ul.wc-cat-links a,
.md-typeset .wiki-breadcrumbs a,
.md-typeset .wc-help__btn,
.md-typeset .wc-tag-cloud a,
.md-typeset .wc-more-link,
.md-typeset .wc-equip-table a,
.wc-sheet-link,
.md-footer-meta.md-typeset .wc-footer a {
  text-decoration: none;
}

.md-typeset ul.wc-cat-links a:hover,
.md-typeset .wc-link-list a:hover,
.md-typeset .wc-more-link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Item cards: labels never break mid-word
   --------------------------------------------------------------------------- */
.wiki-item-prop-row {
  grid-template-columns: minmax(7.5rem, max-content) 1fr !important;
}

.wiki-item-prop-label {
  white-space: nowrap;
}

@media screen and (max-width: 600px) {
  .wiki-item-prop-row {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }

  .wiki-item-card {
    grid-template-columns: 1fr !important;
  }

  .wiki-item-card__media {
    flex-direction: row !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    max-height: 6.5rem;
    padding: 0.5rem !important;
  }

  .wiki-item-card__media img {
    max-height: 5.5rem !important;
    width: auto !important;
  }
}

/* Equipment: cards / table switch, filters */
.wc-equip-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--wc-border);
  border-radius: var(--wc-radius);
  background: var(--wc-surface);
  font-size: 0.74rem;
}

.wc-segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--wc-surface-2);
}

.wc-segmented button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--wc-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.wc-segmented button.is-active {
  background: var(--wc-surface);
  color: var(--wc-accent-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wc-chip-filter {
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--wc-border);
  background: none;
  color: var(--wc-text-muted);
  font-size: 0.7rem;
  cursor: pointer;
}

.wc-chip-filter.is-active {
  border-color: var(--wc-accent);
  background: var(--wc-accent-soft);
  color: var(--wc-accent-strong);
  font-weight: 600;
}

.md-typeset .wc-equip-table {
  display: table;
  width: 100%;
  font-size: 0.72rem;
}

.md-typeset .wc-equip-table img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  box-shadow: none;
  border-radius: 4px;
}

.md-typeset .wc-equip-table th {
  cursor: pointer;
  white-space: nowrap;
}

.md-typeset .wc-equip-table th,
.md-typeset .wc-equip-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--wc-border);
  vertical-align: middle;
  text-align: left;
}

.md-typeset .wc-equip-table thead th {
  background: var(--wc-surface-2);
  font-weight: 700;
}

.md-typeset .wc-equip-table tbody tr:hover {
  background: var(--wc-accent-soft);
}

.md-typeset .wc-equip-table td:first-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 9rem;
  font-weight: 600;
}

.wc-equip-hidden {
  display: none !important;
}

/* Admonition titles: room for Material's icon (wiki-editor.css set a 16px padding) */
.md-typeset .admonition.tip > .admonition-title,
.md-typeset .admonition.warning > .admonition-title,
#wiki-preview-content .admonition.tip > .admonition-title,
#wiki-preview-content .admonition.warning > .admonition-title {
  padding-left: 2.6rem !important;
}

.md-typeset .admonition.tip > .admonition-title::before,
.md-typeset .admonition.warning > .admonition-title::before {
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Formula blocks */
.md-typeset .admonition.formula,
.md-typeset details.formula {
  border-color: var(--wc-steel-600);
}

.md-typeset .formula > .admonition-title {
  background-color: rgba(63, 108, 145, 0.1);
}

.md-typeset .formula > .admonition-title::before {
  background-color: var(--wc-steel-600);
  -webkit-mask-image: var(--md-admonition-icon--abstract);
  mask-image: var(--md-admonition-icon--abstract);
}

.md-typeset .formula code {
  font-size: 0.85em;
  white-space: pre-wrap;
}

.md-typeset .formula var {
  font-style: normal;
  font-weight: 600;
  color: var(--wc-accent-strong);
}

/* ---------------------------------------------------------------------------
   Home page
   --------------------------------------------------------------------------- */
.wc-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 2rem;
  margin: 0.5rem 0 2.5rem;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--wc-border);
  background:
    radial-gradient(120% 120% at 0% 0%, var(--wc-accent-soft), transparent 60%),
    var(--wc-surface);
  box-shadow: var(--wc-shadow);
}

.wc-hero__eyebrow {
  margin: 0 0 0.3rem !important;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wc-accent);
}

.md-typeset .wc-hero__title {
  margin: 0 0 0.6rem;
  font-size: 2.7rem;
}

.wc-hero__lead {
  margin: 0 0 1.2rem !important;
  font-size: 0.92rem;
  color: var(--wc-text-muted);
}

.wc-hero__search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--wc-border-strong);
  background: var(--wc-bg);
  color: var(--wc-text-muted);
  font-size: 0.82rem;
  text-align: left;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wc-hero__search:hover {
  border-color: var(--wc-accent);
  box-shadow: 0 0 0 4px var(--wc-accent-soft);
}

.wc-hero__search-text {
  flex: 1;
}

.wc-hero__search kbd {
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--wc-border-strong);
  font-size: 0.7rem;
}

.wc-hero__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.8rem 0 0 !important;
  font-size: 0.72rem;
  color: var(--wc-text-muted);
}

.md-typeset .wc-hero__chips a {
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--wc-border);
  color: var(--wc-text);
}

.md-typeset .wc-hero__chips a:hover {
  border-color: var(--wc-accent);
  color: var(--wc-accent-strong);
}

.wc-hero__play {
  margin: 0.9rem 0 0 !important;
  font-size: 0.75rem;
  color: var(--wc-text-muted);
}

.md-typeset .wc-hero__play a {
  font-weight: 700;
}

.md-typeset .wc-hero__art {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--wc-shadow);
  cursor: default;
}

.md-typeset .wc-section-title {
  margin: 2rem 0 0.9rem;
  font-size: 1.5em;
}

.wc-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.md-typeset .wc-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num title"
    "text text";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--wc-radius);
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  color: var(--wc-text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.md-typeset .wc-step:hover {
  border-color: var(--wc-accent);
  transform: translateY(-2px);
}

.wc-step__num {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--wc-leather-700);
  color: var(--wc-gold-200);
  font-family: var(--wc-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 0.08em; /* optical centre of serif digits */
}

.wc-step__title {
  grid-area: title;
  line-height: 1.3;
  font-weight: 700;
  color: var(--wc-heading);
}

.wc-step__text {
  grid-area: text;
  align-self: start;
  line-height: 1.5;
  font-size: 0.74rem;
  color: var(--wc-text-muted);
}

.wc-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.md-typeset .wc-cat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: var(--wc-radius);
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  color: var(--wc-text);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset .wc-cat-tile:hover {
  border-color: var(--wc-accent);
  box-shadow: var(--wc-shadow);
  transform: translateY(-2px);
}

.wc-cat-tile__icon,
.wc-cat-section__icon {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 0.3rem;
  border-radius: 10px;
  background: var(--wc-accent-soft);
  color: var(--wc-accent-strong);
}

.wc-cat-tile__icon .wc-icon,
.wc-cat-section__icon .wc-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.wc-cat-tile__name {
  font-family: var(--wc-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--wc-heading);
}

.wc-cat-tile__desc {
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--wc-text-muted);
}

.wc-cat-tile__count {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--wc-accent);
}

.wc-home-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.md-typeset .wc-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-typeset .wc-link-list li {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--wc-border);
}

.md-typeset .wc-link-list li a {
  font-weight: 600;
}

.md-typeset .wc-link-list li span {
  font-size: 0.72rem;
  color: var(--wc-text-muted);
}

.wc-more-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.75rem;
}

.wc-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding: 1.4rem 1.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--wc-leather-800), var(--wc-leather-900));
  color: var(--wc-ink-100);
}

.md-typeset .wc-help h2 {
  margin: 0 0 0.3rem;
  color: var(--wc-gold-200);
  font-size: 1.4em;
}

.wc-help p {
  margin: 0 !important;
  max-width: 34rem;
  font-size: 0.78rem;
  color: var(--wc-ink-300);
}

.md-typeset .wc-help__btn {
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
  background: var(--wc-gold-400);
  color: var(--wc-ink-950) !important;
  font-weight: 700;
  font-size: 0.8rem;
}

.md-typeset .wc-help__btn:hover {
  background: var(--wc-gold-300);
}

/* Categories page */
.wc-lead {
  font-size: 0.9rem;
  color: var(--wc-text-muted);
}

.wc-cat-section {
  margin: 2rem 0;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  scroll-margin-top: 4.5rem;
}

.wc-cat-section__head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.md-typeset .wc-cat-section__head h2 {
  margin: 0;
  font-size: 1.5em;
}

.wc-cat-section__head p {
  margin: 0.15rem 0 0 !important;
  font-size: 0.75rem;
  color: var(--wc-text-muted);
}

.wc-cat-section__count {
  margin-left: 0.3rem;
  padding: 0 0.45rem;
  border-radius: 1rem;
  background: var(--wc-surface-2);
  color: var(--wc-text-muted);
  font-family: var(--md-text-font-family, sans-serif);
  font-size: 0.5em;
  vertical-align: middle;
}

.md-typeset ul.wc-cat-links {
  columns: 3 12rem;
  column-gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-typeset ul.wc-cat-links li {
  margin: 0 0 0.35rem;
  break-inside: avoid;
  font-size: 0.8rem;
}

/* Tag cloud */
.wc-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 2rem;
}

.md-typeset .wc-tag-cloud a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 1rem;
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  color: var(--wc-text);
  font-size: calc(0.7rem + var(--weight, 0) * 0.25rem);
}

.md-typeset .wc-tag-cloud a:hover {
  border-color: var(--wc-accent);
  color: var(--wc-accent-strong);
}

.wc-tag-cloud small {
  color: var(--wc-text-muted);
  font-size: 0.65rem;
}

/* 404 */
.wc-404 {
  text-align: center;
  padding: 2rem 0;
}

.wc-404__code {
  font-family: var(--wc-font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--wc-accent);
}

.md-typeset .wc-404 h1 {
  margin: 0.4rem 0 0.6rem;
}

.wc-404 .wc-hero__search {
  max-width: 28rem;
  margin: 1.2rem auto;
}

.wc-404__suggest {
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
}

/* Skeleton loaders */
.wc-skeleton {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 0;
}

.wc-skeleton span {
  display: block;
  height: 0.85rem;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--wc-surface-2) 0%, var(--wc-border) 50%, var(--wc-surface-2) 100%);
  background-size: 200% 100%;
  animation: wc-shimmer 1.3s ease-in-out infinite;
}

.wc-skeleton span:first-child {
  height: 1.8rem;
  width: 55%;
}

.wc-skeleton span:nth-child(3n) {
  width: 80%;
}

@keyframes wc-shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* Back to top: leather disc with a gold arrow (replaces the blue emoji button) */
.wiki-back-to-top-btn {
  width: 2.6rem !important;
  height: 2.6rem !important;
  border: 1px solid rgba(243, 220, 160, 0.35) !important;
  background: linear-gradient(180deg, var(--wc-leather-700), var(--wc-leather-900)) !important;
  color: var(--wc-gold-300) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

.wiki-back-to-top-btn:hover {
  border-color: var(--wc-gold-300) !important;
  color: var(--wc-gold-200) !important;
  transform: translateY(-2px) !important;
}

.wiki-back-to-top-btn .wc-icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.md-footer-meta {
  background: var(--wc-leather-900);
}

.wc-footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  padding: 1.6rem 0.8rem 1rem;
  font-size: 0.72rem;
  color: var(--wc-ink-300);
}

.wc-footer__brand strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--wc-font-display);
  font-size: 1.3rem;
  color: var(--wc-gold-200);
}

.md-footer-meta.md-typeset .wc-play-btn {
  display: table;
  margin-top: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--wc-gold-400);
  color: var(--wc-ink-950);
  font-weight: 700;
  text-decoration: none;
}

.md-footer-meta.md-typeset .wc-play-btn:hover {
  background: var(--wc-gold-300);
  color: var(--wc-ink-950);
}

.wc-footer h4 {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wc-gold-300);
}

.md-footer-meta.md-typeset .wc-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-footer-meta.md-typeset .wc-footer li {
  margin: 0 0 0.3rem;
}

.md-footer-meta.md-typeset .wc-footer a {
  color: var(--wc-ink-200);
}

.md-footer-meta.md-typeset .wc-footer a:hover {
  color: var(--wc-gold-300);
}

.wc-footer__bottom {
  grid-column: 1 / -1;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--wc-ink-400);
}

/* ---------------------------------------------------------------------------
   Mobile: bottom navigation bar
   --------------------------------------------------------------------------- */
.wc-bottom-bar {
  display: none;
}

@media screen and (max-width: 44.9375em) {
  .wc-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.2rem 0.3rem calc(0.2rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(243, 220, 160, 0.18);
    background: var(--wc-leather-900);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.25);
  }

  .wc-bottom-bar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0;
    border: none;
    background: none;
    color: var(--wc-ink-200);
    font-size: 0.6rem;
    font-weight: 600;
    cursor: pointer;
  }

  .wc-bottom-bar button .wc-icon {
    width: 1.3rem;
    height: 1.3rem;
  }

  .wc-bottom-bar button:active {
    color: var(--wc-gold-300);
  }

  /* The bar replaces header buttons on phones */
  .md-header #wiki-bookmarks-wrap,
  .md-header .wiki-random-btn,
  .md-header #wiki-auth-widget-container,
  .md-header #btn-wiki-new-article {
    display: none !important;
  }

  body {
    padding-bottom: 3.6rem;
  }

  .wiki-back-to-top,
  #wiki-back-to-top {
    bottom: 4.6rem !important;
  }

  .wc-hero {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }

  .wc-hero__art {
    order: -1;
  }

  .md-typeset .wc-hero__title {
    font-size: 2rem;
  }

  .wc-steps,
  .wc-home-columns {
    grid-template-columns: 1fr;
  }

  .wc-footer {
    grid-template-columns: 1fr 1fr;
  }

  .wc-footer__brand {
    grid-column: 1 / -1;
  }

  .md-typeset h1 {
    font-size: 2rem;
  }

  .wc-title-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .wc-article-actions {
    padding-top: 0;
  }

  /* Actions sit on the left under the title: menus open to the right */
  .wc-article-actions .wc-menu {
    left: 0;
    right: auto;
    max-width: calc(100vw - 2rem);
  }
}

/* Bottom sheet content */
.md-typeset .wc-sheet-link,
.wc-sheet-link,
.wc-menu .wc-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 7px;
  color: var(--wc-text);
  font-size: 0.78rem;
}

.wc-sheet-link:hover {
  background: var(--wc-accent-soft);
}

.wc-sheet-empty {
  margin: 0;
  padding: 0.6rem;
  font-size: 0.75rem;
  color: var(--wc-text-muted);
}

/* Dropdowns opened from the bottom bar sit above it */
@media screen and (max-width: 44.9375em) {
  .wc-bottom-sheet {
    position: fixed !important;
    left: 0.6rem !important;
    right: 0.6rem !important;
    top: auto !important;
    bottom: 4.2rem !important;
    width: auto !important;
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* ---------------------------------------------------------------------------
   Auth dialog & user menu follow the light theme
   --------------------------------------------------------------------------- */
[data-md-color-scheme="default"] .wiki-auth-dialog,
[data-md-color-scheme="default"] .wiki-user-dropdown {
  background: var(--wc-surface);
  color: var(--wc-text);
  border-color: var(--wc-border);
}

[data-md-color-scheme="default"] .wiki-auth-header {
  background: var(--wc-surface-2);
  border-bottom-color: var(--wc-border);
}

[data-md-color-scheme="default"] .wiki-auth-title {
  color: var(--wc-heading);
  font-family: var(--wc-font-display);
  font-size: 1.3rem;
}

[data-md-color-scheme="default"] .wiki-auth-close-btn {
  background: var(--wc-surface);
  border-color: var(--wc-border);
  color: var(--wc-text-muted);
}

[data-md-color-scheme="default"] .wiki-auth-tabs {
  border-bottom-color: var(--wc-border);
}

[data-md-color-scheme="default"] .wiki-auth-tab {
  color: var(--wc-text-muted);
}

[data-md-color-scheme="default"] .wiki-auth-tab:hover,
[data-md-color-scheme="default"] .wiki-auth-tab.active {
  color: var(--wc-accent-strong);
}

[data-md-color-scheme="default"] .wiki-auth-label,
[data-md-color-scheme="default"] .wiki-verify-text,
[data-md-color-scheme="default"] #wiki-view-forgot > div:first-child,
[data-md-color-scheme="default"] #wiki-form-modal-claim > div:first-child {
  color: var(--wc-text) !important;
}

[data-md-color-scheme="default"] .wiki-auth-input,
[data-md-color-scheme="default"] .wiki-verify-digits {
  background: var(--wc-bg);
  color: var(--wc-text);
  border-color: var(--wc-border-strong);
}

[data-md-color-scheme="default"] .wiki-auth-hint,
[data-md-color-scheme="default"] .wiki-auth-switch-row {
  color: var(--wc-text-muted);
}

[data-md-color-scheme="default"] .wiki-auth-hint-highlight,
[data-md-color-scheme="default"] .wiki-auth-switch-link {
  color: var(--wc-accent-strong);
}

[data-md-color-scheme="default"] .wiki-auth-banner {
  color: var(--wc-leather-700);
}

.wiki-auth-submit-btn {
  background: var(--wc-leather-700) !important;
  box-shadow: none !important;
}

.wiki-auth-submit-btn:hover {
  background: var(--wc-leather-600) !important;
}

[data-md-color-scheme="slate"] .wiki-auth-submit-btn {
  background: var(--wc-gold-500) !important;
  color: var(--wc-ink-950) !important;
}

/* Print: none of the chrome */
@media print {
  .wc-article-actions,
  .wc-bottom-bar,
  .wc-mobile-toc,
  .wc-equip-toolbar {
    display: none !important;
  }
}

/* ==========================================================================
   Reading comfort (wiki-comfort.js)
   ========================================================================== */

/* Reading settings applied on <html> */
html[data-wc-font="sm"] .md-content .md-typeset {
  font-size: 0.74rem;
}

html[data-wc-font="lg"] .md-content .md-typeset {
  font-size: 0.9rem;
}

html[data-wc-font="xl"] .md-content .md-typeset {
  font-size: 1rem;
}

html[data-wc-width="narrow"] .md-content__inner {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

html[data-wc-width="wide"] .md-grid {
  max-width: 80rem;
}

html[data-wc-leading="loose"] .md-content .md-typeset {
  line-height: 1.9;
}

html[data-wc-leading="loose"] .md-content .md-typeset p,
html[data-wc-leading="loose"] .md-content .md-typeset li {
  margin-bottom: 1em;
}

.wc-read-panel {
  min-width: 17rem;
  padding: 0.7rem;
}

.wc-read-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--wc-text-muted);
}

.wc-read-row .wc-segmented {
  display: flex;
}

.wc-read-row .wc-segmented button {
  flex: 1;
  justify-content: center;
  width: auto;
}

.wc-menu .wc-read-reset {
  justify-content: center;
  color: var(--wc-text-muted);
}

/* "Continue where you stopped" */
.wc-resume {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--wc-border-strong);
  background: var(--wc-surface);
  box-shadow: var(--wc-shadow);
  transform: translateX(-50%);
  animation: wc-rise 0.25s ease-out;
}

.wc-resume button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--wc-text);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.wc-resume .wc-resume__go {
  background: var(--wc-accent-soft);
  color: var(--wc-accent-strong);
}

.wc-resume .wc-resume__close {
  padding: 0.45rem;
  color: var(--wc-text-muted);
}

@media screen and (max-width: 44.9375em) {
  .wc-resume {
    bottom: 4.4rem;
  }
}

@keyframes wc-rise {
  from {
    opacity: 0;
    transform: translate(-50%, 0.6rem);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.wc-continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.8rem;
}

.md-typeset .wc-continue-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border-radius: var(--wc-radius);
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  color: var(--wc-text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.md-typeset .wc-continue-card:hover {
  border-color: var(--wc-accent);
}

.wc-continue-card__cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wc-accent);
}

.wc-continue-card__title {
  font-weight: 700;
}

.wc-continue-card__bar {
  height: 4px;
  margin-top: 0.3rem;
  border-radius: 4px;
  background: var(--wc-surface-2);
  overflow: hidden;
}

.wc-continue-card__bar span {
  display: block;
  height: 100%;
  background: var(--wc-gold-400);
}

.wc-continue-card__pct {
  font-size: 0.68rem;
  color: var(--wc-text-muted);
}

/* Overlays: Ctrl+K, shortcuts, link preview */
.wc-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  background: rgba(20, 14, 8, 0.55);
  backdrop-filter: blur(2px);
}

.wc-overlay[hidden] {
  display: none;
}

html.wc-no-scroll {
  overflow: hidden;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0.05em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--wc-border-strong);
  border-bottom-width: 2px;
  background: var(--wc-surface-2);
  color: var(--wc-text);
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.85em;
  text-align: center;
}

.wc-palette {
  width: min(36rem, 100%);
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--wc-border-strong);
  background: var(--wc-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: var(--wc-text);
}

.wc-palette__field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--wc-border);
  color: var(--wc-text-muted);
}

.wc-palette__input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  color: var(--wc-text);
  font-size: 0.95rem;
}

.wc-palette__input:focus-visible {
  outline: none !important;
}

.wc-palette__list {
  max-height: 55vh;
  margin: 0;
  padding: 0.4rem;
  overflow-y: auto;
  list-style: none;
}

.wc-palette__group {
  padding: 0.6rem 0.6rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wc-text-muted);
}

.wc-palette__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.wc-palette__item .wc-icon {
  color: var(--wc-text-muted);
}

.wc-palette__item.is-active {
  background: var(--wc-accent-soft);
}

.wc-palette__item.is-active .wc-icon {
  color: var(--wc-accent-strong);
}

.wc-palette__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-palette__note {
  font-size: 0.68rem;
  color: var(--wc-text-muted);
  white-space: nowrap;
}

.wc-palette__hint {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--wc-border);
  font-size: 0.65rem;
  color: var(--wc-text-muted);
}

.wc-shortcuts {
  width: min(26rem, 100%);
  padding: 1rem 1.2rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--wc-border-strong);
  background: var(--wc-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: var(--wc-text);
}

.wc-shortcuts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wc-shortcuts h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--wc-font-display);
  font-size: 1.4rem;
  color: var(--wc-heading);
}

.wc-shortcuts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.78rem;
}

.wc-shortcuts dt {
  display: flex;
  gap: 0.2rem;
  white-space: nowrap;
}

.wc-shortcuts dd {
  margin: 0;
  color: var(--wc-text-muted);
}

.wc-shortcuts__note {
  margin: 1rem 0 0;
  font-size: 0.68rem;
  color: var(--wc-text-muted);
}

/* Long-press link preview (touch screens) */
.wc-overlay--sheet {
  align-items: flex-end;
  padding: 0;
}

.wc-preview {
  display: flex;
  gap: 0.9rem;
  width: min(32rem, 100%);
  margin-bottom: 0;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: var(--wc-surface);
  color: var(--wc-text);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  animation: wc-sheet-up 0.2s ease-out;
}

.wc-preview img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 8px;
  background: var(--wc-surface-2);
}

.wc-preview__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.8rem;
}

.wc-preview__cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wc-accent);
}

.wc-preview p {
  margin: 0;
  color: var(--wc-text-muted);
}

.wc-preview__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.wc-preview__actions a,
.wc-preview__actions button {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--wc-border);
  background: none;
  color: var(--wc-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.wc-preview__actions .wc-preview__open {
  border-color: var(--wc-leather-700);
  background: var(--wc-leather-700);
  color: #fff;
}

@keyframes wc-sheet-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* No native link callout while a long press opens the preview */
html.wc-touch .md-content .md-typeset a:not([href^="http"]) {
  -webkit-touch-callout: none;
}

/* Tables: scroll shadows and sticky header */
.wc-table-shell {
  position: relative;
}

.wc-table-shell::before,
.wc-table-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 1.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wc-table-shell::before {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.18), transparent);
}

.wc-table-shell::after {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.18), transparent);
}

.wc-table-shell.has-left::before,
.wc-table-shell.has-right::after {
  opacity: 1;
}

.md-typeset .wc-table-tall {
  max-height: 75vh;
  overflow: auto;
}

.md-typeset .wc-table-tall thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--wc-surface-2);
  box-shadow: inset 0 -1px 0 var(--wc-border-strong);
}

/* Prices in the text */
.wc-currency {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0 0.4em;
  border-radius: 0.4em;
  font-weight: 600;
  white-space: nowrap;
}

.wc-currency .wc-icon {
  width: 1em;
  height: 1em;
}

.wc-currency--gold {
  background: rgba(224, 169, 60, 0.15);
  color: var(--wc-gold-600);
}

.wc-currency--gem {
  background: rgba(63, 108, 145, 0.12);
  color: var(--wc-steel-600);
}

[data-md-color-scheme="slate"] .wc-currency--gold {
  color: var(--wc-gold-300);
}

[data-md-color-scheme="slate"] .wc-currency--gem {
  color: var(--wc-steel-300);
}

/* Notifications */
.wc-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--wc-blood-500);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.wc-bottom-bar button {
  position: relative;
}

.wc-bottom-bar .wc-badge {
  position: absolute;
  top: 0.15rem;
  left: calc(50% + 0.4rem);
}

.wc-notices {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.6rem 0;
}

.wc-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: var(--wc-accent-soft);
  color: inherit !important;
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none !important;
}

.wc-notice.is-ok .wc-icon {
  color: var(--wc-moss-500);
}

.wc-notice.is-rejected .wc-icon {
  color: var(--wc-blood-400);
}

.wc-notice small {
  display: block;
  opacity: 0.8;
}
