/* Hertmire public site — scoped to .hm-* */
:root {
    --hm-charcoal: #12141a;
    --hm-charcoal-soft: #1a1d26;
    --hm-gold: #c9a962;
    --hm-gold-dim: #8f7a45;
    --hm-teal: #3d6f6a;
    --hm-teal-soft: #2a4f4c;
    --hm-text: #e8e4dc;
    --hm-text-muted: #a39e94;
    --hm-border: rgba(201, 169, 98, 0.22);
    --hm-radius: 10px;
    --hm-font-display: "Cinzel", Georgia, serif;
    --hm-font-body: "Source Sans 3", system-ui, sans-serif;
    --hm-max: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.hm-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--hm-font-body);
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--hm-text);
    background: radial-gradient(ellipse 120% 80% at 50% -20%, #1f2830 0%, var(--hm-charcoal) 55%);
}

.hm-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.5rem 1rem;
    background: var(--hm-gold);
    color: #111;
    z-index: 100;
}

.hm-skip:focus {
    left: 1rem;
    top: 1rem;
}

.hm-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--hm-border);
    background: rgba(18, 20, 26, 0.92);
    backdrop-filter: blur(10px);
}

.hm-header__inner {
    max-width: var(--hm-max);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hm-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--hm-text);
    font-family: var(--hm-font-display);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hm-brand__mark {
    border-radius: 8px;
    object-fit: cover;
}

.hm-brand__mark--fallback {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--hm-teal-soft), var(--hm-gold-dim));
    border: 1px solid var(--hm-border);
}

.hm-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    background: var(--hm-charcoal-soft);
    color: var(--hm-text);
    cursor: pointer;
    font: inherit;
}

.hm-nav-toggle__bar {
    width: 1.1rem;
    height: 2px;
    background: var(--hm-gold);
    box-shadow: 0 5px 0 var(--hm-gold), 0 -5px 0 var(--hm-gold);
}

@media (min-width: 768px) {
    .hm-nav-toggle {
        display: none;
    }
}

.hm-nav {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.25rem);
    padding: 0.75rem;
    background: var(--hm-charcoal-soft);
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    min-width: 12rem;
}

.hm-nav.is-open {
    display: flex;
}

@media (min-width: 768px) {
    .hm-nav {
        display: flex;
        flex-direction: row;
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        min-width: auto;
        gap: 0.35rem;
    }
}

.hm-nav__link {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--hm-text-muted);
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}

.hm-nav__link:hover,
.hm-nav__link--active {
    color: var(--hm-text);
    background: rgba(61, 111, 106, 0.25);
}

.hm-main {
    flex: 1;
    width: 100%;
    max-width: var(--hm-max);
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

.hm-hero {
    position: relative;
    margin: 0 -1.25rem 2.5rem;
    min-height: clamp(22rem, 55vh, 32rem);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-bottom: 1px solid var(--hm-border);
}

.hm-hero__backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0d1218 0%, #1a2428 40%, #12141a 100%);
}

.hm-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.55;
}

.hm-hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--hm-charcoal) 5%, transparent 55%),
        linear-gradient(90deg, rgba(18, 20, 26, 0.85) 0%, transparent 45%);
}

.hm-hero__content {
    position: relative;
    padding: 2.5rem 1.5rem 2.75rem;
    max-width: 36rem;
}

.hm-hero__logo {
    max-width: min(100%, 22rem);
    margin-bottom: 1rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.hm-hero__title {
    font-family: var(--hm-font-display);
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    margin: 0 0 0.75rem;
    color: var(--hm-gold);
    letter-spacing: 0.06em;
}

.hm-hero__lead {
    margin: 0 0 1.5rem;
    color: var(--hm-text-muted);
    font-size: 1.1rem;
}

.hm-hero__lead strong {
    color: var(--hm-teal);
    font-weight: 600;
}

.hm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
}

.hm-btn--primary {
    background: linear-gradient(180deg, var(--hm-gold) 0%, var(--hm-gold-dim) 100%);
    color: #14120c;
}

.hm-btn--ghost {
    border-color: var(--hm-border);
    color: var(--hm-text);
    background: rgba(26, 29, 38, 0.6);
}

.hm-btn--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border: 1px dashed var(--hm-border);
    color: var(--hm-text-muted);
}

.hm-panel {
    margin-bottom: 2rem;
}

