/* ─── Design tokens (§1) ──────────────────────────────────── */
/* Light palette */
:root {
  --uz: 1.10;                          /* text-size zoom scale (default = 110%) */
  --bg:     #F7F5EF;
  --card:   #FFFFFF;
  --inner:  #F1EFE8;
  --ink:    #2C2C2A;
  --ink2:   #5F5E5A;
  --muted:  #9A988F;
  --bd:     #E7E4DB;
  --bds:    #D8D5CA;
  --acc:    #1D9E75;
  --accink: #0F6E56;
  --accbg:  #E4F4EE;
  --amber:  #EF9F27;
  --needs:  #CBC8BE;
  --track:  #ECEAE2;
  --bad:    #c0392b;

  --r:         12px;
  --r-sm:      8px;
  --gap:       14px;
  --sidebar-w: 160px;
  --content-w: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Text-size scale (Compact 100% · Default 110% · Large 125%) */
html[data-textsize="compact"] { --uz: 1; }
html[data-textsize="default"] { --uz: 1.10; }
html[data-textsize="large"]   { --uz: 1.25; }

/* Dark palette */
html[data-theme="dark"] {
  --bg:     #1B1B19;
  --card:   #262624;
  --inner:  #2F2F2C;
  --ink:    #ECEAE3;
  --ink2:   #B4B2A9;
  --muted:  #8A8880;
  --bd:     #393936;
  --bds:    #46453F;
  --acc:    #2CB888;
  --accink: #9FE1CB;
  --accbg:  #123A30;
  --needs:  #55534D;
  --track:  #33332F;
  --bad:    #e57373;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Smooth transitions only after init (avoids flash on load) */
body.theme-ready * { transition: background 0.2s, border-color 0.18s, color 0.15s; }

[x-cloak] { display: none !important; }

/* ─── App shell ──────────────────────────────────────────── */
#app {
  display: flex;
  zoom: var(--uz);
  height: calc(100dvh / var(--uz));    /* counteract zoom so #app exactly fills viewport */
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}
/* The landing page is a normal scrollable document (min-height, not a fixed
   viewport clip) — only the signing-in/out loading state keeps the app
   shell's fixed-height/centered treatment. */
#app:has(.landing-page) {
  display: block;
  height: auto;
  min-height: calc(100dvh / var(--uz));
  overflow: visible;
}

/* ─── Sidebar (desktop) ──────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 0.5px solid var(--bd);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  gap: 3px;
  overflow-y: auto;
  background: var(--card);
}
.sidebar-brand {
  font-size: 15px;
  font-weight: 500;
  padding: 6px 10px;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sidebar-spacer { flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink2);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.nav-item:hover { background: var(--inner); color: var(--ink); }
.nav-item.active { background: var(--accbg); color: var(--accink); }
.nav-item .ti { font-size: 16px; flex-shrink: 0; }

/* ─── Main pane ──────────────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Top bar ────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-bottom: 0.5px solid var(--bd);
  flex-shrink: 0;
  background: var(--card);
  min-height: 56px;
}
.topbar-left { display: flex; flex-direction: column; gap: 1px; }
.topbar-time { font-size: 12px; color: var(--muted); }
.topbar-name { font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.topbar-page { font-size: 16px; font-weight: 500; color: var(--ink); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-shrink: 0;
}

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0.5px solid var(--bd);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink2); font-size: 17px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--inner); }

.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0.5px solid var(--bd);
  background: var(--accbg); color: var(--accink);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  cursor: pointer; overflow: hidden; flex-shrink: 0;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Account menu ───────────────────────────────────────── */
.account-menu {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 210px;
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  z-index: 100; overflow: hidden;
}
.help-pop-wrap { position: relative; }
.help-pop {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 260px;
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  z-index: 100;
  padding: 14px 16px;
}
.help-pop-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.help-pop-lede { font-size: 12.5px; color: var(--ink2); line-height: 1.5; margin: 0 0 8px; }
.help-pop-list { margin: 0; padding-left: 16px; }
.help-pop-list li { font-size: 12px; color: var(--ink2); line-height: 1.6; }
.acct-header {
  padding: 12px 14px 10px;
  border-bottom: 0.5px solid var(--bd);
}
.acct-name  { font-size: 13px; font-weight: 500; color: var(--ink); }
.acct-email { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: 13px; color: var(--ink2);
  cursor: pointer;
}
.menu-item:hover { background: var(--inner); }
.menu-item .ti { font-size: 15px; color: var(--ink2); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger .ti { color: var(--bad); }
.menu-divider { height: 0.5px; background: var(--bd); margin: 3px 0; }
.acct-build { font-size: 10px; color: var(--muted); text-align: center; padding: 6px 14px 8px; opacity: 0.6; }

/* ─── Content area ───────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}
.content-inner {
  max-width: var(--content-w);
  margin: 0 auto;
}

/* ─── Bottom tab bar (mobile) ────────────────────────────── */
.bottom-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--card);
  border-top: 0.5px solid var(--bd);
  align-items: stretch;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; font-size: 10px;
  color: var(--muted); cursor: pointer; padding: 6px 4px;
}
.tab-item .ti { font-size: 20px; }
.tab-item.active { color: var(--accink); }

