/* Tabletop Character Sheet — antjanus.com redesign 064
   Printed form = ink + rubric red on parchment. Entries = the player's pen (brand #364f6a). */

:root {
  /* primitives */
  --parchment-50: #fffcf4;
  --parchment-100: #fbf5e6;
  --parchment-200: #f2e8d0;
  --parchment-300: #e4d6b6;
  --parchment-400: #c9b58f;
  --umber-900: #1c1712;
  --umber-700: #463b2f;
  --umber-600: #5c4f3f;
  --rubric-700: #8a2a14;
  --pen-600: #364f6a;
  --pen-700: #2a3f54;
  --night-900: #0f0c09;
  --night-800: #1a150f;
  --night-700: #221c15;
  --night-600: #2c241b;
  --night-500: #4a3e30;
  --bone-100: #f1e6d0;
  --bone-300: #c9b99c;
  --ember-300: #ec9676;
  --pen-300: #a3c0e2;

  /* semantic */
  --desk: var(--parchment-300);
  --paper: var(--parchment-100);
  --field: var(--parchment-50);
  --tint: var(--parchment-200);
  --ink: var(--umber-900);
  --ink-soft: var(--umber-700);
  --rule: var(--umber-900);
  --rule-soft: var(--parchment-400);
  --rubric: var(--rubric-700);
  --pen: var(--pen-600);
  --pen-strong: var(--pen-700);
  --on-pen: #fffcf4;
  --code-bg: #efe4c8;
  --shadow: 0 1px 0 rgba(60, 40, 10, .08), 0 12px 30px -12px rgba(60, 40, 10, .35);

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Alegreya", Georgia, "Times New Roman", serif;
  --font-label: "Alegreya Sans SC", "Alegreya Sans", system-ui, sans-serif;
  --font-pen: "Kalam", "Segoe Print", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 12px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: var(--night-900);
    --paper: var(--night-800);
    --field: var(--night-700);
    --tint: var(--night-600);
    --ink: var(--bone-100);
    --ink-soft: var(--bone-300);
    --rule: var(--bone-300);
    --rule-soft: var(--night-500);
    --rubric: var(--ember-300);
    --pen: var(--pen-300);
    --pen-strong: #c4d8f0;
    --on-pen: #0f0c09;
    --code-bg: #14110c;
    --shadow: 0 16px 40px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --desk: var(--night-900);
  --paper: var(--night-800);
  --field: var(--night-700);
  --tint: var(--night-600);
  --ink: var(--bone-100);
  --ink-soft: var(--bone-300);
  --rule: var(--bone-300);
  --rule-soft: var(--night-500);
  --rubric: var(--ember-300);
  --pen: var(--pen-300);
  --pen-strong: #c4d8f0;
  --on-pen: #0f0c09;
  --code-bg: #14110c;
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--desk);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(ellipse at 90% 100%, rgba(0, 0, 0, .10), transparent 55%),
    url("assets/desk-texture.jpg");
  background-size: auto, auto, 900px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pen-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- sheet frame ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.sheet {
  background: var(--paper);
  background-image: url("assets/parchment.jpg");
  background-blend-mode: multiply;
  background-size: 1200px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 44px);
  margin: 24px auto;
  position: relative;
}
:root[data-theme="dark"] .sheet { background-blend-mode: soft-light; }
.sheet + .sheet { margin-top: 36px; }
.sheet-no {
  position: absolute; right: 18px; bottom: 10px;
  font-family: var(--font-label); font-size: .875rem; color: var(--ink-soft);
}

/* ---------- top bar / nav ---------- */
.topbar { padding-top: 16px; }
.topbar-inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 6px;
  padding: 10px 14px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-words small { font-family: var(--font-label); font-size: .875rem; color: var(--ink-soft); letter-spacing: .06em; }
