:root {
  --primary: #1a56db;
  --primary-light: #e8effc;
  --accent: #10b981;
  --accent-dark: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --hover-bg: #f1f5f9;
  --hover-border: #cbd5e1;
  --ring-bg: #e2e8f0;
  --bar-bg: #e2e8f0;
  --country-fill: #e2e8f0;
  --country-stroke: #ffffff;
  --country-hover: #cbd5e1;
  --tip-bg: #fef3c7;
  --icon-green-bg: #d1fae5;
  --modal-bg: #ffffff;
  --range-thumb-border: #ffffff;
}

[data-theme="dark"] {
  --primary: #5b8def;
  --primary-light: #1e2d4a;
  --accent: #34d399;
  --accent-dark: #10b981;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.4), 0 4px 10px rgba(0,0,0,0.25);
  --hover-bg: #334155;
  --hover-border: #475569;
  --ring-bg: #334155;
  --bar-bg: #334155;
  --country-fill: #334155;
  --country-stroke: #1e293b;
  --country-hover: #475569;
  --tip-bg: #422006;
  --icon-green-bg: #064e3b;
  --modal-bg: #1e293b;
  --range-thumb-border: #1e293b;
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --primary: #5b8def;
    --primary-light: #1e2d4a;
    --accent: #34d399;
    --accent-dark: #10b981;
    --bg: #0f172a;
    --card: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4), 0 4px 10px rgba(0,0,0,0.25);
    --hover-bg: #334155;
    --hover-border: #475569;
    --ring-bg: #334155;
    --bar-bg: #334155;
    --country-fill: #334155;
    --country-stroke: #1e293b;
    --country-hover: #475569;
    --tip-bg: #422006;
    --icon-green-bg: #064e3b;
    --modal-bg: #1e293b;
    --range-thumb-border: #1e293b;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
header {
  text-align: center;
  padding: 56px 0 32px;
}
header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
header p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  text-decoration: none;
}
.site-logo img {
  width: 48px;
  height: 48px;
}
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.icon-blue { background: var(--primary-light); }
.icon-green { background: var(--icon-green-bg); }

/* Form */
.form-group {
  margin-bottom: 20px;
}
.form-group:last-child {
  margin-bottom: 0;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
input[type="text"], input[type="number"], input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 17px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.input-prefix {
  position: relative;
}
.input-prefix input {
  padding-left: 28px;
}
.input-prefix::before {
  content: '$';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 500;
  pointer-events: none;
}
.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
  margin-top: 4px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.99); }

/* Results */
#results {
  display: none;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Score Ring */
.score-section {
  text-align: center;
  padding: 20px 0 8px;
}
.score-ring-wrapper {
  position: relative;
  display: inline-block;
  width: 180px;
  height: 180px;
}
.score-ring-wrapper svg {
  transform: rotate(-90deg);
}
.score-ring-bg {
  fill: none;
  stroke: var(--ring-bg);
  stroke-width: 10;
}
.score-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.3s;
}
.score-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.score-pct {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.score-pct-suffix {
  font-size: 20px;
  font-weight: 600;
}
.score-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.score-verdict {
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
}
.score-description {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 6px auto 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.stat-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Progress bar comparison */
.comparison-bar {
  margin-top: 16px;
}
.bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}
.bar-header span:first-child { font-weight: 600; }
.bar-header span:last-child { color: var(--text-muted); }
.bar-track {
  height: 16px;
  background: var(--bar-bg);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease;
  min-width: 4px;
}
.bar-target {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  background: var(--text);
  border-radius: 2px;
  z-index: 2;
}
.bar-target-label {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Tip card */
.tip-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
}
.tip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--tip-bg);
}
.tip-content h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.tip-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn-secondary:hover {
  background: var(--hover-bg);
  border-color: var(--hover-border);
}
.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* Share URL */
.share-url-box {
  display: none;
  margin-top: 12px;
  animation: fadeUp 0.3s ease;
}
.share-url-box.visible { display: block; }
.share-url-inner {
  display: flex;
  gap: 8px;
  align-items: center;
}
.share-url-inner input {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.btn-copy {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn-copy:hover { opacity: 0.9; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footnote */
.footnote {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 24px 0 12px;
  line-height: 1.5;
}
.footnote a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== Category Navigation ===== */
#categorySection {
  display: none;
  animation: fadeUp 0.4s ease;
  margin-top: 8px;
}
.section-heading {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.section-subtext {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}
.category-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.category-card--active {
  cursor: pointer;
}
.category-card--active:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--hover-border);
}
.category-card--disabled {
  opacity: 0.55;
  cursor: default;
  filter: grayscale(0.3);
}
.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.category-info {
  flex: 1;
  min-width: 0;
}
.category-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.category-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.category-score {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-coming-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Hamburger Navigation ===== */
.nav-hamburger {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.nav-hamburger:hover {
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}
.nav-hamburger-icon,
.nav-hamburger-icon::before,
.nav-hamburger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.nav-hamburger-icon {
  position: relative;
}
.nav-hamburger-icon::before,
.nav-hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-hamburger-icon::before { top: -6px; }
.nav-hamburger-icon::after { top: 6px; }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s ease;
}
.nav-overlay.nav-open {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--card);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.nav-overlay.nav-open .nav-panel {
  transform: translateX(0);
}

.nav-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.nav-panel-title {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}
.nav-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  transition: background 0.15s;
}
.nav-close:hover { background: var(--border); }

.nav-group {
  padding: 16px 20px;
}
.nav-group + .nav-group {
  border-top: 1px solid var(--border);
}
.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--bg); }
.nav-link--active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.nav-link--disabled {
  opacity: 0.55;
  pointer-events: none;
}
.nav-link-icon {
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-link-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 8px;
}