/* ─── Auth / onboarding ──────────────────────────────────── */
.auth-wrap {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 2rem 1.75rem;
}
.auth-brand   { font-size: 17px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.auth-tagline { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 1.5rem; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: var(--card); color: var(--ink);
  border: 0.5px solid var(--bd); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; font-family: var(--font);
  cursor: pointer; text-decoration: none;
}
.btn-google:hover { background: var(--inner); }
.google-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Landing page ───────────────────────────────────────── */
.auth-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
/* The landing page is a normal scrollable document — not a flex-centered
   card like the onboarding card and sign-in/out loading pulse, which keep
   the default centering. */
.auth-wrap:has(.landing-page) { display: block; padding: 0; }

.landing-page {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.75rem 0 2rem;
}
.landing-nav-brand {
  font-size: 15px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em;
}
.landing-nav-actions { display: flex; align-items: center; gap: 10px; }
.landing-nav-cta { padding: 8px 16px; font-size: 13px; }

.public-theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0.5px solid var(--bd); background: var(--card);
  color: var(--ink2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}
.public-theme-toggle:hover { color: var(--accink); border-color: var(--acc); }
.public-theme-toggle:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}
.public-theme-toggle .ti { font-size: 17px; }

/* ══ Above the fold — visibly split, height grows rather than clips ══ */
.landing-fold {
  display: flex; flex-direction: column;
  min-height: calc(100dvh / var(--uz));
}
.landing-fold-grid {
  flex: 1;
  display: flex; align-items: stretch; gap: 3rem;
  padding-bottom: 2.5rem;
}
.landing-fold-left {
  flex: 0 0 58%; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 2.5rem;
}
.landing-fold-divider {
  width: 1px; flex-shrink: 0;
  background: var(--bd);
  align-self: stretch;
}
.landing-fold-right {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 18px;
}

.landing-headline {
  font-size: clamp(28px, 4vw, 40px); font-weight: 500; color: var(--ink);
  line-height: 1.2; margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.landing-sub {
  font-size: 15px; color: var(--ink2); line-height: 1.65;
  margin: 0 0 28px;
}
.landing-privacy {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  margin: 14px 0 0; display: flex; align-items: center; gap: 5px;
}

/* Public section titles — compact, ring-marked labels */
.public-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 14px; text-align: left;
}
.public-section-title::before {
  content: "";
  width: 14px; height: 14px; flex: 0 0 14px;
  background: var(--acc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='30' fill='none' stroke='black' stroke-width='16' stroke-linecap='round' stroke-dasharray='151 189' transform='rotate(-90 48 48)'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='30' fill='none' stroke='black' stroke-width='16' stroke-linecap='round' stroke-dasharray='151 189' transform='rotate(-90 48 48)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.landing-steps-col-compact { gap: 16px; }

/* Sign-in card (fold right) */
.landing-signin-card {
  width: 100%; max-width: 340px;
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  box-sizing: border-box;
}
.landing-signin-title {
  font-size: 15px; font-weight: 500; color: var(--ink);
  margin: 0 0 16px;
}
.landing-signin-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0; font-size: 11.5px; color: var(--muted);
}
.landing-signin-divider::before, .landing-signin-divider::after {
  content: ''; flex: 1; height: 0.5px; background: var(--bd);
}
.landing-signin-field { margin-bottom: 10px; }
.landing-signin-field .form-input:disabled {
  opacity: 0.55; cursor: not-allowed;
}
.landing-signin-note {
  font-size: 11.5px; color: var(--muted); line-height: 1.55;
  margin: 12px 0 0;
}

/* Pricing teaser — replaces the old two-card pricing section */
.landing-pricing-teaser {
  width: 100%; max-width: 340px;
  background: var(--inner);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  box-sizing: border-box;
}
.landing-pricing-teaser-desc {
  font-size: 12px; color: var(--ink2); line-height: 1.55; margin: 0 0 8px;
}
.landing-pricing-teaser-link {
  font-size: 12px; color: var(--accink); text-decoration: none; font-weight: 500;
}
.landing-pricing-teaser-link:hover { text-decoration: underline; }

/* ══ Below the fold ══ */
.landing-below { padding-top: 3rem; }

.landing-section { max-width: 720px; margin: 0 auto 3rem; }
.landing-section-wide { max-width: 880px; }
.landing-below-row {
  display: flex; align-items: start; gap: 3rem;
}
.landing-car-col { flex: 1; min-width: 0; }
.landing-trust-col { flex: 1; min-width: 0; }

.landing-step {
  display: flex; gap: 14px; align-items: flex-start;
}
.landing-steps-col { display: flex; flex-direction: column; gap: 22px; }
.landing-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accbg); color: var(--accink);
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.landing-step-label {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  margin-bottom: 2px;
}
.landing-step-desc {
  font-size: 13px; color: var(--ink2); line-height: 1.6;
}

