/* ---------- theme tokens (light/dark, see script.js applyTheme()) ----------
   Dark is the site's original look and stays the default (no data-theme
   attribute, or an explicit data-theme="dark"). "Auto" means: no explicit
   choice saved anywhere, so the OS-level prefers-color-scheme decides —
   that's the plain :root block below, overridden by the media query only
   when the OS says light. An explicit user choice (account page or, for
   guests, localStorage) stamps data-theme="light"/"dark" on <html>, which
   always wins over the OS setting.
   --tint-rgb is the one trick doing most of the work: nearly every card/
   input border and hover tint in this file was written as
   rgba(255,255,255, some-alpha) — "a bit lighter than the dark page".
   Routing all of those through rgba(var(--tint-rgb), alpha) means a single
   variable flip (white → near-black) re-derives every one of those tints
   correctly for a light page ("a bit darker than the page") without
   re-tuning dozens of individual alpha values by hand. */
:root {
  --bg-page: #141516;
  --bg-sidebar: #0f1011;
  --bg-surface: #1a1b1d;
  --bg-surface-hover: #232527;
  --text-primary: #f2f0ee;
  --text-secondary: #dedcda;
  --text-muted: #9a999b;
  --text-faint: #68676a;
  --tint-rgb: 255,255,255;
  --modal-backdrop: rgba(10,10,11,0.72);
  --accent: #ff7a45;
  --accent-ink: #141516;
  --accent-link: #ff8659;
  --accent-link-hover: #ffa27a;
  --accent-light: #ff9d6e;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg-page: #f6f5f3;
    --bg-sidebar: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-hover: #eeece9;
    --text-primary: #1c1b1a;
    --text-secondary: #474543;
    --text-muted: #716f6d;
    --text-faint: #98958f;
    --tint-rgb: 20,18,16;
    --modal-backdrop: rgba(40,38,36,0.4);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg-page: #f6f5f3;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #eeece9;
  --text-primary: #1c1b1a;
  --text-secondary: #474543;
  --text-muted: #716f6d;
  --text-faint: #98958f;
  --tint-rgb: 20,18,16;
  --modal-backdrop: rgba(40,38,36,0.4);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  overflow: hidden;
}
/* The app (onboarding + chat) is a fixed-height, non-scrolling single
   view (see body{overflow:hidden} above) — but the SEO landing page is a
   normal, scrollable marketing page. This class (added/removed by the
   inline script in index.php) switches body back to normal document flow
   while the landing section is showing. */
body.landing-mode { overflow: auto; height: auto; min-height: 100%; }
a { color: var(--accent-link); text-decoration: none; }
a:hover { color: var(--accent-link-hover); }
button { font-family: inherit; border: none; background: none; }

/* ---------- shared bits ---------- */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  border: 1px solid rgba(var(--tint-rgb), 0.16); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: rgba(var(--tint-rgb), 0.07); border-color: rgba(var(--tint-rgb), 0.24); }
.btn-ghost.sm { font-size: 12px; padding: 6px 11px; }
.btn-accent {
  font-size: 13.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent);
  border-radius: 9px; padding: 10px 18px; cursor: pointer; transition: filter .15s;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent.sm { font-size: 12px; padding: 6px 12px; border-radius: 8px; }
