:root {
  --page-width: 210mm;
  --page-height: 297mm;
  --page-gap: 10mm;
  --page-padding: 10mm;
  --section-gap: 6mm;
  --panel-gap: 4mm;
  --tight-gap: 2mm;
  --panel-pad: 4mm;
  --title-pad-y: 2.5mm;
  --title-pad-x: 4mm;
  --subsection-title-pad-x: 3mm;
  --side-widget-width: 27mm;
  --talent-entry-pad-x: 2.6mm;
  --page-bg: #fff;
  --text: #000;
  --line: #222;
  --panel-fill: #d9d9d9;
  --bar-bg: #666;
  --bar-fg: #fff;
}

@page {
  size: A4;
  margin: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  line-height: 1.25;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
}

.sheet-workspace {
  display: grid;
  grid-template-columns: repeat(2, var(--page-width));
  gap: var(--page-gap);
  justify-content: center;
  padding: var(--page-gap);
}

.sheet-page {
  width: var(--page-width);
  height: var(--page-height);
  padding: var(--page-padding);
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  border: 1px solid var(--line);
  background: var(--page-bg);
}

.sheet-page-header {
  display: grid;
  grid-template-columns: 2fr 3fr;
  align-items: stretch;
  gap: var(--panel-gap);
}

.sheet-logo-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--tight-gap);
}

.sheet-logo {
  width: 100%;
  height: auto;
}

.sheet-logo-edition {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14pt;
  text-align: center;
}

.sheet-identity {
  display: grid;
  gap: var(--panel-gap);
}

.left-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1.18fr 1.52fr 1.52fr;
  gap: var(--panel-gap);
  flex: 1 1 0;
  min-height: 0;
}

.sheet-page--path {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet-stack {
  display: grid;
  grid-template-rows: 0.8fr 1.2fr;
  gap: var(--panel-gap);
  min-height: 0;
}

.bottom-row {
  display: grid;
  flex: 0.68 1 0;
  grid-template-columns: 3.4fr 1.2fr;
  gap: var(--panel-gap);
}

.sheet-panel {
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--page-bg);
  min-height: 0;
  border-radius: 0 0 3mm 3mm;
}

.panel-bar-title,
.panel-bar-meta {
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.panel-bar-title {
  font-size: 11pt;
}

.panel-bar-meta {
  font-size: 9pt;
  color: var(--bar-fg);
}

.sheet-panel > .panel-bar-title {
  background: var(--bar-bg);
  color: var(--bar-fg);
  padding: var(--title-pad-y) var(--title-pad-x);
}

.sheet-field {
  position: relative;
  border-top: 3px solid var(--bar-bg);
  border-radius: 0 0 3mm 3mm;
  background: var(--page-bg);
}

.sheet-field-label {
  position: absolute;
  top: 1.2mm;
  left: 2mm;
  font-size: 7.5pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

.sheet-field-body {
  margin: 0.5mm 2mm 2mm;
  background: var(--page-bg);
}

.sheet-identity > .sheet-field:first-child .sheet-field-body {
  min-height: 12mm;
}

.sheet-identity > .sheet-field:last-child .sheet-field-body {
  min-height: 18mm;
}

.attributes-panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  position: relative;
  padding-top: 1mm;
  background: var(--panel-fill);
}

.attributes-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1mm;
  padding: 0 var(--panel-pad);
}

.attribute-column {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.attributes-panel p:first-child,
.attribute-statuses p,
.attribute-outcome span {
  font-weight: 700;
  font-variant-caps: small-caps;
}

.attribute-column > p {
  font-size: 8.5pt;
}

.attribute-column > div:first-of-type {
  width: 100%;
  max-width: 11.5mm;
  height: 13mm;
  border: 2px solid var(--line);
  border-radius: 2.5mm;
  background: var(--page-bg);
}

.attribute-column > div:last-of-type {
  position: relative;
  width: 6mm;
  height: 9mm;
  margin-top: -1.4mm;
}

.attribute-column > div:last-of-type::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4.8mm;
  height: 4.8mm;
  border: 1px solid var(--line);
  background: var(--page-bg);
  transform: translateX(-50%) rotate(45deg);
}

