/* blitz-portal · investor app — "midnight instrument"
 * Blitz dark scope: graphite surfaces, Archivo numerals, Mist ink,
 * Flash yellow only for live/energy moments. Mobile-first throughout. */

@font-face { font-family: 'Archivo'; font-weight: 600; font-display: block; src: url('/assets/archivo-600.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: block; src: url('/assets/archivo-800.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: block; src: url('/assets/manrope-400.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: block; src: url('/assets/manrope-500.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: block; src: url('/assets/manrope-700.woff2') format('woff2'); }

:root {
  --midnight: #0A2A6A; --graphite: #14141A; --mist: #CCD3FF; --flash: #FFE066;
  --white: #F5F6FC;
  --bg: #0C0C11; --surface: #1B1C24; --surface-2: #23242F;
  --text: var(--white); --text-2: #B6B9CC; --text-3: #80839A;
  --border: rgba(204,211,255,.13); --border-strong: rgba(204,211,255,.26);
  --up: #35C48D; --warn: #E8A317; --down: #E06156;
  --font-display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --pad: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  min-height: 100dvh; overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--mist); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
::selection { background: rgba(204,211,255,.3); }

/* ---------- boot ---------- */
.boot { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; }
.boot-pulse { width: 34px; height: 2px; background: var(--border-strong); overflow: hidden; position: relative; border-radius: 2px; }
.boot-pulse::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--flash); animation: sweep 1s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- login ---------- */
.login {
  min-height: 100dvh; display: flex; flex-direction: column; padding: max(8vh, 56px) var(--pad) 40px;
  background:
    radial-gradient(120% 55% at 50% -10%, rgba(10,42,106,.85) 0%, rgba(10,42,106,.25) 55%, transparent 100%),
    var(--bg);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8vh; }
.login-brand .lockup { height: 21px; width: auto; }
.login-brand .sub { color: var(--mist); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; padding-left: 14px; border-left: 1px solid var(--border-strong); }
.login h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(25px, 7vw, 34px); line-height: 1.08; letter-spacing: -.01em; margin-bottom: 10px; }
.login h1 em { font-style: normal; color: var(--mist); }
.login .lede { color: var(--text-2); max-width: 34ch; margin-bottom: 34px; }
.login-card { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.seg button { padding: 10px 0; border-radius: 5px; color: var(--text-3); font-weight: 700; font-size: 13px; letter-spacing: .04em; transition: all .18s; }
.seg button.on { background: var(--midnight); color: var(--white); }
.fld { display: flex; flex-direction: column; gap: 7px; }
.fld label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.fld input {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 15px 16px; font-size: 16px; outline: none; width: 100%;
  transition: border-color .15s;
}
.fld input:focus { border-color: var(--mist); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--white); color: var(--graphite); font-weight: 800; font-size: 15px;
  border-radius: 8px; padding: 15px 18px; width: 100%;
  transition: transform .12s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text); font-weight: 700; }