.btn-accent:disabled { opacity: .35; cursor: not-allowed; filter: none; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 11px; border: 1px solid rgba(var(--tint-rgb), 0.16);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { background: rgba(var(--tint-rgb), 0.08); }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 0 8px;
}
.row-gap8 { display: flex; gap: 8px; }
.mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- onboarding ---------- */
.onboarding {
  display: flex; flex-direction: column; align-items: center;
  height: 100%; padding: 36px 24px; position: relative; overflow-y: auto;
}
.ob-logo { position: absolute; top: 36px; left: 40px; display: flex; align-items: center; gap: 10px; }
.ob-name { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; line-height: 1.2; }
.ob-sub { font-size: 10px; color: var(--text-faint); line-height: 1.2; }
.ob-wrap { width: 100%; max-width: 560px; margin-top: 88px; }
.ob-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.ob-progress .seg { height: 4px; flex: 1; border-radius: 3px; background: rgba(var(--tint-rgb), 0.1); transition: background .2s; }
.ob-progress .seg.active { background: var(--accent); }
.ob-card {
  background: var(--bg-surface); border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 20px;
  padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.ob-step-label { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 10px; }
.ob-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.ob-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 26px; line-height: 1.5; }
.ob-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.ob-stack { display: flex; flex-direction: column; gap: 12px; }
.ob-row, .ob-role-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border: 1px solid rgba(var(--tint-rgb), 0.12); border-radius: 11px;
  background: var(--bg-page); cursor: pointer; color: var(--text-muted); transition: border-color .15s;
}
.ob-row:hover, .ob-role-card:hover { border-color: rgba(var(--tint-rgb), 0.22); }
.ob-row.selected, .ob-role-card.selected { border-color: var(--accent); background: rgba(255,122,69,0.1); color: var(--accent); }
.ob-role-card { align-items: flex-start; gap: 13px; padding: 16px; }
.ob-role-title { font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.ob-role-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.ob-row-label { font-size: 14px; font-weight: 700; }
.ob-row-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.ob-row-code { font-size: 11px; color: var(--text-faint); font-weight: 700; letter-spacing: .03em; }
.ob-check-icon { display: none; }
.ob-row.selected .ob-check-icon, .ob-role-card.selected .ob-check-icon { display: block; }
.ob-search {
  display: flex; align-items: center; gap: 9px; border: 1px solid rgba(var(--tint-rgb), 0.14);
  border-radius: 10px; padding: 9px 13px; margin-bottom: 14px; color: var(--text-faint); font-size: 13.5px;
}
.ob-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.ob-dropzone {
  border: 1.5px dashed rgba(var(--tint-rgb), 0.2); border-radius: 12px; padding: 22px;
  text-align: center; margin-top: 2px; cursor: pointer;
}
.ob-dz-title { font-size: 13px; color: var(--text-muted); }
.ob-dz-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ob-chip {
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 20px;
  border: 1px solid rgba(var(--tint-rgb), 0.14); color: var(--text-secondary); cursor: pointer; transition: border-color .15s;
}
.ob-chip:hover { border-color: rgba(var(--tint-rgb), 0.26); }
.ob-chip.selected { border-color: var(--accent); background: rgba(255,122,69,0.14); color: var(--accent-light); }
.ob-field-label { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.ob-input {
  width: 100%; border: 1px solid rgba(var(--tint-rgb), 0.14); border-radius: 10px; padding: 11px 13px;
  font-size: 13.5px; background: var(--bg-page); color: var(--text-primary); font-family: inherit;
}
.ob-input::placeholder { color: var(--text-faint); }
.ob-center { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0 4px; }
.ob-check {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255,122,69,0.14);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.ob-finish-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.ob-finish-sub { font-size: 13.5px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.ob-finish-btn { width: 100%; padding: 13px; border-radius: 11px; font-size: 14px; }
.ob-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.ob-nav #obBack { visibility: hidden; }
.ob-nav #obBack.show { visibility: visible; }
.ob-login { text-align: center; font-size: 12.5px; color: var(--text-faint); margin-top: 22px; }
.ob-login.hide { display: none; }

/* ---------- plan cards (Pack 1 / Pack 2) ---------- */
.plan-card {
  position: relative; border: 1.5px solid rgba(var(--tint-rgb), 0.12); border-radius: 13px;
  background: var(--bg-page); padding: 16px 16px 16px 44px; cursor: pointer; transition: border-color .15s;
}
.plan-card:hover { border-color: rgba(var(--tint-rgb), 0.24); }
.plan-card.selected { border-color: var(--accent); background: rgba(255,122,69,0.07); }
.plan-check {
  position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(var(--tint-rgb), 0.22); display: flex; align-items: center; justify-content: center;
}
.plan-card.selected .plan-check { border-color: var(--accent); background: rgba(255,122,69,0.18); }
.plan-check svg { display: none; }
.plan-card.selected .plan-check svg { display: block; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan-name { font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.plan-price { font-size: 12px; font-weight: 700; color: var(--accent-light); white-space: nowrap; }
.plan-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; margin-top: 4px; }
.plan-expand { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(var(--tint-rgb), 0.12); cursor: default; }
.plan-key-hint { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; margin-top: 7px; }
.paypal-slot { margin-top: 14px; min-height: 44px; }
.plan-status { font-size: 12.5px; margin-top: 10px; line-height: 1.4; }
.plan-status.ok { color: #4ade80; }
.plan-status.err { color: #f87171; }

/* ---------- sidebar plan banner (upgrade CTA) ---------- */
.plan-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(255,122,69,0.1); border: 1px solid rgba(255,122,69,0.25); border-radius: 10px;
  padding: 10px 12px; margin: 6px 0 2px; font-size: 12px; color: var(--accent-light); line-height: 1.4;
}
.plan-banner-btn {
  flex-shrink: 0; background: var(--accent); color: var(--accent-ink); border: none; border-radius: 7px;
  padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.plan-banner-btn:hover { filter: brightness(1.08); }

/* ---------- app shell ---------- */
/* Fixed to the viewport via inset (not height:100% inherited from
   html/body) so the app-shell can never be broken by a third-party script
   overriding its inline height. Google's AdSense "Auto ads" (anchor ads
   specifically, when enabled at the AdSense-account level, independent of
   this codebase's own 5 manual ad slots) has been observed injecting
   `style="height:auto !important"` directly onto #app plus a
   padding-bottom on <body> to make room for an anchor ad it inserts —
   this app is a fixed single-screen SPA (body has overflow:hidden; see
   above) that manages its own internal scroll areas, so an ancestor
   losing its fixed height turns the whole thing into a normal flowing
   page instead, breaking every overlay/scroll region built on the
   assumption of a fixed viewport-height shell (found 2026-09-15, see the
   AdSense-compliance notes). With `position:fixed; inset:0`, even an
   injected `height:auto` resolves via the CSS auto-height-with-both-
   insets-set algorithm to exactly fill the viewport, so this survives
   that mutation regardless of what the ad script does to the height
   property. See also: consider disabling Auto ads/anchor ads specifically
   in the AdSense account if this is undesired at the product level,
   since the codebase already manages its own 5 ad placements deliberately. */
.app { display: flex; position: fixed; inset: 0; }
.sidebar {
  /* 2026-09-17: widened from 272px so longer "Recent" chat titles have
     room to actually show instead of getting cut off after just a few
     words (.hist-item below still ellipsizes anything longer than this). */
  width: 320px; flex-shrink: 0; background: var(--bg-sidebar); border-right: 1px solid rgba(var(--tint-rgb), 0.07);
  display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; line-height: 1.2; }
.brand-sub { font-size: 10.5px; color: var(--text-faint); line-height: 1.2; }
.new-chat {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid rgba(var(--tint-rgb), 0.14);
  border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-primary); transition: background .15s;
}
.new-chat:hover { background: rgba(var(--tint-rgb), 0.07); }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-faint); text-transform: uppercase; margin: 20px 8px 8px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--text-muted); font-weight: 500; cursor: pointer; transition: opacity .15s;
}
.nav-item:hover { opacity: .85; }
.nav-item.active { background: rgba(255,122,69,0.14); color: var(--accent-light); font-weight: 700; }
.hist-list { display: flex; flex-direction: column; gap: 1px; }
.hist-item {
  padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.hist-item:hover { background: rgba(var(--tint-rgb), 0.05); }
.hist-item.active { background: rgba(255,122,69,0.14); color: var(--accent-light); }
.hist-note { font-size: 11.5px; color: var(--text-faint); padding: 2px 12px 8px; line-height: 1.4; }
.side-spacer { flex: 1; }
.profile-row {
  display: flex; align-items: center; gap: 10px; padding: 14px 8px 4px; border-radius: 10px;
  border-top: 1px solid rgba(var(--tint-rgb), 0.07); margin-top: 8px;
}
.profile-action {
  background: none; border: 1px solid rgba(var(--tint-rgb), 0.14); color: var(--text-muted);
  font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 7px; cursor: pointer;
  flex-shrink: 0; transition: opacity .15s;
}
.profile-action:hover { opacity: .8; color: var(--text-primary); }
.auth-input {
  background: var(--bg-surface); border: 1px solid rgba(var(--tint-rgb), 0.12); color: var(--text-primary);
  font-size: 13.5px; padding: 11px 13px; border-radius: 9px; width: 100%;
}
.auth-input:focus { outline: none; border-color: var(--accent-link); }
.auth-error {
  background: rgba(255,77,77,0.12); border: 1px solid rgba(255,77,77,0.3); color: #ff9d9d;
  font-size: 12.5px; padding: 9px 12px; border-radius: 8px; margin-top: 14px; line-height: 1.4;
}
.auth-switch { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.link-btn {
  background: none; border: none; color: var(--accent-light); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 0; margin-left: 2px;
}
.link-btn:hover { text-decoration: underline; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #3a2c24; color: var(--accent-light);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-plan { font-size: 11.5px; color: var(--text-faint); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; }

/* ---------- country switcher (sidebar, bottom) ---------- */
.country-row {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 4px;
  padding: 9px 8px; border-radius: 8px; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 12.5px; font-weight: 600; transition: background .15s;
}
.country-row:hover { background: rgba(var(--tint-rgb), 0.05); color: var(--text-primary); }
.country-row-value { margin-left: auto; color: var(--text-faint); font-weight: 700; }

/* ---------- account overlay ---------- */
/* 4 tabs don't fit a narrow phone's card width side by side (this WAS
   overflowing invisibly off the edge of the card with no way to reach the
   last tab, and tapping it via keyboard/programmatic focus dragged the
   whole overlay sideways to bring it into view — see the build notes,
   2026-09-15). Scroll horizontally instead of wrapping: a tab strip that
   wraps to 2 lines looks broken, a scrollable one is a familiar pattern.
   overflow-x:hidden on .overlay-card above is a second safety net so this
   row is the only thing that can ever need its own scrollbar. */
.account-tabs {
  display: flex; gap: 4px; margin-top: 16px; border-bottom: 1px solid rgba(var(--tint-rgb), 0.08);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.account-tabs::-webkit-scrollbar { display: none; }
.account-tab {
  background: none; border: none; padding: 9px 12px; font-size: 12.5px; font-weight: 700;
  color: var(--text-faint); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap; flex-shrink: 0;
}
.account-tab:hover { color: var(--text-primary); }
.account-tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.account-panel { padding-top: 18px; display: flex; flex-direction: column; }
.account-panel .ob-field-label { margin-bottom: 6px; }
.theme-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.theme-opt {
  text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(var(--tint-rgb), 0.12);
  background: var(--bg-page); color: var(--text-muted); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s;
}
.theme-opt:hover { border-color: rgba(var(--tint-rgb), 0.24); }
.theme-opt.active { border-color: var(--accent); background: rgba(255,122,69,0.1); color: var(--accent-light); }
.saved-jobs-list { display: flex; flex-direction: column; gap: 10px; }
.saved-job-item {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 13px;
  background: var(--bg-page); display: flex; align-items: center; gap: 12px;
}
.saved-job-info { flex: 1; min-width: 0; }
.saved-job-info.clickable { cursor: pointer; }
.saved-job-info.clickable:hover .saved-job-title { color: var(--accent-light); }
.saved-job-info.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.saved-job-title { font-weight: 700; font-size: 13.5px; color: var(--text-primary); }
.saved-job-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.empty-note { font-size: 13px; color: var(--text-faint); line-height: 1.5; padding: 6px 0; }
.cv-file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 10px; padding: 11px 13px;
  background: var(--bg-page); margin-top: 6px; font-size: 13px; color: var(--text-primary);
}
.cv-upload-hint { font-size: 12px; color: var(--text-faint); line-height: 1.4; }

.main { flex: 1; display: flex; flex-direction: column; height: 100%; min-width: 0; }
.chatarea { position: relative; flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 44px 24px 24px; }
.chatarea::-webkit-scrollbar { width: 8px; }
.chatarea::-webkit-scrollbar-thumb { background: rgba(var(--tint-rgb), 0.12); border-radius: 4px; }
.chat-inner { width: 100%; max-width: 760px; }

.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 60px; }
.welcome-mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.welcome-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.welcome-sub { font-size: 14.5px; color: var(--text-muted); margin-bottom: 32px; max-width: 440px; line-height: 1.5; }
.sugg-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; width: 100%; text-align: left; }
.sugg-card {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 16px; background: var(--bg-surface);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.sugg-card:hover { background: var(--bg-surface-hover); border-color: rgba(var(--tint-rgb), 0.18); }
.sugg-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.sugg-ex { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

.thread { display: flex; flex-direction: column; gap: 16px; }
.thread-empty { display: flex; gap: 10px; }
.jd-source-note { margin-top: 14px; font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.msg-row { display: flex; gap: 10px; align-items: flex-start; }
.msg-row.right { justify-content: flex-end; }
.bubble.user {
  max-width: 72%; background: rgba(255,122,69,0.13); border: 1px solid rgba(255,122,69,0.25);
  border-radius: 16px 16px 4px 16px; padding: 11px 15px; font-size: 14px; line-height: 1.5;
}
.ai-avatar {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.bubble.ai {
  max-width: 82%; background: var(--bg-surface); border: 1px solid rgba(var(--tint-rgb), 0.08);
  border-radius: 16px 16px 16px 4px; padding: 14px 16px; font-size: 14px; line-height: 1.55;
}
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(var(--tint-rgb), 0.1);
  border-radius: 8px; padding: 5px 9px; margin-top: 8px; font-size: 12px;
}
/* "Bring your own Claude key" (2026-09-16c) — a subtle per-message badge
   confirming a reply was answered by the visitor's OWN Anthropic key,
   not the site's shared Groq key. Deliberately quiet (small, muted, no
   background) since it's a confirmation for a visitor who opted in, not
   a promotional element. */
.ai-provider-badge {
  margin-top: 9px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-faint); text-transform: uppercase;
}
.check-line { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 7px; }
.check-line svg { flex-shrink: 0; margin-top: 2px; }
.check-line span { font-size: 13.5px; }
.rewrite-card { border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 13px; background: var(--bg-page); margin-top: 14px; }
.q-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.q-card { border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 13px; background: var(--bg-page); display: flex; gap: 11px; }
.q-num {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(255,122,69,0.16); color: var(--accent-light);
  font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.q-title { font-weight: 700; font-size: 13.5px; }
.q-tip { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.interview-answer {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: rgba(var(--tint-rgb), 0.04); border: 1px solid rgba(var(--tint-rgb), 0.08);
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.55;
}

.cover-letter-card {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 16px;
  background: var(--bg-page); margin-top: 14px;
}
.cover-letter-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cover-letter-body { display: flex; flex-direction: column; gap: 12px; }
.cover-letter-para { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }
.cover-letter-signoff { color: var(--text-primary); font-weight: 600; margin-top: 4px; }
.letter-card {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 16px; background: var(--bg-page);
  margin-top: 12px; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary);
}

.jobboard-thread { gap: 0; }
.jobboard-search-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.jobboard-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(var(--tint-rgb), 0.14);
  border-radius: 10px; padding: 10px 13px; background: var(--bg-surface);
}
.jobboard-search input {
  flex: 1; border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 13.5px; color: var(--text-primary);
}
.jobboard-search input::placeholder { color: var(--text-faint); }
/* 2026-09-16b: the "Filters" toggle button that shows/hides
   #jbFiltersPanel — see the redesign note in app-shell.php. Kept visually
   consistent with .jobboard-search (same height/border/radius) so the two
   sit together as one control row rather than looking like mismatched
   widgets. */
.jobboard-filters-toggle {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid rgba(var(--tint-rgb), 0.14);
  border-radius: 10px; padding: 10px 13px; background: var(--bg-surface); color: var(--text-secondary);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s;
}
.jobboard-filters-toggle:hover { border-color: rgba(var(--tint-rgb), 0.26); }
.jobboard-filters-toggle.active { border-color: var(--accent); color: var(--accent-light); }
.jobboard-filters-badge {
  background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; border-radius: 999px;
  min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center;
}
/* The grouped, labeled filter panel toggled by .jobboard-filters-toggle —
   replaces what used to be several always-visible chip rows stacked
   directly under the search box (cluttered/inconsistent wrapping on a
   real page, per user report). Each group only renders when it has
   something to show (see jbChipRow()'s group-hiding logic in script.js). */
.jobboard-filters-panel {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 14px;
  margin-bottom: 14px; background: var(--bg-surface); display: flex; flex-direction: column; gap: 14px;
}
.jobboard-filter-group:last-child { margin-bottom: 0; }
.jobboard-filter-label {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px;
}
.jobboard-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.jobboard-filters .ob-chip { padding: 6px 12px; font-size: 12.5px; }
.jobboard-toggle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jobboard-more { align-self: center; margin: 6px auto 0; }
.jobboard-count { font-size: 12px; color: var(--text-muted); margin: 2px 0 12px; }
.jobboard-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 4px 0 10px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(var(--tint-rgb), 0.1);
}
#jbExternalSection { margin-bottom: 18px; padding-bottom: 6px; border-bottom: 1px solid rgba(var(--tint-rgb), 0.08); }
.jobboard-ext-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin: 4px 0 10px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(var(--tint-rgb), 0.1);
}
.jobboard-ext-header .jobboard-section-title { margin: 0; padding: 0; border: none; }
.jobboard-ext-filter {
  display: flex; align-items: center; gap: 7px; border: 1px solid rgba(var(--tint-rgb), 0.14);
  border-radius: 8px; padding: 6px 10px; background: var(--bg-surface); flex-shrink: 0;
}
.jobboard-ext-filter input {
  border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 12.5px; color: var(--text-primary); width: 170px; max-width: 42vw;
}
.jobboard-ext-filter input::placeholder { color: var(--text-faint); }
.jobboard-ext-empty { font-size: 12.5px; color: var(--text-muted); padding: 10px 2px; }
/* "Page X of Y" + Previous/Next for the Jooble block (2026-09-18) — see
   renderJobBoardExternalPager() in script.js. */
.jobboard-ext-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 12px 0 2px;
}
.jobboard-ext-page-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-primary);
  border: 1px solid rgba(var(--tint-rgb), 0.16); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s;
}
.jobboard-ext-page-btn:hover:not(:disabled) { background: rgba(var(--tint-rgb), 0.07); border-color: rgba(var(--tint-rgb), 0.24); }
.jobboard-ext-page-btn:disabled { opacity: .4; cursor: default; }
.jobboard-ext-page-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
/* 2026-09-16: lets a visitor browse another supported country's Jooble
   feed for just this section, without touching their own saved account
   country (api/set_country.php is untouched by this control — see
   api/browse_jobs.php's extCountry param). Styled to match
   .jobboard-ext-filter rather than a bare native <select>. */
