:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  color: #111827;
  background: #f6f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --blue: #075ee5;
  --green: #159a55;
  --amber: #914500;
  --red: #c93d4b;
  --muted: #52606d;
  --border: #dde2ea;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: #f6f8fb; }
header {
  min-height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
header strong { color: #111827; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 800; }
.divider { width: 1px; height: 22px; margin: 0 5px; background: var(--border); }
main { width: min(100% - 28px, 560px); margin: 0 auto; padding: 42px 0; }
.intro { margin-bottom: 24px; text-align: center; }
.intro h1 { margin: 0; font-size: clamp(28px, 8vw, 38px); line-height: 1.08; letter-spacing: -0.035em; }
.intro p { margin: 12px auto 0; max-width: 430px; color: var(--muted); line-height: 1.5; }
.panel { padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(25, 42, 68, 0.08); }
#loading-panel { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid #d9e1ec; border-top-color: var(--blue); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.status-line { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.status-dot { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #eaf8f0; }
.status-dot::after { content: "✓"; color: var(--green); font-size: 23px; font-weight: 800; }
.status-dot.warn { background: #fff5e8; }
.status-dot.warn::after { content: "!"; color: var(--amber); }
.status-dot.fail { background: #fff0f2; }
.status-dot.fail::after { content: "×"; color: var(--red); }
.status-line h2 { margin: 0; font-size: 20px; }
.status-line p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.summary-list { margin: 20px 0; display: grid; gap: 12px; }
.summary-list div { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; align-items: baseline; }
.summary-list dt { color: var(--muted); font-size: 13px; }
.summary-list dd { margin: 0; overflow-wrap: anywhere; font: 13px/1.45 SFMono-Regular, Consolas, monospace; }
.privacy-box { padding: 14px 15px; border-radius: 9px; background: #f3f6fa; }
.privacy-box strong { font-size: 13px; }
.privacy-box p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.consent { margin: 20px 0; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; line-height: 1.45; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.primary-button { width: 100%; min-height: 49px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font: 700 15px inherit; cursor: pointer; }
.primary-button:hover:not(:disabled) { background: #064fc0; }
.primary-button:disabled { opacity: 0.5; cursor: not-allowed; }
.primary-button:focus-visible, .secondary-button:focus-visible, .danger-button:focus-visible, .private-link:focus-visible, input:focus-visible { outline: 3px solid #075ee5; outline-offset: 2px; }
.legal-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.success-panel, .error-panel { text-align: center; }
.success-icon { width: 62px; height: 62px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 32px; }
.success-panel h2, .error-panel h2 { margin: 0; }
.success-panel code { display: block; margin: 18px 0; padding: 12px; border-radius: 7px; background: #eef4ff; color: #174da8; overflow-wrap: anywhere; }
.private-link { display: inline-block; margin-bottom: 12px; color: #075ee5; font-weight: 650; }
.secondary-button { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #7aa8eb; border-radius: 8px; color: #0750bd; background: #fff; font: 700 14px inherit; cursor: pointer; }
.secondary-button:hover { background: #f2f7ff; }
.danger-button { width: 100%; min-height: 46px; margin-top: 12px; padding: 0 14px; border: 1px solid #d5828c; border-radius: 8px; color: #9f2030; background: #fff; font: 700 14px inherit; cursor: pointer; }
.danger-button:hover { background: #fff4f5; }
.danger-button:disabled { opacity: 0.55; cursor: wait; }
.link-feedback { min-height: 20px; margin: 9px 0 0 !important; font-size: 12px; }
.inline-error { margin: 12px 0 0; color: var(--red); font-size: 13px; line-height: 1.45; }
.success-panel p, .error-panel p { color: var(--muted); line-height: 1.5; }
.expiry { font-size: 12px; }
.error-panel { border-color: #efc3c8; }
footer { margin-top: auto; padding: 22px 14px; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 460px) {
  header .divider, header > span:last-child { display: none; }
  main { padding-top: 30px; }
  .panel { padding: 20px; }
  .summary-list div { grid-template-columns: 1fr; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
