:root {
  color-scheme: dark;
  --bg: #0b0c0a;
  --surface: #12130f;
  --surface-soft: #171912;
  --surface-raised: #1c1e16;
  --line: rgba(231, 232, 199, 0.12);
  --line-strong: rgba(215, 214, 64, 0.38);
  --text: #f1f2e9;
  --muted: #a2a595;
  --quiet: #74786b;
  --accent: #d7d640;
  --accent-ink: #171805;
  --danger: #e48383;
  --warning: #e6bd68;
  --success: #75d5a8;
  --card-radius: 18px;
  --control-radius: 10px;
  --content: 1320px;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 5%, rgba(215, 214, 64, 0.075), transparent 28rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(241, 242, 233, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 242, 233, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a, button, input { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.check-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 10, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.check-header__inner,
.check-shell,
.check-footer {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.check-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.check-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.check-brand img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  object-fit: cover;
  image-rendering: pixelated;
}

.check-brand span { display: grid; gap: 2px; }
.check-brand strong { font-size: 15px; letter-spacing: -0.02em; }
.check-brand small {
  color: var(--quiet);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.check-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-link {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.store-link:hover { color: var(--text); }

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
}

.lang-button {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.lang-button:hover { background: rgba(241, 242, 233, 0.06); }
.lang-button:active { transform: scale(0.96); }
.lang-button.active { background: var(--accent); }

.language-flag {
  width: 25px;
  height: 17px;
  display: block;
  border-radius: 2px;
  box-shadow: none;
  stroke: none;
}

.check-shell {
  min-height: calc(100dvh - 154px);
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1.14fr);
  align-items: center;
  gap: clamp(54px, 8vw, 128px);
  padding-block: clamp(64px, 9vh, 104px);
}

.check-intro { max-width: 580px; }

.check-intro__mark {
  width: 92px;
  height: 92px;
  margin-bottom: 34px;
  position: relative;
}

.check-intro__mark::before {
  content: "";
  position: absolute;
  inset: -12px 18px 18px -12px;
  z-index: -1;
  border: 1px solid var(--line-strong);
  border-radius: var(--card-radius);
  background: rgba(215, 214, 64, 0.05);
  transform: rotate(-5deg);
}

.check-intro__mark img {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-strong);
  border-radius: var(--card-radius);
  object-fit: cover;
  image-rendering: pixelated;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.3);
}

.check-eyebrow {
  margin: 0 0 17px;
  color: var(--accent);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(48px, 5.8vw, 76px);
  font-weight: 790;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.check-lead {
  max-width: 48ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.65;
}

.privacy-note {
  max-width: 500px;
  margin-top: 40px;
  padding: 22px 0 0 24px;
  border-top: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}

.privacy-note strong { font-size: 14px; }
.privacy-note p {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.65;
}

.check-console {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--card-radius);
  background: rgba(18, 19, 15, 0.94);
  box-shadow: 0 34px 90px rgba(4, 5, 3, 0.34);
}

.console-heading {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.console-heading span,
.secure-label {
  color: var(--quiet);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.console-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.035em;
}

.secure-label { color: var(--accent); white-space: nowrap; }

.license-form { padding: 30px 28px; }
.license-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.license-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--bg);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.license-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(215, 214, 64, 0.08);
}

#license-key {
  min-width: 0;
  min-height: 58px;
  padding: 0 17px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 15px;
  letter-spacing: 0.025em;
}

#license-key::placeholder { color: var(--quiet); opacity: 0.82; }