.jobboard-ext-country {
  border: 1px solid rgba(var(--tint-rgb), 0.14); border-radius: 8px; padding: 6px 10px;
  background: var(--bg-surface); color: var(--text-primary); font-family: inherit;
  font-size: 12.5px; flex-shrink: 0; max-width: 42vw;
}
/* 2026-09-18b: location/radius/salary Jooble filters — folded into the
   SAME #jbFiltersPanel/#jbFiltersToggle as the itravail-postings filters
   (previously a second "More filters" button next to the Jooble section,
   which read as two separate, unexplained filter systems — reported
   directly by the site owner). Same input look as .jobboard-ext-country/
   .jobboard-ext-filter, full-width inside their own .jobboard-filter-group
   row. */
.jobboard-ext-location-input, .jobboard-ext-salary-input {
  border: 1px solid rgba(var(--tint-rgb), 0.14); border-radius: 8px; padding: 8px 11px;
  background: var(--bg-page); color: var(--text-primary); font-family: inherit;
  font-size: 13px; width: 100%; box-sizing: border-box;
}
.jobboard-ext-location-input::placeholder, .jobboard-ext-salary-input::placeholder { color: var(--text-faint); }
/* Radius as a STEPPED slider (2026-09-18b), not a free range — Jooble only
   accepts 7 exact km values (see api/job_sources.php), so the slider has 8
   fixed stop positions ("Any distance" + the 7 values) and always snaps to
   one, same UX pattern as a price-range slider on a listings site. The
   current stop's label is shown next to it (#jbExtRadiusValue), kept in
   sync by updateJbExtRadiusDisplay() in script.js. */