/* CSS-drawn carousel — "A look inside" */
.landing-car {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 1.5rem 3rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  box-sizing: border-box;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
}
.landing-car:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 4px;
}
.landing-car-track { display: grid; }
.landing-car-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: 1fr auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.landing-car-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.landing-car-slide-body { align-self: center; }

.landing-car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  border: 0.5px solid var(--bd); background: var(--card);
  color: var(--ink2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.landing-car-arrow:hover { color: var(--accink); border-color: var(--acc); }
.landing-car-arrow:focus-visible, .landing-car-dot:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}
.landing-car-arrow .ti { font-size: 16px; }
.landing-car-arrow-prev { left: 12px; }
.landing-car-arrow-next { right: 12px; }

.landing-car-greet {
  text-align: center; font-size: 13px; font-weight: 500; color: var(--ink);
  margin-bottom: 12px;
}
.landing-preview-ring-row { display: flex; align-items: center; justify-content: center; }
.landing-preview-ring-label {
  text-align: center; font-size: 12px; color: var(--muted);
  margin: 4px 0 16px;
}
.landing-preview-stats { display: flex; flex-direction: column; gap: 8px; }
.landing-preview-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accink);
  background: var(--accbg); border-radius: 8px;
  padding: 8px 10px;
}

.landing-car-chat { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.landing-car-chat-ai {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--ink2); line-height: 1.5;
}
.landing-car-chat-ai .ti { color: var(--muted); font-size: 13px; flex-shrink: 0; margin-top: 2px; }
.landing-car-chat-user {
  align-self: flex-end; max-width: 85%;
  background: var(--accbg); color: var(--accink);
  border-radius: 12px; padding: 8px 12px;
  font-size: 12.5px; line-height: 1.5;
}

.landing-car-export {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.landing-car-file-chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); background: var(--inner);
  border: 0.5px solid var(--bd); border-radius: var(--r-sm);
  font-size: 10.5px; line-height: 1.2;
  padding: 5px 8px;
}
.landing-car-file-chip .ti { font-size: 13px; color: var(--accink); }
.landing-car-paper-stack {
  position: relative; width: 100%;
}
.landing-car-paper-stack::before {
  content: "";
  position: absolute; inset: 7px -7px -7px 7px;
  background: rgba(31,31,29,0.16);
  border: 0.5px solid var(--bd);
  border-radius: 4px;
}
.landing-car-paper {
  position: relative;
  background: #FDFCF8;
  border: 0.5px solid rgba(31,31,29,0.16);
  border-radius: 4px;
  padding: 16px 17px 14px;
  color: #2F312F;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.landing-car-doc-title {
  font-size: 11px; font-weight: 500; color: #2B2D2B; margin-bottom: 2px;
}
.landing-car-doc-meta {
  font-size: 10.5px; color: #696D68; margin-bottom: 11px;
}
.landing-car-doc-heading {
  font-size: 10.5px; font-weight: 600; color: #157A5A;
  margin: 10px 0 3px;
}
.landing-car-paper p {
  font-size: 10.5px; line-height: 1.35; color: #3D403D;
  margin: 0;
}

.landing-car-caption {
  text-align: center; font-size: 12px; color: var(--muted);
  margin-top: 14px;
  align-self: end;
}
.landing-car-dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 14px;
}
.landing-car-dot {
  width: 26px; height: 24px; border: none; padding: 0;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.landing-car-dot span {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--bd);
  transition: width 0.2s ease, background 0.2s ease;
}
.landing-car-dot.is-active span { background: var(--acc); width: 20px; }