/* ===== Static page layout ===== */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 20px 60px;
}
.page-content h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.page-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.page-content ul {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px 20px;
}
.page-content a {
  color: var(--primary);
  text-decoration: none;
}
.page-content a:hover { text-decoration: underline; }

/* Page-content header (logo on subpages) */
.page-content header {
  text-align: center;
  padding: 0 0 24px;
}
.page-content .site-logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
}
.page-content .site-logo img {
  width: 48px;
  height: 48px;
}

/* Changelog date labels */
.changelog-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ===== Disclaimer Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: var(--modal-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
  animation: modalSlideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.modal .btn-primary {
  margin-top: 8px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }

/* Ad slot in disclaimer */
.ad-slot {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0 8px;
}
.ad-slot-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.ad-slot-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.ad-slot-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.ad-slot-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.ad-slot-link:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--primary); }
.footer-sep {
  color: var(--border);
  font-size: 13px;
}
.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}

/* Print styles */
@media print {
  body { background: white; }
  .container { max-width: 100%; padding: 0; }
  .no-print { display: none !important; }
  .nav-hamburger { display: none !important; }
  .nav-overlay { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  #inputSection { display: none; }
  #results { display: block !important; }
  header { padding: 20px 0 16px; }
  .print-header { display: block !important; }
  .score-ring-fill { transition: none; }
  .bar-fill { transition: none; }
  .site-footer { display: none; }
  .modal-overlay { display: none !important; }

  .print-report-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
  .print-report-header h2 {
    font-size: 20px;
    color: var(--primary);
  }
  .print-report-header p {
    font-size: 12px;
    color: var(--text-muted);
  }
}

.print-header { display: none; }

/* ===== Security Wealth — Domain Sections ===== */
.icon-sky { background: rgba(14,165,233,0.12); color: #0ea5e9; }
.icon-red { background: rgba(239,68,68,0.12); color: #ef4444; }

.domain-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.domain-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}
.domain-header:hover { background: var(--hover-bg); }
.domain-icon { font-size: 18px; flex-shrink: 0; }
.domain-title { flex: 1; }
.domain-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.domain-section.collapsed .domain-chevron {
  transform: rotate(-90deg);
}
.domain-body {
  padding: 4px 16px 16px;
}
.domain-section.collapsed .domain-body {
  display: none;
}

/* Select inputs */
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}

/* Range slider */
.range-group {
  margin-top: 8px;
}
.range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.range-value {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #0ea5e9;
  min-width: 28px;
  text-align: center;
}
input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 4px;
  outline: none;
  margin-top: 8px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
  border: 3px solid var(--range-thumb-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
  border: 3px solid var(--range-thumb-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Gap list (Security results) */
.gap-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.gap-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
}
.gap-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.gap-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(14,165,233,0.12);
  color: #0ea5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.gap-domain {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.gap-score {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.gap-tip {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 38px;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.theme-btn:hover { background: var(--border); }
.theme-btn--active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.theme-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Hub Grid — Home page dimension tiles */
.hub-section {
  margin-top: 8px;
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}

.hub-card--active:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--hover-border);
  transform: translateY(-2px);
}

.hub-card--disabled {
  opacity: 0.5;
  filter: grayscale(0.3);
  cursor: default;
}

.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hub-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.hub-badge--active {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.hub-badge--soon {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.hub-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.hub-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.hub-card-cta {
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  display: inline-block;
}

/* World Map */
.map-section {
  margin-top: 32px;
  margin-bottom: 8px;
}

.world-map-wrapper {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.country-path {
  fill: var(--country-fill);
  stroke: var(--country-stroke);
  stroke-width: 0.5;
  transition: fill 0.2s;
  cursor: pointer;
}

.country-path:hover {
  fill: var(--country-hover);
}

.country-path.country-active:hover {
  opacity: 0.85;
}

.map-tooltip {
  position: absolute;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
  white-space: nowrap;
}

.map-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 16px;
}

.map-stat {
  text-align: center;
}

.map-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.map-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 16px 14px 48px; }
  header h1 { font-size: 24px; }
  .card { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .action-bar { flex-direction: column; }
  .score-ring-wrapper { width: 150px; height: 150px; }
  .score-pct { font-size: 32px; }
  .modal { padding: 24px; }
  .category-card { padding: 14px 16px; gap: 12px; }
  .category-icon { width: 38px; height: 38px; }
  .category-name { font-size: 14px; }
  .category-score { font-size: 18px; }
  .nav-hamburger { top: 10px; right: 10px; width: 40px; height: 40px; }
  .page-content { padding: 48px 14px 48px; }
  .page-content h1 { font-size: 24px; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { padding: 16px; }
  .hub-card-title { font-size: 15px; }
  .map-stats { gap: 24px; }
  .map-stat-value { font-size: 18px; }
}