.attribute-column > div:last-of-type::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6mm;
  width: 0;
  height: 3.4mm;
  border-left: 2px solid var(--line);
  transform: translateX(-50%);
}

.attribute-statuses {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2mm;
  padding: 4mm 6mm 0;
}

.attribute-statuses > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1mm;
}

.attribute-statuses > div:nth-child(2) {
  transform: translate(0.5mm, -1.5mm);
}

.attribute-statuses > div:not(:nth-child(2)) {
  margin-top: -6.5mm;
}

.attribute-statuses > div:first-child {
  transform: translateX(8.7mm);
}

.attribute-statuses > div:last-child {
  transform: translateX(-8.7mm);
}

.attribute-statuses > div > div {
  display: flex;
  align-items: center;
  gap: 1.25mm;
}

.attribute-statuses > div > div > span {
  position: relative;
  width: 9mm;
  border-top: 1px solid var(--line);
}

.attribute-statuses > div:nth-child(2) > div > span {
  width: 14mm;
}

.attribute-statuses > div:nth-child(2) > div > span:first-child::after,
.attribute-statuses > div:nth-child(2) > div > span:last-child::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.attribute-statuses > div:nth-child(2) > div > span:first-child::after {
  right: -1px;
  border-left: 5px solid var(--line);
}

.attribute-statuses > div:nth-child(2) > div > span:last-child::after {
  left: -1px;
  border-right: 5px solid var(--line);
}

.attribute-statuses > div:not(:nth-child(2)) > div > span::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.attribute-statuses > div:not(:nth-child(2)) > div > span:first-child::after {
  right: -1px;
  border-left: 5px solid var(--line);
}

.attribute-statuses > div:not(:nth-child(2)) > div > span:last-child::after {
  left: -1px;
  border-right: 5px solid var(--line);
}

.attribute-statuses > div:nth-child(2) > div > div {
  width: 6.5mm;
  height: 6.5mm;
  border: 2px solid var(--line);
  box-shadow:
    inset 0 0 0 1px var(--page-bg),
    inset 0 0 0 3.2px var(--line);
}

.attribute-statuses > div > div > div {
  position: relative;
  width: 5.4mm;
  height: 5.4mm;
  border: 1.5px solid var(--line);
  background: var(--page-bg);
  transform: rotate(45deg);
  box-shadow:
    inset 0 0 0 1px var(--page-bg),
    inset 0 0 0 2.4px var(--line);
}

.attribute-statuses p {
  font-size: 7.5pt;
}

.attribute-outcome {
  margin-top: auto;
  padding: 1mm 2.5mm 1.5mm;
  transform: translateX(0.5mm);
  margin-bottom: 2mm;
}

.attribute-arrow {
  position: relative;
  width: 0;
  height: 5mm;
  margin: 0 auto 0.5mm;
  border-left: 1px solid var(--line);
  transform: translateY(-2mm);
}

.attribute-arrow::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -1px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 5px solid var(--line);
}

.attribute-outcome-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5mm;
}

.attribute-rule {
  font-size: 8pt;
  font-variant-caps: small-caps;
}

.attribute-outcome-row > p:first-child {
  text-align: right;
}

.attribute-outcome-row > p:last-child {
  text-align: left;
}

.attribute-skull {
  width: 8mm;
  height: 8mm;
  border-radius: 50%;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20pt;
  line-height: 1;
  transform: translateY(-2mm);
}

.attribute-critical {
  margin-top: -1.2mm;
  text-align: center;
  font-size: 8pt;
  font-variant-caps: small-caps;
}

.conditions-panel > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--panel-fill);
}

.conditions-panel > div > div:first-child {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5mm var(--tight-gap);
  padding: var(--panel-pad) var(--title-pad-x);
  font-size: 9pt;
  font-style: italic;
}

.conditions-panel > div > div:nth-child(2) {
  flex: 1;
  margin: 0 var(--panel-pad);
  background: var(--page-bg);
  min-height: 0;
}