.landing-trust-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.landing-trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink2);
  background: var(--inner); border-radius: var(--r-sm);
  padding: 10px 12px;
}
.landing-trust-item .ti { color: var(--accink); font-size: 15px; }
.landing-trust-note {
  font-size: 12.5px; color: var(--muted); line-height: 1.6; text-align: left;
  margin: 0;
}
.landing-trust-note a { color: var(--accink); text-decoration: none; }
.landing-trust-note a:hover { text-decoration: underline; }
.landing-trust-divider {
  border-top: 0.5px solid var(--bd);
  margin: 18px 0 16px;
}

.landing-about {
  font-size: 13px; color: var(--ink2); line-height: 1.65; text-align: left; margin: 0;
}
.landing-about a { color: var(--accink); text-decoration: none; font-weight: 500; }
.landing-about a:hover { text-decoration: underline; }

.public-footer,
.landing-footer {
  border-top: 0.5px solid var(--bd);
  padding: 1.5rem 1.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.public-footer-links,
.landing-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.public-footer-links a,
.landing-footer-links a { font-size: 12.5px; color: var(--ink2); text-decoration: none; }
.public-footer-links a:hover,
.landing-footer-links a:hover { color: var(--accink); }
.public-footer-copy,
.landing-footer-copy { font-size: 11.5px; color: var(--muted); }

/* Ring-o brand wordmark (B1 lockup) — brand moments only, see brand.js */
.jnd-ringo { position: relative; }
.jnd-ringo-svg {
  display: inline-block;
  width: 0.72em; height: 0.72em;
  color: var(--acc);
  vertical-align: -0.05em;
}
.jnd-ringo-o {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .landing-fold-divider { display: none; }
  .landing-fold-grid { flex-direction: column; gap: 2rem; padding-bottom: 2rem; }
  .landing-fold-left, .landing-fold-right { display: contents; }
  /* display:contents "promotes" these to direct flex items of
     .landing-fold-grid — without min-width:0 a flex item's default
     min-width:auto lets its text content dictate the item's width instead
     of wrapping to the container, overflowing the viewport. */
  .landing-fold-hero, .landing-fold-how, .landing-fold-signin, .landing-fold-teaser {
    min-width: 0;
  }
  .landing-fold-hero   { order: 1; }
  .landing-fold-signin { order: 2; }
  .landing-fold-how    { order: 3; }
  .landing-fold-teaser { order: 4; }
  .landing-below-row { flex-direction: column; gap: 2.5rem; }
  .landing-trust-grid { grid-template-columns: 1fr; }
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; font-family: var(--font);
  border: none; cursor: pointer; line-height: 1;
  text-decoration: none; user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--acc); color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--ink2); border: 0.5px solid var(--bd); }
.btn-ghost:hover:not(:disabled) { background: var(--inner); }
.btn-ghost.active { background: var(--accbg); color: var(--accink); border-color: var(--accink); }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: var(--bad); color: #fff; }

/* ─── Pills ──────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 20px;
}
.pill-green { background: var(--accbg); color: var(--accink); }
.pill-amber { background: rgba(239,159,39,0.15); color: #8a5c00; }
html[data-theme="dark"] .pill-amber { color: #f0b84a; }
.pill-muted { background: var(--inner); color: var(--muted); }
.pill-red   { background: rgba(192,57,43,0.12); color: var(--bad); }

/* ─── Progress bar ───────────────────────────────────────── */
.progress-bar  { height: 5px; background: var(--track); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--acc); border-radius: 3px; transition: width 0.4s; }

/* ─── Form elements ──────────────────────────────────────── */
label {
  font-size: 12.5px; color: var(--muted);
  display: block; margin-bottom: 4px; margin-top: 14px;
}
label:first-child { margin-top: 0; }

input[type="text"], input[type="email"], input[type="number"],
textarea, select {
  width: 100%;
  background: var(--inner); border: 0.5px solid var(--bd); color: var(--ink);
  border-radius: var(--r-sm); padding: 9px 11px;
  font-size: 13px; font-family: var(--font); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--acc); }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* ─── Loading pulse ──────────────────────────────────────── */