.jobboard-ext-radius-row { display: flex; align-items: center; gap: 12px; }
.jobboard-ext-radius-slider {
  flex: 1; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 999px;
  background: rgba(var(--tint-rgb), 0.16); outline: none; cursor: pointer;
}
.jobboard-ext-radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px rgba(var(--tint-rgb), 0.2);
}
.jobboard-ext-radius-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 2px solid var(--bg-surface); box-shadow: 0 0 0 1px rgba(var(--tint-rgb), 0.2);
}
.jobboard-ext-radius-value {
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary); white-space: nowrap;
  min-width: 84px; text-align: right;
}
[dir="rtl"] .jobboard-ext-radius-value { text-align: left; }
/* Toggle chips (Remote only / Salary listed) — same base look as .ob-chip
   facet chips but never come from a facets response, so they get their
   own class to make clear in the DOM they're client-side-only switches,
   not server-driven filter values. */
.jobboard-toggle-chip { cursor: pointer; }
/* Sort switch (Featured/Newest), 2026-09-16b redesign: a real two-way
   segmented control (single pill background, sliding active state)
   instead of two separate .ob-chip pills divided by a bare vertical line
   — reads immediately as "pick one of two", where two identical-looking
   chips did not. */
.jobboard-sort {
  display: inline-flex; align-items: center; gap: 2px; background: var(--bg-page);
  border: 1px solid rgba(var(--tint-rgb), 0.14); border-radius: 999px; padding: 3px; flex-shrink: 0;
}
.jobboard-sort-seg {
  border: none; background: transparent; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s;
}
.jobboard-sort-seg.selected { background: var(--accent); color: var(--accent-ink); }

