/* CSCNL Board Portal — styled after cscnl.ca (Urbanist, deep navy, bright blue, warm paper, accent dots). */
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/urbanist-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/urbanist-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/urbanist-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/urbanist-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/urbanist-latin-900-normal.woff2') format('woff2'); }
:root {
  --navy: #0C2436;
  --navy-deep: #071A28;
  --navy-hero: #0F2E4A;
  --blue: #1779BA;
  --blue-dark: #115f94;
  --royal: #1D57A5;
  --magenta: #BA3C8B;
  --yellow: #FFBF3F;
  --orange: #FB914A;
  --teal: #00A7B5;
  --paper: #FAF9F7;
  --white: #fff;
  --ink: #0C2436;
  --ink-2: #44596a;
  --line: #e6e2dc;
  --line-2: #cfc9c0;
  --danger: #b42318;
  --success: #1c7a4a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(12, 36, 54, .05), 0 6px 20px rgba(12, 36, 54, .06);
  --shadow-hover: 0 2px 4px rgba(12, 36, 54, .06), 0 14px 32px rgba(12, 36, 54, .12);
  --font: 'Urbanist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --texture: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 16px);
}
html { font-size: 19px; }
html.large-text { font-size: 22px; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); font-weight: 500; line-height: 1.55;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; font-weight: 800; margin: 0 0 .5em; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.section { padding: 40px 24px 56px; }
.muted { color: var(--ink-2); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.empty { color: var(--ink-2); font-size: 1.05rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 800; z-index: 10; }
.skip-link:focus { left: 8px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy-deep); color: rgba(255, 255, 255, .72); font-size: .74rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-size {
  display: inline-flex; align-items: baseline; gap: 2px; background: none; border: 1px solid rgba(255, 255, 255, .28);
  color: #fff; border-radius: 999px; padding: 3px 12px; font: inherit; font-weight: 700; cursor: pointer; flex: none;
}
.text-size:hover { background: rgba(255, 255, 255, .1); }
.text-size .ts-small { font-size: .8em; }
.text-size .ts-big { font-size: 1.15em; margin-right: 6px; }
.text-size[aria-pressed="true"] { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }

.site-header { background: var(--navy); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 18px; color: #fff; text-decoration: none; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-word { font-size: 2rem; font-weight: 800; color: #fff; }
.brand-label { border-left: 2px solid rgba(255, 255, 255, .25); padding-left: 18px; font-weight: 800; font-size: 1.15rem; }
.header-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link { color: #fff; text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 8px; display: inline-flex; gap: 8px; align-items: center; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-link.is-active { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.nav-user { color: rgba(255, 255, 255, .78); padding: 0 10px 0 14px; border-left: 1px solid rgba(255, 255, 255, .2); margin-left: 6px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  background: var(--texture), linear-gradient(120deg, var(--navy-hero) 0%, #123b5e 60%, #164a72 100%);
  color: #fff; padding: 44px 0 40px;
}
.hero h1 { font-size: 2.3rem; margin: 0 0 .25em; }
.hero .lead { color: rgba(255, 255, 255, .86); font-size: 1.12rem; margin: 0; max-width: 60ch; }
.hero-row { display: flex; align-items: center; gap: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; text-decoration: none; margin-bottom: 18px; opacity: .9; }
.back-link:hover { color: #fff; opacity: 1; text-decoration: underline; }
.back-link.dark { color: var(--blue); margin: 0; }
.dots { display: flex; gap: 7px; margin-top: 22px; }
.dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--magenta); }
.dots span:nth-child(2) { background: var(--yellow); }
.dots span:nth-child(3) { background: var(--orange); }
.dots span:nth-child(4) { background: var(--teal); }

/* ---------- Colour swatches ---------- */
.swatch { width: 62px; height: 62px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; flex: none; }
.swatch .icon { width: 28px; height: 28px; }
.swatch-lg { width: 76px; height: 76px; }
.swatch-lg .icon { width: 34px; height: 34px; }
.c-blue { background: var(--blue); color: #fff; }
.c-royal { background: var(--royal); color: #fff; }
.c-teal { background: #008c98; color: #fff; }
.c-magenta { background: var(--magenta); color: #fff; }
.c-orange { background: #e8762c; color: #fff; }
.c-yellow { background: var(--yellow); color: var(--navy); }
.c-navy { background: var(--navy); color: #fff; }

/* ---------- Section titles (lowercase, like cscnl.ca) ---------- */
.section-title { font-size: 1.7rem; text-transform: lowercase; margin: 44px 0 20px; display: flex; align-items: center; gap: 14px; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.search + .section-title { margin-top: 36px; }

/* ---------- Search ---------- */
.search { position: relative; display: flex; gap: 10px; max-width: 760px; }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-2); display: flex; }
.search input[type=search] {
  flex: 1; min-width: 0; height: 60px; padding: 0 18px 0 52px; font: inherit; font-size: 1.05rem;
  border: 2px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink);
}
.search input[type=search]:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(23, 121, 186, .2); }
.search .btn { height: 60px; }

/* ---------- Category tiles ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; height: 100%; padding: 26px 26px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--blue); }
.tile-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tile-title { font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.tile-desc { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.tile-meta { margin-top: 6px; font-size: .84rem; font-weight: 700; color: var(--blue); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tile-arrow { position: absolute; top: 26px; right: 24px; color: var(--line-2); transition: color .15s, transform .15s; }
.tile:hover .tile-arrow { color: var(--blue); transform: translateX(3px); }

.pill { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); vertical-align: middle; }
.pill-new { background: var(--yellow); color: var(--navy); border-color: var(--yellow); text-transform: uppercase; }
.pill-admin { background: #e9f3fa; color: var(--blue-dark); border-color: #cfe4f3; }

/* ---------- Document list ---------- */
.doc-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.doc {
  display: flex; align-items: center; gap: 18px; padding: 16px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.doc:hover { border-color: var(--line-2); }
.doc-type {
  width: 50px; height: 58px; border-radius: 6px 14px 6px 6px; display: grid; place-items: center; flex: none;
  font-size: .72rem; font-weight: 900; letter-spacing: .04em;
}
.doc-type.sm { width: 38px; height: 26px; border-radius: 5px; font-size: .62rem; display: inline-grid; vertical-align: middle; margin-right: 8px; }
.doc-main { flex: 1; min-width: 0; }
.doc-title { font-weight: 700; font-size: 1.06rem; color: var(--ink); text-decoration: none; margin-right: 10px; }
.doc-title:hover { color: var(--blue); text-decoration: underline; }
.doc-meta { color: var(--ink-2); font-size: .86rem; margin-top: 2px; }
.doc-meta .sep { margin: 0 8px; color: var(--line-2); }
.doc-open { flex: none; }
.year-heading { font-size: 1.1rem; color: var(--ink-2); margin: 32px 0 14px; display: flex; align-items: center; gap: 14px; }
.year-heading:first-child { margin-top: 0; }
.year-heading::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: .66em 1.25em; border-radius: 8px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ms { background: #fff; color: #2f2f2f; border-color: #8c8c8c; }
.btn-ms:hover { background: #f3f3f3; color: #2f2f2f; }
.ms-logo { width: 21px; height: 21px; }
.btn-sm { font-size: .84rem; padding: .45em .85em; }
.btn-lg { font-size: 1.08rem; padding: .85em 1.5em; }
.btn-block { width: 100%; }

/* ---------- Cards, forms, alerts ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px; }
.card-title { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.card-title .count { font-size: .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head .card-title { margin: 0; }
.center-card { text-align: center; }
.center-card .swatch { margin-bottom: 16px; }

.field { margin-bottom: 18px; }
.field label, .field > .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.optional { font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 2px solid var(--line-2); border-radius: 8px; padding: .62em .85em; min-height: 52px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(23, 121, 186, .2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid.three { grid-template-columns: 1.2fr 1.4fr 1fr; }
.span-2 { grid-column: span 2; }
.check { display: flex; align-items: center; gap: 10px; margin: 2px 0 20px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }
.filter-form select { min-width: 220px; min-height: 44px; padding: .4em .8em; }

.alert { padding: 14px 18px; border-radius: 8px; border-left: 5px solid; margin-bottom: 16px; font-weight: 600; }
.alert-success { background: #e7f5ed; border-color: var(--success); color: #0f4d2e; }
.alert-error { background: #fdecea; border-color: var(--danger); color: #7a1a12; }
.alert-info { background: #e8f2fa; border-color: var(--blue); color: #0d4670; }
.flash-stack { padding-top: 24px; margin-bottom: -16px; }

/* ---------- Upload dropzone ---------- */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--paper); padding: 34px 20px; margin-bottom: 22px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over, .dropzone:focus-within { border-color: var(--blue); background: #eef6fc; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin-bottom: 6px; }
.dz-icon .icon { width: 26px; height: 26px; }
.dz-text { font-size: 1.08rem; }
.dz-text strong { color: var(--blue); }
.dz-hint { font-size: .8rem; color: var(--ink-2); }
.dz-files { font-weight: 700; color: var(--ink); font-size: .9rem; }
.dz-files:not(:empty) { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; }

/* ---------- Admin ---------- */
.admin-bar { background: #fff; border-bottom: 1px solid var(--line); }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 18px 18px 15px; font-weight: 700; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a.is-active { color: var(--navy); border-bottom-color: var(--blue); }
.table-wrap { overflow-x: auto; margin: 0 -8px; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 10px 8px; border-bottom: 2px solid var(--line); }
table.data td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td a { font-weight: 700; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions .btn, table.data .actions form { margin: 2px 0 2px 4px; }
tr.is-inactive td { opacity: .6; }
.status { font-weight: 700; font-size: .84rem; }
.status::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.status.ok::before { background: var(--success); }
.status.off::before { background: var(--line-2); }
.cat-row { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cat-row .swatch { margin-top: 28px; }
.cat-form { flex: 1; min-width: 280px; }
.cat-fields { display: grid; grid-template-columns: 1.2fr 1fr 1fr .6fr; gap: 0 16px; }
.cat-fields .span-2 { grid-column: span 4; order: 5; }
.cat-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.cat-delete { align-self: flex-end; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- Sign-in pages ---------- */
body.bare { background: var(--texture), linear-gradient(140deg, var(--navy-hero), #164a72); }
body.bare .site-footer { background: transparent; border-top: 1px solid rgba(255, 255, 255, .1); }
.login-shell {
  max-width: 1020px; margin: 48px auto; display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.login-shell.single { grid-template-columns: 1fr; max-width: 600px; }
.login-intro { background: var(--texture), var(--navy); color: #fff; padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-intro .brand-logo { height: 64px; align-self: flex-start; margin-bottom: 36px; }
.login-intro h1 { font-size: 2.4rem; text-transform: lowercase; margin: 0; }
.login-intro p { color: rgba(255, 255, 255, .85); margin: 22px 0 0; font-size: 1.05rem; }
.login-panel { padding: 52px 48px; }
.login-panel h2, .login-panel .card-title { font-size: 1.8rem; justify-content: center; }
.login-panel h2 { justify-content: flex-start; }
.login-form { margin: 0; }
.login-form .muted { margin: 14px 0 0; text-align: center; }
.or { display: flex; align-items: center; gap: 14px; color: var(--ink-2); margin: 24px 0; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-help { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.login-help a { font-weight: 700; }
.sent-state .swatch { margin-bottom: 18px; }
.steps { padding-left: 1.3em; margin: 0 0 18px; }
.steps li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .8); margin-top: 24px; font-size: .9rem; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer-brand .brand-logo { height: 46px; margin-bottom: 12px; }
.footer-brand p { margin: 0; }
.footer-help h2 { color: #fff; font-size: 1.15rem; text-transform: lowercase; }
.footer-help p { margin: 0 0 12px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-contact a { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a:hover { color: var(--yellow); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; padding-bottom: 20px; font-size: .78rem; color: rgba(255, 255, 255, .6); }


/* ---------- Subfolders, breadcrumbs, access ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 18px; font-weight: 700; }
.crumbs a { color: #fff; text-decoration: none; opacity: .9; }
.crumbs a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.crumbs .icon { color: #fff; }
.crumb-sep { color: rgba(255, 255, 255, .45); }
.tiles-sub { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 8px; }
.tiles-sub .tile { flex-direction: row; align-items: center; padding: 20px 22px; }
.tiles-sub .tile .swatch { width: 52px; height: 52px; }
.tiles-sub .tile-arrow { position: static; }
.tiles-sub .tile-title { font-size: 1.12rem; }
.pill-lock { display: inline-flex; align-items: center; gap: 5px; background: #f6ecf3; color: #8a2b67; border-color: #ead2e3; text-transform: none; letter-spacing: 0; }
.pill-lock .icon { width: 12px; height: 12px; }
.pill-role { background: #e8f6f7; color: #006a73; border-color: #c8e9ec; margin: 2px 2px 2px 0; }
.lock-mini { width: 14px; height: 14px; vertical-align: -2px; color: var(--magenta); }
.access-note { display: flex; gap: 12px; align-items: flex-start; background: #f9f0f6; border: 1px solid #ead2e3; color: #6d2252; border-radius: 10px; padding: 14px 18px; margin-bottom: 28px; }
.access-note .icon { margin-top: 3px; color: var(--magenta); }
.section > .section-title:first-child, .access-note + .section-title { margin-top: 0; }

.folder-tree { list-style: none; margin: 18px 0 0; padding: 0; }
.folder-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.folder-row .swatch { width: 46px; height: 46px; }
.folder-row .swatch .icon { width: 22px; height: 22px; }
.folder-row.depth-1 { padding-left: 40px; } .folder-row.depth-2 { padding-left: 80px; }
.folder-row.depth-3, .folder-row.depth-4 { padding-left: 120px; }
.folder-row:not(.depth-0) .swatch { width: 38px; height: 38px; }
.folder-row:not(.depth-0) { position: relative; }
.folder-row:not(.depth-0)::before { content: ""; position: absolute; left: calc(var(--indent, 40px) - 22px); top: 0; height: 50%; width: 14px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); border-bottom-left-radius: 6px; }
.folder-row.depth-2 { --indent: 80px; } .folder-row.depth-3, .folder-row.depth-4 { --indent: 120px; }
.folder-info { flex: 1; min-width: 200px; }
.folder-name { font-weight: 800; font-size: 1.05rem; }
.folder-meta { color: var(--ink-2); font-size: .85rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.folder-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.access-box, .role-picker { border: 2px solid var(--line); border-radius: 10px; padding: 16px 20px 6px; margin: 4px 0 22px; }
.access-box legend, .role-picker legend { font-weight: 800; padding: 0 6px; }
.radio { display: flex; gap: 10px; align-items: center; margin: 6px 0 10px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--blue); }
.role-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; margin: 0 0 8px 30px; }
.role-checks .check, .role-picker .check { margin: 6px 0; }
.role-checks.is-disabled { opacity: .45; }
.role-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.role-picker legend { grid-column: 1 / -1; }
.role-picker > p { grid-column: 1 / -1; }

.role-row { display: flex; gap: 12px; align-items: flex-end; padding: 22px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.role-form { flex: 1; min-width: 280px; }
.role-usage { display: grid; gap: 6px; font-size: .9rem; margin: -4px 0 12px; }
.usage-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink-2); min-width: 110px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.usage-label .icon { width: 14px; height: 14px; }
.role-actions { display: flex; justify-content: flex-end; }
@media (max-width: 680px) {
  .folder-row.depth-1, .folder-row.depth-2, .folder-row.depth-3, .folder-row.depth-4 { padding-left: 24px; --indent: 24px; }
  .role-checks { margin-left: 0; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; margin: 24px 16px; }
  .login-intro, .login-panel { padding: 36px 28px; }
  .login-intro h1 { font-size: 1.9rem; }
  .cat-fields { grid-template-columns: 1fr 1fr; }
  .cat-fields .span-2 { grid-column: span 2; }
}
@media (max-width: 680px) {
  html { font-size: 18px; }
  html.large-text { font-size: 21px; }
  .wrap { padding: 0 16px; }
  .section { padding: 28px 16px 44px; }
  .topbar-org { display: none; }
  .topbar-inner { justify-content: flex-end; }
  .header-inner { min-height: 0; padding-top: 14px; padding-bottom: 14px; }
  .brand-logo { height: 44px; }
  .brand-label { font-size: 1rem; padding-left: 14px; }
  .nav-user { display: none; }
  .hero { padding: 32px 0 30px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-row { gap: 14px; }
  .swatch-lg { width: 60px; height: 60px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { flex-direction: row; align-items: center; padding: 20px 18px; gap: 16px; }
  .tile-arrow { position: static; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .swatch { width: 52px; height: 52px; }
  .doc { flex-wrap: wrap; padding: 14px 16px; gap: 14px; }
  .doc-type { width: 42px; height: 50px; }
  .doc-main { flex-basis: calc(100% - 60px); }
  .doc-open { width: 100%; }
  .search .btn { padding: 0 16px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  table.data .actions { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
