/* =====================================================================
   JobsBazaar phone polish (loaded after jb.css; only phones, up to 720px)
   One calm, consistent system for the website on a phone and the installed app:
   slim top bar, crisp cards, compact facts, one bottom bar, readable text.
   ===================================================================== */
@media (max-width: 720px) {
    :root { --jbm-r: 14px; --jbm-border: var(--jb-line); --jbm-shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 14px -10px rgba(15,58,107,.28); }
    html { -webkit-text-size-adjust: 100%; }
    body.jb { font-size: 15px; line-height: 1.55; -webkit-tap-highlight-color: transparent; }
    .jb-container { padding-left: 14px; padding-right: 14px; }
    button, a, summary { touch-action: manipulation; }

    /* ---- top bar: slim, white, sticks to the top ---- */
    .jb-top { background: var(--jb-card); border-bottom: 1px solid var(--jbm-border); box-shadow: none; }
    :root.jb-standalone .jb-top { position: sticky; top: 0; z-index: 70; }
    .jb-top-row { min-height: 52px; padding-top: 6px; padding-bottom: 6px; gap: 8px; }
    .jb-logo img { height: 32px; width: auto; }
    .jb-theme, .jb-burger, .jb-top-row .jb-google { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
    .jb-tabs .jb-container { padding: 2px 14px 10px; }
    .jb-tabs a, .jb-tabs a:first-child { padding: 7px 13px; font-size: 12.5px; }

    /* ---- breadcrumb: one tidy line ---- */
    .jb-breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow: hidden; margin: 12px 0 10px; font-size: 12px; line-height: 1.3; color: var(--jb-ink-3); white-space: nowrap; }
    .jb-breadcrumb a { flex: none; color: var(--jb-ink-2); }
    .jb-breadcrumb i { flex: none; font-size: 9px; opacity: .55; }
    .jb-breadcrumb span { flex: none; }
    .jb-breadcrumb span:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

    /* ---- search and chips ---- */
    .jb-search { border: 1px solid var(--jbm-border); border-radius: var(--jbm-r); box-shadow: var(--jbm-shadow); padding: 4px; }
    .jb-search input[type=search], .jb-search input[type=text] { font-size: 14.5px; text-overflow: ellipsis; }
    .jb-search input::placeholder { font-size: 13.5px; }
    .jb-search .jb-btn { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
    .jb-poptags, .jb-job .jb-tags { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
    .jb-poptag { padding: 6px 12px; font-size: 12.5px; }
    .jb-section-head { margin: 16px 0 10px; }
    .jb-section-head h1, .jb-section-head h2, .jb-h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.005em; }

    /* ---- job cards ---- */
    .jb-jobs { display: grid; gap: 12px; }
    .jb-job { gap: 12px; padding: 13px; border: 1px solid var(--jbm-border); border-radius: var(--jbm-r); box-shadow: var(--jbm-shadow); }
    .jb-job-logo { width: 46px; height: 46px; border-radius: 12px; }
    .jb-job-title { font-size: 15.5px; line-height: 1.35; font-weight: 650; margin-bottom: 6px; }
    .jb-meta { gap: 3px 12px; font-size: 12.5px; color: var(--jb-ink-2); }
    .jb-meta .jb-org { font-size: 13px; }
    .jb-job .jb-tags { margin-top: 9px; }

    /* ---- job page ---- */
    .jb-detail { border: 1px solid var(--jbm-border); border-radius: 16px; overflow: hidden; box-shadow: var(--jbm-shadow); }
    .jb-detail-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
    .jb-detail-head .jb-job-logo { flex: none; width: 52px; height: 52px; border-radius: 12px; font-size: 19px; }
    .jb-detail-head > div:last-child { min-width: 0; flex: 1; }
    .jb-detail-head h1 { margin: 0 0 8px; font-size: 18px; line-height: 1.32; font-weight: 750; letter-spacing: -.01em; }
    .jb-detail-head .jb-meta { font-size: 13px; }
    .jb-detail-head .jb-tags { margin-top: 10px; }
    .jb-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; background: var(--jbm-border); border-top: 1px solid var(--jbm-border); border-bottom: 1px solid var(--jbm-border); }
    .jb-fact { padding: 10px 14px; border: 0; border-radius: 0; background: var(--jb-card); min-width: 0; }
    .jb-fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .jb-fact small { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--jb-ink-3); }
    .jb-fact b { display: block; font-size: 14px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
    .jb-deadline { margin: 0; padding: 10px 14px; border-radius: 0; border-width: 0 0 1px; font-size: 13.5px; }
    .jb-deadline i { font-size: 16px; }
    .jb-tagrow { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 12px 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
    .jb-tagrow::-webkit-scrollbar { display: none; }
    .jb-tagrow-label { flex: none; margin-right: 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
    .jb-tagrow a.jb-tag, .jb-tagrow .jb-tag { flex: none; white-space: nowrap; padding: 5px 11px; font-size: 12.5px; line-height: 1.3; font-weight: 500; }
    .jb-prose { padding: 14px; font-size: 15px; line-height: 1.7; }
    .jb-prose h2 { margin: 20px 0 8px; font-size: 17px; line-height: 1.3; }
    .jb-prose h3 { font-size: 15.5px; }
    .jb-prose ul, .jb-prose ol { padding-left: 20px; }
    .jb-prose li { margin-bottom: 4px; }
    .jb-prose table { display: block; overflow-x: auto; }
    .jb-notice { margin: 0 14px 12px; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
    .jb-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; }
    .jb-share > span { flex-basis: 100%; font-size: 12px; font-weight: 600; color: var(--jb-ink-3); }
    .jb-share .jb-btn { flex: 1; justify-content: center; padding: 9px 0; font-size: 14px; }
    .jb-related { margin-top: 22px; }

    /* ---- apply bar + app bottom bar: one slim stack ---- */
    .jb-has-applybar { padding-bottom: 78px; }
    .jb-applybar { gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--jbm-border); box-shadow: 0 -6px 16px -8px rgba(16,24,40,.2); }
    .jb-applybar-txt b { font-size: 14.5px; line-height: 1.2; }
    .jb-applybar-txt small { font-size: 11.5px; }
    .jb-applybar .jb-btn { height: 42px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 650; white-space: nowrap; }

    /* ---- cookie notice: a small sheet, not half the screen ---- */
    .jb-cookie { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; }
    .jb-cookie p, .jb-cookie div { font-size: 12.5px; line-height: 1.5; }
    .jb-cookie .jb-btn { padding: 8px 14px; min-height: 0; font-size: 13px; }

    /* ---- Learn / vocabulary ---- */
    .tool-head p { -webkit-line-clamp: 2; font-size: 13.5px; }
    .vl-card { padding: 16px; border-radius: 16px; }
    .vl-eyebrow { font-size: 11px; letter-spacing: .12em; }
    .vl-head h2 { margin: 4px 0 6px; font-size: 19px; line-height: 1.25; }
    .vl-head p { font-size: 13.5px; line-height: 1.55; }
    .vl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
    .vl-stats li { min-width: 0; padding: 10px 4px 9px; border-radius: 12px; text-align: center; }
    .vl-stats b { display: block; font-size: 20px; line-height: 1.1; }
    .vl-stats span { display: block; margin-top: 4px; overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: 9px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2; }
    .vl-lv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 8px; }
    .vl-lv > span { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--jb-ink-3); }
    .vl-lv button { min-width: 0; padding: 9px 4px; border-radius: 12px; font-size: 13.5px; text-align: center; }
    .vl-go { width: 100%; height: 48px; border-radius: 12px; font-size: 15px; }
    .vl-plan, .vl-guest { font-size: 13px; }

    /* ---- generic polish: page heads, forms, buttons ---- */
    .jb-pagehead h1 { font-size: 21px; line-height: 1.25; letter-spacing: -.01em; }
    .jb-btn { border-radius: 12px; }
    .jb-input, .jb-select, .jb-textarea, input[type=email], input[type=password], input[type=text], input[type=search], select, textarea { font-size: 16px; } /* no zoom-on-focus on iPhones */
}

/* installed app: slim bottom bar, apply bar sits right above it */
@media (max-width: 900px) {
    :root.jb-standalone .jb-bottomnav { padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
    :root.jb-standalone .jb-bottomnav a { gap: 2px; padding: 5px 2px 4px; font-size: 10.5px; border-radius: 10px; }
    :root.jb-standalone .jb-bottomnav a i { font-size: 19px; }
    :root.jb-standalone body.jb { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    :root.jb-standalone .jb-applybar { bottom: calc(54px + env(safe-area-inset-bottom)); padding-bottom: 8px; }
    :root.jb-standalone .jb-has-applybar { padding-bottom: 76px; }
    :root.jb-standalone .jb-cookie { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* employer logos are hidden on phones: titles and details use the full card width */
@media (max-width: 720px) {
    .jb-job > .jb-job-logo, .jb-detail-head > .jb-job-logo { display: none; }
    .jb-job { display: block; }
    .jb-job > .jb-job-body { width: 100%; min-width: 0; }
    .jb-detail-head { display: block; }
    .jb-detail-head > div:last-child { width: 100%; }
}