.conditions-panel > div > div:last-child {
  padding: var(--tight-gap) var(--subsection-title-pad-x);
  font-size: 8.5pt;
  text-transform: uppercase;
}

.conditions-panel > div > div:last-child span {
  font-weight: 700;
}

.control {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--control-size, 5mm);
  height: var(--control-size, 5mm);
  border: var(--control-border-width, 2px) solid var(--control-border-color, var(--line));
  border-radius: var(--control-radius, 0);
  background: var(--control-bg, var(--page-bg));
}

.control--title {
  --control-size: 5mm;
  --control-border-width: 1px;
  --control-border-color: var(--bar-fg);
}

.spark-panel .control--title {
  --control-radius: 1.5mm;
}

.story-panel .control--title {
  --control-radius: 50%;
}

.control--pick {
  --control-size: 5mm;
  --control-border-width: 1.5px;
  --control-radius: 50%;
}

.control--pick-filled {
  --control-size: 4mm;
  --control-border-width: 0;
  --control-radius: 50%;
  --control-bg: var(--line);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.control--track {
  width: 6.2mm;
  height: 6.2mm;
  border: 2px solid var(--line);
  border-radius: 2.2mm;
  background: var(--page-bg);
}

.talent-checkbox {
  width: 6mm;
  height: 6mm;
  border: 2px solid var(--line);
  border-radius: 1mm;
  background: var(--page-bg);
}

.talent-checkbox,
.talent-pool {
  display: inline-block;
  flex: 0 0 auto;
}

.talent-pool {
  width: 9mm;
  height: 9mm;
  border: 2px solid var(--line);
  border-radius: 2mm;
  background: var(--page-bg);
}

.experience-grid > div > span {
  width: 5.2mm;
  height: 5.2mm;
  border: 2px solid var(--line);
  border-radius: 1mm;
  background: var(--page-bg);
}

.control--tenet {
  --control-size: 5mm;
  --control-radius: 1.3mm;
}

.muted {
  border-color: rgba(34, 34, 34, 0.45);
}

.control-cell {
  display: block;
  height: 100%;
  background: var(--page-bg);
}

.control-cell + .control-cell {
  border-left: 1px solid var(--line);
}

.control-cell--wizard {
  height: 4.8mm;
}

.traits-columns li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3.4mm;
  height: 3.4mm;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--page-bg);
  transform: translateY(-50%);
}

.header-checks {
  display: flex;
  gap: var(--tight-gap);
}

.spark-panel > div,
.story-panel > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--tight-gap);
  padding: var(--tight-gap) var(--title-pad-x) var(--panel-pad);
  background: var(--panel-fill);
  font-size: 9pt;
}

.spark-panel > div > p:first-child,
.story-panel > div > p:first-child {
  font-weight: 700;
  font-variant-caps: small-caps;
}

.spark-panel > div > ul {
  margin: 0;
  padding-left: 4mm;
  min-height: 0;
}

.spark-panel > div > ul li + li {
  margin-top: 1.5mm;
}

.sheet-stack:last-child {
  grid-template-rows: 0.9fr 1.1fr;
}

.vantage-panel > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--panel-fill);
}

.vantage-panel > div > div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--panel-gap);
  padding: var(--tight-gap) var(--title-pad-x);
  font-size: 9pt;
}

.vantage-panel > div > div + div {
  border-top: 1px solid var(--line);
}

.vantage-panel > div > div > p:first-child {
  font-weight: 700;
  font-variant-caps: small-caps;
}

.vantage-panel > div > div > p:last-child {
  font-style: italic;
}

.experience-panel {
  border: 0;
  background: transparent;
}

.experience-panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 2.5mm;
  border-radius: 0 0 3mm 3mm;
  background: var(--panel-fill);
}

.experience-title {
  margin-left: auto;
  font-size: 9pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
}

.experience-grid {
  display: grid;
  grid-auto-rows: auto;
  row-gap: 0.8mm;
}

.experience-grid > div {
  display: flex;
  align-items: center;
  gap: 1.2mm;
}

