/* =========================================================
   Публічний сайт (/, /jobs): світла палітра, шапка Board +
   список-рядки Console, обмежена ширина. Ізольовано під .pub.
   ========================================================= */

.pub {
    --bg: #ffffff;
    --panel: #f4f7fc;
    --ink: #10233f;
    --muted: #5b6a83;
    --line: #e2e8f2;
    --navy: #0e2a5e;
    --accent: #2f6bf0;
    --sky: #7fb0ff;
    --accent-ink: #ffffff;
    --shell: 1040px;
    --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    margin: 0;
    background: #f7f9fe;
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
.pub, .pub *, .pub *::before, .pub *::after { box-sizing: border-box; }
.pub a:focus-visible,
.pub button:focus-visible,
.pub input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pub .shell {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 28px);
}

/* ---- шапка (Board) ---- */
.pub .site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.pub .site-header .shell { padding-top: 18px; padding-bottom: 18px; }
.pub .site-head-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pub .brand { text-decoration: none; }
.pub .brand-word { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); }
.pub .brand-word b { color: var(--accent); font-weight: 800; }
.pub .tagline { color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .pub .tagline { display: none; } }

/* поля пошуку в шапці /jobs (компактний варіант; герой має власний бар нижче) */
.pub .search-form { display: flex; gap: 10px; }
.pub .f {
    flex: 1; min-width: 0;
    border: 1px solid var(--line); background: var(--panel); color: var(--ink);
    border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 14px;
}
.pub .f--loc { flex: 0 1 220px; }
.pub .f:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pub .f::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.pub .btn-search {
    border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
    font: inherit; font-weight: 600; font-size: 14px; padding: 11px 20px; cursor: pointer;
}
.pub .btn-search:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
/* iOS Safari при фокусі поля з font-size < 16px сам збільшує масштаб сторінки — вона стає
   ширшою за екран і не повертається після blur. На сенсорних пристроях тримаємо рівно 16px;
   maximum-scale=1 у viewport не ставимо — це вимкнуло б зум користувачу. */
@media (pointer: coarse) {
    .pub .f { font-size: 16px; }
}
@media (max-width: 600px) {
    .pub .search-form { flex-wrap: wrap; }
    .pub .search-form .f--loc { flex: 1 1 100%; }
}

