*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  background:#f4f2ed;color:#1c1917;margin:0;line-height:1.65;
  -webkit-text-size-adjust:100%;
}
button{font-family:inherit}

/* ---------- top bar ---------- */
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(19,78,74,.96);backdrop-filter:blur(8px);
  color:#f7f5f2;box-shadow:0 1px 8px #0002;
  padding-top:env(safe-area-inset-top);
}
.topbar-inner{max-width:720px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;gap:10px}
.brand{font-size:18px;font-weight:800;letter-spacing:-.01em}
.streak{margin-inline-start:auto;font-size:13px;font-weight:700;color:#99f6e4}

/* ---------- layout ---------- */
.view{
  max-width:720px;margin:0 auto;padding:16px 16px 96px;
  min-height:calc(100dvh - 140px);
}
.view.tab-firms,.view.tab-coach,.view.tab-progress{padding-bottom:110px}

/* ---------- bottom tab bar ---------- */
.tabbar{
  position:fixed;inset-inline:0;bottom:0;z-index:30;
  display:flex;background:#fff;border-top:1px solid #e7e5e4;
  padding-bottom:env(safe-area-inset-bottom);
  box-shadow:0 -2px 12px #0001;
}
.tab{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:8px 4px 6px;border:0;background:none;cursor:pointer;
  font-size:12px;font-weight:600;color:#78716c;min-height:56px;
}
.tab .tab-ico{font-size:20px;line-height:1}
.tab.is-on{color:#0f766e}
.tab.is-on .tab-ico{transform:translateY(-1px)}

/* ---------- generic ---------- */
h1{font-size:21px;margin:18px 0 6px;letter-spacing:-.01em}
.sub{font-size:13px;color:#78716c;margin:0 0 14px}
.card{
  background:#fff;border:1px solid #e7e5e4;border-radius:18px;
  padding:16px;margin:12px 0;box-shadow:0 2px 10px #0000000d;
}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.chip{
  border:1px solid #d6d3d1;background:#fff;border-radius:99px;
  padding:8px 16px;font-size:13.5px;font-weight:600;color:#44403c;
  cursor:pointer;min-height:40px;
}
.chip.is-on{background:#0f766e;border-color:#0f766e;color:#fff}
.chip:active{transform:scale(.97)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:0;border-radius:14px;padding:13px 22px;font-size:15.5px;font-weight:700;
  cursor:pointer;min-height:48px;text-decoration:none;
}
.btn-primary{background:#0f766e;color:#fff;box-shadow:0 4px 14px #0f766e40}
.btn-primary:active{background:#115e59}
.btn-ghost{background:#f5f5f4;color:#44403c;border:1px solid #e7e5e4}
.btn-block{display:flex;width:100%}
.btn:disabled{opacity:.45;cursor:default}
.searchbox{
  width:100%;border:1px solid #d6d3d1;border-radius:14px;background:#fff;
  padding:12px 16px;font-size:15.5px;font-family:inherit;min-height:48px;
}
.searchbox:focus{outline:2px solid #0f766e;outline-offset:-1px;border-color:#0f766e}
.muted{color:#78716c;font-size:13px}
.latin{color:#78716c;font-size:12.5px}
hr.sep{border:0;border-top:1px solid #e7e5e4;margin:14px 0}

/* ---------- firms ---------- */
.firm-card{
  display:block;width:100%;text-align:start;cursor:pointer;
  border:1px solid #e7e5e4;border-radius:20px;
  background:linear-gradient(180deg,#ffffff,#fdfcfa);
  transition:transform .12s ease, box-shadow .12s ease;
}
.firm-card:hover{box-shadow:0 6px 18px #0f766e1f;border-color:#99f6e4}
.firm-card:active{transform:scale(.99)}
.firm-top{display:flex;align-items:center;gap:12px}
.firm-head{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.firm-name{font-size:17px;font-weight:800}
.avatar{
  width:46px;height:46px;border-radius:14px;flex:none;
  display:flex;align-items:center;justify-content:center;
  font-size:19px;font-weight:800;color:#fff;
}
.avatar-private{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.avatar-public{background:linear-gradient(135deg,#7c3aed,#a78bfa)}
.avatar-interviewer{background:linear-gradient(135deg,#134e4a,#0f766e);border-radius:99px;width:38px;height:38px;font-size:17px}
.pill{background:#f0fdfa;border:1px solid #ccfbf1;color:#0f766e;border-radius:99px;padding:2px 10px;font-weight:700}
.firm-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.tag{font-size:12px;font-weight:600;background:#f0fdfa;color:#0f766e;border-radius:99px;padding:3px 10px}
.firm-meta{display:flex;gap:12px;margin-top:8px;font-size:12.5px;color:#78716c;flex-wrap:wrap}
.practiced-badge{background:#ecfdf5;color:#047857;border-radius:8px;padding:1px 8px;font-weight:700}

/* ---------- firm sheet ---------- */
.sheet-backdrop{
  position:fixed;inset:0;z-index:50;background:#0007;
  display:flex;align-items:flex-end;justify-content:center;
}
.sheet-backdrop[hidden]{display:none}
.sheet{
  background:#f4f2ed;width:100%;max-width:720px;max-height:92dvh;
  border-radius:22px 22px 0 0;overflow:hidden;display:flex;flex-direction:column;
}
.sheet-handle{width:44px;height:5px;border-radius:99px;background:#d6d3d1;margin:10px auto 4px;flex:none}
.sheet-body{overflow-y:auto;padding:8px 16px calc(20px + env(safe-area-inset-bottom))}
.sheet-close{
  position:sticky;top:0;float:left;border:0;background:#e7e5e4;color:#44403c;
  width:36px;height:36px;border-radius:99px;font-size:16px;cursor:pointer;z-index:2;
}
.factrow{display:flex;gap:8px;font-size:14px;padding:6px 0;border-bottom:1px dashed #e7e5e4}
.factrow b{min-width:64px;color:#57534e}
.point{display:flex;gap:10px;padding:8px 0;font-size:14.5px}
.point::before{content:"•";color:#0f766e;font-weight:900}
.tipbox{background:#fffbeb;border:1px solid #fde68a;border-radius:14px;padding:12px 14px;font-size:14px;margin:8px 0}
.warnbox{background:#fef2f2;border:1px solid #fecaca;border-radius:14px;padding:12px 14px;font-size:13.5px;margin:8px 0}
details.report{border-top:1px solid #e7e5e4;padding:10px 0}
details.report summary{cursor:pointer;font-weight:700;font-size:14.5px;min-height:40px;display:flex;align-items:center}
details.report .rep-body{font-size:14px;padding:6px 0}
details.report .rep-body p{margin:6px 0}
.srclink{color:#0f766e;font-weight:600;font-size:14px;word-break:break-all}

/* ---------- coach ---------- */
.hero{
  background:linear-gradient(135deg,#134e4a,#0f766e);color:#fff;
  border-radius:20px;padding:22px;margin:8px 0 16px;display:grid;gap:8px;
  box-shadow:0 4px 18px #0f766e33;
}
.hero h2{margin:0;font-size:21px}
.hero p{margin:0;font-size:14px;color:#d7f5ee}
.mode-card{display:flex;flex-direction:column;gap:10px}
.progressline{display:flex;align-items:center;gap:10px;margin:6px 0 14px}
.dots{display:flex;gap:5px;flex:1}
.dot{height:6px;flex:1;border-radius:99px;background:#e7e5e4}
.dot.done{background:#0f766e}
.dot.now{background:#5eead4}
.qcount{font-size:13px;font-weight:700;color:#57534e;white-space:nowrap}
.qcard{
  background:#fff;border-radius:20px;padding:22px;margin:10px 0;
  box-shadow:0 4px 16px #00000014;border:1px solid #e7e5e4;
}
.kind-badge{display:inline-block;font-size:12.5px;font-weight:800;border-radius:99px;padding:4px 12px;margin-bottom:12px}
.kind-personal{background:#ede9fe;color:#6d28d9}
.kind-professional{background:#dbeafe;color:#1d4ed8}
.kind-general{background:#fef3c7;color:#b45309}
.qtext{font-size:20px;font-weight:800;line-height:1.5;margin:0 0 6px}
.qctx{
  margin-top:12px;font-size:13.5px;color:#57534e;background:#fafaf9;
  border-inline-start:3px solid #a8a29e;border-radius:10px;padding:10px 12px;
}
.followup{
  margin-top:14px;background:#f0fdfa;border:1px solid #99f6e4;border-radius:16px;padding:14px;
}
.followup .fu-label{font-size:12.5px;font-weight:800;color:#0f766e;margin-bottom:6px}
.followup .fu-text{font-size:16.5px;font-weight:700;line-height:1.5}
.hintbox{
  margin-top:12px;background:#fffbeb;border:1px solid #fde68a;border-radius:14px;
  padding:12px 14px;font-size:14.5px;
}
.score-row{display:flex;gap:10px;margin-top:16px}
.score-btn{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;
  border:1.5px solid #e7e5e4;background:#fff;border-radius:16px;
  padding:12px 6px;font-size:14px;font-weight:700;cursor:pointer;min-height:64px;color:#44403c;
}
.score-btn .s-ico{font-size:22px}
.score-btn:active{transform:scale(.97)}
.score-btn.picked-hard{border-color:#ef4444;background:#fef2f2}
.score-btn.picked-mid{border-color:#f59e0b;background:#fffbeb}
.score-btn.picked-good{border-color:#10b981;background:#ecfdf5}
.feedback{
  margin-top:14px;border-radius:14px;padding:12px 14px;font-size:14.5px;line-height:1.6;
}
.feedback.fb-hard{background:#fef2f2;border:1px solid #fecaca}
.feedback.fb-mid{background:#fffbeb;border:1px solid #fde68a}
.feedback.fb-good{background:#ecfdf5;border:1px solid #a7f3d0}
.coach-actions{display:flex;gap:10px;margin-top:16px}
.coach-actions .btn{flex:1}

/* ---------- summary & progress ---------- */
.bigstat{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}
.stat{
  flex:1;min-width:100px;background:#fff;border:1px solid #e7e5e4;border-radius:16px;
  padding:14px;text-align:center;
}
.stat .n{font-size:24px;font-weight:800;color:#134e4a}
.stat .l{font-size:12.5px;color:#78716c;font-weight:600}
.bar-row{margin:10px 0}
.bar-row .bar-head{display:flex;justify-content:space-between;font-size:13.5px;font-weight:700;margin-bottom:4px}
.bar{height:10px;border-radius:99px;background:#e7e5e4;overflow:hidden}
.bar>i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#0f766e,#2dd4bf)}
.weak-item{
  display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #fecaca;
  border-radius:14px;padding:12px 14px;margin:8px 0;font-size:14.5px;
}
.weak-item .w-q{flex:1;font-weight:600}
.empty{
  text-align:center;color:#78716c;padding:34px 16px;font-size:14.5px;
}
.empty .e-ico{font-size:34px;display:block;margin-bottom:8px}

@media (min-width:640px){
  .qtext{font-size:22px}
}

/* ---------- interviewer / chat style ---------- */
.interviewer-row{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.interviewer-name{font-size:13px;font-weight:800;color:#134e4a}
.spacer{flex:1}
.icon-btn{
  border:1px solid #e7e5e4;background:#fff;border-radius:99px;
  min-width:38px;height:38px;padding:0 12px;font-size:15px;cursor:pointer;color:#44403c;
}
.bubble{
  background:#f0fdfa;border:1px solid #ccfbf1;border-radius:4px 18px 18px 18px;
  padding:16px;margin-bottom:8px;
}
.bubble .qtext{margin:0 0 8px}
.sheet-head{display:flex;align-items:center;gap:12px;margin-top:6px}
.sheet-head h1{margin:0}

/* ---------- answer ---------- */
.answer-wrap{position:relative;margin-top:14px}
.answerbox{
  width:100%;border:1.5px solid #d6d3d1;border-radius:16px;background:#fff;
  padding:14px 16px;font-size:15.5px;font-family:inherit;line-height:1.6;
  resize:vertical;min-height:96px;
}
.answerbox:focus{outline:2px solid #0f766e;outline-offset:-1px;border-color:#0f766e}
.mic-btn{
  position:absolute;left:10px;bottom:10px;
  width:46px;height:46px;border-radius:99px;border:0;font-size:20px;cursor:pointer;
  background:#0f766e;color:#fff;box-shadow:0 3px 10px #0f766e55;
}
.mic-btn.listening{background:#dc2626;animation:pulse 1.2s infinite}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}

/* ---------- grading ---------- */
.grade-card{border-radius:16px;padding:16px;margin-top:16px}
.grade-top{display:flex;align-items:center;gap:14px}
.grade-num{font-size:34px;font-weight:900;min-width:64px;text-align:center;border-radius:14px;padding:2px 8px}
.g-low{color:#b91c1c;background:#fee2e2}
.g-mid{color:#b45309;background:#fef3c7}
.g-high{color:#047857;background:#d1fae5}
.grade-band{font-size:16px;font-weight:800}
.grade-list{margin-top:10px;font-size:14px}
.g-item{padding:3px 0;font-size:14px}
.g-ok{color:#047857}
.g-miss{color:#b45309}
.grade-note{margin-top:10px;font-size:12px;color:#78716c;border-top:1px dashed #e7e5e4;padding-top:8px}

/* ---------- route card ---------- */
.route-card{background:linear-gradient(135deg,#134e4a,#0f766e);color:#fff;border:0}
.route-label{font-size:12px;font-weight:700;color:#99f6e4}
.route-current{font-size:17px;font-weight:800}
.grade-cap{font-size:11px;font-weight:400;color:#6b7280;margin-top:2px}
.badge-authored{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.badge-prep{background:#e0e7ff;border-color:#818cf8;color:#3730a3}
.badge-authored,.badge-prep{margin-inline-start:6px}
