/* ============================================================
   TESSERAE SORTIS - THEME STYLESHEET
   Loaded after /resources/onesrd.css.

   PLACEHOLDER: this is a copy of the L1 parchment-and-woodburn
   theme so TS pages render correctly out of the box. Re-skin
   the colour & font block below once the TS aesthetic is set.

   Load order in HTML:
     <link rel="stylesheet" href="/resources/onesrd.css">
     <link rel="stylesheet" href="/TS/style.css">
   ============================================================ */

/* ============================================================
   L1 COLOUR & FONT OVERRIDES
   ============================================================ */
:root {
  --bg:           #fdf2d5;
  --bg-dark:      #f0e0b0;
  --bg-drawer:    #2a1f0e;
  --ink:          #1a1008;
  --ink-mid:      #4a3520;
  --ink-light:    #7a6045;
  --accent:       #8b3a0f;
  --accent-light: #c4621a;
  --gold:         #b8860b;
  --rule:         #c8a96e;
  --suit-red:     #a4161a;

  --font-body:    Georgia, 'Times New Roman', serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-mono:    'Courier New', Courier, monospace;

  --shadow-sm:    0 1px 3px rgba(26,16,8,0.15);
  --shadow-md:    0 4px 12px rgba(26,16,8,0.2);
}

/* ============================================================
   PARCHMENT BODY BACKGROUND
   ============================================================ */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%,  rgba(184,134,11,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(139,58,15,0.05) 0%, transparent 60%);
}

/* ============================================================
   DRAWER - WOODBURN BACKGROUND IMAGE
   The dark ::after overlay is defined in onesrd.css at 55%;
   L1 bumps it to 80% for the warmer woodburn image.
   ============================================================ */
#drawer {
  background-image: url('https://pub-e0f96c01318c4755b491bf481c530eb1.r2.dev/Raven_and_Toad-BW.jpg');
  background-size: cover;
  background-position: center top;
}

#drawer::after {
  background-color: rgba(42,31,14,0.80);
}

/* Nav background preference toggle */
html[data-navbg="off"] #drawer {
  background-image: none;
}
html[data-navbg="off"] #drawer::after {
  background-color: rgba(42,31,14,0.97);
}

/* ============================================================
   HEADER SETTINGS LINK
   ============================================================ */
.header-settings-link {
  font-size: var(--size-small);
  color: var(--ink-light);
  text-decoration: none;
  font-style: italic;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition);
}
.header-settings-link:hover { color: var(--accent); text-decoration: none; }

/* Hidden on very narrow viewports - same breakpoint as tagline */
@media (max-width: 599px) { .header-settings-link { display: none; } }

/* ============================================================
   HEADER ALPHA / UNDER-CONSTRUCTION BADGE
   ============================================================ */
