/* SiteProbe — Professional Red Theme */
:root {
    --primary:      #dc2626;
    --primary-dark: #b91c1c;
    --primary-light:#fef2f2;
    --primary-glow: rgba(220,38,38,0.2);
    --slate-900:    #0f1923;
    --slate-800:    #162030;
    --slate-700:    #1e2d40;
    --slate-600:    #263547;
    --slate-400:    #4a6080;
    --slate-300:    #6b82a8;
    --slate-200:    #9ab0cc;
    --border:       #1e2d3d;
    --border-light: #d1dce8;
    --bg:           #f5f7fa;
    --bg-alt:       #eaeff5;
    --white:        #ffffff;
    --text:         #475569;
    --text-light:   #94a3b8;
    --heading:      #0f1923;
    --red:          #dc2626;
    --red-light:    #fef2f2;
    --green:        #16a34a;
    --green-light:  #f0fdf4;
    --amber-light:  #fef3c7;
    --radius:       12px;
    --shadow:       0 2px 16px rgba(15,25,35,0.08);
    --shadow-dark:  0 8px 40px rgba(10,15,30,0.5);
    --font-body:    'DM Sans', sans-serif;
    --font-display: 'Syne', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 1rem; color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
.nav {
    background: var(--slate-900);
    padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.nav-logo-mark {
    width: 36px; height: 36px; background: var(--primary);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
    box-shadow: 0 0 16px var(--primary-glow);
}
.nav-logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: var(--white); letter-spacing: -0.03em; }
.nav-logo-text span { color: #f87171; }
.nav-right { display: flex; align-items: center; gap: 1rem; font-size: 0.88rem; }
.nav-right a { color: var(--slate-200); font-weight: 500; transition: color 0.15s; }
.nav-right a:hover { color: white; text-decoration: none; }

/* ── LAYOUT ── */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 580px;  margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.7rem 1.5rem; border-radius: 9px;
    font-size: 0.93rem; font-weight: 700; font-family: var(--font-body);
    cursor: pointer; border: 2px solid transparent;
    transition: all 0.2s; text-decoration: none; letter-spacing: 0.01em;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 0 20px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: white; }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: white; text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,0.07); color: white; border-color: rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); text-decoration: none; color: white; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.83rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ── CARDS ── */
.card { background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card-dark { background: var(--slate-800); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-dark); }

/* ── FORMS ── */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--heading); margin-bottom: 0.4rem; }
.form-input { width: 100%; padding: 0.8rem 1rem; border: 2px solid var(--border-light); border-radius: 9px; font-size: 0.95rem; font-family: var(--font-body); color: var(--heading); background: var(--white); transition: border-color 0.2s; outline: none; }
.form-input:focus { border-color: var(--primary); }
.form-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 0.3rem; }

