/*
 * Hy-Brasil styles, in the visual language of Dragonbane Expeditions: white paper, a black frame,
 * EB Garamond for text and UnifrakturCook for the journal title. Flat and high-contrast.
 *
 * Two scopes:
 *   .hy-brasil-journal   the journal sheet window (scripts/hy-brasil.mjs). Restyles the frame,
 *                        sidebar and header, and undoes the Dragonbane system's parchment art.
 *   .hy-brasil           the wrapper every page puts its content in. The classes below work in
 *                        any sheet, so a page still reads well if someone picks another sheet.
 *
 * Page classes:
 *   .hb-readaloud     read-aloud box: what the characters see and hear on arrival
 *   .hb-lede          opening paragraph, set slightly larger
 *   .hb-figure        an image with an optional <figcaption>
 *   .hb-wide          full-width figure (fleet, settlement)
 *   .hb-row           centered row of figures that wraps on narrow windows
 *   .hb-heraldry      square banners inside a row
 *   .hb-portrait      tall portraits inside a row
 *   .hb-emblem        small emblem floated left of a section's text
 *   .hb-justified     on the .hy-brasil wrapper: justified, hyphenated paragraphs
 *   .hb-card          a framed block: one ship, one person, one company
 *   .hb-side          a figure floated to the right inside a card
 *   .hb-meta          small caps line under a card heading (role, ship, rules link)
 *   .hb-tbd           visible placeholder for something not decided yet
 *   .hb-statblock     old-book stat block: black title bar, then a <dl> of labelled lines
 *   .hb-ledger        ruled table with a black header row (supplies, manifests)
 *   .hb-orders        numbered list set like articles of a charter
 *   .hb-professions   the list of professions on The Company
 *   .hb-profession    one profession: <h3> name, .hb-profession-body (text and .hb-traits beside
 *                     the illustration), then table.hb-paths
 *   .hb-traits        <dl> of what every member has (magic, skills, heroic ability)
 *   .hb-paths         "Choose one path" table: path, skills, heroic ability
 *   .hb-profile       portrait beside a person's role and purpose in play
 *   .hb-profile-tall  taller illustration, shown in full without cropping
 *   .hb-voice         a named person's spoken words: bold name, then the quotation, under a thin rule
 *   .hb-quip          a person's characteristic line, set apart under their profile
 */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 800;
  src: url("../assets/fonts/eb-garamond-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 800;
  src: url("../assets/fonts/eb-garamond-latin-wght-italic.woff2") format("woff2-variations");
}

@font-face {
  font-family: "UnifrakturCook";
  font-style: normal;
  font-weight: 700;
  src: url("../assets/fonts/unifrakturcook-latin-700-normal.woff2") format("woff2");
}

.hy-brasil-journal,
.hy-brasil {
  --hb-font-body: "EB Garamond", Georgia, serif;
  --hb-font-gothic: "UnifrakturCook", Georgia, serif;
  --hb-paper: #ffffff;
  --hb-frame: #1a1a1a;
  --hb-ink: #262626;
  --hb-ink-muted: #5c5c5c;
  --hb-track: #a6a6a6;
}

/* ---------------------------------------------------------------------------------------------
 * The game backdrop: replaces the Dragonbane system's cover art behind the canvas, seen while
 * a scene loads or when none is viewed.
 * ------------------------------------------------------------------------------------------- */

body.system-dragonbane {
  background: #000 url("../assets/branding/cover.webp") center / cover no-repeat fixed;
}

/* The Adventure importer always draws an "Overview" heading. Hide it when the Adventure has no
 * description, so Hy-Brasil's shows only its title, cover and contents. */
.adventure-importer .adventure-overview:not(:has(> :not(h2))) {
  display: none;
}

/* ---------------------------------------------------------------------------------------------
 * The journal sheet
 * ------------------------------------------------------------------------------------------- */