.loading-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.loading-pulse { display: flex; gap: 6px; align-items: center; }
.loading-pulse span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acc);
  animation: jnd-pulse 1.2s ease-in-out infinite;
}
.loading-pulse span:nth-child(2) { animation-delay: 0.2s; }
.loading-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes jnd-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%            { opacity: 1;   transform: scale(1);    }
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 8px 18px; border-radius: 20px;
  font-size: 13px; z-index: 200;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 1rem;
}
.modal {
  background: var(--card); border: 0.5px solid var(--bd);
  border-radius: var(--r); padding: 1.5rem;
  max-width: 380px; width: 100%;
}
.modal h3  { font-size: 16px; margin-bottom: 8px; }
.modal p   { font-size: 13px; color: var(--muted); margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ─── Banner ─────────────────────────────────────────────── */
.banner {
  background: var(--accbg); color: var(--accink);
  border: 0.5px solid rgba(29,158,117,0.3);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: var(--gap);
}

/* ─── Tables (admin) ─────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 0.5px solid var(--bd); }
th { color: var(--muted); font-weight: 500; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--inner); }

/* Admin credit ledger — scrollable so a long spend history stays contained */
.admin-ledger { max-height: 320px; overflow-y: auto; border: 0.5px solid var(--bd); border-radius: var(--r-sm); }
.admin-ledger table { font-size: 12.5px; }
.admin-ledger th { position: sticky; top: 0; background: var(--card); }

/* ─── Confidence stars (scenarios) ──────────────────────── */
.confidence { display: flex; gap: 4px; }
.confidence button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--track); }
.confidence button.on { color: var(--amber); }

/* ─── Utility ────────────────────────────────────────────── */
.row       { display: flex; gap: 8px; align-items: center; }
.col       { display: flex; flex-direction: column; gap: 8px; }
.muted     { color: var(--muted); }
.small     { font-size: 12px; }
.bold      { font-weight: 500; }
.no-select { user-select: none; -webkit-user-select: none; }

/* ─── Dashboard ──────────────────────────────────────────── */
.dash-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  margin-bottom: var(--gap);
}
.dash-ring-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dash-delta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--acc);
}
.dash-checkpoint {
  font-size: 11px;
  color: var(--acc);
  text-align: center;
  line-height: 1.4;
}
.dash-hero-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dash-recap {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--ink);
  flex: 1;
}
.dash-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dash-focus-input {
  flex: 1;
  min-width: 130px;
  width: auto !important;
  font-size: 12.5px;
  padding: 8px 11px;
}
.dash-two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.dash-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--ink);
}
.dash-section-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.dash-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}
.dash-glance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.link-text {
  font-size: 12px;
  color: var(--accink);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  padding: 0;
}
.link-text:hover { opacity: 0.8; }
.dash-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.dash-count-box {
  background: var(--inner);
  border-radius: var(--r-sm);
  padding: 0.7rem;
}
.dash-count-num   { font-size: 22px; font-weight: 500; color: var(--ink); }
.dash-count-label { font-size: 11.5px; color: var(--muted); }
.def-strip {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-bottom: 7px;
}
.def-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--ink2);
}
.def-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.dash-interviews-hook {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accbg);
  border-radius: var(--r);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  user-select: none;
}
.dash-interviews-hook:hover { opacity: 0.9; }
.dash-hook-title { font-size: 13px; font-weight: 500; color: var(--accink); }
.dash-hook-sub   { font-size: 12px; color: var(--accink); opacity: 0.8; }

/* ─── Dossier segmented control ─────────────────────────── */
.seg-control {
  display: flex;
  gap: 2px;
  background: var(--inner);
  border-radius: 20px;
  padding: 3px;
}
.seg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  color: var(--ink2);
  user-select: none;
  white-space: nowrap;
}
.seg-item:hover:not(.on) { color: var(--ink); }
.seg-item.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  border: 0.5px solid var(--bd);
}
.seg-badge { font-size: 11px; opacity: 0.7; }

