/*
 * The bar and footer every Modding Tavern site shares: townshiptale.dev, docs.townshiptale.dev and
 * mods.townshiptale.dev. The master copy is in ChatonIsHere/TavernSite (public/chrome.css); TavernDocs
 * (src/css/chrome.css) and TavernModsServer (web/public/chrome.css) keep identical copies, so change all three.
 * Sizes are in px because the sites use different root font sizes.
 */

.tm-bar, .tm-footer {
    --tm-background: #15100d;
    --tm-foreground: #ede3d1;
    --tm-card: #1f1814;
    --tm-primary: #f0b24a;
    --tm-muted-foreground: #b8a78d;
    --tm-border: #3f3127;
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--tm-foreground);
    -webkit-font-smoothing: antialiased;
}
.tm-bar *, .tm-footer * { box-sizing: border-box; }
.tm-bar a:focus-visible, .tm-footer a:focus-visible { outline: 3px solid var(--tm-primary); outline-offset: 2px; }

/* The bar: the brand (home), the three sites' links, then Discord and GitHub. */
.tm-bar {
    position: relative;
    z-index: 30;
    background: var(--tm-card);
    border-bottom: 1px solid var(--tm-border);
}
.tm-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 20px;
    min-height: 56px;
    padding: 6px 20px;
}
.tm-bar nav { display: contents; }
.tm-brand, .tm-brand:hover {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tm-primary);
    font: 700 18px/1.2 Georgia, 'Times New Roman', serif;
    text-decoration: none;
    white-space: nowrap;
}
.tm-brand img { display: block; width: 32px; height: 32px; }
.tm-links {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tm-links li { margin: 0; }
.tm-links .tm-push { margin-left: auto; }
.tm-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 10px;
    color: var(--tm-foreground);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.tm-links a:hover { color: var(--tm-primary); text-decoration: none; }
.tm-links a[aria-current='page'] { color: var(--tm-primary); box-shadow: inset 0 -2px 0 var(--tm-primary); }
@media (max-width: 560px) {
    .tm-bar__inner { padding: 6px 12px; gap: 0 12px; }
    .tm-links a { padding: 0 8px; }
}

/* The footer. */
.tm-footer {
    margin-top: auto;
    background: var(--tm-card);
    border-top: 1px solid var(--tm-border);
}
.tm-footer__inner { max-width: 1140px; margin: 0 auto; padding: 40px 20px 28px; }
.tm-footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 28px 24px;
}
.tm-footer h2 {
    margin: 0 0 10px;
    color: var(--tm-foreground);
    font: 700 16px/1.4 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}
.tm-footer ul { margin: 0; padding: 0; list-style: none; }
.tm-footer li { margin: 0; padding: 3px 0; }
.tm-footer__cols a { color: var(--tm-foreground); text-decoration: none; }
.tm-footer__cols a:hover { color: var(--tm-primary); text-decoration: underline; text-underline-offset: 3px; }
.tm-footer__legal {
    margin: 32px 0 0;
    color: var(--tm-muted-foreground);
    font-size: 14px;
    text-align: center;
}
.tm-footer__legal a { color: var(--tm-primary); text-underline-offset: 3px; }