.brand-words strong { font-family: var(--font-display); font-size: 1.125rem; letter-spacing: .06em; }
.tabs { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex: 1; justify-content: center; }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px; padding: 4px 14px; border-radius: 8px 8px 0 0;
  border: 1.5px solid transparent; border-bottom: 2px solid var(--rule-soft);
  text-decoration: none; color: var(--ink); line-height: 1.1;
}
.tabs a span { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.tabs a small { font-family: var(--font-label); font-size: .875rem; color: var(--ink-soft); }
.tabs a:hover { background: var(--tint); color: var(--ink); }
.tabs a[aria-current="page"] { border-color: var(--rule); border-bottom-color: var(--paper); background: var(--field); }
.tabs a[aria-current="page"] span { color: var(--rubric); }
.tools { display: flex; align-items: center; gap: 8px; }
.search { display: flex; }
.search input {
  width: 150px; font: inherit; font-size: 1rem; padding: 8px 10px; min-height: 44px;
  background: var(--field); color: var(--ink); border: 1.5px solid var(--rule); border-right: 0; border-radius: 8px 0 0 8px;
}
.search input::placeholder { color: var(--ink-soft); opacity: 1; }
.search button, .icon-btn {
  font-family: var(--font-label); font-size: 1rem; min-height: 44px; min-width: 44px;
  background: var(--field); color: var(--ink); border: 1.5px solid var(--rule); cursor: pointer;
}
.search button { border-radius: 0 8px 8px 0; padding: 0 12px; }
.icon-btn { border-radius: 50%; display: grid; place-items: center; padding: 0; }
.icon-btn:hover, .search button:hover { background: var(--tint); }
.icon-btn svg { width: 22px; height: 22px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }

@media (max-width: 1100px) {
  .search { display: none; }
}
@media (max-width: 860px) {
  .topbar-inner { gap: 10px; }
  .brand { flex: 1; }
  .topbar-inner > nav { order: 3; flex-basis: 100%; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tabs a { border: 1.5px solid var(--rule-soft); border-radius: 8px; }
  .tabs a[aria-current="page"] { border-color: var(--rule); }
}

/* ---------- form primitives ---------- */
.label, .field-label {
  font-family: var(--font-label); font-size: .875rem; letter-spacing: .08em; color: var(--ink-soft);
  text-transform: lowercase;
}
.eyebrow { font-family: var(--font-label); font-size: 1rem; letter-spacing: .12em; color: var(--rubric); text-transform: lowercase; margin-bottom: .35em; display: block; }
.pen { font-family: var(--font-pen); color: var(--pen); font-weight: 700; }

.field { display: flex; flex-direction: column; min-width: 0; }
.field .value {
  font-family: var(--font-pen); color: var(--pen); font-weight: 700; font-size: 1.2rem; line-height: 1.3;
  padding: 2px 2px 3px; border-bottom: 1.5px solid var(--rule); overflow-wrap: anywhere;
}
.field .field-label { padding-top: 3px; }

.box {
  position: relative; border: 2px solid var(--rule); border-radius: var(--radius);
  background: var(--field); padding: 26px 20px 20px; margin-top: 16px;
}
.box > .box-title {
  position: absolute; top: -0.85em; left: 50%; transform: translateX(-50%);
  background: var(--field); border: 2px solid var(--rule); border-radius: 999px;
  padding: 1px 16px; margin: 0; white-space: nowrap;
  font-family: var(--font-display); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.box.double { box-shadow: inset 0 0 0 3px var(--field), inset 0 0 0 4px var(--rule-soft); }
.box.tinted { background: var(--tint); }
.box.tinted > .box-title { background: var(--tint); }
.box-foot { margin-top: 14px; font-size: 1rem; }

/* ability score box */
.abilities { display: grid; gap: 26px; }
.ability {
  position: relative; text-align: center; border: 2px solid var(--rule);
  border-radius: 16px 16px 30px 30px; background: var(--field); padding: 10px 8px 26px;
}
.ability .abbr { font-family: var(--font-display); font-weight: 700; font-size: .875rem; letter-spacing: .14em; color: var(--rubric); }
.ability .score { font-family: var(--font-pen); font-weight: 700; color: var(--pen); font-size: 2.4rem; line-height: 1.05; margin: 2px 0; }
.ability .name { font-family: var(--font-label); font-size: .9375rem; color: var(--ink-soft); line-height: 1.25; }
.ability .mod {
  position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  background: var(--paper); border: 2px solid var(--rule); border-radius: 999px;
  padding: 1px 14px; font-family: var(--font-label); font-size: .875rem; white-space: nowrap; color: var(--ink);
}

/* proficiency-bubble list (skills) */
.bubbles { list-style: none; margin: 0; padding: 0; }
.bubbles li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dotted var(--rule-soft); }
.bubbles li:last-child { border-bottom: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); transform: translateY(2px); }
.dot.on { background: var(--pen); border-color: var(--pen); }
.bubbles a { color: var(--ink); text-decoration: none; font-weight: 500; }
.bubbles a:hover { color: var(--pen); text-decoration: underline; }
.bubbles .meta { font-family: var(--font-label); font-size: .9375rem; color: var(--ink-soft); white-space: nowrap; }
.bubbles .desc { grid-column: 2 / -1; font-size: 1rem; color: var(--ink-soft); margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips > li { flex: none; max-width: 100%; }
.chip {
  display: inline-block;
  font-family: var(--font-label); font-size: .9375rem; line-height: 1.3;
  border: 1.5px solid var(--rule-soft); border-radius: 999px; padding: 2px 10px; color: var(--ink); background: var(--paper);
}
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--pen); color: var(--pen); }

.badge {
  display: inline-block; font-family: var(--font-label); font-size: .875rem; letter-spacing: .06em; line-height: 1.2;
  padding: 2px 9px; border-radius: 4px; border: 1.5px solid var(--rubric); color: var(--rubric); vertical-align: middle;
}
.badge.new { background: var(--rubric); color: var(--paper); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 20px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .05em;
  border-radius: 8px; border: 2px solid var(--pen); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn.primary { background: var(--pen); color: var(--on-pen); box-shadow: 0 3px 0 var(--pen-strong); }
.btn.primary:hover { background: var(--pen-strong); border-color: var(--pen-strong); color: var(--on-pen); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pen-strong); }
.btn.secondary { background: transparent; color: var(--pen); }
.btn.secondary:hover { background: var(--tint); }
.link-tertiary { font-family: var(--font-label); font-size: 1.0625rem; color: var(--ink-soft); }
.link-tertiary:hover { color: var(--pen); }

