/* ============================================================================
   Investor portal — page-specific styles (loaded after styles.css)
   ========================================================================== */

/* ─── Gate ───────────────────────────────────────────────────────────── */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px var(--pad) 64px;
  position: relative;
  isolation: isolate;
}
.gate::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% 26%, oklch(0.30 0.06 30 / 0.30), transparent 60%),
    radial-gradient(800px 460px at 16% 82%, oklch(0.30 0.05 210 / 0.26), transparent 65%),
    var(--bg);
}
.gate::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.96 0.008 230 / 0.02) 1px, transparent 1px);
  background-size: 22px 22px;
}
.gate-card {
  width: 100%; max-width: 460px;
  border: 1px solid var(--rule);
  background: oklch(0.18 0.025 232 / 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: clamp(32px, 4vw, 52px);
}
.gate-card .eyebrow { margin-bottom: 22px; }
.gate-card h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1; letter-spacing: -0.04em; margin: 0 0 14px;
}
.gate-card h1 i { font-style: italic; color: var(--amber); }
.gate-card .blurb { font-size: 14.5px; color: var(--ink-dim); line-height: 1.6; margin: 0 0 30px; }

.gate-field { display: grid; gap: 8px; margin-bottom: 18px; }
.gate-field label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim);
}
.gate-field input {
  background: oklch(0.13 0.020 232 / 0.7);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 16px;
  padding: 13px 14px; width: 100%; outline: none;
  transition: border-color 160ms, background 160ms;
}
.gate-field input::placeholder { color: var(--ink-mute); }
.gate-field input:focus { border-color: var(--amber); background: oklch(0.15 0.022 232 / 0.9); }

.gate-error {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em;
  color: var(--amber); margin: -4px 0 16px; line-height: 1.5;
}
.gate-submit { width: 100%; justify-content: center; margin-top: 6px; }
.gate-foot {
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  font-size: 13px; color: var(--ink-mute); line-height: 1.6;
}
.gate-foot a { color: var(--ink-dim); border-bottom: 1px solid var(--rule); }
.gate-foot a:hover { color: var(--ink); border-color: var(--amber); }
.gate-back {
  position: absolute; top: 90px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute);
}
.gate-back:hover { color: var(--ink); }

/* ─── Portal top bar ─────────────────────────────────────────────────── */
.room-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 40;
  background: oklch(0.155 0.025 232 / 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.room-top .who { font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; color: var(--ink-dim); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.room-top .who b { color: var(--ink); font-weight: 500; }
.room-top .who .lock { color: var(--amber); }
.room-top .who .tier {
  border: 1px solid var(--rule); padding: 4px 9px;
  color: var(--amber); letter-spacing: 0.14em;
}
.room-top .actions { display: flex; align-items: center; gap: 10px; }
.room-top a.navlink, .signout {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--rule); padding: 9px 14px; cursor: pointer; background: transparent;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.room-top a.navlink:hover, .signout:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.room-top a.navlink.accent { color: var(--amber); border-color: oklch(0.56 0.135 35 / 0.5); }
.room-top a.navlink.accent:hover { background: var(--amber); color: var(--bg); border-color: var(--amber); }

.confidential-bar {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--amber);
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--rule-soft);
  display: flex; align-items: center; gap: 10px;
}
.confidential-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); display: inline-block; }

/* ─── Flash ──────────────────────────────────────────────────────────── */
.flash {
  margin: clamp(20px,3vw,32px) auto 0; max-width: var(--maxw);
  width: calc(100% - 2*var(--pad));
  border: 1px solid oklch(0.56 0.135 35 / 0.5);
  background: oklch(0.30 0.06 30 / 0.18);
  color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
}
.flash .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ─── Tier sections ──────────────────────────────────────────────────── */
.tier-block { margin-top: clamp(40px, 5vw, 72px); }
.tier-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 18px;
}
.tier-head .left { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tier-head .tier-no { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--amber); }
.tier-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px,3.2vw,44px); line-height: 1; letter-spacing: -0.035em; margin: 0; }
.tier-head h2 i { font-style: italic; color: var(--amber); }
.tier-head .blurb { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-mute); max-width: 42ch; text-align: right; line-height: 1.6; }