.experience-grid > div > span:last-of-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(34, 34, 34, 0.55);
}

.experience-grid > div > span:last-of-type::after {
  content: "+";
  position: relative;
  top: -0.2mm;
}

.path-panel {
  min-height: 0;
  flex: 3 1 0;
  display: flex;
  flex-direction: column;
}

.path-panel--dense .path-copy {
  font-size: 9.4pt;
  line-height: 1.22;
}

.path-panel--dense .path-copy--core {
  padding-top: 2.2mm;
}

.path-panel--dense .path-copy--core > p + p {
  margin-top: 1.2mm;
}

.path-panel--dense .talent-row {
  padding-top: 0.95mm;
  padding-bottom: 0.95mm;
}

.path-panel--dense .talent-slot {
  font-size: 9.2pt;
  gap: 1.1mm;
}

.traits-panel {
  min-height: 0;
  flex: 0.5 1 0;
}

.panel-bar.traits-panel-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: calc(11pt * 1.25 + (2 * var(--title-pad-y)));
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bar-bg);
  color: var(--bar-fg);
}

.panel-bar-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1mm;
  min-height: 100%;
  min-width: 0;
  padding: 0 var(--title-pad-x);
}

.panel-bar-split + .panel-bar-split {
  border-left: 1px solid var(--line);
}

.traits-panel-bar .panel-bar-title {
  color: var(--bar-fg);
}

.traits-subtitle {
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.traits-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  background: var(--panel-fill);
}

.traits-body > section {
  padding: 1.6mm 2mm 2mm;
}

.traits-body > section + section {
  border-left: 1px solid var(--line);
}

.traits-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8mm 1.5mm;
}

.traits-columns > ul {
  display: grid;
  gap: 0.9mm;
  align-content: start;
  list-style: none;
}

.traits-columns li {
  position: relative;
  font-size: 9pt;
  list-style: none;
  padding-left: 4.4mm;
}

.panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bar-bg);
  color: var(--bar-fg);
  padding: var(--title-pad-y) var(--title-pad-x);
}

.cleric-path-heading {
  align-items: center;
  gap: 3mm;
}

.path-header-field {
  display: flex;
  align-items: center;
  gap: 1.8mm;
  margin-left: auto;
}

.path-header-field > span {
  display: inline-block;
  width: 42mm;
  height: 8.2mm;
  border-radius: 3mm;
  background: var(--page-bg);
}

.panel-section {
  border: 1px solid var(--line);
  flex: 1;
  padding: 0;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
}

.panel-section > .panel-bar-title {
  background: var(--bar-bg);
  color: var(--bar-fg);
  padding: var(--title-pad-y) var(--subsection-title-pad-x);
}

.core-talents > .panel-bar-title,
.path-talents > .panel-bar-title {
  padding-top: 1.2mm;
  padding-bottom: 1.2mm;
}

.core-talents {
  flex: 0.88 1 0;
}

.path-talents {
  flex: 2.12 1 0;
}

.path-core-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--panel-fill);
}

.path-core-layout--column {
  flex-direction: column;
}

.path-copy {
  font-size: 10pt;
  line-height: 1.35;
}

.path-copy--core {
  flex: 1;
  padding: 3mm 3.5mm 0.5mm;
}

.path-copy--core > p + p {
  margin-top: 2.2mm;
}

.core-talent-list {
  margin: 2mm 0 2.4mm;
  padding-left: 4mm;
}

.core-talent-list li + li {
  margin-top: 1.2mm;
}

.path-copy strong {
  font-variant-caps: small-caps;
}

.talent-lead {
  margin-right: 1.8mm;
  vertical-align: middle;
  transform: translateY(-0.2mm);
}

.tracker-panel {
  flex: 0 0 calc(var(--side-widget-width) + var(--talent-entry-pad-x));
  padding: 10mm 1mm 3mm;
  margin-left: calc(-1 * var(--talent-entry-pad-x));
  border-left: 1px solid rgba(34, 34, 34, 0.45);
  text-align: center;
}

