/* Публичный поиск документов ГБО. Цвета — из дизайн-системы платформы:
   зелёный только на действиях, тёмная тема нейтрально-графитовая. */

:root {
  color-scheme: light dark;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-muted: #f6f8f7;
  --text: #161c1a;
  --text-muted: #6b7772;
  --border: #e2e7e5;
  --border-strong: #cdd5d2;
  --accent: #1c6a50;
  --accent-hover: #155440;
  --accent-soft: #eef6f2;
  --on-accent: #ffffff;
  --danger: #b04238;
  --danger-soft: #fbeceb;
  --shadow: 0 1px 2px rgba(22, 28, 26, 0.04), 0 8px 24px rgba(22, 28, 26, 0.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --surface: #1b1d21;
    --surface-muted: #161719;
    --text: #e9eaec;
    --text-muted: #a1a4ab;
    --border: #2c2f35;
    --border-strong: #3c4047;
    --accent: #4e9f81;
    --accent-hover: #7dbda3;
    --accent-soft: rgba(78, 159, 129, 0.16);
    --on-accent: #101114;
    --danger: #e08d83;
    --danger-soft: rgba(224, 141, 131, 0.13);
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
}

[hidden] {
  display: none !important;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 20px calc(48px + env(safe-area-inset-bottom));
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lang {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.title {
  margin: 20px 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.intro {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 18px;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.input--plate {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.input--plate {
  text-transform: uppercase;
}

.btn {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
}

.results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result {
  display: grid;
  gap: 12px;
}

.result__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result__title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

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

.plate {
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-muted);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.docs {
  display: grid;
  gap: 8px;
}

.doc {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.doc:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

@media (min-width: 560px) {
  .title {
    font-size: 32px;
  }
}