.hm-panel--grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .hm-panel--grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hm-panel--muted {
    padding: 1.25rem 1.5rem;
    border-radius: var(--hm-radius);
    background: var(--hm-charcoal-soft);
    border: 1px solid var(--hm-border);
}

.hm-panel__title {
    font-family: var(--hm-font-display);
    font-size: 1.15rem;
    margin: 0 0 1rem;
    color: var(--hm-gold);
}

.hm-panel__body {
    margin: 0 0 1rem;
    color: var(--hm-text-muted);
}

.hm-panel__body--tight {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.92rem;
}

.hm-panel__subtitle {
    font-family: var(--hm-font-display);
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--hm-text);
}

.hm-card {
    padding: 1.25rem 1.35rem;
    border-radius: var(--hm-radius);
    background: var(--hm-charcoal-soft);
    border: 1px solid var(--hm-border);
}

.hm-card__title {
    font-family: var(--hm-font-display);
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--hm-gold);
}

.hm-card__body {
    margin: 0;
    color: var(--hm-text-muted);
    font-size: 0.98rem;
}

.hm-page-head {
    padding: 2rem 0 1.25rem;
}

.hm-page-head__title {
    font-family: var(--hm-font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.5rem;
    color: var(--hm-gold);
}

.hm-page-head__lead {
    margin: 0;
    color: var(--hm-text-muted);
    max-width: 40rem;
}

.hm-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hm-filter__label {
    font-weight: 600;
    color: var(--hm-text-muted);
}

.hm-filter__select {
    font: inherit;
    padding: 0.45rem 0.75rem;
    border-radius: var(--hm-radius);
    border: 1px solid var(--hm-border);
    background: var(--hm-charcoal-soft);
    color: var(--hm-text);
}

.hm-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
}

.hm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}

.hm-table th,
.hm-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hm-table th {
    font-family: var(--hm-font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hm-gold-dim);
    background: rgba(0, 0, 0, 0.2);
}

.hm-table tbody tr:hover {
    background: rgba(61, 111, 106, 0.12);
}

.hm-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--hm-radius);
    margin-bottom: 1rem;
}

.hm-alert--warn {
    background: rgba(201, 169, 98, 0.12);
    border: 1px solid var(--hm-border);
    color: var(--hm-text);
}

.hm-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--hm-border);
    border-radius: var(--hm-radius);
    color: var(--hm-text-muted);
}

.hm-status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.hm-status-card {
    padding: 1.25rem 1.35rem;
    border-radius: var(--hm-radius);
    background: var(--hm-charcoal-soft);
    border: 1px solid var(--hm-border);
}

.hm-status-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.hm-status-card__title {
    font-family: var(--hm-font-display);
    font-size: 1.05rem;
    margin: 0;
    color: var(--hm-text);
}

.hm-status-card__badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.hm-status-card--healthy .hm-status-card__badge {
    background: rgba(61, 111, 106, 0.35);
    color: #9fd4cc;
}

.hm-status-card--degraded .hm-status-card__badge {
    background: rgba(201, 169, 98, 0.2);
    color: var(--hm-gold);
}

.hm-status-card--offline .hm-status-card__badge,
.hm-status-card--unknown .hm-status-card__badge {
    background: rgba(120, 120, 120, 0.25);
    color: var(--hm-text-muted);
}

.hm-status-card--maintenance .hm-status-card__badge {
    background: rgba(90, 70, 40, 0.35);
    color: #e8c98a;
}

.hm-status-card__kind {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: var(--hm-teal);
}

.hm-status-card__detail {
    margin: 0;
    font-size: 0.92rem;
    color: var(--hm-text-muted);
}

.hm-download-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.hm-download-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--hm-radius);
    border: 1px solid var(--hm-border);
    background: var(--hm-charcoal-soft);
}

.hm-download-card--unavailable {
    opacity: 0.85;
}

.hm-download-card__title {
    margin: 0 0 0.35rem;
    font-family: var(--hm-font-display);
    font-size: 1.05rem;
}

.hm-download-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--hm-text-muted);
}

.hm-download-card__meta dt {
    display: inline;
    font-weight: 600;
    margin-right: 0.35rem;
}

.hm-download-card__meta dd {
    display: inline;
    margin: 0;
}

.hm-download-card__note {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: var(--hm-text-muted);
}

.hm-code {
    font-size: 0.9em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--hm-gold);
}

.hm-footer {
    margin-top: auto;
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
    border-top: 1px solid var(--hm-border);
    color: var(--hm-text-muted);
    font-size: 0.88rem;
}

