:root {
  --navy: #1b2a3a;
  --navy-2: #24384d;
  --navy-3: #34506b;
  --gold: #b08d57;
  --gold-2: #c9a96e;
  --gold-soft: #f4ecdd;
  --bg: #f5f3ee;
  --card: #ffffff;
  --line: #e4e0d6;
  --text: #1f2933;
  --muted: #6b7480;
  --ok: #2f7d55;
  --ok-soft: #e3f2ea;
  --warn: #a8660b;
  --warn-soft: #fdf1dc;
  --danger: #b23b3b;
  --danger-soft: #fbe7e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 42, 58, .06), 0 4px 16px rgba(27, 42, 58, .05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--sans); color: var(--text); background: var(--bg); }
a { color: var(--navy-3); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 600; letter-spacing: .005em; margin: 0 0 .4em; }
h1 { font-size: 1.85rem; line-height: 1.2; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-warn { color: var(--warn); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; color: var(--gold); margin: 0 0 .35rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.08rem; letter-spacing: .01em; }
.brand small { display: block; color: var(--gold-2); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.mainnav { display: flex; align-items: center; gap: 4px; flex: 1; }
.mainnav a { color: rgba(255,255,255,.78); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 500; }
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.mainnav a.active { color: #fff; background: rgba(255,255,255,.12); }
.mainnav a.btn { color: var(--navy); margin-left: 8px; }
.nav-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); margin: 0 8px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.usermenu { display: flex; align-items: center; gap: 14px; }
.usermenu form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.user-name { font-size: .9rem; line-height: 1.2; }
.user-name small { display: block; color: rgba(255,255,255,.6); font-size: .75rem; }
.btn-link { background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; font: inherit; font-size: .88rem; padding: 0; }
.btn-link:hover { color: #fff; text-decoration: underline; }

.mfa-banner { background: var(--warn-soft); border-bottom: 1px solid #efd6a8; color: #6b4307; font-size: .9rem; }
.mfa-banner .wrap { display: flex; align-items: center; gap: 12px; padding-top: 9px; padding-bottom: 9px; }
.mfa-banner .btn { margin-left: auto; }
.mfa-banner-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-size: .8rem; }

.page { padding-top: 28px; padding-bottom: 48px; min-height: calc(100vh - 140px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p.muted { margin: 0; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h1, .card-head h2 { margin: 0; }
.card.narrow { max-width: 720px; }
.layout { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.grid-2 .card + .card { margin-top: 0; }

.sidebar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; box-shadow: var(--shadow); position: sticky; top: 16px; }
.sidebar-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; padding: 0 10px 8px; }
.sidebar-link { display: block; padding: 10px 10px 0; font-size: .85rem; color: var(--gold); text-decoration: none; border-top: 1px solid var(--line); margin-top: 10px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 8px; border-left: 1px solid var(--line); margin-left: 17px; }
.tree a { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .92rem; }
.tree a .ico { color: var(--gold-2); }
.tree a span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.tree a:hover { background: var(--bg); }
.tree a.active { background: var(--navy); color: #fff; }
.tree a.active .ico { color: var(--gold-2); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); text-decoration: none; box-shadow: var(--shadow); font-size: .88rem; }
.stat span { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--navy); line-height: 1.1; }
.stat-warn { border-left-color: var(--warn); }
.stat-warn span { color: var(--warn); }
.stat-ok { border-left-color: var(--ok); }
.stat-ok span { color: var(--ok); }

/* Documents */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); }
.subfolders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.subfolder { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #faf9f6; color: var(--text); text-decoration: none; font-size: .9rem; }
.subfolder .ico { color: var(--gold); }
.subfolder:hover { border-color: var(--gold-2); }
.list-head { display: flex; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 14px 8px; border-bottom: 1px solid var(--line); }
.doc-list { display: flex; flex-direction: column; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: #faf8f3; }
.doc-main { flex: 1; min-width: 0; }
.doc-main strong { display: block; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-main small { color: var(--muted); font-size: .8rem; }
.doc-date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; min-width: 84px; text-align: right; }
.filebadge { width: 40px; height: 46px; border-radius: 4px 12px 4px 4px; display: grid; place-items: center; font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: #7b8794; flex: none; }
.filebadge.pdf { background: #b23b3b; }
.filebadge.img { background: #2f7d77; }
.filebadge.doc { background: #2b5797; }
.filebadge.xls { background: #2f7d55; }
.filebadge.big { width: 64px; height: 76px; font-size: .9rem; margin: 0 auto 12px; }

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; margin: 0; }
.meta dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.meta dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.meta-wide { grid-column: 1 / -1; }
.meta-stack { grid-template-columns: 1fr; margin-bottom: 14px; }
.meta-stack > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.preview { padding: 0; overflow: hidden; }
.pdf-viewer { background: #e9e6df; padding: 20px; max-height: 80vh; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pdf-viewer canvas { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); max-width: 100%; height: auto !important; }
.pdf-status { color: var(--muted); padding: 40px; text-align: center; }
.pdf-pages { font-size: .8rem; color: var(--muted); align-self: flex-end; }
.img-viewer { background: #e9e6df; padding: 20px; text-align: center; }
.img-viewer img { max-width: 100%; max-height: 78vh; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #fff; }
.preview iframe { display: block; width: 100%; height: 78vh; border: 0; background: #e9e6df; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }

/* Pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--gold-soft); color: #7a5c2a; white-space: nowrap; }
.pill-muted { background: #eef0f2; color: var(--muted); }
.pill-navy { background: var(--navy); color: #fff; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-sm { padding: 5px 11px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-3); }
.btn-gold { background: var(--gold-2); color: var(--navy); }
.btn-gold:hover { background: var(--gold); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f2c2c; }
.btn-danger-text { color: var(--danger); }
.btn-warning { background: var(--warn); color: #fff; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--navy); font-size: .7rem; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .86rem; color: var(--navy); }
.form input:not([type=checkbox]):not([type=file]), .form select, .searchbar input {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #d3cec2; border-radius: 8px; background: #fff; color: var(--text); width: 100%;
}
.form input:focus, .form select:focus, .searchbar input:focus { outline: 2px solid var(--gold-2); outline-offset: 0; border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-inline { flex-direction: row; align-items: center; flex-wrap: wrap; }
.form-inline input:not([type=hidden]) { flex: 1; min-width: 200px; width: auto !important; }
.form-inline select { width: auto !important; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.otp { font-size: 1.4rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; max-width: 220px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 14px; margin: 0; }
legend { font-weight: 600; font-size: .86rem; color: var(--navy); padding: 0 6px; }
.form label.check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--text); }
.check input { margin-top: 4px; accent-color: var(--navy); }
.check small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.searchbar { display: flex; gap: 10px; margin-bottom: 16px; max-width: 520px; }

.userpick-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.userpick-tools input { flex: 1; }
.userpick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.userpick-list label { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.userpick-list label:has(input:checked) { border-color: var(--navy-3); background: #f2f5f8; }

.dropzone { border: 2px dashed #cfc7b4; border-radius: 10px; padding: 26px; text-align: center; background: #fbfaf7; cursor: pointer; align-items: center; position: relative; }
.dropzone.drag { border-color: var(--gold); background: var(--gold-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filelist { list-style: none; padding: 0; margin: 6px 0 0; font-weight: 400; color: var(--navy); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.table tr:hover td { background: #faf8f3; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { text-align: right; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; font-size: .92rem; }
.alert-success { background: var(--ok-soft); border-color: #bfe0cd; color: #1e5a3c; }
.alert-warning { background: var(--warn-soft); border-color: #efd6a8; color: #6b4307; }
.alert-error { background: var(--danger-soft); border-color: #efc2c2; color: #7d2323; }

.danger-zone { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.danger-zone h3 { color: var(--danger); }
details.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; margin-bottom: 12px; }

/* Folder admin */
.new-folder { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ftree { list-style: none; margin: 0; padding: 0; }
.ftree .ftree { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--gold-soft); }
.frow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.frow:hover { background: #faf8f3; }
.frow .ico { color: var(--gold); }
.fname { font-weight: 600; color: var(--navy); text-decoration: none; }
.factions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.factions form { margin: 0; }
.fpanel { margin: 4px 0 10px 38px; padding: 12px; background: #f7f5f0; border-radius: 8px; }

/* MFA setup */
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 22px; }
.steps li::marker { font-family: var(--serif); font-weight: 700; color: var(--gold); }
.qr-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr-wrap img { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.secret { display: inline-block; background: #f2efe8; padding: 8px 12px; border-radius: 6px; font-size: 1rem; letter-spacing: .08em; }

/* Modal */
.modal { border: 0; border-radius: 14px; max-width: 540px; padding: 30px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.25); border-top: 6px solid var(--warn); }
.modal::backdrop { background: rgba(27, 42, 58, .55); }
.modal-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions form { margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .8rem; }
.footer .wrap { display: flex; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; gap: 12px; flex-wrap: wrap; }

/* Auth pages */
.auth-grid { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #2c4660 100%); color: #fff; padding: 44px 56px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.auth-hero-brand { display: flex; gap: 14px; align-items: center; }
.auth-hero-brand strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.auth-hero-brand small { color: var(--gold-2); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.auth-hero-copy { margin-top: auto; margin-bottom: 190px; max-width: 520px; position: relative; z-index: 1; }
.auth-hero h1 { color: #fff; font-size: 2.5rem; line-height: 1.15; margin-bottom: 22px; }
.auth-hero .eyebrow { color: var(--gold-2); }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; color: rgba(255,255,255,.85); }
.auth-points li { padding-left: 28px; position: relative; }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 2px; background: var(--gold-2); }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 200px; }
.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.8rem; }
.auth-foot { color: var(--muted); font-size: .8rem; margin-top: 40px; }

.plain { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.center-card { max-width: 460px; text-align: center; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 24px; min-height: 0; }
  .auth-hero-copy { margin: 24px 0 70px; }
  .auth-points { display: none; }
  .auth-hero-brand small { display: none; }
  .auth-hero h1 { font-size: 1.8rem; }
  .skyline { height: 80px; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .nav-toggle { display: block; margin-left: auto; }
  .mainnav { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .mainnav.open { display: flex; }
  .nav-sep { display: none; }
  .usermenu { order: 2; }
  .user-name { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .factions { flex-wrap: wrap; }
  .frow { flex-wrap: wrap; }
}

/* Language switch (sign-in pages) */
.lang-switch { align-self: flex-end; display: flex; gap: 4px; margin: -16px 0 24px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-size: .8rem; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.lang-switch a.active { border-color: var(--line); background: #fff; color: var(--navy); font-weight: 600; }

/* "All documents" entry and drop targets in the sidebar */
.tree-all { display: flex; gap: 8px; align-items: center; padding: 8px 10px; margin-bottom: 10px; border-radius: 6px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 1px solid var(--line); }
.tree-all .ico { color: var(--gold); }
.tree-all:hover { background: var(--bg); }
.tree-all.active { background: var(--navy); color: #fff; }
.drop-hint { padding: 10px 10px 0; margin: 10px 0 0; border-top: 1px solid var(--line); }
.drop-hint + .sidebar-link { border-top: 0; margin-top: 0; }
body.is-dragging .sidebar [data-folder-id], body.is-dragging .subfolders [data-folder-id] { outline: 1px dashed var(--gold-2); outline-offset: -1px; }
.drop-over { background: var(--gold-soft) !important; color: var(--navy) !important; outline: 2px solid var(--gold) !important; }
.drop-busy { opacity: .6; }
.drag-ghost { position: fixed; top: -100px; left: -100px; padding: 8px 14px; background: var(--navy); color: #fff; border-radius: 8px; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }

/* Document rows with selection */
.doc-item { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.doc-item:last-child { border-bottom: 0; }
.doc-item .doc-row { flex: 1; min-width: 0; border-bottom: 0; }
.doc-item[draggable=true] { cursor: grab; }
.doc-item.selected { background: #f2f5f8; }
.doc-item.drag-source { opacity: .45; }
.doc-check { padding: 0 2px 0 12px; display: flex; align-items: center; }
.doc-check input { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }
.move-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; background: #faf9f6; border: 1px solid var(--line); border-radius: 8px; }
.move-bar select { font: inherit; padding: 6px 10px; border: 1px solid #d3cec2; border-radius: 8px; background: #fff; margin-left: auto; max-width: 320px; }
.move-bar .check { font-size: .86rem; font-weight: 500; }
.move-bar .check input { margin-top: 2px; }
.searchbar input { width: 100%; }

/* Document switcher */
.doc-switcher { padding-top: 12px; }
.sidebar-link-top { display: block; padding: 0 10px 10px; font-size: .85rem; color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.switch-list { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; }
.switch-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.switch-list a:hover { background: var(--bg); }
.switch-list a.active { background: var(--navy); color: #fff; }
.switch-list a.active small { color: rgba(255,255,255,.7); }
.switch-main { min-width: 0; }
.switch-main strong { display: block; font-size: .88rem; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.switch-main small { color: var(--muted); font-size: .76rem; }
.filebadge.sm { width: 28px; height: 32px; font-size: .5rem; border-radius: 3px 8px 3px 3px; }
.doc-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.doc-pager [aria-disabled=true] { opacity: .4; cursor: default; }
[data-doc-host] { min-width: 0; transition: opacity .15s; }
[data-doc-host].loading { opacity: .55; }

/* Legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: 32px 40px; }
.legal h2 { font-size: 1.1rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .3em; }
.legal-updated { margin-top: 2em; }
.placeholder { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.imprint { display: grid; gap: 10px; margin: 0 0 1em; }
.imprint > div { display: grid; grid-template-columns: 240px 1fr; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.imprint dt { color: var(--muted); font-size: .85rem; }
.imprint dd { margin: 0; }
.lang-switch-dark { margin: 0 0 0 auto; }
.lang-switch-dark a { color: rgba(255,255,255,.7); }
.lang-switch-dark a.active { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.footer a, .auth-foot a { color: inherit; }
.legal-accept a { color: var(--navy-3); }
@media (max-width: 960px) {
  .legal { padding: 22px 20px; }
  .imprint > div { grid-template-columns: 1fr; gap: 2px; }
}
