:root {
  color-scheme: light;
  --page: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --ink: #132238;
  --muted: #637083;
  --line: #dfe5ed;
  --line-strong: #cbd4df;
  --brand: #1768e5;
  --brand-dark: #0e51bb;
  --brand-soft: #eaf2ff;
  --online: #087a50;
  --online-soft: #e6f6ef;
  --limited: #a86100;
  --limited-soft: #fff3d8;
  --offline: #c33131;
  --offline-soft: #ffebeb;
  --neutral: #778397;
  --neutral-soft: #edf1f5;
  --shadow: 0 16px 44px rgba(31, 51, 76, 0.09);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --score-color: var(--neutral);
  --score-angle: 0deg;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(23, 104, 229, 0.08), transparent 26rem),
    var(--page);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.page-width {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(203, 212, 223, 0.85);
  background: rgba(248, 250, 253, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding: 9px;
  border-radius: 11px;
  background: var(--brand);
  box-shadow: 0 7px 18px rgba(23, 104, 229, 0.25);
}

.brand-mark span {
  width: 4px;
  border-radius: 3px;
  background: #fff;
}

.brand-mark span:nth-child(1) {
  height: 7px;
}

.brand-mark span:nth-child(2) {
  height: 13px;
}

.brand-mark span:nth-child(3) {
  height: 19px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.3;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.privacy-note > span {
  color: var(--online);
  font-size: 15px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding-block: 54px 34px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.report-kicker {
  margin: 0 0 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 790;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero-copy > p:last-child {
  max-width: 670px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.run-area {
  display: flex;
  min-width: min(100%, 340px);
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.run-button {
  display: inline-flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 25px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #2478f3, #0e59ce);
  box-shadow: 0 12px 26px rgba(23, 104, 229, 0.27);
  cursor: pointer;
  font-size: 18px;
  font-weight: 780;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.run-button:hover:not(:disabled) {
  box-shadow: 0 15px 32px rgba(23, 104, 229, 0.34);
  filter: brightness(1.035);
  transform: translateY(-1px);
}

.run-button:active:not(:disabled) {
  transform: translateY(1px);
}

.run-button:disabled {
  cursor: wait;
  opacity: 0.84;
}

.run-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: #fff;
}

.run-button.is-running .run-icon {
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  background: transparent;
  animation: spin 0.85s linear infinite;
}

.run-button.is-running .run-icon svg {
  display: none;
}

.run-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.notice {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.notice-error {
  border-color: #f0b3b3;
  color: #8d2020;
  background: #fff0f0;
}

.notice-info {
  border-color: #b9d2f4;
  color: #164e91;
  background: #edf5ff;
}

.report {
  position: relative;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: none;
}

.report::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--score-color);
  content: "";
  transition: background 250ms ease;
}

.report.outcome-full {
  --score-color: var(--online);
}

.report.outcome-partial {
  --score-color: var(--limited);
}

.report.outcome-severe {
  --score-color: #cf511f;
}

.report.outcome-none {
  --score-color: var(--offline);
}

.report.outcome-unreliable {
  --score-color: #59667a;
}

.report-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.report-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.report h2 {
  margin: 0;
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -0.025em;
}

.report-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: #526177;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

.time-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--score-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--score-color) 14%, white);
}

.result-overview {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(500px, 1fr);
  align-items: stretch;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f7f9fc;
}

.score-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 19px;
}

.score-ring {
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) var(--score-angle), #dfe5ec 0deg);
  transition: background 300ms ease;
}

.score-ring::before {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(20, 34, 56, 0.04);
  content: "";
}

