/* ===== Microsoft Fluent Design — SysScan ===== */
:root {
  --bg: #f0f2f5;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --text: #1a1a1a;
  --text-dim: #555555;
  --text-mute: #888888;

  --accent: #0078D4;
  --accent-soft: rgba(0, 120, 212, 0.06);
  --accent-2: #106EBE;
  --accent-3: #50E6FF;

  --ok: #107C10;
  --ok-soft: rgba(16, 124, 16, 0.10);
  --warn: #FF8C00;
  --warn-soft: rgba(255, 140, 0, 0.10);
  --fail: #D13438;
  --fail-soft: rgba(209, 52, 56, 0.10);

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Microsoft branded accent top bar */
.bg-accent-line {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 50;
  background: linear-gradient(90deg, #F25022 0%, #F25022 25%, #7FBA00 25%, #7FBA00 50%, #00A4EF 50%, #00A4EF 75%, #FFB900 75%, #FFB900 100%);
  pointer-events: none;
}

/* Header — Microsoft.com style */
.header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.ms-logo { width: 24px; height: 24px; }
.ms-brand-text {
  font-size: 16px;
  font-weight: 600;
}
.nav { display: flex; gap: 20px; align-items: center; }
.nav a {
  color: #262626;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* Hero — Microsoft product page style */
.hero {
  padding: 64px 32px 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 50%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0,120,212,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16,124,16,0.03) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-dim);
  box-shadow: var(--shadow-sm);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.compat-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px auto 20px;
  padding: 14px 18px;
  max-width: 600px;
  background: #fffaf0;
  border: 1px solid #f0d88a;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  line-height: 1.55;
  color: #5a4a1a;
}
.compat-warning svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #d4a017;
}
.compat-warning strong {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 4px;
  color: #4d4000;
}
.compat-warning span {
  color: #6b5b2a;
}
.hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 650;
  margin: 20px 0 12px;
  color: #000;
}
.lede {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.cta-ms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,120,212,0.25);
}
.cta-ms:hover {
  background: #106EBE;
  box-shadow: 0 4px 12px rgba(0,120,212,0.3);
}
.cta-ms:active {
  background: #005A9E;
  box-shadow: none;
}
.cta-ms svg { width: 14px; height: 14px; }

