:root {
  --bg: #0f1220;
  --bg-soft: #171a2b;
  --card: #1c2036;
  --card-2: #222741;
  --line: #2c3252;
  --text: #e8eaf2;
  --muted: #9aa0bd;
  --brand: #4f8cff;
  --brand-2: #6ee7b7;
  --pass: #34d399;
  --warn: #fbbf24;
  --fail: #f87171;
  --na: #6b7280;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.25);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -200px, #1b2140 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(15,18,32,.7);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-badge {
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; letter-spacing: .3px;
}
.brand-name { font-size: 16px; letter-spacing: .2px; }
.lang-switch { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.lang-switch button.active { background: var(--brand); color: #fff; }

/* hero */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 12px; line-height: 1.2; }
.lead { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0 auto 28px; }

.check-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.check-form input {
  flex: 1; min-width: 0;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 14px 16px; border-radius: var(--radius); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.check-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,140,255,.2); }
.check-form button {
  background: linear-gradient(135deg, var(--brand), #3b6fd4);
  color: #fff; border: 0; padding: 0 24px; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .08s, filter .15s;
}
.check-form button:hover { filter: brightness(1.07); }
.check-form button:active { transform: translateY(1px); }
.check-form button:disabled { opacity: .6; cursor: default; }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* loading */
.loading { text-align: center; padding: 40px 0; color: var(--muted); }
.spinner {
  width: 42px; height: 42px; margin: 0 auto 16px;
  border: 4px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* error */
.error-box {
  background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4);
  color: #fecaca; padding: 16px 18px; border-radius: var(--radius); margin: 20px 0;
}

/* result */
.result { padding: 8px 0 40px; }
.score-card {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 10px;
}
.gauge { --p: 0; --c: var(--brand);
  width: 120px; height: 120px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0);
  display: grid; place-items: center; position: relative;
}
.gauge::before { content: ""; position: absolute; inset: 10px; background: var(--card); border-radius: 50%; }
.gauge-inner { position: relative; text-align: center; }
.gauge-score { font-size: 30px; font-weight: 800; line-height: 1; }
.gauge-grade { font-size: 13px; color: var(--muted); margin-top: 2px; }
.score-meta { flex: 1; min-width: 240px; }
.score-meta h2 { margin: 0 0 6px; font-size: 20px; }
.score-url { color: var(--brand-2); word-break: break-all; font-size: 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.pill.pass { color: var(--pass); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.pill.warn { color: var(--warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.1); }
.pill.fail { color: var(--fail); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.1); }

.checks { display: grid; gap: 12px; margin-top: 18px; }
.check {
  background: var(--card); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 12px; padding: 16px 18px;
}
.check.pass { border-left-color: var(--pass); }
.check.warn { border-left-color: var(--warn); }
.check.fail { border-left-color: var(--fail); }
.check.na   { border-left-color: var(--na); opacity: .75; }
.check-head { display: flex; align-items: center; gap: 10px; }
.check-status {
  font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px;
}
.check.pass .check-status { color: #052e1c; background: var(--pass); }
.check.warn .check-status { color: #3a2a00; background: var(--warn); }
.check.fail .check-status { color: #3a0a0a; background: var(--fail); }
.check.na   .check-status { color: #fff; background: var(--na); }
.check-title { font-weight: 700; font-size: 16px; flex: 1; }
.check-weight { font-size: 12px; color: var(--muted); }
.check-detail { margin: 10px 0 0; color: var(--text); font-size: 14.5px; }
.check-fix { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.check-fix b { color: var(--brand-2); font-weight: 700; }
.check-law { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 22px 0 40px; }
.law-note { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.disclaimer { color: var(--muted); font-size: 12.5px; margin: 0 0 6px; }
.copyright { color: var(--muted); font-size: 12.5px; margin: 0; }

.hidden { display: none !important; }

@media (max-width: 560px) {
  .check-form { flex-direction: column; }
  .check-form button { padding: 14px; }
  .score-card { justify-content: center; text-align: center; }
}
