:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ef;
  --panel: #ffffff;
  --surface: #f4f7fb;
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --success: #047857;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); min-height: 100vh; }
a { color: inherit; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--accent); border-radius: 11px; box-shadow: 0 8px 18px rgba(79,70,229,.25); }
.status-pill { color: var(--accent-dark); background: #eeedff; border: 1px solid #dcdaff; border-radius: 999px; padding: 8px 12px; font-size: .82rem; font-weight: 700; }

.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 70px 0 50px; }
.hero { display: grid; grid-template-columns: 1.5fr .7fr; align-items: end; gap: 36px; margin-bottom: 34px; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 900; letter-spacing: .16em; margin: 0 0 13px; }
h1 { max-width: 780px; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.055em; margin: 0; }
.lead { max-width: 740px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; margin: 24px 0 0; }
.api-badge { display: grid; gap: 9px; padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 18px; }
.api-badge code { background: #111827; color: #f8fafc; padding: 12px 14px; border-radius: 10px; overflow-x: auto; }

.grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 14px 34px rgba(15,23,42,.055); }
.card-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 27px; }
.card h2 { margin: 0 0 7px; font-size: 1.25rem; }
.card p { color: var(--muted); line-height: 1.55; margin: 0; }
.step { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #eeedff; color: var(--accent-dark); font-weight: 900; font-size: .78rem; }

form label { display: block; font-size: .88rem; font-weight: 800; margin-bottom: 9px; }
.input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 12px; color: var(--ink); font-size: 1rem; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
button { min-height: 52px; border: 0; border-radius: 12px; padding: 0 20px; color: white; background: var(--accent); font-size: .95rem; font-weight: 800; cursor: pointer; box-shadow: 0 9px 20px rgba(79,70,229,.25); }
button:hover { background: var(--accent-dark); }
button:disabled { opacity: .65; cursor: wait; }

.result { margin-top: 18px; padding: 16px; border-radius: 13px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; overflow-wrap: anywhere; }
.result.error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.result a { font-weight: 800; }
pre { margin: 12px 0; overflow-x: auto; padding: 17px; border-radius: 13px; background: #111827; color: #e2e8f0; font-size: .86rem; line-height: 1.65; }
.invalid-label { margin-top: 18px !important; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.checks { margin-top: 20px; }
.check-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.check-grid span { color: #334155; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 13px; font-size: .88rem; font-weight: 700; }
footer { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 20px 0 34px; display: flex; justify-content: space-between; color: var(--muted); font-size: .84rem; }
footer a { color: var(--accent); font-weight: 800; text-decoration: none; }

@media (max-width: 850px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .api-badge { max-width: 520px; }
  .check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .topbar { height: auto; min-height: 64px; padding: 12px 18px; }
  .status-pill { display: none; }
  .shell { width: min(100% - 24px, 1180px); padding-top: 45px; }
  .card { padding: 20px; border-radius: 17px; }
  .input-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  footer { width: calc(100% - 24px); flex-direction: column; gap: 10px; }
}
