:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #14213d;
  --muted: #667085;
  --line: #e6ebf2;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --ok: #0f9f6e;
  --warn: #b7791f;
  --error: #c2410c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #dbeafe 0, transparent 32rem), var(--bg);
  color: var(--text);
}

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0; }
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(30px, 5vw, 52px); letter-spacing: -0.04em; }
h2 { font-size: 22px; }
.sub { color: var(--muted); margin-top: 10px; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr); gap: 20px; align-items: start; }
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.badge { border-radius: 999px; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.badge.muted { background: #eef2f7; color: var(--muted); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }

.form { display: grid; gap: 14px; }
.form.compact { grid-template-columns: 1fr; }
label { display: grid; gap: 7px; font-weight: 650; }
label span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hint { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
  background: #fff;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
button, .buy, .button-link {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: #e8eef7;
}
button:disabled { opacity: .6; cursor: wait; }
.primary, .buy { background: var(--primary); color: #fff; }
.primary:hover, .buy:hover { background: var(--primary-dark); }
.buy { white-space: nowrap; }

.notice { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #eef2f7; color: var(--muted); line-height: 1.5; }
.notice.ok { background: #dcfce7; color: #057a55; }
.notice.error { background: #ffedd5; color: var(--error); }
.result { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #f8fafc; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.button-link { display: inline-flex; align-items: center; gap: 6px; background: #dcfce7; color: #067647; }

.records { margin-top: 14px; display: grid; gap: 10px; }
.record { border: 1px solid var(--line); border-radius: 16px; padding: 13px; background: #f8fafc; display: grid; gap: 8px; }
.record-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record small { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .card-title { flex-direction: column; }
  .badge { white-space: normal; }
}
