/* Pozivoteka — one stylesheet, no build step, no framework.
   The job of this page is to be read and scanned, not admired. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #16191d;
  --muted: #5b6570;
  --line: #dfe3e8;
  --link: #10457a;
  --link-hover: #0a2f55;
  --accent: #0d5c3c;
  --warn: #8a5300;
  --danger: #8c2f2f;
  --max: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --text: #e8eaed;
    --muted: #9aa4ae;
    --line: #2c3238;
    --link: #7db3e8;
    --link-hover: #a8cdf2;
    --accent: #6cc79b;
    --warn: #e0a23c;
    --danger: #e58b8b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--link); }
a:hover { color: var(--link-hover); }

.skip {
  position: absolute; left: -9999px;
  background: var(--bg); padding: .75rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- header ------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: baseline; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--text); }
.site-header nav a { margin-left: 1rem; text-decoration: none; }
.site-header nav a[aria-current="page"] { font-weight: 600; text-decoration: underline; }

main { padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.85rem; line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .25rem; }
.lede { color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }

/* --- filters ----------------------------------------------------------- */
.filters {
  display: grid; gap: .75rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  padding: 1rem; margin: 1.5rem 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.field-wide { grid-column: 1 / -1; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.field input, .field select, .field button {
  width: 100%; padding: .5rem .6rem; font: inherit;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px;
}
.field button { cursor: pointer; }
.field-reset { display: flex; align-items: flex-end; }

.result-count { color: var(--muted); font-size: .9rem; }

/* --- call list --------------------------------------------------------- */
.calls { list-style: none; margin: 0; padding: 0; }
.call-row { padding: .9rem 0; border-top: 1px solid var(--line); }
.call-row[hidden] { display: none; }
.call-title { font-size: 1.05rem; font-weight: 600; text-decoration: none; }
.call-title:hover { text-decoration: underline; }
.call-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  margin: .35rem 0 0; font-size: .875rem; color: var(--muted);
}
.empty { padding: 2rem 0; color: var(--muted); }

/* --- badges ------------------------------------------------------------ */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1.5rem; }
.badge {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; border: 1px solid currentColor;
}
.badge-open { color: var(--accent); }
.badge-closed, .badge-cancelled { color: var(--muted); }
.badge-suspended, .badge-upcoming { color: var(--warn); }
.badge-deadline { color: var(--danger); }
.badge-type { color: var(--muted); font-weight: 500; }

/* --- call page --------------------------------------------------------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.quote {
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  background: var(--surface); border-left: 3px solid var(--line); border-radius: 0 6px 6px 0;
}
.quote p { margin: 0 0 .5rem; }
.quote footer { font-size: .8rem; color: var(--muted); }

.fields { display: grid; grid-template-columns: minmax(11rem, 18rem) 1fr; gap: .1rem 1rem; margin: 0; }
.fields dt { font-weight: 600; padding: .45rem 0; border-top: 1px solid var(--line); }
.fields dd { margin: 0; padding: .45rem 0; border-top: 1px solid var(--line); }
@media (max-width: 34rem) {
  .fields { grid-template-columns: 1fr; }
  .fields dd { border-top: 0; padding-top: 0; }
}

.source-box {
  margin: 2rem 0 0; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.source-box h2 { margin-top: 0; }
.source-link { font-weight: 600; }

/* --- sources table ----------------------------------------------------- */
.table-scroll { overflow-x: auto; }
.sources { width: 100%; border-collapse: collapse; font-size: .925rem; }
.sources th, .sources td {
  text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sources thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sources .num { text-align: right; font-variant-numeric: tabular-nums; }
.exclusion { margin-bottom: 1.5rem; }

/* --- footer ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 1.5rem 0; font-size: .875rem; color: var(--muted);
}
.disclaimer { margin: 0 0 .75rem; }
.site-footer .meta { margin: 0; }