/* ---- заголовок результатів ---- */
.pub main.shell { padding-top: 22px; padding-bottom: 56px; }
.pub .jobs-head { display: flex; align-items: baseline; gap: 12px; }
.pub .jobs-head h1 { font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.pub .jobs-count { color: var(--muted); font-size: 13px; }
.pub .no-results { color: var(--muted); padding: 26px 4px; }

/* ---- список-рядки (Console) ---- */
.pub .jobs-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
/* Одна колонка: бейдж хоста прибрано разом із URL першоджерела (ADR-0033). */
.pub .jrow {
    display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center;
    padding: 14px 8px; border-bottom: 1px solid var(--line); transition: background 0.14s;
}
.pub .jrow:hover { background: var(--panel); }
.pub .jbody { min-width: 0; }
.pub .jtitle { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; color: var(--ink); text-decoration: none; }
.pub .jrow:hover .jtitle { color: var(--accent); }
.pub .jmeta { font-size: 13px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .pub * { transition: none !important; } }

/* ---- пагінація ---- */
.pub .pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.pub .pager a { border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; font-size: 14px; color: var(--ink); text-decoration: none; background: var(--bg); }
.pub .pager a:hover { border-color: var(--accent); color: var(--accent); }
.pub .pager .muted { color: var(--muted); font-size: 13px; }

/* ---- головна (лендінг): центрований герой ---- */
.pub.home { min-height: 100vh; display: flex; flex-direction: column; }
/* width:100% дає main визначену ширину (margin:0 auto у .shell інакше стискає flex-елемент
   до ширини контенту); flex-центрування замість grid, щоб width:100% героя рахувався від main. */
.pub.home main.shell {
    flex: 1; width: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px clamp(16px, 4vw, 28px) 56px;
}
.pub .hero { width: 100%; max-width: 880px; text-align: center; }
.pub .hero-brand { text-decoration: none; display: inline-block; }
.pub .hero-logo { font-weight: 800; font-size: clamp(42px, 9vw, 72px); letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.pub .hero-logo b { color: var(--accent); font-weight: 800; }
.pub .hero-tag { color: var(--muted); font-size: 15px; margin: 14px 0 30px; }
.pub .hero-form { display: flex; gap: 10px; margin: 0 auto; }
@media (max-width: 560px) {
    .pub .hero-form { flex-wrap: wrap; }
    .pub .hero-form .f--loc { flex: 1 1 100%; }
    .pub .hero-form .btn-search { flex: 1 1 100%; }
}

/* ---- дропдаун підказок локацій (suggest.js, ADR-0024) ---- */
.pub .suggest-wrap { position: relative; flex: 0 1 220px; display: flex; }
.pub .suggest-wrap .f--loc { flex: 1; min-width: 0; }
.pub .hero-form .suggest-wrap { flex: 0 1 220px; }
.pub .suggest-list {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    margin: 0; padding: 6px; list-style: none;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16, 35, 63, 0.12);
    max-height: 320px; overflow-y: auto; text-align: left;
}
.pub .suggest-item {
    display: flex; flex-direction: column; gap: 1px;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
}
.pub .suggest-item:hover, .pub .suggest-item.active { background: var(--panel); }
.pub .suggest-label { font-size: 14px; color: var(--ink); }
.pub .suggest-sub { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
    .pub .search-form .suggest-wrap { flex: 1 1 100%; }
}
@media (max-width: 560px) {
    .pub .hero-form .suggest-wrap { flex: 1 1 100%; }
}

/* ---- лендінги (ADR-0067): крихти й модулі перелінковки ---- */
.pub .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pub .breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.pub .breadcrumb li + li::before { content: "›"; margin: 0 4px; color: var(--line); }
[dir="rtl"] .pub .breadcrumb li + li::before { content: "‹"; }
.pub .breadcrumb a { color: var(--muted); text-decoration: none; }
.pub .breadcrumb a:hover { color: var(--accent); }
.pub .link-blocks { margin-top: 36px; display: grid; gap: 22px; }
.pub .link-block h2 { font-size: 15px; letter-spacing: -0.01em; margin: 0 0 10px; }
.pub .chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pub .chips a {
    display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
    font-size: 13px; color: var(--ink); text-decoration: none; background: var(--bg);
}
.pub .chips a:hover { border-color: var(--accent); color: var(--accent); }
.pub.home .link-blocks { width: 100%; max-width: 880px; margin-top: 44px; }

/* ---- сторінка помилки (404 та інші перевиконані статуси) ---- */
.pub .error-page { padding: 40px 0; max-width: 560px; }
.pub .error-page h1 { font-size: 24px; letter-spacing: -0.01em; margin: 0 0 10px; }
.pub .error-page p { color: var(--muted); margin: 0 0 14px; }
.pub .legal { max-width: 720px; padding: 8px 0 24px; line-height: 1.55; }
.pub .legal h1 { font-size: 26px; letter-spacing: -0.01em; margin: 0 0 4px; }
.pub .legal h2 { font-size: 19px; margin: 28px 0 8px; }
.pub .legal h3 { font-size: 15px; margin: 18px 0 6px; }
.pub .legal p, .pub .legal li { margin: 0 0 10px; }
.pub .legal .legal-updated { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.pub .legal code { font-size: 0.92em; }
.pub .footer-legal { margin-left: 8px; white-space: nowrap; }
.pub .btn-link {
    display: inline-block; border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px;
    font-size: 14px; color: var(--ink); text-decoration: none; background: var(--bg);
}
.pub .btn-link:hover { border-color: var(--accent); color: var(--accent); }

/* ---- підвал ---- */
.pub .site-footer { border-top: 1px solid var(--line); margin-top: 8px; }
.pub .site-footer .shell { padding-top: 22px; padding-bottom: 22px; color: var(--muted); font-size: 13px; }
.pub .site-footer a { color: var(--muted); }
.pub .footer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pub .footer-about { min-width: 0; }

/* перемикач мови (ADR-0027): ~80 локалей у нативному <details> — розкривається без JS */
.pub .lang-switch { min-width: 0; }
.pub .lang-switch > summary {
    cursor: pointer; white-space: nowrap; list-style: none;
    border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; background: var(--bg);
}
.pub .lang-switch > summary::-webkit-details-marker { display: none; }
.pub .lang-switch > summary::after { content: " ▾"; color: var(--muted); }
.pub .lang-switch[open] > summary { border-color: var(--accent); color: var(--accent); }
.pub .lang-list {
    list-style: none; margin: 12px 0 0; padding: 0;
    columns: 4 180px; column-gap: 18px;
}
.pub .lang-list li { break-inside: avoid; padding: 3px 0; }
.pub .lang-list a { text-decoration: none; }
.pub .lang-list a:hover { color: var(--accent); }
.pub .lang-list [aria-current] { color: var(--ink); font-weight: 600; }

/* RTL (ar, he): flex/grid дзеркаляться самі за dir на <html>; лишається зафіксувати те,
   що прив'язане до сторони — вирівнювання дропдауна й напрямок стрілок пагінації. */
[dir="rtl"] .pub .suggest-list { text-align: right; }
.pub .pg--prev::before { content: "← "; }
.pub .pg--next::after { content: " →"; }
[dir="rtl"] .pub .pg--prev::before { content: "→ "; }
[dir="rtl"] .pub .pg--next::after { content: " ←"; }