.hy-brasil-journal {
  /* The Dragonbane system styles journals through these. */
  --dod-font-primary: var(--hb-font-body);
  --dod-font-secondary: var(--hb-font-body);
  --dod-font-heading: var(--hb-font-body);
  --dod-color-journal-text: var(--hb-ink);
  --dod-color-text-dark-title: var(--hb-ink);
  --dod-color-parchment-text: var(--hb-ink);
  --color-text-dark-header: var(--hb-ink);
  --color-underline-header: var(--hb-frame);
  background: var(--hb-paper);
  color: var(--hb-ink);
}

.hy-brasil-journal,
.hy-brasil-journal * {
  text-shadow: none;
}

/* Window frame */

/* The title bar is inverted: black with white letters, unlike Expeditions. */
.hy-brasil-journal .window-header {
  background: var(--hb-frame);
  border-bottom: 3px solid var(--hb-frame);
  color: var(--hb-paper);
}

.hy-brasil-journal .window-header .window-title {
  color: var(--hb-paper);
  font-family: var(--hb-font-body);
  font-weight: 700;
}

.hy-brasil-journal .window-header .header-control,
.hy-brasil-journal .window-header button {
  background: transparent;
  color: #c8c8c8;
}

.hy-brasil-journal .window-header .header-control:hover,
.hy-brasil-journal .window-header button:hover {
  color: var(--hb-paper);
}