/* 2026-09-17: tappable suggested answers under a plain clarifying
   question (CV Review / Interview Prep / Cover Letter) — see
   quickReplyChipsBlock() in script.js. Styled as accent-tinted pill
   buttons (distinct from .job-tag's plain neutral labels above/below,
   which are read-only) so they visibly read as clickable. */
.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-reply-chip {
  font-size: 12.5px; font-weight: 600; color: var(--accent-light);
  background: rgba(255,122,69,0.08); border: 1px solid rgba(255,122,69,0.28);
  padding: 6px 13px; border-radius: 20px; cursor: pointer; transition: background .15s, border-color .15s;
}
.quick-reply-chip:hover { background: rgba(255,122,69,0.16); border-color: rgba(255,122,69,0.4); }

.job-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.job-card { border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 14px; background: var(--bg-page); transition: border-color .15s; }
.job-card:hover { border-color: rgba(var(--tint-rgb), 0.2); }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-title { font-weight: 700; font-size: 13.5px; }
.job-company { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.match-badge { background: rgba(74,222,128,0.14); color: #4ade80; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; flex-shrink: 0; white-space: nowrap; }
.job-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.job-tag { font-size: 11px; color: var(--text-muted); border: 1px solid rgba(var(--tint-rgb), 0.12); padding: 2px 8px; border-radius: 20px; }
.job-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; }
.job-salary { font-size: 12.5px; color: var(--text-muted); }

.ad-inline {
  border: 1px dashed rgba(var(--tint-rgb), 0.14); border-radius: 12px; padding: 12px 14px;
  background: var(--bg-page); position: relative;
  box-sizing: border-box; max-width: 100%; overflow: hidden;
}
.ad-inline .ad-tag { position: absolute; top: 10px; right: 12px; left: auto; }
.ad-inline .ad-inner { min-height: 80px; }
.ad-box {
  border: 1px dashed rgba(var(--tint-rgb), 0.14); border-radius: 10px; background: var(--bg-page); padding: 10px; position: relative;
  box-sizing: border-box; max-width: 100%; overflow: hidden;
}
.ad-tag { position: absolute; top: 8px; left: 10px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; color: var(--text-faint); text-transform: uppercase; z-index: 1; }
/* min-height (not height) — every ad here is data-ad-format="auto" +
   data-full-width-responsive="true", meaning Google's own script decides
   the <ins>'s actual rendered height AFTER it sees the real available
   width, and that computed height genuinely differs by device (a
   responsive unit is often much taller on a narrow phone than on a wide
   desktop). A fixed `height` fought that: on any viewport where the real
   ad needed more room than the fixed value, the ad either got visibly
   clipped or spilled out past the dashed placeholder box — reported by
   the user as "ads aren't responsive" (2026-09-15). `min-height` keeps the
   nice, non-collapsing placeholder box before an ad has loaded / when none
   fills, while letting the box grow to whatever height the ad actually
   renders at on that device. */
.ad-inner { min-height: 90px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; max-width: 100%; overflow: hidden; }
/* The flex column layout above centers children on the cross (horizontal) axis,
   which shrinks a width:auto child to its content size — for an empty <ins>
   that's 0, so AdSense's own script sees availableWidth=0 and refuses to
   serve ("No slot size for availableWidth=0"), on EVERY ad slot on the site
   (they all sit inside .ad-inner). Forcing the ins itself to full width fixes
   this without touching the centering of the "Sponsorisé" label. */
.ad-inner .adsbygoogle { width: 100%; max-width: 100%; }
/* 2026-09-16 fix: a screenshot showed the ad creative touching the phone's
   screen edges with the dashed border/"Ad" label nowhere to be seen, and a
   large blank gap left below it — the ad's own iframe (sized by Google's
   script, which we don't control) was rendering wider/taller than the
   ad-box/ad-inner frame around it and visually spilling out past it, since
   nothing here was clipping an oversized child to the frame's bounds.
   `overflow:hidden` + `max-width:100%` on the box/inner and on the iframe
   itself forces any ad creative to be visually contained within its
   intended dashed frame, whatever pixel size Google's script decides to
   render it at. NOTE: if what was actually seen is a *separate* Google
   Auto Ads / in-page ad unit that Google injects directly into the page
   outside these containers entirely (not one of our five manual <ins>
   slots), this CSS has no effect on it — that can only be turned off from
   the AdSense account dashboard (Ads → Auto ads), same as the anchor-ad
   issue found 2026-09-15. */
.ad-box iframe, .ad-inline iframe, .ad-inner iframe { max-width: 100% !important; }
.ad-title { font-size: 12.5px; font-weight: 600; color: var(--text-faint); }
.ad-sub { font-size: 11px; color: var(--text-faint); }

.input-wrap { width: 100%; display: flex; justify-content: center; padding: 0 24px 20px; flex-shrink: 0; }
.input-inner { width: 100%; max-width: 760px; }
.input-box {
  display: flex; align-items: flex-end; gap: 10px; border: 1px solid rgba(var(--tint-rgb), 0.16);
  border-radius: 18px; background: var(--bg-surface); padding: 11px 12px 11px 16px; cursor: text;
}
.input-field {
  flex: 1; border: none; outline: none; background: transparent; resize: none;
  font-family: inherit; font-size: 14px; line-height: 1.4; color: var(--text-primary);
  padding: 0; padding-bottom: 1px; max-height: 160px;
}
.input-field::placeholder { color: var(--text-faint); }
.input-field:disabled { cursor: not-allowed; }
.input-box.disabled { opacity: .55; }
.send-btn {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex-shrink: 0; transition: filter .15s, opacity .15s;
}
.send-btn:hover { filter: brightness(1.1); }
.send-btn.busy { pointer-events: none; opacity: .5; }
.disclaimer { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 9px; }
.disclaimer.locked-hint { color: var(--accent-link); font-weight: 600; text-decoration: underline; }

.attach-btn {
  background: none; border: none; padding: 0; margin: 0 0 1px; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0; display: flex; transition: color .15s;
}
.attach-btn:hover { color: var(--text-primary); }
.input-box.disabled .attach-btn { cursor: not-allowed; pointer-events: none; }

/* Voice input (2026-09-17) — free browser speech-to-text, same visual
   weight/placement as .attach-btn, mirrored to the other side of the
   textarea (right before the send button). */
.mic-btn {
  background: none; border: none; padding: 0; margin: 0 0 1px; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0; display: flex; transition: color .15s;
}
.mic-btn:hover { color: var(--text-primary); }
.input-box.disabled .mic-btn { cursor: not-allowed; pointer-events: none; }
.mic-btn.listening { color: #ff4d4d; animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Voice-input visual overlay (2026-09-17b) — covers just .chatarea (see
   position: relative added there) while the mic is listening; the
   composer bar below (.input-wrap, with the mic/send buttons) is a
   sibling OUTSIDE .chatarea and stays fully visible/usable underneath. */
.voice-overlay {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  background: var(--bg-page); animation: voice-fade-in .25s ease;
}
@keyframes voice-fade-in { from { opacity: 0; } to { opacity: 1; } }
.voice-canvas { width: 100%; max-width: 520px; height: 260px; }
.voice-caption { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .01em; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--bg-surface);
  border: 1px solid rgba(var(--tint-rgb), 0.14); border-radius: 9px; padding: 6px 10px;
  margin-bottom: 8px; font-size: 12.5px; color: var(--text-secondary);
}
.attach-chip button {
  background: none; border: none; color: var(--text-muted); font-size: 15px; line-height: 1; cursor: pointer;
  padding: 0 0 0 4px; margin: 0;
}
.attach-chip button:hover { color: var(--text-primary); }