.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--rule); }
.doc {
  padding: clamp(26px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; color: inherit;
  transition: background 200ms; min-height: 230px;
  border-top: 1px solid var(--rule-soft);
}
.doc { border-left: 1px solid var(--rule-soft); }
.doc:nth-child(3n+1) { border-left: 0; }
.doc:hover { background: var(--bg-2); }
.doc .kind { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; justify-content: space-between; }
.doc .kind .ext { border: 1px solid var(--rule); padding: 3px 7px; color: var(--ink-dim); letter-spacing: 0.12em; }
.doc .name { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.2vw, 29px); line-height: 1.12; letter-spacing: -0.03em; }
.doc .name i { font-style: italic; color: var(--amber); }
.doc .desc { font-size: 13.5px; color: var(--ink-dim); line-height: 1.55; }
.doc .get { margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.doc .get .meta { color: var(--ink-mute); }
.doc .get .arrow { width: 14px; height: 1px; background: currentColor; position: relative; }
.doc .get .arrow::after { content:""; position:absolute; right:0; top:50%; width:6px; height:6px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform: translate(0,-50%) rotate(45deg); }
.doc:hover .get { color: var(--amber); }
.tier-empty {
  border-bottom: 1px solid var(--rule);
  padding: clamp(28px,3vw,40px) 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-mute);
}
@media (max-width: 880px) {
  .docs { grid-template-columns: 1fr; }
  .doc { border-left: 0; min-height: 0; }
  .doc:nth-child(3n+1) { border-left: 0; }
  .tier-head .blurb { text-align: left; }
}

/* ─── Locked tiers (shown to investors below the top tier) ───────────── */
.tier-locked { opacity: 0.5; }
.tier-locked .tier-head { border-color: var(--rule-soft); }
.locked-note {
  border-bottom: 1px solid var(--rule-soft);
  padding: 22px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; color: var(--ink-mute);
  display: flex; align-items: center; gap: 10px;
}
.locked-note .lk { color: var(--amber); }

/* ─── Metrics ────────────────────────────────────────────────────────── */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: clamp(32px, 5vw, 56px); }
.metric { padding: clamp(26px, 3vw, 40px) clamp(18px, 2vw, 28px); display: grid; gap: 8px; }
.metric + .metric { border-left: 1px solid var(--rule-soft); }
.metric .v { font-family: var(--serif); font-size: clamp(34px, 4vw, 54px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.metric .v i { font-style: italic; color: var(--amber); }
.metric .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
@media (max-width: 880px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2n+1) { border-left: 0; }
  .metric:not(:nth-child(-n+2)) { border-top: 1px solid var(--rule-soft); }
}

/* ─── Admin ──────────────────────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: clamp(40px,5vw,72px); }

.panel { border: 1px solid var(--rule); }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px clamp(20px,2.4vw,32px);
  border-bottom: 1px solid var(--rule);
  background: oklch(0.18 0.025 232 / 0.4);
}
.panel-head h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(22px,2.4vw,30px); letter-spacing: -0.03em; margin: 0; }
.panel-head h3 i { font-style: italic; color: var(--amber); }
.panel-head .count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-mute); text-transform: uppercase; }

/* table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); text-align: left; font-weight: 400;
  padding: 14px clamp(16px,2vw,24px); border-bottom: 1px solid var(--rule-soft);
}
.tbl td { padding: 16px clamp(16px,2vw,24px); border-bottom: 1px solid var(--rule-soft); font-size: 14px; color: var(--ink-dim); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .u-name { color: var(--ink); font-weight: 500; }
.tbl .u-email { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid var(--rule); color: var(--ink-dim); white-space: nowrap;
}
.badge.int { color: var(--amber); border-color: oklch(0.56 0.135 35 / 0.5); }
.badge.lv { color: var(--teal); border-color: oklch(0.5 0.05 205 / 0.4); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions button, .row-actions a {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 11px; border: 1px solid var(--rule); background: transparent; color: var(--ink-dim);
  cursor: pointer; transition: background 150ms, color 150ms, border-color 150ms; text-decoration: none;
}
.row-actions button:hover, .row-actions a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.row-actions button.danger:hover { background: var(--amber); border-color: var(--amber); color: var(--bg); }

/* forms */
.form-body { padding: clamp(22px,2.6vw,32px); display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.field input, .field select, .field textarea {
  background: oklch(0.13 0.020 232 / 0.7); border: 1px solid var(--rule); color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 15px; padding: 11px 13px; width: 100%; outline: none;
  transition: border-color 160ms, background 160ms;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); background: oklch(0.15 0.022 232 / 0.9); }
.field .hint { font-size: 12px; color: var(--ink-mute); line-height: 1.4; }
.field select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%), linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 10px) center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 30px; cursor: pointer;
}
.field select option { background: var(--bg-2); color: var(--ink); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 4px; }
@media (max-width: 680px) { .field-row { grid-template-columns: 1fr; } }

/* edit row inline */
.edit-form { background: oklch(0.18 0.025 232 / 0.4); }