/* ─── Dossier Your file ──────────────────────────────────── */
.dossier-hook {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--accbg);
  border-radius: var(--r);
  padding: 0.85rem 1rem;
  margin-bottom: var(--gap);
}
.dossier-hook-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); color: var(--accink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 17px;
}
.dossier-hook-text { flex: 1; min-width: 0; }
.dossier-hook-title { font-size: 13px; font-weight: 500; color: var(--accink); }
.dossier-hook-sub   { font-size: 11.5px; color: var(--accink); opacity: 0.8; }
.dossier-hook-btns  { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.btn-acc-outline {
  background: transparent; color: var(--accink);
  border: 0.5px solid var(--accink); border-radius: var(--r-sm);
  padding: 7px 12px; font-size: 12.5px; font-family: var(--font);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.btn-acc-outline:hover { background: rgba(29,158,117,0.1); }

.section-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 9px;
}
.gap-link {
  font-size: 11.5px;
  color: var(--accink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  font-family: var(--font);
  padding: 0;
}
.gap-link:hover { opacity: 0.8; }

.entry-row {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: 11px;
  padding: 0.8rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.entry-info  { min-width: 0; }
.entry-title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.entry-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

.def-tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.def-tag-strong   { background: var(--accbg); color: var(--accink); }
.def-tag-moderate { background: rgba(239,159,39,0.15); color: #854F0B; }
html[data-theme="dark"] .def-tag-moderate { color: #f0b84a; }
.def-tag-needs    { background: var(--inner); color: var(--muted); }

.skill-chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 16px;
  background: var(--inner);
  color: var(--ink2);
}

/* ─── Export page ───────────────────────────────────────── */
.export-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 1.1rem;
  margin-top: -4px;
}
.export-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  margin-bottom: var(--gap);
}
.export-card-accent {
  border: 2px solid var(--acc);
}
.export-card-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.export-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.export-desc {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.55;
  margin-bottom: 10px;
}
.export-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.export-hint {
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.export-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 0 2px;
}

.export-stale-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink2);
  background: var(--surface);
  border: 0.5px solid var(--bd);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.export-blocked {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface);
  border: 0.5px solid var(--bd);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ─── Dossier Chat ───────────────────────────────────────── */
.chat-wrap {
  display: flex;
  flex-direction: column;
  /* topbar (56px) + .content padding top+bottom (2×1.25rem = 2.5rem); dvh divided by zoom so calc is in pre-zoom space */
  height: calc(100dvh / var(--uz) - 56px - 2.5rem);
  overflow: hidden;
}
.chat-header-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 10px;
  border-bottom: 0.5px solid var(--bd);
  flex-shrink: 0;
}
.chat-stage-badge {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-stage-track {
  flex: 1;
  height: 4px;
  background: var(--track);
  border-radius: 2px;
  overflow: hidden;
}
.chat-stage-bar {
  height: 4px;
  background: var(--acc);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.chat-saved-tick {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.chat-msg-assistant {
  display: flex;
  gap: 10px;
  max-width: 700px;
  align-self: flex-start;
  width: 100%;
}
.chat-feather {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accbg);
  color: var(--accink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-msg-assistant-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  flex: 1;
}
.chat-thinking {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0;
}
.chat-thinking span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse-dot 1.2s infinite;
}
.chat-thinking span:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1); }
}
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accink);
  animation: cursor-blink 0.9s steps(1) infinite;
}
@keyframes cursor-blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.chat-msg-user {
  align-self: flex-end;
  max-width: 70%;
  background: var(--inner);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}
.chat-empty-icon { font-size: 28px; margin-bottom: 4px; }
.chat-empty-title { font-size: 14px; font-weight: 500; color: var(--ink2); }
.chat-empty-sub   { font-size: 12.5px; max-width: 300px; }
.chat-composer-wrap {
  flex-shrink: 0;
  padding: 10px 0 12px;
  border-top: 0.5px solid var(--bd);
}
.chat-mode-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 22px;
  position: relative;
}
.chat-mode-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.chat-mode-btn:hover { color: var(--ink2); background: var(--inner); }
.chat-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 3px 8px 3px 9px;
  background: var(--accbg);
  color: var(--accink);
  border-radius: 12px;
  cursor: default;
}
.chat-mode-pill-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accink);
  opacity: 0.7;
  font-size: 13px;
  padding: 0;
  line-height: 1;
}
.chat-mode-pill-x:hover { opacity: 1; }
.chat-mode-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 180px;
  padding: 4px;
}
.chat-mode-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ink);
}
.chat-mode-menu-item:hover { background: var(--inner); }
.chat-jd-field {
  width: 100%;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--inner);
  border: 0.5px solid var(--bd);
  border-radius: 8px;
  padding: 8px 10px;
  resize: none;
  margin-bottom: 8px;
  min-height: 72px;
  box-sizing: border-box;
}
.chat-jd-field:focus { outline: none; border-color: var(--acc); }
.chat-exhausted-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink2);
  background: var(--surface);
  border: 0.5px solid var(--bd);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.chat-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--inner);
  border: 0.5px solid var(--bd);
  border-radius: 10px;
  padding: 10px 12px;
  resize: none;
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
  box-sizing: border-box;
}
.chat-input:focus { outline: none; border-color: var(--acc); }
.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--acc);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.chat-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-send-btn:not(:disabled):hover { opacity: 0.85; }

/* ─── Questions ─────────────────────────────────────────── */
.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--bd);
  margin-bottom: 16px;
}
.q-header-title { font-size: 13px; font-weight: 500; color: var(--ink2); }
.q-header-badge {
  font-size: 11px;
  background: var(--accbg);
  color: var(--accink);
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: 500;
}
.q-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 10px;
}
.q-card.answered { border-color: var(--acc); border-left: 3px solid var(--acc); }
.q-question {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 10px;
}
.q-textarea {
  width: 100%;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--inner);
  border: 0.5px solid var(--bd);
  border-radius: 8px;
  padding: 9px 11px;
  resize: none;
  line-height: 1.5;
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.q-textarea:focus { outline: none; border-color: var(--acc); }
.q-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.q-answered-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.q-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.q-empty-icon { font-size: 28px; margin-bottom: 8px; }
.q-empty-title { font-size: 14px; font-weight: 500; color: var(--ink2); margin-bottom: 4px; }