.hm-footer__tag {
    margin: 0 0 0.35rem;
}

.hm-footer__copy {
    margin: 0;
    opacity: 0.75;
}

/* Bestiary */
.hm-eyebrow {
    margin: 0 0 0.5rem;
    color: var(--hm-gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
}

.hm-text-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--hm-gold);
    text-underline-offset: 0.2em;
}

.hm-monster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.hm-monster-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hm-border);
    border-radius: var(--hm-radius);
    background: var(--hm-charcoal-soft);
}

.hm-monster-card__art {
    height: 280px;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #303331, #171b20);
    border-bottom: 1px solid var(--hm-border);
}

.hm-monster-card__art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hm-monster-card__content {
    padding: 1.25rem 1.35rem 1.5rem;
}

.hm-monster-card__kind {
    margin: 0 0 0.4rem;
    color: #9fd4cc;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hm-monster-card__title {
    font-family: var(--hm-font-display);
    color: var(--hm-gold);
    font-size: 1.05rem;
    margin: 0 0 0.65rem;
}

.hm-monster-card__description {
    color: var(--hm-text-muted);
    font-size: 0.98rem;
    margin: 0;
}

.hm-bestiary-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.hm-bestiary-footer .hm-panel__title {
    margin-bottom: 0.5rem;
}

.hm-bestiary-footer .hm-panel__body {
    margin-bottom: 0;
}

.hm-bestiary-footer .hm-btn {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .hm-monster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .hm-monster-grid { grid-template-columns: 1fr; }
    .hm-monster-card__art { height: 260px; }
    .hm-bestiary-footer { align-items: flex-start; flex-direction: column; }
}

/* Staff area */
.hm-admin-login { max-width: 480px; margin: 4rem auto; padding: 2rem; border: 1px solid var(--hm-border); border-radius: var(--hm-radius); background: var(--hm-charcoal-soft); }
.hm-admin-form { display: grid; gap: .65rem; }
.hm-admin-form label, .hm-admin-search label { font-size: .92rem; color: var(--hm-text-muted); }
.hm-admin-form input, .hm-admin-form select, .hm-admin-form textarea, .hm-admin-search input, .hm-admin-search select { width: 100%; min-width: 0; padding: .65rem .8rem; font: inherit; color: var(--hm-text); background: #11151b; border: 1px solid var(--hm-border); border-radius: 6px; }
.hm-admin-form .hm-btn { margin-top: .6rem; justify-self: start; }
.hm-admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0 1rem; }
.hm-admin-nav { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; border-bottom: 1px solid var(--hm-border); padding-bottom: .7rem; }
.hm-admin-nav__link { color: var(--hm-text-muted); padding: .5rem .9rem; text-decoration: none; border-radius: 6px; }
.hm-admin-nav__link--active { background: var(--hm-teal-soft); color: var(--hm-text); }
.hm-admin-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-bottom: 2rem; }
.hm-admin-metric { font-size: 2rem; color: var(--hm-gold); margin: 0 0 .3rem; }
.hm-admin-class-counts { display: flex; flex-wrap: wrap; gap: 1.5rem; color: var(--hm-text-muted); }
.hm-admin-class-counts strong { color: var(--hm-gold); margin-left: .5rem; }
.hm-admin-search { display: flex; gap: 1rem; align-items: end; margin-bottom: 1rem; flex-wrap: wrap; }
.hm-admin-search > div:first-child { flex: 1; min-width: 200px; }
.hm-admin-search > div { display: grid; gap: .4rem; }
.hm-admin-link { color: var(--hm-gold); text-underline-offset: .2em; }
.hm-admin-id { display: block; color: var(--hm-text-muted); }
.hm-admin-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem 0; }
.hm-admin-account-summary { margin-top: 1rem; }
.hm-admin-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 0; }
.hm-admin-facts dt { color: var(--hm-text-muted); font-size: .85rem; }
.hm-admin-facts dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.hm-admin-suspension { border-top: 1px solid var(--hm-border); padding-top: 1rem; color: var(--hm-gold); }
.hm-admin-note { min-width: 220px; max-width: 440px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-alert--success { border: 1px solid var(--hm-teal); background: var(--hm-teal-soft); }
@media(max-width:700px) { .hm-admin-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .hm-admin-facts { grid-template-columns: 1fr; } .hm-admin-top { align-items: start; } .hm-admin-login { margin: 2rem auto; padding: 1.25rem; } }
