:root {
  --bg: #f5efe1;
  --panel: rgba(255, 252, 246, 0.88);
  --text: #14213d;
  --muted: #5f6b7a;
  --accent: #c44536;
  --accent-dark: #8f2d23;
  --ok: #1f7a4c;
  --ok-bg: #dcf7e6;
  --warn-bg: #eef1f6;
  --error: #8b1e2d;
  --error-bg: #ffe5e7;
  --border: rgba(20, 33, 61, 0.12);
  --shadow: 0 20px 60px rgba(20, 33, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(196, 69, 54, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(20, 33, 61, 0.12), transparent 24%),
    linear-gradient(135deg, #f7f1e3 0%, #f1e6d0 100%);
  min-height: 100vh;
}

.layout {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero {
  max-width: 720px;
  margin-bottom: 28px;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent-dark);
  margin: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.language-switcher select {
  border: 1px solid var(--border);
  background: rgba(255, 253, 248, 0.95);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
  margin: 0 0 18px;
}

.lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.check-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button {
  border-radius: 16px;
  border: 1px solid var(--border);
  font: inherit;
}

input {
  width: 100%;
  padding: 16px 18px;
  background: #fffdf8;
}

button {
  padding: 16px 22px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--warn-bg);
  color: var(--text);
  min-height: 52px;
}

.status.loading {
  background: #fff3d9;
}

.status.success {
  background: var(--ok-bg);
  color: var(--ok);
}

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

.result {
  margin-top: 22px;
  display: grid;
  gap: 24px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(20, 33, 61, 0.08);
}

.result.hidden {
  display: none;
}

.result.result-protected {
  background:
    radial-gradient(circle at top right, rgba(31, 122, 76, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(220, 247, 230, 0.96), rgba(255, 252, 246, 0.97));
}

.result.result-classic {
  background:
    radial-gradient(circle at top right, rgba(20, 33, 61, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(237, 240, 247, 0.98), rgba(255, 252, 246, 0.97));
}

.result.result-failure {
  background:
    radial-gradient(circle at top right, rgba(139, 30, 45, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255, 229, 231, 0.98), rgba(255, 252, 246, 0.97));
}

.verdict {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.verdict-mark {
  min-width: 132px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.verdict-copy {
  display: grid;
  gap: 10px;
  flex: 1;
}

.result-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.headline {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 0.97;
  max-width: 12ch;
}

.result h3 {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  min-width: 112px;
  padding: 16px;
  border-radius: 28px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 61, 0.08);
}

.badge.success {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.neutral {
  background: #edf0f7;
  color: var(--text);
}

.badge.error {
  background: var(--error-bg);
  color: var(--error);
}

.summary {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 62ch;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.signal-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.signal-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.signal-value {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.technical-details {
  border-top: 1px solid rgba(20, 33, 61, 0.08);
  padding-top: 16px;
}

.technical-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.technical-details summary::-webkit-details-marker {
  display: none;
}

.technical-details[open] summary {
  margin-bottom: 16px;
}

.code-block {
  margin: 8px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #132238;
  color: #f6f8fb;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 720px) {
  .layout {
    width: min(100% - 20px, 960px);
    padding-top: 24px;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .hero-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .verdict {
    flex-direction: column;
  }

  .verdict-mark {
    min-width: 0;
    justify-content: flex-start;
  }

  .badge {
    min-width: 0;
    width: fit-content;
    min-height: 56px;
    border-radius: 18px;
    padding: 12px 16px;
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }
}
