:root {
  --bg: #07101a;
  --panel: rgba(13, 23, 35, .86);
  --panel-strong: #0d1825;
  --panel-soft: rgba(16, 28, 42, .68);
  --border: rgba(134, 157, 185, .17);
  --border-strong: rgba(134, 157, 185, .28);
  --text: #edf5ff;
  --muted: #8da0b8;
  --muted-2: #60748c;
  --accent: #75a9ff;
  --green: #52e0ad;
  --yellow: #f2c76b;
  --red: #ff7084;
  --cyan: #6ce6ff;
  --shadow: 0 24px 90px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(65, 129, 224, .18), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(37, 206, 240, .09), transparent 28%),
    linear-gradient(180deg, #07101a 0%, #08111c 55%, #060d16 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea { font: inherit; }
button { border: 0; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ambient { position: fixed; width: 360px; height: 360px; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .15; }
.ambient-a { top: 12%; left: -160px; background: #2475d8; }
.ambient-b { top: 40%; right: -180px; background: #14c7da; }

.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 850; letter-spacing: -.035em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #182c47, #0b1726); border: 1px solid var(--border-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.top-chip, .top-version { padding: 8px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.chip-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 14px rgba(82,224,173,.7); }

.hero { padding: 92px 0 58px; }
.hero-copy { max-width: 850px; }
.eyebrow { margin-bottom: 14px; color: var(--accent); font-size: 11px; line-height: 1; font-weight: 850; letter-spacing: .17em; }
h1 { margin: 0 0 20px; font-size: clamp(46px, 7vw, 80px); line-height: .98; letter-spacing: -.065em; }
h1 span { color: #9eb0c7; }
.hero-copy p { max-width: 790px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }

.test-card { margin-top: 38px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 24px; background: linear-gradient(160deg, rgba(18, 31, 47, .96), rgba(9, 17, 27, .92)); box-shadow: var(--shadow); }
.test-card-top { display: flex; gap: 16px; align-items: center; padding: 6px 6px 18px; border-bottom: 1px solid var(--border); }
.label, .mini-label, .panel-title { color: var(--muted-2); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.address { margin-top: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 42px; height: 42px; margin-left: auto; border-radius: 12px; background: #0a1522; border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.test-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 6px 6px; }
.session-meta { display: grid; gap: 5px; }
.session-state { display: flex; align-items: center; gap: 9px; color: #b7c5d7; font-size: 13px; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: #66758b; box-shadow: 0 0 0 5px rgba(102,117,139,.1); }
.state-dot.live { background: var(--green); box-shadow: 0 0 0 5px rgba(82,224,173,.09); }
.session-expire { color: var(--muted-2); font-size: 11px; }
.primary-btn, .secondary-btn, .ghost-btn { min-height: 46px; padding: 0 17px; border-radius: 13px; cursor: pointer; font-weight: 800; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.primary-btn { background: var(--text); color: #07101a; }
.primary-btn span { margin-left: 8px; }
.secondary-btn { background: #102237; color: var(--text); border: 1px solid var(--border-strong); }
.ghost-btn { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.primary-btn:hover:not(:disabled), .secondary-btn:hover:not(:disabled), .ghost-btn:hover:not(:disabled), .icon-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(117,169,255,.38); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; }
.connection-note { margin-top: 12px; display: flex; justify-content: flex-end; gap: 7px; color: var(--muted-2); font-size: 10px; letter-spacing: .04em; flex-wrap: wrap; }
.connection-note strong { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.workflow { padding: 40px 0 50px; border-top: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; }
.section-heading h2, .results-header h2, .developer-card h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.workflow-note { max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: right; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.step-card { min-height: 210px; position: relative; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel-soft); }
.step-no { position: absolute; top: 18px; right: 20px; color: #42566e; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 800; }
.step-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #0d1c2d; border: 1px solid var(--border); color: var(--cyan); font-size: 20px; }
.step-card h3 { margin: 28px 0 8px; font-size: 17px; }
.step-card p { margin: 0; max-width: 280px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.results { padding-top: 10px; }
.hidden { display: none !important; }
.results-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 20px; }
.report-overview { display: grid; grid-template-columns: 1.45fr .8fr; gap: 12px; }
.score-panel, .message-panel, .issues-panel, .checks-wrap, .developer-card { border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: 0 18px 70px rgba(0,0,0,.15); }
.score-panel { display: flex; align-items: center; gap: 28px; padding: 28px; }
.score-ring { --score: 0; width: 148px; height: 148px; flex: 0 0 148px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--score) * 1%), rgba(77,98,123,.18) 0); position: relative; }
.score-ring::after { content: ''; position: absolute; inset: 9px; background: #0b1724; border-radius: 50%; border: 1px solid var(--border); }
.score-ring-inner { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 2px; }
.score-ring-inner strong { font-size: 46px; letter-spacing: -.07em; }
.score-ring-inner span { color: var(--muted-2); font-size: 13px; }
.score-copy h3 { margin: 8px 0 8px; font-size: 23px; }
.score-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 530px; }
.score-stats { display: flex; gap: 20px; margin-top: 18px; }
.score-stats div { display: grid; gap: 2px; }
.score-stats strong { font-size: 17px; }
.score-stats span { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.message-panel { padding: 24px; }
.message-row { display: grid; grid-template-columns: 65px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.message-row:last-child { border-bottom: 0; }
.message-row span { color: var(--muted-2); font-size: 11px; }
.message-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.issues-panel { margin-top: 12px; padding: 24px; }
.panel-heading, .checks-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.panel-heading h3, .checks-heading h3 { margin: 7px 0 0; font-size: 20px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--green); background: rgba(82,224,173,.06); border: 1px solid rgba(82,224,173,.12); border-radius: 999px; font-size: 10px; font-weight: 800; }
.live-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.issues-list { display: grid; gap: 9px; margin-top: 18px; }
.issue { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: start; padding: 13px; border-radius: 14px; background: rgba(8,18,29,.56); }
.issue-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; }
.issue-dot.critical { background: var(--red); box-shadow: 0 0 12px rgba(255,112,132,.4); }
.issue-dot.warning { background: var(--yellow); }
.issue-title { font-size: 12px; font-weight: 800; }
.issue-detail { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.issue-status { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.no-issues { padding: 18px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--green); font-size: 12px; }

.checks-wrap { margin-top: 12px; padding: 24px; }
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter { padding: 8px 10px; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.filter.active { color: var(--text); background: #102237; border-color: var(--border); }
.checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.check-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(8,17,27,.5); }
.check-card-top { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.check-name { font-size: 13px; font-weight: 800; }
.category { margin-top: 4px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.status { padding: 6px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-pass { color: var(--green); background: rgba(82,224,173,.07); }
.status-warn { color: var(--yellow); background: rgba(242,199,107,.07); }
.status-fail { color: var(--red); background: rgba(255,112,132,.07); }
.status-na { color: #9aacbf; background: rgba(154,172,191,.07); }
.check-detail { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.report-note { padding: 18px 4px 0; color: var(--muted-2); font-size: 10px; line-height: 1.6; }

.developer-card { margin-top: 38px; padding: 24px; display: grid; grid-template-columns: 1fr .95fr; gap: 30px; align-items: start; }
.developer-card p { margin: 10px 0 0; max-width: 560px; color: var(--muted); font-size: 13px; line-height: 1.7; }
details { border: 1px solid var(--border); border-radius: 15px; padding: 12px; background: rgba(7,15,24,.55); }
summary { cursor: pointer; color: #c8d7e9; font-size: 12px; font-weight: 800; }
textarea { width: 100%; min-height: 190px; margin-top: 12px; padding: 13px; resize: vertical; border-radius: 12px; border: 1px solid var(--border); outline: none; background: #07111d; color: #d9e7f7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; }
textarea:focus { border-color: rgba(117,169,255,.45); }
.secondary-btn { margin-top: 10px; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 38px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }

@media (max-width: 900px) {
  .report-overview { grid-template-columns: 1fr; }
  .developer-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-card { min-height: 165px; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 20px, 1160px); }
  .topbar-actions .top-version { display: none; }
  .hero { padding-top: 60px; }
  h1 { font-size: 48px; }
  .test-card-bottom { align-items: stretch; flex-direction: column; }
  .primary-btn { width: 100%; }
  .connection-note { justify-content: flex-start; }
  .section-heading, .results-header, .panel-heading, .checks-heading { align-items: start; flex-direction: column; }
  .workflow-note { text-align: left; }
  .score-panel { flex-direction: column; align-items: flex-start; }
  .checks-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
