/* Data room — one stylesheet, no external fonts or CDN, so the strict CSP holds. */

:root {
  --ink: #0b1d42;
  --ink-2: #152748;
  --paper: #f5f7fa;
  --card: #ffffff;
  --line: #e2e7f0;
  --line-strong: #cbd4e4;
  --text: #14203a;
  --muted: #6b7893;
  --accent: #2c6be8;
  --accent-soft: #eaf0fd;
  --good: #12734a;
  --good-soft: #e6f4ec;
  --warn: #9a5b06;
  --warn-soft: #fdf1de;
  --bad: #a5231c;
  --bad-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 29, 66, .06), 0 8px 24px rgba(11, 29, 66, .06);
  --shadow-lift: 0 18px 60px rgba(11, 29, 66, .28);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --header-h: 58px;
  --sidebar-w: 236px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .98rem; }

/* ------------------------------------------------------------- fixed header */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: var(--ink);
  color: #fff;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 40;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .09);
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 640;
  font-size: .97rem;
  letter-spacing: -.011em;
  white-space: nowrap;
}
.topbar .brand:hover { text-decoration: none; opacity: .92; }
.topbar .brand .mark { display: block; flex: none; }
.topbar .brand .wordmark { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar .brand .env {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 3px;
}
.topbar .spacer { flex: 1; }

/* A quiet secondary action, distinct from the account menu next to it. */
.topbar .top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .74);
  font-size: .865rem;
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
.topbar .top-link:hover { color: #fff; background: rgba(255, 255, 255, .1); text-decoration: none; }
.topbar .top-link .ic { opacity: .8; }

.topbar .rule { width: 1px; height: 22px; background: rgba(255, 255, 255, .16); }

/* --- account menu (native <details>, so it works with no JavaScript) --- */

.usermenu { position: relative; }
.usermenu > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 9px 5px 5px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  color: #fff;
}
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary:hover, .usermenu[open] > summary { background: rgba(255, 255, 255, .12); }
.usermenu .avatar {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(150deg, #3f7ce0, #22b8f0);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.usermenu .who { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.usermenu .who b { font-size: .855rem; font-weight: 600; }
.usermenu .who em {
  font-style: normal;
  font-size: .72rem;
  color: rgba(255, 255, 255, .58);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usermenu > summary .ic { opacity: .6; transition: transform .15s ease; }
.usermenu[open] > summary .ic { transform: rotate(180deg); }

.usermenu .panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 232px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  z-index: 50;
}
.usermenu .panel .head {
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}
.usermenu .panel .head b { display: block; color: var(--ink); font-size: .875rem; }
.usermenu .panel .head span { color: var(--muted); font-size: .76rem; word-break: break-all; }
.usermenu .panel a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: .875rem;
}
.usermenu .panel a:hover { background: #f2f5fa; text-decoration: none; }
.usermenu .panel a .ic { color: var(--muted); }
.usermenu .panel a.danger { color: var(--bad); }
.usermenu .panel a.danger .ic { color: var(--bad); }
.usermenu .panel a.danger:hover { background: var(--bad-soft); }
.usermenu .panel .sep { height: 1px; background: var(--line); margin: 5px 0; }

.burger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  border-radius: 7px;
  width: 32px;
  height: 30px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ----------------------------------------------------------------- sidebar */

.sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 16px;
  z-index: 30;
}
.sidebar .group {
  font-size: .655rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #9aa5bb;
  font-weight: 700;
  padding: 15px 10px 5px;
}
.sidebar .group:first-child { padding-top: 4px; }
.sidebar a.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #45526e;
  font-size: .885rem;
  font-weight: 500;
  margin-bottom: 1px;
  position: relative;
}
.sidebar a.item .ic { flex: none; color: #9aa5bb; }
.sidebar a.item .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar a.item:hover { background: #f2f5fa; color: var(--ink); text-decoration: none; }
.sidebar a.item:hover .ic { color: #64718c; }
.sidebar a.item.on { background: var(--accent-soft); color: #1a49a8; font-weight: 615; }
.sidebar a.item.on .ic { color: var(--accent); }
.sidebar a.item .tag {
  margin-left: auto;
  background: var(--warn);
  color: #fff;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Environment, not filler prose: which store, which build. */
.sidebar .side-foot {
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid var(--line);
  color: #9aa5bb;
  font-size: .715rem;
  line-height: 1.6;
}
.sidebar .side-foot .pair { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sidebar .side-foot .k { color: #b3bccd; }
.sidebar .side-foot .v { font-family: var(--mono); font-size: .68rem; color: #7b8699; }

.main { margin-left: var(--sidebar-w); padding-top: var(--header-h); }
.main.no-sidebar { margin-left: 0; }

/* The content column is centred in the space beside the sidebar, with a wide enough measure
   that a normal screen is nearly filled and only an ultra-wide one shows margins. */
.main > .wrap { margin: 0 auto; max-width: 1320px; }
.main.no-sidebar > .wrap { margin: 0 auto; }
.wrap.narrow { max-width: 820px; }

.scrim { display: none; }

@media (max-width: 900px) {
  .burger { display: inline-block; }
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lift); }
  body.nav-open .scrim {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(11, 29, 66, .35);
    z-index: 25;
  }
  .main { margin-left: 0; }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 22px 80px; }
.wrap.narrow { max-width: 760px; }

/* On a phone the header has room for the brand and the links, but not for both in full. */
@media (max-width: 640px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar .brand { font-size: .9rem; max-width: 46vw; min-width: 0; }
  .topbar .brand .env, .topbar .rule { display: none; }
  .topbar .top-link span { display: none; }
  .usermenu .who { display: none; }
  .usermenu > summary { padding: 5px; }
  .usermenu .panel { right: -4px; min-width: 210px; }
  .burger { display: inline-flex; }

  .wrap { padding: 18px 14px 60px; }
  .card { padding: 16px 14px; }
  .page-head { gap: 10px; }
  .toolbar { width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }

  /* Let the row become two lines rather than squeezing the title into a column of words. */
  .doc-row { flex-wrap: wrap; }
  .doc-row .meta { flex: 1 1 auto; }
  .doc-row .acts { flex: 1 1 100%; justify-content: flex-end; }

  .viewer-bar { padding: 8px 12px; gap: 10px; }
  .viewer-bar .title { width: 100%; order: -1; }
  .pages { padding: 14px 10px 70px; }
  textarea.codes { font-size: .82rem; letter-spacing: 0; }
  .enrol { gap: 16px; }
}

.crumbs { color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head p { color: var(--muted); margin: .2em 0 0; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .grow { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 1.5rem; font-weight: 640; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.stat .s { color: var(--muted); font-size: .8rem; }

/* ------------------------------------------------------------------- Q&A */

.stages { display: flex; gap: 8px; flex-wrap: wrap; }
.stages .stage {
  flex: 1;
  min-width: 108px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
}
.stages .stage:hover { background: #f6f8fc; text-decoration: none; }
.stages .stage.on { border-color: var(--accent); background: var(--accent-soft); }
.stages .stage .n { display: block; font-size: 1.3rem; font-weight: 660; color: var(--ink); line-height: 1.2; }
.stages .stage .l { display: block; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stages .stage.on .l { color: #1a49a8; }

.qa-card .qa-body { white-space: pre-wrap; margin: 2px 0 8px; }
.qa-card .qa-meta { margin-bottom: 10px; }
.qa-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.qa-item:last-child { border-bottom: 0; }
.qa-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------- holders (groups) */

.holder { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.holder:last-child { margin-bottom: 0; }
.holder-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; background: #fafbfe; border-bottom: 1px solid var(--line);
}
.holder-head .grow { flex: 1; min-width: 200px; }
.holder-head .grow strong { color: var(--ink); margin-right: 8px; }
.holder-body { padding: 12px 14px; }
.holder-body .members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rule-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.rule-row:last-child { margin-bottom: 0; }

/* ------------------------------------------------------- search and the index */

.searchbar { display: flex; gap: 10px; }
.searchbar input[type=search] {
  flex: 1;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--text);
}
.searchbar input[type=search]:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

a.hit {
  display: block;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
a.hit:last-child { border-bottom: 0; }
a.hit:hover { text-decoration: none; background: #fafbfe; }
a.hit .hit-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
a.hit .hit-head strong { color: var(--accent); }
a.hit:hover .hit-head strong { text-decoration: underline; }
a.hit .snippet {
  margin: 5px 0 0;
  color: var(--text);
  font-size: .875rem;
  line-height: 1.6;
}

.index-list { font-size: .9rem; }
.index-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f1f4f9; }
.index-row:last-child { border-bottom: 0; }
.index-row .num {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  min-width: 52px;
  flex: none;
}
.index-row .nm { color: var(--text); }
.index-row .nm.folder { font-weight: 640; color: var(--ink); }
.index-row.folder { background: #fafbfe; }
.index-row .meta { color: var(--muted); font-size: .8rem; margin-left: auto; text-align: right; white-space: nowrap; }
.doc-row .number {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  min-width: 34px;
  flex: none;
}

/* An empty state should say what the thing is for and offer the next step, not apologise. */
.empty-state { text-align: center; padding: 40px 24px 34px; }
.empty-state .ic { color: var(--line-strong); margin-bottom: 10px; }
.empty-state h2 { margin-bottom: .3em; }
.empty-state p { color: var(--muted); max-width: 44ch; margin: 0 auto 18px; font-size: .92rem; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .9rem; align-items: start; }
.kv dt { color: var(--muted); font-size: .82rem; }
.kv dd { margin: 0; }

/* ---------------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.table-scroll > table { min-width: 620px; }
/* A name is a name: let the row scroll rather than breaking one word across four lines. */
td > strong, td > a > strong { white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 4px; font-style: italic; }

/* --------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 520;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #f6f8fc; text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #16305f; }
.btn.danger { color: var(--bad); border-color: #edc9c6; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.solid-danger:hover { background: #8d1d17; }
.btn.small { padding: 4px 10px; font-size: .8rem; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #eef2f8; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

label { display: block; font-size: .8rem; color: var(--muted); font-weight: 560; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=datetime-local], input[type=file], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: .92rem;
  background: #fff;
  color: var(--text);
}
input[type=file] { padding: 7px 10px; background: #fbfcfe; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
.field { margin-bottom: 12px; }
.field .hint { color: var(--muted); font-size: .78rem; margin: 4px 0 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .87rem; color: var(--text); margin: 0 0 8px; font-weight: 460; }
.check input { width: auto; margin-top: 3px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.form-actions.right { justify-content: flex-end; }
.inline-form { display: inline; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ chips */

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip.view { background: var(--accent-soft); color: #1a49a8; }
.chip.down { background: var(--good-soft); color: var(--good); }
.chip.deny { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.grey { background: #eef1f6; color: var(--muted); }
.chip.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; }
/* Release stage. Three steps, cool to warm, so the sensitive end reads as the sensitive end. */
.chip.l1 { background: #e8f5ee; color: #12734a; }
.chip.l2 { background: #fdf1de; color: #9a5b06; }
.chip.l3 { background: #fdeceb; color: #a5231c; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: var(--mono); font-size: .84rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.notice { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.bad { border-color: var(--bad); background: var(--bad-soft); }
.notice.good { border-color: var(--good); background: var(--good-soft); }
.notice p:last-child { margin-bottom: 0; }
.notice p:first-child { margin-top: 0; }

/* --------------------------------------------------------------- dialogs */

dialog.dlg {
  border: 0;
  padding: 0;
  border-radius: 14px;
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  box-shadow: var(--shadow-lift);
  color: var(--text);
  overflow: visible;
}
dialog.dlg.wide { width: min(820px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(11, 29, 66, .42); }
dialog.dlg[open] { display: flex; flex-direction: column; }

.dlg-head { padding: 20px 22px 12px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 1.1rem; }
.dlg-head p { margin: .35em 0 0; color: var(--muted); font-size: .86rem; }
.dlg-body { padding: 18px 22px 22px; overflow-y: auto; }
.dlg-body > :last-child { margin-bottom: 0; }
.dlg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.dlg-close:hover { background: #eef2f8; color: var(--ink); }
.dlg-sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* --------------------------------------------------------------- auth page */

.auth { max-width: 400px; margin: 9vh auto; }
.auth .card { padding: 26px 26px 22px; }
.auth h1 { font-size: 1.28rem; }
.auth p.lede { color: var(--muted); margin-top: 0; font-size: .92rem; }
.auth .brandline { text-align: center; margin-bottom: 18px; color: var(--ink); font-weight: 650; letter-spacing: .02em; }
/* Typed as `input.code-input` so it outweighs the `input[type=text]` base rule above. */
input.code-input {
  font-family: var(--mono);
  font-size: 1.45rem;
  letter-spacing: .3em;
  text-align: center;
  padding: 10px 11px;
}

/* -------------------------------------------------------------- doc lists */

.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .thumb {
  width: 54px; height: 40px; border-radius: 5px; border: 1px solid var(--line);
  object-fit: cover; object-position: top center; background: #eef1f6; flex: none;
}
.doc-row .meta { flex: 1; min-width: 0; }
.doc-row .name { font-weight: 570; color: var(--ink); }
.doc-row .sub { color: var(--muted); font-size: .82rem; }
.doc-row .acts { display: flex; gap: 8px; align-items: center; }

.folder-title {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 660; margin: 20px 0 4px;
}
.folder-title:first-child { margin-top: 0; }
.folder-title .folder-blurb {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: .8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ----------------------------------------------------------------- viewer */

.viewer-bar {
  position: sticky; top: var(--header-h); z-index: 20;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 9px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.viewer-bar .title { font-weight: 600; color: var(--ink); }
.viewer-bar .grow { flex: 1; }
.pages { max-width: 980px; margin: 0 auto; padding: 20px 16px 90px; }
.page-shell { margin-bottom: 18px; position: relative; }
.page-shell img {
  width: 100%; display: block; border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow); background: #fff;
}
.page-shell .ph {
  width: 100%; aspect-ratio: 16 / 9; border: 1px dashed var(--line-strong);
  border-radius: 4px; background: #fff; display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: .85rem;
}
.page-shell .no { position: absolute; top: 8px; right: -46px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .page-shell .no { right: 8px; top: 6px; background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 4px; } }

.no-select { user-select: none; -webkit-user-select: none; }

/* -------------------------------------------------------------- heat bars */

.heat { display: flex; flex-direction: column; gap: 3px; }
.heat-row { display: grid; grid-template-columns: 42px 1fr 110px; align-items: center; gap: 10px; font-size: .82rem; }
.heat-row .p { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.heat-row .bar { height: 15px; background: #eef1f6; border-radius: 3px; overflow: hidden; }
.heat-row .bar > i { display: block; height: 100%; background: linear-gradient(90deg, #4c86ef, #1c4fb3); }
.heat-row .v { color: var(--muted); font-variant-numeric: tabular-nums; }

.bar-inline { height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; min-width: 70px; }
.bar-inline > i { display: block; height: 100%; background: var(--ink); }

/* ---------------------------------------------------------- 2FA enrolment */

.enrol { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.enrol .qr { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; line-height: 0; }
.enrol .qr svg { display: block; width: 168px; height: 168px; }
.enrol .steps { flex: 1; min-width: 230px; font-size: .88rem; }
.enrol .steps ol { margin: 0 0 12px; padding-left: 18px; }
.enrol .steps li { margin-bottom: 6px; }
.secret {
  font-family: var(--mono);
  font-size: .82rem;
  background: #f3f6fb;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  word-break: break-all;
  letter-spacing: .04em;
}

/* A textarea rather than a list: the codes have to be copyable and selectable, and this way
   "copy all" hands over exactly what was on screen. */
textarea.codes {
  font-family: var(--mono);
  font-size: .92rem;
  line-height: 1.9;
  letter-spacing: .03em;
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  resize: none;
  min-height: 0;
  text-align: center;
  color: var(--ink);
}

/* --------------------------------------------------------------- footer */

.foot { color: var(--muted); font-size: .78rem; text-align: center; padding: 26px 20px 40px; }
.foot code { font-family: var(--mono); }

.copyable { display: flex; gap: 8px; align-items: center; }
.copyable input { font-family: var(--mono); font-size: .82rem; }