.hy-brasil-journal .window-content {
  background: var(--hb-paper);
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .window-resize-handle {
  color: var(--hb-ink-muted);
}

.hy-brasil-journal .scrollable {
  scrollbar-color: var(--hb-frame) var(--hb-track);
}

/* Sidebar: search, table of contents, page buttons */

.hy-brasil-journal .journal-sidebar {
  background: var(--hb-paper);
  border-right: 3px solid var(--hb-frame);
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .journal-sidebar search input,
.hy-brasil-journal .journal-sidebar button {
  background: var(--hb-paper);
  border: 1px solid var(--hb-frame);
  border-radius: 0;
  box-shadow: none;
  color: var(--hb-ink);
}

/* Icon buttons keep Font Awesome; only text gets the body face. */
.hy-brasil-journal .journal-sidebar search input,
.hy-brasil-journal .journal-sidebar button:not(.icon) {
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .journal-sidebar .inline-control {
  background: transparent;
  border: 0;
}

.hy-brasil-journal .journal-sidebar button:hover {
  background: var(--hb-frame);
  color: var(--hb-paper);
}

.hy-brasil-journal .journal-sidebar .toc {
  scrollbar-color: var(--hb-frame) var(--hb-track);
}

.hy-brasil-journal .journal-sidebar .toc li {
  border-radius: 0;
  color: var(--hb-ink);
}

.hy-brasil-journal .journal-sidebar .toc li.page {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgb(26 26 26 / 20%);
}

.hy-brasil-journal .journal-sidebar .toc .heading-link {
  color: var(--hb-ink-muted);
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .journal-sidebar .toc .heading-link:hover {
  color: var(--hb-ink);
}

.hy-brasil-journal .journal-sidebar .toc .page-heading {
  font-family: var(--hb-font-body);
  font-weight: 600;
}

.hy-brasil-journal .journal-sidebar .toc .page-title {
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .journal-sidebar .toc li.active > .page-heading {
  background: var(--hb-frame);
  color: var(--hb-paper);
}

.hy-brasil-journal .journal-sidebar .toc li:not(.active) > .page-heading:hover {
  background: rgb(26 26 26 / 10%);
}

/* Category labels (history, the expedition): quiet grey small caps, not bars. */
.hy-brasil-journal .journal-sidebar .toc li.category {
  background: transparent;
  border: 0;
  color: var(--hb-ink-muted);
  justify-content: flex-start;
  margin-top: 0.75rem;
  padding: 0.2rem 0.75rem;
}

.hy-brasil-journal .journal-sidebar .toc li.category strong {
  font-family: var(--hb-font-body);
  font-size: 0.8rem;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: lowercase;
}

/* One line per page: section headings stay in the page, not in the list. */
.hy-brasil-journal .journal-sidebar .toc .headings {
  display: none;
}

/* Content: the framed page */

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content {
  background: var(--hb-paper);
  box-shadow: inset 0 0 0 4px var(--hb-frame);
  color: var(--hb-ink);
  padding: 0.4rem;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-header {
  background: none;
  border: 0;
  border-bottom: 3px solid var(--hb-frame);
  margin: 0.6rem 1rem 0;
  padding: 0.4rem 0 0.5rem;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-header .title {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--hb-ink);
  font-family: var(--hb-font-gothic);
  font-size: 2.6em;
  font-weight: 700;
  height: auto;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-header .title:is(:hover, :focus) {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: 0;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-entry-pages {
  margin: 0;
  padding: 0 0.6rem 1rem;
  top: 0;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-entry-pages .journal-entry-page {
  border-left: 0;
  border-right: 0;
  padding: 0 0.4rem;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-entry-pages .journal-entry-page:first-child {
  margin-top: 0.6rem;
}

.hy-brasil-journal.journal-sheet.journal-entry .journal-entry-content .journal-entry-page:not(.image):last-child {
  background: none;
  padding-bottom: 1rem;
}

/* Page text */

.hy-brasil-journal .journal-entry-page {
  font-family: var(--hb-font-body);
  font-size: 1.1em;
  color: var(--hb-ink);
}

.hy-brasil-journal .journal-entry-page h1,
.hy-brasil-journal .journal-entry-page h2,
.hy-brasil-journal .journal-entry-page h3,
.hy-brasil-journal .journal-entry-page h4,
.hy-brasil-journal .journal-entry-page h5,
.hy-brasil-journal .journal-entry-page h6 {
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
  font-weight: 700;
  text-transform: none;
}

.hy-brasil-journal .journal-entry-page .journal-page-header h1 {
  border-bottom: 1px solid var(--hb-frame);
  font-size: 1.9em;
  margin: 1rem 0 0.75rem;
  padding-bottom: 0.2rem;
}

.hy-brasil-journal .journal-entry-page h2 {
  border-bottom: 1px solid var(--hb-frame);
  font-size: 1.45em;
  margin: 1.4rem 0 0.6rem;
}

.hy-brasil-journal .journal-entry-page h3 {
  border-bottom: 0;
  font-size: 1.15em;
}

.hy-brasil-journal .journal-entry-page strong,
.hy-brasil-journal .journal-entry-page b,
.hy-brasil-journal .journal-entry-page th,
.hy-brasil-journal .journal-entry-page td {
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
}

.hy-brasil-journal .journal-entry-page hr {
  background: var(--hb-frame);
  border: 0;
  clear: both;
  height: 3px;
  margin: 1.25rem 0;
}

.hy-brasil-journal .journal-entry-page ul:not(ul ul) > li::marker {
  color: var(--hb-ink);
}

.hy-brasil-journal .journal-entry-page blockquote {
  border-left: 3px solid var(--hb-frame);
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
  font-style: italic;
  margin: 1rem 0;
  padding: 0.2rem 0 0.2rem 0.9rem;
}

.hy-brasil-journal .journal-entry-page table {
  background: var(--hb-paper);
  border: 1px solid var(--hb-frame);
}

.hy-brasil-journal .journal-entry-page table tr {
  border-bottom: 1px solid var(--hb-frame);
  background: transparent;
}

.hy-brasil-journal .journal-entry-page table tr:first-child {
  border-bottom-width: 2px;
}

.hy-brasil-journal .journal-entry-page .content-link,
.hy-brasil-journal .journal-entry-page .inline-roll {
  background: var(--hb-paper);
  border: 1px solid var(--hb-frame);
  border-radius: 0;
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
  font-weight: 600;
}

.hy-brasil-journal .journal-entry-page .content-link i {
  color: var(--hb-ink-muted);
}

.hy-brasil-journal .journal-entry-page .edit-container button {
  background: var(--hb-paper);
  border: 1px solid var(--hb-frame);
  border-radius: 0;
  color: var(--hb-ink);
}

/* ---------------------------------------------------------------------------------------------
 * Page content classes
 * ------------------------------------------------------------------------------------------- */

.hy-brasil {
  color: var(--hb-ink);
  font-family: var(--hb-font-body);
  line-height: 1.45;
  overflow-wrap: break-word;
}

.hy-brasil p {
  margin: 0.6em 0 0.9em;
}

.hy-brasil .hb-readaloud {
  border-left: 3px solid var(--hb-frame);
  color: var(--hb-ink);
  font-style: italic;
  margin: 0.75em 0 1em;
  padding: 0.3em 0 0.3em 0.9em;
}

.hy-brasil .hb-readaloud p {
  margin: 0;
}

.hy-brasil .hb-voice {
  border-left: 1px solid var(--hb-track);
  margin: 0.6em 0 0.9em;
  padding-left: 0.9em;
}

.hy-brasil .hb-quip {
  color: var(--hb-ink-muted);
  margin-top: 0.4em;
}

.hy-brasil .hb-lede {
  font-size: 1.15em;
  line-height: 1.4;
  margin: 0.8em 0 1em;
}

.hy-brasil .hb-figure {
  margin: 1.25em auto;
  max-width: 100%;
  text-align: center;
  /* Foundry sets figure { width: 100% }; size to the image instead, so side figures float. */
  width: fit-content;
}

.hy-brasil .hb-figure img {
  border: none;
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.hy-brasil .hb-figure figcaption {
  color: var(--hb-ink-muted);
  font-size: 0.9em;
  font-style: italic;
  margin-top: 0.35em;
}

.hy-brasil .hb-figure figcaption strong {
  color: var(--hb-ink);
  display: block;
  font-style: normal;
  font-variant: small-caps;
  letter-spacing: 0.03em;
}

.hy-brasil .hb-wide,
.hy-brasil .hb-wide img {
  width: 100%;
}

.hy-brasil .hb-row {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 1em 0;
}

.hy-brasil .hb-row .hb-figure {
  flex: 0 1 auto;
  margin: 0;
}

.hy-brasil .hb-heraldry img {
  height: 120px;
  object-fit: contain;
  width: 120px;
}

.hy-brasil .hb-emblem {
  float: left;
  margin: 0.15em 1em 0.4em 0;
}

.hy-brasil .hb-emblem img {
  height: 96px;
  object-fit: contain;
  width: 96px;
}

.hy-brasil h2,
.hy-brasil::after {
  clear: both;
}

.hy-brasil::after {
  content: "";
  display: block;
}

.hy-brasil.hb-justified p:not(.hb-meta) {
  hyphens: auto;
  text-align: justify;
}

.hy-brasil .hb-portrait img {
  width: 200px;
}

.hy-brasil .hb-card {
  background: var(--hb-paper);
  border: 1px solid var(--hb-frame);
  border-top: 3px solid var(--hb-frame);
  margin: 1em 0;
  padding: 0.6em 0.9em;
}

.hy-brasil .hb-card > h3:first-of-type,
.hy-brasil .hb-card > h4:first-of-type {
  border-bottom: 1px solid var(--hb-frame);
  margin-top: 0.1em;
  padding-bottom: 0.2em;
}

.hy-brasil .hb-card::after {
  clear: both;
  content: "";
  display: block;
}

.hy-brasil .hb-card .hb-figure.hb-side {
  float: right;
  margin: 0 0 0.5em 1em;
}

.hy-brasil .hb-card .hb-side img {
  width: 150px;
}

.hy-brasil .hb-meta {
  color: var(--hb-ink-muted);
  font-variant: small-caps;
  letter-spacing: 0.03em;
  margin-top: -0.3em;
}

/* Illustrated entries: keep the complete drawing and let the text establish its role. */

.hy-brasil .hb-professions {
  margin: 1.5em 0;
}

/* One profession sheet: a header line, text beside the illustration, then the path table. */
.hy-brasil .hb-profession {
  margin: 0 0 2.5em;
}

.hy-brasil .hb-profession > h3 {
  border: 0;
  border-bottom: 3px double var(--hb-frame);
  font-size: 1.6em;
  line-height: 1.15;
  margin: 0 0 0.75em;
  padding: 0 0 0.2em;
}

.hy-brasil .hb-profession-body {
  align-items: start;
  display: grid;
  gap: 0 1.5em;
  grid-template-columns: minmax(0, 1fr) minmax(8em, 22%);
}

.hy-brasil .hb-profession-body > .hb-figure {
  margin: 0;
  width: 100%;
}

.hy-brasil .hb-profession-body > .hb-figure img {
  max-height: 200px;
  object-fit: contain;
  width: 100%;
}

.hy-brasil .hb-profession-body p:first-child {
  margin-top: 0;
}

/* What every member of the profession has, under the description. */
.hy-brasil .hb-traits {
  align-items: baseline;
  border-top: 1px solid rgb(26 26 26 / 25%);
  display: grid;
  gap: 0.2em 0.9em;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0.8em 0 0;
  padding-top: 0.6em;
}

.hy-brasil .hb-traits dt {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hy-brasil .hb-traits dd {
  margin: 0;
}

/* The path table: what every member of the profession has, then the paths to choose from. */
.hy-brasil table.hb-paths {
  background: var(--hb-paper);
  border: 2px solid var(--hb-frame);
  border-collapse: collapse;
  margin: 0.9em 0 0;
  width: 100%;
}

.hy-brasil table.hb-paths caption {
  background: none;
  color: var(--hb-ink);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 0 0.3em;
  text-align: left;
}

.hy-brasil table.hb-paths thead tr {
  background: var(--hb-frame);
  border: 0;
}

.hy-brasil table.hb-paths thead th {
  background: var(--hb-frame);
  color: var(--hb-paper);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3em 0.7em;
  text-align: left;
  white-space: nowrap;
}

.hy-brasil table.hb-paths tbody th,
.hy-brasil table.hb-paths tbody td {
  border: 0;
  border-bottom: 1px solid rgb(26 26 26 / 25%);
  color: var(--hb-ink);
  padding: 0.45em 0.7em;
  text-align: left;
  vertical-align: top;
}

.hy-brasil table.hb-paths tbody th {
  font-weight: 700;
  width: 22%;
}

.hy-brasil table.hb-paths td:last-child {
  white-space: nowrap;
  width: 1%;
}



.hy-brasil table.hb-paths tr:last-child th,
.hy-brasil table.hb-paths tr:last-child td {
  border-bottom: 0;
}

/* Foundry's editor wraps cell and list contents in <p> when a page is edited in the world; keep
 * them flush so an edited page looks the same. */
.hy-brasil table.hb-paths caption p,
.hy-brasil table.hb-paths th p,
.hy-brasil table.hb-paths td p,
.hy-brasil .hb-traits dt p,
.hy-brasil .hb-traits dd p {
  margin: 0;
  text-align: inherit;
}

/* Rules links in the table read as text, not as buttons. */
.hy-brasil-journal .journal-entry-page table.hb-paths .content-link,
.hy-brasil-journal .journal-entry-page .hb-traits .content-link {
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline dotted rgb(26 26 26 / 45%);
  text-underline-offset: 0.2em;
}

.hy-brasil-journal .journal-entry-page table.hb-paths .content-link i,
.hy-brasil-journal .journal-entry-page .hb-traits .content-link i {
  font-size: 0.8em;
  margin-right: 0.15em;
}

.hy-brasil .hb-profile {
  align-items: center;
  border-top: 1px solid rgb(26 26 26 / 25%);
  display: grid;
  gap: 1em 1.5em;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  margin: 1.25em 0;
  padding-top: 1.25em;
}

.hy-brasil .hb-profile > .hb-figure {
  margin: 0;
  width: 100%;
}

.hy-brasil .hb-profile .hb-figure img {
  max-height: 210px;
  object-fit: contain;
  width: 100%;
}

.hy-brasil .hb-profile-tall .hb-figure img {
  max-height: 280px;
}

.hy-brasil .hb-profile-text {
  min-width: 0;
}

.hy-brasil .hb-profile-text h3 {
  font-size: 1.3em;
  line-height: 1.2;
  margin: 0 0 0.35em;
}

.hy-brasil .hb-profile-text .hb-meta {
  font-size: 0.9em;
  margin: 0 0 0.65em;
}

.hy-brasil .hb-profile-text p:last-child {
  margin-bottom: 0;
}

.hy-brasil .hb-tbd {
  border: 1px dashed var(--hb-ink-muted);
  color: var(--hb-ink-muted);
  font-style: italic;
  padding: 0 0.25em;
}

/* Old-book blocks: stat blocks, ledgers, orders */

.hy-brasil .hb-statblock {
  background: var(--hb-paper);
  border: 2px solid var(--hb-frame);
  margin: 1em 0;
}

.hy-brasil .hb-statblock::after {
  clear: both;
  content: "";
  display: block;
}

.hy-brasil .hb-statblock > h3 {
  background: var(--hb-frame);
  border: 0;
  color: var(--hb-paper);
  font-variant: small-caps;
  letter-spacing: 0.06em;
  margin: 0;
  padding: 0.25em 0.6em;
}

.hy-brasil .hb-statblock > h3 .hb-tbd {
  border-color: var(--hb-paper);
  color: var(--hb-paper);
}

.hy-brasil .hb-statblock > .hb-meta {
  border-bottom: 1px solid var(--hb-frame);
  font-style: italic;
  margin: 0;
  padding: 0.3em 0.75em;
}

.hy-brasil .hb-statblock > dl {
  display: grid;
  gap: 0;
  grid-template-columns: max-content 1fr;
  margin: 0;
  padding: 0.3em 0.75em 0.5em;
}

.hy-brasil .hb-statblock dt,
.hy-brasil .hb-statblock dd {
  border-bottom: 1px dotted var(--hb-ink-muted);
  margin: 0;
  padding: 0.2em 0;
}

.hy-brasil .hb-statblock dt {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding-right: 1em;
}

.hy-brasil .hb-statblock > p:not(.hb-meta) {
  margin: 0.4em 0.75em 0.6em;
}

.hy-brasil .hb-statblock .hb-figure.hb-side {
  float: right;
  margin: 0.6em 0.75em 0.5em 1em;
}

.hy-brasil .hb-statblock .hb-side img {
  width: 140px;
}

.hy-brasil table.hb-ledger {
  background: var(--hb-paper);
  border: 2px solid var(--hb-frame);
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}

.hy-brasil table.hb-ledger caption {
  background: none;
  color: var(--hb-ink);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 0 0.3em;
  text-align: left;
}

.hy-brasil table.hb-ledger thead tr {
  background: var(--hb-frame);
  border: 0;
}

.hy-brasil table.hb-ledger th {
  background: var(--hb-frame);
  color: var(--hb-paper);
  font-variant: small-caps;
  letter-spacing: 0.05em;
  padding: 0.3em 0.6em;
  text-align: left;
}

.hy-brasil table.hb-ledger td {
  border-bottom: 1px solid var(--hb-frame);
  color: var(--hb-ink);
  padding: 0.3em 0.6em;
}

.hy-brasil table.hb-ledger tbody tr:nth-child(2n) {
  background: rgb(26 26 26 / 5%);
}

.hy-brasil ol.hb-orders {
  counter-reset: hb-orders;
  list-style: none;
  margin: 0.75em 0;
  padding: 0;
}

.hy-brasil ol.hb-orders > li {
  border-bottom: 1px dotted var(--hb-ink-muted);
  counter-increment: hb-orders;
  padding: 0.3em 0 0.3em 2.4em;
  position: relative;
}

.hy-brasil ol.hb-orders > li::before {
  content: counter(hb-orders, upper-roman) ".";
  font-variant: small-caps;
  font-weight: 700;
  left: 0;
  position: absolute;
}

.hy-brasil ol.hb-orders > li::marker {
  content: none;
}