.reveal-button {
  min-width: 74px;
  margin: 7px;
  padding-inline: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.reveal-button:hover { border-color: var(--line-strong); color: var(--text); }
.reveal-button:active { transform: translateY(1px); }

.field-help {
  min-height: 20px;
  margin: 9px 0 18px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.55;
}

.field-help.is-error { color: var(--danger); }

.check-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 780;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.check-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.check-button:active { transform: translateY(1px) scale(0.992); }
.check-button:disabled { cursor: wait; filter: saturate(0.65); opacity: 0.78; transform: none; }

.result-area {
  min-height: 220px;
  padding: 28px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.result-idle {
  min-height: 164px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.result-line { width: 48px; height: 2px; background: var(--line-strong); }
.result-idle p { margin: 0; color: var(--quiet); font-size: 13px; }

.result-loading {
  min-height: 164px;
  display: grid;
  align-content: center;
  gap: 13px;
}

.result-loading span {
  height: 17px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-raised), rgba(215, 214, 64, 0.12), var(--surface-raised));
  background-size: 220% 100%;
}

.result-loading span:nth-child(1) { width: 42%; }
.result-loading span:nth-child(2) { width: 72%; }
.result-loading span:nth-child(3) { width: 58%; }

@media (prefers-reduced-motion: no-preference) {
  .check-intro { animation: check-enter 620ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .check-console { animation: console-enter 680ms 80ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .result-loading span { animation: check-shimmer 1.25s ease-in-out infinite; }
}

@keyframes check-enter { from { opacity: 0; transform: translateY(20px); } }
@keyframes console-enter { from { opacity: 0; transform: translateX(24px); } }
@keyframes check-shimmer { to { background-position: -220% 0; } }

.result-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--quiet);
}

[data-state="success"] .status-dot { background: var(--success); }
[data-state="warning"] .status-dot { background: var(--warning); }
[data-state="error"] .status-dot { background: var(--danger); }

.result-summary small {
  color: var(--quiet);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.result-summary h3 { margin: 6px 0 0; font-size: 21px; letter-spacing: -0.025em; }
.result-summary p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin: 28px 0 0 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.result-details div { min-width: 0; }
.result-details dt {
  margin-bottom: 6px;
  color: var(--quiet);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.result-details dd { margin: 0; color: var(--text); font-size: 14px; font-weight: 720; overflow-wrap: anywhere; }

.check-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
}

.check-footer div { display: flex; gap: 22px; }
.check-footer a { color: var(--muted); text-decoration: none; }
.check-footer a:hover { color: var(--text); }

:is(a, button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

html[data-theme="light"] .check-header { background: rgba(243, 244, 237, 0.9); }
html[data-theme="light"] .check-console {
  background: rgba(251, 252, 247, 0.95);
  box-shadow: 0 30px 74px rgba(42, 45, 32, 0.14);
}
html[data-theme="light"] .license-input-row { background: var(--surface-raised); }
html[data-theme="light"] .result-area { background: var(--surface-accent); }
html[data-theme="light"] .check-intro__mark img { box-shadow: 0 22px 48px rgba(42, 45, 32, 0.18); }
html[data-theme="light"] .lang-button:hover { background: rgba(32, 34, 25, 0.06); }

@media (max-width: 900px) {
  .check-shell {
    grid-template-columns: 1fr;
    gap: 50px;
    width: min(680px, calc(100% - 40px));
    padding-block: 56px 72px;
  }
  .check-intro { max-width: 620px; }
  h1 { max-width: 11ch; }
}

@media (max-width: 600px) {
  .check-header { height: 68px; }
  .check-header__inner,
  .check-footer { width: calc(100% - 28px); }
  .check-brand span, .store-link { display: none; }
  .check-header__actions { gap: 4px; }
  .check-brand img { width: 40px; height: 40px; }
  .check-shell { width: calc(100% - 28px); padding-top: 42px; }
  .check-intro__mark { width: 72px; height: 72px; margin-bottom: 28px; }
  .check-intro__mark img { width: 72px; height: 72px; }
  h1 { font-size: clamp(43px, 14vw, 60px); }
  .privacy-note { margin-top: 30px; }
  .console-heading { min-height: 90px; padding: 21px 20px; }
  .secure-label { display: none; }
  .license-form, .result-area { padding: 24px 20px; }
  .license-input-row { grid-template-columns: 1fr; }
  .reveal-button { min-height: 38px; margin: 0 7px 7px; }
  .result-details { grid-template-columns: 1fr; margin-left: 0; }
  .check-footer { min-height: 108px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; }
  .check-footer div { gap: 16px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .check-header, .check-console { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
