@font-face { font-family: 'Air Force'; src: url('fonts/AirForce.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #F6FBFB; --panel: #FFFFFF; --ink: #003439; --muted: #05575C; --soft: #EDFFFE; --line: #CFE3E4;
  --cyan: #00DCDE; --cyan-200: #83FDFF; --pink: #FF00BF; --pink-50: #FFF0FD; --tan: #FF9752; --tan-50: #FFF6ED;
  --danger: #B80080; --shadow: 0 1px 2px rgba(0,52,57,.06), 0 8px 24px rgba(0,52,57,.06);
  --display: 'Air Force', 'Inter', system-ui, sans-serif; --body: 'Inter', system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #021E21; --panel: #052A2E; --ink: #EDFFFE; --muted: #83FDFF; --soft: #073A3F; --line: #0E4A50;
    --pink-50: #2A0A22; --tan-50: #2A1A0A; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); }
a { color: var(--muted); }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
.bar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 22px; display: block; }
.brand span { font-family: var(--display); font-size: 13px; letter-spacing: .12em; color: var(--pink); padding-left: 10px; border-left: 1px solid var(--line); }
.bar .grow { flex: 1; }
.who { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.3; }
.who b { color: var(--ink); font-weight: 600; display: block; }

.btn { border: 0; border-radius: 8px; padding: 8px 14px; background: var(--cyan-200); color: #003439; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--cyan); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.pink { background: #FF98F4; } .btn.pink:hover { background: var(--pink); color: #fff; }
.btn.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn[disabled] { opacity: .4; cursor: default; }

/* sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 500px at 10% -10%, rgba(0,220,222,.18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(255,0,191,.12), transparent), var(--bg); }
.card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.card img { height: 30px; }
.card h1 { font-family: var(--display); font-weight: normal; font-size: 26px; letter-spacing: .03em; margin: 22px 0 4px; }
.card p { color: var(--muted); margin: 0 0 20px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.field input:focus, .field select:focus { outline: 3px solid var(--cyan-200); border-color: var(--cyan); }
.code-input { letter-spacing: .5em; font-size: 22px !important; text-align: center; font-weight: 600; }
.msg { font-size: 14px; margin-top: 12px; min-height: 20px; }
.msg.err { color: var(--danger); }
.fine { font-size: 12px; color: var(--muted); margin-top: 22px; line-height: 1.5; }

/* library */
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.search { position: relative; max-width: 420px; flex: 1; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .6; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; margin-bottom: 14px; }
.crumbs a { text-decoration: none; color: var(--muted); } .crumbs a:hover { text-decoration: underline; }
.crumbs .sep { opacity: .4; }
h2.title { font-family: var(--display); font-weight: normal; font-size: 26px; margin: 0 0 18px; letter-spacing: .02em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tile { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--cyan); }
.tile .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); flex: none; }
.tile b { display: block; font-weight: 600; line-height: 1.3; }
.tile small { color: var(--muted); }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--soft); }
.row .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); flex: none; }
.row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm small { display: block; color: var(--muted); font-size: 12px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge.view { background: var(--soft); color: var(--muted); }
.badge.print { background: var(--tan-50); color: #9D2C0F; }
.badge.answer { background: var(--pink-50); color: #98036C; }
.badge.presenter { background: #E6E9FF; color: #2B2F8F; }
.badge.video { background: #EAF7E6; color: #2E5E1F; }
.badge.download { background: #F1F1F1; color: #444; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.section-label { font-family: var(--display); font-size: 12px; letter-spacing: .12em; color: var(--pink); margin: 6px 0 10px; }

/* viewer: everything here is deterrence. The real protection is the server. */
.viewer { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.vhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.vhead h1 { font-size: 20px; margin: 0; font-weight: 700; flex: 1; min-width: 240px; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.page { position: relative; width: 100%; max-width: var(--pw, 900px); background: #fff; border-radius: 4px; box-shadow: 0 2px 14px rgba(0,0,0,.12); min-height: 300px; }
.page img { display: block; width: 100%; height: auto; pointer-events: none; border-radius: 4px; }
.page .pn { position: absolute; right: -44px; top: 6px; font-size: 12px; color: var(--muted); }
.page .shield { position: absolute; inset: 0; }
.zoom { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.slides-frame { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 10px; background: #000; display: block; }
video { width: 100%; max-height: 75vh; border-radius: 10px; background: #000; }
.notice { font-size: 13px; color: var(--muted); background: var(--soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(0,52,57,.92); color: #EDFFFE; display: grid; place-items: center; font-family: var(--display); letter-spacing: .08em; }
@media print { body * { display: none !important; } body::after { content: 'Printing is not available for this file. Use ResourceVault to print a stamped copy where allowed.'; display: block; padding: 40px; } }

/* admin */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); }
.tabs button.on { color: var(--ink); border-color: var(--pink); }
table.t { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; background: var(--soft); }
table.t td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.t tr.off td { opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; background: var(--soft); border-radius: 999px; padding: 2px 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.box h3 { margin: 0 0 10px; font-size: 15px; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(560px, 92vw); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0,52,57,.5); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.checks label { font-size: 13px; display: flex; gap: 8px; align-items: center; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } .page .pn { display: none; } .bar { flex-wrap: wrap; } .search { order: 3; max-width: none; flex-basis: 100%; } }

.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }

/* Admin: add a site or a person */
.addbox { margin-bottom: 14px; }
.addbox summary { cursor: pointer; }
.addform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; }
.addform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.addform label.wide, .addform fieldset.wide { flex-basis: 100%; }
.addform label.wide { flex-direction: row; align-items: center; gap: 8px; }
.addform input:not([type=checkbox]), .addform select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 200px; }
.addform fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.addform fieldset label { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
.addform fieldset[disabled] { opacity: .5; }
.addmsg { font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.addmsg.bad { color: var(--danger); }
