:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f0f2f7;
  --border:#e6e8ef;
  --text:#0e1116;
  --text-2:#5b6271;
  --text-3:#8a91a1;
  --brand:#ff4d2e;
  --brand-2:#ff7a33;
  --brand-dark:#c93a1f;
  --brand-soft:#fff1ec;
  --accent:#0a2540;
  --ok:#119a59;
  --warn:#b66a00;
  --danger:#d8331f;
  --info:#1f6feb;
  --radius:14px;
  --radius-sm:10px;
  --radius-lg:20px;
  --shadow-1:0 1px 2px rgba(15,20,35,.04), 0 1px 3px rgba(15,20,35,.06);
  --shadow-2:0 6px 24px rgba(15,20,35,.10);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Inter,system-ui,sans-serif;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:#0b0d12}
/* Mobile: lock page scroll so the in-app .scroll area is the only scroller and the bottom tabbar stays visible */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{
  font-family:var(--font);
  color:var(--text);
  font-size:16px;
  line-height:1.4;
  -webkit-font-smoothing:antialiased;
}

/* Phone frame for desktop preview; full-bleed on phone */
.phone{
  width:100%;
  max-width:390px;
  height:100vh;          /* fallback */
  height:100svh;         /* smallest viewport: keeps tabbar above iOS Safari URL bar */
  height:100dvh;         /* progressive enhancement when supported */
  margin:0 auto;
  background:var(--bg);
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
@media (min-width:480px){
  html,body{height:auto;overflow:auto}
  body{padding:24px 0;background:#0b0d12;display:flex;justify-content:center;min-height:100vh}
  .phone{
    height:auto;
    min-height:844px;max-height:90vh;
    border-radius:42px;
    box-shadow:0 30px 80px rgba(0,0,0,.5), 0 0 0 10px #1c1f27, 0 0 0 11px #2a2e38;
    overflow:hidden;
  }
}

/* Status bar (faux) */
.statusbar{
  height:34px;
  background:transparent;
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 22px 0;
  font-size:13px;font-weight:600;color:var(--text);
  flex-shrink:0;
}
.statusbar .right{display:flex;gap:6px;align-items:center}
.statusbar .dot{width:14px;height:8px;border:1px solid var(--text);border-radius:2px;position:relative}
.statusbar .dot::after{content:"";position:absolute;inset:1px;background:var(--text);border-radius:1px}

/* App header */
.appbar{
  position:sticky;top:0;z-index:20;
  background:var(--bg);
  display:flex;align-items:center;gap:8px;
  padding:8px 16px 12px;
  min-height:52px;
}
.appbar.solid{background:#fff;border-bottom:1px solid var(--border)}
.appbar .title{
  font-size:17px;font-weight:700;letter-spacing:-.01em;
  flex:1;text-align:center;
}
.iconbtn{
  width:44px;height:44px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:transparent;border:none;color:var(--text);
  text-decoration:none;
  cursor:pointer;
}
.iconbtn:active{background:var(--surface-2)}
.iconbtn svg{width:22px;height:22px}
.brand-mark{
  display:flex;align-items:center;gap:8px;font-weight:800;letter-spacing:-.02em;
  color:var(--text);text-decoration:none;
}
.brand-mark .logo{
  width:28px;height:28px;border-radius:8px;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  display:flex;align-items:center;justify-content:center;color:#fff;
  box-shadow:0 4px 10px rgba(255,77,46,.35);
}
.brand-mark .logo svg{width:18px;height:18px}
.brand-mark .name{font-size:17px}

/* Main scroll area */
.scroll{
  flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding-bottom:88px;
}

/* Bottom tab bar */
.tabbar{
  position:absolute;left:0;right:0;bottom:0;
  background:rgba(255,255,255,.96);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-top:1px solid var(--border);
  display:grid;grid-template-columns:repeat(4,1fr);
  padding:8px 8px max(8px,env(safe-area-inset-bottom));
  z-index:30;
}
.tabbar a{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  color:var(--text-3);text-decoration:none;font-size:11px;font-weight:600;
  padding:6px 4px;border-radius:10px;min-height:44px;justify-content:center;
}
.tabbar a svg{width:22px;height:22px}
.tabbar a.active{color:var(--brand)}
.tabbar a:active{background:var(--surface-2)}

/* Containers */
.container{padding:0 16px}
.section-title{font-size:13px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;margin:18px 4px 10px}

/* Typography */
h1,h2,h3{margin:0;letter-spacing:-.02em}
h1{font-size:28px;font-weight:800;line-height:1.15}
h2{font-size:22px;font-weight:800}
h3{font-size:17px;font-weight:700}
.muted{color:var(--text-2)}
.tiny{font-size:12px;color:var(--text-3)}

/* Buttons */
.btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;height:52px;border-radius:14px;border:none;
  font-size:16px;font-weight:700;letter-spacing:-.01em;cursor:pointer;
  text-decoration:none;
}
.btn-primary{
  background:linear-gradient(180deg,var(--brand) 0%, var(--brand-dark) 100%);
  color:#fff;
  box-shadow:0 10px 20px rgba(255,77,46,.28), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:active{transform:translateY(1px);box-shadow:0 4px 10px rgba(255,77,46,.22)}
.btn-secondary{background:#fff;color:var(--text);border:1px solid var(--border)}
.btn-secondary:active{background:var(--surface-2)}
.btn-ghost{background:transparent;color:var(--brand);font-weight:700}
.btn svg{width:20px;height:20px}

/* Inputs */
.field{margin:0 0 14px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--text-2);margin:0 0 6px 4px}
.input,select,textarea{
  width:100%;height:52px;border-radius:12px;border:1px solid var(--border);
  background:#fff;padding:0 14px;font-size:16px;font-family:inherit;color:var(--text);
  outline:none;transition:border-color .15s, box-shadow .15s;
}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(255,77,46,.12)}
textarea{height:auto;padding:12px 14px;min-height:90px;resize:none}
.input-icon{position:relative}
.input-icon svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--text-3)}
.input-icon .input{padding-left:42px}

