.ptx-tool {
    display: grid;
    gap: 1rem;
    color: #eae6e1;
}

.ptx-kicker {
    margin: 0;
    color: #b7935a;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ptx-entry-list {
    display: grid;
    gap: 0.65rem;
}

.ptx-entry-list a,
.ptx-featured-entry {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid rgba(234, 230, 225, 0.14);
    border-radius: 7px;
    color: #eae6e1;
    background: rgba(11, 9, 8, 0.78);
    text-decoration: none;
}

.ptx-featured-entry span {
    color: rgba(234, 230, 225, 0.68);
}

.ptx-workbench-page {
    min-height: 100vh;
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
    color: #efe8dc;
    background:
        radial-gradient(circle at 18% 8%, rgba(149, 201, 249, 0.12), transparent 30rem),
        radial-gradient(circle at 82% 18%, rgba(131, 41, 74, 0.24), transparent 28rem),
        linear-gradient(135deg, #050505 0%, #11070c 54%, #090808 100%);
}

.ptx-herb-finder {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.ptx-herb-finder__intro {
    display: grid;
    gap: 0.8rem;
    max-width: 760px;
    margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.ptx-herb-finder__intro h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 8vw, 5.8rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ptx-herb-finder__intro p {
    max-width: 620px;
    margin: 0;
    color: rgba(239, 232, 220, 0.78);
    font-size: 1.05rem;
    line-height: 1.7;
}

.ptx-filter-panel {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid rgba(183, 147, 90, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(243, 222, 178, 0.09), rgba(11, 9, 8, 0.72)),
        rgba(10, 8, 8, 0.9);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.ptx-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.ptx-filter-field {
    display: grid;
    gap: 0.4rem;
}

.ptx-filter-field--search {
    grid-column: 1 / -1;
}

.ptx-filter-field label {
    color: #d9ba73;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ptx-filter-field input,
.ptx-filter-field select {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(239, 232, 220, 0.18);
    border-radius: 6px;
    color: #efe8dc;
    background: rgba(0, 0, 0, 0.48);
}

.ptx-filter-field input:focus,
.ptx-filter-field select:focus {
    border-color: rgba(149, 201, 249, 0.8);
    outline: 2px solid rgba(149, 201, 249, 0.18);
    outline-offset: 2px;
}

.ptx-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.ptx-filter-actions .button,
.ptx-filter-actions button,
.ptx-filter-actions a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(217, 186, 115, 0.58);
    border-radius: 4px;
    color: #fff7e9;
    background: rgba(74, 82, 52, 0.9);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.ptx-filter-actions button {
    cursor: pointer;
}

.ptx-filter-actions a {
    color: rgba(239, 232, 220, 0.78);
    background: transparent;
}

.ptx-herb-results {
    margin-top: clamp(1.6rem, 4vw, 2.5rem);
}

.ptx-herb-results__meta {
    margin: 0;
    color: rgba(239, 232, 220, 0.62);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ptx-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(239, 232, 220, 0.12);
}

.ptx-herb-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.ptx-herb-card {
    display: grid;
    gap: 0.75rem;
    min-height: 220px;
    padding: 1.15rem;
    border: 1px solid rgba(239, 232, 220, 0.14);
    border-radius: 8px;
    color: #efe8dc;
    background:
        linear-gradient(145deg, rgba(232, 204, 149, 0.08), rgba(32, 18, 17, 0.85)),
        rgba(11, 9, 8, 0.86);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.ptx-herb-card:hover,
.ptx-herb-card:focus-visible {
    border-color: rgba(149, 201, 249, 0.6);
    transform: translateY(-2px);
}

.ptx-herb-card h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.ptx-herb-card__latin,
.ptx-herb-card__summary,
.ptx-herb-card__meta {
    margin: 0;
    color: rgba(239, 232, 220, 0.72);
    line-height: 1.55;
}

.ptx-herb-card__latin {
    font-style: italic;
}

.ptx-herb-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ptx-herb-card__chips span,
.ptx-herb-card__safety {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 0.28rem 0.48rem;
    border: 1px solid rgba(217, 186, 115, 0.3);
    border-radius: 999px;
    color: #e8cf8d;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ptx-herb-card__safety {
    border-color: rgba(149, 201, 249, 0.34);
    color: #bcdfff;
}

.ptx-empty-state {
    padding: 1rem;
    border: 1px solid rgba(239, 232, 220, 0.12);
    border-radius: 8px;
    color: rgba(239, 232, 220, 0.76);
    background: rgba(0, 0, 0, 0.28);
}

.ptx-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.ptx-pagination .page-numbers {
    display: inline-flex;
    min-width: 2.35rem;
    min-height: 2.35rem;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.72rem;
    border: 1px solid rgba(239, 232, 220, 0.16);
    border-radius: 4px;
    color: #efe8dc;
    background: rgba(0, 0, 0, 0.34);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.ptx-pagination .current {
    border-color: rgba(217, 186, 115, 0.7);
    color: #111;
    background: #d9ba73;
}

.pt-block-main--codex-entry {
    max-width: none;
    padding: 0;
    background:
        radial-gradient(circle at 14% 12%, rgba(149, 201, 249, 0.11), transparent 28rem),
        radial-gradient(circle at 86% 10%, rgba(112, 31, 62, 0.34), transparent 30rem),
        linear-gradient(135deg, #050505 0%, #10070c 58%, #050505 100%);
}

/* ===========================================================
   Arcane Codex block family — psycho-tatters/codex-sheet,
   codex-badge, codex-safety-box, codex-keywords. Freely composed
   in the editor; this file only supplies the visual system.
   Typography below targets .ptx-codex-sheet__content, the content
   area of the Codex Sheet block (assets/js/codex-sheet.js).
   =========================================================== */
.ptx-codex-sheet__content h1 {
    margin: 0;
    color: #1c1712;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 11vw, 8rem);
    font-weight: 700;
    line-height: 0.86;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ptx-parchment-latin {
    margin: -0.5rem 0 0;
    color: #5b4225;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-style: italic;
    text-align: center;
}

.ptx-codex-sheet__content h2 {
    margin: 0;
    color: #2b2118;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    letter-spacing: 0;
}

.ptx-codex-sheet__content h3 {
    margin: 0 0 0.35rem;
    color: #2b2118;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ptx-codex-sheet__content p {
    color: #2d231b;
    font-size: 1.05rem;
    line-height: 1.78;
}

.ptx-codex-sheet__content li + li {
    margin-top: 0.35rem;
}

.ptx-codex-sheet__content .wp-block-columns {
    gap: clamp(1.5rem, 4vw, 3rem);
}

.ptx-codex-sheet__content .wp-block-column + .wp-block-column {
    padding-left: clamp(1.5rem, 4vw, 3rem);
    border-left: 1px solid rgba(74, 48, 25, 0.24);
}

.ptx-codex-sheet__content .wp-block-quote,
.ptx-codex-sheet__content .wp-block-pullquote {
    margin: 0.5rem 0;
    padding: 0;
    border: none;
    color: #4a2f14;
    font-family: "Special Elite", Georgia, serif;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-style: italic;
    text-align: center;
}

.ptx-codex-sheet__content .wp-block-quote p {
    color: inherit;
    font-size: inherit;
}

.ptx-codex-sheet__content .wp-block-separator {
    border-top: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 48, 25, 0.5) 12%, rgba(74, 48, 25, 0.5) 88%, transparent);
    opacity: 1;
}

/* =========================================================
   Codex Cautionary Notes — psycho-tatters/codex-cautionary-notes
   ========================================================= */
.ptx-codex-cautionary-notes {
    position: relative;
    width: min(100%, var(--ptx-caution-width, 100%));
    margin-top: var(--ptx-caution-margin-top, -24px);
    margin-right: auto;
    margin-bottom: var(--ptx-caution-margin-bottom, 18px);
    margin-left: auto;
    transform: translate(var(--ptx-caution-x, 0px), var(--ptx-caution-y, 0px));
    box-sizing: border-box;
    background: transparent;
    color: var(--ptx-caution-body-color, #38271c);
}

.ptx-codex-cautionary-notes__heading-row {
    display: flex;
    align-items: center;
    gap: var(--ptx-caution-heading-rule-gap, 14px);
    width: 100%;
}

.ptx-codex-cautionary-notes__heading {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0;
    color: var(--ptx-caution-heading-color, #2f241e);
    font-family: var(--ptx-caution-heading-font, Georgia, 'Times New Roman', serif);
    font-size: var(--ptx-caution-heading-size, 22px);
    font-style: var(--ptx-caution-heading-style, normal);
    font-weight: var(--ptx-caution-heading-weight, 600);
    letter-spacing: var(--ptx-caution-heading-spacing, 1.6px);
    line-height: 1.1;
    text-transform: var(--ptx-caution-heading-transform, uppercase);
}

.ptx-codex-cautionary-notes__heading-rule,
.ptx-codex-cautionary-notes__line {
    display: block;
    height: var(--ptx-caution-rule-thickness, 1px);
    background: var(--ptx-caution-rule-color, #2f241e);
    opacity: var(--ptx-caution-rule-opacity, .65);
}

.ptx-codex-cautionary-notes__heading-rule {
    flex: 1 1 auto;
    min-width: 36px;
}

.ptx-codex-cautionary-notes__body {
    margin-top: var(--ptx-caution-body-gap, 12px);
    color: var(--ptx-caution-body-color, #38271c);
    font-family: var(--ptx-caution-body-font, Georgia, 'Times New Roman', serif);
    font-size: var(--ptx-caution-body-size, 16px);
    font-style: var(--ptx-caution-body-style, normal);
    font-weight: var(--ptx-caution-body-weight, 400);
    line-height: var(--ptx-caution-body-line-height, 1.55);
}

.ptx-codex-cautionary-notes__body p {
    margin: 0 0 .65em;
}

.ptx-codex-cautionary-notes__body p:last-child {
    margin-bottom: 0;
}

.ptx-codex-cautionary-notes__bottom-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    color: var(--ptx-caution-rule-color, #2f241e);
}

.ptx-codex-cautionary-notes__bottom-rule .ptx-codex-cautionary-notes__line {
    flex: 1 1 auto;
}

.ptx-codex-cautionary-notes__ornament {
    flex: 0 0 auto;
    color: currentColor;
    font-size: var(--ptx-caution-ornament-size, 8px);
    line-height: 1;
    opacity: var(--ptx-caution-rule-opacity, .65);
}

.ptx-codex-cautionary-notes[style*="text-align:center"] .ptx-codex-cautionary-notes__body,
.ptx-codex-cautionary-notes[style*="text-align:right"] .ptx-codex-cautionary-notes__body {
    text-align: inherit;
}

/* =========================================================
   Codex Entry Heading — psycho-tatters/codex-heading
   ========================================================= */
.ptx-codex-heading {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.ptx-codex-heading__title {
    margin: 0 !important;
    padding: 0;
}

.ptx-codex-heading__subtitle {
    display: block;
    margin-top: var(--ptx-heading-gap, 8px);
    padding: 0;
    line-height: 1.25;
}

.ptx-codex-color-control {
    margin-top: 20px;
}

.ptx-codex-color-control__label {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.editor-styles-wrapper .ptx-codex-heading__title,
.entry-content .ptx-codex-heading__title {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* =========================================================
   Codex Overview — psycho-tatters/codex-overview
   ========================================================= */
.ptx-codex-overview {
    --ptx-overview-badge-size: 190px;
    --ptx-overview-element-badge-size: 190px;
    --ptx-overview-energy-badge-size: 190px;
    --ptx-overview-season-badge-size: 190px;
    --ptx-overview-planet-badge-size: 190px;
    --ptx-overview-badge-gap: -18px;
    --ptx-overview-badge-offset-x: 0px;
    --ptx-overview-badge-frame-scale: 120%;
    --ptx-overview-element-frame-scale: 120%;
    --ptx-overview-energy-frame-scale: 120%;
    --ptx-overview-season-frame-scale: 120%;
    --ptx-overview-planet-frame-scale: 120%;
    --ptx-overview-frame-color: #000000;
    --ptx-overview-badge-content-offset-x: 0px;
    --ptx-overview-badge-label-y: 24%;
    --ptx-overview-badge-icon-y: 50%;
    --ptx-overview-badge-value-y: 75%;
    --ptx-overview-badge-label-scale: 9.2;
    --ptx-overview-badge-icon-scale: 28;
    --ptx-overview-badge-value-scale: 9.2;
    --ptx-overview-column-gap: 8px;
    --ptx-overview-image-min-height: 320px;
    --ptx-overview-image-offset-x: 0px;
    --ptx-overview-image-offset-y: 0px;
    --ptx-overview-image-width-scale: 100%;
    --ptx-overview-image-focal-x: 50%;
    --ptx-overview-image-focal-y: 50%;
    --ptx-overview-image-radius: 0px;
    --ptx-overview-image-aspect-ratio: 3 / 2;
    --ptx-overview-mask-scale: 100%;
    --ptx-overview-mask-x: 0%;
    --ptx-overview-mask-y: 0%;

    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: var(--ptx-overview-column-gap);
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
}

/*
 * The grid tracks are based on the largest badge in each row/column.
 * Each badge can therefore have its own container size without breaking
 * the 2x2 layout.
 */
.ptx-codex-overview__correspondences {
    display: grid;
    grid-template-columns:
        max(var(--ptx-overview-element-badge-size), var(--ptx-overview-season-badge-size))
        max(var(--ptx-overview-energy-badge-size), var(--ptx-overview-planet-badge-size));
    grid-template-rows:
        max(var(--ptx-overview-element-badge-size), var(--ptx-overview-energy-badge-size))
        max(var(--ptx-overview-season-badge-size), var(--ptx-overview-planet-badge-size));
    gap: 0;
    place-items: center;
    align-content: center;
    justify-content: start;
    width: max-content;
    min-width: 0;
    transform: translateX(var(--ptx-overview-badge-offset-x));
    overflow: visible;
}

.ptx-codex-overview__badge {
    --ptx-overview-current-badge-size: var(--ptx-overview-badge-size);
    --ptx-overview-current-frame-scale: var(--ptx-overview-badge-frame-scale);

    position: relative;
    display: block;
    width: var(--ptx-overview-current-badge-size);
    height: var(--ptx-overview-current-badge-size);
    color: #241a12;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    overflow: visible;
}

.ptx-codex-overview__badge--element {
    --ptx-overview-current-badge-size: var(--ptx-overview-element-badge-size);
    --ptx-overview-current-frame-scale: var(--ptx-overview-element-frame-scale);
    --ptx-current-label-offset-x: var(--ptx-overview-element-label-offset-x, 0px);
    --ptx-current-label-offset-y: var(--ptx-overview-element-label-offset-y, 0px);
    --ptx-current-icon-offset-x: var(--ptx-overview-element-icon-offset-x, 0px);
    --ptx-current-icon-offset-y: var(--ptx-overview-element-icon-offset-y, 0px);
    --ptx-current-value-offset-x: var(--ptx-overview-element-value-offset-x, 0px);
    --ptx-current-value-offset-y: var(--ptx-overview-element-value-offset-y, 0px);
}
.ptx-codex-overview__badge--energy {
    --ptx-overview-current-badge-size: var(--ptx-overview-energy-badge-size);
    --ptx-overview-current-frame-scale: var(--ptx-overview-energy-frame-scale);
    --ptx-current-label-offset-x: var(--ptx-overview-energy-label-offset-x, 0px);
    --ptx-current-label-offset-y: var(--ptx-overview-energy-label-offset-y, 0px);
    --ptx-current-icon-offset-x: var(--ptx-overview-energy-icon-offset-x, 0px);
    --ptx-current-icon-offset-y: var(--ptx-overview-energy-icon-offset-y, 0px);
    --ptx-current-value-offset-x: var(--ptx-overview-energy-value-offset-x, 0px);
    --ptx-current-value-offset-y: var(--ptx-overview-energy-value-offset-y, 0px);
    left: var(--ptx-overview-badge-gap);
}
.ptx-codex-overview__badge--season {
    --ptx-overview-current-badge-size: var(--ptx-overview-season-badge-size);
    --ptx-overview-current-frame-scale: var(--ptx-overview-season-frame-scale);
    --ptx-current-label-offset-x: var(--ptx-overview-season-label-offset-x, 0px);
    --ptx-current-label-offset-y: var(--ptx-overview-season-label-offset-y, 0px);
    --ptx-current-icon-offset-x: var(--ptx-overview-season-icon-offset-x, 0px);
    --ptx-current-icon-offset-y: var(--ptx-overview-season-icon-offset-y, 0px);
    --ptx-current-value-offset-x: var(--ptx-overview-season-value-offset-x, 0px);
    --ptx-current-value-offset-y: var(--ptx-overview-season-value-offset-y, 0px);
    top: var(--ptx-overview-badge-gap);
}
.ptx-codex-overview__badge--planet {
    --ptx-overview-current-badge-size: var(--ptx-overview-planet-badge-size);
    --ptx-overview-current-frame-scale: var(--ptx-overview-planet-frame-scale);
    --ptx-current-label-offset-x: var(--ptx-overview-planet-label-offset-x, 0px);
    --ptx-current-label-offset-y: var(--ptx-overview-planet-label-offset-y, 0px);
    --ptx-current-icon-offset-x: var(--ptx-overview-planet-icon-offset-x, 0px);
    --ptx-current-icon-offset-y: var(--ptx-overview-planet-icon-offset-y, 0px);
    --ptx-current-value-offset-x: var(--ptx-overview-planet-value-offset-x, 0px);
    --ptx-current-value-offset-y: var(--ptx-overview-planet-value-offset-y, 0px);
    left: var(--ptx-overview-badge-gap);
    top: var(--ptx-overview-badge-gap);
}

/*
 * Floral artwork is its own layer now. It can grow well outside the
 * badge container without being cropped by the invisible badge box.
 * The SVG is used strictly as an alpha mask, so the frame color is
 * controlled by CSS and defaults to true black.
 */
.ptx-codex-overview__badge-frame {
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    display: block;
    width: var(--ptx-overview-current-frame-scale);
    height: var(--ptx-overview-current-frame-scale);
    transform: translate(-50%, -50%);
    background-color: var(--ptx-overview-frame-color);
    pointer-events: none;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
}

.ptx-codex-overview__badge--frame-1 .ptx-codex-overview__badge-frame {
    -webkit-mask-image: url(../images/entry-badge-frame-1.svg);
    mask-image: url(../images/entry-badge-frame-1.svg);
}
.ptx-codex-overview__badge--frame-2 .ptx-codex-overview__badge-frame {
    -webkit-mask-image: url(../images/entry-badge-frame-2.svg);
    mask-image: url(../images/entry-badge-frame-2.svg);
}

.ptx-codex-overview__badge-inner {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    transform: translateX(var(--ptx-overview-badge-content-offset-x));
}
.ptx-codex-overview__badge-label,
.ptx-codex-overview__badge-icon,
.ptx-codex-overview__badge-value {
    position: absolute;
    transform: translate(-50%, -50%);
    text-align: center;
}
.ptx-codex-overview__badge-label {
    left: calc(50% + var(--ptx-current-label-offset-x, 0px));
    top: calc(var(--ptx-overview-badge-label-y) + var(--ptx-current-label-offset-y, 0px));
    width: 76%;
    color: #241a12;
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(var(--ptx-overview-current-badge-size) * var(--ptx-overview-badge-label-scale) / 100);
    font-weight: 700;
    line-height: 1.05;
}
.ptx-codex-overview__badge-icon {
    left: calc(50% + var(--ptx-current-icon-offset-x, 0px));
    top: calc(var(--ptx-overview-badge-icon-y) + var(--ptx-current-icon-offset-y, 0px));
    display: grid;
    place-items: center;
    width: calc(var(--ptx-overview-current-badge-size) * var(--ptx-overview-badge-icon-scale) / 100);
    height: calc(var(--ptx-overview-current-badge-size) * var(--ptx-overview-badge-icon-scale) / 100);
    color: #000;
    font-size: calc(var(--ptx-overview-current-badge-size) * var(--ptx-overview-badge-icon-scale) / 100);
    line-height: 1;
}
.ptx-codex-overview__badge-icon img,
.ptx-codex-overview__term-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ptx-codex-overview__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ptx-codex-overview__badge-value {
    left: calc(50% + var(--ptx-current-value-offset-x, 0px));
    top: calc(var(--ptx-overview-badge-value-y) + var(--ptx-current-value-offset-y, 0px));
    width: 82%;
    overflow-wrap: anywhere;
    color: #241a12;
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(var(--ptx-overview-current-badge-size) * var(--ptx-overview-badge-value-scale) / 100);
    font-weight: 700;
    line-height: 1.05;
}

.ptx-codex-overview a.ptx-codex-overview__badge {
    transition: transform 160ms ease, filter 160ms ease;
}
.ptx-codex-overview a.ptx-codex-overview__badge:hover,
.ptx-codex-overview a.ptx-codex-overview__badge:focus-visible {
    color: #241a12;
    transform: translateY(-2px);
    filter: contrast(1.05);
    text-decoration: none;
}

/*
 * The image slot owns the grid column. The image canvas inside it is
 * independently translated, so moving the image never changes or
 * stretches the grid column itself.
 */
.ptx-codex-overview__image-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: var(--ptx-overview-image-min-height);
    overflow: visible;
}
.ptx-codex-overview__image {
    position: relative;
    flex: 0 0 auto;
    width: var(--ptx-overview-image-width-scale);
    min-width: 0;
    min-height: var(--ptx-overview-image-min-height);
    aspect-ratio: var(--ptx-overview-image-aspect-ratio);
    transform: translate(var(--ptx-overview-image-offset-x), var(--ptx-overview-image-offset-y));
    transform-origin: center center;
    overflow: visible;
}
.ptx-codex-overview__image img,
.ptx-codex-overview__image-placeholder {
    border-radius: var(--ptx-overview-image-radius);
}
.ptx-codex-overview__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: var(--ptx-overview-image-min-height);
    object-fit: cover;
    object-position: var(--ptx-overview-image-focal-x) var(--ptx-overview-image-focal-y);
}
.ptx-codex-overview__image--masked img,
.ptx-codex-overview__image--masked .ptx-codex-overview__image-placeholder {
    -webkit-mask-image: url(../images/entry-image-mask.png);
    mask-image: url(../images/entry-image-mask.png);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: calc(50% + var(--ptx-overview-mask-x)) calc(50% + var(--ptx-overview-mask-y));
    mask-position: calc(50% + var(--ptx-overview-mask-x)) calc(50% + var(--ptx-overview-mask-y));
    -webkit-mask-size: var(--ptx-overview-mask-scale) var(--ptx-overview-mask-scale);
    mask-size: var(--ptx-overview-mask-scale) var(--ptx-overview-mask-scale);
}
.ptx-codex-overview__image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: var(--ptx-overview-image-min-height);
    padding: 1.5rem;
    border: 1px dashed rgba(74,48,25,.35);
    color: rgba(45,35,27,.72);
    background: rgba(255,248,221,.2);
    font-family: Georgia,"Times New Roman",serif;
    font-size: .9rem;
    font-style: italic;
    text-align: center;
    box-sizing: border-box;
}

/* Responsive scaling is handled by the Codex Sheet canvas. */

/* =========================================================
   Horizontal Floral Divider
   ========================================================= */

.ptx-horizontal-floral-divider {
    --ptx-floral-divider-width: 100%;
    --ptx-floral-divider-max-width: 900px;
    --ptx-floral-divider-height: 90px;
    --ptx-floral-divider-offset-x: 0px;
    --ptx-floral-divider-margin-top: 12px;
    --ptx-floral-divider-margin-bottom: 12px;
    --ptx-floral-divider-color: #2f241e;
    --ptx-floral-divider-opacity: 1;

    display: flex;
    align-items: center;
    width: 100%;
    margin-top: var(--ptx-floral-divider-margin-top);
    margin-bottom: var(--ptx-floral-divider-margin-bottom);
    box-sizing: border-box;
    overflow: visible;
}

.ptx-horizontal-floral-divider--left {
    justify-content: flex-start;
}

.ptx-horizontal-floral-divider--center {
    justify-content: center;
}

.ptx-horizontal-floral-divider--right {
    justify-content: flex-end;
}

.ptx-horizontal-floral-divider__art {
    display: block;
    width: min(var(--ptx-floral-divider-width), var(--ptx-floral-divider-max-width));
    max-width: 100%;
    height: var(--ptx-floral-divider-height);
    flex: 0 0 auto;
    transform: translateX(var(--ptx-floral-divider-offset-x));
    background: var(--ptx-floral-divider-color);
    opacity: var(--ptx-floral-divider-opacity);

    -webkit-mask-image: url(../images/horizontal-floral-divider.svg);
    mask-image: url(../images/horizontal-floral-divider.svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;

    pointer-events: none;
}

/* Responsive scaling is handled by the Codex Sheet canvas. */

/* =========================================================
   Codex Split Content
   ========================================================= */
.ptx-codex-split-content{
    display:grid;
    grid-template-columns:minmax(0,1fr) var(--ptx-split-divider-width,34px) minmax(0,1fr);
    column-gap:var(--ptx-split-column-gap,20px);
    align-items:start;
    width:100%;
    margin-top:var(--ptx-split-margin-top,0);
    margin-bottom:var(--ptx-split-margin-bottom,0);
    box-sizing:border-box;
}
.ptx-codex-split-content__column{min-width:0;box-sizing:border-box}
.ptx-codex-split-content__column--left{transform:translate(var(--ptx-split-left-x,0),var(--ptx-split-left-y,0))}
.ptx-codex-split-content__column--right{transform:translate(var(--ptx-split-right-x,0),var(--ptx-split-right-y,0))}
.ptx-codex-split-content__title{
    margin:0!important;
    padding:0;
    font-family:var(--ptx-split-title-font,Georgia,'Times New Roman',serif);
    font-size:var(--ptx-split-title-size,30px);
    font-weight:var(--ptx-split-title-weight,500);
    font-style:var(--ptx-split-title-style,normal);
    text-transform:var(--ptx-split-title-transform,uppercase);
    letter-spacing:var(--ptx-split-title-spacing,1.5px);
    line-height:1.1;
    color:var(--ptx-split-title-color,#2f241e);
}
.ptx-codex-split-content__title-line{
    display:block;
    width:var(--ptx-split-line-width,72px);
    height:var(--ptx-split-line-thickness,1px);
    margin-top:var(--ptx-split-line-gap,8px);
    background:var(--ptx-split-line-color,#2f241e);
}
.ptx-codex-split-content__body{
    margin-top:var(--ptx-split-section-gap,24px);
    font-family:var(--ptx-split-body-font,Georgia,'Times New Roman',serif);
    font-size:var(--ptx-split-body-size,16px);
    line-height:var(--ptx-split-body-line-height,1.55);
    color:var(--ptx-split-body-color,#2f241e);
}
.ptx-codex-split-content__body>p:first-child{margin-top:0}
.ptx-codex-split-content__body>p:last-child{margin-bottom:0}
.ptx-codex-split-content__divider{
    align-self:start;
    justify-self:center;
    width:var(--ptx-split-divider-width,34px);
    height:var(--ptx-split-divider-height,470px);
    transform:translate(var(--ptx-split-divider-x,0),var(--ptx-split-divider-y,0));
    background:var(--ptx-split-divider-color,#17100c);
    opacity:var(--ptx-split-divider-opacity,1);
    -webkit-mask-image:url('../images/vertical-gothic-divider.svg');
    mask-image:url('../images/vertical-gothic-divider.svg');
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
    -webkit-mask-position:center center;
    mask-position:center center;
    -webkit-mask-size:100% 100%;
    mask-size:100% 100%;
}
.ptx-codex-split-content__right-body{min-width:0}
.ptx-codex-split-content__illustration{
    float:left;
    display:block;
    width:var(--ptx-split-illustration-width,118px);
    max-width:46%;
    aspect-ratio:218.88/231;
    margin-top:calc(var(--ptx-split-section-gap,24px) + var(--ptx-split-illustration-y,0));
    margin-right:var(--ptx-split-illustration-gap,18px);
    margin-left:var(--ptx-split-illustration-x,0);
    margin-bottom:10px;
    background:var(--ptx-split-illustration-color,#17100c);
    opacity:var(--ptx-split-illustration-opacity,1);
    -webkit-mask-image:url('../images/Pestle_Mortal_pt.svg');
    mask-image:url('../images/Pestle_Mortal_pt.svg');
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
    -webkit-mask-position:center;
    mask-position:center;
    -webkit-mask-size:contain;
    mask-size:contain;
    box-sizing:border-box;
}
.ptx-codex-split-content__right-body .ptx-codex-split-content__body{display:block}
.ptx-codex-split-content__right-body::after{content:'';display:block;clear:both}

/* =========================================================
   Codex Keywords — framed keyword row only.
   Decorative herb/mushroom artwork now lives on the parchment.
   ========================================================= */
.ptx-codex-keywords{
    --ptx-keywords-width:100%;
    --ptx-keywords-max-width:980px;
    --ptx-keywords-min-height:150px;
    position:relative;
    isolation:isolate;
    display:block;
    width:min(var(--ptx-keywords-width),var(--ptx-keywords-max-width));
    height:var(--ptx-keywords-min-height);
    min-height:0;
    margin:var(--ptx-keywords-margin-top,0) auto var(--ptx-keywords-margin-bottom,0);
    transform:translate(var(--ptx-keywords-x,0),var(--ptx-keywords-y,0));
    box-sizing:border-box;
    overflow:visible;
}
.ptx-codex-keywords__frame{
    position:absolute;
    inset:0;
    z-index:0;
    width:100%;
    height:100%;
    transform:translate(var(--ptx-keywords-frame-x,0),var(--ptx-keywords-frame-y,0)) scale(var(--ptx-keywords-frame-scale,1));
    transform-origin:center;
    background:var(--ptx-keywords-frame-color,#2f241e);
    opacity:var(--ptx-keywords-frame-opacity,1);
    -webkit-mask-image:url('../images/keyword-frame-box.svg');
    mask-image:url('../images/keyword-frame-box.svg');
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
    -webkit-mask-position:center;
    mask-position:center;
    -webkit-mask-size:100% 100%;
    mask-size:100% 100%;
    pointer-events:none;
}
.ptx-codex-keywords__center{
    position:absolute;
    z-index:2;
    left:50%;
    top:50%;
    width:min(100%,var(--ptx-keywords-center-width,82%));
    transform:translate(
        calc(-50% + var(--ptx-keywords-center-x,0)),
        calc(-50% + var(--ptx-keywords-center-y,0))
    );
    text-align:left;
}
.ptx-codex-keywords__row{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:0;
    width:100%;
    transform:translateY(var(--ptx-keywords-row-y,0));
}
.ptx-codex-keywords__label{
    color:var(--ptx-keywords-label-color,#2f241e);
    font-family:var(--ptx-keywords-label-font,'Segoe Script','Brush Script MT',cursive);
    font-size:var(--ptx-keywords-label-size,28px);
    font-weight:var(--ptx-keywords-label-weight,400);
    font-style:var(--ptx-keywords-label-style,normal);
    line-height:1;
    white-space:nowrap;
    flex:0 0 auto;
    transform:translate(var(--ptx-keywords-label-x,0),var(--ptx-keywords-label-y,0));
}
.ptx-codex-keywords__list{
    display:flex;
    flex:1 1 auto;
    min-width:0;
    flex-wrap:wrap;
    justify-content:flex-start;
    align-items:center;
    gap:.35em .75em;
    color:var(--ptx-keywords-color,#2f241e);
    font-family:var(--ptx-keywords-font,Georgia,'Times New Roman',serif);
    font-size:var(--ptx-keywords-size,15px);
    font-weight:var(--ptx-keywords-weight,700);
    letter-spacing:var(--ptx-keywords-spacing,1.2px);
    line-height:1.35;
    text-transform:var(--ptx-keywords-transform,uppercase);
    margin-left:var(--ptx-keywords-content-gap,10px);
    transform:translate(var(--ptx-keywords-list-x,0),var(--ptx-keywords-list-y,0));
}
.ptx-codex-keywords__separator{opacity:.9;font-size:.72em;line-height:1}
.ptx-codex-keywords__keyword{white-space:nowrap}

.ptx-codex-split-content__body--placeholder {
    opacity: .58;
    font-style: italic;
}