/* ─── Form utilities (used in Interviews forms) ─────────── */
.form-group { margin-bottom: 12px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--ink2); display: block; margin-bottom: 5px; }
.form-input {
  width: 100%;
  background: var(--inner);
  border: 0.5px solid var(--bd);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
}
.form-input:focus { border-color: var(--acc); }

/* ─── Support threads (Help + Admin tickets) ─────────────── */
.support-thread {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.support-bubble {
  max-width: 85%;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
}
.support-bubble-user {
  align-self: flex-end;
  background: var(--inner);
  color: var(--ink);
  border-radius: 12px 12px 4px 12px;
}
.support-bubble-admin {
  align-self: flex-start;
  background: var(--accbg);
  color: var(--ink);
  border-radius: 12px 12px 12px 4px;
}
.support-bubble-label {
  font-size: 11px; font-weight: 600;
  color: var(--accink);
  margin-bottom: 2px;
}
.support-bubble-user .support-bubble-label { color: var(--muted); }
.support-bubble-text { line-height: 1.5; white-space: pre-wrap; }
.support-bubble-time { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.support-reply-row {
  display: flex; gap: 8px; align-items: center;
}
.support-reply-row .form-input { flex: 1; }

/* ─── Interviews ────────────────────────────────────────── */
.int-list-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.int-list-title { font-size: 17px; font-weight: 600; color: var(--ink); }

.int-add-form { padding: 18px; }
.int-add-form-title { font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }

.int-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.int-empty-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.int-empty-title { font-size: 14px; font-weight: 500; color: var(--ink2); margin-bottom: 6px; }

/* Interview list cards */
.int-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.int-card:hover { border-color: var(--acc); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.int-card-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.int-card-left { flex: 1; min-width: 0; }
.int-company { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.int-role    { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.int-card-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.int-card-footer { display: flex; gap: 12px; margin-top: 6px; }

/* Coverage bar (small, in list cards) */
.int-coverage-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.int-coverage-bar-wrap { flex: 1; height: 5px; border-radius: 3px; background: var(--bd); overflow: hidden; }
.int-coverage-bar { height: 100%; border-radius: 3px; }
.int-coverage-label { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }

/* Status pills */
.pill-muted { background: var(--inner); color: var(--ink2); }
.pill-blue  { background: #dbeafe; color: #1d4ed8; }
.pill-amber { background: #fef3c7; color: #92400e; }
.pill-green { background: var(--accbg); color: var(--accink); }
html[data-theme="dark"] .pill-blue  { background: #1e3a5f; color: #93c5fd; }
html[data-theme="dark"] .pill-amber { background: #3d2b00; color: #fbbf24; }

/* Detail view */
.int-detail-hd { margin-bottom: 14px; }
.int-back-btn {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--acc); font-weight: 500;
  padding: 0; display: flex; align-items: center; gap: 5px;
  margin-bottom: 10px;
}
.int-back-btn:hover { text-decoration: underline; }
.int-detail-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.int-detail-company { font-size: 18px; font-weight: 700; color: var(--ink); }
.int-detail-role    { font-size: 14px; color: var(--ink2); margin-top: 2px; }
.int-detail-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Status dropdown */
.int-status-control { position: relative; }
.int-status-pill    { cursor: pointer; }
.int-status-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 100;
  min-width: 140px;
  overflow: hidden;
}
.int-status-menu-item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s;
}
.int-status-menu-item:hover  { background: var(--inner); }
.int-status-menu-item.active { color: var(--acc); font-weight: 500; }

.icon-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 6px;
  display: flex; align-items: center;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--inner); }

/* Coverage card (detail overview) */
.int-coverage-card { margin-bottom: 20px; }
.int-coverage-hero-label { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 10px; line-height: 1.5; }
.int-to-build { color: var(--ink2); font-weight: 400; }
.int-coverage-bar-lg-wrap { height: 10px; border-radius: 5px; background: var(--bd); overflow: hidden; margin-bottom: 8px; }
.int-coverage-bar-lg { height: 100%; border-radius: 5px; }
.int-coverage-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); }

/* Requirements */
.int-req-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.int-req-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.int-req-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}
.int-req-covered { background: var(--accbg); color: var(--accink); }
.int-req-partial  { background: #fef3c7; color: #92400e; }
.int-req-missing  { background: var(--inner); color: var(--ink2); }
html[data-theme="dark"] .int-req-partial { background: #3d2b00; color: #fbbf24; }
.int-req-name     { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.int-req-evidence { margin-bottom: 4px; }
.int-req-tip      { display: flex; gap: 5px; align-items: flex-start; margin-bottom: 6px; color: var(--ink2); }
.int-req-chat-link {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--acc); font-weight: 500;
  padding: 0; display: inline-flex; align-items: center; gap: 3px;
}
.int-req-chat-link:hover { text-decoration: underline; }

/* Stories */
.int-story-card {
  background: var(--inner);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.int-story-hd  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.int-story-org  { font-size: 13px; font-weight: 500; color: var(--ink); }
.int-story-title{ font-size: 12.5px; color: var(--ink2); }

/* Research box */
.int-research-box { padding: 14px 16px; }

/* Section title */
.int-section-title { font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

/* JD section */
.int-jd-section { padding: 12px 14px; }

/* No JD prompt */
.int-no-jd { text-align: center; padding: 2rem 1.5rem; margin-bottom: 16px; }

/* Round cards */
.int-round-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.int-round-hd { display: flex; align-items: center; gap: 10px; }
.int-round-num { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.int-round-meta { display: flex; align-items: center; gap: 8px; }

/* Scenarios */
.int-scenario-card {
  background: var(--card);
  border: 0.5px solid var(--bd);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.int-scenario-q    { font-size: 13.5px; color: var(--ink); line-height: 1.55; margin-bottom: 6px; }
.int-scenario-hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.int-conf-row { display: flex; align-items: center; }
.int-conf-btn {
  background: none; border: none; cursor: pointer;
  color: var(--bd); font-size: 0;
  padding: 2px;
  transition: color 0.1s;
}
.int-conf-btn i { font-size: 14px; }
.int-conf-btn.active i { color: var(--amber); }
.int-conf-btn:not(.active):hover i { color: var(--bds); }

/* Prep items */
.int-prep-item { padding: 14px 16px; margin-bottom: 12px; }
.int-prep-item-hd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.int-prep-text {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.65;
  white-space: pre-wrap;
  background: var(--inner);
  border-radius: 8px;
  padding: 10px 12px;
  max-height: 300px;
  overflow-y: auto;
}

/* Dashboard mini-cards */
.int-dash-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--bd);
}
.int-dash-mini:last-child { border-bottom: none; }
.int-dash-mini-left { flex: 1; min-width: 0; }
.int-dash-mini-co   { font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.int-dash-mini-role { font-size: 12px; color: var(--ink2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-dash-mini-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.int-dash-mini-cov  { font-size: 12px; color: var(--acc); font-weight: 600; }

/* ─── Credits ───────────────────────────────────────────── */
.credits-value-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.credits-big {
  font-size: 32px;
  font-weight: 700;
  color: var(--acc);
  line-height: 1.1;
  margin-bottom: 2px;
}
.credits-divider {
  width: 1px;
  height: 40px;
  background: var(--bd);
  flex-shrink: 0;
}
.credits-bar-wrap {
  height: 8px;
  border-radius: 4px;
  background: var(--track);
  overflow: hidden;
  margin-bottom: 6px;
}
.credits-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}
.credits-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.credits-notes {
  border-top: 0.5px solid var(--bd);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.credits-note-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.5;
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sidebar    { display: none; }
  .bottom-bar { display: flex; }
  .content    { padding-bottom: calc(56px + env(safe-area-inset-bottom) + 1rem); }
  .topbar-time { display: none; }
  .topbar-name { font-size: 15px; }
  .toast      { bottom: calc(56px + env(safe-area-inset-bottom) + 12px); }
  /* topbar (56px) + content top pad (1.25rem) + bottom bar (56px) + safe-area + content bottom pad (1rem); dvh divided by zoom */
  .chat-wrap  { height: calc(100dvh / var(--uz) - 112px - 2.25rem - env(safe-area-inset-bottom)); }

  .dash-hero     { flex-direction: column; }
  .dash-ring-col { flex-direction: row; align-items: center; gap: 14px; }
  .dash-two-up   { grid-template-columns: 1fr; }
  .dash-counts   { grid-template-columns: repeat(2, 1fr); }

  .dossier-hook      { flex-wrap: wrap; }
  .dossier-hook-text { flex-basis: 100%; }
  .dossier-hook-btns { flex-basis: 100%; flex-shrink: 1; margin-left: calc(34px + 13px); }
}
