/* ==========================================================================
   MadeVisible Design System
   Single source of truth for tokens + components. Every page reuses these.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand color scale */
  --navy: #0B1026;
  --navy-700: #1A2352;
  --blue: #2563FF;
  --blue-bright: #2F6BFF;
  --blue-soft: #E6F0FF;
  --blue-soft-2: #E3EDFF;
  --page-bg: #F2F4F7;
  --text: #121827;
  --text-2: #667085;
  --text-3: #98A2B3;
  --border: #E4E7EC;
  --border-2: #EDF0F4;
  --green: #169B72;
  --green-soft: #E7F6EF;
  --red: #E5484D;
  --red-soft: #FDECEF;
  --amber: #F59E0B;
  --amber-soft: #FDF3E9;
  --violet: #7C3AED;
  --violet-soft: #EFEBFF;
  --white: #FFFFFF;

  /* Icon tile tints */
  --tile-blue-bg: #EAF1FF;
  --tile-blue-fg: #2563FF;
  --tile-green-bg: #E7F6EF;
  --tile-green-fg: #169B72;
  --tile-amber-bg: #FDF3E9;
  --tile-amber-fg: #E08128;
  --tile-violet-bg: #EFEBFF;
  --tile-violet-fg: #7C3AED;
  --tile-red-bg: #FDECEF;
  --tile-red-fg: #E5484D;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadow (subtle only) */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 10px 28px rgba(16, 24, 40, 0.10);
  --shadow-fab: 0 8px 20px rgba(20, 99, 255, 0.35);
  --shadow-blue-glow: 0 10px 30px rgba(20, 99, 255, 0.18);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 28px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Layout */
  --content-max: 1200px;
  --app-max: 440px;
  --page-pad: 20px;
  --header-h: 60px;
  --bottomnav-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- Type helpers ---------- */
.page-title   { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.section-title{ font-size: 23px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.card-title   { font-size: 18px; font-weight: 680; letter-spacing: -0.01em; line-height: 1.3; margin: 0; }
.body         { font-size: 16px; color: var(--text); }
.muted        { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.muted-sm     { font-size: 13px; color: var(--text-2); }
.eyebrow      { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.accent       { color: var(--blue); }
.strong       { font-weight: 700; }

/* ---------- Layout primitives ---------- */
.page-container { width: 100%; max-width: var(--app-max); margin: 0 auto; padding: 0 var(--page-pad); }
.wide-container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.stack   > * + * { margin-top: var(--s-4); }
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-6 > * + * { margin-top: var(--s-6); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { display: flex; align-items: center; justify-content: center; }
.hide { display: none !important; }
.app-main { padding-top: calc(var(--s-5)); padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--s-8)); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--s-5); }
.card-pad-lg { padding: var(--s-6); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
@media (hover: hover) {
  .card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
}
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px;
  border-radius: 14px;
  font-size: 15px; font-weight: 650; letter-spacing: -0.01em;
  transition: background .15s ease, box-shadow .15s ease, transform .08s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.btn-primary:hover { background: #1E50E6; }
.btn-primary:active { background: #1B48CC; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }

.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #fafbfc; border-color: #d5dae1; }

.btn-soft { background: var(--blue-soft); color: var(--blue); }
.btn-soft:hover { background: var(--blue-soft-2); }

.btn-ghost { background: transparent; color: var(--blue); padding: 0 8px; }
.btn-ghost:hover { background: var(--blue-soft); }

.btn-pill { border-radius: var(--r-pill); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn-lg { height: 52px; font-size: 16px; border-radius: 16px; }
.btn-full { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; color: var(--text);
  transition: background .15s ease;
}
.icon-btn:hover { background: #f0f2f6; }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; }

/* Screen-reader-only utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--blue-soft); color: var(--blue);
  font-size: 12.5px; font-weight: 650; letter-spacing: -0.01em;
}
.pill svg { width: 14px; height: 14px; }
.pill-navy { background: rgba(11,16,38,.06); color: var(--navy); }
.pill-dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; display:inline-block; }
.tag-pro {
  display:inline-flex; align-items:center; height:20px; padding:0 8px; border-radius:6px;
  background: linear-gradient(135deg,#2563FF,#2F6BFF); color:#fff;
  font-size:10.5px; font-weight:800; letter-spacing:.08em;
}
.tag-free {
  display:inline-flex; align-items:center; height:22px; padding:0 10px; border-radius:6px;
  background: var(--blue-soft); color: var(--blue); font-size:11px; font-weight:800; letter-spacing:.08em;
}

/* ---------- Avatar ---------- */
.avatar {
  --sz: 44px;
  width: var(--sz); height: var(--sz); flex: 0 0 var(--sz);
  border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue);
  font-weight: 700; font-size: calc(var(--sz) * 0.38); letter-spacing: -0.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { --sz: 36px; }
.avatar-lg { --sz: 56px; }
.avatar-xl { --sz: 72px; }
.avatar-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--border); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; }
.avatar-stack .avatar + .avatar { margin-left: -12px; }

.verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--blue); flex: 0 0 16px;
}
.verified svg { width: 100%; height: 100%; }

/* ---------- Icon tile ---------- */
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 40px;
  background: var(--tile-blue-bg); color: var(--tile-blue-fg);
}
.icon-tile svg { width: 20px; height: 20px; }
.icon-tile.lg { width: 48px; height: 48px; border-radius: 14px; flex-basis: 48px; }
.icon-tile.blue   { background: var(--tile-blue-bg);   color: var(--tile-blue-fg); }
.icon-tile.green  { background: var(--tile-green-bg);  color: var(--tile-green-fg); }
.icon-tile.amber  { background: var(--tile-amber-bg);  color: var(--tile-amber-fg); }
.icon-tile.violet { background: var(--tile-violet-bg); color: var(--tile-violet-fg); }
.icon-tile.red    { background: var(--tile-red-bg);    color: var(--tile-red-fg); }
.icon-tile.navy   { background: rgba(11,16,38,.08);    color: var(--navy); }

/* ---------- Section header ---------- */
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); }
.section-header .see-all { font-size: 14px; font-weight: 650; color: var(--blue); flex: 0 0 auto; }

