:root {
  color-scheme: light;
  --green-light: #ddeedf;
  --green-light-hover: #cde5d0;
  --green-light-pressed: #b8d5bb;
  --green-stroke: #baecc2;
  --green: #08c225;
  --green-dark: #069d1e;
  --green-darker: #057c18;
  --red-light: #faebeb;
  --red: #f63a3a;
  --red-dark: #dd3434;
  --yellow-light: #faf4eb;
  --yellow: #f08a1e;
  --ink: #171717;
  --ink-soft: #292929;
  --muted: #7a7a7a;
  --muted-strong: #565656;
  --page: #f8f8f8;
  --page-accent: #eef8f0;
  --surface: #ffffff;
  --surface-subtle: #f2f2f2;
  --surface-raised: rgba(255, 255, 255, 0.92);
  --border: #e3e3e3;
  --border-strong: #d6d6d6;
  --shadow: 0 18px 45px rgba(23, 23, 23, 0.08);
  --button-shadow: 0 10px 26px rgba(8, 194, 37, 0.2);
  --focus-ring: 0 0 0 4px rgba(8, 194, 37, 0.2);
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f5f5;
    --ink-soft: #e9e9e9;
    --muted: #adadad;
    --muted-strong: #cecece;
    --page: #101010;
    --page-accent: #101b12;
    --surface: #1b1b1b;
    --surface-subtle: #242424;
    --surface-raised: rgba(31, 31, 31, 0.94);
    --border: #303030;
    --border-strong: #3d3d3d;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --button-shadow: 0 10px 28px rgba(8, 194, 37, 0.18);
    --focus-ring: 0 0 0 4px rgba(8, 194, 37, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--page);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, 900px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px
    max(24px, env(safe-area-inset-bottom));
}

.summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0 18px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  color: var(--ink);
  font-size: 2.45rem;
  font-weight: 820;
}

.domain-label {
  display: inline-flex;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

h2 {
  color: var(--ink);
  font-size: 1rem;
}

.primary-action {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: var(--button-shadow), 0 0 0 0 rgba(8, 194, 37, 0.42);
  animation: start-glow 2.4s ease-out infinite;
}

.primary-action:hover:not(:disabled) {
  background: var(--green-dark);
}

.primary-action:active:not(:disabled) {
  background: var(--green-darker);
}

.primary-action:focus-visible {
  outline: 0;
  box-shadow: var(--button-shadow), var(--focus-ring);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
  animation: none;
}

.status-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.status-panel {
  margin-bottom: 14px;
  padding: 14px 14px 16px;
}

.status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 760;
}

.progress-track {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-subtle);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 160ms ease;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 106px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.metric strong {
  display: block;
  margin: 7px 0 2px;
  color: var(--ink);
  font-size: 1.68rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-large {
  min-height: 128px;
  border-color: color-mix(in srgb, var(--green) 28%, var(--border));
  background: var(--surface);
}

.metric-large span,
.metric-large small {
  color: var(--green-darker);
}

.metric-large strong {
  color: var(--green-darker);
  font-size: 2.18rem;
}

@media (prefers-color-scheme: dark) {
  .metric-large {
    border-color: rgba(8, 194, 37, 0.26);
    background:
      linear-gradient(180deg, rgba(8, 194, 37, 0.1), transparent),
      var(--surface);
  }

  .metric-large span,
  .metric-large small,
  .metric-large strong {
    color: #71e883;
  }
}

@keyframes start-glow {
  0% {
    box-shadow: var(--button-shadow), 0 0 0 0 rgba(8, 194, 37, 0.36);
  }

  70% {
    box-shadow: var(--button-shadow), 0 0 0 14px rgba(8, 194, 37, 0);
  }

  100% {
    box-shadow: var(--button-shadow), 0 0 0 14px rgba(8, 194, 37, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-action {
    animation: none;
  }
}

@media (min-width: 680px) {
  .page-shell {
    padding: 34px 28px;
  }

  .summary {
    grid-template-columns: minmax(0, 1fr) 180px;
    padding-top: 16px;
  }

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

  .metric-large {
    grid-column: span 2;
  }
}

@media (max-width: 360px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
  }

  .page-shell {
    min-height: auto;
    padding: 10px;
  }

  .primary-action {
    display: none;
  }
}
