/* One surface, hairlines, one accent. Colour carries meaning only: the verdict. */
:root {
  --bg: #f7f6f3;
  --text: #22262a;
  --muted: #6b7178;
  --line: #e3e0da;
  --field: #ffffff;
  --accent: #2f4a5a;
  --accent-text: #ffffff;
  --match: #a3392e;
  --potential: #a8741c;
  --clear: #3f7a5a;
  --incomplete: #5a6b8c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161819;
    --text: #e6e4df;
    --muted: #979da3;
    --line: #2b2e31;
    --field: #1d2022;
    --accent: #a9c0cc;
    --accent-text: #161819;
    --match: #e08a7f;
    --potential: #dcb36a;
    --clear: #86c3a0;
    --incomplete: #a3b2cf;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- top bar: the name in the left corner, languages on the right ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.langs { display: flex; gap: 2px; }
.langs button {
  min-width: 48px;
  min-height: 40px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.langs button:hover { color: var(--text); }
.langs button[aria-pressed="true"] { color: var(--text); font-weight: 600; background: var(--line); }

/* ---- hero: what it does and where the data stays, centred ---- */
.hero { text-align: center; padding: 40px 0 28px; border-bottom: 1px solid var(--line); }
h1 { margin: 0 auto; font-size: 28px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; max-width: 32ch; }
.residency { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.residency .mark { color: var(--accent); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; margin-right: 8px; }

.status { margin: 10px 0 0; color: var(--muted); font-size: 13px; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--clear); }

main { padding-top: 28px; }
h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* ---- fields and buttons: 48 px and up ---- */
label { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 14px; color: var(--muted); }
input, select {
  font: inherit;
  font-size: 16px;            /* 16 px or more: no zoom on focus in mobile Safari */
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  min-height: 52px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input.big { font-size: 20px; min-height: 60px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.grow { flex: 1 1 280px; }
.inline, .query { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline { margin-top: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 8px 0 4px; }

button.primary {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 10px;
  min-height: 60px;
  min-width: 160px;
  padding: 0 32px;
  cursor: pointer;
  transition: filter 0.15s;
}
.inline button.primary { min-height: 52px; }
button.primary:hover { filter: brightness(1.1); }
button.primary:disabled { opacity: 0.55; cursor: wait; }
button.link {
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  color: var(--accent);
  cursor: pointer;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
}
button.link:hover { background: var(--line); }
button.secondary {
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  min-height: 48px;
  padding: 0 24px;
  cursor: pointer;
}
button.secondary::after { content: " \2193"; }
button.secondary:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
button.secondary:disabled { opacity: 0.55; cursor: wait; }

details { margin-top: 8px; }
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
  list-style: none;
  width: fit-content;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-right: 8px;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--accent); font-size: 18px; }
details[open] summary::before { content: "\2212"; }
.notice { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.error { color: var(--match); margin: 12px 0 0; font-size: 14px; }

#signin { text-align: center; max-width: 480px; margin: 0 auto; }
.consent { flex: 1 1 100%; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); text-align: left; min-height: 44px; padding-top: 4px; cursor: pointer; }
.consent input { width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.consent a, footer a { color: var(--accent); }

/* ---- terms page ---- */
.terms { padding-top: 32px; }
.terms h1 { text-align: left; max-width: none; font-size: 26px; }
.terms h2 { margin: 28px 0 8px; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.terms p, .terms li { font-size: 15px; max-width: 70ch; }
.terms ul { padding-left: 20px; }
#signin .inline { justify-content: center; text-align: left; }

/* ---- account ---- */
.account {
  display: flex;
  gap: 4px 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.account .plan { color: var(--muted); }
.account .link { margin-left: auto; }
.plan .out { color: var(--match); }

/* ---- result: verdict centred, table full width ---- */
.result { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.verdict {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.verdict::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.v-match { color: var(--match); }
.v-potential_match { color: var(--potential); }
.v-no_match { color: var(--clear); }
.v-incomplete, .v-limit { color: var(--incomplete); }
.result > p { margin: 8px auto 0; max-width: 52ch; text-align: center; font-size: 17px; }
.reasons { margin: 12px auto 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; text-align: center; }
.result > .muted { text-align: center; margin-top: 16px; font-size: 13px; }
.result > p.meta { margin: 12px auto 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.meta code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.actions { margin-top: 20px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 14px; }
.result h2 { margin-top: 40px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 500; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td .detail { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---- examples: whole rows are the targets ---- */
.examples-block { margin-top: 56px; }
.examples-block h2 { text-align: center; }
.examples { display: flex; flex-direction: column; }
.examples button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 4px;
  cursor: pointer;
}
.examples button:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--accent); }
.examples .hint { color: var(--muted); font-size: 13px; text-align: right; flex-shrink: 0; }

.news-block { margin-top: 56px; }
.news-block h2 { text-align: center; }
.news { display: flex; flex-direction: column; }
.news-item {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.news-item .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.news-item .what { color: var(--muted); font-size: 13px; text-align: right; }
@media (max-width: 560px) {
  .news-item { grid-template-columns: 1fr; }
  .news-item .what { text-align: left; }
}

.osint { margin-top: 40px; padding: 24px 0 0; border-top: 1px solid var(--line); text-align: center; }
.osint-head { display: flex; justify-content: center; align-items: baseline; gap: 10px; }
.osint-head h2 { margin: 0; }
.badge { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; }
.osint-help { margin: 10px auto 0; max-width: 52ch; }
.disclosure { margin: 6px auto 16px; max-width: 52ch; color: var(--potential); font-size: 14px; }
.osint-note { margin: 4px auto 0; max-width: 52ch; color: var(--muted); }
.osint-caution { margin: 20px 0 8px; font-size: 13px; color: var(--muted); }
#osint-results { text-align: left; }
.hit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hit a { color: var(--accent); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.hit a:hover { text-decoration: underline; }
.hit-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.hit p { margin: 6px 0 0; font-size: 14px; }
footer p { margin: 0; }
footer .partner { margin-top: 6px; }

footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .brand { font-size: 14px; }
  .hero { padding-top: 28px; }
  .query button.primary { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .verdict { font-size: 24px; }
}
