:root {
  color-scheme: dark;
  --bg: #0f1013;
  --surface: #17181c;
  --card: #1d1e23;
  --raised: #222329;
  --border: #303139;
  --text: #f1f2f5;
  --muted: #9b9eaa;
  --subtle: #696d78;
  --red: #e43746;
  --green: #55c48b;
  --amber: #e7b14f;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 72% 8%, rgba(228,55,70,.075), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 10px; }
.brand > span { position: relative; font-size: 16px; font-weight: 750; letter-spacing: .055em; line-height: 1.15; }
.brand strong { color: var(--muted); font-weight: 650; }
.brand small { display: block; padding-top: 4px; color: var(--subtle); font-size: 8px; font-weight: 700; letter-spacing: .19em; }

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
}
.secure-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(85,196,139,.45); }

.intro { padding: 58px 0 34px; }
.eyebrow, .overline { margin: 0; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(228,55,70,.55); border-radius: 7px; color: #ff6774; font-size: 9px; }
.intro h1 { margin: 15px 0 9px; font-size: clamp(32px, 5vw, 45px); line-height: 1.08; letter-spacing: -.045em; }
.intro > p { max-width: 600px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); gap: 20px; align-items: start; }
.activation-card, .steps-card, .offline-card { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.018), transparent 42%), var(--card); box-shadow: 0 18px 50px rgba(0,0,0,.16); }
.activation-card { padding: clamp(22px, 4vw, 34px); }

.card-heading, .result-title-row { display: flex; align-items: center; gap: 14px; }
.heading-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: var(--red); color: white; font-size: 23px; font-weight: 800; letter-spacing: -.05em; box-shadow: 0 7px 20px rgba(228,55,70,.2); }
.card-heading .overline { margin-bottom: 5px; }
.card-heading h2, .result-title-row h2 { margin: 0; font-size: 18px; font-weight: 680; letter-spacing: -.025em; }

#activation-form { margin-top: 30px; }
label { display: block; margin-bottom: 9px; color: #d9dae0; font-size: 12px; font-weight: 650; }
input, textarea {
  width: 100%;
  border: 1px solid #383941;
  border-radius: 9px;
  outline: none;
  background: #141519;
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input { height: 46px; padding: 0 14px; font-family: "Segoe UI", Inter, system-ui, sans-serif; }
input::placeholder, textarea::placeholder { color: #666a75; }
input:focus, textarea:focus { border-color: rgba(228,55,70,.85); box-shadow: 0 0 0 3px rgba(228,55,70,.12); background: #17181d; }
#activation-code { text-transform: uppercase; letter-spacing: .055em; }
#hardware-id { min-width: 0; font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; letter-spacing: .03em; }
.field-hint { margin: 8px 0 22px; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row span { color: var(--subtle); font-size: 10px; }
.paste-row { display: flex; gap: 8px; }
.paste-row input { flex: 1; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(228,55,70,.3); outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: .7; }
.button-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(228,55,70,.13); }
.button-primary:hover:not(:disabled) { background: #f04756; }
.button-secondary { min-width: 88px; border-color: #383941; background: var(--raised); color: #e2e3e7; }
.button-secondary:hover:not(:disabled) { border-color: #50515a; background: #292a31; }
.submit-button { width: 100%; min-height: 48px; margin-top: 2px; }
.button-arrow { margin-left: auto; font-size: 18px; font-weight: 400; }
.button-label { margin-left: auto; }
.spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading .button-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 23px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.06); color: var(--subtle); font-size: 10px; line-height: 1.6; }
.lock-icon { flex: 0 0 auto; color: var(--green); font-size: 13px; }
.status-message { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.5; }
.status-message[data-kind="error"] { border-color: rgba(228,55,70,.3); color: #ff8b95; }
.status-message[data-kind="success"] { border-color: rgba(85,196,139,.3); color: #80d9aa; }

.side-column { display: grid; gap: 14px; }
.steps-card { padding: 25px 23px 20px; }
.steps-card h2 { max-width: 260px; margin: 9px 0 22px; font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.steps-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.055); }
.steps-list li > span { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(228,55,70,.4); border-radius: 8px; color: #ff7782; font-size: 9px; font-weight: 750; }
.steps-list strong { display: block; padding: 3px 0 5px; font-size: 12px; }
.steps-list p, .offline-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.offline-card { display: flex; align-items: flex-start; gap: 13px; padding: 18px; background: rgba(85,196,139,.045); }
.offline-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(85,196,139,.25); border-radius: 10px; color: var(--green); font-size: 21px; }
.offline-card strong { display: block; margin: 1px 0 5px; font-size: 11px; }

.license-result { margin-top: 24px; padding: 19px; border: 1px solid rgba(85,196,139,.26); border-radius: 12px; background: rgba(85,196,139,.045); }
.success-check { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: rgba(85,196,139,.14); color: var(--green); font-size: 16px; }
.result-title-row { gap: 11px; }
.result-title-row .overline { margin-bottom: 4px; color: var(--green); }
.result-title-row h2 { font-size: 15px; }
.result-copy { margin: 15px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.65; }
#signed-license { min-height: 90px; padding: 11px; resize: vertical; overflow-wrap: anywhere; font-family: Consolas, "SFMono-Regular", monospace; font-size: 10px; line-height: 1.55; }
.copy-license { width: 100%; margin-top: 10px; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 36px; color: #696d78; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.footer b { padding: 0 5px; color: var(--red); }

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 560px); }
  .topbar { height: 72px; }
  .secure-badge { padding: 8px 9px; font-size: 8px; letter-spacing: .08em; }
  .intro { padding: 40px 0 25px; }
  .content-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr; }
  .steps-card { padding: 21px; }
  .footer { padding-top: 23px; font-size: 8px; }
}

@media (max-width: 430px) {
  .shell { width: calc(100% - 24px); }
  .topbar { height: 68px; }
  .brand { gap: 8px; }
  .brand img { width: 33px; height: 33px; }
  .brand > span { font-size: 14px; }
  .secure-badge { gap: 6px; padding: 7px; font-size: 7px; }
  .activation-card { padding: 19px 16px; }
  .paste-row { gap: 6px; }
  .button-secondary { min-width: 72px; padding: 0 10px; }
  .footer { flex-direction: column; gap: 8px; }
}
