/*
 * C26-B — Public / Legal shared page owner.
 * Loaded only by /legal and /privacy after legacy /static/style.css is disabled.
 */

:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]) {
    --bg: #0b1119;
    --ink: #f4eee5;
    --muted: #aeb8c7;
    --line: #3a332c;
    --accent: #c88748;
    --accent-2: #e2b06f;
    margin: 0;
    min-height: 100vh;
    background: #07111b;
    color: #d4dce4;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]),
:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]) * {
    box-sizing: border-box;
}

:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]) a {
    color: var(--accent-2);
    text-decoration: none;
}

:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]) a:hover {
    text-decoration: underline;
}

:where(body[data-ui-page="/legal"], body[data-ui-page="/privacy"]) .eyebrow {
    letter-spacing: .18em;
    font-size: .72rem;
    font-weight: 800;
    color: var(--accent-2);
}

.legal-shell{
    width:min(1120px,calc(100% - 32px));
    margin:0 auto;
    padding:42px 0 70px;
}
.legal-hero{padding:18px 4px 26px}
.legal-back{display:inline-block;margin-bottom:24px;color:#d49a4c;font-weight:800;text-decoration:none}
.legal-hero h1{margin:6px 0 12px;color:#f2eee7;font:700 clamp(2rem,5vw,3.5rem)/1.05 Georgia,serif}
.legal-hero>p{max-width:800px;color:#98a7b6;font-size:1rem;line-height:1.65}
.legal-card code{padding:2px 5px;border-radius:4px;background:#07131f;color:#eab36a}
.legal-toc{position:sticky;top:8px;z-index:10;margin:0 0 20px;padding:9px;display:flex;gap:6px;flex-wrap:wrap;border:1px solid rgba(214,156,72,.27);border-radius:11px;background:rgba(8,20,31,.94);backdrop-filter:blur(10px)}
.legal-toc a{padding:7px 10px;border-radius:7px;color:#aeb9c5;text-decoration:none;font-size:.78rem;font-weight:800}
.legal-toc a:hover{background:#142537;color:#e7a750}
.legal-card{margin:0 0 18px;padding:24px;border:1px solid rgba(214,156,72,.28);border-radius:13px;background:rgba(12,27,41,.84);box-shadow:0 14px 45px rgba(0,0,0,.14)}
.legal-card h2,.legal-card h3{color:#f2eee7}
.legal-card h2{margin:0;font:700 1.5rem Georgia,serif}
.legal-card h3{margin:25px 0 10px;font-size:1rem}
.legal-card p{line-height:1.65}
.legal-section-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}
.legal-section-head p{margin:4px 0 0;color:#8999a9;font-size:.84rem}
.legal-badge{flex:0 0 auto;min-width:48px;padding:8px 7px;text-align:center;border:1px solid rgba(220,162,79,.45);border-radius:7px;color:#e8a852;background:#102236;font-size:.72rem;font-weight:950;letter-spacing:.07em}
.legal-badge.orc{color:#8ed2b3}.legal-badge.ogl{color:#d7a461}.legal-badge.translation{color:#88b8e3}.legal-badge.contact{color:#d5a0df}
.legal-notice{margin:15px 0;padding:16px 18px;border-left:3px solid #d99b49;background:#0a1826;color:#d9e0e6;line-height:1.6}
.legal-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.legal-links a,.legal-contact-grid a{color:#e2a453;font-weight:800;text-decoration:none}
.legal-links a{padding:8px 11px;border:1px solid rgba(214,156,72,.34);border-radius:7px;background:#102236}
.legal-links a:hover{border-color:#dc9e4c}
.legal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0 18px}
.legal-stats>div{padding:13px;display:grid;gap:2px;border:1px solid rgba(214,156,72,.2);border-radius:8px;background:#0a1826}
.legal-stats strong{color:#ecb362;font-size:1.3rem}.legal-stats span{color:#8494a4;font-size:.72rem}
.legal-source-list{display:grid;gap:8px}
.legal-source-row{display:grid;grid-template-columns:minmax(0,1fr) auto 72px;gap:9px 14px;align-items:center;padding:13px 14px;border:1px solid rgba(214,156,72,.18);border-radius:9px;background:#0a1826}
.legal-source-title{display:grid;gap:2px;min-width:0}.legal-source-title strong{color:#e7ebef}.legal-source-title small{color:#7f90a0}
.legal-source-tags{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}
.legal-source-tags span{padding:3px 6px;border-radius:5px;border:1px solid rgba(214,156,72,.27);color:#c9a46e;font-size:.68rem}
.legal-source-count{text-align:right;display:grid}.legal-source-count strong{color:#e8ab55}.legal-source-count small{color:#7d8b98;font-size:.66rem}
.legal-source-notice,.legal-source-status{grid-column:1/-1;margin:0!important;color:#8f9fad;font-size:.76rem}.legal-source-status b{color:#ddb06c}
.legal-details{margin-top:18px;border:1px solid rgba(214,156,72,.24);border-radius:9px;background:#091724}
.legal-details>summary{padding:12px 14px;cursor:pointer;color:#e2a453;font-weight:900}
.legal-registered-list{padding:0 14px 14px;display:grid;gap:7px}.legal-registered-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid rgba(214,156,72,.12)}.legal-registered-list span{color:#7f8f9f;font-size:.76rem}
.legal-license-text pre{margin:0;padding:16px;max-height:540px;overflow:auto;white-space:pre-wrap;word-break:normal;color:#bfc9d3;font:400 .78rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace}
.legal-copyright-list{display:grid;gap:7px;padding:12px 14px;border-radius:8px;background:#091724}.legal-copyright-list p{margin:0;padding-bottom:7px;border-bottom:1px solid rgba(214,156,72,.1);color:#aab6c2;font-size:.82rem}.legal-copyright-list p:last-child{border-bottom:0;padding-bottom:0}
.legal-audit-note{padding:11px 13px;border-radius:7px;background:rgba(43,82,111,.18);color:#94a9b9;font-size:.8rem}
.legal-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.legal-contact-grid>div{padding:12px 14px;border:1px solid rgba(214,156,72,.2);border-radius:8px;background:#091724}.legal-contact-grid dt{color:#7d8d9c;font-size:.7rem;font-weight:900;text-transform:uppercase}.legal-contact-grid dd{margin:5px 0 0;color:#e5e9ed}
.legal-missing{color:#e09559}.legal-small{color:#8293a3;font-size:.78rem}
.legal-page-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 4px;color:#778897;font-size:.72rem}.legal-page-footer a{color:#d49a4c;text-decoration:none;font-weight:900}

@media(max-width:760px){
    .legal-shell{width:min(100% - 18px,1120px);padding-top:18px}
    .legal-card{padding:17px}
    .legal-toc{position:static}
    .legal-stats{grid-template-columns:1fr}
    .legal-source-row{grid-template-columns:1fr}
    .legal-source-tags{justify-content:flex-start}
    .legal-source-count{text-align:left;display:flex;gap:5px;align-items:baseline}
    .legal-contact-grid{grid-template-columns:1fr}
    .legal-registered-list>div{display:grid}
}
