:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #0d1118;
  --panel-2: #111722;
  --text: #f4f7fb;
  --muted: #93a0b2;
  --line: #202938;
  --soft: #151d29;
  --accent: #7cf7c6;
  --accent-2: #83a7ff;
  --warn: #ffd27a;
  --danger: #ff8c9f;
  --ok: #76e6ad;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 0%, rgba(131, 167, 255, .12), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(124, 247, 198, .08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 99;
}
.skip:focus {
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: #000;
}
.app-shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  background: rgba(7, 9, 13, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(32, 41, 56, .7);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--panel-2), #080b10);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.nav a, .nav button, .button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(13, 17, 24, .75);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.nav a:hover, .nav button:hover, .button:hover { border-color: #344257; background: var(--panel-2); }
.button.primary { background: var(--accent); color: #07110d; border-color: transparent; font-weight: 800; }
.hero {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 24px;
  padding: 76px 0 36px;
}
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 12px 0 18px; max-width: 850px; font-size: clamp(42px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; }
.hero p { max-width: 760px; margin: 0; color: #c0c8d3; font-size: clamp(17px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-side {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(160deg, rgba(17,23,34,.92), rgba(10,13,18,.92));
  box-shadow: var(--shadow);
}
.kicker { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.live-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(147,160,178,.08); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(118,230,173,.09); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(255,210,122,.09); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,140,159,.09); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 44px; }
.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(13,17,24,.72);
}
.metric strong { display: block; margin-top: 6px; font-size: 28px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.section { padding: 28px 0; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 14px; }
.section h2 { margin: 0; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.035em; }
.section-head p { max-width: 700px; margin: 6px 0 0; color: var(--muted); }
.search {
  width: min(360px, 100%);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  background: var(--panel);
  color: var(--text);
}
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(160deg, rgba(17,23,34,.84), rgba(11,15,21,.84));
}
.card.clickable { cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
.card.clickable:hover { transform: translateY(-2px); border-color: #344257; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.card h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.card p { margin: 8px 0 0; color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: #c8d0db;
  background: #0a0e14;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.card-actions a, .card-actions button { min-height: 38px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(13,17,24,.78);
}
.panel-row {
  display: grid;
  grid-template-columns: minmax(150px,.8fr) minmax(220px,1.6fr) minmax(120px,.6fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.panel-row:first-child { border-top: 0; }
.panel-row small { color: var(--muted); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust-card { border-left: 3px solid var(--accent-2); }
.trust-card strong { display: block; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #dce3ec; font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #090d13;
  color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.output {
  white-space: pre-wrap;
  min-height: 150px;
  margin-top: 12px;
  border: 1px dashed #344257;
  border-radius: 12px;
  padding: 14px;
  background: #090d13;
  color: #dce3ec;
}
.empty { padding: 26px; text-align: center; color: var(--muted); }
.view[hidden] { display: none !important; }
.footer { display: flex; justify-content: space-between; gap: 18px; padding: 44px 0 34px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 36px; }
.footer a { color: #cdd6e2; }
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 12vh 14px 20px;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
}
.palette-backdrop[hidden] { display: none; }
.palette {
  width: min(620px, 100%);
  border: 1px solid #344257;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1017;
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
}
.palette input { width: 100%; min-height: 54px; border: 0; border-bottom: 1px solid var(--line); padding: 0 16px; background: transparent; color: var(--text); font-size: 16px; }
.palette-list { max-height: 390px; overflow: auto; padding: 8px; }
.palette-item { width: 100%; display: flex; justify-content: space-between; gap: 12px; border: 0; border-radius: 10px; padding: 11px 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.palette-item:hover, .palette-item[aria-selected="true"] { background: var(--soft); }
.palette-item small { color: var(--muted); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 54px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .card-grid, .trust-grid { grid-template-columns: 1fr 1fr; }
  .topbar { align-items: flex-start; }
  .nav { max-width: 62%; }
}
@media (max-width: 620px) {
  .app-shell { width: min(100% - 20px, 1180px); }
  .topbar { position: relative; flex-direction: column; }
  .nav { max-width: none; width: 100%; justify-content: flex-start; }
  .nav a { flex: 1 1 auto; }
  .hero { padding-top: 34px; }
  .metrics, .card-grid, .trust-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .section-head { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .panel-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
