:root {
  --bg: #0f172a;
  --bg-2: #111c33;
  --surface: #1e293b;
  --surface-2: #273449;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #3b82f6;
  --pass: #22c55e;
  --fail: #ef4444;
  --warn: #f59e0b;
  --info: #38bdf8;
  --radius: 14px;
  --tap: 48px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(150%) blur(8px);
}
.back-btn, .menu-btn {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text); border: 0; border-radius: 10px;
  cursor: pointer;
}
.back-btn:active, .menu-btn:active { background: var(--surface); }
.app-title { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
.brand { font-weight: 700; font-size: 12px; letter-spacing: 0.15em; color: var(--accent); }
.subtitle { font-size: 17px; font-weight: 600; margin-top: 2px; }

.screen { flex: 1; padding: 16px; max-width: 720px; width: 100%; margin: 0 auto; }
.app-footer { padding: 12px 16px 20px; text-align: center; color: var(--muted); font-size: 12px; }

.section-heading {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
  margin: 18px 4px 8px;
}
.section-heading:first-child { margin-top: 4px; }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, background 0.15s ease;
  -webkit-user-select: none;
}
.card:active { transform: scale(0.985); background: var(--surface-2); }
.card.disabled { opacity: 0.6; }
.card-row { display: flex; align-items: center; gap: 12px; }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(96, 165, 250, 0.12); color: var(--accent);
  flex-shrink: 0;
}
.card-body { flex: 1; min-width: 0; }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.card-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.card-arrow { color: var(--muted); flex-shrink: 0; }
.card-desc { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

.badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(96, 165, 250, 0.16); color: var(--accent);
  text-transform: uppercase;
}
.badge.live { background: rgba(34, 197, 94, 0.16); color: var(--pass); }
.badge.soon { background: rgba(245, 158, 11, 0.16); color: var(--warn); }
.badge.scdf { background: rgba(239, 68, 68, 0.16); color: var(--fail); }
.badge.ura  { background: rgba(56, 189, 248, 0.16); color: var(--info); }

.field { margin: 16px 0; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  width: 100%;
  padding: 0 18px;
  background: var(--accent-2); color: white;
  border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}
.btn:active { transform: scale(0.98); }
.btn:hover { background: var(--accent); }
.btn.secondary {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--surface-2); }
.btn.link {
  background: transparent; color: var(--accent);
  text-decoration: none; padding: 0; min-height: auto;
  font-weight: 600;
}

.result {
  margin-top: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  background: var(--surface);
}
.result.pass { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.06); }
.result.fail { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.06); }
.result.alert { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.06); }
.result-verdict { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.result-verdict.pass { color: var(--pass); }
.result-verdict.fail { color: var(--fail); }
.result-verdict.alert { color: var(--warn); }
.result-clause { font-size: 12px; color: var(--muted); margin-top: 4px; }
.result-detail { margin-top: 10px; font-size: 14px; line-height: 1.5; }
.result-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }

.intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.intro strong { color: var(--text); }

.coming-soon {
  text-align: center; padding: 32px 16px;
  color: var(--muted);
}
.coming-soon h2 { color: var(--text); margin: 0 0 8px; }

.soon-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--warn);
  background: rgba(245, 158, 11, 0.12);
  padding: 4px 10px; border-radius: 999px;
}

.detail-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.detail-heading {
  margin: 0 0 8px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent);
}
.detail-body {
  margin: 0;
  font-size: 14px; line-height: 1.55; color: var(--text);
}
.detail-kv {
  margin: 6px 0 0;
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  column-gap: 12px; row-gap: 6px;
  font-size: 13px;
}
.detail-kv dt {
  font-weight: 600; color: var(--text); margin: 0;
}
.detail-kv dd {
  color: var(--muted); margin: 0; line-height: 1.5;
}
@media (max-width: 480px) {
  .detail-kv { grid-template-columns: 1fr; row-gap: 8px; }
  .detail-kv dd { padding-left: 0; padding-bottom: 4px; border-bottom: 1px dashed var(--border); }
  .detail-kv dd:last-child { border-bottom: 0; }
}

.detail-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 16px;
}
.detail-actions .btn { flex: 1; min-width: 160px; }

.about-list { padding-left: 18px; line-height: 1.7; }
.about-list code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

@media (min-width: 720px) {
  .screen { padding: 24px; }
  .card-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-list-grid .card { margin-bottom: 0; }
}