/* ==========================================================================
   Mobile app header
   ========================================================================== */
.ow-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}
.ow-header-inner {
  height: var(--header-h);
  max-width: var(--app-max); margin: 0 auto; padding: 0 var(--page-pad);
  display: flex; align-items: center; gap: 10px;
}
/* ---------- MadeVisible logo lockup ---------- */
.ow-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.025em; color: var(--navy); flex: 0 0 auto; white-space: nowrap; }
.ow-logo .mark { width: 36px; height: 36px; flex: 0 0 36px; line-height: 0; }
.mv-word { display: inline-flex; align-items: baseline; }
.mv-i { position: relative; }
.mv-i::before {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  top: 0.02em; width: 0; height: 0;
  border-left: 0.115em solid transparent; border-right: 0.115em solid transparent;
  border-top: 0.21em solid var(--violet);
}
.ow-logo-reverse { color: #fff; }
.ow-logo-reverse .mv-i::before { border-top-color: #A78BFA; }
/* clear-space + never clipped */
.ow-logo, .ow-logo .mark svg { overflow: visible; }
.header-msg { flex: 0 0 40px; }
.ow-header .page-heading { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

/* Header search (feed) */
.header-search {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  background: #f1f3f7; border-radius: var(--r-pill);
  color: var(--text-2); font-size: 14px;
}
.header-search svg { width: 18px; height: 18px; flex: 0 0 18px; }
.header-search input {
  border: 0; background: transparent; outline: none;
  font: inherit; color: var(--text); width: 100%; min-width: 0;
}
.header-search input::placeholder { color: var(--text-2); }

.badge-dot {
  position: absolute; top: 6px; right: 6px;
  min-width: 8px; height: 8px; border-radius: var(--r-pill);
  background: var(--red); border: 2px solid #fff;
}
.badge-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.pos-rel { position: relative; }

/* ==========================================================================
   Desktop marketing / app nav
   ========================================================================== */
.ow-desknav { display: none; }
.ow-desknav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.ow-desknav-inner {
  max-width: var(--content-max); margin: 0 auto; padding: 0 24px; height: 68px;
  display: flex; align-items: center; gap: 28px;
}
.ow-desknav .nav-links { display: flex; align-items: center; gap: 26px; margin: 0 auto; }
.ow-desknav .nav-links a { font-size: 15px; font-weight: 550; color: var(--text-2); }
.ow-desknav .nav-links a:hover, .ow-desknav .nav-links a.active { color: var(--text); }
.ow-desknav .nav-cta { display: flex; align-items: center; gap: 10px; }

/* ==========================================================================
   Bottom navigation + FAB
   ========================================================================== */
.ow-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.95); backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
}
.ow-bottomnav-inner {
  max-width: var(--app-max); margin: 0 auto; height: var(--bottomnav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .01em;
  height: 100%; position: relative; transition: color .18s ease;
}
.nav-item svg { width: 24px; height: 24px; stroke-width: 2; transition: transform .18s ease; }
.nav-item:active svg { transform: scale(.9); }
.nav-item.active svg { stroke-width: 2.4; }
.nav-item.active .nav-ind { animation: navDotIn .22s cubic-bezier(.2,.8,.3,1.2); }
@keyframes navDotIn { from { transform: scale(0); } to { transform: scale(1); } }
/* App variant: active = navy. Flat (analytics) variant: active = blue */
.nav-item.active { color: var(--navy); }
.nav-item.active .nav-ind {
  position: absolute; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--navy);
}
.ow-bottomnav.flat .nav-item.active { color: var(--blue); }
.ow-bottomnav.flat .nav-item.active .nav-ind { background: var(--blue); }
.nav-fab-slot { position: relative; }
.ow-fab {
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid #fff; box-shadow: 0 8px 20px rgba(11,16,38,.32);
  transition: transform .12s ease, background .15s ease;
}
.ow-fab:hover { background: var(--navy-700); }
.ow-fab:active { transform: translateX(-50%) scale(.94); }
.ow-fab svg { width: 26px; height: 26px; stroke-width: 2.5; }
.header-msg { border: 1px solid var(--border); color: var(--navy); }
.header-msg:hover { background: #f0f2f6; }

/* ==========================================================================
   Metric / analytics cards
   ========================================================================== */
.metric-split { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: stretch; }
.metric-split .vline { background: var(--border); }
.metric-col { padding: 4px 16px; }
.metric-col:first-child { padding-left: 4px; }
.metric-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.metric-label { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; margin-top: 8px; }
.trend.up { color: var(--green); }
.trend.flat { color: var(--text-3); }
.trend.down { color: var(--red); }
.trend svg { width: 14px; height: 14px; }
.sparkline { width: 100%; height: 30px; margin-top: 10px; display: block; }

.metric-mini {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.metric-mini .metric-value { font-size: 22px; }
.metric-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Three-column in-card metrics with separators */
.metric-triple { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.metric-triple > * { padding: 0 14px; position: relative; }
.metric-triple > * + *::before { content:""; position:absolute; left:0; top:6px; bottom:6px; width:1px; background: var(--border); }
.metric-triple > *:first-child { padding-left: 0; }
.metric-triple > *:last-child { padding-right: 0; }

/* ==========================================================================
   Pro banners
   ========================================================================== */
.pro-banner {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(47,107,255,.16), rgba(47,107,255,0) 55%),
    linear-gradient(180deg, #F3F7FF 0%, #EBF2FF 100%);
  border: 1px solid #DCE7FF;
  box-shadow: var(--shadow-blue-glow);
  padding: var(--s-5);
}
.pro-banner .pro-icon {
  width: 48px; height: 48px; border-radius: 14px; flex: 0 0 48px;
  background: linear-gradient(135deg, #2563FF, #2F6BFF);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(20,99,255,.35);
}
.pro-banner .pro-icon svg { width: 24px; height: 24px; }
.pro-banner-row { display: flex; align-items: center; gap: 14px; }
.pro-dismiss { position: absolute; top: 14px; right: 14px; color: var(--text-3); }
.pro-dismiss:hover { color: var(--text-2); }
.pro-callout {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: linear-gradient(90deg, #E6F0FF, #F5F8FF);
  border: 1px solid #DCE7FF; color: var(--navy);
}
.pro-callout .pro-icon-sm { width: 34px; height: 34px; border-radius: 10px; flex:0 0 34px; background: linear-gradient(135deg,#2563FF,#2F6BFF); color:#fff; display:flex; align-items:center; justify-content:center; }
.pro-callout .pro-icon-sm svg { width: 18px; height: 18px; }

/* ==========================================================================
   Feed: composer, filter, reels, post
   ========================================================================== */
.composer .composer-top { display: flex; align-items: center; gap: 12px; }
.composer .composer-input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 16px;
  border-radius: var(--r-pill); background: #f1f3f7; color: var(--text-2);
  display: flex; align-items: center; font-size: 14.5px;
}
.composer-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.composer-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; transition: background .15s ease; }
.composer-action:hover { background: #f6f8fb; }
.composer-action .tile { width: 34px; height: 34px; border-radius: 10px; display:flex; align-items:center; justify-content:center; }
.composer-action .tile svg { width: 18px; height: 18px; }
.composer-action span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }

.feed-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-radius: var(--r-md);
  background: #F3F5F9; border: 1px solid var(--border-2);
}
.feed-filter .label { font-size: 13.5px; color: var(--text-2); display:flex; align-items:center; gap:8px; }
.feed-filter .label svg { width: 16px; height: 16px; }

.dropdown-filter {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--blue-soft); color: var(--blue);
  font-size: 13px; font-weight: 650;
}
.dropdown-filter svg { width: 15px; height: 15px; }

/* Reels */
.reels-scroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding: 2px 20px 8px; margin: 0 -20px;
  scrollbar-width: none;
}
.reels-scroll::-webkit-scrollbar { display: none; }
.reel-card {
  position: relative; flex: 0 0 132px; width: 132px; aspect-ratio: 9 / 16;
  border-radius: var(--r-lg); overflow: hidden; scroll-snap-align: start;
  color: #fff; box-shadow: var(--shadow-sm);
}
.reel-card .reel-bg { position: absolute; inset: 0; }
.reel-card .reel-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,16,38,0) 40%, rgba(11,16,38,.55) 100%); }
.reel-card .reel-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--navy);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.reel-card .reel-play svg { width: 18px; height: 18px; margin-left: 2px; }
.reel-card .reel-foot { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 7px; }
.reel-card .reel-name { font-size: 12px; font-weight: 650; text-shadow: 0 1px 3px rgba(0,0,0,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-add {
  flex: 0 0 132px; width: 132px; aspect-ratio: 9/16; border-radius: var(--r-lg);
  border: 1.5px dashed #C6D2E6; background: var(--blue-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--blue); scroll-snap-align: start;
}
.reel-add .plus { width: 44px; height: 44px; border-radius: 50%; background: #fff; display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-sm); }
.reel-add .plus svg { width: 22px; height: 22px; }
.reel-add span { font-size: 12.5px; font-weight: 650; }

/* Post card */
.post-head { display: flex; align-items: flex-start; gap: 12px; }
.post-name { display: flex; align-items: center; gap: 5px; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.post-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.post-meta { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.post-meta svg { width: 12px; height: 12px; }
.post-body { font-size: 15px; line-height: 1.55; color: var(--text); margin-top: 12px; }
.post-body .see-more { color: var(--blue); font-weight: 600; }
.hashtag { color: var(--blue); font-weight: 600; }
.post-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-2); }
.post-action { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 600; padding: 6px 8px; border-radius: 10px; transition: background .15s, color .15s; }
.post-action:hover { background: #f6f8fb; color: var(--text); }
.post-action.liked { color: var(--blue); }
.post-action svg { width: 19px; height: 19px; }

/* ==========================================================================
   Recommendation / activity rows
   ========================================================================== */
.rec-row { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; }
.rec-row .rec-body { flex: 1 1 auto; min-width: 0; }
.rec-row .rec-title { font-size: 15.5px; font-weight: 680; letter-spacing: -0.01em; }
.rec-row .rec-copy { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-top: 3px; }
.rec-row .rec-action { margin-top: 12px; }
.list-divided > .rec-row + .rec-row { border-top: 1px solid var(--border); }
.list-divided > li + li { border-top: 1px solid var(--border); }

.activity-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; }
.activity-row .grow { min-width: 0; }
.activity-row .a-text { font-size: 14.5px; line-height: 1.5; }
.activity-row .a-time { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

.viewer-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.viewer-row .v-title { font-size: 14.5px; font-weight: 650; }
.viewer-row .v-sub { font-size: 13px; color: var(--text-2); }

/* ==========================================================================
   Landing / marketing
   ========================================================================== */
.hero-eyebrow { margin-bottom: 18px; }
.hero-title { font-size: 34px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; overflow-wrap: break-word; }
.hero-sub { font-size: 16px; color: var(--text-2); line-height: 1.6; margin-top: 16px; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.trust-row { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.trust-item { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.trust-item svg { width: 16px; height: 16px; color: var(--green); }

.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; transition: transform .18s ease, box-shadow .18s ease; min-width: 0;
}
/* Global safety: grid/flex children may shrink; nothing forces horizontal overflow */
.feature-grid > *, .hero-cta > *, .app-main > *, .page-container > * { min-width: 0; }
.feature-card h3, .feature-card p { overflow-wrap: anywhere; }
@media (hover:hover){ .feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } }
.feature-card .icon-tile { margin-bottom: 14px; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* Phone mockup */
.phone-mock {
  width: 300px; max-width: 100%; aspect-ratio: 300 / 620;
  border-radius: 42px; background: var(--navy);
  padding: 12px; box-shadow: 0 30px 60px rgba(11,16,38,.28); flex: 0 0 auto;
}
.phone-screen { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: var(--page-bg); position: relative; }

/* Pricing */
.price-amount { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.check-list li { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; font-size: 15px; }
.check-list li .check { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.check-list li .check svg { width: 14px; height: 14px; }

/* ==========================================================================
   Empty state + skeleton
   ========================================================================== */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state .es-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.empty-state .es-icon svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.empty-state p { font-size: 14px; color: var(--text-2); margin: 0 auto; max-width: 280px; }

.skeleton { background: linear-gradient(90deg, #eef1f5 25%, #f6f8fb 37%, #eef1f5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-line { height: 12px; border-radius: 6px; }
.sk-circle { border-radius: 50%; }

/* ==========================================================================
   Responsive: tablet + desktop
   ========================================================================== */
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid-3 { gap: 16px; }
}

@media (min-width: 960px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Marketing pages */
.layout-marketing.has-desknav .ow-header { display: none; }         /* mobile marketing header hidden when desknav present */
@media (max-width: 899px) {
  .layout-marketing.has-desknav .ow-header { display: block; }       /* ...but shown on mobile */
  .layout-marketing.has-desknav .ow-desknav { display: none; }
}
@media (min-width: 900px) {
  .layout-marketing.has-desknav .ow-desknav { display: block; }
  .layout-marketing .ow-bottomnav { display: none; }                 /* no bottom nav on desktop */
  .layout-marketing .app-main { padding-bottom: 64px; }
  .hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
  .hero-title { font-size: 52px; }
  .hero-sub { font-size: 18px; max-width: 520px; }
  .hero-cta { flex-direction: row; }
  .hero-cta .btn { min-width: 180px; }
}

/* App pages: give a roomy but app-like column on desktop; keep bottom nav on small screens only */
@media (min-width: 900px) {
  .layout-app .ow-header .ow-header-inner,
  .layout-app .page-container { max-width: 560px; }
}

/* Reel gradient backgrounds (branded abstract) */
.reel-orange { background: linear-gradient(160deg, #F0662E 0%, #C4381C 100%); }
.reel-purple { background: linear-gradient(160deg, #7C4DD6 0%, #4B2A9E 100%); }
.reel-blue   { background: linear-gradient(160deg, #2E6BE6 0%, #0B2E73 100%); }
.reel-teal   { background: linear-gradient(160deg, #17A2A6 0%, #0B5C7A 100%); }
.reel-orange .reel-bg, .reel-purple .reel-bg, .reel-blue .reel-bg, .reel-teal .reel-bg {
  background-image:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(0,0,0,.25), rgba(0,0,0,0) 60%);
}
.reel-init {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.85);
  backdrop-filter: blur(2px);
}

/* Landing responsive content swap: desktop copy vs mobile copy match each screenshot */
.landing-desktop { display: none; }
.landing-mobile  { display: block; }
@media (min-width: 900px) {
  .landing-desktop { display: block; }
  .landing-mobile  { display: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); } .mb-6 { margin-bottom: var(--s-6); }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }

/* ==========================================================================
   Profile page: cover + editable avatar
   ========================================================================== */
.profile-cover {
  position: relative; height: 150px;
  background: linear-gradient(120deg, #0B1026 0%, #2563FF 100%);
  background-size: cover; background-position: center;
}
.cover-edit, .avatar-edit {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--navy); border-radius: 50%;
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.cover-edit { top: 12px; right: 12px; width: 38px; height: 38px; }
.cover-edit svg { width: 19px; height: 19px; }
.cover-edit:hover, .avatar-edit:hover { background: #fff; }
.profile-head { padding: 0 20px 20px; position: relative; }
.profile-avatar-wrap { position: relative; width: 104px; margin-top: -52px; }
.profile-avatar { --sz: 104px; border: 4px solid #fff; box-shadow: var(--shadow-sm); background: var(--blue-soft); }
.avatar-edit { bottom: 2px; right: 2px; width: 32px; height: 32px; border: 2px solid #fff; }
.avatar-edit svg { width: 16px; height: 16px; }
.profile-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-headline { font-size: 15px; color: var(--text); margin: 4px 0 0; line-height: 1.45; }
.profile-loc { font-size: 13.5px; color: var(--text-2); margin: 6px 0 0; display: flex; align-items: center; gap: 5px; }
.profile-loc svg { width: 15px; height: 15px; }
.profile-stats { display: flex; gap: 18px; margin-top: 12px; }
.profile-stats b { color: var(--navy); }
.profile-stats span { font-size: 13.5px; color: var(--text-2); }
.profile-cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.exp-row { display: flex; gap: 14px; padding: 14px 0; }
.exp-logo { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--navy); font-weight: 800; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--blue-soft); color: var(--navy); font-size: 13.5px; font-weight: 600; }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.featured-item { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.featured-thumb { height: 96px; background: linear-gradient(135deg,#2F6BFF,#0B2E73); }
.featured-item .fi-body { padding: 12px; }
@media (max-width: 460px) { .featured-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Real-photo avatars
   ========================================================================== */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.header-avatar { flex: 0 0 auto; display: inline-flex; }
.header-avatar .avatar { --sz: 34px; border: 1px solid var(--border); }

/* ==========================================================================
   Desktop app top-nav (shown >=900px on .layout-app pages)
   ========================================================================== */
.ow-appnav { display: none; }
.ow-appnav-inner {
  max-width: var(--content-max); margin: 0 auto; height: 62px;
  display: flex; align-items: center; gap: 18px; padding: 0 24px;
}
.appnav-search { max-width: 320px; flex: 1 1 260px; }
.appnav-items { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.appnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 14px; border-radius: 10px; color: var(--text-2);
  font-size: 12px; font-weight: 600; position: relative; min-width: 62px;
}
.appnav-item svg { width: 22px; height: 22px; }
.appnav-item:hover { color: var(--text); }
.appnav-item.active { color: var(--navy); }
.appnav-item.active::after { content: ""; position: absolute; bottom: -11px; left: 10%; right: 10%; height: 2px; background: var(--navy); border-radius: 2px; }
.appnav-me { border-left: 1px solid var(--border); padding-left: 18px; }
.appnav-me .avatar { --sz: 26px; }
.appnav-me > span:last-child { display: inline-flex; align-items: center; gap: 2px; }
.appnav-me svg { width: 13px; height: 13px; }

/* ==========================================================================
   Desktop 2-column app shell + right rail (pages opt in via .app-shell)
   ========================================================================== */
.app-rail { display: none; }
.rail-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.rail-card + .rail-card { margin-top: 16px; }
.rail-card-pad { padding: 16px; }
.rail-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 10px; }

@media (min-width: 900px) {
  .layout-app .ow-appnav {
    display: block; position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .layout-app .ow-header,
  .layout-app .ow-bottomnav { display: none; }
  .layout-app .page-container { max-width: 680px; }
  .layout-app .app-main { padding-top: 26px; padding-bottom: 56px; }

  /* Two-column shell */
  .layout-app .app-shell.page-container { max-width: 1040px; }
  .layout-app .app-shell {
    display: grid; grid-template-columns: minmax(0, 1fr) 312px;
    gap: 24px; align-items: start;
  }
  .app-rail { display: block; position: sticky; top: 84px; }
  .app-col { min-width: 0; }
}

/* Tablet: keep single column but breathe a bit more */
@media (min-width: 640px) and (max-width: 899px) {
  .layout-app .page-container { max-width: 600px; }
  .metric-grid-3 { gap: 16px; }
}

/* Wide desktop */
@media (min-width: 1180px) {
  .layout-app .app-shell.page-container { max-width: 1120px; grid-template-columns: minmax(0,1fr) 340px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
