/* USS Tokyo archive / shared colour and layout */
:root {
    --bg: #060505;
    --surface: #130e0f;
    --surface-2: #1c1314;
    --surface-3: #2a181b;
    --line: #5e4730;
    --line-soft: #382a22;
    --ink: #f5eee5;
    --muted: #d8c9bc;
    --dim: #bfae9c;
    --gold: #ecd08c;
    --blue: #f0d596;
    --green: #9bd0b2;
    --radius: 10px;
    --max: 1400px;
}
body {
    background: radial-gradient(ellipse at top, #2e1318 0, var(--bg) 30rem);
}
a:hover { color: #fff1c8; }
.site-header {
    max-width: var(--max);
    margin: clamp(0px, 2vw, 24px) auto 0;
    border: 1px solid #856539;
    border-top: 3px solid #842c35;
    border-radius: 13px;
    overflow: hidden;
    background: #10090a;
}
.header-inner { background: linear-gradient(100deg, #210f13, #110b0b); }
.brand-logo { width: 49px; height: 49px; }
.brand-text strong { color: var(--ink); }
.brand-text small, .header-status, .header-status-secondary, .brand-separator { color: var(--gold); }
.top-nav { gap: 5px; border-top: 1px solid var(--line-soft); }
.top-nav a, .sidebar-section a { color: var(--muted); }
.top-nav a:hover, .top-nav a.active, .sidebar-section a:hover, .sidebar-section a.sidebar-active {
    color: #fff4e1;
    background: #481d25;
    border-color: #dfb972;
}
.sidebar { border-color: var(--line-soft); }
.sidebar-section h2, .eyebrow, .section-count { color: var(--gold); }
.intro-panel, .search-panel, .info-panel, .home-shortcut, .home-directory details,
.wiki-article, .sidebar-note, .category-card, .site-footer {
    background: var(--surface);
    border-color: var(--line);
}
:is(.wiki-article, .writer-main, .tactical-main) :is(table, pre, blockquote, details) {
    border-color: var(--line);
}
:is(.wiki-article, .writer-main, .tactical-main) :is(th, blockquote, .tactical-glance) {
    background: var(--surface-2);
    color: var(--ink);
}
:is(.wiki-article, .writer-main, .tactical-main) :is(td, th) { border-color: var(--line-soft); }
.lead, .article-lead, .record-deck { color: var(--muted); }
.database-home .home-hero {
    display: block;
    position: relative;
    display: flex;
    align-items: end;
    min-height: clamp(260px, 36vw, 410px);
    background: #1b1011 url(../images/tokyo/tokyo-convoy.webp) center 47% / cover no-repeat;
    border: 1px solid #aa7e46;
    box-shadow: 0 14px 30px #0008;
}
.home-hero-copy {
    z-index: 1;
    width: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background: linear-gradient(90deg, #0a0509f5 0%, #0a0509c4 31%, #0a05092e 67%, transparent 100%),
                linear-gradient(0deg, #080405f0, transparent 70%);
}
.home-hero h1 { max-width: 18ch; color: #fff6e4; }
.home-hero .lead { max-width: 48ch; }
.tokyo-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.tokyo-button, .search-form button {
    display: inline-block;
    border: 1px solid #ba8d56;
    border-radius: 6px;
    padding: 9px 15px;
    background: #541f2a;
    color: #fff1d7;
    text-decoration: none;
    font-weight: 700;
}
.tokyo-button:hover, .search-form button:hover { background: #733041; color: #fff7e8; }
.search-form input { background: #0b0808; border-color: #765d3f; }
.search-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #ecd08c33; }
.home-shortcut { border-top: 2px solid #683339; }
.home-shortcut h3 { color: var(--gold); }
.home-directory summary:hover { background: var(--surface-3); }
.department-card { background: var(--surface); border-color: var(--line); border-left-color: var(--dept-color); }
.about-note, .archive-note { background: #241519; border-left: 3px solid #bf8b58; }
.archive-note { padding: .7rem 1rem; color: var(--muted); margin: 0 0 1.1rem; }
.site-footer { margin-top: 1rem; }
:focus-visible { outline-color: var(--gold); }
.tokyo-record { max-width: 1140px; margin: auto; padding: 26px clamp(16px, 4vw, 42px) 46px; }
.tokyo-record .wiki-article { padding: clamp(20px, 4vw, 38px); }
.tokyo-record .wiki-section { margin-top: 1.8rem; }
.tokyo-record figure { margin: 1.2rem 0; }
.tokyo-record figure img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.tokyo-record figure figcaption { color: var(--muted); margin-top: .45rem; }
.tokyo-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: .6rem; margin: 1.2rem 0; }
.tokyo-facts > div { padding: .7rem .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; }
.tokyo-facts dt { font-size: .88rem; color: var(--gold); }
.tokyo-facts dd { margin: .15rem 0 0; }
.mission-records { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 245px),1fr)); gap: .7rem; }
.mission-records article { padding: .85rem 1rem; background: var(--surface-2); border: 1px solid var(--line); border-top: 2px solid #78323d; border-radius: 8px; }
.mission-records article h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.mission-records article p { color: var(--muted); margin-bottom: 0; }
.mission-records small { display: block; color: var(--gold); margin-bottom: .35rem; }
.deck-picker { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
.deck-picker a { padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); }
.deck-picker a[aria-current="true"] { border-color: var(--gold); background: #541f2a; }
@media(max-width:600px) {
    .site-header { border-right: 0; border-left: 0; border-radius: 0; }
    .database-home .home-hero { background-position: 64% center; }
    .home-hero-copy { background: linear-gradient(0deg,#080405f5,#0804059f 60%,#08040520); }
}