.btn.wa { background: #1FAF38; color: #fff; }
.hint { color: var(--text-3); font-size: 13px; text-align: center; }
.hint a, .hint button { color: var(--mist); font-weight: 700; font-size: 13px; }
.err {
  background: rgba(224,97,86,.12); border: 1px solid rgba(224,97,86,.4); color: #F3B0A9;
  border-radius: 8px; padding: 11px 14px; font-size: 13.5px;
}
.ok-note { background: rgba(53,196,141,.1); border: 1px solid rgba(53,196,141,.35); color: #A9E8CF; border-radius: 8px; padding: 11px 14px; font-size: 13.5px; }

/* code entry */
.code-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-row input {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 24px;
  padding: 12px 0; outline: none; caret-color: var(--flash);
  width: 100%; min-width: 0; /* grid items: kill the input's intrinsic min-width */
}
.code-row input:focus { border-color: var(--flash); }
.login-foot { margin-top: auto; padding-top: 40px; color: var(--text-3); font-size: 11.5px; letter-spacing: .04em; }

/* waiting state */
.waiting { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.waiting .pulse-line { width: 100%; height: 2px; background: var(--surface-2); border-radius: 2px; overflow: hidden; position: relative; }
.waiting .pulse-line::after { content: ''; position: absolute; inset: 0; width: 35%; background: var(--flash); animation: sweep 1.2s linear infinite; }

/* ---------- app shell ---------- */
.shell { min-height: 100dvh; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 12px); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 14px var(--pad) 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .lockup { height: 15px; width: auto; }
.topbar .scope { color: var(--text-3); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-left: 2px; }
.topbar .who {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%;
  background: var(--midnight); color: var(--mist); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px; border: 1px solid var(--border-strong);
}
.menu {
  position: fixed; top: 58px; right: 14px; z-index: 60; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
  animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu .mi { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 9px; font-size: 14px; }
.menu .mi:active { background: var(--surface-2); }
.menu .who-line { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu .who-line b { display: block; font-size: 14px; }
.menu .who-line span { color: var(--text-3); font-size: 12px; }

/* view container + reveal */
.view { padding: 22px var(--pad) 30px; max-width: 640px; margin: 0 auto; }
.view > * { animation: rise .4s cubic-bezier(.2,.7,.3,1) both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }
.view > *:nth-child(5) { animation-delay: .16s; }
.view > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.eyebrow { color: var(--text-3); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.h-page { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin-bottom: 18px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: var(--text-3); border-radius: 10px; position: relative; }
.tab svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab span { font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.tab.on { color: var(--white); }
.tab.on::before { content: ''; position: absolute; top: -7px; width: 18px; height: 2px; background: var(--flash); border-radius: 2px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.card.press { transition: transform .12s; }
.card.press:active { transform: scale(.988); }

/* dashboard hero */
.hero {
  background:
    radial-gradient(140% 90% at 85% -20%, rgba(204,211,255,.16) 0%, transparent 55%),
    linear-gradient(160deg, #0E3178 0%, var(--midnight) 45%, #081F4E 100%);
  border: 1px solid rgba(204,211,255,.22); border-radius: 18px; padding: 20px; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.hero .stage { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); margin-bottom: 14px; }
.hero .stage .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--flash); box-shadow: 0 0 10px var(--flash); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 11vw, 46px); letter-spacing: -.01em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero .of { color: var(--mist); font-size: 14px; font-weight: 500; margin: 6px 0 14px; }
.hero .rail { height: 6px; background: rgba(10,20,50,.65); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.hero .rail i { display: block; height: 100%; background: linear-gradient(90deg, var(--mist), var(--flash)); border-radius: 4px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.hero .rail-cap { display: flex; justify-content: space-between; color: var(--mist); font-size: 12px; font-weight: 500; }
.hero .note { margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(204,211,255,.18); color: #DDE3FF; font-size: 13.5px; }

/* metric grid */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px 12px; }
.metric .v { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.metric .l { color: var(--text-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.metric .s { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.metric .s.up { color: var(--up); }
.metric .s.down { color: var(--down); }

/* event card */
.event { display: flex; gap: 14px; align-items: center; }
.event .cal { flex: 0 0 auto; width: 52px; text-align: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 0 9px; }
.event .cal b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.1; }
.event .cal span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--flash); font-weight: 800; }
.event h3 { font-size: 15px; font-weight: 700; }
.event p { color: var(--text-2); font-size: 13px; }

/* section header inside views */
.sect { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.sect h2 { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.sect a, .sect button { color: var(--mist); font-size: 13px; font-weight: 700; }

/* ---------- deep dives ---------- */
.dive { display: flex; gap: 14px; align-items: flex-start; }
.dive .idx { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--text-3); padding-top: 2px; min-width: 26px; }
.dive h3 { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.dive p { color: var(--text-2); font-size: 13.5px; }
.dive .meta { color: var(--text-3); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; margin-top: 8px; }
.dive .go { margin-left: auto; align-self: center; color: var(--text-3); flex: 0 0 auto; }

/* dive reader */
.reader-bar { position: sticky; top: 0; z-index: 45; display: flex; align-items: center; gap: 10px; padding: 12px var(--pad); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.reader-bar b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { display: flex; align-items: center; gap: 4px; color: var(--mist); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.reader-frame { width: 100%; height: calc(100dvh - 49px); border: 0; background: #fff; }
.prose { padding: 22px var(--pad) 60px; max-width: 640px; margin: 0 auto; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.005em; margin: 1.4em 0 .5em; line-height: 1.2; }
.prose h1 { font-size: 24px; margin-top: .4em; } .prose h2 { font-size: 19px; } .prose h3 { font-size: 16px; }
.prose p, .prose li { color: #D9DBE8; font-size: 15px; margin-bottom: .9em; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 1em; }
.prose strong { color: var(--white); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; margin: 1em 0; }
.prose blockquote { border-left: 3px solid var(--flash); padding-left: 14px; color: var(--text-2); margin-bottom: 1em; }
.prose code { background: var(--surface-2); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }

/* ---------- feed ---------- */
.post { margin-bottom: 14px; }
.post .when { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.post .when time { color: var(--text-3); font-size: 12px; font-weight: 500; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge.round { background: rgba(255,224,102,.12); color: var(--flash); border-color: rgba(255,224,102,.3); }
.badge.report { background: rgba(53,196,141,.1); color: var(--up); border-color: rgba(53,196,141,.28); }
.badge.event { background: rgba(204,211,255,.1); color: var(--mist); border-color: rgba(204,211,255,.3); }
.post h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 6px; }
.post .body { color: var(--text-2); font-size: 14px; }
.post .body p { margin-bottom: .7em; }
.post .body p:last-child { margin-bottom: 0; }
.post .more { color: var(--mist); font-weight: 700; font-size: 13px; margin-top: 6px; }
.strip { display: flex; gap: 8px; overflow-x: auto; margin: 12px -18px 2px; padding: 0 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip img { height: 150px; width: auto; border-radius: 8px; scroll-snap-align: start; flex: 0 0 auto; border: 1px solid var(--border); }
.pinned { border-color: rgba(255,224,102,.35); }
.pinned .pin { color: var(--flash); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,6,10,.94); display: grid; place-items: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: 96vw; max-height: 84dvh; border-radius: 8px; }
.lightbox .x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; color: var(--white); font-size: 26px; padding: 8px; }
.lightbox .nav { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- dataroom ---------- */
.folder { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.folder > button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 16px; }
.folder .no { font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--text-3); min-width: 20px; }
.folder .fname { font-weight: 700; font-size: 14.5px; flex: 1; }
.folder .n { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.folder .chev { color: var(--text-3); transition: transform .18s; }
.folder.open .chev { transform: rotate(90deg); }
.folder .files { display: none; border-top: 1px solid var(--border); }
.folder.open .files { display: block; }
.frow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.frow:last-child { border-bottom: 0; }
.frow:active { background: var(--surface-2); }
.ftype { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; padding: 4px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); min-width: 38px; text-align: center; }
.ftype.pdf { color: #F3A29A; border-color: rgba(224,97,86,.3); }
.ftype.xls { color: #8FE0BD; border-color: rgba(53,196,141,.3); }
.ftype.img { color: var(--mist); border-color: rgba(204,211,255,.3); }
.frow .fn { flex: 1; font-size: 13.5px; font-weight: 500; word-break: break-word; }
.frow .fs { color: var(--text-3); font-size: 11.5px; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.frow .dl { color: var(--text-3); padding: 6px; flex: 0 0 auto; }
.frow .dl:active { color: var(--flash); }

/* ---------- empty / misc ---------- */
.empty { text-align: center; color: var(--text-3); padding: 48px 20px; }
.empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px; }
.footnote { color: var(--text-3); font-size: 11.5px; text-align: center; margin-top: 26px; letter-spacing: .04em; }

@media (min-width: 700px) {
  :root { --pad: 28px; }
  .mgrid { grid-template-columns: repeat(3, 1fr); }
  .tabbar { max-width: 640px; left: 50%; transform: translateX(-50%); border: 1px solid var(--border); border-radius: 18px 18px 0 0; }
}

/* ---------- desktop: split login + left-rail shell ---------- */
@media (min-width: 1024px) {
  /* login becomes a two-column composition: statement left, card right */
  .login {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-rows: auto 1fr auto; column-gap: 7vw; align-items: center;
    padding: 56px clamp(48px, 8vw, 120px) 44px;
  }
  .login-brand { grid-column: 1 / -1; align-self: start; margin-bottom: 0; }
  .login-copy { grid-column: 1; }
  .login h1 { font-size: clamp(44px, 4.6vw, 64px); margin-bottom: 16px; }
  .login .lede { font-size: 18px; max-width: 44ch; margin-bottom: 0; }
  .login-card { grid-column: 2; width: 100%; max-width: 440px; justify-self: end; }
  .login-foot { grid-column: 1 / -1; align-self: end; padding-top: 0; }

  /* bottom tabs become a left rail; content breathes */
  .shell { padding-left: 232px; padding-bottom: 40px; }
  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: 232px; max-width: none; transform: none;
    display: flex; flex-direction: column; gap: 4px; justify-content: flex-start;
    padding: 86px 16px 20px; border: 0; border-right: 1px solid var(--border); border-radius: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }
  .tab {
    flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px;
    border-radius: 10px;
  }
  .tab span { font-size: 13px; letter-spacing: .03em; }
  .tab:hover { color: var(--text-2); background: var(--surface); }
  .tab.on { background: var(--surface); }
  .tab.on::before { top: 22%; bottom: 22%; left: 0; width: 2px; height: auto; }
  .topbar { padding-left: 36px; }
  .menu { top: 60px; right: 28px; }
  .view { max-width: 880px; padding: 34px 40px 48px; }
  .h-page { font-size: 30px; }
  .hero { padding: 28px 32px; }
  .hero .big { font-size: 52px; }
  .mgrid { gap: 12px; }
  .prose { max-width: 720px; padding-top: 30px; }
  .reader-bar { padding-left: 40px; }
  .strip img { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