.header-alpha-badge {
  font-size: var(--size-small);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin-left: 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.header-alpha-badge:hover { background: rgba(184,134,11,0.1); text-decoration: none; }

/* Hidden below tablet width - header is already tight at this breakpoint */
@media (max-width: 699px) { .header-alpha-badge { display: none; } }

/* ============================================================
   LINKS - L1 WARM RUST COLOUR
   onesrd.css sets link colour to --accent; these just flesh
   out the text-decoration tint with the L1 rust value.
   ============================================================ */
a {
  text-decoration-color: rgba(139,58,15,0.35);
}

/* ============================================================
   H1 DECORATIVE RULE
   ============================================================ */
h1::after {
  content: '';
  display: block;
  width: 4rem;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
  margin-top: 0.5rem;
}

/* ============================================================
   CALLOUT BOXES - L1 WARM TINTS
   ============================================================ */
.box {
  background: rgba(200,169,110,0.08);
}
.box.example   { border-color: var(--gold);         background: rgba(184,134,11,0.06); }
.box.gm-note   { border-color: var(--accent);       background: rgba(139,58,15,0.06);  }
.box.warning   { border-color: #8b4513;             background: rgba(139,69,19,0.08);  }
.box.highlight { border-color: var(--accent-light); background: rgba(196,98,26,0.07);  }

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
html[data-theme="dark"] {
  --bg:           #1a1410;
  --bg-dark:      #221c14;
  --bg-drawer:    #0e0a06;
  --ink:          #e8d9c0;
  --ink-mid:      #c8a870;
  --ink-light:    #907050;
  --accent:       #d4681a;
  --accent-light: #e8843a;
  --gold:         #c8a020;
  --rule:         #4a3520;
  --suit-red:     #e5555f;
}
/* Close button flips: dark bg would vanish on dark drawer, so use ink (light cream) */
html[data-theme="dark"] .drawer-close-btn {
  background: var(--ink);
  color: var(--bg-drawer);
}

/* ============================================================
   HIGH-CONTRAST THEME
   ============================================================ */
html[data-theme="high-contrast"] {
  --bg:           #ffffff;
  --bg-dark:      #f0f0f0;
  --bg-drawer:    #000000;
  --ink:          #000000;
  --ink-mid:      #111111;
  --ink-light:    #333333;
  --accent:       #7a0000;
  --accent-light: #aa0000;
  --gold:         #7a5500;
  --rule:         #888888;
  --suit-red:     #c00000;
}

/* ============================================================
   PLAIN THEME (reader mode)
   ============================================================ */
html[data-theme="plain"] {
  --bg:           #ffffff;
  --bg-dark:      #f5f5f5;
  --bg-drawer:    #222222;
  --ink:          #111111;
  --ink-mid:      #333333;
  --ink-light:    #666666;
  --accent:       #333333;
  --accent-light: #555555;
  --gold:         #555555;
  --rule:         #cccccc;
  --suit-red:     #8a2222;
  --font-body:    system-ui, -apple-system, sans-serif;
  --font-display: system-ui, -apple-system, sans-serif;
}

html[data-theme="plain"] body {
  background-image: none;
}

html[data-theme="plain"] #drawer {
  background-image: none;
}

/* ============================================================
   FONT SIZE OVERRIDES
   ============================================================ */
html[data-fontsize="large"] { font-size: 18px; }
html[data-fontsize="xl"]    { font-size: 21px; }

/* ============================================================
   REDUCE MOTION
   ============================================================ */
html[data-reducemotion="on"] *,
html[data-reducemotion="on"] *::before,
html[data-reducemotion="on"] *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   TABLE OF CONTENTS PAGE
   ============================================================ */
.toc { list-style: none; padding: 0; margin: 1.5rem 0; line-height: 1.9; }
.toc ul { list-style: none; padding-left: 1.75rem; margin: 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
a.nav-section-link {
  cursor: pointer;
  text-decoration: none;
  user-select: auto;
}
a.nav-section-link:hover { color: rgba(200,169,110,0.8); }

.toc > li > a {
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: bold;
}
.toc > li > ul > li > a {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}
.toc > li > ul > li > ul > li > a {
  font-size: 0.88rem;
  color: var(--ink-mid);
}
.toc > li > ul > li > ul > li > ul > li > a {
  font-size: 0.83rem;
  color: var(--ink-light);
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.settings-group {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.settings-group:last-of-type {
  border-bottom: none;
}

.settings-group h2 {
  font-size: 1.05rem;
  color: var(--ink-mid);
  margin-bottom: 1rem;
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-style: normal;
}

.settings-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
}

.settings-option input[type="radio"],
.settings-option input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.settings-option-label {
  font-size: 0.95rem;
  line-height: 1.4;
}

.settings-option-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-top: 0.15rem;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  padding: 0.55rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }

.btn-secondary {
  background: transparent;
  color: var(--ink-mid);
  border: 1.5px solid var(--rule);
}
.btn-secondary:hover { border-color: var(--ink-mid); color: var(--ink); }

/* Body content lists */
.content-wrap ul {
  padding-left: 1.5rem;
}
.content-wrap ul li { margin-bottom: 0.25rem; }

/* Chapter epigraph - right-aligned pull quote */
p.epigraph {
  width: 50%;
  margin-left: auto;
  margin-bottom: 1.5rem;
  font-style: italic;
  text-align: right;
}

/* ============================================================
   GUTTER RAILS (side panels) - injected by /resources/rails.js
   Three-state layout: 0 = single column, 1 = one panel (column
   shifts), 2 = a panel on each side. TOC + Settings panels reuse
   the existing .toc / .settings-group styles.
   ============================================================ */
:root {
  --rail-w:   240px;   /* MIN rail width; sets the breakpoints below */
  --rail-gap: 2rem;    /* gap between column and panel */
  --card-max: 340px;   /* cap for card-style content (art / promo) */
}

.reading-layout { position: relative; }
.rail { display: none; }
.reading-layout[data-rails="off"] .rail { display: none !important; }
.rail-inner { position: sticky; top: calc(var(--header-h) + 1rem); }
.rail figure { margin: 0; }

.rail-art {
  width: 100%; max-width: var(--card-max); height: auto;
  display: block; margin: 0 auto;
  border: 1px solid var(--rule); box-shadow: var(--shadow-md);
}
.rail-cap {
  font-size: var(--size-small); font-style: italic; color: var(--ink-light);
  text-align: center; margin-top: 0.5rem;
}

.rail-controls { display: flex; gap: 0.3rem; justify-content: center; margin-bottom: 0.6rem; }
.rail-controls button {
  width: 1.8rem; height: 1.8rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule); border-radius: 4px;
  color: var(--ink-mid); cursor: pointer; font-family: var(--font-body); font-size: 1rem;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.rail-controls button:hover { border-color: var(--accent); color: var(--accent); }
.rail-controls .rc-pin.pinned { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.rail[data-open="true"]  .rc-open { display: none; }
.rail[data-open="false"] .rc-pin,
.rail[data-open="false"] .rc-prev,
.rail[data-open="false"] .rc-next,
.rail[data-open="false"] .rc-close { display: none; }
.rail[data-open="false"] figure { display: none; }
.rail[data-open="false"] .rail-controls { justify-content: flex-start; }

.rail-host {
  max-width: var(--card-max); margin-inline: auto;
  border: 1px solid var(--rule); border-radius: 2px; background: rgba(0,0,0,0.02);
  overflow: hidden;
}
/* TOC fills the rail and scrolls within it; drop the card chrome */
.rail-host.rail-wide {
  max-width: none; border: 0; background: none;
  max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto;
}
.rail-host .toc { margin: 0; font-size: 0.9rem; }
.rail-host .settings-group { margin: 0 0 1rem; padding: 0.9rem 1rem; }
.rail-host .settings-group:last-child { margin-bottom: 0; }
.rail-loading { padding: 2rem 1rem; text-align: center; color: var(--ink-light); font-style: italic; }
.rail-error { padding: 1rem; font-size: var(--size-small); color: var(--ink-mid); border: 1px dashed var(--rule); }

/* Current page/section highlighted in the rail TOC (set by rails.js) */
.rail-host .toc a.toc-current {
  color: var(--accent);
  font-weight: 700;
}

/* Promo mini-page */
.rail .promo { padding: 1rem 0.9rem; text-align: center; }
.rail .promo .kicker { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-light); }
.rail .promo h1 { font-size: 1.15rem; color: var(--accent); font-style: italic; margin: 0.3rem 0 0.5rem; }
.rail .promo h1::after { display: none; }
.rail .promo p { font-size: 0.85rem; color: var(--ink-mid); margin-bottom: 0.9rem; }
.rail .promo .cover { width: 100%; height: auto; display: block; border: 1px solid var(--rule); margin-bottom: 0.8rem; }
.rail .promo .promo-btn {
  display: inline-block; padding: 0.45rem 1.05rem; font-size: 0.9rem;
  background: var(--accent); color: var(--bg); text-decoration: none; border-radius: 3px;
}
.rail .promo .promo-btn:hover { background: var(--accent-light); color: var(--bg); }

/* ---- Drag handles to resize the column / rails (shown in State 2 only) ---- */
.rail-resize {
  display: none;
  position: absolute; top: 0; bottom: 0;
  width: 14px; transform: translateX(-50%);
  cursor: col-resize; z-index: 6; touch-action: none;
}
.rail-resize::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 6px;
  width: 2px; background: var(--rule);
  opacity: 0; transition: opacity var(--transition), background var(--transition);
}
.rail-resize:hover::before,
.rail-resize.dragging::before { opacity: 1; background: var(--accent); }
body.rails-resizing { cursor: col-resize; user-select: none; }

/* ---- STATE 1: one panel (~1060-1339px); rail fills the open margin ---- */
@media (min-width: 1060px) and (max-width: 1339.98px) {
  .reading-layout[data-rails="on"][data-side="right"] {
    display: grid; align-items: stretch; column-gap: var(--rail-gap);
    grid-template-columns: var(--content-max) 1fr; padding-inline: 1.5rem;
  }
  .reading-layout[data-rails="on"][data-side="right"] .content-wrap { margin: 0; }
  .reading-layout[data-rails="on"][data-side="right"] .rail-right { display: block; }

  .reading-layout[data-rails="on"][data-side="left"] {
    display: grid; align-items: stretch; column-gap: var(--rail-gap);
    grid-template-columns: 1fr var(--content-max); padding-inline: 1.5rem;
  }
  .reading-layout[data-rails="on"][data-side="left"] .content-wrap { margin: 0; }
  .reading-layout[data-rails="on"][data-side="left"] .rail-left { display: block; }
}

/* ---- STATE 2: two panels (>=1340px). Symmetric mode = one draggable centered
        column (rails fill); independent mode = two draggable rail widths. ---- */
@media (min-width: 1340px) {
  .reading-layout[data-rails="on"] {
    display: grid; align-items: stretch; column-gap: var(--rail-gap);
    grid-template-columns: 1fr var(--content-max) 1fr; padding-inline: 1.5rem;
  }
  html[data-railmode="symmetric"] .reading-layout[data-rails="on"] {
    grid-template-columns: 1fr var(--content-w, var(--content-max)) 1fr;
  }
  html[data-railmode="independent"] .reading-layout[data-rails="on"] {
    grid-template-columns: var(--rail-left-w, var(--rail-w)) 1fr var(--rail-right-w, var(--rail-w));
  }
  .reading-layout[data-rails="on"] .content-wrap { margin: 0; grid-column: 2; max-width: none; }
  .reading-layout[data-rails="on"] .rail { display: block; }
  .reading-layout[data-rails="on"] .rail-resize { display: block; }
}

/* ---- Page footer ---- */
#page-footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  font-size: var(--size-small);
  color: var(--ink-light);
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}
#page-footer p { margin: 0; }
#page-footer a { color: var(--ink-light); text-decoration: none; }
#page-footer a:hover { color: var(--accent); }