.cta-ghost-ms {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #b0b0b0;
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.cta-ghost-ms:hover { background: rgba(0,0,0,0.04); border-color: #8a8a8a; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0 0;
}
.stat-num {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat-label { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

/* Dashboard */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.dashboard-header h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
  font-weight: 600;
}
.muted { color: var(--text-dim); margin: 0; font-size: 14px; }

.dash-actions { display: flex; gap: 6px; }
.ghost-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid #8a8a8a;
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.ghost-btn:hover { background: rgba(0,0,0,0.04); }

/* Summary grid — Windows 11 Settings style */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.summary-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  pointer-events: none;
}
.summary-card.ok::before { background: var(--ok); }
.summary-card.warn::before { background: var(--warn); }
.summary-card.fail::before { background: var(--fail); }
.summary-card.score::before { background: linear-gradient(90deg, var(--accent), #50E6FF); }
.summary-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.summary-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
  font-family: var(--font-mono);
}
.summary-card.ok .summary-value { color: var(--ok); }
.summary-card.warn .summary-value { color: var(--warn); }
.summary-card.fail .summary-value { color: var(--fail); }
.summary-card.score .summary-value { color: var(--accent); }
.score-suffix { font-size: 14px; color: var(--text-mute); font-weight: 500; }
.summary-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  opacity: 0.25;
}
.summary-card.ok .summary-icon { color: var(--ok); }
.summary-card.warn .summary-icon { color: var(--warn); }
.summary-card.fail .summary-icon { color: var(--fail); }

.score-bar {
  margin-top: 8px;
  height: 3px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #50E6FF);
  border-radius: 2px;
  transition: width 0.8s var(--ease);
}

/* Progress */
.progress-wrap {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.progress-track {
  height: 2px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.progress-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.progress-wrap.done { display: none; }

/* Category cards — Windows 11 settings style */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(6px);
  animation: cardIn 0.35s var(--ease) forwards;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

.cat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(0, 120, 212, 0.08);
  color: var(--accent);
  flex-shrink: 0;
}
.cat-icon svg { width: 16px; height: 16px; }
.cat-title { font-weight: 600; font-size: 14px; margin: 0; }
.cat-sub { font-size: 12px; color: var(--text-mute); margin-top: 1px; }
.cat-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cat-badge.ok { background: var(--ok-soft); color: var(--ok); }
.cat-badge.warn { background: var(--warn-soft); color: var(--warn); }
.cat-badge.fail { background: var(--fail-soft); color: var(--fail); }

.cat-body { padding: 4px 0; }
.check {
  padding: 8px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.check:last-child { border-bottom: none; }
.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.check-icon svg { width: 10px; height: 10px; }
.check-icon.ok { background: var(--ok-soft); color: var(--ok); }
.check-icon.warn { background: var(--warn-soft); color: var(--warn); }
.check-icon.fail { background: var(--fail-soft); color: var(--fail); }
.check-icon.info { background: rgba(0, 120, 212, 0.08); color: var(--accent); }

.check-body { flex: 1; min-width: 0; }
.check-name {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.check-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
  word-break: break-all;
  max-width: 60%;
}
.check-note {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 1px;
  line-height: 1.4;
}

/* About — Microsoft Learn style */
.about {
  max-width: 1200px;
  margin: 64px auto 24px;
  padding: 0 32px;
}
.about h2 {
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 24px;
  color: #000;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.about-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease);
}
.about-card:hover {
  box-shadow: var(--shadow-md);
}
.about-num {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.about-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #000;
}
.about-card p {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

/* Footer — Microsoft.com footer style */
.footer {
  max-width: 1200px;
  margin: 64px auto 0;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-mute);
  flex-wrap: wrap;
  gap: 12px;
}

/* Info panels — Windows 11 widget style */
.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease);
}
.info-panel:hover {
  box-shadow: var(--shadow-md);
}
.info-panel-header {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-panel-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.info-panel-body {
  padding: 2px 0;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  font-size: 13px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
}
.info-value {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: right;
  max-width: 55%;
  word-break: break-all;
}

/* Hero split layout — panels on sides, heading center */
.hero-split {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-side {
  flex: 0 0 270px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-center {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 8px 0 0;
}
.hero-center h1 {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .hero-split {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .hero-side {
    flex: none;
    width: 100%;
    flex-direction: row;
  }
  .hero-side .info-panel {
    flex: 1;
  }
}
@media (max-width: 640px) {
  .hero-side {
    flex-direction: column;
  }
}


@media (max-width: 640px) {
  .info-panels {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }
}

/* Form section — customer intake before scan */
.form-section {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.form-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  padding-left: 2px;
}
.form-field input,
.form-field select {
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 4px;
  outline: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-color: #fafafa;
  padding-right: 32px;
}
.form-field input:hover,
.form-field select:hover {
  background: #fff;
  border-color: #bbb;
}
.form-field input:focus,
.form-field select:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,120,212,0.15);
}
.form-field input:disabled,
.form-field select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f0f0f0;
}
.form-field input::placeholder {
  color: #b0b0b0;
  font-size: 13px;
  font-weight: 400;
}
.form-error {
  font-size: 11px;
  color: var(--fail);
  margin-top: 1px;
  display: none;
  padding-left: 2px;
}
.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--fail);
  background: #fffdfd;
}
.form-field.has-error .form-error {
  display: block;
}

@media (max-width: 640px) {
  .form-section {
    padding: 18px 16px;
    margin-bottom: 28px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Privacy section */
.about .lede {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.7;
}

/* Toast — Windows 11 notification style */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 20px;
  background: #2b2b2b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
  z-index: 200;
  opacity: 0;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Responsive */
@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 12px; }
  .header-inner, .hero, .dashboard, .about, .footer { padding-left: 20px; padding-right: 20px; }
  .form-section { padding: 20px; }
}
@media (max-width: 500px) {
  .summary-grid { grid-template-columns: 1fr; }
  .summary-value { font-size: 26px; }
  .check-value { max-width: 45%; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-ms, .cta-ghost-ms { justify-content: center; }
  .header-inner { height: 48px; padding: 0 16px; }
  .hero { padding: 40px 16px 32px; }
}

/* ============================================
   SCAN OVERLAY — Windows Security Center style
   ============================================ */
.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-body);
}
.scan-overlay.active { opacity: 1; pointer-events: auto; }
body.scan-open { overflow: hidden; }
.scan-overlay.closing { opacity: 0; }

.scan-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(245, 245, 245, 0.92);
  backdrop-filter: blur(32px) saturate(1.1);
  -webkit-backdrop-filter: blur(32px) saturate(1.1);
}

.scan-hud {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 20px;
  box-sizing: border-box;
}

/* Topbar — Windows title bar style */
.hud-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}
.hud-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hud-brand b { color: var(--accent); font-weight: 600; }
.hud-ms-logo { width: 18px; height: 18px; }
.hud-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-mute); }
.hud-meta span { color: var(--text-mute); }

/* Center: ring + log */
.hud-center {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  min-height: 0;
}