.tracker-panel--top-2_5 {
  padding-top: 2.5mm;
}

.tracker-panel--top-5_5 {
  padding-top: 5.5mm;
}

.tracker-panel--top-6 {
  padding-top: 6mm;
}

.tracker-panel--top-6_5 {
  padding-top: 6.5mm;
}

.tracker-panel--top-7 {
  padding-top: 7mm;
}

.tracker-panel--top-9 {
  padding-top: 9mm;
}

.tracker-panel--top-11 {
  padding-top: 11mm;
}

.tracker-label {
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
}

.tracker-list {
  display: grid;
  gap: 1.8mm;
  margin-top: 2.8mm;
}

.tracker-list--loose {
  gap: 3.2mm;
}

.psion-instability-tracker {
  display: block;
  width: 32mm;
  max-width: 100%;
  margin: 1mm auto 0;
  overflow: visible;
}

.psion-instability-slot {
  fill: var(--page-bg);
  stroke: var(--line);
  stroke-linejoin: miter;
  stroke-width: 2;
}

.psion-instability-slot.muted {
  stroke: rgba(34, 34, 34, 0.45);
}

.psion-instability-arrow {
  fill: none;
  stroke: rgba(34, 34, 34, 0.35);
  stroke-linecap: square;
  stroke-width: 3;
}

.psion-instability-arrow-head {
  fill: rgba(34, 34, 34, 0.35);
}

.psion-instability-tracker text {
  fill: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
}

.tracker-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 5.8mm;
  border: 2px solid var(--line);
  border-radius: 2mm;
  overflow: hidden;
  background: var(--page-bg);
}

.tracker-segments > span + span {
  border-left: 1px solid var(--line);
}

.tracker-cluster {
  display: grid;
  justify-items: center;
  gap: 1.8mm;
}

.tracker-box-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8mm;
}

.tracker-box-row--mt-sm {
  margin-top: 2mm;
}

.tracker-box-row--mt-md {
  margin-top: 2.2mm;
}

.tracker-segments--wizard {
  height: auto;
  justify-content: center;
  gap: 0;
}

.tracker-segments--four {
  grid-template-columns: repeat(4, 1fr);
  width: 18.8mm;
}

.tracker-segments--three {
  grid-template-columns: repeat(3, 1fr);
  width: 14.4mm;
}

.tracker-segments--two {
  grid-template-columns: repeat(2, 1fr);
  width: 12mm;
}

.tracker-segments--wizard:has(.muted) {
  border-color: rgba(34, 34, 34, 0.35);
}

.tracker-list--boxes {
  justify-items: center;
}

.tracker-box-grid {
  display: grid;
  grid-template-columns: repeat(2, 6.2mm);
  justify-content: center;
  gap: 1.8mm;
  margin-top: 2.2mm;
}

.monk-tracker-group + .monk-tracker-group {
  margin-top: 6mm;
}

.monk-flow {
  display: grid;
  gap: 2.2mm;
  margin-top: 2mm;
}

.monk-flow > .tracker-segments {
  grid-template-columns: repeat(4, 1fr);
  height: 5.8mm;
}

.monk-flow-bonus {
  width: 50%;
  justify-self: center;
}

.monk-flow > .monk-flow-bonus {
  grid-template-columns: repeat(2, 1fr);
}

.tracker-diamond-grid {
  display: grid;
  grid-template-columns: repeat(3, 7mm);
  justify-content: center;
  gap: 2.2mm 2.6mm;
  margin-top: 2.4mm;
}

.tracker-diamond-grid > span {
  width: 5.8mm;
  height: 5.8mm;
  border: 2px solid var(--line);
  border-radius: 1.2mm;
  background: var(--page-bg);
  transform: rotate(45deg);
}

.rite-trackers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.2mm;
  padding: 0 1.8mm 2.2mm;
}

.rite-tracker {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  column-gap: 1.4mm;
}

.rite-tracker > p {
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
}

.rite-line {
  height: 10mm;
  border-radius: 0 0 2mm 2mm;
  background: var(--page-bg);
}