/* ---------- home sheet ---------- */
.sheet-head { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 28px; align-items: end; }
.name-plate {
  position: relative; border: 2px solid var(--rule); border-radius: 10px 40px 40px 10px;
  padding: 14px 24px 8px; background: var(--field);
}
.name-plate .value { font-family: var(--font-pen); color: var(--pen); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; border-bottom: 1.5px solid var(--rule); }
.head-fields {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px;
  border: 2px solid var(--rule); border-radius: 12px; padding: 12px 18px 10px; background: var(--field);
}
.sheet-body { display: grid; grid-template-columns: 210px 1fr 1fr; gap: 28px; margin-top: 30px; align-items: start; }
.col-abilities { padding-top: 10px; grid-column: 1; grid-row: 1 / span 2; }
.sheet-body > .col-stack:not(.col-right) { grid-column: 2; grid-row: 2; }
.sheet-body > .col-right { grid-column: 3; grid-row: 2; }
.name-plate .value, .name-plate .field-label { display: block; }
.col-stack > * + * { margin-top: 30px; }
.inspiration { display: flex; align-items: center; gap: 12px; margin-top: 34px; border: 2px solid var(--rule); border-radius: 10px; padding: 10px 12px; background: var(--field); }
.inspiration .diamond { width: 38px; height: 38px; flex: none; border: 2px solid var(--rule); transform: rotate(45deg); display: grid; place-items: center; background: var(--paper); }
.inspiration .diamond span { transform: rotate(-45deg); font-family: var(--font-pen); font-weight: 700; color: var(--pen); font-size: 1.1rem; }
.inspiration p { margin: 0; font-size: 1rem; line-height: 1.35; }

.hero { grid-column: 2 / 4; grid-row: 1; display: grid; grid-template-columns: minmax(220px, 0.85fr) 1.4fr; gap: 26px; align-items: stretch; }
.portrait {
  position: relative; border: 2px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  min-height: 360px; background: linear-gradient(160deg, var(--tint), var(--rule-soft));
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 30%; filter: sepia(.18) contrast(1.02); }
.portrait figcaption {
  position: absolute; left: 10px; bottom: 10px; background: var(--paper); border: 1.5px solid var(--rule);
  border-radius: 999px; padding: 2px 12px; font-family: var(--font-label); font-size: .875rem;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.08; margin-bottom: .35em; }
.hero-copy h1 em { font-style: normal; color: var(--rubric); }
.hero-copy .lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-soft); max-width: 36ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 8px; }

.roll { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1.5px dashed var(--rule-soft); }
.roll button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px;
  font-family: var(--font-label); font-size: 1.0625rem; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 8px; cursor: pointer;
}
.roll button:hover { background: var(--tint); }
.roll svg { width: 26px; height: 26px; }
.roll.rolling svg { animation: spin .6s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.roll-out { font-size: 1.0625rem; min-height: 1.6em; }
.roll-out .pen { font-size: 1.2rem; }

.hook { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px dotted var(--rule-soft); }
.hook:last-child { border-bottom: 0; }
.hook img, .hook .ph { width: 96px; height: 70px; object-fit: cover; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--tint); }
.hook h3 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 700; margin: 0 0 2px; line-height: 1.3; }
.hook h3 a { color: var(--ink); text-decoration: none; }
.hook h3 a:hover { color: var(--pen); text-decoration: underline; }
.hook p { margin: 0; font-size: 1rem; color: var(--ink-soft); line-height: 1.45; }

.trait { padding: 10px 0; border-bottom: 1px dotted var(--rule-soft); }
.trait:last-child { border-bottom: 0; }
.trait h3 { font-family: var(--font-body); font-size: 1.125rem; margin: 0; font-weight: 700; font-style: italic; }
.trait h3::after { content: "."; }
.trait h3 a { color: var(--ink); }
.trait p { margin: 2px 0 0; font-size: 1.0625rem; }
.trait .chips { margin-top: 6px; }

.hire { background: var(--pen); color: var(--on-pen); border-color: var(--pen-strong); }
.hire > .box-title { background: var(--pen); color: var(--on-pen); border-color: var(--pen-strong); }
.hire p { color: var(--on-pen); }
.hire .btn { background: var(--on-pen); color: var(--pen-strong); border-color: var(--on-pen); }
.hire .btn:hover { background: var(--paper); color: var(--ink); }

.allies { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.allies a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 1.0625rem; }
.allies a:hover { color: var(--pen); }
.allies svg { width: 20px; height: 20px; }

