/* FuseBoard — Physical fuseboard with vertical wires and animated data flow
   Red = unprotected, Amber = partial, Green = fully blocked */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #050505;
  --surface: #111114;
  --surface-hover: #1a1a1e;
  --surface-active: #222228;
  --border: #2a2a2e;
  --border-light: #3a3a3f;

  --text: #f0f0f2;
  --text-secondary: #8a8a96;
  --text-tertiary: #5a5a66;

  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.15);
  --green-glow: rgba(34,197,94,0.3);

  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.12);
  --red-glow: rgba(239,68,68,0.3);

  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.12);
  --amber-glow: rgba(245,158,11,0.3);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 200ms ease;
  --spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

body::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34,197,94,0.08) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

.hidden { display: none !important; }
.container { max-width: 960px; width: 100%; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* --- Nav --- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); background: rgba(5,5,5,0.85); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 960px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text); display: flex; align-items: center; gap: 0; text-decoration: none; }
.nav-logo .logo-dot { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green-glow); margin: 0 1px; position: relative; top: -1px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-sm); transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }

/* --- Screens --- */
.screen { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 80px 0 40px; }

/* --- Hero --- */
.hero { text-align: center; padding: 110px 0 50px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 28px; }
.hero-badge .dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.hero h1 { font-size: clamp(2.5rem,7vw,4.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 20px; color: var(--text); }
.hero h1 .accent { background: linear-gradient(135deg,var(--green) 0%,#4ade80 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: clamp(1rem,2.5vw,1.2rem); color: var(--text-secondary); max-width: 500px; margin: 0 auto 36px; }
.trust-badges { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.trust-badge { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-tertiary); font-weight: 500; }
.trust-badge svg { width: 14px; height: 14px; opacity: 0.5; }

.section-header { text-align: center; margin-bottom: 24px; }
.section-header h2 { font-size: clamp(1.4rem,4vw,2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.section-header p { color: var(--text-secondary); font-size: 0.95rem; max-width: 460px; margin: 0 auto; }

/* =============================================
   THE FUSEBOARD — Vertical fuses with wires
   ============================================= */

.categories-grid {
  margin: 24px 0;
}

/* Back button for sub-fuseboard */
.fuse-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 16px;
}
.fuse-back-btn:hover { color: var(--text); background: var(--surface); }
.fuse-back-btn svg { width: 16px; height: 16px; }

/* The fuseboard panel */
.fuse-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.fuse-panel-title {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

/* Fuse grid */
.fuse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* Individual fuse cell */
.fuse-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.fuse-cell:hover {
  background: var(--surface-hover);
}

/* Top wire */
.fuse-wire-top {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}

/* Bottom wire */
.fuse-wire-bottom {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}

/* Particle animation flowing top to bottom */
.fuse-wire-top::after,
.fuse-wire-bottom::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -12px;
  height: 12px;
  border-radius: 2px;
  animation: flow-down 1s linear infinite;
  opacity: 0.9;
}

@keyframes flow-down {
  0% { top: -12px; }
  100% { top: calc(100% + 12px); }
}

/* Wire color states */
.fuse-cell[data-wire="red"] .fuse-wire-top,
.fuse-cell[data-wire="red"] .fuse-wire-bottom { background: var(--red); }
.fuse-cell[data-wire="red"] .fuse-wire-top::after,
.fuse-cell[data-wire="red"] .fuse-wire-bottom::after { background: linear-gradient(180deg, transparent, #ff6b6b, transparent); }

.fuse-cell[data-wire="amber"] .fuse-wire-top,
.fuse-cell[data-wire="amber"] .fuse-wire-bottom { background: var(--amber); }
.fuse-cell[data-wire="amber"] .fuse-wire-top::after,
.fuse-cell[data-wire="amber"] .fuse-wire-bottom::after { background: linear-gradient(180deg, transparent, #fbbf24, transparent); animation-duration: 1.8s; }

.fuse-cell[data-wire="green"] .fuse-wire-top,
.fuse-cell[data-wire="green"] .fuse-wire-bottom { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.fuse-cell[data-wire="green"] .fuse-wire-top::after,
.fuse-cell[data-wire="green"] .fuse-wire-bottom::after { animation: none; opacity: 0; }

/* Stagger particle animations */
.fuse-cell:nth-child(1) .fuse-wire-top::after { animation-delay: 0s; }
.fuse-cell:nth-child(2) .fuse-wire-top::after { animation-delay: 0.2s; }
.fuse-cell:nth-child(3) .fuse-wire-top::after { animation-delay: 0.4s; }
.fuse-cell:nth-child(4) .fuse-wire-top::after { animation-delay: 0.6s; }
.fuse-cell:nth-child(5) .fuse-wire-top::after { animation-delay: 0.1s; }
.fuse-cell:nth-child(6) .fuse-wire-top::after { animation-delay: 0.3s; }
.fuse-cell:nth-child(7) .fuse-wire-top::after { animation-delay: 0.5s; }
.fuse-cell:nth-child(8) .fuse-wire-top::after { animation-delay: 0.7s; }

.fuse-cell:nth-child(1) .fuse-wire-bottom::after { animation-delay: 0.5s; }
.fuse-cell:nth-child(2) .fuse-wire-bottom::after { animation-delay: 0.7s; }
.fuse-cell:nth-child(3) .fuse-wire-bottom::after { animation-delay: 0.9s; }
.fuse-cell:nth-child(4) .fuse-wire-bottom::after { animation-delay: 1.1s; }
.fuse-cell:nth-child(5) .fuse-wire-bottom::after { animation-delay: 0.6s; }
.fuse-cell:nth-child(6) .fuse-wire-bottom::after { animation-delay: 0.8s; }
.fuse-cell:nth-child(7) .fuse-wire-bottom::after { animation-delay: 1.0s; }
.fuse-cell:nth-child(8) .fuse-wire-bottom::after { animation-delay: 1.2s; }

/* The fuse switch itself (#19 Breaker Handle style) */
.fuse-switch {
  width: 34px;
  height: 56px;
  background: #161620;
  border-radius: 6px;
  border: 1px solid #2a2a35;
  position: relative;
  overflow: hidden;
  margin: 6px 0;
  transition: var(--transition);
  flex-shrink: 0;
}

/* Top glow zone */
.fuse-switch::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: transparent;
  transition: 0.3s;
}

/* The handle */
.fuse-switch::after {
  content: '';
  position: absolute;
  left: 5px; right: 5px;
  top: 6px;
  height: 20px;
  background: linear-gradient(180deg, #888, #555);
  border-radius: 4px;
  transition: 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Tripped state — handle goes DOWN */
.fuse-cell.tripped .fuse-switch::before {
  background: var(--green-dim);
}

.fuse-cell.tripped .fuse-switch::after {
  top: auto;
  bottom: 6px;
  background: linear-gradient(180deg, var(--green), #16a34a);
  box-shadow: 0 0 8px var(--green-glow);
}

.fuse-cell.tripped .fuse-switch {
  border-color: rgba(34,197,94,0.3);
}

/* Fuse label */
.fuse-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 6px;
  line-height: 1.2;
  max-width: 80px;
}

.fuse-cell.tripped .fuse-label {
  color: var(--green);
}

/* Fuse icon */
.fuse-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.fuse-icon svg { width: 16px; height: 16px; color: var(--text-tertiary); }
.fuse-cell.tripped .fuse-icon svg { color: var(--green); }

/* Click hint for categories with sub-items */
.fuse-drilldown-hint {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* --- Selection Counter --- */
.selection-counter { text-align: center; padding: 16px 0; font-size: 0.88rem; color: var(--text-secondary); }
.selection-counter strong { color: var(--green); font-weight: 700; }

/* --- Custom Domain --- */
.custom-domain { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.custom-domain h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.custom-domain-input { display: flex; gap: 8px; }
.custom-domain-input input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); font-family: var(--font-mono); font-size: 0.85rem; outline: none; transition: var(--transition); }
.custom-domain-input input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.custom-domain-input input::placeholder { color: var(--text-tertiary); }
.custom-domains-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.domain-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--surface-active); border: 1px solid var(--border); border-radius: 100px; font-size: 0.8rem; font-family: var(--font-mono); color: var(--text-secondary); }
.domain-tag button { background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 0; line-height: 1; font-size: 1rem; }
.domain-tag button:hover { color: var(--red); }

/* --- Policy status badges --- */
.policy-status { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; margin-top: 4px; display: inline-block; }
.policy-status.on { background: var(--green-dim); color: var(--green); }
.policy-status.off { background: var(--surface-active); color: var(--text-tertiary); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; border-radius: var(--radius); font-family: var(--font); font-weight: 700; font-size: 1rem; border: none; cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-primary { background: var(--green); color: #000; box-shadow: 0 0 24px var(--green-glow), 0 2px 8px rgba(0,0,0,0.3); }
.btn-primary:hover { background: #2dd968; transform: translateY(-1px); box-shadow: 0 0 32px var(--green-glow), 0 4px 12px rgba(0,0,0,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 10px 16px; }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; border-radius: var(--radius-lg); }
.cta-wrapper { text-align: center; padding: 28px 0; }

/* --- All remaining UI (progress, devices, DNS, guides, modals, PIN, dashboard, banners) --- */
/* These remain unchanged from previous version */

.setup-screen { text-align: center; padding: 80px 0; }
.progress-container { max-width: 400px; margin: 40px auto; }
.progress-bar { height: 6px; background: var(--surface-active); border-radius: 100px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: var(--green); border-radius: 100px; width: 0%; transition: width 0.5s ease; box-shadow: 0 0 12px var(--green-glow); }
.progress-text { font-size: 0.9rem; color: var(--text-secondary); min-height: 1.5em; }
.setup-complete { animation: fadeInUp 0.5s ease; }
.setup-complete h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.setup-complete p { color: var(--text-secondary); margin-bottom: 32px; }
.checkmark-circle { width: 80px; height: 80px; border-radius: 50%; background: var(--green-dim); border: 2px solid var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; animation: scaleIn 0.5s var(--spring); }
.checkmark-circle svg { width: 40px; height: 40px; color: var(--green); }
@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.device-section h2 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.device-section > p { text-align: center; color: var(--text-secondary); margin-bottom: 32px; }
.device-primary { background: var(--surface); border: 2px solid var(--green); border-radius: var(--radius-lg); padding: 32px; text-align: center; margin-bottom: 24px; box-shadow: 0 0 32px var(--green-dim); }
.device-primary .detected-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: var(--green-dim); border-radius: 100px; font-size: 0.75rem; color: var(--green); font-weight: 600; margin-bottom: 16px; }
.device-primary h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.device-primary p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 24px; }
.device-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: var(--transition); cursor: pointer; }
.device-card:hover { border-color: var(--border-light); background: var(--surface-hover); }
.device-card svg { width: 28px; height: 28px; color: var(--text-secondary); margin-bottom: 8px; }
.device-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.device-card p { font-size: 0.75rem; color: var(--text-tertiary); line-height: 1.4; }

.dns-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.dns-info h4 { font-size: 0.8rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.dns-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dns-row:last-child { border-bottom: none; }
.dns-label { font-size: 0.85rem; color: var(--text-secondary); }
.dns-value { font-family: var(--font-mono); font-size: 0.85rem; color: var(--green); display: flex; align-items: center; gap: 8px; }
.copy-btn { background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 4px; border-radius: 4px; transition: var(--transition); display: flex; }
.copy-btn:hover { color: var(--text); background: var(--surface-active); }
.copy-btn.copied { color: var(--green); }

.share-section { text-align: center; padding: 32px 0; margin-top: 24px; border-top: 1px solid var(--border); }
.share-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.share-section p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }
.share-buttons { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.guide-accordion { margin-top: 24px; }
.guide-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.guide-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; transition: var(--transition); background: none; border: none; width: 100%; color: var(--text); font-family: var(--font); font-size: 0.95rem; font-weight: 600; text-align: left; }
.guide-header:hover { background: var(--surface-hover); }
.guide-header svg { width: 20px; height: 20px; color: var(--text-secondary); }
.guide-header .chevron { margin-left: auto; transition: transform 0.2s ease; }
.guide-item.open .guide-header .chevron { transform: rotate(180deg); }
.guide-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.guide-item.open .guide-body { max-height: 600px; }
.guide-content { padding: 0 20px 20px; }
.guide-steps { list-style: none; counter-reset: step; }
.guide-steps li { counter-increment: step; padding: 10px 0 10px 40px; position: relative; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; border-left: 1px solid var(--border); margin-left: 14px; }
.guide-steps li::before { content: counter(step); position: absolute; left: -14px; width: 28px; height: 28px; background: var(--surface-active); border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--text); }
.guide-steps li:last-child { border-left-color: transparent; }

.banner { padding: 14px 20px; border-radius: var(--radius); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.banner-error { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.banner-info { background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; padding-top: 80px; gap: 16px; }
.dashboard-header h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.dashboard-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-top: 4px; }
.dashboard-actions { display: flex; gap: 4px; flex-shrink: 0; }
.dashboard-status { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; margin-top: 24px; font-size: 0.9rem; color: var(--text-secondary); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-tertiary); }
.status-dot.active { background: var(--green); box-shadow: 0 0 8px var(--green-glow); animation: pulse-dot 2s ease-in-out infinite; }
.status-dot.partial { background: var(--amber); box-shadow: 0 0 8px var(--amber-glow); }
.dashboard-loading { text-align: center; padding: 80px 0; color: var(--text-secondary); }
.dashboard-loading .spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 480px; width: 100%; position: relative; animation: slideUp 0.3s ease; max-height: 90vh; overflow-y: auto; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-tertiary); font-size: 1.5rem; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); transition: var(--transition); line-height: 1; }
.modal-close:hover { color: var(--text); background: var(--surface-active); }
.modal-icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--green-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--green); }
.modal h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.modal p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.modal-steps-list { list-style: none; counter-reset: modal-step; margin: 16px 0 24px; padding: 0; }
.modal-steps-list li { counter-increment: modal-step; padding: 8px 0 8px 36px; position: relative; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.modal-steps-list li::before { content: counter(modal-step); position: absolute; left: 0; width: 24px; height: 24px; background: var(--surface-active); border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: var(--text); }
.token-input-wrapper { position: relative; margin-top: 8px; }
.token-input-wrapper input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 48px 14px 16px; color: var(--text); font-family: var(--font-mono); font-size: 0.85rem; outline: none; transition: var(--transition); }
.token-input-wrapper input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.token-input-wrapper input::placeholder { color: var(--text-tertiary); font-family: var(--font); }
.token-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); transition: var(--transition); }
.token-toggle:hover { color: var(--text); background: var(--surface-active); }

.pin-unlock { text-align: center; padding: 80px 0; display: flex; flex-direction: column; align-items: center; }
.pin-unlock h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.pin-unlock > p { color: var(--text-secondary); margin-bottom: 24px; }
.pin-input-wrapper { max-width: 320px; width: 100%; }
.pin-input-wrapper input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; color: var(--text); font-family: var(--font-mono); font-size: 1.25rem; text-align: center; letter-spacing: 0.3em; outline: none; transition: var(--transition); }
.pin-input-wrapper input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.pin-input-wrapper input::placeholder { font-size: 0.85rem; letter-spacing: normal; font-family: var(--font); color: var(--text-tertiary); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.5s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } html { scroll-behavior: auto; } }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero { padding: 100px 0 40px; }
  .fuse-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .dashboard-header { flex-direction: column; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .btn { flex: 1; }
  .dns-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .device-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .device-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .btn-lg { width: 100%; padding: 16px; }
  .share-buttons { flex-direction: column; }
  .share-buttons .btn { width: 100%; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mb-4 { margin-bottom: 16px; }

/* Hidden toggle (used by JS internally, not visible — the fuse-switch is the visual) */
.toggle { display: none; }
