/* Admit OS v2 — IG + TikTok + LinkedIn hybrid social stylesheet */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #fafafa;
  --bg-soft: #e3ece8;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.88);
  --ink: #0a1815;
  --ink-soft: #273935;
  --muted: #5a6d68;
  --line: #d4e0dc;
  --brand: #091e1a;
  --brand-soft: #12352e;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-soft: #ffedd5;
  --mint: #10b981;
  --mint-soft: #d1fae5;
  --sky: #0284c7;
  --sky-soft: #e0f2fe;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --danger: #dc2626;
  --shadow-sm: 0 4px 16px rgba(9, 30, 26, 0.05);
  --shadow-md: 0 12px 34px rgba(9, 30, 26, 0.09);
  --shadow-lg: 0 22px 54px rgba(9, 30, 26, 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

/* App Shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.left-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 256px;
  background: var(--panel-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line);
  padding: 1.35rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 40;
  overflow-y: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.6rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 6px 16px rgba(9, 30, 26, 0.22);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand);
  line-height: 1;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.15rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: var(--mint-soft);
  color: #065f46;
  font-size: 0.7rem;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24);
}

.rail-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.15rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.rail-link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.rail-link--active {
  background: #fff4ed;
  color: var(--accent);
  box-shadow: none;
}

.rail-link--active:hover {
  background: #ffedd5;
  color: var(--accent-hover);
}

.rail-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.rail-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rail-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* Mobile Header + Bottom Tab Bar */
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 38;
  background: var(--panel-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.95rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mobile-subnav {
  display: none;
  overflow-x: auto;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.mobile-subnav::-webkit-scrollbar {
  display: none;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 42;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.35rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 10px;
}

.mobile-tab--active {
  color: var(--accent);
}

/* Stage layout */
.stage-wrap {
  margin-left: 256px;
  min-height: 100dvh;
  padding: 1.25rem 1.25rem 4rem;
}

.stage-container {
  max-width: 860px;
  margin: 0 auto;
}

.feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 470px) 280px;
  gap: 1.25rem;
  align-items: start;
  justify-content: center;
}

@media (max-width: 1040px) {
  .feed-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .left-rail {
    display: none;
  }
  .mobile-topbar {
    display: flex;
  }
  .mobile-subnav {
    display: flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .stage-wrap {
    margin-left: 0;
    padding: 0.85rem 0.75rem 5.5rem;
  }
}

/* Readiness Ring & Avatars */
.ready-ring {
  width: var(--ring-size, 46px);
  height: var(--ring-size, 46px);
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(var(--mint) calc(var(--pct, 0) * 1%), #d5e2dd 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ready-ring__inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink);
}

.avatar {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--brand);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--panel);
  overflow: hidden;
}

.avatar--sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar--xl { width: 82px; height: 82px; font-size: 1.5rem; border-width: 4px; }

/* Stories Tray (IG style) */
.story-tray {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
}

.story-tray::-webkit-scrollbar {
  height: 0;
}

.story-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 108px;
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 0;
  text-align: center;
}

.story-ring {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 64px;
}

.story-ring img {
  width: 58px;
  height: 58px;
  max-width: 58px;
  max-height: 58px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--panel);
}

.story-name {
  display: block;
  width: 108px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #262626;
  background: #fff;
  padding: 0.15rem 0.2rem 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.story-badge-mini {
  display: block;
  max-width: 108px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.12rem 0.35rem;
  border-radius: 8px;
  background: var(--mint-soft);
  color: #065f46;
  white-space: normal;
  text-align: center;
}

/* Cards & Panels */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-pad {
  padding: 1.25rem;
}

.hero-banner {
  background: linear-gradient(125deg, #071916 0%, #10352e 55%, #0f4c5c 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 1.65rem 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.2rem;
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.42), transparent 68%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #a7f3d0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
  margin: 0.65rem 0 0.5rem;
  max-width: 30ch;
}

.hero-sub {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.84);
  max-width: 58ch;
  margin: 0;
}

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 1.05rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-brand {
  background: var(--brand);
  color: #ffffff;
}

.btn-brand:hover {
  background: var(--brand-soft);
}