/* ── ALERTS ── */
.alert { padding: 0.85rem 1.2rem; border-radius: 9px; font-size: 0.9rem; margin-bottom: 1rem; border-left: 4px solid; }
.alert-error   { background: var(--red-light);   color: var(--red);    border-color: var(--red); }
.alert-success { background: var(--green-light);  color: var(--green);  border-color: var(--green); }
.alert-info    { background: #fef3c7;             color: #92400e;       border-color: #f59e0b; }

/* ── GRADE BADGES ── */
.grade-badge { display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 16px; font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; border: 2px solid; flex-shrink: 0; }
.grade-Ap, .grade-A { background: var(--green-light); color: var(--green);  border-color: #86efac; }
.grade-B            { background: #eff6ff;             color: #1d4ed8;       border-color: #93c5fd; }
.grade-C            { background: #fef3c7;             color: #92400e;       border-color: #fcd34d; }
.grade-D, .grade-F  { background: var(--red-light);   color: var(--red);    border-color: #fca5a5; }

/* ── RESULT ROWS ── */
.result-row { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; align-items: start; background: white; border-radius: 0 12px 12px 0; padding: 0.9rem 1.1rem; margin-bottom: 0.4rem; border: 1px solid; border-left-width: 4px; }
.result-row.pass { border-color: #bbf7d0; border-left-color: #22c55e; }
.result-row.fail { border-color: #fecaca; border-left-color: #ef4444; }
.result-row.warn { border-color: #fde68a; border-left-color: #f59e0b; }
.result-header-label { font-family: monospace; font-weight: 700; font-size: 0.9rem; color: var(--heading); margin-bottom: 0.2rem; }
.result-desc  { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.result-value { font-family: monospace; font-size: 0.75rem; color: var(--text-light); margin-top: 0.3rem; word-break: break-all; }
.result-fix   { font-size: 0.8rem; color: var(--red); margin-top: 0.3rem; font-weight: 600; }
.result-cat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate-400); margin: 1.2rem 0 0.4rem 0.3rem; }

/* ── SCAN BAR ── */
.scan-bar { display: flex; gap: 0.75rem; }
.scan-input { flex: 1; padding: 0.85rem 1.1rem; border: 2px solid var(--border-light); border-radius: 9px; font-size: 0.95rem; font-family: var(--font-body); outline: none; transition: border-color 0.2s; color: var(--heading); background: white; }
.scan-input:focus { border-color: var(--primary); }
select.scan-input { flex: 0 0 auto; width: auto; cursor: pointer; }

/* ── DASHBOARD LAYOUT ── */
.dash-grid { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; padding: 2rem 0; }
.sidebar-card { background: var(--slate-800); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.sidebar-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--slate-400); margin-bottom: 0.8rem; display: block; }
.tool-list { list-style: none; }
.tool-list li a { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 8px; color: var(--slate-200); font-weight: 500; font-size: 0.88rem; transition: all 0.15s; text-decoration: none; }
.tool-list li a:hover, .tool-list li a.active { background: rgba(220,38,38,0.12); color: #f87171; }
.tool-icon { font-size: 0.95rem; }
.badge-soon { margin-left: auto; font-size: 0.65rem; background: rgba(255,255,255,0.05); color: var(--slate-400); padding: 0.12rem 0.4rem; border-radius: 8px; font-weight: 600; }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate-400); margin-top: 0.2rem; }

/* ── HISTORY TABLE ── */
.history-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.history-table th { text-align: left; padding: 0.55rem 0.8rem; color: var(--text-light); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--border-light); }
.history-table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid #e8eef5; color: var(--text); }
.history-table tr:hover td { background: var(--bg); }
.grade-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 0.2rem 0.55rem; border-radius: 20px; font-size: 0.78rem; font-weight: 800; font-family: var(--font-display); }
.pill-A { background: var(--green-light); color: var(--green); }
.pill-B { background: #eff6ff; color: #1d4ed8; }
.pill-C { background: #fef3c7; color: #92400e; }
.pill-D, .pill-F { background: var(--red-light); color: var(--red); }

/* ── HERO ── */
.hero { background: var(--slate-900); padding: 6rem 0 5rem; text-align: center; position: relative; overflow: hidden; }
.hero-glow { position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 900px; height: 700px; background: radial-gradient(ellipse at center, rgba(220,38,38,0.1) 0%, transparent 60%); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; }
.hero-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.25); padding: 0.4rem 1.1rem; border-radius: 999px; font-size: 0.78rem; color: #f87171; font-weight: 600; margin-bottom: 1.5rem; position: relative; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.2rem,5.5vw,3.8rem); color: white; margin-bottom: 1.2rem; letter-spacing: -0.04em; line-height: 1.1; position: relative; }
.hero h1 em { font-style: normal; color: #f87171; }
.hero p { color: rgba(255,255,255,0.5); font-size: 1.05rem; margin-bottom: 2.5rem; max-width: 480px; margin-left: auto; margin-right: auto; position: relative; }
.hero-scan-wrap { max-width: 600px; margin: 0 auto; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1.2rem; position: relative; }
.hero-scan-wrap .scan-input { background: var(--slate-700); border-color: var(--border); color: white; }
.hero-scan-wrap .scan-input::placeholder { color: var(--slate-300); }
.hero-scan-wrap .scan-input:focus { border-color: var(--primary); }
.hero-note { color: rgba(255,255,255,0.25); font-size: 0.78rem; margin-top: 0.8rem; position: relative; }

/* ── TOOL CARDS ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.tool-card { background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); position: relative; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(10,15,30,0.1); border-color: var(--primary); }
.tool-card-icon { font-size: 2.2rem; margin-bottom: 0.9rem; }
.tool-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--heading); margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.tool-card p { font-size: 0.84rem; color: var(--text); line-height: 1.55; }
.badge-live   { position: absolute; top: 1rem; right: 1rem; background: #dcfce7; color: #15803d; font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 20px; letter-spacing: 0.04em; }
.badge-coming { position: absolute; top: 1rem; right: 1rem; background: var(--bg-alt); color: var(--text-light); font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 20px; }

/* ── SSL & SPEED ── */
.cert-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1rem; }
.cert-meta-item { background: var(--bg); border: 1px solid var(--border-light); border-radius: 9px; padding: 0.8rem 1rem; }
.cert-meta-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 0.25rem; }
.cert-meta-value { font-size: 0.9rem; font-weight: 600; color: var(--heading); word-break: break-word; }
.speed-scores { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.speed-score-card { background: var(--bg); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.2rem; text-align: center; }
.speed-score-num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; line-height: 1; margin-bottom: 0.4rem; }
.speed-score-label { font-size: 0.72rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.score-green { color: var(--green); } .score-amber { color: #d97706; } .score-red { color: var(--red); }
.score-meter { height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-top: 0.6rem; }
.score-meter-fill { height: 100%; border-radius: 999px; transition: width 0.9s ease; }
.score-good { background: linear-gradient(90deg,#22c55e,#16a34a); }
.score-ok   { background: linear-gradient(90deg,#f59e0b,#d97706); }
.score-bad  { background: linear-gradient(90deg,#ef4444,#dc2626); }
.audit-row { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.75rem 0; border-bottom: 1px solid #e8eef5; }
.audit-row:last-child { border-bottom: none; }
.audit-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.audit-title { font-size: 0.88rem; font-weight: 600; color: var(--heading); margin-bottom: 0.15rem; }
.audit-desc  { font-size: 0.82rem; color: var(--text); }

/* ── FOOTER ── */
.footer { background: var(--slate-900); border-top: 1px solid var(--border); color: rgba(255,255,255,0.3); text-align: center; padding: 1.5rem; font-size: 0.8rem; margin-top: auto; }
.footer a { color: rgba(255,255,255,0.45); }
.footer a:hover { color: #f87171; text-decoration: none; }

/* ── UTILS ── */
.text-center{text-align:center} .mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem} .mb-1{margin-bottom:.5rem} .mb-2{margin-bottom:1rem} .text-light{color:var(--text-light)} .text-sm{font-size:.85rem} .divider{border:none;border-top:1px solid var(--border-light);margin:1.5rem 0}

@media(max-width:768px){ .dash-grid{grid-template-columns:1fr} .scan-bar{flex-direction:column} .nav{padding:0 1rem} .nav-link-hide{display:none} .nav-right{gap:.5rem} .cert-meta{grid-template-columns:1fr} .speed-scores{grid-template-columns:1fr} .hero{padding:4rem 0 3rem} }
@media(max-width:480px){ .tools-grid{grid-template-columns:1fr 1fr} .container{padding:0 1rem} .hero h1{font-size:2rem} }