@media (max-width: 1100px) {
  .sheet-body { grid-template-columns: 180px 1fr; }
  .hero { grid-column: 2 / 3; grid-template-columns: 1fr; }
  .portrait { min-height: 280px; }
  .sheet-body > .col-right { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
  .col-right > * + * { margin-top: 16px; }
}
@media (max-width: 760px) {
  .sheet-head { grid-template-columns: 1fr; }
  .head-fields { grid-template-columns: 1fr 1fr; }
  .sheet-body { grid-template-columns: 1fr; }
  .hero, .col-abilities, .sheet-body > .col-stack:not(.col-right), .sheet-body > .col-right { grid-column: auto; grid-row: auto; }
  .abilities { grid-template-columns: repeat(3, 1fr); gap: 26px 10px; }
  .ability .score { font-size: 1.9rem; }
  .sheet-body > .col-right { grid-template-columns: 1fr; }
  .portrait { min-height: 300px; }
}

/* ---------- inner page headers ---------- */
.page-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: end; padding-bottom: 22px; border-bottom: 3px double var(--rule); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0; line-height: 1.05; }
.page-head .lede { font-size: 1.25rem; color: var(--ink-soft); margin: 12px 0 0; max-width: 60ch; }
.page-head .head-fields { grid-template-columns: repeat(2, 1fr); }
.head-art { border: 2px solid var(--rule); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--tint), var(--rule-soft)); }
.head-art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .page-head { grid-template-columns: 1fr; } }

.section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--rule); padding-bottom: 6px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.jump a { font-family: var(--font-label); font-size: 1rem; text-decoration: none; color: var(--ink); border: 1.5px solid var(--rule); border-radius: 8px; padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; background: var(--field); }
.jump a:hover { background: var(--tint); }
.jump b { font-family: var(--font-pen); color: var(--pen); }

/* ---------- item cards (inventory) ---------- */
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

.item {
  border: 2px solid var(--rule); border-radius: var(--radius); background: var(--field);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.item .art { aspect-ratio: 16 / 9; background: #14110c; border-bottom: 2px solid var(--rule); overflow: hidden; }
.item .art img { width: 100%; height: 100%; object-fit: cover; }
.item .art.contain img { object-fit: contain; }
.item .art.none { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--tint) 0 10px, var(--field) 10px 20px); color: var(--ink-soft); font-family: var(--font-display); font-size: 2.2rem; }
.item .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.item h3 { font-size: 1.25rem; margin: 0; }
.item h3 a { color: var(--ink); text-decoration: none; }
.item h3 a:hover { color: var(--pen); text-decoration: underline; }
.item .typeline { font-style: italic; color: var(--ink-soft); font-size: 1rem; margin: 2px 0 10px; }
.item p { font-size: 1.0625rem; margin-bottom: 12px; }
.item .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.stars { font-family: var(--font-pen); font-weight: 700; color: var(--pen); font-size: 1.1rem; }
.item.wide { display: grid; grid-template-columns: 1.1fr 1fr; }
.item.wide .art { aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 2px solid var(--rule); }
.item.wide:nth-child(even) .art { order: 2; border-right: 0; border-left: 2px solid var(--rule); }
@media (max-width: 760px) {
  .item.wide { grid-template-columns: 1fr; }
  .item.wide .art, .item.wide:nth-child(even) .art { order: 0; border: 0; border-bottom: 2px solid var(--rule); min-height: 0; aspect-ratio: 16 / 9; }
}
.rarity { font-family: var(--font-label); font-size: .9375rem; letter-spacing: .06em; color: var(--rubric); }

.featured-item { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; border: 3px double var(--rule); border-radius: var(--radius); background: var(--field); overflow: hidden; }
.featured-item .copy { padding: 26px 28px; }
.featured-item .copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.featured-item .art { grid-column: 1 / -1; border-top: 2px solid var(--rule); max-height: 360px; overflow: hidden; background: #0c1f33; }
.featured-item .art img { width: 100%; height: 100%; object-fit: cover; }
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 26px 24px; align-content: center; border-left: 2px solid var(--rule); background: var(--tint); }
.stat-trio .ability { background: var(--field); }
@media (max-width: 760px) { .featured-item { grid-template-columns: 1fr; } .stat-trio { border-left: 0; border-top: 2px solid var(--rule); } }

/* equipment table */
.table-wrap { overflow-x: auto; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--field); }
table.equip { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.equip caption { text-align: left; padding: 12px 16px 0; font-family: var(--font-display); font-weight: 700; }
.equip th { font-family: var(--font-label); font-weight: 500; font-size: .9375rem; letter-spacing: .06em; text-align: left; color: var(--ink-soft); padding: 12px 16px 8px; border-bottom: 2px solid var(--rule); }
.equip td { padding: 12px 16px; border-bottom: 1px dotted var(--rule-soft); vertical-align: top; }
.equip tr:last-child td { border-bottom: 0; }
.equip td.num { text-align: right; font-family: var(--font-pen); font-weight: 700; color: var(--pen); white-space: nowrap; }
.equip th.num { text-align: right; }
.equip a { font-weight: 700; }
@media (max-width: 640px) {
  .equip thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .equip tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 14px; border-bottom: 1px dotted var(--rule-soft); }
  .equip td { padding: 2px 0; border: 0; }
  .equip td.desc { grid-column: 1 / -1; }
  .equip td.tech { grid-column: 1 / -1; color: var(--ink-soft); }
}