.btn-outline {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  background: var(--bg);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-sm {
  padding: 0.36rem 0.78rem;
  font-size: 0.76rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--ink-soft);
}

.chip-dest {
  background: var(--sky-soft);
  color: #0369a1;
  text-transform: uppercase;
}

.chip-scholar {
  background: var(--accent-soft);
  color: #9a3412;
}

.chip-reason {
  background: var(--mint-soft);
  color: #065f46;
}

.chip-rank {
  background: var(--amber-soft);
  color: #92400e;
}

/* Filter Pill Bar */
.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.filter-pill {
  padding: 0.42rem 0.88rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--panel);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.filter-pill--active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Post Card (IG + LinkedIn hybrid) */
.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  position: relative;
  z-index: 2;
  background: #fff;
}

.post-who {
  min-width: 0;
  flex: 1;
}

.post-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #262626;
  white-space: normal;
  overflow: visible;
}

.post-media {
  position: relative;
  max-height: 490px;
  background: #0a1412;
  overflow: hidden;
}

.post-media img {
  width: 100%;
  height: 100%;
  max-height: 490px;
  object-fit: cover;
}

.post-body {
  padding: 1rem 1.15rem;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.action-btn--liked {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.action-btn--saved {
  background: var(--amber-soft);
  border-color: #fcd34d;
  color: #92400e;
}

/* Reels — one clip at a time, upload always visible */
.reels-page {
  max-width: 460px;
  margin: 0 auto;
}

.reel-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.reel-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.reel-player {
  position: relative;
  width: 100%;
  height: min(78dvh, 760px);
  border-radius: 28px;
  overflow: hidden;
  background: #050807;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.reel-fit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050807;
}

.reel-wait {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  gap: 0.7rem;
  color: #fff;
}

.reel-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  pointer-events: none;
}

.reel-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 1.2rem 0.9rem 0.85rem;
}

.reel-author {
  display: inline-block;
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
}

.reel-caption {
  margin: 0.3rem 0 0.45rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.reel-meta .post-actions {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.reel-meta .action-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: transparent;
}

.reel-note {
  min-height: 0;
  margin: 0.3rem 0 0;
  color: #fecaca;
  font-size: 0.78rem;
}

.reel-drop {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.9rem;
  padding: 1.15rem;
  border-radius: 18px;
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  text-align: center;
}

.reel-drop span {
  color: var(--muted);
  font-size: 0.82rem;
}

.reel-preview {
  margin-top: 0.7rem;
}

.reel-preview img,
.reel-preview video {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 16px;
  background: #111;
}

.reel-fab {
  position: fixed;
  right: 1.15rem;
  bottom: 1.3rem;
  z-index: 48;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.05rem;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.35);
}

.rail-upload {
  width: 100%;
  text-align: left;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 0;
  font-weight: 800;
}

.story-ring--add {
  background: var(--panel);
  border: 2px dashed var(--accent);
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.on-reels .reel-fab {
  display: none;
}

@media (max-width: 820px) {
  .reel-fab {
    bottom: 5.1rem;
  }
  .reel-player {
    height: min(70dvh, 680px);
  }
}

/* University & Scholarship Grids */
.uni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.1rem;
}

.uni-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.uni-cover {
  position: relative;
  height: 165px;
  background: var(--brand);
  overflow: hidden;
}

.uni-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uni-cover-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9,30,26,0.05) 20%, rgba(9,30,26,0.88) 100%);
}

.uni-cover-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 0.9rem 1rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.uni-cover img {
  position: relative;
  z-index: 0;
}

.uni-blurb {
  color: var(--muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.uni-writeup {
  white-space: pre-line;
  line-height: 1.55;
}

/* Inputs & Forms */
.input, .select, .textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
  outline: none;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  background: var(--panel);
}

/* Modal / Overlay */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 16, 14, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-card {
  width: min(520px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 1.4rem;
}

/* Compare Table */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* Checklist Grid */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.check-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.84rem;
  font-weight: 600;
}

.check-tile--done {
  background: var(--mint-soft);
  border-color: #6ee7b7;
  color: #065f46;
}