.score-ring span {
  position: relative;
  z-index: 1;
  color: var(--score-color);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.score-copy {
  min-width: 0;
}

.score-label {
  margin: 0;
  color: var(--score-color);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.score-description {
  max-width: 390px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.summary-item {
  display: flex;
  min-height: 100px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.summary-item dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.summary-item dd {
  margin: 0;
  font-size: 31px;
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 1;
}

.summary-online dd {
  color: var(--online);
}

.summary-limited dd {
  color: var(--limited);
}

.summary-offline dd {
  color: var(--offline);
}

.summary-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.summary-online dt {
  color: var(--online);
}

.summary-limited dt {
  color: var(--limited);
}

.summary-offline dt {
  color: var(--offline);
}

.result-neutral {
  --score-color: var(--neutral);
}

.result-full {
  --score-color: var(--online);
  border-color: #b9dfd0;
  background: linear-gradient(110deg, #f1fbf7, #f8fbfa);
}

.result-partial {
  --score-color: #a86100;
  border-color: #ead29d;
  background: linear-gradient(110deg, #fff9e9, #fffdf8);
}

.result-severe {
  --score-color: #cf511f;
  border-color: #efc2ae;
  background: linear-gradient(110deg, #fff3ed, #fffaf8);
}

.result-none {
  --score-color: var(--offline);
  border-color: #efbebe;
  background: linear-gradient(110deg, #fff0f0, #fffafa);
}

.result-unreliable {
  --score-color: #59667a;
  border-color: #cbd2dc;
  background: linear-gradient(110deg, #eef1f5, #fafbfc);
}

.category-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.category-tile {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.category-tile-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--neutral);
  background: var(--neutral-soft);
  font-size: 13px;
  font-weight: 900;
}

.category-tile-copy {
  min-width: 0;
}

.category-tile-name,
.category-tile-status {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tile-name {
  font-size: 11px;
  font-weight: 760;
}

.category-tile-status {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.category-tile-ratio {
  font-size: 19px;
  font-weight: 830;
  letter-spacing: -0.04em;
}

.category-tile.state-online {
  border-color: #b9dfd0;
  background: #f3fbf7;
}

.category-tile.state-online .category-tile-icon,
.category-tile.state-online .category-tile-ratio {
  color: var(--online);
}

.category-tile.state-online .category-tile-icon {
  background: var(--online-soft);
}

.category-tile.state-limited {
  border-color: #ead29d;
  background: #fffaf0;
}

.category-tile.state-limited .category-tile-icon,
.category-tile.state-limited .category-tile-ratio {
  color: var(--limited);
}

.category-tile.state-limited .category-tile-icon {
  background: var(--limited-soft);
}

.category-tile.state-offline {
  border-color: #efbebe;
  background: #fff5f5;
}

.category-tile.state-offline .category-tile-icon,
.category-tile.state-offline .category-tile-ratio {
  color: var(--offline);
}

.category-tile.state-offline .category-tile-icon {
  background: var(--offline-soft);
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 17px 2px;
  color: #526177;
  font-size: 12px;
}

.legend strong {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-mark {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.mark-online {
  color: var(--online);
  background: var(--online-soft);
}

.mark-limited {
  color: var(--limited);
  background: var(--limited-soft);
}

.mark-offline {
  color: var(--offline);
  background: var(--offline-soft);
}

.mark-pending {
  color: var(--neutral);
  background: var(--neutral-soft);
}

.groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.resource-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.group-header {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.group-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.group-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.group-heading h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-count {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--neutral-soft);
  font-size: 11px;
  font-weight: 750;
}

.site-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.site-card {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  min-height: 61px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--neutral);
  border-radius: 11px;
  background: var(--surface);
}

.site-card.state-online {
  border-left-color: var(--online);
}

.site-card.state-limited {
  border-left-color: var(--limited);
}

.site-card.state-offline {
  border-left-color: var(--offline);
}

.site-card.state-checking {
  border-left-color: var(--brand);
}

.status-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: var(--neutral);
  background: var(--neutral-soft);
  font-size: 15px;
  font-weight: 900;
}

.state-online .status-icon {
  color: var(--online);
  background: var(--online-soft);
}

.state-limited .status-icon {
  color: var(--limited);
  background: var(--limited-soft);
}

.state-offline .status-icon {
  color: var(--offline);
  background: var(--offline-soft);
}

.state-checking .status-icon {
  width: 24px;
  height: 24px;
  margin: 2px;
  border: 3px solid #c9dcf8;
  border-top-color: var(--brand);
  background: transparent;
  animation: spin 0.85s linear infinite;
}

.site-main {
  min-width: 0;
}

.site-name,
.site-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-name {
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.site-result {
  min-width: 76px;
  text-align: right;
}

.status-word {
  display: block;
  color: var(--neutral);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.035em;
  line-height: 1.25;
  text-transform: uppercase;
}

.state-online .status-word {
  color: var(--online);
}

.state-limited .status-word {
  color: var(--limited);
}

.state-offline .status-word {
  color: var(--offline);
}

.state-checking .status-word {
  color: var(--brand-dark);
}

.site-detail {
  max-width: 120px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.group-empty,
.report-empty {
  margin: 0;
  padding: 22px 15px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.report-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.report-footnote {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.footer {
  padding-block: 25px 35px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.noscript {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 100;
  padding: 14px;
  border-radius: 10px;
  color: #fff;
  background: #922;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 104, 229, 0.35);
  outline-offset: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1120px) {
  .result-overview {
    grid-template-columns: 1fr;
  }

  .score-description {
    max-width: 600px;
  }

  .groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-group:first-child {
    grid-row: span 2;
  }
}

@media (max-width: 860px) {
  .page-width {
    width: min(100% - 30px, 720px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-block: 38px 27px;
  }

  .run-area {
    width: 100%;
  }

}

@media (max-width: 680px) {
  .page-width {
    width: min(100% - 22px, 560px);
  }

  .header-inner {
    min-height: 62px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .privacy-note {
    font-size: 11px;
  }

  .hero {
    padding-top: 29px;
  }

  .hero h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .hero-copy > p:last-child {
    font-size: 15px;
  }

  .run-button {
    min-height: 62px;
    font-size: 17px;
  }

  .report {
    padding: 20px 12px 16px;
    border-radius: 20px;
  }

  .report-topline {
    display: block;
    padding-inline: 4px;
  }

  .report-time {
    margin-top: 9px;
    text-align: left;
  }

  .result-overview {
    gap: 16px;
    padding: 15px;
  }

  .score-block {
    gap: 14px;
  }

  .score-ring {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }

  .score-ring::before {
    width: 72px;
    height: 72px;
  }

  .score-ring span {
    font-size: 25px;
  }

  .score-label {
    font-size: 24px;
  }

  .score-description {
    font-size: 11px;
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .summary-item {
    min-height: 78px;
    padding: 9px 7px;
  }

  .summary-item dt {
    display: block;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .summary-dot {
    display: inline-block;
    margin-right: 3px;
  }

  .summary-item dd {
    font-size: 25px;
  }

  .legend {
    gap: 7px 12px;
    padding-inline: 4px;
    font-size: 10px;
  }

  .legend strong {
    width: 100%;
  }

  .category-summary {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .category-tile {
    min-height: 45px;
    padding-block: 7px;
  }

  .groups {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .resource-group:first-child {
    grid-row: auto;
  }

  .group-header {
    min-height: 54px;
  }

  .site-list {
    gap: 5px;
    padding: 6px;
  }

  .site-card {
    min-height: 57px;
  }

  .report-footnote {
    padding-inline: 6px;
  }

}

@media (max-width: 390px) {
  .brand strong {
    font-size: 13px;
  }

  .privacy-note {
    max-width: 86px;
    line-height: 1.15;
    text-align: right;
  }

  .score-block {
    align-items: flex-start;
  }

  .score-ring {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }

  .score-ring::before {
    width: 63px;
    height: 63px;
  }

  .score-ring span {
    font-size: 22px;
  }

  .score-label {
    font-size: 21px;
  }

  .score-description {
    margin-top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .hero,
  .footer,
  .notice {
    display: none !important;
  }

  .page-width {
    width: 100%;
  }

  .report {
    padding: 18px;
    border: 0;
    box-shadow: none;
  }
}

@media (forced-colors: active) {
  .report::before,
  .site-card {
    border-color: CanvasText;
  }

  .run-button {
    border: 2px solid ButtonText;
  }
}