/* ---------- spellbook ---------- */
.spell {
  border: 2px solid var(--rule); border-radius: var(--radius); background: var(--field); overflow: hidden;
  display: flex; flex-direction: column;
}
.spell .art { aspect-ratio: 2 / 1; overflow: hidden; border-bottom: 2px solid var(--rule); background: linear-gradient(135deg, #1c2a3a, #364f6a); }
.spell .art img { width: 100%; height: 100%; object-fit: cover; }
.spell .art.none { display: grid; place-items: center; color: #e6edf3; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .1em; }
.spell .body { padding: 14px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.spell h3 { font-size: 1.2rem; color: var(--rubric); margin: 0 0 2px; }
.spell h3 a { color: inherit; text-decoration: none; }
.spell h3 a:hover { text-decoration: underline; }
.spell .school { font-style: italic; color: var(--ink-soft); font-size: 1rem; margin: 0 0 8px; }
.taper { height: 5px; border: 0; margin: 8px 0 10px; background: linear-gradient(90deg, var(--rubric), var(--rubric) 60%, transparent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.props { margin: 0 0 10px; font-size: 1rem; line-height: 1.5; }
.props div { margin: 0; }
.props dt { display: inline; font-weight: 700; color: var(--rubric); }
.props dd { display: inline; margin: 0; }
.spell p.desc { font-size: 1.0625rem; margin: 0 0 12px; }
.spell .foot { margin-top: auto; }

.notice {
  border: 2px solid var(--rubric); border-radius: 10px; padding: 14px 18px; background: var(--field);
  display: flex; gap: 14px; align-items: flex-start;
}
.notice strong { color: var(--rubric); font-family: var(--font-display); letter-spacing: .04em; }
.notice p { margin: 0; }

.consult { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.consult p { margin: 0; font-size: 1.2rem; max-width: 52ch; }

.story { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 2px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--field); }
.story .art { background: #111; min-height: 180px; border-right: 2px solid var(--rule); }
.story .art img { width: 100%; height: 100%; object-fit: cover; }
.story .body { padding: 18px 22px; }
.story .part { font-family: var(--font-display); font-size: .875rem; letter-spacing: .14em; color: var(--rubric); }
.story h3 { font-size: 1.35rem; margin: 2px 0 8px; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a:hover { color: var(--pen); text-decoration: underline; }
.story p { font-size: 1.0625rem; }
.story.sealed { opacity: 1; border-style: dashed; }
.story.sealed .art { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--tint) 0 12px, var(--field) 12px 24px); color: var(--ink-soft); font-family: var(--font-display); }
@media (max-width: 640px) { .story { grid-template-columns: 1fr; } .story .art { border-right: 0; border-bottom: 2px solid var(--rule); aspect-ratio: 16/9; min-height: 0; } }

/* ---------- journal (writing) ---------- */
.log { list-style: none; padding: 0; margin: 0; }
.log-year { font-family: var(--font-display); font-size: 1.4rem; color: var(--rubric); margin: 28px 0 6px; border-bottom: 1.5px solid var(--rule); padding-bottom: 4px; }
.log-year:first-child { margin-top: 0; }
.log li { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px dotted var(--rule-soft); }
.log .date { font-family: var(--font-pen); color: var(--pen); font-weight: 700; font-size: 1.05rem; }
.log h3 { font-family: var(--font-body); font-size: 1.25rem; margin: 0 0 2px; }
.log h3 a { color: var(--ink); text-decoration: none; }
.log h3 a:hover { color: var(--pen); text-decoration: underline; }
.log p { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; }
.log .chips { margin-top: 8px; }
@media (max-width: 640px) { .log li { grid-template-columns: 1fr; gap: 2px; } }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { font-family: var(--font-label); font-size: 1rem; text-decoration: none; color: var(--ink); border: 1.5px solid var(--rule-soft); border-radius: 6px; padding: 6px 10px; background: var(--paper); min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.tag-cloud a:hover { border-color: var(--pen); color: var(--pen); }
.tag-cloud b { font-family: var(--font-pen); color: var(--pen); }

/* ---------- about ---------- */
.career-bar { display: flex; border: 2px solid var(--rule); border-radius: 10px; overflow: hidden; margin: 8px 0 26px; }
.career-bar div { padding: 8px 10px; border-right: 1.5px solid var(--rule); background: var(--field); min-width: 0; }
.career-bar div:last-child { border-right: 0; }
.career-bar div:nth-child(odd) { background: var(--tint); }
.career-bar b { display: block; font-family: var(--font-body); font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.career-bar span { font-family: var(--font-pen); color: var(--pen); font-size: .9375rem; font-weight: 700; }
@media (max-width: 860px) { .career-bar { display: grid; grid-template-columns: 1fr 1fr; } .career-bar div { border-bottom: 1.5px solid var(--rule); } }

.levels { list-style: none; margin: 0; padding: 0; counter-reset: lvl; }
.levels > li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1.5px dotted var(--rule-soft); }
.levels > li:last-child { border-bottom: 0; }
.levels .period { font-family: var(--font-pen); color: var(--pen); font-weight: 700; font-size: 1.15rem; }
.levels h3 { font-size: 1.35rem; margin: 0 0 6px; }
.levels .roles { list-style: none; padding: 0; margin: 10px 0 0; }
.levels .roles li { padding: 4px 0 4px 22px; position: relative; font-size: 1.0625rem; }
.levels .roles li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 10px; border: 2px solid var(--rule); border-radius: 50%; }
.levels .roles li.on::before { background: var(--pen); border-color: var(--pen); }
.levels blockquote { margin: 10px 0 0; padding: 8px 14px; border-left: 3px solid var(--rubric); background: var(--tint); font-size: 1.0625rem; border-radius: 0 8px 8px 0; }
@media (max-width: 640px) { .levels > li { grid-template-columns: 1fr; gap: 4px; } }

.ideals { list-style: none; counter-reset: ideal; margin: 0; padding: 0; display: grid; gap: 12px; }
.ideals li { counter-increment: ideal; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; font-family: var(--font-pen); color: var(--pen); font-size: 1.3rem; font-weight: 700; line-height: 1.35; }
.ideals li::before { content: counter(ideal); display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--rule); border-radius: 50%; font-family: var(--font-display); color: var(--rubric); font-size: 1rem; }

.prof { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1.5px dotted var(--rule-soft); }
.prof:last-child { border-bottom: 0; }
.prof h3 { font-size: 1.2rem; margin: 0 0 4px; }
.prof p { font-size: 1.0625rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .prof { grid-template-columns: 1fr; gap: 10px; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.photo-box { border: 2px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- article (scroll) ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--rubric); z-index: 40; }
.article-head { text-align: center; padding: 10px 0 26px; border-bottom: 3px double var(--rule); }
.article-head .crumbs { font-family: var(--font-label); font-size: 1.0625rem; }
.article-head h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 22ch; margin: 10px auto 12px; line-height: 1.1; }
.article-head .lede { font-size: 1.3rem; color: var(--ink-soft); max-width: 50ch; margin: 0 auto 20px; font-style: italic; }
.article-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 20px; max-width: 820px; margin: 0 auto; text-align: left; border: 2px solid var(--rule); border-radius: 12px; padding: 12px 18px 10px; background: var(--field); }
@media (max-width: 640px) { .article-fields { grid-template-columns: 1fr 1fr; } }
.article-banner { margin: 26px auto 0; max-width: 980px; border: 2px solid var(--rule); border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; background: #20232a; }
.article-banner img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 250px minmax(0, 720px); justify-content: center; gap: 48px; margin-top: 36px; }
.article-layout > .rail-r { display: none; }
.toc { position: sticky; top: 20px; align-self: start; }
.toc .box { margin-top: 12px; padding: 24px 14px 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc ol a { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: baseline; padding: 6px 4px; color: var(--ink); text-decoration: none; font-size: 1rem; line-height: 1.35; border-radius: 6px; }
.toc ol a .dot { width: 12px; height: 12px; }
.toc ol a:hover { background: var(--tint); }
.toc ol a[aria-current="true"] { color: var(--rubric); font-weight: 700; }
.toc ol a[aria-current="true"] .dot { background: var(--pen); border-color: var(--pen); }
.toc details summary { display: none; }
.aside-tools { font-size: 1rem; margin-top: 16px; display: grid; gap: 8px; }
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 860px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; }
  .toc .box { display: none; }
  .toc details { border: 2px solid var(--rule); border-radius: 10px; background: var(--field); }
  .toc details summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 8px 14px; font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; cursor: pointer; }
  .toc details[open] summary { border-bottom: 1.5px solid var(--rule-soft); }
  .toc details ol { padding: 6px 10px 10px; }
}
@media (min-width: 861px) { .toc details { display: none; } }

.prose { font-size: 1.1875rem; line-height: 1.7; min-width: 0; }
.prose h2 { font-size: 1.8rem; margin: 2em 0 .6em; padding-bottom: 6px; border-bottom: 1.5px solid var(--rule); scroll-margin-top: 20px; }
.prose h2::before { content: "§ "; color: var(--rubric); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .25em 0; }
.prose ol li::marker { color: var(--rubric); font-family: var(--font-display); font-weight: 700; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--rule-soft); }
.prose > p:first-of-type::first-letter { font-family: var(--font-display); font-weight: 700; float: left; font-size: 3.6em; line-height: .9; margin: 6px 10px 0 0; color: var(--rubric); }

.code { margin: 1.4em -24px; border: 2px solid var(--rule); border-radius: 10px; background: var(--code-bg); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 14px; border-bottom: 1.5px solid var(--rule); background: var(--tint); }
.code-bar span { font-family: var(--font-label); font-size: .9375rem; letter-spacing: .08em; color: var(--ink-soft); }
.copy-btn { font-family: var(--font-label); font-size: .9375rem; min-height: 36px; padding: 2px 12px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); cursor: pointer; }
.copy-btn:hover { background: var(--paper); }
.code pre, .pane pre { font-variant-ligatures: none; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; color: var(--ink); tab-size: 2; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.tk-c { color: #6b5d48; font-style: italic; }
.tk-s { color: #2f6a3a; }
.tk-k { color: var(--rubric); font-weight: 600; }
.tk-t { color: var(--pen); }
:root[data-theme="dark"] .tk-c { color: #a8987c; }
:root[data-theme="dark"] .tk-s { color: #9fd49a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tk-c { color: #a8987c; } :root:not([data-theme="light"]) .tk-s { color: #9fd49a; } }
@media (max-width: 860px) { .code { margin-left: 0; margin-right: 0; } }

.callout { margin: 1.4em 0; border: 2px solid var(--rule); border-radius: 10px; padding: 14px 18px 12px; background: var(--field); position: relative; }
.callout p { margin: 0; }
.callout .kind { font-family: var(--font-display); font-weight: 700; font-size: .9375rem; letter-spacing: .1em; display: block; margin-bottom: 4px; }
.callout.why { border-left: 8px solid var(--rubric); }
.callout.why .kind { color: var(--rubric); }
.callout.ask { border-style: dashed; border-color: var(--pen); background: transparent; }
.callout.ask .kind { color: var(--pen); }
.callout.ask p { font-family: var(--font-pen); color: var(--pen); font-size: 1.15rem; line-height: 1.5; }
.callout.note .kind, .callout.skill .kind { color: var(--ink-soft); }
.callout.skill { background: var(--tint); border-width: 3px; border-style: double; }

.after { margin-top: 44px; display: grid; gap: 28px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-row a, .share-row button { font-family: var(--font-label); font-size: 1.0625rem; min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.share-row a:hover, .share-row button:hover { background: var(--tint); }

.signup { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.signup input[type="email"] { font: inherit; font-size: 1.0625rem; min-height: 48px; padding: 8px 12px; background: var(--paper); color: var(--ink); border: 2px solid var(--rule); border-radius: 8px; }
.signup input::placeholder { color: var(--ink-soft); opacity: 1; }
.signup .consent { grid-column: 1 / -1; font-size: 1rem; display: flex; gap: 10px; align-items: flex-start; }
.signup .consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--pen); }
.signup .status { grid-column: 1 / -1; margin: 0; font-size: 1.0625rem; min-height: 1.4em; }
@media (max-width: 520px) { .signup { grid-template-columns: 1fr; } }

/* ---------- patterns (feats) ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.three-ways h3 { font-size: 1.15rem; color: var(--rubric); margin: 0 0 4px; }
.three-ways p { font-size: 1.0625rem; margin: 0; }
@media (max-width: 760px) { .three-ways { grid-template-columns: 1fr; } }
.filters { display: grid; gap: 14px; margin-top: 30px; }
.filters input[type="search"] { font: inherit; font-size: 1.125rem; min-height: 52px; width: 100%; padding: 10px 16px; border: 2px solid var(--rule); border-radius: 10px; background: var(--field); color: var(--ink); }
.filters input::placeholder { color: var(--ink-soft); opacity: 1; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { font-family: var(--font-label); font-size: 1rem; min-height: 44px; padding: 4px 14px; border: 1.5px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.pills button:hover { background: var(--tint); }
.pills button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pills button[aria-pressed="true"]::before { content: "✓ "; }
.count { font-family: var(--font-label); font-size: 1.0625rem; color: var(--ink-soft); }
.count button { font: inherit; color: var(--pen); background: none; border: 0; text-decoration: underline; cursor: pointer; min-height: 44px; }
.filters select { font: inherit; font-size: 1rem; min-height: 44px; padding: 4px 10px; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); }

.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
@media (max-width: 1000px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .feats { grid-template-columns: 1fr; } }
.feat { border: 2px solid var(--rule); border-radius: var(--radius); background: var(--field); padding: 16px 18px 16px; display: flex; flex-direction: column; position: relative; }
.feat::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--rule-soft); border-radius: 8px; pointer-events: none; }
.feat .school { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-label); font-size: .9375rem; color: var(--ink-soft); }
.feat h3 { font-size: 1.2rem; color: var(--rubric); margin: 6px 0 0; }
.feat h3 a { color: inherit; text-decoration: none; }
.feat h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.feat h3 a:hover { text-decoration: underline; }
.feat:focus-within { outline: 3px solid var(--pen); outline-offset: 3px; }
.feat h3 a:focus-visible { outline: none; }
.feat p { font-size: 1.0625rem; margin: 0 0 10px; }
.feat .added { font-family: var(--font-label); font-size: .9375rem; color: var(--ink-soft); margin-top: auto; }
.feat .sigil { width: 42px; height: 42px; color: var(--pen); }
.empty { text-align: center; border: 2px dashed var(--rule-soft); border-radius: var(--radius); padding: 36px 20px; margin-top: 22px; }
.empty h3 { font-size: 1.4rem; }

/* stat block (pattern detail) */
.statblock {
  max-width: 900px; margin: 0 auto; background: var(--field); border: 1px solid var(--rule-soft);
  border-top: 6px solid var(--rubric); border-bottom: 6px solid var(--rubric);
  padding: 22px clamp(18px, 3vw, 34px); box-shadow: var(--shadow);
}
.statblock h1 { color: var(--rubric); font-size: clamp(2rem, 4.5vw, 3rem); margin: 6px 0 0; font-variant: small-caps; }
.statblock .kindline { font-style: italic; color: var(--ink-soft); margin: 0; font-size: 1.125rem; }
.statblock .lede { font-size: 1.2rem; margin-top: 10px; }
.statblock .props { font-size: 1.0625rem; }
.statblock .props div { margin: 4px 0; }
.uses { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 6px 0 0; }
.uses li { break-inside: avoid; margin: 3px 0; }
@media (max-width: 640px) { .uses { columns: 1; } }

.panes { max-width: 1100px; margin: 30px auto 0; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 2px solid var(--rule); background: var(--tint); }
.pane-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.pane-tabs button { font-family: var(--font-display); font-weight: 700; font-size: .9375rem; letter-spacing: .04em; min-height: 44px; padding: 4px 14px; border: 1.5px solid transparent; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.pane-tabs button:hover { background: var(--field); }
.pane-tabs button[aria-selected="true"] { background: var(--field); border-color: var(--rule); color: var(--rubric); }
.pane-actions { display: flex; gap: 6px; }
.pane-actions button { font-family: var(--font-label); font-size: 1rem; min-height: 44px; padding: 4px 14px; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--field); color: var(--ink); cursor: pointer; }
.pane { padding: 22px; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; overflow-x: auto; background: var(--code-bg); border: 1.5px solid var(--rule-soft); border-radius: 8px; padding: 14px 16px; color: var(--ink); white-space: pre; }
.pane .note { font-size: 1.0625rem; margin: 0 0 12px; }
.prompt-text { max-width: 70ch; font-size: 1.125rem; }

/* hairline stat strip demo, rendered with sheet tokens */
.demo-cap { font-size: 1.0625rem; color: var(--ink-soft); margin: 0 0 10px; }
.hss-strip { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 24px; }
@media (min-width: 400px) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .hss-strip { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 400px) and (max-width: 759px) { .hss-strip.five { grid-template-columns: repeat(2, 1fr); } }
.hss-tile { background: var(--field); padding: 14px 16px; min-width: 0; text-align: left; font: inherit; color: var(--ink); border: 0; }
.hss-tile .l { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); display: block; }
.hss-tile .f { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }
.hss-tile .u { font-size: 1rem; color: var(--ink-soft); display: block; }
.hss-tile .f.missing { color: var(--ink-soft); }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: var(--tint); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--pen) 16%, var(--field)); box-shadow: inset 0 -3px 0 var(--pen); }
.hss-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.hss-list li { border: 1px solid var(--rule-soft); background: var(--field); border-radius: 8px; padding: 8px 12px; font-size: 1.0625rem; }
.hss-status { font-size: 1.0625rem; margin: 0; }

/* ---------- footer ---------- */
.site-foot { margin: 40px auto 30px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 28px; }
.foot-grid h2 { font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink); font-size: 1.0625rem; text-decoration: none; }
.foot-grid li a:hover { color: var(--pen); text-decoration: underline; }
.foot-grid p { font-size: 1.0625rem; color: var(--ink-soft); }
.foot-bottom { margin-top: 26px; padding-top: 14px; border-top: 3px double var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--font-label); font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

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

/* about page grid variants */
.about-head { grid-template-columns: 1fr 1.2fr; }
.sheet-body.about-body { grid-template-columns: 210px minmax(0, 1fr); }
.about-body > .abilities { align-self: start; padding-top: 16px; }
@media (max-width: 860px) {
  .about-head { grid-template-columns: 1fr; }
  .sheet-body.about-body { grid-template-columns: 1fr; }
  .about-body > .abilities { grid-template-columns: repeat(3, 1fr); gap: 26px 10px; }
}

.prose-fig { margin: 1.4em 0; border: 2px solid var(--rule); border-radius: 10px; overflow: hidden; }
.prose-fig img { display: block; width: 100%; height: auto; }
.callout p + p { margin-top: .6em; }
.prose code { overflow-wrap: anywhere; }
.prof .chips { align-content: flex-start; }