/* Cards */
.card{
  background:#fff;border-radius:var(--radius);
  box-shadow:var(--shadow-1);
  padding:14px;
  display:block;text-decoration:none;color:inherit;
}
.card + .card{margin-top:10px}
.card-row{display:flex;align-items:center;gap:12px}
.logo-square{
  width:48px;height:48px;border-radius:12px;
  background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;color:var(--text-2);flex-shrink:0;
  font-size:18px;
}
.logo-square.green{background:#e6f4ec;color:#0d7a45}
.logo-square.blue{background:#e7eefb;color:#1f4fbb}
.logo-square.purple{background:#efe9fb;color:#5b3eb1}
.logo-square.orange{background:#fdecd9;color:#b25a00}
.logo-square.pink{background:#fde6ee;color:#b32a5a}
.logo-square.dark{background:#0e1116;color:#fff}

/* Badges/chips */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  background:var(--surface-2);color:var(--text-2);
  font-size:12px;font-weight:600;
}
.chip.brand{background:var(--brand-soft);color:var(--brand-dark)}
.chip.ok{background:#e3f5ec;color:#0e7a47}
.chip.warn{background:#fff1d9;color:#965500}
.chip.info{background:#e7eefb;color:#1f4fbb}
.chip.dot::before{content:"";width:6px;height:6px;border-radius:999px;background:currentColor;display:inline-block}

/* Progress */
.progress{height:6px;background:var(--surface-2);border-radius:999px;overflow:hidden}
.progress > i{display:block;height:100%;background:linear-gradient(90deg,var(--brand),var(--brand-2));border-radius:999px;transition:width .6s ease}

/* Timeline */
.timeline{position:relative;padding-left:22px}
.timeline::before{
  content:"";position:absolute;left:9px;top:6px;bottom:6px;width:2px;
  background:linear-gradient(180deg,var(--border) 0%,var(--border) 100%);
}
.tl-item{position:relative;padding:0 0 18px}
.tl-item:last-child{padding-bottom:0}
.tl-dot{
  position:absolute;left:-22px;top:2px;width:20px;height:20px;border-radius:999px;
  background:#fff;border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
}
.tl-item.done .tl-dot{background:var(--ok);border-color:var(--ok);color:#fff}
.tl-item.active .tl-dot{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 0 0 4px rgba(255,77,46,.15)}
.tl-item.pending .tl-dot{background:#fff;border-color:var(--border);color:var(--text-3)}
.tl-dot svg{width:12px;height:12px}
.tl-title{font-size:15px;font-weight:700}
.tl-meta{font-size:12px;color:var(--text-3);margin-top:2px}
.tl-shot{
  margin-top:8px;border:1px solid var(--border);border-radius:10px;
  background:linear-gradient(135deg,#f5f7fb 0%,#eaecf2 100%);
  height:120px;display:flex;align-items:center;justify-content:center;
  color:var(--text-3);font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  position:relative;overflow:hidden;
}
.tl-shot.lg{height:180px}
.tl-shot::after{
  content:"";position:absolute;inset:8px;border:1px dashed rgba(0,0,0,.08);border-radius:6px;pointer-events:none;
}

/* Spinner */
.spinner{
  width:18px;height:18px;border-radius:999px;
  border:2.5px solid rgba(255,255,255,.3);border-top-color:#fff;
  animation:spin .8s linear infinite;
}
.spinner.dark{border-color:rgba(0,0,0,.1);border-top-color:var(--brand)}
@keyframes spin{to{transform:rotate(360deg)}}

/* Pulse */
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.45}}
.pulse{animation:pulse 1.4s ease-in-out infinite}

/* Big apply button (sticky) */
.sticky-cta{
  position:sticky;bottom:0;
  background:linear-gradient(180deg,rgba(246,247,251,0) 0%, var(--bg) 30%);
  padding:16px 16px max(16px,env(safe-area-inset-bottom));
  z-index:10;
}

/* Auth-screen hero */
.hero{
  background:linear-gradient(160deg,#fff3ee 0%, #fff 60%);
  padding:24px 20px 28px;
}
.hero h1{margin-bottom:8px}
.hero p{color:var(--text-2);margin:0 0 16px;font-size:15px}
.kicker{
  display:inline-flex;align-items:center;gap:6px;
  background:#fff;border:1px solid var(--border);
  padding:6px 10px;border-radius:999px;
  font-size:12px;font-weight:700;color:var(--brand-dark);
  box-shadow:var(--shadow-1);margin-bottom:14px;
}
.kicker .pill{width:6px;height:6px;border-radius:999px;background:var(--brand)}

/* Lists */
.list{display:flex;flex-direction:column;gap:10px}

/* Empty state */
.empty{
  text-align:center;padding:40px 24px;color:var(--text-2);
}
.empty .ico{
  width:72px;height:72px;border-radius:20px;background:var(--surface-2);
  margin:0 auto 14px;display:flex;align-items:center;justify-content:center;color:var(--text-3);
}
.empty h3{margin-bottom:6px;color:var(--text)}

/* Skeleton */
.skel{background:linear-gradient(90deg,#eef0f5 0%, #f7f8fb 50%, #eef0f5 100%);background-size:200% 100%;animation:shimmer 1.4s linear infinite;border-radius:8px}
@keyframes shimmer{from{background-position:200% 0}to{background-position:-200% 0}}

/* Stepper (used in apply progress) */
.stepper{display:flex;flex-direction:column;gap:12px;margin:18px 0}
.step{
  display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:14px;
  background:#fff;border:1px solid var(--border);
}
.step.active{border-color:var(--brand);box-shadow:0 0 0 4px rgba(255,77,46,.10)}
.step.done{background:#f7fbf8;border-color:#cfe7d8}
.step .ico{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);color:var(--text-3);
}
.step.active .ico{background:var(--brand);color:#fff}
.step.done .ico{background:var(--ok);color:#fff}
.step .meta{flex:1}
.step .meta h4{margin:0 0 2px;font-size:15px;font-weight:700}
.step .meta p{margin:0;font-size:13px;color:var(--text-2)}
.step .meta .ts{font-size:11px;color:var(--text-3);margin-top:4px;font-variant-numeric:tabular-nums}

/* Job description prose */
.prose p{margin:0 0 12px;color:var(--text);font-size:15px;line-height:1.55}
.prose ul{margin:0 0 12px;padding-left:18px;color:var(--text)}
.prose li{margin:0 0 6px;font-size:15px}

/* Divider */
.divider{height:1px;background:var(--border);margin:14px 0}

/* Toast (visual) */
.toast{
  position:absolute;left:16px;right:16px;bottom:90px;
  background:#0e1116;color:#fff;padding:12px 14px;border-radius:12px;
  display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;
  box-shadow:0 14px 30px rgba(0,0,0,.25);
  z-index:40;
}
.toast svg{width:18px;height:18px;color:#7be0a4}

/* Avatar */
.avatar{
  width:36px;height:36px;border-radius:999px;
  background:linear-gradient(135deg,#ffd0bf,#ff8a66);
  display:flex;align-items:center;justify-content:center;color:#7a2a16;font-weight:800;
  font-size:14px;
}

/* Search bar */
.searchbar{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--border);border-radius:14px;
  padding:10px 12px;height:48px;
}
.searchbar input{flex:1;border:none;outline:none;font-size:16px;background:transparent}
.searchbar svg{width:20px;height:20px;color:var(--text-3)}

/* Filter row */
.filters{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;margin:0 -16px;padding-left:16px;padding-right:16px}
.filters::-webkit-scrollbar{display:none}
.filter{flex-shrink:0;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--border);font-size:13px;font-weight:600;color:var(--text-2);display:inline-flex;align-items:center;gap:6px}
.filter.active{background:var(--text);color:#fff;border-color:var(--text)}
.filter svg{width:14px;height:14px}

/* Dashboard hero card */
.greet-card{
  background:linear-gradient(135deg,#0e1116 0%,#1f2937 100%);
  color:#fff;border-radius:18px;padding:18px;
  position:relative;overflow:hidden;
}
.greet-card::before{
  content:"";position:absolute;right:-40px;top:-40px;width:160px;height:160px;border-radius:999px;
  background:radial-gradient(closest-side,rgba(255,77,46,.45),transparent);
}
.greet-card .hello{font-size:13px;color:#cfd3dc;text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.greet-card h2{font-size:22px;margin:4px 0 12px}
.stat-row{display:flex;gap:10px}
.stat{
  flex:1;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08);
  border-radius:12px;padding:10px;
}
.stat .v{font-size:20px;font-weight:800}
.stat .l{font-size:11px;color:#cfd3dc;text-transform:uppercase;letter-spacing:.06em;font-weight:700}

/* Apply hero (progress page) */
.apply-hero{
  background:linear-gradient(160deg,#0e1116,#2b1810);
  color:#fff;padding:20px;border-radius:0 0 24px 24px;
  position:relative;overflow:hidden;
}
.apply-hero h2{color:#fff;margin-bottom:4px}
.apply-hero .sub{color:#d6d9e2;font-size:13px;margin-bottom:14px}
.apply-hero .progress{background:rgba(255,255,255,.15)}
.apply-hero .meta-row{display:flex;justify-content:space-between;margin-top:8px;font-size:12px;color:#cfd3dc}

/* Link */
a.text-link{color:var(--brand);text-decoration:none;font-weight:600}

/* Helpers */
.row{display:flex;align-items:center;gap:8px}
.spread{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.gap-8{gap:8px}.gap-12{gap:12px}
.center{text-align:center}

/* Nav-states comparison page */
.compare{display:grid;gap:16px;padding:16px}
.compare .frame{
  border:1px solid var(--border);border-radius:18px;overflow:hidden;background:#fff;
}
.compare .frame header{padding:10px 14px;background:#0e1116;color:#fff;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;display:flex;justify-content:space-between;align-items:center}
.compare .frame header .tag{background:rgba(255,255,255,.12);padding:3px 8px;border-radius:999px;font-size:10px}
