/* Stage 1. Google Fonts Onest is served locally, using the website's licensed files. */
@font-face {
  font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/design/fonts/onest-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
@font-face {
  font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/design/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/design/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  /* Legacy UI keeps its IDs and handlers while adopting the shared theme. */
  --btn: var(--acc); --btn-text: #fff; --link: var(--accText); --warn-bg: var(--badBg);
  --app-top: calc(max(env(safe-area-inset-top, 0px), var(--app-safe-top, 0px)) + var(--app-content-top, 0px));
  --app-bottom: max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px), var(--app-content-bottom, 0px));
  --app-left: max(env(safe-area-inset-left, 0px), var(--app-safe-left, 0px), var(--app-content-left, 0px));
  --app-right: max(env(safe-area-inset-right, 0px), var(--app-safe-right, 0px), var(--app-content-right, 0px));
}
html { background: var(--bg); scroll-padding-top: calc(64px + var(--app-top)); }
body {
  margin: 0 auto; max-width: 720px;
  padding: 0 calc(16px + var(--app-right)) calc(32px + var(--app-bottom)) calc(16px + var(--app-left));
  background: var(--bg); color: var(--text); font: 400 15px/1.5 Onest, system-ui, sans-serif;
}
button, input, select, textarea { font-family: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, [role="button"], summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accText); outline-offset: 3px;
}
button:disabled { cursor: default; }
h1, h2, h3, h4, .title, .company { color: var(--ink); }
h1, .ppage > h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.head1 { margin: 20px 0 16px; }
.muted, .small.muted { color: var(--muted); }
.app-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  min-height: calc(60px + var(--app-top)); padding: calc(6px + var(--app-top)) 0 6px;
  background: var(--bg);
}
.app-header-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: center; line-height: 1.3; }
.app-header-brand strong { font-size: 16px; font-weight: 700; color: var(--ink); }
.app-header-brand > span { font-size: 12px; color: var(--muted); }
.header-plus { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-height: 44px; padding: 10px 14px; border: 1px solid var(--accLine); border-radius: 999px; background: var(--accSoft); color: var(--accText); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.header-plus svg { width: 18px; height: 18px; }
@media (max-width: 479px) {
  .app-header { gap: 8px; }
  .app-header-brand strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-header-brand > span { font-size: 10px; }
  .header-plus { padding-inline: 12px; }
}
@media (max-width: 359px) { .app-header-brand { visibility: hidden; } }
html[data-telegram="true"][data-fullscreen="false"] .app-header-brand { visibility: hidden; }
html[data-native-back="true"] .back { display: none; }
.icon-button, #openmenu, #menusheet .drawerhead .x {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.icon-button:hover, #openmenu:hover { background: var(--card2); }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-icon] svg { display: block; flex-shrink: 0; }
.button, .btn, .apply {
  min-height: 52px; border: 1px solid transparent; border-radius: 999px;
  padding: 12px 20px; font: 700 15px/1.4 Onest, system-ui, sans-serif; cursor: pointer;
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button-primary, .btn, .apply { background: var(--grad); color: #fff; }
.button-secondary, .btn.sec, .apply.share, .ghost {
  background: var(--card2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
}
.button:disabled, .btn:disabled, .apply:disabled { background: var(--off); color: var(--text); opacity: 1; }
.linkbtn { min-height: 44px; color: var(--accText); }
.chip, #currencies .chip, #languages .chip, #periods .chip {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card2); color: var(--ink); font-size: 13px; font-weight: 600;
}
.chip[aria-pressed="true"], #currencies .chip[aria-pressed="true"],
#languages .chip[aria-pressed="true"], #periods .chip[aria-pressed="true"] {
  background: var(--acc); border-color: var(--accLine); color: #fff;
}
.chip.is-excluded { background: var(--badBg); border-color: var(--bad); color: var(--bad); }
.chip.is-selected { background: var(--acc); border-color: var(--accLine); color: #fff; }
.toggle-control, label.check { min-height: 48px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle-control input[type="checkbox"], label.check input[type="checkbox"] {
  appearance: none; position: relative; flex: 0 0 42px; width: 42px; height: 26px;
  margin: 0; border: 0; border-radius: 20px; background: var(--off); cursor: pointer;
  transition: background .2s;
}
.toggle-control input[type="checkbox"]::after, label.check input[type="checkbox"]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.toggle-control input:checked, label.check input[type="checkbox"]:checked { background: var(--acc); }
.toggle-control input:checked::after, label.check input[type="checkbox"]:checked::after { transform: translateX(16px); }
.list-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px;
  padding: 12px 14px; border: 0; border-radius: 14px; background: transparent;
  color: var(--ink); text-align: left; font: 600 16px/1.4 Onest, system-ui, sans-serif; cursor: pointer;
}
.list-row-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.list-row-copy strong { font-size: 15px; font-weight: 600; }
.list-row-copy > span { font-size: 13px; color: var(--muted); font-weight: 400; }
.list-row-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accSoft); color: var(--accText); }
.list-row:hover { background: var(--card2); }
.list-row[aria-current="page"] { background: var(--accSoft); }
.card, .pcard, .sheet { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: none; }
.salary { color: var(--good); }
.company-mark { background: var(--card2); color: var(--accText); }
.search input, select, textarea { color: var(--ink); }
.search input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
body:has(dialog[open]) { overflow: hidden; }
dialog.sheetdlg { background: var(--sheet); color: var(--text); border-radius: 24px 24px 0 0; max-height: min(90dvh, calc(100dvh - var(--app-top))); }
dialog.sheetdlg::backdrop, dialog.quality-dialog::backdrop { background: var(--scrim); }
.sheetdlg .body { max-height: min(88dvh, calc(100dvh - var(--app-top) - 24px)); padding: 16px 16px calc(20px + var(--app-bottom)); }
.sheetdlg h3 { color: var(--ink); font-size: 22px; font-weight: 800; }
.sheet-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.sheet-heading h2 { flex: 1; margin: 0; color: var(--ink); font-size: 24px; font-weight: 800; }
.bottom-sheet .button { width: 100%; margin-top: 20px; }
.bottom-sheet .list-row { padding-inline: 0; }
.overlay { background: var(--scrim); }
.modal { background: var(--sheet); color: var(--text); border-radius: 24px 24px 0 0; }
dialog#menusheet {
  width: calc(100% - 32px); max-width: 390px; height: 100dvh; max-height: 100dvh;
  margin: 0 auto 0 0; border-radius: 0 24px 24px 0; background: var(--sheet);
  box-shadow: 8px 0 40px var(--scrim); overflow: hidden;
}
#menusheet .body {
  height: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(22px + var(--app-top)) 16px calc(24px + var(--app-bottom)) calc(16px + var(--app-left));
}
#menusheet .drawerhead {
  position: static; display: flex; align-items: center; gap: 12px; padding: 0;
  margin: 0 0 18px; border: 0; background: transparent;
}
#menusheet .drawerhead img { flex: 0 0 48px; border-radius: 14px; }
#menusheet .drawerhead b { font-size: 22px; line-height: 1.2; letter-spacing: -.035em; font-weight: 800; color: var(--ink); }
.menu-profile {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 12px;
  margin: 0 0 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--ink); cursor: pointer; text-align: left;
}
.menu-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--card2); font-size: 18px; font-weight: 700; }
.menu-profile-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.menu-profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; line-height: 1.3; font-weight: 700; }
.menu-profile-copy > span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.menu-chevron svg { width: 18px; height: 18px; }
.plan-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; min-height: 24px; padding: 2px 8px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; }
.plan-badge svg { width: 13px; height: 13px; }
.menu-sections { display: flex; flex-direction: column; gap: 4px; }
#menusheet .mrow.list-row { display: flex; padding: 12px 14px; font-size: 16px; line-height: 1.4; color: var(--ink); }
#menusheet .mnav { border: 0; margin: 0; }
#menusheet .mnav > summary { font-size: 16px; font-weight: 600; margin: 0; padding: 12px 14px; gap: 14px; }
#menusheet .mnav > summary .caret { margin-left: auto; color: var(--ink); }
#menusheet .menu-guide-links { padding-left: 50px; }
#menusheet .menu-guide-links button { padding: 9px 0; min-height: 44px; background: none; color: var(--text); font-size: 14px; line-height: 1.4; font-weight: 400; }
#menusheet .menu-guide-links .d { display: none; }
#menusheet .glist { padding: 0; }
.menu-theme { margin-top: 18px; padding: 18px 14px 0; border-top: 1px solid var(--line); }
.menu-theme label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu-theme select { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14px; }
#menusheet .mlegal { display: flex; flex-direction: column; gap: 0; padding: 18px 0 0; margin-top: 18px; border-top: 1px solid var(--line); }
#menusheet .mlegal .list-row { font-size: 14px; font-weight: 400; min-height: 44px; padding: 10px 14px; color: var(--text); }
#menusheet .mlegal .list-row:last-child { color: var(--accText); font-weight: 600; }
#menusheet .mlegal svg { width: 20px; height: 20px; }
@media (max-width: 359px) {
  #menusheet .drawerhead { gap: 8px; }
  #menusheet .drawerhead b { font-size: 20px; }
  .menu-profile { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Stage 2: feed, its states and filter sheet. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.feed-heading { margin: 0; padding: 12px 0 8px; display: block; }
.feed-heading .titles { min-width: 0; }
.feed-heading h1 { font-size: 32px; line-height: 1.1; margin: 0 0 8px; }
.feed-heading #count { font-size: 15px; color: var(--text); }
.feed-search { display: flex; gap: 8px; padding: 0 4px 0 14px; margin: 8px 0 0; height: 52px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.feed-search > [data-icon] { color: var(--muted); }
.feed-search input { min-width: 0; height: 48px; padding: 0; border: 0; background: transparent; font-size: 15px; border-radius: 0; }
.feed-search:focus-within { outline: 2px solid var(--accLine); outline-offset: 2px; }
.feed-search input:focus { outline: none; }
.feed-search #qclear { position: static; flex: 0 0 44px; padding: 0; color: var(--muted); }
.feed-search #searchfilters { border-left: 1px solid var(--line); border-radius: 0 12px 12px 0; }
#feed .qhint { font-size: 12px; line-height: 1.5; margin: 7px 2px 12px; }
#feed #periods { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin: 0 0 12px; }
#feed #periods .chip { padding: 8px 0; min-width: 0; background: var(--card); border-radius: 10px; }
#feed #periods .chip[aria-pressed="true"] { background: var(--acc); }
.feed-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#feed #tabs { display: contents; }
.feed-actions .fbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card2); color: var(--ink); font: 700 15px/1.3 Onest,system-ui,sans-serif; cursor: pointer; }
.feed-actions .fbtn svg { width: 18px; height: 18px; }
.feed-actions .n, .group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; min-height: 22px; padding: 2px 7px; border-radius: 99px; background: var(--acc); color: #fff; font-size: 12px; font-weight: 700; }
.is-favorites .feed-actions { grid-template-columns: 1fr; }
.feed-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; }
.feed-tools .linkbtn { padding: 0; font-size: 13px; }
.feed-tools .toggle { margin-left: auto; min-height: 44px; font-size: 12px; color: var(--muted); }
#feed #list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.vacancy-card { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 16px; border-radius: 18px; }
.vacancy-card:has(.star) .top { padding: 0; }
.vacancy-card .top { gap: 10px; }
.vacancy-card .company-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 10px; font-size: 20px; font-weight: 800; background: var(--accSoft); color: var(--accText); }
.vacancy-card .company { display: block; font-size: 15px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.vacancy-card .when { display: block; white-space: normal; font-size: 12px; line-height: 1.4; margin: 2px 0 0; }
.vacancy-card .title { margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: 17px; line-height: 1.35; font-weight: 700; text-align: left; cursor: pointer; overflow-wrap: anywhere; min-height: 44px; }
.vacancy-card .star { position: static; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; margin: -2px -8px -2px 0; padding: 0; color: var(--ink); border-radius: 12px; }
.vacancy-card .star[aria-pressed="true"] { color: var(--accText); }
.vacancy-card .star[aria-pressed="true"] svg { fill: currentColor; }
.feed-score { flex: 0 0 auto; padding: 5px 9px; border-radius: 14px; font-size: 13px; line-height: 1.4; font-weight: 700; background: var(--accSoft); color: var(--accText); }
.vacancy-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.vacancy-card .tag, .vacancy-card .salary { display: inline-flex; align-items: center; padding: 5px 10px; min-height: 30px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; line-height: 1.4; font-weight: 500; background: var(--card2); color: var(--ink); overflow-wrap: anywhere; }
.vacancy-card .salary { background: var(--goodBg); color: var(--good); border-color: var(--goodLine); font-weight: 700; }
.vacancy-card .application-badge { margin: 0; }
#feed .askreply { margin: 0; box-shadow: none; border: 1px solid var(--line); }
#feed .askreply .lbl { font-size: 12px; }
#feed .pager { position: static; margin: 18px 0 0; border-top: 1px solid var(--line); padding: 14px 0; }
#feed .pager button { min-width: 44px; min-height: 44px; border-radius: 12px; color: var(--ink); background: var(--card2); border: 1px solid var(--line); }
#feed .pager button[aria-current="true"] { color: #fff; background: var(--acc); }
.feed-launch { min-height: calc(100dvh - 100px - var(--app-top) - var(--app-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 0; }
#feedlaunch[data-art="pending"] { opacity: 0; }
#feedlaunch[data-art="pending"] .loading-track span { animation: none; }
#feedlaunch[data-art="unavailable"] .launch-art { display: none; }
.launch-art { position: relative; width: min(270px,100%); aspect-ratio: 1; margin-bottom: 24px; }
.launch-art .loader { position: absolute; inset: 0; width: 100%; height: 100%; }
.feed-launch h1 { font-size: 22px; letter-spacing: -.025em; margin: 0 0 8px; }
.feed-launch p { font-size: 14px; color: var(--muted); margin: 0; }
.loading-track { width: 160px; height: 6px; border-radius: 3px; background: var(--card2); overflow: hidden; margin: 24px 0 0; }
.loading-track span { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--acc); animation: feed-progress 1.4s ease-in-out infinite; }
@keyframes feed-progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.feed-skeleton { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.skeleton { display: block; border-radius: 8px; height: 16px; background: linear-gradient(90deg,var(--card2) 20%,var(--line) 45%,var(--card2) 70%); background-size: 220% 100%; animation: feed-shimmer 1.3s ease-in-out infinite; }
@keyframes feed-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.skeleton-head { display: flex; align-items: center; gap: 12px; }
.skeleton-head .avatar { width: 40px; height: 40px; border-radius: 10px; }
.skeleton-head > span { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.skeleton.company-line { width: 60%; height: 12px; }
.skeleton.date-line { width: 32%; height: 10px; }
.skeleton.title-line { width: 90%; }
.skeleton.subtitle-line { width: 60%; }
.skeleton-tags { display: flex; gap: 6px; }
.skeleton-tags .skeleton { width: 120px; height: 30px; border-radius: 15px; }
.skeleton-tags .skeleton + .skeleton { width: 80px; }
#feedmore { margin-top: 12px; }
.feed-empty, .feed-error { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 32px 16px; gap: 12px; }
.feed-empty img { width: 160px; max-width: 100%; height: auto; object-fit: contain; }
.feed-empty h2, .feed-error h2 { font-size: 22px; line-height: 1.25; font-weight: 800; margin: 6px 0 0; }
.feed-empty p, .feed-error p { font-size: 15px; line-height: 1.5; margin: 0; max-width: 360px; }
.feed-empty .button, .feed-error .button { margin-top: 8px; }
.feed-empty .linkbtn { padding: 4px 0; }
.feed-error { padding-top: 56px; }
.feed-error-icon { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 24px; background: var(--badBg); color: var(--bad); }
.feed-error.is-append { padding: 24px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.feed-error.is-append .feed-error-icon { display: none; }

/* Plus uses the existing authenticated payment catalog and order API. */
dialog#plussheet { width: calc(100% - 24px); max-width: 520px; max-height: calc(100dvh - 32px - var(--app-top) - var(--app-bottom)); margin: auto auto 0; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); color: var(--text); overflow: auto; overscroll-behavior: contain; }
dialog#plussheet::backdrop { background: var(--scrim); }
.plus-heading { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 1; padding: 14px 16px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.plus-heading h2 { margin: 0; flex: 1; font-size: 20px; line-height: 1.2; }
.plus-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; background: var(--accSoft); color: var(--accText); border-radius: 12px; }
.plus-body { padding: 8px 20px 24px; }
.plus-intro { margin: 12px 0; color: var(--muted); font-size: 14px; }
.plus-account { padding: 12px; border-radius: 12px; color: var(--good); background: var(--goodBg); font-weight: 600; }
.plus-benefits { padding: 0; margin: 16px 0 22px; list-style: none; display: grid; gap: 12px; font-size: 14px; }
.plus-benefits li { display: flex; gap: 10px; align-items: flex-start; }
.plus-benefits li::before { content: '✓'; color: var(--accText); font-weight: 800; flex-shrink: 0; }
#plus-periods { margin: 0; padding: 0; border: 0; min-width: 0; }
#plus-periods legend { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.plus-plans { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.plus-plan { cursor: pointer; position: relative; min-width: 0; display: grid; align-content: center; text-align: center; }
.plus-plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plus-plan-copy { display: grid; gap: 5px; padding: 13px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 13px; }
.plus-plan-copy strong { color: var(--ink); font-size: 14px; }
.plus-plan input:checked + .plus-plan-copy { background: var(--accSoft); border-color: var(--accText); color: var(--accText); }
.plus-plan input:focus-visible + .plus-plan-copy { outline: 3px solid var(--accText); outline-offset: 3px; }
.plus-plan input:disabled + .plus-plan-copy { opacity: .6; cursor: default; }
#plussheet .plus-total { margin: 18px 0 8px; font-size: 21px; font-weight: 800; color: var(--ink); }
#plussheet .hint { font-size: 12px; line-height: 1.5; color: var(--muted); }
.plus-consent { display: flex; align-items: center; gap: 10px; min-height: 52px; font-size: 13px; cursor: pointer; }
.plus-consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--acc); flex-shrink: 0; }
.plus-consent .linkbtn { font-size: inherit; padding: 0; text-decoration: underline; }
#plus-buy { width: 100%; }
.plus-message { margin: 12px 0; padding: 12px; background: var(--warnBg); color: var(--warn); border-radius: 12px; font-size: 14px; }
.plus-result { padding: 16px; margin: 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.plus-result h3 { font-size: 18px; margin: 0 0 8px; }
.plus-result p { font-size: 14px; margin: 8px 0; }
.plus-order-id { overflow-wrap: anywhere; }
.plus-result-actions { display: grid; gap: 8px; margin-top: 16px; }
.plus-result-actions .button { min-height: 44px; padding: 10px 14px; font-size: 14px; }
@media (max-width: 359px) {
  .plus-body { padding-inline: 14px; }
  .plus-heading { gap: 8px; padding-inline: 12px; }
  .plus-heading h2 { font-size: 18px; }
  .plus-mark { width: 30px; height: 30px; }
  .plus-plans { gap: 6px; }
  .plus-plan-copy { padding-inline: 3px; font-size: 12px; }
}

/* A single scroll surface in the sheet; groups reuse existing catalog pickers. */
dialog#filtersheet { width: 100%; max-width: 720px; height: min(94dvh,calc(100dvh - var(--app-top))); max-height: min(94dvh,calc(100dvh - var(--app-top))); padding: 0; overflow: hidden; }
#filtersheet[open] { display: flex; flex-direction: column; }
#filtersheet > .grab { flex: 0 0 5px; width: 40px; margin: 8px auto 0; border-radius: 3px; background: var(--off); }
.filters-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 16px; flex: 0 0 56px; }
.filters-heading h2 { margin: 0; font-size: 17px; font-weight: 700; }
.filters-heading .linkbtn { padding: 0; font-size: 14px; justify-self: start; }
.filters-heading .linkbtn:last-child { justify-self: end; }
#filtersheet > .body { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }
#filtersheet .filters { gap: 8px; }
.filter-group { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.filter-group.is-open { border-color: var(--accLine); }
.filter-group > .pickbtn { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 58px; padding: 10px 12px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); }
.filter-group .pickbtn .val { color: var(--ink); font-size: 15px; font-weight: 700; text-align: left; white-space: normal; overflow: visible; }
.filter-group .filter-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--accSoft); color: var(--accText); }
.filter-group .filter-icon svg, .filter-group .caret svg { width: 18px; height: 18px; }
.filter-group .caret { color: var(--ink); transition: transform .2s; }
.filter-group.is-open .caret { transform: rotate(180deg); }
.filter-group .group-count.has-exclusions { background: var(--badBg); color: var(--bad); }
.filter-group > .picks:not(:empty) { margin: -2px 12px 10px 56px; }
.filter-group .picks .p, .filter-summary-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 6px 10px; margin: 0; border: 0; border-radius: 14px; font: 600 12px/1.35 Onest,system-ui,sans-serif; background: var(--accSoft); color: var(--accText); overflow-wrap: anywhere; }
.filter-group .picks .p.no { color: var(--bad); background: var(--badBg); }
.filter-group .filter-summary-chip { min-height: 26px; }
.filter-content { padding: 0 12px 12px; }
.filter-content .chips { margin: 0; }
.filter-content .chip { flex: 0 1 auto; padding: 8px 12px; border-radius: 20px; }
.filter-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.filter-switches { margin-top: 4px; padding: 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.filter-switches label.check { border: 0; border-radius: 0; padding: 12px 0; min-height: 70px; }
.filter-switches label + label { border-top: 1px solid var(--line); }
.filter-switches label > span { flex: 1; }
.filter-switches strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.filter-switches small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
#filtersheet #byresume_row { padding: 10px; margin-top: 12px; border: 1px dashed var(--accLine); background: transparent; color: var(--accText); font-size: 14px; }
#filtersheet #presetgroup { margin-top: 16px; }
#filtersheet #savepreset { margin-top: 10px; width: 100%; border-radius: 16px; font-size: 14px; }
.filters-footer { flex: 0 0 auto; padding: 12px 16px calc(16px + var(--app-bottom)); border-top: 1px solid var(--line); background: var(--sheet); }
.filters-footer .btn { width: 100%; margin: 0; min-height: 54px; }
#filtersheet .inline-pick { position: static; display: block; }
#filtersheet .inline-pick > .veil, #filtersheet .inline-pick .grab { display: none; }
#filtersheet .inline-pick > .card { display: flex; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; cursor: default; animation: none; }
#filtersheet .inline-pick .top { padding: 0; min-height: 44px; }
#filtersheet .inline-pick .top b { font-size: 14px; white-space: normal; text-align: left; }
#filtersheet .inline-pick .top .ph { display: none; }
#filtersheet .inline-pick .top button { min-height: 44px; font-size: 13px; padding: 0 4px; }
#filtersheet .inline-pick .find { padding: 8px 0; }
#filtersheet .inline-pick .find input { min-height: 44px; border-radius: 12px; background: var(--card2); color: var(--ink); font-size: 14px; }
#filtersheet .inline-pick .list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
#filtersheet .inline-pick .row { min-height: 44px; padding: 10px 8px; font-size: 14px; gap: 8px; color: var(--ink); border-radius: 10px; }
#filtersheet .inline-pick .row[data-state="no"] { color: var(--bad); background: var(--badBg); }
#filtersheet .inline-pick .row[data-state="no"] .box { background: var(--badBg); color: var(--bad); border-color: var(--bad); }
#filtersheet .inline-pick .row[data-state="no"] .t { text-decoration: none; opacity: 1; }
#filtersheet .inline-pick .row[data-state="yes"] { background: var(--accSoft); }
.pick-modes, .filter-geo-kinds { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; border-radius: 12px; padding: 3px; background: var(--card2); margin: 4px 0 8px; }
.pick-modes button, .filter-geo-kinds button { min-height: 44px; padding: 6px; background: transparent; color: var(--muted); border: 0; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pick-modes button[aria-pressed="true"], .filter-geo-kinds button[aria-pressed="true"] { background: var(--card); color: var(--ink); }
.filter-geo-kinds { grid-template-columns: repeat(3,minmax(0,1fr)); }
.pick-modes button[data-exclude][aria-pressed="true"], .pick-modes button[data-pick-mode="-1"][aria-pressed="true"] { background: var(--badBg); color: var(--bad); }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .row { width: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 22px; background: var(--card2); box-shadow: none; padding: 8px 12px; }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .row .box { display: none; }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .row[data-state="yes"] { background: var(--acc); color: #fff; border-color: var(--accLine); }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .row[data-state="yes"] .n { color: #fff; }
#filtersheet :is(#industry_options,#format_options,#grade_options,#skills_options) .inline-pick .row[data-state="no"] { background: var(--badBg); color: var(--bad); border-color: var(--bad); }
@media (max-width: 359px) {
  .feed-heading h1 { font-size: 28px; }
  .feed-actions .fbtn { font-size: 13px; gap: 6px; }
  .vacancy-card { padding: 14px; }
  .vacancy-card .top { gap: 8px; }
  .vacancy-card .company-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .vacancy-card .company { font-size: 14px; }
  .feed-score { padding: 4px 6px; }
  .filter-group .pickbtn { gap: 8px; }
  .filter-group .pickbtn .val { font-size: 14px; }
}
/* Stage 3: vacancy detail and its four BottomSheets. */
#detail.vacancy-detail { padding: 14px 0 calc(90px + var(--app-bottom)); }
#detail.vacancy-detail .vacancy-hero { padding: 0; margin: 0 0 20px; border: 0; background: transparent; }
#detail.vacancy-detail .head { display: flex; align-items: center; gap: 12px; }
#detail.vacancy-detail .company-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; background: var(--card2); color: var(--accText); }
.vacancy-company { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#detail.vacancy-detail .company { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
#detail.vacancy-detail .when { margin: 0; font-size: 12px; white-space: normal; }
.company-follow { min-height: 44px; max-width: 140px; padding: 8px 12px; border: 1px solid var(--accLine); border-radius: 12px; background: transparent; color: var(--accText); font: 600 13px/1.35 Onest, sans-serif; cursor: pointer; }
.company-follow[aria-pressed="true"] { background: var(--accSoft); }
.company-follow:disabled { opacity: .6; }
#detail.vacancy-detail .vacancy-hero h2 { margin: 20px 0 14px; font-size: 26px; line-height: 1.22; letter-spacing: -.025em; font-weight: 800; overflow-wrap: anywhere; }
#detail.vacancy-detail .vacancy-hero > .application-badge:not([hidden]) { display: table; margin: 0 0 4px; max-width: 100%; }
#detail.vacancy-detail .salary { display: inline-flex; margin: 8px 0; padding: 6px 12px; border: 1px solid var(--goodLine); border-radius: 18px; background: var(--goodBg); color: var(--good); font-size: 14px; font-weight: 700; }
#detail.vacancy-detail .props { padding: 8px 0 12px; border: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#detail.vacancy-detail .prop { min-width: 0; }
#detail.vacancy-detail .prop dt { color: var(--muted); font-size: 12px; }
#detail.vacancy-detail .prop dd { margin: 2px 0 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
#detail.vacancy-detail .tag { border: 1px solid var(--line); border-radius: 16px; background: var(--card2); color: var(--text); font-size: 12px; }
#detail.vacancy-detail .desc { padding: 0; line-height: 1.55; }
#detail.vacancy-detail .desc h3 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
#detail.vacancy-detail .desc p { margin: 0 0 14px; font-size: 14px; }
.vacancy-about { margin-bottom: 18px; }
.vacancy-section { margin: 0 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
#detail.vacancy-detail .vacancy-section h3 { font-size: 16px; }
#detail.vacancy-detail .vacancy-section p { margin-bottom: 0; }
.vacancy-section ul { padding-left: 18px; margin: 0; font-size: 14px; }
.vacancy-section li + li { margin-top: 6px; }
#detail.vacancy-detail .quality { margin: 18px 0; padding: 16px; border-radius: 16px; background: var(--accSoft); box-shadow: none; }
#detail.vacancy-detail .quality-eyebrow { font-size: 12px; letter-spacing: 0; text-transform: none; }
#detail.vacancy-detail .quality-title { font-size: 16px; }
#detail.vacancy-detail .quality-number { background: var(--card); color: var(--accText); }
#detail.vacancy-detail .quality-summary { margin: 10px 0; }
#detail.vacancy-detail .quality .tag.question { background: var(--warnBg); color: var(--warn); }
#detail.vacancy-detail .quality .tag.positive { background: var(--goodBg); color: var(--good); }
#detail.vacancy-detail .quality-more { font-size: 13px; min-height: 32px; align-items: center; }
#detail.vacancy-detail .cover { padding: 16px; margin: 18px 0; border-radius: 16px; }
#detail.vacancy-detail .coverhead { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
#detail.vacancy-detail .cover h3 { margin: 0 0 4px; font-size: 16px; }
#detail.vacancy-detail .coverbtns { gap: 8px; }
#detail.vacancy-detail .coverbtns > button { font-size: 13px; }
#detail.vacancy-detail #coveropts { margin-top: 12px; }
#detail.vacancy-detail .vacancy-safety { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); }
#detail.vacancy-detail .vacancy-safety p { font-size: 13px; }
#detail.vacancy-detail .vacancy-safety b { color: var(--ink); }
#detail.vacancy-detail .vacancy-age-notice { background: var(--warnBg); color: var(--text); border-color: var(--line); }
#detail.vacancy-detail .vacancy-age-toggle { background: var(--card); color: var(--ink); border-color: var(--line); }
.vacancy-secondary { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.vacancy-secondary .linkbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 8px 12px; background: var(--card); color: var(--text); font-size: 13px; }
.vacancy-secondary svg { width: 18px; height: 18px; flex-shrink: 0; }
.vacancy-secondary #hide[aria-pressed="true"] { color: var(--accText); background: var(--accSoft); }
#detail.vacancy-detail .vacancy-actions { position: fixed; z-index: 9; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 720px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px calc(16px + var(--app-right)) calc(16px + var(--app-bottom)) calc(16px + var(--app-left)); border-top: 1px solid var(--line); background: var(--bg); }
.vacancy-actions #apply { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 8px 10px; font-size: 15px; }
.vacancy-actions .icon-button { flex: 0 0 54px; width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); }
.vacancy-actions #fav[aria-pressed="true"] { color: var(--accText); }
.vacancy-actions #fav[aria-pressed="true"] svg { fill: currentColor; }
.archived-notice { display: flex; gap: 12px; margin-bottom: 22px; padding: 14px; border-radius: 16px; background: var(--warnBg); color: var(--warn); }
.archived-notice > svg { flex-shrink: 0; margin-top: 2px; }
.archived-notice strong { font-size: 15px; }
.archived-notice p { margin: 4px 0 0; color: var(--text); font-size: 13px; }
.archived-notice .linkbtn { padding: 8px 0 0; font-size: 13px; }

dialog.vacancy-dialog, dialog.quality-dialog { width: 100%; max-width: 720px; max-height: min(92dvh,calc(100dvh - var(--app-top))); margin: auto auto 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--sheet); color: var(--text); box-shadow: none; overflow-y: auto; overscroll-behavior: contain; }
dialog.vacancy-dialog::backdrop, dialog.quality-dialog::backdrop { background: var(--scrim); backdrop-filter: none; }
dialog.vacancy-dialog .overlay { position: static; display: block; padding: 0; background: transparent; animation: none; }
dialog.vacancy-dialog .modal { width: 100%; max-width: none; max-height: none; box-sizing: border-box; padding: 8px 16px calc(24px + var(--app-bottom)); border-radius: 0; box-shadow: none; background: var(--sheet); color: var(--text); overflow: visible; }
.sheet-grab { width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--off); }
dialog.vacancy-dialog .close { float: right; margin: 0 -4px 0 8px; color: var(--ink); }
dialog.vacancy-dialog h3 { min-height: 44px; display: flex; align-items: center; padding: 0; margin: 0 0 12px; font-size: 21px; line-height: 1.25; font-weight: 800; }
dialog.vacancy-dialog p { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
dialog.vacancy-dialog .apply, dialog.vacancy-dialog .btn { width: 100%; margin: 12px 0 0; }
dialog.vacancy-dialog .note { font-size: 13px; }
.contact-value { display: flex; align-items: center; gap: 12px; background: var(--card); margin: 16px 0 4px; }
.contact-value .list-row-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.contact-value > div { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.contact-value strong { display: block; margin-bottom: 3px; color: var(--ink); }
.contact-value a { display: inline-flex; min-height: 44px; align-items: center; }
.contact-saved, .report-success { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; padding: 14px; border-radius: 16px; background: var(--goodBg); color: var(--good); }
.contact-saved > svg, .report-success > svg { flex-shrink: 0; }
.contact-saved .linkbtn { display: block; text-align: left; font-size: 13px; color: var(--good); }
dialog.vacancy-dialog .report-success p { margin: 4px 0 0; color: var(--text); }
.report-reasons { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.report-reason { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; box-sizing: border-box; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.report-reason:has(input:checked) { border-color: var(--accLine); background: var(--accSoft); }
.report-reason input { appearance: auto; width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: var(--acc); }
#rcomment { width: 100%; box-sizing: border-box; resize: vertical; min-height: 76px; background: var(--card); margin-top: 12px; word-break: normal; }
#rerr, #aierr { color: var(--bad); }
#rerr:empty, #aierr:empty { display: none; }
#rerr:not(:empty) { margin-top: 8px; }
.consent-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 4px 0 16px; border-radius: 16px; background: var(--accSoft); color: var(--accText); }
.consent-icon svg { width: 26px; height: 26px; }
.consent-check { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 56px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.consent-check input { width: 24px; height: 24px; margin: 0; flex: 0 0 24px; accent-color: var(--acc); }
.consent-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
dialog.vacancy-dialog .aiconsent-provider { font-size: 13px; }
.aiconsent-provider .linkbtn { font: inherit; text-align: left; padding-inline: 0; }
dialog.quality-dialog { display: none; }
dialog.quality-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.quality-dialog > .sheet-grab { flex: 0 0 5px; margin: 8px auto 0; }
.quality-dialog .quality-dialog-header { position: static; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--sheet); border: 0; }
.quality-dialog .quality-dialog-header h3 { flex: 1; font-size: 21px; font-weight: 800; margin: 0; }
.quality-dialog .quality-dialog-close { position: static; flex: 0 0 44px; width: 44px; height: 44px; background: transparent; color: var(--ink); }
.quality-dialog .quality-dialog-content { padding: 8px 16px 16px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.quality-overview { display: flex; align-items: center; gap: 16px; padding: 8px 0 18px; }
.quality-overview strong { color: var(--ink); font-size: 16px; }
.quality-overview p { margin: 4px 0 0; font-size: 13px; }
.score-ring { --ring-color: var(--acc); width: 88px; height: 88px; flex: 0 0 88px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--score) * 1%),var(--line) 0); }
.score-ring > span { width: 74px; height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: var(--sheet); color: var(--ink); font-size: 28px; font-weight: 800; line-height: 1.1; }
.score-ring small { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.quality-dialog .quality-fact { padding: 16px 0; scroll-margin-top: 8px; }
.quality-dialog .quality-fact summary { min-height: 44px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.quality-dialog .quality-fact summary::-webkit-details-marker { display: none; }
.quality-dialog .quality-fact summary > span:nth-child(2) { flex: 1; }
.quality-dialog .quality-fact summary > svg { flex-shrink: 0; width: 18px; color: var(--muted); }
.quality-dialog .quality-fact[open] summary { margin-bottom: 12px; }
.quality-dialog .quality-fact[open] summary > svg { transform: rotate(180deg); }
.fact-icon { display: flex; justify-content: center; align-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; color: var(--muted); background: var(--card2); }
.positive .fact-icon { color: var(--good); background: var(--goodBg); }
.question .fact-icon { color: var(--warn); background: var(--warnBg); }
.fact-icon svg { width: 18px; height: 18px; }
.quality-dialog .quality-explanation { font-size: 14px; line-height: 1.5; }
.quality-dialog .quality-fact blockquote { background: var(--card); }
.quality-dialog-footer { flex: 0 0 auto; padding: 12px 16px calc(20px + var(--app-bottom)); border-top: 1px solid var(--line); }
.quality-dialog-footer .btn { width: 100%; }
@media(max-width: 350px) {
  #detail.vacancy-detail .head { gap: 8px; }
  .company-follow { max-width: 110px; padding: 8px; font-size: 12px; }
  #detail.vacancy-detail .vacancy-hero h2 { font-size: 24px; }
  .vacancy-actions .icon-button { flex-basis: 46px; width: 46px; }
  .vacancy-actions #apply { font-size: 14px; gap: 5px; }
  .vacancy-actions #apply svg { width: 18px; }
}

/* Stage 4: resume, its saved assessment and server-backed states. */
#resumepage .resume-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 20px; }
#resumepage h1 { margin: 0; font-size: 28px; }
#resumepage .resume-saved-badge { display: inline-flex; margin: 0; padding: 4px 10px; border-radius: 999px; background: var(--goodBg); color: var(--good); font-size: 12px; font-weight: 700; }
#resumepage .pcard { padding: 16px; border-radius: 18px; background: var(--card); margin: 0 0 16px; }
#resumepage .hint { font-size: 13px; line-height: 1.45; color: var(--muted); }
.resume-intro { display: flex; position: relative; overflow: hidden; padding: 18px 16px; min-height: 138px; margin: 0 0 16px; border-radius: 20px; background: var(--promo); }
.resume-intro > div { position: relative; z-index: 1; max-width: calc(100% - 86px); }
.resume-intro h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.resume-intro p { margin: 0; font-size: 13px; line-height: 1.5; }
.resume-intro img { position: absolute; right: -8px; bottom: -8px; width: 130px; height: 130px; object-fit: contain; }
#resumepage .resume-document-head { min-height: 52px; }
#resumepage .resume-document-head > div { min-width: 0; }
#resumepage .resume-document-head h3 { font-size: 15px; margin: 0 0 3px; }
#resumepage .resume-document-icon { width: 44px; height: 44px; background: var(--grad); color: #fff; border-radius: 12px; }
#resumepage #resumeanalyze { width: 100%; min-height: 44px; margin: 14px 0 0; font-size: 14px; }
#resumepage #resumeeditor > summary { align-items: center; min-height: 48px; margin-top: 12px; padding: 10px 0; color: var(--accText); font-size: 14px; font-weight: 600; }
#resumepage #resumeeditor > summary::-webkit-details-marker { display: none; }
#resumepage #resumeeditor[open] > summary [data-icon] { transform: rotate(180deg); }
#resumegroup:not(.has-resume) .resume-document { padding: 0; border: 0; background: transparent; }
#resumegroup:not(.has-resume) #resumeeditor > summary { display: none; }
#resumepage .resume-upload { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 100%; min-height: 100px; padding: 14px; border: 2px dashed var(--accLine); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.resume-upload > span:last-child { color: var(--muted); font-size: 12px; }
.resume-upload [data-icon] { color: var(--accText); margin-bottom: 3px; }
.resume-or { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.resume-or::before, .resume-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#resumepage #rtext { display: block; width: 100%; min-height: 140px; padding: 14px; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font-size: 15px; line-height: 1.5; resize: vertical; box-sizing: border-box; }
#resumepage #rtext::placeholder { color: var(--muted); }
#resumepage #rparse, #resumepage #rsave, #resumepage #reviewrun { width: 100%; }
#resumepage #rclear { margin-top: 8px; font-size: 14px; }
#resumepage #rerr2:empty { display: none; }
#resumepage #resumereview > h3 { margin: 0 0 6px; font-size: 18px; }
#resumepage #resumereview > .hint { margin: 0 0 14px; }
#resumepage #reviewstatus { font-size: 13px; line-height: 1.5; color: var(--muted); }
#resumepage #reviewquota { font-size: 12px; line-height: 1.5; padding: 12px; margin: 14px 0; background: var(--accSoft); color: var(--accText); }
#resumepage #reviewrefresh { min-height: 44px; margin: 10px 0 0; font-size: 14px; }
.review-overview { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.review-overview > div:first-child { flex: 1; min-width: 0; }
#reviewresult .review-overview h4 { margin: 0 0 6px; font-size: 16px; }
#reviewresult .review-overview p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.review-overview .score-ring > span { background: var(--card); }
#reviewresult .review-section { border-top: 1px solid var(--line); }
#reviewresult .review-section summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink); }
.review-section summary::-webkit-details-marker { display: none; }
.review-section summary svg { width: 18px; flex: 0 0 18px; color: var(--muted); }
.review-section[open] summary svg { transform: rotate(180deg); }
#reviewresult .review-section p { font-size: 14px; line-height: 1.55; }
#reviewresult .review-section article { padding: 12px; border-radius: 12px; background: var(--bg); }
#reviewresult .review-section h4 { font-size: 14px; }
#reviewresult > .small { font-size: 12px; margin: 12px 0 0; }
.resume-ai { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100dvh - 100px - var(--app-top) - var(--app-bottom)); text-align: center; padding: 24px 12px; }
.resume-ai .launch-art { width: min(230px,100%); margin: 0 0 20px; }
.resume-ai h2 { margin: 0; font-size: 22px; font-weight: 800; }
.resume-ai .loading-track { margin: 16px 0; }
.resume-ai p { max-width: 320px; font-size: 14px; color: var(--muted); margin: 0; }
.resume-limit { position: relative; overflow: hidden; margin: 16px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--promo); }
.resume-limit h4 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.resume-limit p { font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.resume-limit-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.resume-limit .btn { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 14px; }
.resume-limit img { flex: 0 0 112px; width: 112px; height: auto; object-fit: contain; }
.resume-limit-footer:has(.btn[hidden]) { justify-content: flex-end; }
#resumepage [hidden] { display: none !important; }
#matchpage [hidden] { display: none !important; }
/* Stage 5: match, letter settings and saved history. */
#matchpage h1 { margin: 14px 0 8px; font-size: 28px; }
.match-vacancy { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.match-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.match-tabs button { min-height: 44px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 14px/1.4 Onest,system-ui,sans-serif; cursor: pointer; }
.match-tabs button[aria-selected="true"] { background: var(--grad); color: #fff; border-color: var(--accLine); }
.match-card { padding: 16px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow-wrap: anywhere; }
#matchpage h2 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; }
.match-card h2 { display: flex; align-items: center; gap: 8px; }
.match-card h2 svg { flex-shrink: 0; width: 18px; height: 18px; }
#matchpage .match-hint { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 10px 0; }
#matchpage .match-hint:empty { display: none; }
#matchpage .btn, #matchpage .ghost { width: 100%; margin: 8px 0 0; }
#matchpage .ghost { min-height: 44px; font-size: 14px; }
#matchpage fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#matchpage label:not(.sr-only) { display: block; color: var(--ink); font-size: 15px; font-weight: 700; margin: 0 0 12px; }
#matchpage select, #matchpage textarea { display: block; width: 100%; min-height: 48px; margin: 0; padding: 12px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: 14px/1.55 Onest,system-ui,sans-serif; }
#matchpage textarea { resize: vertical; }
#matchpage textarea::placeholder { color: var(--muted); }
.match-score { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--goodLine); border-radius: 18px; margin-bottom: 12px; background: var(--goodBg); }
.match-score > div:nth-child(2) { flex: 1; min-width: 0; }
.match-score .score-ring { flex: 0 0 66px; width: 66px; height: 66px; background: conic-gradient(var(--good) calc(var(--score)*1%),var(--line) 0); }
.match-score .score-ring > span { width: 54px; height: 54px; background: var(--goodBg); font-size: 20px; gap: 0; }
.match-score .score-ring small { font-size: 12px; }
#matchpage .match-score h2 { font-size: 16px; margin: 0 0 4px; }
.match-score p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text); }
.match-score img { flex: 0 0 60px; width: 60px; height: auto; align-self: flex-end; }
.match-score.near, .match-score.low { background: var(--warnBg); border-color: var(--line); }
.match-score.near .score-ring, .match-score.low .score-ring { background: conic-gradient(var(--warn) calc(var(--score)*1%),var(--line) 0); }
.match-score.near .score-ring > span, .match-score.low .score-ring > span { background: var(--warnBg); }
.match-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.match-comparison .match-card { padding: 14px 12px; min-width: 0; }
.match-points.good h2 svg { color: var(--good); }
.match-points.gaps { background: var(--warnBg); }
.match-points.gaps h2 svg { color: var(--warn); }
.match-points ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.match-points li { padding: 7px 9px; border-radius: 8px; background: var(--accSoft); color: var(--accText); font-size: 13px; line-height: 1.4; }
.match-points.gaps li { background: var(--card); color: var(--text); }
#matchpage .resume-ai { min-height: 440px; padding: 12px 0; }
#matchpage .resume-ai h2 { font-size: 22px; }
#matchhistory { margin-top: 20px; }
#matchhistory summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; list-style: none; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
#matchhistory summary::-webkit-details-marker { display: none; }
#matchhistory[open] summary svg { transform: rotate(180deg); }
.match-history-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 64px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.match-history-row span { min-width: 0; }
.match-history-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.match-history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.match-history-row svg { flex-shrink: 0; width: 18px; }
#matchhistoryresult { margin-top: 18px; scroll-margin-top: 80px; }
#matchhistoryresult .match-card { padding: 12px; }
#openmatch { display: flex; align-items: center; justify-content: center; gap: 8px; }
@media(max-width: 350px) {
  .match-score { gap: 10px; padding: 14px 12px; flex-wrap: wrap; }
  .match-score img { display: none; }
  .match-comparison { grid-template-columns: minmax(0,1fr); gap: 0; }
  .match-points ul { flex-direction: row; flex-wrap: wrap; }
}
@media(max-width: 350px) {
  .resume-intro { padding: 16px 12px; }
  .resume-intro h2 { font-size: 17px; }
  .resume-intro img { right: -20px; width: 118px; height: 118px; }
  .resume-limit { padding: 14px; }
  .resume-limit img { flex-basis: 84px; width: 84px; }
  .review-overview { gap: 10px; }
}
/* Stage 7: company directory. Counts and follows come from the existing APIs. */
.companies-page h1 { margin: 0 0 8px; color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.companies-intro { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
#companiespage .company-search { display: flex; align-items: center; gap: 10px; min-height: 50px; margin: 20px 0 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.company-search > span { display: flex; color: var(--muted); flex-shrink: 0; }
#companiespage .company-search input { flex: 1; min-width: 0; height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font-size: 16px; }
#companiespage .company-search:focus-within { outline: 2px solid var(--accText); outline-offset: 2px; }
#companiespage .company-search input:focus-visible { outline: none; }
.company-subscriptions { margin-bottom: 18px; padding: 10px 14px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.company-subscriptions-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.company-subscriptions-heading h2 { margin: 0; font-size: 15px; font-weight: 700; }
.company-subscriptions-heading .icon-button { flex-shrink: 0; background: var(--accSoft); color: var(--accText); }
#companysummary { margin: 6px 0 0; color: var(--text); font-size: 13px; line-height: 1.5; }
.company-shared-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
#companycatalog, .company-skeletons { display: flex; flex-direction: column; gap: 10px; }
.company-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); min-width: 0; }
.company-card-main { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.company-card-main .company-mark { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; font-size: 20px; background: var(--accSoft); color: var(--accText); }
.company-card-info { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.company-card-info strong { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.company-open-count { color: var(--good); font-size: 13px; font-weight: 600; line-height: 1.4; }
.company-open-count.empty { color: var(--muted); }
.company-card-main > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.company-card .company-status { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.company-card .company-status.active { color: var(--good); }
.company-card .company-actions { display: flex; gap: 8px; margin-top: 12px; }
.company-card .company-actions button { min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--accLine); border-radius: 12px; background: var(--accSoft); color: var(--accText); font-size: 13px; font-weight: 600; white-space: normal; }
.company-card .company-actions .company-follow-action[aria-pressed="true"] { border-color: var(--line); color: var(--muted); background: transparent; }
.company-card .company-actions .company-pause-action { background: var(--card2); border-color: var(--line); color: var(--text); }
#companiesmore { width: 100%; margin-top: 16px; min-height: 48px; border-radius: 14px; font-size: 14px; }
#companycatalogerror { font-size: 13px; line-height: 1.5; color: var(--bad); }
.company-empty { text-align: center; padding: 24px 4px 12px; }
.company-empty img { display: block; width: 160px; height: 160px; margin: 0 auto 16px; object-fit: contain; }
.company-empty h2 { color: var(--ink); font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.company-empty p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.company-empty .button { width: 100%; }
.company-error-icon { display: inline-flex; padding: 14px; margin-bottom: 14px; border-radius: 50%; background: var(--card2); color: var(--muted); }
.company-skeleton { display: flex; flex-wrap: wrap; gap: 12px; }
.company-skeleton .avatar { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; }
.company-skeleton > div { flex: 1; min-width: 0; padding-top: 4px; }
.company-skeleton .company-line { width: 75%; height: 16px; margin-bottom: 10px; }
.company-skeleton .date-line { width: 55%; height: 12px; }
.company-skeleton-button { flex-basis: 100%; height: 44px; border-radius: 12px; }

/* Stage 6: profile overview, notification preferences and saved searches. */
.account-page { padding-top: 14px; }
.account-page > h2 { margin: 0 0 10px; overflow-wrap: anywhere; }
.account-lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.profile-identity { display: flex; align-items: center; gap: 14px; margin: 24px 0; }
.profile-identity > div { min-width: 0; }
.profile-avatar { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accSoft); color: var(--accText); font-size: 23px; font-weight: 800; }
.profile-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-name-line > strong { color: var(--ink); font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.profile-plus { padding: 3px 10px; border-radius: 20px; color: #fff; background: var(--grad); font-size: 12px; font-weight: 700; }
.profile-identity .hint { margin: 5px 0 0; }
.profile-links { border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.profile-links .list-row { border-radius: 0; min-height: 80px; }
.profile-links .list-row + .list-row { border-top: 1px solid var(--line); }
.profile-links .list-row-copy > span { overflow-wrap: anywhere; }
.profile-promo { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: end; gap: 12px; border-radius: 20px; padding: 18px 16px; margin-top: 22px; background: var(--promo); border: 1px solid var(--line); }
.profile-promo h3 { font-size: 18px; line-height: 1.25; margin: 0 0 8px; }
.profile-promo > div { display: contents; }
.profile-promo h3, .profile-promo p { grid-column: 1 / -1; }
.profile-promo p { margin: 0 0 16px; font-size: 13px; }
.profile-promo img { width: 100%; height: auto; }
.profile-promo .button { min-height: 44px; padding: 10px 14px; font-size: 14px; }
#notification-settings { min-width: 0; padding: 0; margin: 0; border: 0; }
#notificationspage .pcard { padding: 16px; margin: 0 0 16px; }
#notificationspage .pcard h3 { font-size: 17px; margin: 0 0 10px; }
#notificationspage .pcard .hint, .account-page .hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
#notificationspage .fill { border: 1px solid var(--line); background: var(--card); padding: 14px; border-radius: 16px; margin-bottom: 16px; }
#profilefields { display: flex; flex-direction: column; gap: 14px; }
#profilefields > .filter { min-width: 0; width: 100%; }
.notification-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
#profilefields .pickbtn { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--card2); }
#profilefields .pickbtn .val { white-space: normal; text-align: left; overflow-wrap: anywhere; }
#profilefields .picks { margin-top: 6px; }
#profilefields .picks .p { min-height: 44px; font-size: 13px; border-radius: 12px; background: var(--accSoft); color: var(--accText); }
#profilefields .picks .p.no { background: var(--badBg); color: var(--bad); }
#profilefields label.check { padding: 12px; border-radius: 12px; font-size: 14px; margin: 0; }
#profilefields .hint.sub { margin: -8px 0 0; padding: 0 4px; }
#push { min-height: 48px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
#notificationspage .notification-scope { margin: 14px 0 0; }
.account-page .psave { padding: 12px 0 calc(12px + var(--app-bottom)); margin: 0 0 16px; }
.account-page .psave > button { width: 100%; }
.account-page .psave .hint { text-align: center; margin: 8px 0 0; }
#notificationspage .psave { position: static; padding: 0; margin: 4px 0 24px; box-shadow: none; }
#savehint:empty { display: none; }
.app-notice {
  position: fixed; inset: calc(72px + var(--app-top)) auto auto 50%; z-index: 10000;
  transform: translateX(-50%); margin: 0; width: max-content;
  max-width: calc(100vw - 32px - var(--app-left) - var(--app-right)); box-sizing: border-box;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border: 1px solid var(--goodLine); border-radius: 16px; background: var(--card); color: var(--ink);
  font: 600 14px/1.4 Onest, system-ui, sans-serif; box-shadow: 0 8px 28px var(--scrim);
  pointer-events: none; overflow-wrap: anywhere; animation: notice-in .2s ease-out;
}
.app-notice::backdrop { background: transparent; pointer-events: none; }
.app-notice-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; height: 28px; border-radius: 50%; color: var(--good); background: var(--goodBg); }
@keyframes notice-in { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .app-notice { animation: none; } }
.account-notice { padding: 14px; margin: 0 0 12px; border-radius: 14px; background: var(--warnBg); color: var(--warn); font-size: 14px; }
#companynotifications { display: flex; flex-direction: column; gap: 10px; }
#companynotifications .company-notification { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.notification-company-heading { display: flex; gap: 10px; align-items: center; }
.notification-company-heading b { overflow-wrap: anywhere; min-width: 0; }
.notification-company-heading .company-mark { flex-shrink: 0; }
#companynotifications .company-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#companynotifications .company-actions > button { min-height: 44px; font-size: 13px; padding: 8px 12px; white-space: normal; }
.saved-filter-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.saved-filter-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-width: 0; }
.saved-filter-card h3 { margin: 0 0 5px; font-size: 17px; overflow-wrap: anywhere; }
.saved-filter-card .hint { margin: 0 0 12px; overflow-wrap: anywhere; }
.saved-status { display: inline-flex; gap: 6px; align-items: center; background: var(--card2); color: var(--muted); border-radius: 20px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.saved-status svg { width: 15px; height: 15px; }
.saved-status.enabled { background: var(--goodBg); color: var(--good); }
.saved-schedule { color: var(--muted); font-size: 12px; margin: 8px 0 14px; overflow-wrap: anywhere; }
.saved-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 6px; }
.saved-filter-actions .button { min-height: 44px; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.saved-filter-actions .icon-button { border: 1px solid var(--line); color: var(--muted); }
.account-empty { text-align: center; padding: 24px 12px; }
.account-empty img { display: block; margin: 0 auto 12px; max-width: 100%; height: auto; }
.account-empty h3 { font-size: 20px; margin: 0 0 8px; }
.account-empty p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.vacancy-dialog[data-kind="saved-search"] .value { width: 100%; min-width: 0; box-sizing: border-box; min-height: 48px; font-size: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 10px 12px; }
.vacancy-dialog[data-kind="saved-search"] .check { margin: 14px 0; font-size: 14px; }
.vacancy-dialog[data-kind="saved-search"] .hint { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.saved-time-fields, .saved-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.saved-time-fields label { color: var(--muted); font-size: 13px; }
.saved-time-fields input { margin-top: 6px; }
#perr { color: var(--bad); }
@media (max-width: 359px) {
  .profile-promo { grid-template-columns: minmax(0, 1fr) 72px; padding: 16px 12px; gap: 10px; }
  .profile-links .list-row { gap: 10px; padding: 12px; }
  .profile-links .list-row-icon { width: 32px; height: 36px; }
  #notificationspage .pcard { padding: 14px 12px; }
  .saved-filter-card { padding: 12px; }
  #savecurrentfilters { padding-inline: 12px; font-size: 14px; }
}

/* Stage 8: account history, saved daily digests and existing guides. */
#applicationspage .ppage, #digestspage .ppage, #guidespage .ppage { padding: 16px 0 8px; max-width: 688px; }
#applicationspage h1, #digestspage h1, #guidespage h1 { margin: 0 0 10px; font-size: 28px; overflow-wrap: anywhere; }
#applicationspage .hint, #digesthint { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
#applicationsearchform { margin: 18px 0 12px; gap: 8px; }
#applicationsearchform .search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; background: var(--card); color: var(--muted); }
#applicationsearchform .search:focus-within { outline: 2px solid var(--accText); outline-offset: 2px; }
#applicationsearchform input { width: 100%; min-height: 48px; padding: 10px 0; border: 0; background: transparent; font-size: 14px; color: var(--ink); outline: none; }
#applicationspage .ghost { min-height: 48px; border-radius: 14px; color: var(--accText); font-size: 14px; font-weight: 600; }
#applicationfilters { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 16px; overflow-x: auto; padding: 4px 3px 8px; scrollbar-width: thin; }
#applicationfilters button { flex: 0 0 auto; min-height: 44px; padding: 9px 12px; border-radius: 999px; background: var(--card); color: var(--ink); font-size: 13px; }
#applicationfilters button[aria-pressed="true"] { background: var(--acc); color: #fff; }
#applicationmessage:empty, #digestmessage:empty, #applicationstatusmessage:empty { display: none; }
#applicationmessage, #digestmessage, #applicationstatusmessage { overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
#applicationmessage[data-error="true"], #digestmessage[data-error="true"], #applicationstatusmessage[data-error="true"] { color: var(--bad); }
#applicationlist, #digestlist { display: grid; gap: 12px; }
#applicationspage .application-item { margin: 0; padding: 16px; border-radius: 18px; }
.history-avatar { flex: 0 0 42px; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accSoft); color: var(--accText); font-size: 19px; font-weight: 800; }
#applicationspage .application-meta, #digestlist .application-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; }
.application-meta > div { display: grid; gap: 3px; min-width: 0; }
.application-meta strong { color: var(--ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.application-meta > div > span { color: var(--muted); font-size: 12px; line-height: 1.4; }
#applicationspage .application-item h3 { font-size: 16px; line-height: 1.4; margin: 8px 0; }
#applicationspage .application-title { min-height: 44px; width: 100%; font-size: inherit; font-weight: 700; line-height: inherit; color: var(--ink); }
#applicationspage .application-item p { margin: 6px 0; font-size: 13px; }
#applicationspage .application-archive { display: inline-flex; margin-top: 8px; font-size: 12px; color: var(--muted); background: var(--card2); border-radius: 8px; }
#applicationspage .application-controls { gap: 4px 10px; align-items: center; padding-top: 10px; margin-top: 10px; }
#applicationspage .application-controls .linkbtn { font-size: 12px; padding: 4px 0; }
.application-status { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--card2); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.application-status svg { width: 16px; height: 16px; flex-shrink: 0; }
.application-status[data-application-status="applied"] { background: var(--accSoft); color: var(--accText); }
.application-status[data-application-status="interview"] { background: var(--warnBg); color: var(--warn); }
.application-status[data-application-status="offer"] { background: var(--goodBg); color: var(--good); }
.application-status[data-application-status="rejected"] { background: var(--badBg); color: var(--bad); }
#applicationpager button { min-width: 44px; min-height: 44px; }
.application-sheet-title { margin: 8px 0; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.application-sheet-hint { font-size: 14px; color: var(--muted); line-height: 1.5; }
.application-status-choices { display: grid; gap: 8px; }
.application-status-choices button { min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; display: flex; justify-content: space-between; gap: 8px; align-items: center; cursor: pointer; }
.application-status-choices button[aria-pressed="true"] { background: var(--accSoft); color: var(--accText); border-color: var(--accLine); }
.application-status-choices button:disabled { opacity: .6; }
.history-empty, .history-error { border: 1px solid var(--line); border-radius: 18px; padding: 24px 18px; background: var(--card); text-align: center; }
.history-empty img { display: block; object-fit: contain; margin: 0 auto 12px; }
.history-empty h3, .history-error h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.history-empty p, .history-error p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.history-loading { display: grid; gap: 12px; }
.history-skeleton { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 18px; display: grid; gap: 16px; }
.history-skeleton .skeleton { height: 18px; border-radius: 8px; }
.history-skeleton .skeleton:first-child { width: 55%; height: 36px; }
.history-skeleton .skeleton:last-child { width: 70%; }
#digestlist .digest-row { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); }
#digestlist .digest-date { display: flex; align-items: center; gap: 12px; min-height: 84px; }
.digest-calendar { flex: 0 0 48px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--accSoft); color: var(--accText); border-radius: 14px; }
.digest-calendar b { font-size: 20px; line-height: 1.1; font-weight: 800; }
.digest-calendar > span { font-size: 12px; font-weight: 600; }
.digest-label { flex: 1; min-width: 0; display: grid; gap: 4px; }
.digest-label strong { font-size: 15px; line-height: 1.35; }
.digest-label > span { color: var(--muted); font-size: 13px; }
.digest-date > svg { flex-shrink: 0; width: 18px; color: var(--muted); }
#digestlist .digest-vacancy { display: grid; gap: 12px; padding: 16px; }
.digest-company { color: var(--muted); font-size: 14px; font-weight: 600; }
.digest-vacancy > strong { font-size: 16px; line-height: 1.4; }
.digest-open { display: flex; align-items: center; justify-content: space-between; color: var(--accText); font-size: 13px; }
#digestmore { min-height: 48px; margin-top: 16px; border-radius: 999px; color: var(--accText); font-size: 15px; font-weight: 600; }
.guides-tour { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 14px 8px; border: 1px solid var(--line); border-radius: 20px; padding: 18px 16px; background: var(--promo); margin: 20px 0 16px; }
.guides-tour h2 { font-size: 20px; line-height: 1.25; margin: 0 0 8px; }
.guides-tour p { font-size: 13px; line-height: 1.5; margin: 0; color: var(--text); }
.guides-tour img { grid-column: 2; grid-row: 1 / 3; width: 112px; height: 152px; object-fit: contain; align-self: center; }
.guides-tour .button { grid-column: 1; justify-self: start; min-height: 44px; padding: 10px 20px; }
#guidearticles { display: grid; gap: 12px; }
.guide-article { border: 1px solid var(--line); border-radius: 18px; background: var(--card); scroll-margin-top: calc(70px + var(--app-top)); }
.guide-article > summary { list-style: none; display: flex; gap: 12px; align-items: center; min-height: 84px; padding: 14px; cursor: pointer; }
.guide-article > summary::-webkit-details-marker { display: none; }
.guide-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; background: var(--accSoft); color: var(--accText); }
.guide-article summary > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; flex: 1; }
.guide-article summary strong { font-size: 16px; line-height: 1.35; color: var(--ink); }
.guide-article summary span > span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.guide-article summary > svg { flex-shrink: 0; width: 18px; color: var(--muted); }
.guide-article[open] summary > svg { transform: rotate(180deg); }
#guidespage .guide { padding: 0 16px 8px; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
#guidespage .guide h3 { font-size: 18px; margin: 22px 0 10px; border: 0; }
#guidespage .guide .box { border-radius: 14px; background: var(--card2); color: var(--text); }
#guidespage .guide .box.tip { background: var(--accSoft); color: var(--text); }
#guidespage .guide .box.warn { background: var(--warnBg); color: var(--warn); }
#guidespage .guide code { background: var(--card2); color: var(--ink); font-size: 13px; white-space: normal; }
#guidespage .guide a { color: var(--accText); min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 359px) {
  #applicationsearchform { flex-wrap: wrap; }
  #applicationsearchform .search { flex-basis: calc(100% - 26px); }
  #applicationsearchform > button { width: 100%; }
  #applicationspage .application-item { padding: 14px; }
  .guides-tour { grid-template-columns: minmax(0, 1fr) 82px; padding: 16px 14px; }
  .guides-tour img { width: 82px; height: 128px; }
  .guides-tour h2 { font-size: 18px; }
  .guide-article > summary { gap: 10px; padding: 12px; }
  .guide-article summary strong { font-size: 15px; }
}
