/* Hire Yourself: one light theme, system fonts (no font downloads), logical properties so the same rules work
   right-to-left (Arabic, Dari). Colours: the @ukrainian.refugee brand (white, ink #111, teal accent); the teal used
   for text is darker than the brand teal so it is readable on white. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #5f5f5f;
  --rule: #e0e0e0;
  --soft: #f6f7f7;
  --accent: #2cc9cc;
  --accent-ink: #0a6f71;
  --accent-soft: #e0f8f8;
  --yes: #0e6b3f;
  --yes-bg: #e2f5ea;
  --if: #7a4f00;
  --if-bg: #fff0d1;
  --no: #a1271c;
  --no-bg: #fde6e3;
  --unclear: #4a4a4a;
  --unclear-bg: #ececec;
  --depends: #0a6f71;
  --depends-bg: #e0f8f8;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 2px;
}

.wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ── header ─────────────────────────────────────────────────────────────────────────────────────────────────────── */

.site-header {
  border-block-end: 1px solid var(--rule);
  padding-block: 20px 12px;
}

.brand {
  display: inline-block;
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.15;
}

.brand::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin-block-start: 6px;
  background: var(--accent);
  border-radius: 2px;
}

.tagline {
  margin: 8px 0 2px;
  font-size: 16px;
  font-weight: 600;
}

.by {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.by:hover {
  text-decoration: underline;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 14px;
}

.langs a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  min-height: 34px;
}

.langs a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ── language suggestion ───────────────────────────────────────────────────────────────────────────────────────── */

.lang-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--accent-soft);
  font-size: 15px;
}

.lang-hint[hidden] {
  display: none;
}

.lang-hint a {
  font-weight: 700;
}

.lang-hint button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--muted);
}

/* ── article ───────────────────────────────────────────────────────────────────────────────────────────────────── */

main {
  padding-block: 24px 40px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 36px 0 12px;
}

p {
  margin: 0 0 14px;
}

blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  border-inline-start: 4px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

[dir="rtl"] blockquote {
  border-radius: var(--radius) 0 0 var(--radius);
}

blockquote p:last-child {
  margin-block-end: 0;
}

.note {
  padding: 10px 14px;
  background: var(--if-bg);
  border-radius: var(--radius);
  font-size: 15px;
}

/* ── search ────────────────────────────────────────────────────────────────────────────────────────────────────── */

.search {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 20px -16px 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-block-end: 1px solid var(--rule);
}

.search label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-block-end: 6px;
}

.search input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 10px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.search input:focus,
.notify input[type="email"]:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent-ink);
}

.q-count {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 1em;
}

/* ── permit cards ──────────────────────────────────────────────────────────────────────────────────────────────── */

.permits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.permit {
  border: 1px solid var(--rule);
  border-inline-start: 5px solid var(--kind-ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}

.permit[hidden] {
  display: none;
}

.permit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.permit h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.badge {
  flex: none;
  max-width: 45%;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--kind-bg);
  color: var(--kind-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.cond {
  margin: 8px 0 0;
}

.src {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.k-yes {
  --kind-ink: var(--yes);
  --kind-bg: var(--yes-bg);
}

.k-if {
  --kind-ink: var(--if);
  --kind-bg: var(--if-bg);
}

.k-no {
  --kind-ink: var(--no);
  --kind-bg: var(--no-bg);
}

.k-unclear {
  --kind-ink: var(--unclear);
  --kind-bg: var(--unclear-bg);
}

.k-depends {
  --kind-ink: var(--depends);
  --kind-bg: var(--depends-bg);
}

.no-results {
  padding: 12px 14px;
  background: var(--soft);
  border-radius: var(--radius);
}

.no-results[hidden] {
  display: none;
}

/* ── notify form ───────────────────────────────────────────────────────────────────────────────────────────────── */

.notify {
  margin-block-start: 32px;
  padding: 20px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.notify h2 {
  margin-block-start: 0;
}

.field {
  display: block;
  font-weight: 700;
  margin-block-end: 6px;
}

.notify input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 10px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
  font-size: 15px;
  line-height: 1.45;
}

.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent-ink);
}

.notify button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.notify button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.status {
  margin: 12px 0 0;
  font-weight: 600;
}

.status.error {
  color: var(--no);
}

.status.ok,
#notify-status.ok {
  color: var(--yes);
}

/* Without JavaScript the form posts and comes back to #notify-ok. */
#notify-ok {
  display: none;
}

#notify-ok:target {
  display: block;
}

.hp {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── footer, legal ─────────────────────────────────────────────────────────────────────────────────────────────── */

.site-footer {
  border-block-start: 1px solid var(--rule);
  padding-block: 20px 32px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
}

.legal h2 {
  font-size: 19px;
  margin-block-start: 28px;
}

@media (min-width: 720px) {
  .site-header {
    padding-block: 28px 16px;
  }

  h1 {
    font-size: 34px;
  }

  .permit {
    padding: 14px 18px;
  }

  .notify {
    padding: 24px;
  }

  .notify button {
    width: auto;
    padding-inline: 28px;
  }
}
