*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#0F0B1A;--surface:#1A1429;--surface2:#241D38;--border:#3A3255;
  --text:#E8E4F0;--text-muted:#9F96B8;--accent:#8B5CF6;--accent-light:#A78BFA;
  --accent-bg:rgba(139,92,246,0.1);--green:#34D399;--red:#F87171;--yellow:#FBBF24;
  --radius:12px;--radius-sm:8px;--max-width:1100px;
  --font:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
html{font-size:16px;scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.6;min-height:100vh}
.container{max-width:var(--max-width);margin:0 auto;padding:0 1.5rem}
img,svg{max-width:100%;height:auto}

/* Header */
.site-header{background:var(--surface);border-bottom:1px solid var(--border);padding:1rem 0;position:sticky;top:0;z-index:100;backdrop-filter:blur(8px)}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.logo{display:flex;align-items:center;gap:0.6rem;color:var(--text);text-decoration:none;font-weight:700;font-size:1.1rem}
.logo svg{flex-shrink:0}
.site-nav{display:flex;gap:1.5rem}
.site-nav a{color:var(--text-muted);text-decoration:none;font-size:0.9rem;transition:color 0.2s}
.site-nav a:hover,.site-nav a:focus{color:var(--accent-light)}

/* Intro */
.intro{padding:3rem 0 2rem;text-align:center;max-width:640px;margin:0 auto}
.intro h1{font-size:clamp(1.6rem,4vw,2.4rem);font-weight:800;line-height:1.2;margin-bottom:0.75rem;background:linear-gradient(135deg,var(--text),var(--accent-light));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.lead{color:var(--text-muted);font-size:1.05rem}

/* Snapshot App */
.snapshot-app{margin:1rem 0 3rem}
.app-grid{display:grid;grid-template-columns:320px 1fr;gap:1.5rem;align-items:start}
@media(max-width:768px){.app-grid{grid-template-columns:1fr}}

.controls-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;position:sticky;top:80px}
.controls-panel h2{font-size:1.1rem;margin-bottom:1rem}
.field{margin-bottom:1rem}
.field label{display:block;font-size:0.85rem;font-weight:600;color:var(--text-muted);margin-bottom:0.35rem}
.field select{width:100%;padding:0.65rem 0.75rem;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:0.95rem;appearance:auto;cursor:pointer}
.field select:focus{outline:2px solid var(--accent);outline-offset:1px}

.btn-primary{width:100%;padding:0.75rem;background:var(--accent);color:white;border:none;border-radius:var(--radius-sm);font-size:1rem;font-weight:600;cursor:pointer;transition:background 0.2s,opacity 0.2s}
.btn-primary:hover:not(:disabled){background:var(--accent-light)}
.btn-primary:disabled{opacity:0.4;cursor:not-allowed}
.btn-secondary{padding:0.5rem 1rem;background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:0.85rem;cursor:pointer;transition:background 0.2s}
.btn-secondary:hover{background:var(--border)}

.presets{margin-top:1.25rem;padding-top:1rem;border-top:1px solid var(--border)}
.presets-label{font-size:0.8rem;color:var(--text-muted);margin-bottom:0.5rem}
.preset-btn{display:inline-block;padding:0.35rem 0.75rem;margin:0.2rem;background:var(--accent-bg);color:var(--accent-light);border:1px solid rgba(139,92,246,0.25);border-radius:20px;font-size:0.8rem;cursor:pointer;transition:background 0.2s}
.preset-btn:hover{background:rgba(139,92,246,0.2)}

/* Result Panel */
.result-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;min-height:300px}
.result-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:250px;color:var(--text-muted);text-align:center;gap:1rem}
.result-empty svg{opacity:0.6}
.result-header{display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap;margin-bottom:1rem}
.result-header h2{font-size:1.2rem}
.result-grade{background:var(--accent-bg);color:var(--accent-light);padding:0.2rem 0.75rem;border-radius:20px;font-size:0.8rem;font-weight:600}

.price-range{display:flex;align-items:baseline;gap:0.75rem;margin-bottom:0.75rem}
.price-label{font-size:0.85rem;color:var(--text-muted)}
.price-values{font-size:1.6rem;font-weight:800;color:var(--green)}

.trend-row{display:flex;align-items:center;gap:0.75rem;margin-bottom:1.25rem}
.trend-label{font-size:0.85rem;color:var(--text-muted)}
.trend-value{font-weight:700;font-size:1rem}
.trend-up{color:var(--green)}
.trend-down{color:var(--red)}
.trend-flat{color:var(--yellow)}

.result-notes{background:var(--surface2);border-radius:var(--radius-sm);padding:1rem;margin-bottom:1rem}
.result-notes h3{font-size:0.9rem;margin-bottom:0.4rem;color:var(--text-muted)}
.result-notes p{font-size:0.95rem;line-height:1.5}

