/* jobsearch.vrun.cz – mobile first, light theme, system fonts, 8 px grid */
:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --text: #1f2933;
  --muted: #5f6b7a;
  --line: #e2e6eb;
  --line-strong: #c9d0d8;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #e8efff;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --new: #0f766e;
  --radius: 8px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 var(--s1); }
h2 { font-size: 1.2rem; margin: var(--s4) 0 var(--s1); }
p { margin: 0 0 var(--s2); }
small, .muted, .hint { color: var(--muted); }
.hint { font-size: .875rem; margin: var(--s1) 0 0; }
.center { text-align: center; }
.lead { font-size: 1.05rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: var(--s1); z-index: 100; }
.skip:focus { left: var(--s1); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s2); }
.narrow { max-width: 720px; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-name { display: block; font-weight: 700; font-size: 1.05rem; }
.tagline { display: block; font-size: .8rem; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--text); padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
main { padding-top: var(--s3); padding-bottom: var(--s6); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .875rem; padding: var(--s3) 0 96px; }
.site-footer a { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; font: inherit; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0; }
.panel .actions { justify-content: center; }

/* panels, alerts */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s2); margin: var(--s2) 0; box-shadow: var(--shadow); }
.panel.subtle { box-shadow: none; background: var(--bg); }
.panel .hint + p { margin-top: var(--s2); }
.big-icon { font-size: 2.5rem; line-height: 1; margin-bottom: var(--s1); color: var(--accent); }
.big-icon.ok { color: var(--ok); }
.alert { padding: 12px var(--s2); border-radius: var(--radius); margin: var(--s2) 0; background: var(--warn-soft); }
.alert ul { margin: 4px 0 0; padding-left: 20px; }
.alert-error { background: var(--danger-soft); color: #7f1d1d; }
.alert-ok { background: var(--ok-soft); color: #14532d; }
.error { color: var(--danger); font-size: .9rem; margin: 4px 0 0; }
.status { font-weight: 600; }
.status-ok { color: var(--ok); }
.status-wait { color: #92400e; }
.status-off { color: var(--danger); }
.danger-zone { margin-top: var(--s4); padding-top: var(--s2); border-top: 1px solid var(--line); }

/* forms */
.form { margin-top: var(--s2); }
.form-section { margin-top: var(--s3); }
.field { border: 0; padding: 0; margin: 0 0 var(--s3); min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: var(--s1); padding: 0; }
.field legend .hint { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
input:focus, select:focus { border-color: var(--accent); }
.has-error input[type=email], .has-error input[type=text] { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.checks { display: grid; grid-template-columns: 1fr; gap: 0 var(--s2); }
.checks-compact { grid-template-columns: 1fr 1fr; }
.consent { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.inline-label { display: block; margin-bottom: var(--s1); }
.input-suffix { display: flex; align-items: center; gap: var(--s1); }
.input-suffix input { flex: 1; min-width: 0; }
.input-suffix span { color: var(--muted); white-space: nowrap; }
.carried { background: var(--accent-soft); border-radius: var(--radius); padding: 12px var(--s2); overflow-wrap: anywhere; }
.chips.slot-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; max-width: 32rem; }
.slot-chips .chip span { display: block; text-align: center; padding: 10px 0; border-radius: var(--radius); font-size: .9rem; font-variant-numeric: tabular-nums; }
.has-error .slot-chips .chip span { border-color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 4px; }

/* overview */
.intro .lead { margin-bottom: var(--s2); }
.filter-toggle { width: 100%; margin-bottom: var(--s2); }
.filters { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2); margin-bottom: var(--s2); }
.filters.open { display: block; }
.filter-group { border: 0; margin: 0 0 var(--s2); padding: 0; min-width: 0; }
.filter-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: var(--s1); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .875rem; background: var(--surface); }
.chip small { margin-left: 2px; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:checked + span small { color: #dbe5ff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.filter-actions { display: flex; gap: var(--s1); }
.filter-actions .btn { flex: 1; }
.js .no-js-only { display: none; }
.result-count { font-weight: 600; margin-bottom: var(--s1); }
.job-list { list-style: none; margin: 0; padding: 0; }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px var(--s2); margin-bottom: var(--s1); cursor: pointer; }
.job:hover { border-color: var(--line-strong); }
.job-title { font-weight: 600; font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.job-title:hover { text-decoration: underline; }
.job-meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.job-company { color: var(--text); }
.job-salary { font-weight: 600; color: var(--text); white-space: nowrap; }
.job-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag-source { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-new { background: var(--new); color: #fff; border-color: transparent; font-weight: 600; }
.tag-pt { background: var(--warn-soft); color: #92400e; border-color: transparent; }
.job-toggle { background: none; border: 0; padding: 4px 0; font: inherit; font-size: .875rem; color: var(--accent); cursor: pointer; margin-left: auto; }
.job-desc { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--line); font-size: .925rem; overflow-wrap: anywhere; }
.job-desc p { margin: 0 0 var(--s1); }
.cta { position: fixed; left: var(--s2); right: var(--s2); bottom: var(--s2); z-index: 20; display: flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 52px; padding: 12px var(--s2); background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; border-radius: 999px; box-shadow: 0 6px 20px rgba(29, 78, 216, .35); }
.cta:hover { background: var(--accent-hover); color: #fff; }

/* admin */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.admin-head h1 { margin: 0; }
.admin-search { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s1); }
.admin-search input { flex: 1 1 200px; width: auto; }
.admin-search select { flex: 0 1 180px; width: auto; }
.btn-small { min-height: 36px; padding: 4px 10px; font-size: .875rem; }
.table-stack td.row-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.subscribers .email { font-weight: 600; overflow-wrap: anywhere; }
.table-stack thead { display: none; }
.table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
.table-stack tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s1); padding: 4px 0; background: var(--surface); }
.table.table-stack { background: none; }
.table.table-stack td { border: 0; padding: 4px 12px; }
.table-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
.table-stack td.email::before { content: none; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s1); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .9rem; }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

@media (min-width: 600px) {
  .chips.slot-chips { gap: var(--s1); }
  .checks { grid-template-columns: 1fr 1fr; }
  .checks-compact { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .panel { padding: var(--s4); }
  .cta { left: auto; right: var(--s3); bottom: var(--s3); }
}

@media (min-width: 900px) {
  .table.table-stack { display: table; background: var(--surface); }
  .table-stack thead { display: table-header-group; }
  .table-stack tbody { display: table-row-group; }
  .table-stack tr { display: table-row; border: 0; padding: 0; }
  .table.table-stack td { display: table-cell; border-bottom: 1px solid var(--line); padding: 8px; }
  .table-stack td[data-label]::before { content: none; }
  h1 { font-size: 2rem; }
  .filter-toggle { display: none; }
  .layout { display: grid; grid-template-columns: 300px 1fr; gap: var(--s3); align-items: start; }
  .filters { display: block; position: sticky; top: var(--s2); max-height: calc(100vh - 32px); overflow-y: auto; }
  .job { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s2); padding: 10px var(--s2); margin-bottom: 0; border-radius: 0; border-bottom-width: 0; }
  .job:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .job:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom-width: 1px; }
  .job:only-child { border-radius: var(--radius); }
  .job-main { min-width: 0; }
  .job-side { text-align: right; }
  .job-title { font-size: 1rem; }
  .job-tags { grid-column: 1 / -1; margin-top: 2px; }
  .job-desc { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip span, .job, .nav a { transition: background-color .15s, border-color .15s, color .15s; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
