/* ── Class top nav ───────────────────────────────────────── */
.class-top-nav {
    background: #141414;
    border-bottom: 1px solid #333;
    margin: 0 -20px 20px;
    padding: 0 16px;
}
.class-top-nav-row {
    display: grid;
    width: max-content;
    grid-template-columns: 7.5rem repeat(5, 9.5rem);
    align-items: start;
    border-top: 1px solid #1e1e1e;
    padding: 4px 0;
}
.class-top-nav-row:first-child { border-top: none; }
.subnav-group-label {
    font-size: 0.82rem;
    color: #555;
    padding: 3px 8px 0 0;
    white-space: nowrap;
}
.class-nav-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}
.class-nav-group > a {
    font-size: 0.82rem;
    padding: 2px 7px;
    color: #777;
    text-decoration: none;
    border-radius: 3px;
}
.class-nav-group > a:hover { color: #bbb; background: #1e1e1e; }
.class-nav-group > a.active { color: #c8a84b; background: #261f00; }
.class-nav-variants {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.class-nav-variants a {
    font-size: 0.78rem;
    padding: 1px 7px;
    color: #595959;
    text-decoration: none;
    border-radius: 3px;
}
.class-nav-variants a:hover { color: #999; background: #1e1e1e; }
.class-nav-variants a.active { color: #c8a84b; background: #261f00; }

/* ── Class index ─────────────────────────────────────────── */
.class-layout { display: flex; gap: 0; padding: 20px 0; align-items: flex-start; }

.cat-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 24px;
    padding-top: 4px;
}
.cat-item {
    position: relative;
    display: block;
    width: 240px;
    height: 176px;
    overflow: hidden;
    border: none;
    cursor: pointer;
}
.cat-item img {
    display: block;
    width: 405px;
    height: 272px;
    margin-top: -48px;
    margin-left: -50px;
}
.cat-label {
    position: absolute;
    bottom: 22px;
    left: 14px;
    right: 0;
    text-align: left;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c8a84b;
    line-height: normal;
    pointer-events: none;
}
.cat-item.active .cat-label { color: #ffe080; }

.class-grid-panel { flex: 1; min-width: 0; }
.cat-panel { display: none; }
.cat-panel.active { display: block; }

.class-grid { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }

.class-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 4px;
}
.class-icon { width: 40px; height: 40px; flex-shrink: 0; }
.class-card-body { flex: 1; }
.class-name {
    display: block;
    font-size: 1.05rem;
    font-weight: bold;
    color: #c8a84b;
    text-decoration: none;
    margin-bottom: 2px;
}
.class-name:hover { color: #e0bb60; }
.class-playstyle { font-size: 0.8rem; color: #888; display: block; margin-top: 4px; margin-bottom: 4px; }
.class-summary { margin: 4px 0 6px; font-size: 0.85rem; }
.class-variants { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0 4px; }
.variant-label { font-size: 0.78rem; color: #666; }
.variant-link {
    font-size: 0.8rem;
    color: #7daed4;
    text-decoration: none;
    background: #222;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid #333;
}
.variant-link:hover { color: #a0c8e8; border-color: #555; }

/* Detail page */
.class-detail { max-width: 900px; padding: 20px 0; }
.class-header-image { margin-bottom: 16px; }
.class-header-image img { max-width: 100%; border-radius: 4px; }
.class-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.class-icon-lg { width: 22px; height: 22px; flex-shrink: 0; image-rendering: pixelated; }
.class-heading { margin: 0; font-size: 1.6rem; color: #e0c97a; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* A second heading inside a class page, under the main one. Quieter than .class-heading and set in
   the body face, so it reads as a division of the page rather than as another page. */
.class-heading-sub { margin: 34px 0 0; font-size: 1.15rem; color: #e0c97a; }

.class-abbr { font-size: 0.9rem; color: #888; }
.class-badge {
    font-size: 0.7rem;
    font-weight: normal;
    padding: 2px 7px;
    border-radius: 3px;
    vertical-align: middle;
}
.vip-badge { background: #2a3a2a; color: #6abf69; border: 1px solid #4a7a4a; }
.variant-badge { background: #1e2a3a; color: #7daed4; border: 1px solid #3a5a7a; font-size: 0.75rem; }
.variant-badge a { color: inherit; text-decoration: underline; }

.class-general-info { color: #bbb; font-size: 0.9rem; line-height: 1.5; margin: 0 0 16px; max-width: 760px; }
.class-more-info { font-size: 0.88rem; line-height: 1.5; max-width: 760px; margin: 0; }

.class-table { border-collapse: collapse; margin-bottom: 20px; }
.class-table th { text-align: left; color: #fff; padding: 4px 12px; border-bottom: 1px solid #555; font-size: 0.85rem; }
.class-table .fn { color: #888; padding: 3px 12px 3px 0; font-size: 0.88rem; white-space: nowrap; }
.class-table .fv { color: #d6d8d8; padding: 3px 12px; font-size: 0.88rem; }

.section-heading { font-size: 1rem; color: #c8a84b; border-bottom: 1px solid #333; padding-bottom: 4px; margin: 20px 0 10px; }

.skill-list { list-style: none; padding: 0; margin: 0 0 16px; columns: 2; column-gap: 30px; max-width: 500px; }
.skill-list li { font-size: 0.88rem; color: #d6d8d8; padding: 2px 0; }

.past-life { background: #1a1a1a; border: 1px solid #2e2e2e; padding: 12px 14px; border-radius: 4px; max-width: 700px; margin-bottom: 8px; }
.past-life-name { font-weight: bold; color: #d6d8d8; margin-bottom: 6px; }
.past-life-desc { margin: 0; font-size: 0.87rem; }

.variant-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.variant-list li a { color: #7daed4; text-decoration: none; font-size: 0.9rem; }
.variant-list li a:hover { color: #a0c8e8; text-decoration: underline; }

.advancement-wrap { margin-bottom: 20px; }
.advancement-table { border-collapse: collapse; font-size: 0.85rem; white-space: nowrap; }
.advancement-table th {
    background: #1e1e1e;
    color: #c8a84b;
    padding: 5px 12px;
    border: 1px solid #333;
    text-align: center;
    font-size: 0.82rem;
}
.advancement-table td {
    padding: 4px 12px;
    border: 1px solid #2a2a2a;
    text-align: center;
    color: #d6d8d8;
}
.advancement-table tbody tr:nth-child(even) { background: #161616; }
.advancement-table tbody tr:hover { background: #1e2a1e; }
.advancement-table th.special-col { min-width: 160px; }
.advancement-table td.special-cell { white-space: normal; font-size: 0.8rem; color: #aaa; text-align: left; }
.advancement-table td.special-cell a { color: #7daed4; text-decoration: none; }
.advancement-table td.special-cell a:hover { text-decoration: underline; }
.special-list { list-style: none; margin: 0; padding: 0; }

.level-special-heading { font-size: 0.95rem; color: #c8a84b; margin: 20px 0 6px; }

.special-ability { background: #1a1a1a; border: 1px solid #2e2e2e; padding: 10px 14px; border-radius: 4px; max-width: 700px; margin-bottom: 6px; }
.special-ability a { color: #7daed4; text-decoration: none; }
.special-ability a:hover { text-decoration: underline; }
.special-ability-name { font-weight: bold; color: #d6d8d8; margin-bottom: 4px; }
.special-ability-desc { margin: 0; font-size: 0.87rem; }

.special-choice { margin-bottom: 12px; max-width: 700px; }
.special-choice-label { font-size: 0.88rem; font-weight: bold; color: #d6d8d8; margin-bottom: 6px; }
.choice-option-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.choice-option { background: #161616; border: 1px solid #2a2a2a; border-radius: 3px; padding: 8px 12px; }
.choice-option-name { font-size: 0.88rem; font-weight: bold; color: #c8c8c8; margin-bottom: 3px; }
.choice-option-desc { margin: 0; font-size: 0.84rem; }

.bonus-feat-list { list-style: none; padding: 0; margin: 0 0 16px; }
.bonus-feat-list li { font-size: 0.88rem; padding: 2px 0; }
.bonus-feat-list li a { color: #7daed4; text-decoration: none; }
.bonus-feat-list li a:hover { text-decoration: underline; }

.prereq-table-wrap { margin-bottom: 20px; }
.prereq-table { border-collapse: collapse; font-size: 0.82rem; table-layout: fixed; width: 100%; }
.prereq-table th {
    background: #1e1e1e;
    color: #c8a84b;
    padding: 5px 10px;
    border: 1px solid #333;
    text-align: left;
    font-size: 0.80rem;
    word-break: break-word;
}
.prereq-table td {
    padding: 4px 10px;
    border: 1px solid #2a2a2a;
    color: #d6d8d8;
    word-break: break-word;
}
.prereq-table tbody tr:nth-child(even) { background: #161616; }
.prereq-table tbody tr:hover { background: #1e2a1e; }
.prereq-table .prereq-level-col { color: #888; text-align: center; width: 64px; white-space: nowrap; }
.prereq-table .prereq-level-cell { color: #888; text-align: center; font-weight: bold; }
.prereq-table td a { color: #7daed4; text-decoration: none; }
.prereq-table td a:hover { text-decoration: underline; }

.prereq-table-flipped .prereq-choice-col { width: 180px; }
.prereq-table-flipped .prereq-choice-cell { font-weight: bold; cursor: default; }
.prereq-table-flipped .prereq-level-col { width: auto; text-align: left; }
.prereq-table-flipped td a { color: #7daed4; text-decoration: none; }
.prereq-table-flipped td a:hover { text-decoration: underline; }
.prereq-tier-name { font-size: 0.75rem; font-weight: normal; color: #666; }

/* The deity index is two columns, where .prereq-table is laid out for a dozen. Left at 100% the
   weapon ends up a third of a screen from the name it belongs to with nothing in between, so the
   table is capped to the width its own content needs. */
.deity-index { max-width: 460px; }
.deity-index .prereq-choice-col { width: 60%; }
.deity-index .prereq-choice-cell { font-weight: bold; }
.deity-index td a { color: #7daed4; text-decoration: none; }
.deity-index td a:hover { text-decoration: underline; }

/* The conferred ability, sitting inside the description of the feat that confers it. Set apart by a
   rule and an indent rather than by a heading: it is a consequence of the row it is in, and reads
   as one only while it stays visibly attached to it. */
.deity-granted {
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid #3a3a3a;
}

.deity-granted-label { color: #c8a84b; font-size: 0.78rem; }
.deity-granted-desc { margin-top: 3px; color: #a8a5a2; }

.external-group-link { font-size: 0.88rem; color: #888; margin: 0 0 16px; }
.external-group-link a { color: #7daed4; text-decoration: none; }
.external-group-link a:hover { text-decoration: underline; }

/* The way through to a class's spell list, sitting under the advancement table the spell columns
   are part of. */
.class-spells-link {
    margin: 8px 0 0;
    font-size: 0.88rem;
}
.class-spells-link a {
    color: #b8943e;
    text-decoration: none;
}
.class-spells-link a:hover { color: #e0bb60; }

/* The spell-level column headers are links now. They keep the header's own weight and colour —
   turning them gold would read as six links across a row of plain labels. */
.advancement-table th .spell-level-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #6b5a2a;
}
.advancement-table th .spell-level-link:hover {
    color: #e0bb60;
    border-bottom-color: #e0bb60;
}