.result-actions{display:flex;gap:0.5rem;flex-wrap:wrap;margin-bottom:1rem}
.last-updated{font-size:0.78rem;color:var(--text-muted)}

/* Comparison Table */
.comparison-section{margin:3rem 0}
.comparison-section h2{font-size:1.4rem;margin-bottom:0.5rem}
.section-note{color:var(--text-muted);font-size:0.9rem;margin-bottom:1rem}
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius)}
.comparison-table{width:100%;border-collapse:collapse;font-size:0.9rem}
.comparison-table th{background:var(--surface2);text-align:left;padding:0.75rem 1rem;font-weight:600;color:var(--text-muted);border-bottom:1px solid var(--border);white-space:nowrap}
.comparison-table td{padding:0.7rem 1rem;border-bottom:1px solid var(--border)}
.comparison-table tr:last-child td{border-bottom:none}
.comparison-table tr:hover td{background:rgba(139,92,246,0.05)}

/* Guide Section */
.guide-section{margin:3rem 0}
.guide-section h2{font-size:1.4rem;margin-bottom:1rem}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}
.guide-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}
.guide-card h3{font-size:1rem;margin-bottom:0.4rem;color:var(--accent-light)}
.guide-card p{font-size:0.9rem;color:var(--text-muted);line-height:1.5}

/* Mistakes */
.mistakes-section{margin:3rem 0}
.mistakes-section h2{font-size:1.4rem;margin-bottom:1rem}
.mistakes-list{list-style:none;display:flex;flex-direction:column;gap:0.75rem}
.mistakes-list li{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:1rem;font-size:0.9rem;line-height:1.5}
.mistakes-list li strong{color:var(--text);display:block;margin-bottom:0.2rem}

/* Troubleshooting */
.troubleshooting-section{margin:3rem 0}
.troubleshooting-section h2{font-size:1.4rem;margin-bottom:0.5rem}
.troubleshooting-section > p{color:var(--text-muted);font-size:0.9rem;margin-bottom:1rem}
.troubleshooting-list{display:flex;flex-direction:column;gap:0.75rem}
.troubleshooting-list dt{font-weight:700;font-size:0.95rem;color:var(--accent-light)}
.troubleshooting-list dd{font-size:0.9rem;color:var(--text-muted);margin:0;padding:0 0 0.5rem 0;border-bottom:1px solid var(--border);line-height:1.5}
.troubleshooting-list dd:last-of-type{border-bottom:none}

/* FAQ */
.faq-section{margin:3rem 0}
.faq-section h2{font-size:1.4rem;margin-bottom:1rem}
details{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:0.5rem;overflow:hidden}
details summary{padding:1rem;cursor:pointer;font-weight:600;font-size:0.95rem;list-style:none;display:flex;align-items:center;justify-content:space-between}
details summary::-webkit-details-marker{display:none}
details summary::after{content:'+';font-size:1.2rem;color:var(--accent-light);transition:transform 0.2s}
details[open] summary::after{content:'−'}
details summary:hover{background:var(--surface2)}
details p{padding:0 1rem 1rem;font-size:0.9rem;color:var(--text-muted);line-height:1.5}

/* Footer */
.site-footer{background:var(--surface);border-top:1px solid var(--border);padding:2rem 0 1.5rem;margin-top:3rem}
.footer-grid{display:grid;grid-template-columns:1fr auto;gap:1.5rem;margin-bottom:1.5rem}
@media(max-width:600px){.footer-grid{grid-template-columns:1fr}}
.footer-grid p{font-size:0.85rem;color:var(--text-muted);margin-top:0.4rem}
.footer-grid nav{display:flex;gap:1rem;flex-wrap:wrap}
.footer-grid nav a{color:var(--text-muted);text-decoration:none;font-size:0.85rem}
.footer-grid nav a:hover{color:var(--accent-light)}
.footer-copy{font-size:0.78rem;color:var(--text-muted);text-align:center}

/* Toast */
.toast{position:fixed;bottom:2rem;left:50%;transform:translateX(-50%);background:var(--surface2);color:var(--text);padding:0.75rem 1.5rem;border-radius:var(--radius-sm);border:1px solid var(--border);font-size:0.9rem;z-index:200;box-shadow:0 8px 32px rgba(0,0,0,0.3);transition:opacity 0.3s,transform 0.3s}
.toast[hidden]{display:none}

/* Print */
@media print{
  .site-header,.site-footer,.controls-panel,.result-actions,.presets,.toast{display:none!important}
  body{background:white;color:black}
  .result-panel{border:none;padding:0}
  .container{max-width:100%;padding:0}
}

/* Focus */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
