:root {
  --navy: #0f3d5c;
  --teal: #0e7c86;
  --teal-dark: #0a626a;
  --bg: #f3f6f9;
  --card: #ffffff;
  --text: #1c2b36;
  --muted: #5b6b78;
  --line: #dbe3ea;
  --red: #b3261e;
  --red-bg: #fdecea;
  --green: #1b7a4b;
  --green-bg: #e6f4ec;
  --amber-bg: #fff6e0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 61, 92, .08), 0 4px 14px rgba(15, 61, 92, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; flex: none; }

/* top bar */
.topbar {
  background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 22px; height: 22px; fill: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-size: 1.05rem; letter-spacing: .2px; }
.brand-text span { font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.chip { background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 12px; font-size: .8rem; white-space: nowrap; }
.topbtn { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 10px; padding: 6px 12px; font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.topbtn:hover { background: rgba(255,255,255,.12); }

/* layout */
main { max-width: 1120px; margin: 0 auto; padding: 22px 20px 60px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--teal-dark); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { opacity: .5; }
h1 { font-size: 1.6rem; margin: 4px 0 4px; color: var(--navy); }
h2 { font-size: 1.1rem; margin: 26px 0 12px; color: var(--navy); }
.sub { color: var(--muted); margin: 0 0 18px; }

/* cards */
.grid { display: grid; gap: 14px; }
.grid.big { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.std { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.crit { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 16px 14px; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; position: relative;
}
.tile:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 6px 20px rgba(14,124,134,.16); }
.tile:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #86c5cb; outline-offset: 2px; }
.tile .t { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.tile .s { color: var(--muted); font-size: .85rem; }
.tile.hero { padding: 26px 24px; gap: 8px; min-height: 150px; }
.tile.hero .t { font-size: 1.4rem; }
.tile.hero .ico { width: 46px; height: 46px; border-radius: 12px; background: #e3f3f4; color: var(--teal-dark); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 4px; }
.tile.std-tile { align-items: flex-start; }
.tile.std-tile .t { font-size: 1.02rem; }
.tile.crit-tile .id { font-weight: 800; font-size: 1.25rem; color: var(--teal-dark); }
.tile.crit-tile .pv { color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; width: fit-content; }
.badge.zero { background: var(--red-bg); color: var(--red); }
.badge.some { background: var(--green-bg); color: var(--green); }
.badge.blank { background: #eceff2; color: var(--muted); }

/* standard header card */
.std-head { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--teal); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.std-head .kicker { color: #1d5f8a; font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.doc p { margin: 0 0 10px; }
.doc .hd { font-weight: 800; letter-spacing: .4px; margin: 0 0 8px; color: var(--navy); }
.doc .gl { font-weight: 700; margin: 12px 0 6px; }
.doc ul, .doc ol { margin: 0 0 10px; padding-left: 26px; }
.doc ul ul { list-style: circle; margin: 4px 0; }
.doc li { margin: 3px 0; }

/* folder */
.folder { margin-top: 18px; position: relative; }
.folder-tab { display: inline-flex; align-items: center; gap: 8px; background: #f4c95d; color: #5a4300; font-weight: 700; padding: 8px 18px 8px 14px; border-radius: 12px 12px 0 0; font-size: .95rem; }
.folder-body { background: #fffbef; border: 1px solid #ecd58f; border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 18px; box-shadow: var(--shadow); }
.folder-body h3 { margin: 0 0 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; color: #7a5f10; }
.doc-tile { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px 10px 12px; cursor: pointer; box-shadow: var(--shadow); }
.doc-tile:hover { border-color: #2b5797; }
.ftype { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .7rem; color: #fff; flex: none; letter-spacing: .3px; }
.ft-word { background: #2b5797; } .ft-pdf { background: #c0392b; } .ft-xls { background: #1e7145; } .ft-img { background: #8e44ad; } .ft-ppt { background: #d35400; } .ft-other { background: #6b7a86; } .ft-vid { background: #16697a; } .ft-txt { background: #4b5b68; }
.doc-tile .n { font-weight: 700; }
.doc-tile .m { font-size: .78rem; color: var(--muted); display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 12px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=text] { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; min-width: 190px; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 10px; padding: 8px 14px; font-weight: 600; text-decoration: none; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.danger { color: var(--red); border-color: #efb5b0; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 5px 10px; font-size: .84rem; }
.drop { border: 2px dashed #d9bd65; border-radius: 12px; padding: 14px; text-align: center; color: #7a5f10; background: rgba(255,255,255,.6); font-size: .9rem; }
.drop.over { background: #fff2c7; border-color: #c79a12; }
.files { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.frow { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.frow .info { flex: 1; min-width: 0; }
.frow .nm { font-weight: 600; overflow-wrap: anywhere; }
.frow .mt { font-size: .78rem; color: var(--muted); }
.frow .act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { color: var(--muted); padding: 10px 2px; }
.note { background: var(--amber-bg); border: 1px solid #f0dca0; color: #6d5410; border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin-top: 10px; }
.bar { height: 6px; background: #e6ebf0; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--teal); transition: width .2s; }
.err { color: var(--red); font-size: .84rem; margin-top: 4px; }

/* overlay */
.overlay { position: fixed; inset: 0; background: rgba(9, 27, 40, .66); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 18px; }
.overlay[hidden], .toast[hidden] { display: none; }
.modal { background: #fff; border-radius: 16px; width: min(760px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.modal.wide { width: min(1100px, 100%); height: 92vh; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-h .ttl { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-b { padding: 18px 20px; overflow: auto; flex: 1; }
.modal-b.flush { padding: 0; background: #e9edf1; display: flex; }
.modal-b iframe, .modal-b video { width: 100%; height: 100%; border: 0; background: #fff; }
.modal-b img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.modal-b audio { margin: 40px auto; }
.paper { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 34px 40px; margin: 4px auto; max-width: 680px; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 1.02rem; }
.nopreview { margin: auto; text-align: center; padding: 30px; }
.form label { display: block; font-weight: 600; font-size: .88rem; margin: 12px 0 4px; }
.form input, .form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.form textarea { min-height: 80px; resize: vertical; }
.form .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(rgba(8,30,50,.35), rgba(8,30,50,.35)), url("../img/login-bg.jpg") center / cover no-repeat #0f3d5c; }
.login { background: #fff; border-radius: 18px; width: min(400px, 100%); padding: 30px 28px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.login .brand-mark { background: var(--navy); margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 14px; }
.login .brand-mark svg { fill: #fff; width: 30px; height: 30px; }
.login h1 { text-align: center; font-size: 1.35rem; margin: 0; }
.login p.sub { text-align: center; margin: 4px 0 18px; font-size: .9rem; }
.login .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 11px; }
.login .err { text-align: center; margin-top: 12px; }

table.log { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .9rem; }
table.log th, table.log td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.log th { background: #eef3f7; color: var(--navy); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #16283a; color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 80; box-shadow: 0 8px 30px rgba(0,0,0,.3); max-width: 90vw; }
.meet { display: flex; gap: 14px; align-items: flex-start; }
.meet .dt { background: #e3f3f4; color: var(--teal-dark); border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: .82rem; text-align: center; min-width: 74px; flex: none; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-right: 6px; }

@media (max-width: 640px) {
  main { padding: 16px 14px 50px; }
  .topbar { padding: 10px 12px; }
  .brand-text span { display: none; }
  .paper { padding: 22px 18px; }
  .frow { flex-wrap: wrap; }
  .frow .act { width: 100%; justify-content: flex-start; }
  .modal.wide { height: 96vh; }
}
@media print { .topbar, .toolbar, .overlay, .toast { display: none !important; } }

.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }
.brand-mark:has(img) { background: transparent; border-radius: 50%; }
.login .brand-mark { background: transparent; width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px; }

/* header: bigger logo, glowing department name */
.topbar { padding: 10px 20px; }
.brand-mark { width: 54px; height: 54px; }
.brand-text b { font-size: 1.15rem; }
.brand-text span { font-size: .82rem; opacity: .9; }
.dept {
  flex: 1; text-align: center; color: #fff; font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 2rem); letter-spacing: .12em; white-space: nowrap;
  text-shadow: 0 0 6px rgba(120,220,255,.9), 0 0 14px rgba(60,190,255,.75), 0 0 28px rgba(30,160,255,.55);
  animation: deptGlow 3s ease-in-out infinite alternate;
}
@keyframes deptGlow {
  from { text-shadow: 0 0 5px rgba(120,220,255,.8), 0 0 12px rgba(60,190,255,.6), 0 0 22px rgba(30,160,255,.4); }
  to   { text-shadow: 0 0 8px rgba(160,235,255,1), 0 0 20px rgba(70,200,255,.9), 0 0 38px rgba(30,160,255,.7); }
}
@media (prefers-reduced-motion: reduce) { .dept { animation: none; } }
.home-title { font-size: 1.6rem; font-weight: 800; line-height: 1.25; margin: 6px 0 18px; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .dept { order: 5; flex: 1 0 100%; font-size: 1.05rem; letter-spacing: .08em; white-space: normal; padding-top: 2px; }
  .brand { flex: 1; }
  .home-title { font-size: 1.2rem; }
}

/* =========================================================
   Theme layer: navy, gold, teal and ice-blue (design brief)
   ========================================================= */
:root {
  --navy: #0b2239; --navy-2: #102c45; --navy-3: #244d67;
  --gold: #e5bd61; --gold-hi: #fff2c7; --gold-mid: #f7d68c; --gold-lo: #b98a1e;
  --teal: #0f7480; --teal-dark: #07515e;
  --ice: #f2faff; --ice-2: #dcecf5; --ink: #183d4b;
  --bg: #e9f3f9; --text: #183d4b; --line: #cfe0ea;
  --shadow: 0 1px 2px rgba(11,34,57,.10), 0 8px 22px rgba(11,34,57,.10);
}
body {
  font-family: "Avenir Next", Aptos, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #dcecf5 0%, #eef6fb 320px, #eef6fb 100%) fixed;
}
h1, h2 { color: var(--navy); }
h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--gold-mid), var(--gold-lo)); }

/* top bar */
.topbar { background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%); box-shadow: 0 6px 18px rgba(11,34,57,.35); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi) 30%, var(--gold) 55%, var(--gold-lo)); }
.brand-mark:has(img) { box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0,0,0,.4); background: #d9f3fb; }
.brand-text b { color: var(--gold-mid); }
.brand-text span { color: #f4faff; }
.chip { background: rgba(229,189,97,.18); color: var(--gold-hi); border: 1px solid rgba(229,189,97,.45); }
.topbtn { border-color: rgba(229,189,97,.6); color: var(--gold-hi); }
.topbtn:hover { background: rgba(229,189,97,.16); }
.crumbs a { color: var(--teal-dark); font-weight: 600; }

/* hero band on home */
.hero-band {
  position: relative; border-radius: 20px; padding: 34px 30px; margin: 0 0 20px; overflow: hidden;
  background: linear-gradient(100deg, rgba(11,34,57,.94) 0%, rgba(11,34,57,.78) 55%, rgba(11,34,57,.35) 100%), url("../img/login-bg.jpg") center 35% / cover no-repeat #0b2239;
  box-shadow: var(--shadow); border-bottom: 4px solid var(--gold);
}
.hero-band .home-title { color: var(--ice); margin: 0; max-width: 760px; font-size: 1.7rem; text-shadow: 0 2px 10px rgba(0,0,0,.45); }

/* tiles */
.tile { border-color: var(--line); background: linear-gradient(180deg, #fff, var(--ice)); overflow: hidden; }
.tile:hover { border-color: var(--gold); box-shadow: 0 10px 26px rgba(11,34,57,.18); }
.tile.hero, .tile.std-tile {
  background: linear-gradient(160deg, var(--navy-3) 0%, var(--navy-2) 45%, var(--navy) 100%);
  border: 1px solid rgba(229,189,97,.45); color: #f4faff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 22px rgba(11,34,57,.28);
}
.tile.hero .t, .tile.std-tile .t { color: var(--gold-mid); }
.tile.hero .s, .tile.std-tile .s { color: #d5e6f0; }
.tile.hero .ico { background: linear-gradient(160deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); color: var(--navy); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.tile.hero::after, .tile.std-tile::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,242,199,.28), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none;
}
.tile.hero:hover::after, .tile.std-tile:hover::after { opacity: 1; animation: sweep .9s ease; }
@keyframes sweep { from { left: -60%; } to { left: 130%; } }
.tile.hero:hover, .tile.std-tile:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11,34,57,.4), 0 0 0 1px var(--gold); }
.tile.hero { min-height: 170px; }
.tile.hero .t { font-size: 1.5rem; }
.tile.std-tile .t { font-size: 1.12rem; }
.tile.crit-tile { border-top: 4px solid var(--gold); background: linear-gradient(180deg, #fff, var(--ice)); }
.tile.crit-tile .id { color: var(--teal-dark); }

/* standard header and reading surfaces */
.std-head { background: linear-gradient(180deg, #fff, var(--ice)); border-color: var(--ice-2); border-left: 6px solid var(--gold); }
.std-head .kicker { color: #1d5f8a; }
.doc .hd { color: var(--navy); }

/* folder in gold */
.folder-tab { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #d7a93f); color: #3f2f05; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.folder-body { background: linear-gradient(180deg, #fffaf0, #fff5dc); border-color: #e2c26f; }
.folder-body h3 { color: #7a5a0c; }
.drop { border-color: var(--gold-lo); }

/* buttons: polished gold primary */
.btn { border-color: var(--line); color: var(--navy); background: linear-gradient(180deg, #fff, #eef5fa); }
.btn:hover { border-color: var(--gold); }
.btn.primary {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold-mid) 30%, var(--gold) 65%, #d0a03a 100%);
  border-color: var(--gold-lo); color: #10263a; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 3px 8px rgba(120,86,10,.35);
}
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.danger { background: #fff; }
.bar > i { background: linear-gradient(90deg, var(--gold), var(--gold-hi)); }

/* modals */
.modal-h { background: linear-gradient(180deg, var(--navy-2), var(--navy)); border-bottom: 3px solid var(--gold); color: #f4faff; }
.modal-h .ttl { color: var(--gold-hi); }
.modal-h .btn { background: transparent; color: var(--gold-hi); border-color: rgba(229,189,97,.6); }
.modal-h .btn:hover { background: rgba(229,189,97,.16); }
.modal-h .btn.primary { color: #10263a; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.modal-h .btn.danger { color: #ffb4ae; border-color: rgba(255,180,174,.6); }

/* login */
.login { border-top: 5px solid var(--gold); background: linear-gradient(180deg, #fff, var(--ice)); }
.login h1 { color: var(--navy); }
.login .brand-mark:has(img) { box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(0,0,0,.25); }
.login .btn { background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid) 30%, var(--gold) 65%, #d0a03a); color: #10263a; border-color: var(--gold-lo); font-weight: 700; }

table.log th { background: var(--ice-2); }
.meet .dt { background: var(--ice-2); color: var(--navy); }

@media (max-width: 760px) {
  .hero-band { padding: 22px 18px; border-radius: 16px; }
  .hero-band .home-title { font-size: 1.15rem; }
  .tile.hero { min-height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .btn { transition: none; }
  .tile.hero:hover::after, .tile.std-tile:hover::after { animation: none; opacity: 0; }
}

/* phone landscape and short windows */
.topbtn, .chip { white-space: nowrap; }
@media (max-height: 480px) and (orientation: landscape) {
  .topbar { position: relative; padding: 6px 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .dept { font-size: 1.05rem; }
  .brand-text span { display: none; }
  .hero-band { padding: 16px 20px; margin-bottom: 14px; }
  .hero-band .home-title { font-size: 1.05rem; }
  .tile.hero { min-height: 120px; padding: 16px; }
  main { padding-top: 14px; }
}

/* larger "Jaber Hub" name */
.brand-text b { font-size: 1.7rem; line-height: 1.1; letter-spacing: .3px; }
.brand-text span { font-size: .9rem; }
.login h1 { font-size: 2.2rem; line-height: 1.15; margin-top: 4px; }
.login p.sub { font-size: 1rem; }
@media (max-width: 760px) { .brand-text b { font-size: 1.4rem; } .dept { font-size: 1.05rem; } }
@media (max-height: 480px) and (orientation: landscape) { .brand-text b { font-size: 1.4rem; } }
.brand-text b { white-space: nowrap; }
@media (max-width: 760px) { .brand-text b { font-size: 1.3rem; } .brand-mark { width: 46px; height: 46px; } .topbtn { padding: 5px 9px; } }

/* Department name: polished gold lettering with a soft travelling light sweep (replaces the glow) */
.dept {
  color: transparent; -webkit-text-fill-color: transparent; text-shadow: none; animation: none;
  background:
    linear-gradient(105deg, transparent 42%, rgba(255,255,255,.75) 50%, transparent 58%) 160% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, #fff2c7 0%, #f7d68c 32%, #e5bd61 58%, #b98a1e 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1px 0 #6d4f0a) drop-shadow(0 3px 5px rgba(0,0,0,.45));
  animation: deptSweep 6s ease-in-out infinite;
}
@keyframes deptSweep {
  0%, 15% { background-position: 160% 0, 0 0; }
  55%, 100% { background-position: -60% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) { .dept { animation: none; } }

/* larger breadcrumb and sub text */
.crumbs { font-size: 1.1rem; gap: 9px; margin-bottom: 16px; }
.crumbs a, .crumbs span { font-weight: 600; }
.crumbs span:last-child { color: var(--navy); font-weight: 700; }
.crumbs .sep { opacity: .55; font-weight: 400; }
.sub { font-size: 1.1rem; }
.doc-tile .n { font-size: 1.1rem; }
.doc-tile .m { font-size: .9rem; }
@media (max-width: 640px) { .crumbs { font-size: 1rem; gap: 7px; } .sub { font-size: 1rem; } }

/* criterion page extras */
.lead { font-size: 1.05rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 12px; padding: 12px 16px; margin: 0 0 6px; box-shadow: var(--shadow); }
.drop.empty-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; font-size: 1rem; background: rgba(255,255,255,.7); }
.drop.empty-drop .i { width: 2.2rem; height: 2.2rem; color: var(--gold-lo); }
.drop.empty-drop b { font-size: 1.15rem; color: var(--navy); }
.drop { cursor: pointer; }
.hint { font-size: .82rem; color: #7a5a0c; margin: 8px 2px 0; }
.toolbar input.need { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,38,30,.18); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.btn.pg { font-size: 1rem; padding: 10px 18px; }

/* slimmer header */
.topbar { padding: 6px 18px; }
.brand-mark { width: 48px; height: 48px; }
.brand-text b { font-size: 1.5rem; }
.brand-text span { font-size: .85rem; }
.dept { font-size: clamp(1.05rem, 2.1vw, 1.7rem); }
@media (max-width: 760px) {
  .topbar { position: relative; }
  .brand-text b { font-size: 1.3rem; }
  .brand-mark { width: 44px; height: 44px; }
}

/* ---------- compliance status, tabs, checklist, notes, readiness ---------- */
:root { --c-met: #2e9e66; --c-partial: #f0b429; --c-notmet: #d64545; --c-na: #9fb4c3; --c-ns: #d3dde5; }
.sbadge { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; width: fit-content; }
.s-ns { background: #eceff2; color: #4c5b67; } .s-met { background: #e3f5ea; color: #16683f; }
.s-partial { background: #fff1cc; color: #7a5200; } .s-notmet { background: #fdecea; color: #a5241c; } .s-na { background: #e3eef6; color: #2b5877; }
.seg-met { background: var(--c-met); } .seg-partial { background: var(--c-partial); } .seg-notmet { background: var(--c-notmet); } .seg-na { background: var(--c-na); } .seg-ns { background: var(--c-ns); }
.stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--c-ns); width: 100%; }
.stack.tall { height: 14px; } .stack i { display: block; height: 100%; }
.tile.std-tile .stack { background: rgba(255,255,255,.22); margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .9rem; color: var(--ink); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.std-prog { margin: 14px 0 4px; }
.tile.crit-tile { gap: 8px; }

.namebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 10px; }
.namebar label { font-weight: 700; color: var(--navy); }
.namebar input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; min-width: 240px; }
.namebar input.need, .toolbar input.need { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,38,30,.18); }
.namebar .hint { margin: 0; }
.statusbar { background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.statusbar .sl, .suggest .sl { font-weight: 700; color: var(--navy); margin-bottom: 8px; font-size: .95rem; }
.spills { display: flex; flex-wrap: wrap; gap: 8px; }
.spill { border: 2px solid transparent; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .95rem; background: #fff; border-color: var(--line); color: var(--ink); }
.spill:hover { border-color: var(--gold); }
.spill.on.s-met { background: var(--c-met); border-color: #1f7d4e; color: #fff; }
.spill.on.s-partial { background: var(--c-partial); border-color: #c4901a; color: #3d2a00; }
.spill.on.s-notmet { background: var(--c-notmet); border-color: #a92f2f; color: #fff; }
.spill.on.s-na { background: #6f93ab; border-color: #55788f; color: #fff; }
.spill.on.s-ns { background: #56636e; border-color: #3f4b55; color: #fff; }
.statusbar .hint { margin: 8px 0 0; color: var(--muted); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; border-bottom: 3px solid var(--gold); }
.tab { background: linear-gradient(180deg, #fff, #e8f1f7); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 10px 20px; font-weight: 700; font-size: 1rem; color: var(--navy); display: inline-flex; align-items: center; gap: 8px; }
.tab .tc { background: var(--ice-2); border-radius: 999px; padding: 1px 9px; font-size: .82rem; }
.tab.on { background: linear-gradient(180deg, var(--navy-3), var(--navy-2)); color: var(--gold-hi); border-color: var(--navy-2); }
.tab.on .tc { background: rgba(229,189,97,.25); color: var(--gold-hi); }
.panel { background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 18px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 10px; font-size: 1.1rem; color: var(--navy); }
.tabs + .folder { margin-top: 0; }
.tabs + .folder .folder-tab { display: none; }
.tabs + .folder .folder-body { border-radius: 0 0 14px 14px; border-top: 0; }

.cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 8px; }
.cl-head h3 { margin: 0; } .cl-count { color: var(--muted); font-weight: 600; } .bar.wide { flex: 1 0 160px; height: 10px; margin: 0; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cl-row.done { background: #f1faf5; border-color: #bfe3cf; }
.cl-main { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; cursor: pointer; }
.cl-main input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--c-met); flex: none; }
.cl-text { font-size: 1.02rem; overflow-wrap: anywhere; } .cl-row.done .cl-text { color: #3d6b52; }
.cl-det { margin: 6px 0 0; padding-left: 20px; font-size: .92rem; color: var(--muted); }
.cl-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chip2 { display: inline-flex; align-items: center; gap: 3px; background: var(--ice-2); color: var(--navy); border-radius: 999px; padding: 2px 9px; font-size: .82rem; font-weight: 700; }
.cl-add { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cl-add input { flex: 1 1 240px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; } .suggest .sl { margin: 0; }
.chipbtn { border: 1px dashed var(--gold-lo); background: #fffaf0; color: #6b4d0a; border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-weight: 600; }
.chipbtn:hover { background: #fff1cc; }
.frow .for { font-size: .82rem; color: var(--teal-dark); font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }

.note-add { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.note-add textarea { width: 100%; min-height: 96px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; resize: vertical; }
.notes { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.note-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 12px; padding: 10px 14px; }
.note-card .nh { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-bottom: 4px; } .note-card .nh span { color: var(--muted); font-size: .85rem; flex: 1; }
.note-card p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.ready { margin-top: 26px; }
.ready-top { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; background: linear-gradient(160deg, var(--navy-3), var(--navy-2) 45%, var(--navy)); color: #f4faff; border: 1px solid rgba(229,189,97,.45); border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow); }
.bignum { display: flex; flex-direction: column; } .bignum b { font-size: 3rem; line-height: 1; color: var(--gold-mid); } .bignum span { font-size: .95rem; margin-top: 4px; color: #d5e6f0; }
.grow-bar { flex: 1 1 320px; } .ready-top .legend { color: #e6f0f7; } .ready-top .stack { background: rgba(255,255,255,.2); }
.ready-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.card { background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--navy); }
.std-rows { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow: auto; }
.std-row { display: grid; grid-template-columns: 96px 1fr 46px; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 5px 6px; border-radius: 8px; font-size: .95rem; font-weight: 600; }
.std-row:hover { background: var(--ice-2); } .std-row .ct { text-align: right; color: var(--muted); font-weight: 600; }
.gap-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.gap-row { display: grid; grid-template-columns: 44px auto 1fr; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.gap-row:hover { border-color: var(--gold); } .gap-row .gt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; min-width: 0; }
@media (max-width: 640px) {
  .namebar input { min-width: 0; flex: 1 1 200px; }
  .spill { padding: 8px 12px; font-size: .9rem; }
  .tab { padding: 9px 12px; font-size: .92rem; }
  .cl-row { flex-direction: column; } .cl-act { justify-content: flex-start; }
  .gap-row { grid-template-columns: 40px 1fr; } .gap-row .gt { grid-column: 1 / -1; white-space: normal; }
  .std-row { grid-template-columns: 82px 1fr 40px; } .bignum b { font-size: 2.4rem; }
}
@media (max-width: 640px) {
  .std-row { grid-template-columns: 96px 1fr 40px; white-space: nowrap; }
  .gap-row .gt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
}

/* breadcrumb as a navigation bar */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: 0 0 18px; padding: 8px 12px;
  background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line); border-bottom: 3px solid var(--gold);
  border-radius: 14px; box-shadow: var(--shadow); font-size: 1.05rem;
}
.crumbs a, .crumbs > span:not(.sep) { padding: 6px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.crumbs a { color: var(--teal-dark); }
.crumbs a:hover { background: var(--ice-2); text-decoration: none; }
.crumbs > span:not(.sep):last-child {
  color: #10263a; background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid) 40%, var(--gold));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 3px rgba(120,86,10,.3);
}
.crumbs .sep { color: var(--gold-lo); font-size: 1.4rem; line-height: 1; opacity: 1; padding: 0 1px; }
@media (max-width: 640px) { .crumbs { font-size: .95rem; padding: 6px 8px; } .crumbs a, .crumbs > span:not(.sep) { padding: 5px 9px; } }
@media (max-width: 640px) {
  .crumbs { font-size: .88rem; gap: 2px; padding: 6px 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs a, .crumbs > span:not(.sep) { padding: 5px 7px; white-space: nowrap; }
  .crumbs .sep { font-size: 1.1rem; padding: 0; }
}

.hint2 { font-size: .78rem; color: var(--muted); max-width: 150px; line-height: 1.2; }

/* status labels in capitals */
.spill, .sbadge, .legend .lg { text-transform: uppercase; letter-spacing: .04em; }
.spill { font-size: .88rem; }
.sbadge { font-size: .72rem; }

/* full-colour panels, soft teal, normal weight */
h2::before { content: none; display: none; }
.lead, .std-head {
  background: linear-gradient(135deg, #e3f3fd 0%, #cfe9fa 100%);
  color: #12343b; border: 1px solid #a9d3ee; border-left: 1px solid #a9d3ee;
  border-radius: 16px; box-shadow: 0 4px 14px rgba(40,120,180,.14);
}
.lead { font-size: 1.2rem; font-weight: 500; line-height: 1.5; padding: 18px 22px; margin: 0 0 12px; }
.std-head { padding: 20px 24px; font-size: 1.05rem; font-weight: 400; line-height: 1.5; }
.std-head .kicker { color: #1d5f8a; font-size: 1.05rem; font-weight: 600; }
.std-head .doc { font-size: 1.05rem; font-weight: 400; }
.std-head .hd, .std-head .doc .hd { color: #1d5f8a; font-size: 1.35rem; font-weight: 600; letter-spacing: 0; }
.std-head .gl { color: #1d5f8a; font-size: 1.05rem; font-weight: 600; }
.std-head li { font-weight: 400; font-size: 1.05rem; }
.std-head .btn { font-weight: 600; }
.note-card { background: linear-gradient(180deg, #fff8e3, #fff1cc); border: 1px solid #e2c26f; border-left: 1px solid #e2c26f; border-radius: 12px; }
.note-card p { font-size: 1.05rem; font-weight: 500; }
@media (max-width: 640px) { .lead { font-size: 1.05rem; padding: 14px 16px; } .std-head { padding: 14px 16px; font-size: 1rem; } .std-head .hd { font-size: 1.2rem; } }

/* thicker subtitle and helper text */
.sub { color: var(--navy); font-weight: 600; font-size: 1.25rem; white-space: pre-wrap; letter-spacing: .2px; margin-bottom: 14px; }
.hint, .statusbar .hint { font-weight: 700; color: #5c4508; }
.statusbar .hint { color: #3f5566; }
.cl-count, .doc-tile .m { font-weight: 700; }
@media (max-width: 640px) { .sub { font-size: 1.15rem; } }
/* keep the gold primary button gold on hover */
.btn.primary:hover, .btn.primary:focus-visible {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold-mid) 30%, var(--gold) 65%, #d0a03a 100%);
  border-color: var(--gold-lo); color: #10263a; filter: brightness(1.07);
}

/* login subtitle back to normal weight */
.login p.sub { font-weight: 400; font-size: 1rem; color: var(--muted); letter-spacing: 0; }

/* ---- clean phone header (final override) ---- */
@media (max-width: 640px) {
  .topbar { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand actions" "dept dept";
    align-items: center; column-gap: 10px; row-gap: 6px; padding: 10px 12px 9px; }
  .topbar .brand { grid-area: brand; gap: 9px; }
  .topbar .brand-mark { width: 44px; height: 44px; }
  .topbar .brand-text b { font-size: 1.25rem; }
  .topbar .brand-text span { display: none; }
  .topbar .actions { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: nowrap; }
  .topbar .chip { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .topbar .dept { grid-area: dept; text-align: center; font-size: .95rem; letter-spacing: .1em; white-space: nowrap;
    padding: 6px 0 0; border-top: 1px solid rgba(229,189,97,.35); margin: 0; }
}

.topbar .actions { display: contents; }
@media (max-width: 640px) { .topbar .actions { display: flex; } }
@media (max-width: 640px) {
  .topbar a.topbtn { font-size: 0; gap: 0; padding: 7px 9px; }
  .topbar a.topbtn svg { width: 18px; height: 18px; }
  .topbar .actions { gap: 6px; min-width: 0; }
  .topbar .chip { max-width: 84px; }
}
@media (max-width: 640px) {
  .topbar .brand-text b { font-size: 1.12rem; }
  .topbar .brand-mark { width: 40px; height: 40px; }
  .topbar .chip { max-width: 100px; padding: 4px 9px; font-size: .78rem; }
  .topbar button.topbtn { padding: 6px 9px; font-size: .8rem; }
}

/* login card: gold line all around */
.login { border: 3px solid var(--gold); }

/* three home cards */
.grid.big.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.big.three { grid-template-columns: 1fr; } }

/* home title: two lines, lighter weight */
.hero-band .home-title { max-width: none; font-weight: 500; }
.home-title .ht1, .home-title .ht2 { display: block; }
.home-title .ht1 { font-size: 1.7rem; font-weight: 600; letter-spacing: .2px; }
.home-title .ht2 { font-size: 1.2rem; font-weight: 400; margin-top: 4px; opacity: .92; }
@media (max-width: 640px) { .home-title .ht1 { font-size: 1.2rem; } .home-title .ht2 { font-size: .95rem; } }
