/* Parachute prototype — shared shell + component styles.
   Skin theming happens entirely through CSS variables set by app.js. */

:root {
  --brand: #2F5DA8; --brand-ink: #fff; --accent: #FF7A59;
  --bg: #F3F6FA; --card: #fff; --ink: #182233; --ink-soft: #5D6B80; --line: #E2E9F2;
  --font-head: 'Manrope', sans-serif; --font-body: 'Manrope', sans-serif;
  --st-red: #E5484D; --st-yellow: #F5B000; --st-green: #30A46C; --st-purple: #8E4EC6;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: #191A1C;
  color: var(--ink);
}

/* ---------- desktop stage around the phone ---------- */
.stage {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 34px 20px;
  background: radial-gradient(1200px 700px at 50% -10%, #2a2c30, #191A1C 70%);
}
.stage-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.stage-bar .label {
  font: 600 11px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase;
  color: #8b8f96; margin-right: 2px;
}
.pill {
  border: 1px solid #3a3d42; background: #232529; color: #c9ccd2;
  font: 600 12.5px var(--font-body); padding: 8px 15px; border-radius: 100px;
  cursor: pointer; transition: all .15s;
}
.pill:hover { border-color: #5a5e66; color: #fff; }
.pill.on { background: #fff; color: #16181b; border-color: #fff; }
.stage-title { text-align: center; color: #fff; }
.stage-title .titlerow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.stage-title h1 { font: 800 19px var(--font-body); letter-spacing: -.01em; }
.pitchlink {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font: 700 11.5px var(--font-body); letter-spacing: .02em;
  color: #16181b; background: var(--accent); padding: 6px 13px; border-radius: 100px;
  transition: transform .12s;
}
.pitchlink:hover { transform: translateY(-1px); }
.stage-title .sub { font: 500 12.5px var(--font-body); color: #8b8f96; margin-top: 4px; }
.stage-back {
  color: #8b8f96; font: 600 12.5px var(--font-body); text-decoration: none;
}
.stage-back:hover { color: #fff; }

/* ---------- phone frame ---------- */
.phone {
  position: relative; width: 390px; height: 800px; flex: none;
  border-radius: 54px; background: #0c0d0e; padding: 12px;
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06);
}
.phone .screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 42px; overflow: hidden; background: var(--bg);
}
.notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 30px; background: #0c0d0e; border-radius: 0 0 18px 18px; z-index: 90;
}

/* ---------- scroll-focus mode ----------
   When the page needs scrolling, scrolling down lifts the phone into a
   centered, fit-to-viewport modal state; scrolling back to top reverts. */
.focus-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(9, 10, 12, .8); backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
body.appfocus .focus-backdrop { opacity: 1; pointer-events: auto; cursor: zoom-out; }
body.appfocus .phone {
  position: fixed; top: 50%; left: 50%; z-index: 200; margin: 0;
}
.focus-hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 210;
  font: 600 12px var(--font-body); color: rgba(255,255,255,.45);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
body.appfocus .focus-hint { opacity: 1; }

/* on a real phone: drop the stage + bezel, app fills the viewport */
@media (max-width: 700px) {
  .stage { padding: 0; gap: 0; background: var(--bg); }
  #phone-slot { width: 100%; }
  .stage-bar, .stage-title, .stage-back { display: none; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; background: var(--bg); }
  .phone .screen { border-radius: 0; }
  .notch { display: none; }
}

/* ---------- app chrome ---------- */
.app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.statusbar {
  height: 48px; flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 6px; font: 600 13px var(--font-body); color: var(--header-ink, var(--brand-ink));
  background: var(--header, var(--brand)); position: relative; z-index: 20;
}
.appbar {
  flex: none; background: var(--header, var(--brand)); color: var(--header-ink, var(--brand-ink)); padding: 8px 20px 16px;
}
.appbar .brandrow { display: flex; align-items: center; justify-content: space-between; }
.brandmark { display: flex; align-items: center; gap: 9px; }
.brandmark .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #141414;
  display: flex; align-items: center; justify-content: center; font: 800 15px var(--font-head);
}
.brandmark .brandlogo { height: 30px; display: block; }
.brandmark .name { font: 800 16px var(--font-head); letter-spacing: -.01em; }
.brandmark .powered { font: 600 8.5px 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; opacity: .65; margin-top: 2px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font: 800 12.5px var(--font-body);
  position: relative;
}
.avatar .dot, .facepic .dot {
  position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%;
  border: 2.5px solid var(--card);
}

.content { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.content::-webkit-scrollbar { display: none; }
.pad { padding: 16px 16px 90px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font: 600 10px var(--font-body); color: var(--ink-soft); cursor: pointer; border: 0; background: none;
}
.tab .ico { font-size: 19px; line-height: 1; }
.tab.on { color: var(--brand); }

/* ---------- cards & lists ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 15px; margin-bottom: 11px;
}
.section-label {
  font: 600 10.5px 'IBM Plex Mono', monospace; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-soft); margin: 16px 2px 9px;
}
.section-label:first-child { margin-top: 2px; }

h2.screen-title { font: 800 24px var(--font-head); letter-spacing: -.015em; color: var(--ink); margin: 4px 2px 2px; }
.screen-sub { font: 500 12.5px var(--font-body); color: var(--ink-soft); margin: 0 2px 12px; }

.person { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.facepic {
  width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative;
  background: var(--brand); color: var(--brand-ink);
  display: flex; align-items: center; justify-content: center; font: 800 14px var(--font-body);
}
.person .who { flex: 1; min-width: 0; }
.person .nm { font: 700 14.5px var(--font-body); color: var(--ink); }
.person .meta { font: 500 11.5px var(--font-body); color: var(--ink-soft); margin-top: 2px; }
.person .extra { font: 500 10.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); opacity: .85; margin-top: 2px; }
.stchip {
  font: 700 10px var(--font-body); padding: 5px 9px; border-radius: 100px; flex: none; color: #fff;
}

/* ---------- your status card ---------- */
.youcard { border: 0; color: #fff; position: relative; overflow: hidden; cursor: pointer; }
.youcard .yc-label { font: 600 10px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.youcard .yc-status { font: 800 26px var(--font-head); letter-spacing: -.015em; margin-top: 5px; }
.youcard .yc-sub { font: 500 12px var(--font-body); opacity: .85; margin-top: 6px; max-width: 240px; line-height: 1.4; }
.youcard .yc-change {
  position: absolute; right: 14px; top: 14px; background: rgba(255,255,255,.2);
  font: 700 11px var(--font-body); padding: 7px 12px; border-radius: 100px;
}
.youcard .yc-dots { display: flex; gap: 6px; margin-top: 14px; }
.yc-dots span { width: 10px; height: 10px; border-radius: 50%; opacity: .38; }
.yc-dots span.on { opacity: 1; transform: scale(1.35); box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* ---------- hiring badge ---------- */
.hbadge {
  display: inline-block; vertical-align: 1px; margin-left: 4px;
  background: #8E4EC6; color: #fff; font: 700 9px var(--font-body);
  padding: 3px 7px; border-radius: 100px; letter-spacing: .03em; text-transform: uppercase;
}
.sheet-divider { height: 1px; background: var(--line); margin: 14px 2px; }

/* ---------- jobs ---------- */
.job .jtitle { font: 800 16px var(--font-head); color: var(--ink); letter-spacing: -.01em; }
.job .jmeta { font: 500 10.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-top: 5px; }
.job .jvia { font: 600 11.5px var(--font-body); color: color-mix(in srgb, var(--brand) 75%, var(--ink)); margin-top: 6px; }
.job .jrow { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.jtag {
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  font: 700 11.5px var(--font-body); padding: 6px 11px; border-radius: 8px;
}
.jcomp { font: 600 11.5px 'IBM Plex Mono', monospace; color: var(--ink-soft); }

/* ---------- feed ---------- */
.feeditem { display: flex; gap: 11px; align-items: flex-start; padding: 10px 2px; }
.feeditem .fdot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: none; }
.feeditem .ftext { font: 500 13px var(--font-body); color: var(--ink); line-height: 1.45; }
.feeditem .ftext b { font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; border: 0; cursor: pointer; text-align: center;
  background: var(--brand); color: var(--brand-ink); font: 800 15px var(--font-body);
  padding: 15px; border-radius: 14px;
}
.btn.ghost { background: transparent; color: var(--ink-soft); font-weight: 600; padding: 11px; }
.btn.accent { background: var(--accent); color: #141414; }

.backlink { font: 600 13px var(--font-body); color: var(--header-ink, var(--brand-ink)); opacity: .85; cursor: pointer; padding: 2px 0 8px; display: inline-block; }
.appbar .bigtitle { font: 800 24px var(--font-head); letter-spacing: -.015em; margin-top: 4px; }
.appbar .bigsub { font: 500 12px var(--font-body); opacity: .8; margin-top: 5px; }

/* ---------- status picker sheet ---------- */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 60; background: rgba(10,12,15,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--card); border-radius: 26px 26px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .26s cubic-bezier(.32,.72,.28,1);
}
.sheet.open { transform: translateY(0); }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font: 800 18px var(--font-head); color: var(--ink); margin-bottom: 2px; }
.sheet .note { font: 500 12px var(--font-body); color: var(--ink-soft); margin-bottom: 14px; line-height: 1.4; }
.stopt {
  display: flex; align-items: center; gap: 13px; padding: 13px 12px; border-radius: 14px;
  border: 1.5px solid var(--line); margin-bottom: 9px; cursor: pointer; background: var(--card);
}
.stopt .swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.stopt .so-name { font: 700 14.5px var(--font-body); color: var(--ink); }
.stopt .so-sub { font: 500 11px var(--font-body); color: var(--ink-soft); margin-top: 1px; }
.stopt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.stopt .check { margin-left: auto; font-weight: 800; color: var(--ink); opacity: 0; }
.stopt.on .check { opacity: 1; }

/* ---------- toast ---------- */
.toast {
  position: absolute; left: 16px; right: 16px; bottom: 86px; z-index: 80;
  background: var(--ink); color: var(--card); font: 600 13px var(--font-body);
  padding: 13px 16px; border-radius: 13px; text-align: center;
  opacity: 0; transform: translateY(8px); transition: all .25s; pointer-events: none;
  line-height: 1.4;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- confirmation screen ---------- */
.confirm { padding: 40px 24px 90px; }
.confirm .bigcheck {
  width: 68px; height: 68px; border-radius: 50%; background: var(--st-green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 20px;
}
.confirm h2 { font: 800 26px var(--font-head); color: var(--ink); letter-spacing: -.015em; line-height: 1.1; }
.confirm p { font: 500 14px var(--font-body); color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.msgpreview {
  background: color-mix(in srgb, var(--ink) 5%, var(--card)); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 14px; margin-top: 18px;
  font: 500 12.5px var(--font-body); color: var(--ink); line-height: 1.5;
}
.msgpreview .mp-label { font: 600 9.5px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }

/* screens */
.screen-page { display: none; }
.screen-page.on { display: block; }

/* ---------- network matching (job detail) ---------- */
.matchnote { font: 500 11.5px var(--font-body); color: var(--ink-soft); margin: -3px 2px 10px; line-height: 1.45; }
.match { align-items: flex-start; }
.match .who { padding-top: 1px; }
.topmatch {
  font: 700 8.5px 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: var(--brand); padding: 3px 7px; border-radius: 100px;
  vertical-align: 2px; margin-left: 4px;
}
.mchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.mchip {
  font: 600 10px var(--font-body); padding: 3.5px 8px; border-radius: 100px;
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
}
.mchip.green { background: color-mix(in srgb, #30A46C 14%, var(--card)); color: #1d7a4e; border-color: color-mix(in srgb, #30A46C 30%, var(--line)); }
.mchip.yellow { background: color-mix(in srgb, #F5B000 16%, var(--card)); color: #93690a; border-color: color-mix(in srgb, #F5B000 34%, var(--line)); }
.matchside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.matchside .pct { font: 800 21px var(--font-head); letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.matchside .pct span { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-left: 1px; }
.matchside .refbtn { width: auto; padding: 8px 15px; font-size: 12px; margin: 0; }
.jsrc {
  font: 500 10.5px 'IBM Plex Mono', monospace; color: var(--ink-soft);
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); cursor: pointer;
}
.jsrc span { opacity: .7; }
.jmatchhint {
  font: 600 11px var(--font-body); color: var(--brand);
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line);
}

/* ---------- status, demoted (v3) ---------- */
.nmdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 1px; margin-left: 2px; }
.nmdot.big { width: 14px; height: 14px; flex: none; }
.youstat { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 15px; }
.youstat .ys-text { flex: 1; min-width: 0; font: 500 12.5px var(--font-body); color: var(--ink-soft); }
.youstat .ys-text b { color: var(--ink); font-weight: 700; }
.youstat .ys-text span { font-size: 10.5px; }
.youstat .ys-change { flex: none; font: 700 11.5px var(--font-body); color: var(--ink); border: 1px solid var(--line); padding: 6px 12px; border-radius: 100px; }

/* ---------- network sources (phone / LinkedIn) ---------- */
.srccard { padding: 6px 15px; }
.srcrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.srcrow + .srcrow { border-top: 1px solid var(--line); }
.srcico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ink);
}
.srctext { flex: 1; min-width: 0; }
.srctext b { font: 700 13px var(--font-body); color: var(--ink); display: block; }
.srctext span { font: 500 10.5px var(--font-body); color: var(--ink-soft); }
.srcstate { font: 700 10px var(--font-body); padding: 5px 10px; border-radius: 100px; flex: none; }
.srcstate.on { background: color-mix(in srgb, #30A46C 15%, var(--card)); color: #1d7a4e; }
.srcbtn { width: auto; padding: 8px 15px; font-size: 12px; margin: 0; flex: none; }
.mchip.src { background: var(--card); border-style: dashed; font-weight: 700; }

/* ---------- network snapshot + referral tracker ---------- */
.snapshot { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: -3px 2px 12px; }
.snapchip { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--font-body); color: var(--ink-soft); }
.snapchip .nmdot { margin: 0; }
.refrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.refrow + .refrow { border-top: 1px solid var(--line); }
.reftext { flex: 1; min-width: 0; }
.reftext b { font: 700 13px var(--font-body); color: var(--ink); display: block; }
.reftext span { font: 500 10.5px var(--font-body); color: var(--ink-soft); }
.refstage { font: 700 10px var(--font-body); color: #fff; padding: 5px 10px; border-radius: 100px; flex: none; }