.talent-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: var(--panel-fill);
}

.talent-row {
  display: grid;
  grid-template-columns: auto 1fr var(--side-widget-width);
  align-items: start;
  gap: 2mm;
  padding: 1.4mm var(--talent-entry-pad-x);
}

.talent-row + .talent-row {
  border-top: 1px solid rgba(34, 34, 34, 0.22);
}

.talent-row--compact {
  gap: 1.8mm;
  padding-top: 1mm;
  padding-bottom: 1mm;
  padding-left: 0;
  padding-right: 0;
}

.talent-row--compact :is(.path-copy, .talent-body) {
  line-height: 1.22;
}

.talent-row--stretch {
  align-items: stretch;
}

.talent-picker {
  margin-top: 0.9mm;
}

:is(.talent-body, .path-copy) {
  min-width: 0;
  line-height: 1.28;
}

.talent-row > :is(.talent-body, .path-copy):last-child {
  grid-column: 2 / 4;
}

.talent-slot {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  gap: 1.8mm;
  width: calc(100% + var(--talent-entry-pad-x));
  min-height: 6mm;
  padding-left: 1mm;
  padding-right: 1mm;
  margin-right: calc(-1 * var(--talent-entry-pad-x));
  border-left: 1px solid rgba(34, 34, 34, 0.45);
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.talent-tag-insp {
  min-width: 20mm;
}

.talent-tag-label {
  line-height: 1;
}

.talent-tag-double-box {
  display: inline-flex;
  gap: 2mm;
}

.talent-slot--stack-center {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2mm;
}

.talent-slot--stack-stretch {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1.2mm;
}

.talent-slot--stack-stretch > div {
  display: flex;
  align-items: center;
  gap: 1.2mm;
  line-height: 1;
}

.talent-tag-elements {
  justify-content: center;
}

.slot-grid {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 1.2mm 1.8mm;
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
}

/* Phase 4 overrides: class-specific layouts that remain intentionally isolated */
.talent-inset {
  margin-top: 1.4mm;
  padding: 1.4mm 2.2mm;
  min-height: 11.5mm;
  border-radius: 2mm;
  background: var(--page-bg);
}

.talent-inset > p {
  font-size: 10pt;
  font-weight: 700;
  font-variant-caps: small-caps;
  letter-spacing: 0.08em;
}

.paladin-bottom {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 2.6mm;
  padding: 0 3.2mm 2mm;
}

.paladin-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.paladin-bottom-left .talent-row + .talent-row {
  border-top: 1px solid rgba(34, 34, 34, 0.22);
}

.tenets-panel {
  display: flex;
  flex-direction: column;
  border-radius: 3mm;
  background: var(--page-bg);
  overflow: hidden;
}

.tenets-header {
  padding: 1.2mm 2mm 0.8mm;
  font-size: 8.5pt;
  line-height: 1.2;
}

.tenets-header strong {
  font-variant-caps: small-caps;
}

.tenets-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tenets-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 1.8mm;
  padding: 1.2mm 1.8mm;
}

.tenets-row + .tenets-row {
  border-top: 1px solid rgba(34, 34, 34, 0.22);
}

.tenets-line {
  min-height: 9mm;
}

.sheet-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  font-family: Georgia, "Times New Roman", serif;
}

.sheet-nav-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  max-width: min(42vw, 260px);
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 34, 34, 0.45);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 11pt;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.sheet-nav-link--next {
  margin-left: auto;
  text-align: right;
}

.sheet-nav-link--lang {
  position: fixed;
  top: 12px;
  right: 12px;
  min-width: 44px;
  justify-content: center;
}

.sheet-nav-link:hover,
.sheet-nav-link:focus-visible {
  background: var(--bar-bg);
  color: var(--bar-fg);
}

@media print {
  .sheet-nav {
    display: none;
  }

  .sheet-workspace {
    display: block;
    padding: 0;
  }

  .sheet-page {
    border: 0;
    break-after: page;
    page-break-after: always;
  }

  .sheet-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}

@media (max-width: 460mm) {
  .sheet-workspace {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