.bubble.ai.typing { display: flex; align-items: center; gap: 7px; padding: 16px; }
.bubble.ai.typing .typing-label { font-size: 12.5px; color: var(--text-muted); }
.bubble.ai.typing .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: itDotBlink 1.2s infinite; }
.bubble.ai.typing .dot:nth-child(3) { animation-delay: .2s; }
.bubble.ai.typing .dot:nth-child(4) { animation-delay: .4s; }
@keyframes itDotBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.bubble.ai.error { border-color: rgba(248,113,113,0.3); color: #f87171; }

/* Light Markdown rendering inside AI reply bubbles (headings, bullet
   lists, bold/italic, dividers) so long answers stay readable instead of
   showing raw ##/**/-- symbols. */
.bubble.ai .msg-line { margin: 0 0 2px; }
.bubble.ai .msg-gap { height: 10px; }
.bubble.ai .msg-heading { font-weight: 700; font-size: 14.5px; margin: 12px 0 6px; }
.bubble.ai .msg-heading:first-child { margin-top: 0; }
.bubble.ai .msg-list { margin: 4px 0 8px; padding-left: 20px; }
.bubble.ai .msg-list li { margin-bottom: 4px; }
.bubble.ai .msg-hr { border: none; border-top: 1px solid rgba(var(--tint-rgb), 0.12); margin: 12px 0; }
[dir="rtl"] .bubble.ai .msg-list { padding-left: 0; padding-right: 20px; }
/* Real links inside an AI reply (2026-09-16d) — mainly job postings Claude
   found via its web_search tool (BYOK only, see api/chat.php) and wrote
   directly into its prose as Markdown/bare-URL links, since those aren't
   part of the CANDIDATES index list that jobCardsBlock() renders as cards. */
.bubble.ai a { color: var(--accent); text-decoration: underline; word-break: break-word; }
.bubble.ai a:hover { text-decoration: none; }

/* ---------- overlays ---------- */
.overlay {
  position: absolute; inset: 0; background: var(--modal-backdrop); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 32px;
}
.overlay-card {
  width: 100%; background: var(--bg-surface); border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 18px;
  padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  /* Safety net: nothing inside a modal card (the account overlay's tab
     strip, in particular — see .account-tabs below) should ever be able to
     widen the card itself and make the WHOLE overlay pan sideways when a
     hidden-overflow child is focused/clicked. Any row that can outgrow a
     narrow card handles its own horizontal scrolling instead. */
  overflow-x: hidden;
}
.jd-card { max-width: 600px; max-height: 100%; overflow-y: auto; padding: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; margin-bottom: 18px; }
.back-link:hover { color: var(--text-primary); }
.jd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jd-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.jd-meta { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
.jd-tags { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.jd-salary { font-size: 13.5px; color: var(--text-secondary); font-weight: 600; margin-top: 14px; }
.jd-body { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.jd-list { display: flex; flex-direction: column; gap: 7px; }
.jd-list-item { display: flex; gap: 8px; align-items: flex-start; }
.jd-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); margin-top: 7px; flex-shrink: 0; }
.jd-list-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.jd-actions { display: flex; gap: 10px; margin-top: 14px; }

.ad-card { max-width: 440px; }
.ad-gate-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; margin-top: 4px; }
.progress-track { height: 4px; background: rgba(var(--tint-rgb), 0.08); border-radius: 3px; margin-top: 16px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; width: 0%; transition: width 1s linear; }
.ad-wait {
  text-align: center; margin-top: 16px; background: rgba(var(--tint-rgb), 0.06); color: var(--text-muted);
  font-weight: 700; font-size: 13.5px; border-radius: 10px; padding: 12px; cursor: not-allowed;
}
.ad-continue { display: block; width: 100%; text-align: center; margin-top: 16px; padding: 12px; border-radius: 10px; font-size: 13.5px; }

/* ---------- SEO landing page (index.php, before the onboarding quiz) ---------- */
.landing { max-width: 880px; margin: 0 auto; padding: 28px 24px 60px; }
/* flex-wrap here (not on .landing-lang-nav) so that on a very narrow screen
   the whole nav row drops to its own line below the brand instead of the
   4 language links themselves wrapping mid-row and colliding with the
   brand's subtitle text — see the 480px block below for the full fix. */
.landing-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 10px; margin-bottom: 48px; }
.landing-lang-nav { display: flex; flex-wrap: nowrap; gap: 4px; }
.landing-lang-nav a {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted); padding: 6px 10px; border-radius: 7px;
  border: 1px solid rgba(var(--tint-rgb), 0.1); transition: color .15s, border-color .15s;
}
.landing-lang-nav a:hover { color: var(--text-primary); border-color: rgba(var(--tint-rgb), 0.22); }
.landing-lang-nav a.active { color: var(--accent); border-color: rgba(255,122,69,0.35); background: rgba(255,122,69,0.08); }
.landing-hero { text-align: center; padding: 20px 0 36px; }
.landing-h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 16px; }
.landing-sub { font-size: 16px; color: var(--text-muted); line-height: 1.6; max-width: 620px; margin: 0 auto 28px; }
.landing-cta { font-size: 15px; padding: 13px 26px; border-radius: 11px; }
.landing-cta-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 12px; }
.landing-ad { max-width: 640px; margin: 28px auto; }
.landing-features { margin: 44px 0; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.landing-feature-card { border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 14px; padding: 20px; background: var(--bg-surface); }
.landing-feature-title { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.landing-feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.landing-powered { text-align: center; margin: 48px 0; padding: 28px; border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 16px; background: var(--bg-surface); }
.landing-powered-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-light); background: rgba(255,122,69,0.12); border-radius: 20px; padding: 5px 14px; margin-bottom: 10px;
}
.landing-powered-body { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; max-width: 480px; margin: 0 auto; }
.landing-faq { margin: 44px 0; }
.landing-faq-item {
  border: 1px solid rgba(var(--tint-rgb), 0.1); border-radius: 12px; padding: 4px 18px; margin-top: 10px; background: var(--bg-surface);
}
.landing-faq-item summary { padding: 14px 0; font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.landing-faq-item summary::-webkit-details-marker { display: none; }
.landing-faq-item summary::after { content: '+'; float: right; color: var(--text-faint); font-weight: 400; }
.landing-faq-item[open] summary::after { content: '−'; }
.landing-faq-item p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0 0 16px; }
[dir="rtl"] .landing-faq-item summary::after { float: left; }
.landing-footer { text-align: center; margin-top: 52px; padding-top: 32px; border-top: 1px solid rgba(var(--tint-rgb), 0.08); }
.landing-footnote { font-size: 11px; color: var(--text-faint); margin-top: 16px; max-width: 480px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .landing-h1 { font-size: 28px; }
  .landing-feature-grid { grid-template-columns: 1fr; }
}

