:root {
  --bg-deep: #030711;
  --bg: #07111f;
  --panel: rgba(16, 29, 47, 0.74);
  --panel-strong: rgba(18, 34, 55, 0.92);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: #aeb8c8;
  --cyan: #6ed6ff;
  --gold: #d8b45f;
  --green: #7ee787;
  --red: #ff7b72;
  --orange: #f2cc60;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(110, 214, 255, 0.18), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(216, 180, 95, 0.14), transparent 28%),
    radial-gradient(circle at 50% 92%, rgba(126, 231, 135, 0.08), transparent 34%),
    linear-gradient(145deg, #050913 0%, var(--bg) 58%, #0d1828 100%);
}
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.62; }
.app { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 42px; }

.tool-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tool-nav__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--muted);
  background: rgba(255,255,255,.055); font-size: 12px; font-weight: 800;
  letter-spacing: .04em; text-decoration: none; transition: .25s ease;
}
.tool-nav__link:hover, .tool-nav__link[aria-current="page"] {
  border-color: rgba(110,214,255,.44); color: var(--text); background: rgba(110,214,255,.1);
}

.hero { padding: 18px 0 22px; }
.label, .section-label { margin: 0 0 8px; color: var(--gold); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: .05em; }
.lead { max-width: 820px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.card { border: 1px solid var(--border); border-radius: 22px; background: var(--panel); backdrop-filter: blur(16px); box-shadow: 0 22px 60px rgba(0,0,0,.25); }
.metric { padding: 16px 18px; }
.metric__title { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.metric__value { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: .03em; }
.metric__note { margin: 8px 0 0; color: var(--green); font-size: 12px; }
.section { margin-top: 18px; padding: 18px; }
.section h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: .06em; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading--controls { align-items: end; margin-bottom: 18px; }
.section-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }

.primary-button, .secondary-button {
  min-height: 42px; padding: 0 18px; border: 1px solid rgba(110,214,255,.42); border-radius: 999px;
  color: #06101c; background: linear-gradient(135deg, #8be5ff, var(--cyan)); font-weight: 900;
  box-shadow: 0 8px 22px rgba(110,214,255,.16);
}
.secondary-button { min-height: 34px; padding: 0 13px; color: var(--text); background: rgba(110,214,255,.09); font-size: 11px; }
.message { min-height: 1.4em; margin: 12px 0 0; color: var(--green); font-size: 12px; }
.message--error { color: var(--red); }
.progress { margin-top: 18px; }
.progress__track { overflow: hidden; height: 9px; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress__bar { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .35s ease; }
.progress__text { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.sort-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sort-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sort-controls select { min-height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #101c2c; font-size: 11px; font-weight: 700; }

.site-list { display: grid; gap: 10px; }
.site { overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.045)); transition: border-color .25s ease, background .25s ease; }
.site:hover, .site--expanded { border-color: rgba(110,214,255,.38); background: linear-gradient(135deg, rgba(110,214,255,.095), rgba(216,180,95,.05)); }
.site__summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; width: 100%; padding: 14px 16px; border: 0; color: inherit; background: transparent; text-align: left; }
.site__identity { min-width: 0; }
.site__name { margin: 0; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.site__url { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.site__score-wrap { display: grid; grid-template-columns: auto 58px; column-gap: 12px; align-items: center; min-width: 220px; }
.site__criterion { grid-column: 1; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.site__score { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 999px; font-size: 25px; font-weight: 950; font-variant-numeric: tabular-nums; }
.site__diff { grid-column: 1; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.score--good { color: #07130a; background: var(--green); }
.score--mid { color: #171102; background: var(--orange); }
.score--bad { color: #1c0707; background: var(--red); }
.score--none { color: var(--muted); background: rgba(255,255,255,.1); }
.site__details { padding: 0 16px 16px; border-top: 1px solid rgba(255,255,255,.09); }
.site__actions { display: flex; justify-content: flex-end; padding: 12px 0; }
.strategy-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.strategy-panel { min-width: 0; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(0,0,0,.16); }
.strategy-panel__heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.strategy-panel h4, .strategy-panel h5 { margin: 0; }
.strategy-panel h4 { color: var(--cyan); font-size: 13px; text-transform: uppercase; }
.strategy-panel h5 { margin-top: 16px; color: var(--gold); font-size: 11px; letter-spacing: .08em; }
.strategy-panel time { color: var(--muted); font-size: 10px; }
.detail-scores { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.detail-score { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 9px; border-radius: 11px; background: rgba(255,255,255,.05); }
.detail-score > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.detail-score > strong { font-size: 21px; font-weight: 950; background: none; }
.detail-score > small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; line-height: 1.4; }
.vitals { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.vitals span { padding: 6px 8px; border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.05); font-size: 9px; }
.vitals strong { color: var(--text); }
.audit-list { display: grid; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.audit-list li { padding: 8px 9px; border-radius: 9px; background: rgba(255,255,255,.045); }
.audit-list strong { color: var(--text); font-size: 10px; line-height: 1.45; }
.audit-list p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.audit-empty { color: var(--green); font-size: 10px; }
.empty-state { margin: 0; padding: 24px 14px; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; }
.footer { margin: 24px 0 0; color: rgba(174,184,200,.62); font-size: 10px; letter-spacing: .08em; text-align: center; }

@media (max-width: 820px) {
  .summary { grid-template-columns: 1fr; }
  .section-heading, .section-heading--controls { display: grid; }
  .sort-controls { justify-content: flex-start; }
  .strategy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app { width: min(100% - 18px, 1180px); padding-top: 16px; }
  .site__summary { grid-template-columns: minmax(0,1fr) 74px; gap: 8px; padding: 12px; }
  .site__score-wrap { min-width: 0; grid-template-columns: 1fr; justify-items: end; }
  .site__criterion, .site__diff { display: none; }
  .site__score { grid-column: 1; grid-row: 1; width: 52px; height: 52px; font-size: 22px; }
  .detail-scores { grid-template-columns: 1fr; }
  .sort-controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .sort-controls select { width: 100%; }
}