/* ============================================================
   CARDS - frame pages + deck table
   ============================================================ */
.card-art {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(var(--shadow-md));
}
.card-facts {
  max-width: 30rem;
  margin: 0 auto;
}
.card-facts dt {
  font-size: var(--size-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 0.6rem;
}
.card-facts dd { margin: 0.1rem 0 0; color: var(--ink); }
.card-lexicon-pending {
  max-width: 30rem;
  margin: 1.75rem auto 0;
  padding: 0.9rem 1.1rem;
  border: 1px dashed var(--rule);
  color: var(--ink-light);
  font-size: var(--size-small);
}
.card-lexicon-pending strong { color: var(--ink-mid); }

/* Deck table */
.deck-table {
  border-collapse: collapse;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 34rem;
}
.deck-table th {
  font-size: 1.15rem;
  padding: 0.25rem;
  color: var(--ink-mid);
  font-weight: normal;
}
.deck-table th.rank-label {
  font-size: var(--size-small);
  text-align: right;
  padding-right: 0.5rem;
  color: var(--ink-light);
}
.deck-table th.suit-red { color: var(--accent-light); }
.deck-table td { padding: 0.2rem; text-align: center; }
.deck-cell { display: inline-block; text-decoration: none; }
.deck-cell img {
  display: block;
  width: 100%;
  max-width: 54px;
  height: auto;
  margin: 0 auto;
  transition: transform var(--transition);
}
.deck-cell:hover img { transform: scale(1.12); }
.deck-cell .deck-code {
  display: block;
  font-size: 0.62rem;
  color: var(--ink-light);
  margin-top: 0.1rem;
}
.deck-jokers {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}
.deck-jokers .deck-cell img { max-width: 80px; }

/* Populated lexicon block on card frames */
.card-lexicon {
  max-width: 30rem;
  margin: 1.75rem auto 0;
  text-align: center;
}
.card-name {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  margin: 0;
}
.card-name::after { display: none; }
.card-texture {
  font-size: var(--size-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin: 0.2rem 0 1rem;
}
.card-reading {
  text-align: left;
  color: var(--ink);
  margin: 0;
}


/* ============================================================
   TESSERAE SORTIS - MOSAIC MOTIF (shiny-black shapes in plaster)
   ============================================================ */
.ts-band {
  height: 30px;
  margin: 0 0 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27360%27%20height%3D%2730%27%20viewBox%3D%270%200%20360%2030%27%3E%3Crect%20width%3D%27360%27%20height%3D%2730%27%20fill%3D%27%23d7cba9%27%2F%3E%3Crect%20x%3D%276.0%27%20y%3D%275.9%27%20width%3D%278.1%27%20height%3D%275.4%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%277.0%27%20y%3D%276.9%27%20width%3D%273.2%27%20height%3D%271.2%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Crect%20x%3D%2720.5%27%20y%3D%273.6%27%20width%3D%276.9%27%20height%3D%275.8%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%2721.5%27%20y%3D%274.6%27%20width%3D%272.8%27%20height%3D%271.3%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Ccircle%20cx%3D%2734.7%27%20cy%3D%277.3%27%20r%3D%273.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2733.3%27%20cy%3D%276.2%27%20r%3D%270.9%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2744.7%2C12.2%2049.0%2C3.6%2053.3%2C12.2%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%2759.2%2C13.1%2064.4%2C2.8%2069.6%2C13.1%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%2772.7%2C13.7%2077.8%2C3.6%2082.8%2C13.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2791.2%27%20cy%3D%276.6%27%20r%3D%273.0%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2790.0%27%20cy%3D%275.6%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2797.2%2C10.6%20101.5%2C1.9%20105.8%2C10.6%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27116.5%27%20cy%3D%276.2%27%20r%3D%273.9%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27115.0%27%20cy%3D%274.9%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27125.4%2C9.8%20129.1%2C2.4%20132.9%2C9.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27140.8%27%20cy%3D%276.2%27%20r%3D%273.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27139.4%27%20cy%3D%274.9%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27151.6%27%20cy%3D%278.8%27%20r%3D%273.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27150.4%27%20cy%3D%277.7%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27160.6%2C3.4%20164.5%2C11.2%20168.3%2C3.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27175.9%27%20cy%3D%276.9%27%20r%3D%273.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27174.7%27%20cy%3D%275.8%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27185.8%2C9.9%20189.3%2C2.9%20192.9%2C9.9%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27201.2%27%20cy%3D%278.0%27%20r%3D%273.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27199.9%27%20cy%3D%276.9%27%20r%3D%270.9%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27214.8%27%20cy%3D%278.3%27%20r%3D%273.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27213.6%27%20cy%3D%277.2%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27226.6%27%20cy%3D%279.0%27%20r%3D%274.1%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27225.1%27%20cy%3D%277.6%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Crect%20x%3D%27237.7%27%20y%3D%275.5%27%20width%3D%275.1%27%20height%3D%274.6%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27238.7%27%20y%3D%276.5%27%20width%3D%272.0%27%20height%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%27249.7%2C11.4%20253.3%2C4.2%20256.9%2C11.4%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27261.7%2C11.2%20266.8%2C0.9%20272.0%2C11.2%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27275.3%2C10.2%20278.8%2C3.1%20282.3%2C10.2%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27287.8%2C11.5%20293.0%2C1.2%20298.2%2C11.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27305.6%27%20cy%3D%277.9%27%20r%3D%272.9%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27304.5%27%20cy%3D%276.9%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27317.5%27%20cy%3D%278.2%27%20r%3D%273.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27316.1%27%20cy%3D%276.9%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27329.8%27%20cy%3D%278.1%27%20r%3D%273.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27328.5%27%20cy%3D%276.9%27%20r%3D%270.9%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27339.9%27%20cy%3D%276.1%27%20r%3D%273.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27338.6%27%20cy%3D%275.0%27%20r%3D%270.9%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27350.5%27%20cy%3D%278.2%27%20r%3D%273.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27349.3%27%20cy%3D%277.1%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%279.8%27%20cy%3D%2721.9%27%20r%3D%273.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%278.4%27%20cy%3D%2720.6%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2717.0%2C16.5%2022.2%2C26.9%2027.4%2C16.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2733.9%27%20cy%3D%2723.8%27%20r%3D%272.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2733.0%27%20cy%3D%2722.9%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%2743.2%27%20cy%3D%2722.3%27%20r%3D%272.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2742.1%27%20cy%3D%2721.4%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%2753.5%27%20cy%3D%2722.7%27%20r%3D%273.1%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2752.3%27%20cy%3D%2721.7%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2763.2%2C28.8%2068.1%2C19.1%2073.0%2C28.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2780.8%27%20cy%3D%2721.1%27%20r%3D%274.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2779.2%27%20cy%3D%2719.7%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%2794.5%27%20cy%3D%2723.9%27%20r%3D%273.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2793.1%27%20cy%3D%2722.6%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27107.5%27%20cy%3D%2723.2%27%20r%3D%274.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27105.8%27%20cy%3D%2721.7%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27115.2%2C17.3%20120.5%2C27.9%20125.8%2C17.3%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27131.6%27%20y%3D%2720.4%27%20width%3D%276.4%27%20height%3D%276.1%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27132.6%27%20y%3D%2721.4%27%20width%3D%272.6%27%20height%3D%271.3%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Ccircle%20cx%3D%27148.6%27%20cy%3D%2723.6%27%20r%3D%274.0%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27147.1%27%20cy%3D%2722.3%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27159.0%2C27.0%20163.3%2C18.5%20167.5%2C27.0%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27173.0%2C15.8%20178.5%2C26.7%20183.9%2C15.8%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27189.9%2C26.8%20194.5%2C17.5%20199.2%2C26.8%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27205.5%2C17.7%20209.1%2C24.8%20212.7%2C17.7%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27217.6%2C17.2%20222.1%2C26.2%20226.6%2C17.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27236.3%27%20cy%3D%2721.8%27%20r%3D%273.0%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27235.1%27%20cy%3D%2720.7%27%20r%3D%270.8%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27249.2%27%20cy%3D%2721.6%27%20r%3D%274.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27247.6%27%20cy%3D%2720.2%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Crect%20x%3D%27259.0%27%20y%3D%2719.3%27%20width%3D%276.3%27%20height%3D%276.0%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27260.0%27%20y%3D%2720.3%27%20width%3D%272.5%27%20height%3D%271.3%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Crect%20x%3D%27269.1%27%20y%3D%2719.0%27%20width%3D%278.7%27%20height%3D%276.6%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27270.1%27%20y%3D%2720.0%27%20width%3D%273.5%27%20height%3D%271.5%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Ccircle%20cx%3D%27285.0%27%20cy%3D%2722.7%27%20r%3D%272.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27284.0%27%20cy%3D%2721.8%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Crect%20x%3D%27292.7%27%20y%3D%2720.1%27%20width%3D%277.8%27%20height%3D%276.9%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27293.7%27%20y%3D%2721.1%27%20width%3D%273.1%27%20height%3D%271.5%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%27304.6%2C25.6%20308.7%2C17.5%20312.7%2C25.6%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27317.4%2C18.7%20321.5%2C27.0%20325.6%2C18.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27335.0%27%20cy%3D%2722.4%27%20r%3D%272.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27334.1%27%20cy%3D%2721.5%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27344.0%2C25.8%20348.6%2C16.5%20353.3%2C25.8%27%20fill%3D%27%2315110b%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-size: auto 30px;
  border-radius: 2px;
}
/* heading rule: short shape strip replaces the plain underline */
h1::after {
  content: '';
  display: block;
  height: 12px;
  width: 12rem;
  margin: 0.55rem 0 0;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27360%27%20height%3D%2714%27%20viewBox%3D%270%200%20360%2014%27%3E%3Crect%20width%3D%27360%27%20height%3D%2714%27%20fill%3D%27%23d7cba9%27%2F%3E%3Cpolygon%20points%3D%277.0%2C10.4%2011.7%2C1.0%2016.4%2C10.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2725.6%27%20cy%3D%276.7%27%20r%3D%272.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2724.7%27%20cy%3D%275.8%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Crect%20x%3D%2734.5%27%20y%3D%274.7%27%20width%3D%275.3%27%20height%3D%275.5%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%2735.5%27%20y%3D%275.7%27%20width%3D%272.1%27%20height%3D%271.2%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Crect%20x%3D%2746.5%27%20y%3D%273.7%27%20width%3D%275.8%27%20height%3D%276.9%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%2747.5%27%20y%3D%274.7%27%20width%3D%272.3%27%20height%3D%271.5%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%2756.1%2C12.7%2061.0%2C3.0%2065.9%2C12.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2774.9%27%20cy%3D%276.8%27%20r%3D%273.9%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2773.5%27%20cy%3D%275.4%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2785.1%2C12.2%2088.9%2C4.6%2092.7%2C12.2%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%2796.9%2C2.5%20102.0%2C12.8%20107.2%2C2.5%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27113.8%27%20y%3D%275.3%27%20width%3D%278.4%27%20height%3D%274.8%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27114.8%27%20y%3D%276.3%27%20width%3D%273.4%27%20height%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%27127.9%2C4.1%20131.8%2C11.7%20135.6%2C4.1%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27140.3%2C2.5%20144.1%2C10.2%20147.9%2C2.5%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27154.3%2C3.5%20159.3%2C13.4%20164.2%2C3.5%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27169.9%2C9.8%20174.2%2C1.2%20178.5%2C9.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27186.1%27%20cy%3D%276.8%27%20r%3D%272.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27185.2%27%20cy%3D%276.0%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27198.7%27%20cy%3D%275.6%27%20r%3D%273.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27197.3%27%20cy%3D%274.4%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27205.9%2C11.9%20209.5%2C4.7%20213.1%2C11.9%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27219.2%2C10.2%20223.4%2C1.7%20227.7%2C10.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27236.4%27%20cy%3D%276.3%27%20r%3D%272.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27235.3%27%20cy%3D%275.3%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27245.1%2C12.3%20249.4%2C3.8%20253.6%2C12.3%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27257.5%2C13.5%20262.8%2C2.7%20268.2%2C13.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27278.3%27%20cy%3D%275.5%27%20r%3D%273.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27276.9%27%20cy%3D%274.2%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27290.5%27%20cy%3D%276.2%27%20r%3D%274.3%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27288.9%27%20cy%3D%274.7%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27301.4%2C10.6%20305.2%2C2.9%20309.1%2C10.6%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27316.5%27%20cy%3D%275.7%27%20r%3D%274.0%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27315.0%27%20cy%3D%274.3%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27326.3%27%20cy%3D%276.5%27%20r%3D%272.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27325.3%27%20cy%3D%275.5%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27334.6%2C10.4%20338.2%2C3.0%20341.9%2C10.4%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27346.8%27%20y%3D%272.4%27%20width%3D%277.4%27%20height%3D%276.4%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27347.8%27%20y%3D%273.4%27%20width%3D%272.9%27%20height%3D%271.4%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-size: auto 12px;
  border-radius: 2px;
}
/* section dividers above each h2 on content pages */
.ts-content h2 { margin-top: 2.4rem; }
.ts-content h2::before {
  content: '';
  display: block;
  height: 12px;
  width: 100%;
  margin: 0 0 0.9rem;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27360%27%20height%3D%2714%27%20viewBox%3D%270%200%20360%2014%27%3E%3Crect%20width%3D%27360%27%20height%3D%2714%27%20fill%3D%27%23d7cba9%27%2F%3E%3Cpolygon%20points%3D%277.0%2C10.4%2011.7%2C1.0%2016.4%2C10.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2725.6%27%20cy%3D%276.7%27%20r%3D%272.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2724.7%27%20cy%3D%275.8%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Crect%20x%3D%2734.5%27%20y%3D%274.7%27%20width%3D%275.3%27%20height%3D%275.5%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%2735.5%27%20y%3D%275.7%27%20width%3D%272.1%27%20height%3D%271.2%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Crect%20x%3D%2746.5%27%20y%3D%273.7%27%20width%3D%275.8%27%20height%3D%276.9%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%2747.5%27%20y%3D%274.7%27%20width%3D%272.3%27%20height%3D%271.5%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%2756.1%2C12.7%2061.0%2C3.0%2065.9%2C12.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2774.9%27%20cy%3D%276.8%27%20r%3D%273.9%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%2773.5%27%20cy%3D%275.4%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%2785.1%2C12.2%2088.9%2C4.6%2092.7%2C12.2%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%2796.9%2C2.5%20102.0%2C12.8%20107.2%2C2.5%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27113.8%27%20y%3D%275.3%27%20width%3D%278.4%27%20height%3D%274.8%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27114.8%27%20y%3D%276.3%27%20width%3D%273.4%27%20height%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3Cpolygon%20points%3D%27127.9%2C4.1%20131.8%2C11.7%20135.6%2C4.1%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27140.3%2C2.5%20144.1%2C10.2%20147.9%2C2.5%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27154.3%2C3.5%20159.3%2C13.4%20164.2%2C3.5%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27169.9%2C9.8%20174.2%2C1.2%20178.5%2C9.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27186.1%27%20cy%3D%276.8%27%20r%3D%272.4%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27185.2%27%20cy%3D%276.0%27%20r%3D%270.6%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27198.7%27%20cy%3D%275.6%27%20r%3D%273.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27197.3%27%20cy%3D%274.4%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27205.9%2C11.9%20209.5%2C4.7%20213.1%2C11.9%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27219.2%2C10.2%20223.4%2C1.7%20227.7%2C10.2%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27236.4%27%20cy%3D%276.3%27%20r%3D%272.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27235.3%27%20cy%3D%275.3%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27245.1%2C12.3%20249.4%2C3.8%20253.6%2C12.3%27%20fill%3D%27%2315110b%27%2F%3E%3Cpolygon%20points%3D%27257.5%2C13.5%20262.8%2C2.7%20268.2%2C13.5%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27278.3%27%20cy%3D%275.5%27%20r%3D%273.8%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27276.9%27%20cy%3D%274.2%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27290.5%27%20cy%3D%276.2%27%20r%3D%274.3%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27288.9%27%20cy%3D%274.7%27%20r%3D%271.1%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27301.4%2C10.6%20305.2%2C2.9%20309.1%2C10.6%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27316.5%27%20cy%3D%275.7%27%20r%3D%274.0%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27315.0%27%20cy%3D%274.3%27%20r%3D%271.0%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Ccircle%20cx%3D%27326.3%27%20cy%3D%276.5%27%20r%3D%272.7%27%20fill%3D%27%2315110b%27%2F%3E%3Ccircle%20cx%3D%27325.3%27%20cy%3D%275.5%27%20r%3D%270.7%27%20fill%3D%27white%27%20fill-opacity%3D%270.32%27%2F%3E%3Cpolygon%20points%3D%27334.6%2C10.4%20338.2%2C3.0%20341.9%2C10.4%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27346.8%27%20y%3D%272.4%27%20width%3D%277.4%27%20height%3D%276.4%27%20rx%3D%271%27%20fill%3D%27%2315110b%27%2F%3E%3Crect%20x%3D%27347.8%27%20y%3D%273.4%27%20width%3D%272.9%27%20height%3D%271.4%27%20fill%3D%27white%27%20fill-opacity%3D%270.22%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-size: auto 12px;
  opacity: 0.9;
}
.ts-content h2::after { display: none; }

/* ============================================================
   CONTENT TABLES - framed cells, left-aligned headers.
   The borders carry the structure, so there's no need for a
   monospace font to line columns up; the body font reads better.
   ============================================================ */
.ts-content table {
  border-collapse: collapse;
  font-size: 0.95em;
  margin: 1.5rem 0;
}
.ts-content table th,
.ts-content table td {
  border: 1px solid var(--rule);
  padding: 0.45rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

/* ============================================================
   LEXICON INDEX TABLE + CARD DETAIL READING BLOCK
   ============================================================ */
.ts-content table.lex-table { font-family: var(--font-body); width: 100%; border-collapse: collapse; font-size: 0.95em; }
.ts-content table.lex-table .lex-code { font-family: var(--font-mono); white-space: nowrap; color: var(--ink-mid); }
.lex-table th { text-align: left; border-bottom: 1px solid var(--rule); padding: 0.35rem 0.9rem 0.35rem 0; }
.lex-table td { padding: 0.3rem 0.9rem 0.3rem 0; vertical-align: top; }
.lex-table tr.lex-group td {
  font-variant: small-caps; letter-spacing: 0.05em; font-weight: bold;
  color: var(--accent); padding-top: 1.1rem; border-bottom: 1px solid var(--rule);
}
.card-reading-block { max-width: 34rem; margin: 1.5rem auto 0; }
.card-reading-block h3 { font-size: 1rem; color: var(--ink-mid); margin: 1.3rem 0 0.3rem; }
.card-reading-block h3::after { display: none; }
.card-reading-block .pending { color: var(--ink-light); }
.card-reading-block .in-play + .card-lead { margin-top: 1.2rem; }

.lex-table tbody td:nth-of-type(3) { white-space: nowrap; }

/* Card detail - keywords + draft marker */
.card-keywords { font-size: var(--size-small); color: var(--ink-mid); margin: 0 0 1rem; }
.in-play { font-size: var(--size-small); color: var(--ink-mid); margin: 0.5rem 0 1.3rem; }
.draft-note { font-size: var(--size-small); color: var(--ink-light); font-style: italic;
  border-left: 2px solid var(--rule); padding-left: 0.7rem; margin: 0 0 1rem; }

/* ============================================================
   SUIT GLYPHS - site-wide
   Red  = Hearts & Diamonds (Yes).  Black = Clubs & Spades (No).
   Keep the real entity in the HTML (&hearts; &diams; &clubs;
   &spades;) and wrap it in <span class="suit red|black"> so the
   glyph stays copy-paste- and screen-reader-friendly, while the
   colour follows the active theme.
   ============================================================ */
.suit        { font-family: var(--font-body); font-style: normal; font-weight: normal; line-height: 1; }
.suit.red    { color: var(--suit-red); }
.suit.black  { color: var(--ink); }

/* ============================================================
   NOTATION SECTION (the-cards.html)
   ============================================================ */

/* Graphical suit key - four tiles across, wrapping on narrow screens. */
.suit-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 2.25rem;
}
.suit-key-item {
  flex: 1 1 8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.1rem 0.5rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-dark);
  box-shadow: var(--shadow-sm);
}
.suit-key-glyph { font-size: 2.8rem; }
.suit-key-name  { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.01em; }
.suit-key-code  {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-light);
}