/* ---------- mobile sidebar toggle ---------- */
/* Hidden on desktop (the sidebar is always visible there, see .app above).
   On mobile (see the max-width:860px block below) the sidebar is
   display:none by default and only appears once .app gets the
   "sidebar-open" class — this button (wired in script.js) is what
   actually toggles that class; without it there was no way to open the
   sidebar at all on a small screen. */
.mobile-menu-btn {
  display: none; position: absolute; top: 14px; left: 14px; z-index: 65;
  width: 38px; height: 38px; align-items: center; justify-content: center;
  background: var(--bg-surface); border: 1px solid rgba(var(--tint-rgb), 0.12); border-radius: 9px;
  color: var(--text-primary); cursor: pointer;
}
.mobile-menu-btn:hover { background: rgba(var(--tint-rgb), 0.08); }
.sidebar-backdrop {
  display: none; position: absolute; inset: 0; z-index: 65; background: rgba(0,0,0,0.5);
}
.app.sidebar-open .sidebar-backdrop { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sidebar { display: none; }
  /* Widened alongside the desktop sidebar above (240px -> 280px) — still
     comfortably narrower than a typical phone screen so the backdrop stays
     visible/tappable to close it. */
  .app.sidebar-open .sidebar { display: flex; position: absolute; inset: 0 auto 0 0; z-index: 70; width: 280px; }
  .mobile-menu-btn { display: flex; }
  .chatarea { padding-top: 64px; }
  .sugg-grid { grid-template-columns: 1fr; }
  .ob-wrap { margin-top: 64px; }
  .ob-card { padding: 26px; }
  .jd-card, .ad-card { padding: 20px; }
}
