:root {
  color-scheme: light;
  --ink: #171a1f;
  --muted: #6c706f;
  --paper: #f3f2ed;
  --card: #fffefa;
  --line: #deddd7;
  --accent: #ff5a36;
  --accent-soft: #ffe4db;
  --green: #24765a;
  --green-soft: #dfeee6;
  --nav: rgba(255, 254, 250, .92);
  --shadow: 0 14px 40px rgba(27, 30, 30, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: #d9d8d2; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
body.sheet-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:active { opacity: .72; }
.hidden { display: none !important; }
.visually-hidden { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  background:
    radial-gradient(circle at 110% -5%, rgba(255, 90, 54, .13), transparent 28%),
    var(--paper);
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  padding: max(14px, env(safe-area-inset-top)) 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(243,242,237,.98), rgba(243,242,237,.82));
  backdrop-filter: blur(16px);
}

.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 850; letter-spacing: .11em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 9px; letter-spacing: 0; font: 800 15px/1 Georgia, serif; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: #4c504f; background: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; }
.mode-pill i { width: 7px; height: 7px; background: #e39b19; border-radius: 50%; box-shadow: 0 0 0 3px #faedcf; }

main { padding: 16px 16px calc(106px + env(safe-area-inset-bottom)); }
.app-shell.auth-mode main { padding-bottom: 16px; }
.view { animation: enter .28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }

.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font: 650 clamp(34px, 10vw, 49px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
p { line-height: 1.5; }

.hero { padding: 18px 2px 24px; }
.hero-copy { margin: 15px 0 18px; max-width: 390px; color: var(--muted); font-size: 15px; }
.role-row { display: flex; flex-wrap: wrap; gap: 7px; }
.role-chip { padding: 8px 11px; border: 1px solid #d5d4ce; border-radius: 999px; background: rgba(255,255,255,.45); font-size: 12px; font-weight: 700; }
.role-chip.remote { color: var(--green); border-color: #bcd9cb; background: var(--green-soft); }

.setup-card { margin: 0 0 18px; padding: 17px; display: flex; gap: 13px; align-items: flex-start; border-radius: 17px; border: 1px solid #ecc8bb; background: #fff5ef; }
.setup-card.ready { border-color: #bcd9cb; background: #edf7f1; }
.setup-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: white; font-weight: 850; }
.setup-card.ready .setup-icon { background: var(--green); }
.setup-card strong { display: block; margin: 1px 0 4px; font-size: 14px; }
.setup-card p { margin: 0; color: var(--muted); font-size: 12px; }
.hh-connect-card { margin: 0 0 12px; padding: 16px; display: grid; gap: 14px; border: 1px solid #d7d6d0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.hh-connect-card.connected { border-color: #b2d4c3; background: #edf7f1; }
.hh-connect-copy { display: flex; gap: 12px; align-items: flex-start; }
.hh-logo { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: white; background: #d6001c; font-size: 15px; font-weight: 900; letter-spacing: -.08em; }
.hh-connect-copy strong { display: block; margin: 1px 0 4px; font-size: 14px; }
.hh-connect-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.hh-connect-card > button { min-height: 45px; border: 0; border-radius: 13px; color: white; background: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.hh-connect-card.connected > button { background: var(--green); }
.hh-connect-card > button:disabled { color: #8b8d89; background: #e2e1db; cursor: not-allowed; }
.text-button { min-height: 44px; margin: 9px 0 0; padding: 6px 0; border: 0; color: var(--accent); background: none; font-size: 12px; font-weight: 800; cursor: pointer; }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 24px; }
.metric { min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.metric.accent { color: #fff; border-color: #1f2328; background: #1f2328; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.metric.accent .metric-label { color: #b7bcbf; }
.metric-value { display: block; margin-top: 13px; font: 600 38px/1 Georgia, serif; letter-spacing: -.04em; }
.metric-note { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.metric.accent .metric-note { color: #c5c8ca; }

.section-head { margin: 25px 2px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.section-head button { padding: 0; border: 0; color: var(--accent); background: none; font-size: 12px; font-weight: 750; cursor: pointer; }

.vacancy-list, .resume-list, .settings-list { display: grid; gap: 10px; }
.vacancy-card { display: block; padding: 16px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 8px 24px rgba(25,28,28,.045); }
.vacancy-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.vacancy-card h3 { margin: 0; font-size: 16px; line-height: 1.2; letter-spacing: -.018em; }
.company { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.score { flex: 0 0 auto; min-width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 850; }
.score.low { color: #b13d28; background: var(--accent-soft); }
.vacancy-meta { margin-top: 15px; display: flex; justify-content: space-between; gap: 10px; color: #525655; font-size: 12px; }
.status-tag { padding: 5px 8px; border-radius: 8px; background: #ecebe6; font-weight: 700; }

.page-title { padding: 15px 2px 21px; }
.page-title h1 { font-size: 39px; }
.page-title p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.first-cycle { margin: 4px 0 12px; padding: 10px 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.55); }
.first-cycle ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 4px; list-style: none; }
.first-cycle li { min-width: 0; display: grid; justify-items: center; gap: 4px; color: #6c706f; text-align: center; }
.first-cycle li span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e6e5df; font-size: 12px; font-weight: 850; }
.first-cycle li small { max-width: 100%; font-size: 12px; font-weight: 750; line-height: 1.15; overflow-wrap: anywhere; }
.first-cycle li.done { color: var(--green); }
.first-cycle li.done span { color: white; background: var(--green); }
.first-cycle li.current { color: var(--ink); }
.first-cycle li.current span { color: white; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.resume-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.source-resume-card { margin-bottom: 22px; padding: 17px; border: 1px solid #cddbd4; border-radius: 20px; background: #fbfdfb; box-shadow: 0 10px 30px rgba(25,46,36,.06); }
.source-resume-card.unavailable { border-color: var(--line); background: #f0efea; }
.source-kicker { margin: 0 0 5px; color: var(--green); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.source-resume-card h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.source-resume-card p:not(.source-kicker) { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.source-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.source-primary { width: 100%; min-height: 46px; margin-top: 15px; border: 0; border-radius: 13px; color: white; background: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.source-refresh { max-width: 145px; padding: 7px 0; border: 0; color: var(--green); background: transparent; text-align: right; font-size: 11px; font-weight: 800; cursor: pointer; }
.source-primary:disabled, .source-refresh:disabled, .source-resume-option button:disabled { opacity: .55; cursor: wait; }
.selected-source { margin-top: 14px; padding: 12px; display: grid; gap: 4px; border-radius: 13px; color: #185b46; background: var(--green-soft); }
.selected-source span { font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.selected-source strong { font-size: 14px; }
.selected-source small { color: var(--muted); font-size: 12px; }
.source-hint { padding: 11px; border-radius: 12px; background: #f0efea; }
.source-resume-options { margin-top: 13px; display: grid; gap: 8px; }
.source-resume-option { min-height: 64px; padding: 11px 11px 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.source-resume-option.selected { border-color: #91baa8; background: #f4faf7; }
.source-resume-option div { min-width: 0; }
.source-resume-option strong, .source-resume-option span { display: block; }
.source-resume-option strong { overflow-wrap: anywhere; font-size: 13px; }
.source-resume-option span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.source-resume-option button { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: white; background: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.source-resume-option button:disabled { color: var(--green); background: var(--green-soft); }
.resume-head { display: flex; align-items: center; gap: 12px; }
.resume-index { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #ecebe6; font: 650 18px/1 Georgia, serif; }
.resume-card h3 { margin: 0 0 4px; font-size: 15px; }
.resume-state { color: var(--muted); font-size: 12px; }
.resume-score { margin-left: auto; color: var(--green); font-size: 13px; font-weight: 800; }
.resume-progress { width: 100%; height: 5px; margin-top: 15px; display: block; border: 0; border-radius: 6px; background: #e9e8e2; overflow: hidden; appearance: none; }
.resume-progress::-webkit-progress-bar { background: #e9e8e2; }
.resume-progress::-webkit-progress-value { background: var(--green); border-radius: 6px; }
.resume-progress::-moz-progress-bar { background: var(--green); border-radius: 6px; }
.resume-variants { display: grid; gap: 16px; margin-bottom: 24px; }
.resume-variant-card { padding: 16px; border: 1px solid #cddbd4; border-radius: 20px; background: #fbfdfb; box-shadow: 0 10px 30px rgba(25,46,36,.06); }
.variant-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.variant-head span { color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.variant-head h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.15; }
.variant-head > strong { padding: 7px 9px; border-radius: 10px; color: var(--green); background: #e8f2ed; font-size: 13px; }
.hr-funnel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; margin-top: 14px; }
.hr-funnel span { min-width: 0; padding: 8px 4px; border-radius: 10px; text-align: center; background: #eef1ed; }
.hr-funnel small { min-height: 25px; display: block; color: var(--muted); font-size: 12px; line-height: 1.25; }
.hr-funnel strong { display: block; margin-top: 3px; font-size: 14px; }
.hr-disclaimer, .resume-review-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.resume-claims { display: grid; gap: 10px; margin-top: 16px; }
.resume-claim { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.resume-claim.removed { opacity: .58; background: #f2f1ed; }
.claim-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.claim-badge { padding: 4px 6px; border-radius: 6px; color: #76500b; background: #fff0c4; font-weight: 800; }
.claim-badge.imported { color: #1f6550; background: #e1f1e9; }
.claim-badge.market_example { color: #8c352c; background: #ffe4df; }
.resume-claim textarea { width: 100%; min-height: 78px; padding: 10px; resize: vertical; border: 1px solid #cfcec8; border-radius: 10px; color: var(--ink); background: white; font: inherit; font-size: 13px; line-height: 1.4; }
.resume-claim textarea:focus { outline: 2px solid #b9dacb; border-color: var(--green); }
.resume-claim textarea:disabled { color: var(--muted); background: transparent; }
.claim-basis { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.claim-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.claim-actions button { min-height: 44px; border: 1px solid #cac9c3; border-radius: 10px; color: var(--ink); background: #f5f4ef; font-size: 11px; font-weight: 800; cursor: pointer; }
.claim-actions button:first-child { color: white; border-color: var(--green); background: var(--green); }
.claim-actions button.remove { grid-column: 1/-1; color: #a22b23; border-color: #dfb7b2; background: #fff6f4; }
.claim-removed { margin: 7px 0 0; color: #a22b23; font-size: 11px; font-weight: 750; }
.frozen-resume { margin-top: 16px; padding: 12px; border-radius: 12px; background: #e8f2ed; }
.frozen-resume strong { color: var(--green); font-size: 12px; }
.frozen-resume pre { margin: 9px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.5; }
.resume-promotion { margin-top: 12px; display: grid; gap: 8px; }
.resume-promotion label { color: var(--ink); font-size: 12px; font-weight: 800; }
.resume-promotion select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #c8c9c3; border-radius: 11px; color: var(--ink); background: white; font: inherit; font-size: 12px; }
.resume-promotion select:focus { outline: 2px solid #b9dacb; border-color: var(--green); }
.resume-promotion button { min-height: 46px; border: 0; border-radius: 11px; color: white; background: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.resume-promotion button:disabled { opacity: .55; cursor: wait; }
.resume-promotion small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.resume-promotion-success { margin-top: 12px; padding: 12px; display: grid; gap: 4px; border-radius: 12px; color: #185b46; background: var(--green-soft); }
.resume-promotion-success strong { font-size: 12px; }
.resume-promotion-success span { font-size: 11px; }
.market-resume-button { width: 100%; min-height: 44px; margin-top: 12px; border: 0; border-radius: 11px; color: white; background: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.market-resume-button:disabled { color: #8b8d89; background: #e2e1db; cursor: not-allowed; }

.setting-card { padding: 15px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.setting-copy { flex: 1; min-width: 0; }
.setting-copy strong { display: block; font-size: 14px; }
.setting-copy span { color: var(--muted); font-size: 11px; }
.stepper { flex-shrink: 0; display: flex; align-items: center; border: 1px solid #d6d5cf; border-radius: 12px; overflow: hidden; }
.stepper button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; background: #f5f4ef; color: var(--ink); font-size: 20px; cursor: pointer; }
.stepper output { min-width: 42px; text-align: center; font-size: 13px; font-weight: 800; }
.stepper button:disabled { color: #b8b8b3; }
.settings-note { margin: 15px 2px; padding: 14px; border-radius: 14px; color: #5d5f5d; background: #e8e7e1; font-size: 12px; }
.settings-heading { margin-top: 25px; }
.criteria-card { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.criteria-card > label:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; }
.criteria-card > label:first-child span { color: var(--muted); font-size: 12px; font-weight: 500; text-align: right; }
.criteria-card textarea { width: 100%; min-height: 112px; margin: 10px 0 14px; padding: 12px; resize: vertical; border: 1px solid #d6d5cf; border-radius: 12px; color: var(--ink); background: #faf9f5; font-family: inherit; font-size: 14px; line-height: 1.45; }
.criteria-card textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 12px; }
.field { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.field.wide { margin-top: 13px; }
.field input, .field select { width: 100%; min-width: 0; height: 44px; padding: 0 10px; border: 1px solid #d6d5cf; border-radius: 11px; color: var(--ink); background: #faf9f5; font-family: inherit; font-size: 13px; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.filter-group { margin-top: 9px; border: 1px solid #d6d5cf; border-radius: 12px; background: #faf9f5; overflow: hidden; }
.filter-group summary { min-height: 45px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary b { color: var(--muted); font-size: 12px; font-weight: 600; }
.filter-options { max-height: 230px; padding: 4px 10px 10px; display: grid; gap: 2px; overflow: auto; border-top: 1px solid #e3e2dc; }
.check-option { min-height: 38px; display: flex; align-items: center; gap: 9px; color: #414543; font-size: 12px; font-weight: 600; }
.check-option input { width: 18px; height: 18px; accent-color: var(--green); }
.catalog-warning { margin: 3px 0 12px; padding: 12px; border-radius: 11px; color: #72591d; background: #fff0c9; font-size: 11px; line-height: 1.45; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 13px; }
.toggle-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i { flex: 0 0 auto; width: 46px; height: 27px; padding: 3px; border-radius: 999px; background: #cfcec8; transition: .18s ease; }
.toggle-row i::after { content: ""; display: block; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .18s ease; }
.toggle-row input:checked + i { background: var(--green); }
.toggle-row input:checked + i::after { transform: translateX(19px); }
.toggle-row input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.save-button { width: 100%; min-height: 46px; margin-top: 16px; border: 0; border-radius: 13px; color: white; background: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.save-button:disabled { opacity: .55; cursor: wait; }

.empty-card { padding: 27px 18px; text-align: center; border: 1px dashed #cfcec7; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.35); }
.empty-card strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); padding: 8px 8px max(8px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(207,206,199,.82); background: var(--nav); backdrop-filter: blur(18px); }
.bottom-nav.five { grid-template-columns: repeat(5, 1fr); }
.market-form, .market-summary { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.market-form > label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 800; }
.market-form small, .hypothesis-card small, .market-result-card small, .market-vacancy small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.market-form textarea { width: 100%; padding: 12px; resize: vertical; border: 1px solid #d6d5cf; border-radius: 12px; background: #faf9f5; font: inherit; font-size: 14px; }
.market-formats { margin: 4px 0 14px; padding: 0; border: 0; }
.market-formats legend { margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.market-formats legend small { margin-top: 3px; }
.market-formats > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.market-formats label { min-height: 44px; padding: 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: #faf9f5; font-size: 11px; font-weight: 700; cursor: pointer; }
.market-formats input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: var(--green); }
.market-format-fallback { margin: 4px 0 14px; padding: 10px; border-radius: 10px; color: var(--muted); background: #f0efea; font-size: 11px; }
.market-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.hypothesis-list, .market-vacancies { display: grid; gap: 10px; }
.hypothesis-card { padding: 15px; display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); cursor: pointer; }
.hypothesis-card input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--green); }
.hypothesis-card strong, .hypothesis-card small, .hypothesis-card i { display: block; }
.hypothesis-card small { margin-top: 5px; line-height: 1.45; }
.hypothesis-card i { margin-top: 8px; color: var(--green); font-size: 12px; font-style: normal; font-weight: 700; }
.market-summary p { color: var(--muted); font-size: 13px; }
.market-progress { padding: 14px; border-radius: 14px; background: #e8e7e1; }
.market-progress span { height: 5px; display: block; border-radius: 9px; background: var(--green); }
.market-progress.working span { background: linear-gradient(90deg,var(--green),#80bca6,var(--green)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.market-progress small { display: block; margin-top: 8px; color: var(--muted); }
.market-result-card, .market-vacancy { padding: 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--card); text-decoration: none; }
.market-vacancy, .market-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.market-result-card b, .market-vacancy b { flex: 0 0 auto; color: var(--green); font-size: 13px; }
.market-result-card.public p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.benchmark-metrics, .benchmark-salary { display: grid; gap: 7px; margin-top: 12px; }
.benchmark-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.benchmark-salary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.benchmark-metrics span, .benchmark-salary span { min-width: 0; padding: 9px; border-radius: 11px; background: #f2f2ed; }
.benchmark-metrics small, .benchmark-salary small { display: block; min-height: 26px; color: var(--muted); font-size: 12px; line-height: 1.25; }
.benchmark-metrics strong, .benchmark-salary strong { display: block; margin-top: 4px; font-size: 13px; }
.benchmark-details { margin-top: 11px; border-top: 1px solid var(--line); }
.benchmark-details summary { padding: 12px 0 1px; display: flex; justify-content: space-between; gap: 10px; color: var(--green); font-size: 12px; font-weight: 750; cursor: pointer; }
.benchmark-details summary span { color: var(--muted); font-size: 12px; font-weight: 600; }
.benchmark-list { margin-top: 12px; }
.benchmark-list > strong { font-size: 11px; }
.benchmark-list ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.benchmark-list li + li { margin-top: 5px; }
.nav-item { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 13px; color: #646864; background: transparent; cursor: pointer; }
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.nav-item span { font-size: 11px; font-weight: 700; }
.nav-item.active { color: var(--ink); background: #e9e8e2; }

.auth-screen { min-height: calc(100dvh - 98px); padding: 35px 5px; display: flex; flex-direction: column; justify-content: center; }
.auth-art { width: 90px; height: 90px; margin-bottom: 35px; position: relative; display: grid; place-items: center; border-radius: 28px; color: white; background: var(--accent); transform: rotate(-6deg); box-shadow: 18px 18px 0 #22262b; }
.auth-art span { font: 650 42px/1 Georgia, serif; transform: rotate(6deg); }
.auth-screen p:not(.eyebrow) { margin: 20px 0 25px; color: var(--muted); font-size: 15px; }
.primary-button { width: 100%; min-height: 52px; display: grid; place-items: center; border-radius: 15px; color: white; background: var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; }

.loading-screen { padding-top: 18px; }
.skeleton { background: linear-gradient(90deg, #e7e5df 25%, #f1f0eb 50%, #e7e5df 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 18px; }
.skeleton-hero { height: 180px; margin-bottom: 18px; }
.skeleton-metric { height: 118px; }
.skeleton-card { height: 130px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); padding: 11px 14px; border-radius: 12px; color: #fff; background: #24282d; opacity: 0; pointer-events: none; transition: .2s ease; width: max-content; max-width: calc(100vw - 32px); font-size: 13px; line-height: 1.4; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.browser-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(13, 16, 19, .54); backdrop-filter: blur(3px); }
.browser-sheet { position: fixed; z-index: 90; inset: 0 auto 0 50%; transform: translateX(-50%); width: min(520px, 100%); height: 100dvh; padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; overflow-y: auto; background: #f4f3ee; box-shadow: 0 -20px 70px rgba(0,0,0,.25); animation: sheet-enter .24s ease-out both; }
@keyframes sheet-enter { from { opacity: 0; transform: translate(-50%, 24px); } }
.browser-sheet-head { min-height: 43px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.browser-sheet-head strong, .browser-sheet-head span { display: block; }
.browser-sheet-head strong { font-size: 18px; }
.browser-sheet-head span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.browser-sheet-head button { width: 44px; height: 44px; border: 0; border-radius: 12px; color: var(--ink); background: #e4e3dd; font-size: 25px; cursor: pointer; }
.browser-guide { margin: 0; padding: 9px 11px; border-radius: 11px; color: #414542; background: #e7eee9; font-size: 12px; line-height: 1.4; }
.browser-guide.ready { color: #205f49; background: var(--green-soft); }
.browser-frame-wrap { flex: 1 1 auto; min-height: 220px; position: relative; overflow: auto; overscroll-behavior: contain; border: 1px solid #cbc9c2; border-radius: 14px; background: white; touch-action: pan-x pan-y; scrollbar-color: #aaa8a1 transparent; }
.browser-frame-wrap img { width: auto; min-width: 100%; max-width: none; height: auto; display: block; user-select: none; cursor: pointer; }
.browser-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 25px; color: var(--muted); background: #f8f8f6; text-align: center; font-size: 12px; }
.browser-inline-form { position: absolute; z-index: 4; display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 6px; padding: 4px; border: 2px solid var(--green); border-radius: 14px; background: rgba(255, 255, 255, .98); box-shadow: 0 12px 32px rgba(17, 31, 26, .24); touch-action: manipulation; }
.browser-inline-input-wrap { min-width: 0; position: relative; }
.browser-inline-form input { width: 100%; min-width: 0; height: 48px; padding: 0 46px 0 12px; border: 0; border-radius: 9px; color: var(--ink); background: white; font: inherit; font-size: 16px; }
.browser-inline-form input:focus { outline: 3px solid var(--green-soft); }
.browser-inline-form button { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer; }
.browser-inline-reveal { position: absolute; top: 0; right: 0; color: #3f4442; background: transparent; }
.browser-inline-reveal svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.browser-inline-submit { color: white; background: var(--ink); }
.browser-inline-submit:disabled { opacity: .45; cursor: wait; }
.browser-inline-submit svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.browser-sheet-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.danger-text-button { min-height: 44px; padding: 0 12px; border: 1px solid #dfb7b2; border-radius: 11px; color: #a22b23; background: #fff6f4; font-size: 12px; font-weight: 750; cursor: pointer; }
.browser-privacy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }

@media (min-width: 600px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100dvh - 36px); border-radius: 24px; box-shadow: 0 20px 70px rgba(25,28,28,.16); overflow: clip; }
  .bottom-nav { bottom: 18px; border-radius: 0 0 24px 24px; }
  .browser-sheet { inset: 18px auto 18px 50%; height: auto; border-radius: 24px; }
}

@media (max-height: 600px) {
  .browser-frame-wrap { min-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Readable controls and persistent feedback throughout the first resume cycle. */
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.form-error { margin: 14px 0 0; padding: 12px; border-radius: 10px; color: #922b22; background: #fff0ec; font-size: 13px; line-height: 1.45; }
[aria-invalid="true"] { border-color: #a22b23 !important; }
.resume-export-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.resume-export-actions button { min-height: 44px; padding: 8px; border: 1px solid #8bae9e; border-radius: 10px; color: #185b46; background: white; font-size: 13px; font-weight: 750; cursor: pointer; }
.frozen-resume p { margin: 8px 0; color: var(--muted); font-size: 13px; }
.frozen-resume pre { user-select: text; }
.market-run-actions { display: flex; align-items: center; flex-wrap: wrap; column-gap: 14px; row-gap: 6px; margin-bottom: 14px; }
.market-run-actions .save-button { flex: 1 1 100%; }
.catalog-warning .text-button { display: block; }
.source-privacy { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.variant-head > div, .market-result-head > div, .market-vacancy > span, .vacancy-top > div { min-width: 0; overflow-wrap: anywhere; }
.variant-head > strong { flex: 0 0 auto; }
.market-result-card + .market-result-card { margin-top: 10px; }
.market-form textarea, .criteria-card textarea, .resume-claim textarea, .field input, .field select, .resume-promotion select { font-size: 16px; }
@media (max-width: 360px) {
  .benchmark-metrics { grid-template-columns: 1fr; }
  .benchmark-metrics span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .benchmark-metrics small { min-height: 0; }
  .resume-export-actions { grid-template-columns: 1fr; }
  .setting-card { align-items: flex-start; flex-wrap: wrap; }
  .setting-copy { flex: 1 1 100%; min-width: 0; }
  .setting-card .stepper { margin-left: auto; }
}