/* Ring — Windows-style progress indicator */
.scan-ring {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 340px;
  justify-self: center;
}
.scan-ring-svg {
  width: 100%;
  height: 100%;
}
.ring-fill {
  transition: stroke-dashoffset 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring-inner, .ring-inner2 {
  transform-origin: 100px 100px;
  animation: ring-rotate 20s linear infinite;
}
.ring-inner2 { animation-duration: 30s; animation-direction: reverse; }
@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.ring-sweep {
  transform-origin: 100px 100px;
  animation: ring-sweep 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes ring-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}
.ring-pct {
  font-family: var(--font-mono);
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ring-pct-suffix {
  font-size: 0.35em;
  color: var(--text-mute);
  margin-left: 2px;
}
.ring-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(0,120,212,0.06);
  border: 1px solid rgba(0,120,212,0.15);
  max-width: 180px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Log — Windows PowerShell/Event Viewer style */
.scan-log-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  max-height: 340px;
}
.scan-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.log-title { color: var(--text-dim); }
.log-count { color: var(--text); }
.scan-log {
  flex: 1;
  overflow: hidden;
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  mask-image: linear-gradient(to top, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
}
.log-line {
  display: grid;
  grid-template-columns: 56px 16px 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 1px 0;
  opacity: 0;
  transform: translateY(3px);
  animation: log-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes log-in {
  to { opacity: 1; transform: translateY(0); }
}
.log-time { color: var(--text-mute); font-size: 10px; }
.log-icon {
  width: 12px; height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.log-icon svg { width: 100%; height: 100%; }
.log-msg { color: var(--text); font-family: var(--font-body); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.log-line.ok .log-icon { color: var(--ok); }
.log-line.warn .log-icon { color: var(--warn); }
.log-line.fail .log-icon { color: var(--fail); }
.log-line.info .log-icon { color: var(--accent); }
.log-line.header {
  grid-template-columns: 56px 1fr;
  padding: 8px 0 3px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}
.log-line.header:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.log-line.header .log-msg {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Category strip — Windows 11 Quick Settings style */
.hud-cats {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.hud-cat {
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.hud-cat.active {
  border-color: var(--accent);
  background: rgba(0,120,212,0.04);
  box-shadow: inset 0 0 0 1px rgba(0,120,212,0.2);
}
.hud-cat.active .hud-cat-icon {
  color: var(--accent);
}
.hud-cat.done {
  border-color: var(--border-strong);
  background: var(--surface);
}
.hud-cat.done.warn { border-color: var(--warn); background: var(--warn-soft); }
.hud-cat.done.fail { border-color: var(--fail); background: var(--fail-soft); }
.hud-cat.done .hud-cat-icon { color: var(--ok); }
.hud-cat.done.warn .hud-cat-icon { color: var(--warn); }
.hud-cat.done.fail .hud-cat-icon { color: var(--fail); }
.hud-cat-icon {
  width: 16px; height: 16px;
  color: var(--text-mute);
  transition: color 0.2s var(--ease);
}
.hud-cat-icon svg { width: 100%; height: 100%; }
.hud-cat-name {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hud-cat-status {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-mute);
  min-height: 10px;
}
.hud-cat.active .hud-cat-status { color: var(--accent); }
.hud-cat.done .hud-cat-status { color: var(--ok); }
.hud-cat.done.warn .hud-cat-status { color: var(--warn); }
.hud-cat.done.fail .hud-cat-status { color: var(--fail); }

/* Telemetry — Windows Performance Monitor style */
.hud-telemetry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Consolas', 'Cascadia Code', ui-monospace, monospace;
}
.telem { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.telem-label { font-size: 9px; letter-spacing: 0.03em; color: var(--text-mute); text-transform: uppercase; }
.telem-val {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.telem-val.pending { color: var(--text-mute); }

/* Responsive */
@media (max-width: 900px) {
  .scan-overlay { overflow-y: auto; }
  .scan-hud { padding: 16px; gap: 14px; height: auto; min-height: 100%; display: flex; flex-direction: column; }
  .hud-center { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 14px; align-items: start; }
  .scan-ring { max-width: 180px; }
  .scan-log-wrap { max-height: 180px; min-height: 140px; }
  .scan-log { max-height: 140px; overflow-y: auto; }
  .hud-cats { grid-template-columns: repeat(4, 1fr); }
  .hud-telemetry { grid-template-columns: repeat(3, 1fr); }
  .hud-topbar { font-size: 12px; }
  .hud-meta { gap: 10px; }
  .ring-pct { font-size: 40px; }
}
@media (max-width: 500px) {
  .hud-cats { grid-template-columns: repeat(2, 1fr); }
  .hud-telemetry { grid-template-columns: repeat(2, 1fr); }
  .hud-meta span:first-child { display: none; }
  .scan-ring { max-width: 140px; }
  .ring-pct { font-size: 32px; }
  .scan-log { font-size: 11px; }
  .log-line { grid-template-columns: 44px 14px 1fr auto; gap: 5px; }
  .log-msg { font-size: 12px; }
  .log-val { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ring-sweep, .ring-inner, .ring-inner2 { animation: none; }
}
