/* AGAIN brand: warm off-white, near-black ink, orange-red accent, Outfit type (from the teaser deck). */
@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(/assets/fonts/outfit-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(/assets/fonts/outfit-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 600; font-display: swap; src: url(/assets/fonts/outfit-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 700; font-display: swap; src: url(/assets/fonts/outfit-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 800; font-display: swap; src: url(/assets/fonts/outfit-latin-800-normal.woff2) format("woff2"); }

:root {
  --ink: #0b131a;
  --ink-2: #3a4148;
  --muted: #74797e;
  --line: #ebe7e2;
  --bg: #f7f4f0;
  --card: #fffdfc;
  --black: #141414;
  --accent: #f84a33;          /* brand orange-red: lines, highlights, large text */
  --accent-text: #cf3520;     /* darker shade for small text, readable on white */
  --accent-soft: #feede9;
  --danger: #cf3520;
  --danger-soft: #feede9;
  --ok: #1f7a4d;
  --ok-soft: #e7f4ec;
  --warn: #93570a;
  --warn-soft: #fbf1e1;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 19, 26, .04), 0 6px 20px rgba(11, 19, 26, .04);
  font-family: Outfit, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
a { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.hl { color: var(--accent); }

/* Small spaced label with a short orange line, as on the deck ("—— OUR BELIEF") */
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: var(--accent); }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .mark { height: 22px; width: auto; fill: currentColor; }
.brand .word { font-weight: 600; font-size: 21px; letter-spacing: .06em; line-height: 1; }
.brand .sub { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); padding-left: 12px; margin-left: 2px; border-left: 1px solid currentColor; border-color: rgba(127, 127, 127, .45); line-height: 1.4; }

/* Buttons & inputs */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 15px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
button:hover, .btn:hover { border-color: #cfc9c2; }
button.primary { background: var(--black); border-color: var(--black); color: #fff; }
button.primary:hover { background: var(--accent); border-color: var(--accent); }
button.danger { color: var(--danger); }
button.primary.destructive { background: var(--danger); border-color: var(--danger); }
button.primary.destructive:hover { filter: brightness(1.08); }
button.primary.destructive:disabled { background: #e9b3aa; border-color: #e9b3aa; }
button.link { border: 0; background: none; padding: 4px 6px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.link:hover { text-decoration-color: var(--accent); }
button.link.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
input, select {
  font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 6px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.checks input { width: auto; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); }
.error { color: var(--danger); background: var(--danger-soft); padding: 10px 12px; border-radius: 10px; margin-top: 14px; }

/* Sign-in / setup: black brand panel + form, like the deck's cover and footer band */
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand { background: var(--black); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand .brand { color: #fff; }
.auth-brand .brand .sub { color: #b9b9b9; }
.auth-brand .tagline { font-size: 44px; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; max-width: 460px; }
.auth-brand .foot { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #9a9a9a; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--card); }
.auth-form form { width: 100%; max-width: 380px; }
.auth-form h1 { margin-bottom: 8px; }
.auth button.primary { width: 100%; justify-content: center; margin-top: 22px; padding: 12px; font-size: 15px; }
.notice { margin-top: 24px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* Layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.topbar { background: var(--black); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar .inner { max-width: 1200px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar .brand { color: #fff; }
.topbar .brand .sub { color: #b9b9b9; }
.topbar .spacer { flex: 1; }
.topbar .btn, .topbar button { background: transparent; color: #fff; border-color: #3a3a3a; }
.topbar .btn:hover, .topbar button:hover { border-color: #fff; }
.topbar .who { color: #b9b9b9; font-size: 13px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; color: #b9b9b9; padding: 8px 10px; border-radius: 0; position: relative; }
.tabs button:hover { color: #fff; }
.tabs button.active { color: #fff; }
.tabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); }
main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 36px 16px 60px; flex: 1; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.section-head .spacer { flex: 1; }
.section-head h1::after { content: "."; color: var(--accent); }

/* Black footer band, as on every deck slide */
.band { background: var(--black); color: #d8d8d8; }
.band .inner { max-width: 1200px; margin: 0 auto; padding: 18px 16px; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.band .inner strong { color: #fff; }
.band .spacer { flex: 1; }
.band .brand { color: #fff; }
.band .brand .mark { height: 15px; }
.band .brand .word { font-size: 15px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat { padding: 18px; }
.stat .v { font-size: 34px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat .k { color: var(--muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; }
.stat.alert .v { color: var(--accent); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .14em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #f0ece7; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--accent-soft); color: var(--accent-text); }
.ext { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 4px 7px; border-radius: 6px; background: #f0ece7; color: var(--ink-2); text-transform: uppercase; }
.ext.pdf { background: var(--black); color: #fff; }
.ext.pptx, .ext.ppt, .ext.ppsx, .ext.pps { background: var(--accent); color: #fff; }

.folder { margin-bottom: 20px; }
.folder-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.folder-head h3 { flex: 1; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.folder-head h3::before { content: ""; width: 22px; height: 1.5px; background: var(--accent); }

.dropzone { border: 2px dashed #d6cfc7; border-radius: var(--radius); padding: 38px 24px 26px; text-align: center; color: var(--muted); background: var(--card); margin-bottom: 26px; transition: border-color .15s, background .15s, transform .15s; }
.dropzone .dz-icon { width: 46px; height: 46px; color: var(--accent); margin-bottom: 8px; }
.dropzone .dz-title { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 4px; }
.dropzone .dz-pick { display: inline; margin: 0; font-size: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.dropzone .dz-pick:hover { color: var(--accent-text); }
.dropzone .row { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.dropzone select { width: auto; min-width: 200px; }
.dropzone .dz-tip { margin-top: 16px; }
.dz-progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 18px auto 8px; }
.dz-progress div { height: 100%; background: var(--accent); transition: width .2s; }
body.dragging .dropzone { border-color: var(--accent); }
body.dragging [data-drop-folder] { outline: 2px dashed #e8b4aa; outline-offset: -2px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.folder.over { outline: 2px dashed var(--accent) !important; background: var(--accent-soft); }

/* Activity matrix */
.matrix td.cell { text-align: center; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; }
.matrix td.cell:hover { background: var(--accent-soft); }
.matrix td.cell .t { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.matrix td.cell.zero { color: #c9c3bc; cursor: default; font-weight: 400; }
.matrix td.cell.zero:hover { background: none; }
.matrix th.doc { white-space: normal; min-width: 110px; text-transform: none; letter-spacing: 0; text-align: center; font-size: 12px; }
.pagebars { display: flex; gap: 2px; align-items: flex-end; height: 34px; margin-top: 6px; }
.pagebars div { flex: 1; min-width: 3px; max-width: 18px; background: var(--accent); border-radius: 2px 2px 0 0; }
.pagebars div.none { background: var(--line); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 20, 20, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 480px; padding: 26px; max-height: 90vh; overflow: auto; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.secret { font-family: Consolas, "SF Mono", monospace; font-size: 18px; background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 10px; text-align: center; letter-spacing: .04em; user-select: all; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 100; box-shadow: var(--shadow); }

/* Investor room */
.room-intro { margin-bottom: 30px; max-width: 720px; }
.room-intro h1 { font-size: 44px; letter-spacing: -0.025em; }
.room-intro p { margin: 12px 0 0; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s; }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: #faf7f3; }
.doc-row:hover .title { color: var(--accent-text); }
.doc-row .title { flex: 1; font-weight: 600; }

@media (max-width: 1080px) {
  .topbar .inner { row-gap: 6px; padding-bottom: 0; }
  .topbar .tabs { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -10px; }
  .topbar .tabs button { white-space: nowrap; padding: 10px; }
  .topbar .inner > .btn, .topbar .inner > button { padding: 6px 13px; }
  .topbar .inner:not(:has(.tabs)) { padding-bottom: 14px; }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 20px; gap: 28px; }
  .auth-brand .tagline { font-size: 30px; }
  .room-intro h1 { font-size: 32px; }
  h1 { font-size: 26px; }
}
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .topbar .inner { gap: 10px; }
  .brand .sub { display: none; }
  th, td { padding: 10px; }
}

/* Investor companies & NDA */
.org .folder-head { flex-wrap: wrap; }
.org-meta { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.locked { padding: 10px 16px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); }
.org-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
textarea { font: inherit; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%; background: #fff; color: var(--ink); resize: vertical; }
textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.modal.wide { max-width: 860px; }
.nda-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.nda-head .eyebrow { margin-bottom: 6px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 18px 0 6px; counter-reset: s; }
.steps li { flex: 1; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); }
.steps li.done { color: var(--ink); border-color: var(--accent); }
.nda-sec { border-top: 1px solid var(--line); padding: 18px 0 6px; margin-top: 14px; }
.nda-sec h3 { font-size: 15px; margin-bottom: 4px; }
.nda-sec.ok-sec { background: var(--ok-soft); border-radius: 10px; padding: 16px; border: 0; }
.clause-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; }
.clause-head .spacer { flex: 1; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.file-list { margin: 10px 0; display: grid; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.file-row a { font-weight: 600; color: var(--ink); }
.upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upload-row select { width: auto; }
.confirm-box { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; background: var(--bg); padding: 12px; border-radius: 10px; margin: 16px 0 12px; }
.confirm-box input { width: auto; margin-top: 3px; accent-color: var(--accent); }

/* Public signing page */
.sign-main { max-width: 900px; }
.sign-card { padding: 28px; margin-bottom: 20px; }
.sign-card h1 { margin-bottom: 8px; }
.sign-card .badge { margin-left: 4px; }
.hash { font-size: 11px; word-break: break-all; background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.doc-pages { display: grid; gap: 14px; margin-bottom: 20px; }
.doc-page { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 300px; display: grid; place-items: center; aspect-ratio: 210 / 297; }
.doc-page img { width: 100%; height: auto; display: block; }
.consent label { font-weight: 400; align-items: flex-start; margin: 10px 0; }
.consent input { margin-top: 4px; }
.sigpad { position: relative; border: 1.5px dashed #d6cfc7; border-radius: 10px; background: #fff; }
.sigpad canvas { width: 100%; height: 160px; display: block; touch-action: none; cursor: crosshair; }
.sigpad button { position: absolute; top: 6px; right: 8px; }
.notice-warn { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 8px; }
.verify { margin-top: 12px; padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.7; }
.verify.ok { background: var(--ok-soft); color: var(--ok); }
.verify.bad { background: var(--danger-soft); color: var(--danger); }
details summary { cursor: pointer; color: var(--muted); }
.parties-preview { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 16px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.55; text-align: center; }
.parties-preview .pp-col + .pp-col { border-left: 1px solid var(--line); padding-left: 14px; text-align: left; }
.parties-preview .pp-label { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; text-align: left; }
.parties-preview .ph { color: var(--accent-text); }
@media (max-width: 640px) { .parties-preview { grid-template-columns: 1fr; } .parties-preview .pp-col + .pp-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } }
.notice-info { background: var(--accent-soft); color: var(--ink-2); padding: 10px 12px; border-radius: 8px; }

/* Investor list & profile */
.click-row { cursor: pointer; }
.click-row:hover { background: #faf7f3; }
.back { padding-left: 0; margin-bottom: 10px; }
.profile-head { flex-wrap: wrap; }
.profile-head h1 { margin-right: 4px; }
.pcard { margin-bottom: 18px; }
.pcard-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pcard-head h2 { font-size: 18px; }
.pcard-head .spacer { flex: 1; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.pcard.is-locked .step-num { background: #c9c3bc; }
.pcard-body { padding: 16px 20px; }
.pcard-body h4 { margin: 0 0 8px; font-size: 14px; }
.pcard-foot { padding: 12px 20px; border-top: 1px solid var(--line); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.profile-meta .muted { margin-right: 6px; text-transform: uppercase; font-size: 10px; letter-spacing: .14em; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border-radius: 12px; white-space: normal; height: 100%; }
.choice span { font-weight: 400; color: var(--muted); font-size: 13px; line-height: 1.45; }
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.locked-box { background: var(--bg); color: var(--ink-2); padding: 14px 16px; border-radius: 10px; }
.form-h { margin: 22px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-row { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 760px) {
  .choice-grid { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
}

/* NDA end dates & renewals */
.exp-warn { color: var(--warn); font-weight: 600; }
.exp-bad { color: var(--danger); font-weight: 600; }
.exp-box { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; }
.exp-box.warn { background: var(--warn-soft); color: var(--warn); }
.exp-box.bad { background: var(--danger-soft); color: var(--danger); }
.term-box { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.term-box.ok { background: var(--ok-soft); }
.term-box.warn { background: var(--warn-soft); color: var(--warn); }
.expiry-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
label.inline input { width: auto; }

/* Subfolders */
.subfolders { padding: 4px 14px 14px; border-top: 1px solid var(--line); background: #fbf9f6; }
.folder.subfolder { margin: 12px 0 0; box-shadow: none; }
.folder.subfolder .folder-head h3 { letter-spacing: .12em; font-size: 11.5px; }
.folder.subfolder .folder-head h3::before { display: none; }
.sub-icon { color: var(--accent); font-weight: 700; margin-right: 2px; letter-spacing: 0; }
.tree-check { margin: 4px 0 !important; }
.tree-check input:disabled + * , .tree-check:has(input:disabled) { color: var(--muted); }

/* Collapsible subfolders (investor room) */
.sf-list { border-top: 1px solid var(--line); }
.subfolder-d { border-bottom: 1px solid var(--line); }
.subfolder-d:last-child { border-bottom: 0; }
.subfolder-d > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; user-select: none; }
.subfolder-d > summary::-webkit-details-marker { display: none; }
.subfolder-d > summary:hover { background: #faf7f3; }
.subfolder-d > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.subfolder-d .sf-name { font-weight: 600; flex: 1; }
.subfolder-d .chev { width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 2px 0 4px; }
.subfolder-d[open] > summary .chev { transform: rotate(45deg); }
.subfolder-d[open] > summary { background: #fbf9f6; }
.sf-body { padding-left: 22px; border-top: 1px solid var(--line); background: #fdfcfa; }
.sf-body .doc-row:last-child { border-bottom: 0; }
.sf-body .subfolder-d { border-bottom: 0; border-top: 1px solid var(--line); }

/* Collapsible main sections (investor room) and folders (admin) */
details.folder-d { display: block; padding: 0; }
details.folder-d > summary.folder-head { list-style: none; cursor: pointer; user-select: none; border-bottom: 0; }
details.folder-d > summary.folder-head::-webkit-details-marker { display: none; }
details.folder-d > summary.folder-head h3::before { display: none; }
details.folder-d > summary.folder-head:hover { background: #faf7f3; }
details.folder-d[open] > summary.folder-head { border-bottom: 1px solid var(--line); }
details.folder-d > summary .chev { width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 4px; }
details.folder-d[open] > summary .chev { transform: rotate(45deg); }
.fd-body .sf-list:first-child { border-top: 0; }
#folders > details.folder-d { margin-bottom: 10px; }
details.adm-folder > summary.folder-head { flex-wrap: wrap; }
details.adm-folder.subfolder > summary.folder-head { padding: 11px 14px; }
details.adm-folder:not([open]) > summary.folder-head { border-bottom: 0; }

/* Folder names always on one line */
.folder-head { flex-wrap: nowrap; min-width: 0; }
details.adm-folder > summary.folder-head { flex-wrap: nowrap; }
.folder-head h3 { min-width: 0; font-size: clamp(10.5px, 0.25vw + 9px, 12px); letter-spacing: clamp(.06em, 0.9vw, .18em); }
.folder-head h3 .fname, .subfolder-d .sf-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.folder-head > .small, .folder-head > .badge, .folder-head > button, .subfolder-d > summary > .small, .subfolder-d > summary > .badge { flex: none; white-space: nowrap; }
.subfolder-d > summary { flex-wrap: nowrap; min-width: 0; }
@media (max-width: 760px) {
  /* Narrow screens: the name keeps its own line, the admin actions move below it */
  details.adm-folder > summary.folder-head { flex-wrap: wrap; row-gap: 4px; }
  details.adm-folder > summary.folder-head h3 { flex: 1 1 calc(100% - 30px); }
}
@media (max-width: 520px) {
  /* Phones: the full folder name gets its own line; badge and count sit just below it */
  details.folder-d > summary.folder-head, .subfolder-d > summary { flex-wrap: wrap; row-gap: 2px; }
  details.folder-d > summary.folder-head h3, .subfolder-d > summary .sf-name { flex: 1 1 calc(100% - 30px); }
  details.folder-d > summary.folder-head > .badge, .subfolder-d > summary > .badge { margin-left: 25px; }
  details.folder-d > summary.folder-head > .chev ~ .small:not(.badge ~ .small), .subfolder-d > summary > .chev ~ .small:not(.badge ~ .small) { margin-left: 25px; }
}

/* Clickable overview boxes */
.link-card { position: relative; cursor: pointer; transition: border-color .15s, transform .15s; }
.link-card:hover, .link-card:focus-visible { border-color: var(--accent); outline: none; transform: translateY(-1px); }
.link-card .go-arrow { position: absolute; top: 14px; right: 16px; color: var(--muted); font-size: 15px; transition: color .15s, transform .15s; }
.link-card:hover .go-arrow, .link-card:focus-visible .go-arrow { color: var(--accent); transform: translateX(2px); }
.click-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.matrix td.cell.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; font-size: 13px; color: var(--ink-2); }

/* Investor activity & statistics */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 5px 12px; font-size: 13px; font-weight: 500; }
.chip.on { background: var(--black); border-color: var(--black); color: #fff; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.mini-stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.mini-stat .k { font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mini-stat .v { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.mini-stat .of { font-size: 15px; color: var(--muted); font-weight: 500; }
.pcard-body h4 { margin: 20px 0 8px; font-size: 13px; }
.daychart { position: relative; padding-left: 26px; }
.dc-max { position: absolute; left: 0; top: -2px; }
.dc-bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--line); }
.bar-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar.zero { height: 0; }
.bar-slot:hover .bar { filter: brightness(.9); }
.bar-slot:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--black); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; z-index: 5; pointer-events: none; }
.dc-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.cov { display: flex; align-items: center; gap: 8px; }
.cov-bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 120px; }
.cov-bar div { height: 100%; background: var(--accent); border-radius: 99px; }
tr.sel td { background: var(--accent-soft); }
.act-detail:not(:empty) { margin-top: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c3bc; flex: none; transform: translateY(-1px); }
.tl-dot.info { background: var(--accent); }
.tl-dot.bad { background: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.tl-when { color: var(--muted); min-width: 78px; flex: none; }
.inv-link { padding: 0; font-weight: 700; color: var(--ink); text-align: left; }
#activity-sec { scroll-margin-top: 120px; }

/* Sharing tree: folders and single documents */
.access-tree { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px 8px; max-height: 520px; overflow: auto; }
.at-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.at-label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 13.5px; cursor: pointer; min-width: 0; }
.at-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-label input, .at-doc input { width: auto; accent-color: var(--accent); flex: none; }
.at-toggle { width: 22px; height: 22px; padding: 0; border: 0; background: none; display: grid; place-items: center; flex: none; border-radius: 6px; }
.at-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; }
.at-toggle.open::before { transform: rotate(45deg); }
.at-toggle:hover { background: var(--bg); }
.at-spacer { width: 22px; flex: none; }
.at-count { margin-left: auto; white-space: nowrap; padding-left: 10px; }
.at-count.partial { color: var(--warn); font-weight: 600; }
.at-doc { display: flex; align-items: center; gap: 8px; margin: 0; padding: 3px 0; font-weight: 400; font-size: 13px; cursor: pointer; }
.at-doc span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.at-doc .ext { flex: none; }
.at-doc:hover, .at-row:hover { background: #faf7f3; }
#share-summary { align-self: center; }