/* Notation reference table - framed cells, left-aligned throughout.
   Scoped through .ts-content so these win over the generic
   ".ts-content table th/td" padding + vertical-align rules. */
.ts-content table.notation-table {
  border-collapse: collapse;
  width: auto;
  margin: 1.5rem 0;
}
.ts-content table.notation-table th,
.ts-content table.notation-table td {
  border: 1px solid var(--rule);
  padding: 0.55rem 1.1rem;
  text-align: left;
  vertical-align: middle;
  line-height: 1.6;
}
.ts-content table.notation-table thead th {
  background: var(--bg-dark);
  font-variant: small-caps;
  letter-spacing: 0.04em;
}
.ts-content table.notation-table th[scope="row"] {
  white-space: nowrap;
  font-variant: small-caps;
  letter-spacing: 0.03em;
  background: rgba(200,169,110,0.06);
}
.ts-content table.notation-table .suit { font-size: 1.15rem; }

/* Card tokens - little chips for example notations. */
.notation-examples { margin-top: 1.25rem; }
.card-token {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 0.95rem;
  padding: 0.2rem 0.55rem;
  margin: 0.15rem 0.2rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-dark);
  white-space: nowrap;
}
.card-token .suit { font-size: 1.05em; margin-left: 0.1em; }

/* Footnote reference superscripts. */
.fn-ref a { text-decoration: none; }

/* Keyboard keys (used in footnotes for Alt-codes etc.). */
kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg-dark);
  box-shadow: 0 1px 0 var(--rule);
  white-space: nowrap;
}

/* ============================================================
   SECTION ANCHORS
   Deep links to in-page subsections land with the heading
   visible, not tucked under the fixed #site-header.
   ============================================================ */
.content-wrap h1,
.content-wrap h2,
.content-wrap h3,
.content-wrap h4 {
  scroll-margin-top: calc(var(--header-h, 56px) + 1.25rem);
}

/* Card detail - author's canonical reading as italic lead */
.card-reading-block .card-lead { color: var(--ink-mid); }
