/* ThemeScope — shared styles
   Design: clean white site with deep-navy "inspection" surfaces.
   Display: Space Grotesk · Body: Inter · Readout: IBM Plex Mono */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #101828;
  --ink-2: #1b2536;
  --paper: #ffffff;
  --mist: #f4f6fb;
  --accent: #4f46e5;
  --accent-press: #4038c9;
  --scan: #14b8a6;
  --signal: #f59e0b;
  --line: #e4e8f0;
  --muted: #667085;
  --danger: #e5484d;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink); position: relative; flex: none;
  display: grid; place-items: center;
}
.brand .dot::after {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--scan);
  box-shadow: 0 0 0 3px rgba(20,184,166,.25);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .93rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 720px){ .nav-links a.hide-sm { display: none; } }

/* ---------- Hero / scanner ---------- */
.hero { padding: 60px 0 30px; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--scan);
  font-weight: 500; margin: 0 0 14px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.06;
  letter-spacing: -.025em; margin: 0 0 16px; max-width: 15ch;
}
.hero p.lede {
  font-size: 1.12rem; color: var(--muted); max-width: 56ch; margin: 0 0 8px;
}

/* Scanner panel */
.scanner {
  margin-top: 30px;
  background: var(--ink);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.scanner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 200px at 15% -10%, rgba(79,70,229,.35), transparent 60%),
    radial-gradient(500px 200px at 90% 120%, rgba(20,184,166,.28), transparent 60%);
  pointer-events: none;
}
.scanner-label {
  font-family: 'IBM Plex Mono', monospace; color: #9aa7c7;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 12px; position: relative;
}
.detect-form { display: flex; gap: 10px; position: relative; }
.detect-form input {
  flex: 1; height: 56px; border: 1px solid #2b3852; border-radius: 12px;
  background: #0b1220; color: #eaf0ff; font-size: 1rem;
  padding: 0 16px; font-family: 'IBM Plex Mono', monospace;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.detect-form input::placeholder { color: #5b6c8f; }
.detect-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,70,229,.25); }
.btn {
  height: 56px; padding: 0 26px; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 1rem;
  font-family: 'Inter', sans-serif; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
@media (max-width: 560px){
  .detect-form { flex-direction: column; }
  .detect-form input { flex: none; width: 100%; height: 56px; }
  .btn { width: 100%; justify-content: center; }
}
.hint {
  position: relative; margin-top: 12px; color: #7d8bab;
  font-size: .82rem; font-family: 'IBM Plex Mono', monospace;
}
.hint b { color: #b7c2de; font-weight: 500; cursor: pointer; }
.hint b:hover { color: var(--scan); }

/* Result readout */
.readout {
  position: relative; margin-top: 18px; border-radius: 14px;
  background: #0b1220; border: 1px solid #22314c;
  font-family: 'IBM Plex Mono', monospace; color: #d7e0f5;
  overflow: hidden; display: none;
}
.readout.show { display: block; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity:1; transform:none;} }
.readout .scanline {
  height: 3px; background: linear-gradient(90deg, transparent, var(--scan), transparent);
  animation: sweep 1.1s linear infinite;
}
@keyframes sweep { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.readout .body { padding: 20px 22px; }
.readout .status { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.readout .status.ok { color: var(--scan); }
.readout .status.bad { color: var(--signal); }
.readout .status.err { color: var(--danger); }
.readout .row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px dashed #22314c; }
.readout .row:first-of-type { border-top: 0; }
.readout .k { color: #7d8bab; }
.readout .v { color: #eaf0ff; text-align: right; word-break: break-word; }
.readout .v a { color: var(--scan); }
.readout .big { font-size: 1.35rem; color: #fff; font-weight: 600; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg);} }

/* Apps stage — second step */
.apps-stage { display: none; margin-top: 14px; }
.apps-stage.show { display: block; animation: fadein .25s ease; }
.btn-scan {
  width: 100%; justify-content: center; background: transparent;
  border: 1px solid var(--scan); color: var(--scan);
}
.btn-scan:hover { background: rgba(20,184,166,.12); }
.app-groups { display: grid; gap: 14px; }
.app-group .cat {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #7d8bab; margin-bottom: 7px;
}
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #12213a; border: 1px solid #22314c; color: #eaf0ff;
  border-radius: 999px; padding: 5px 12px; font-size: .84rem;
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-mist { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2.sec {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 10px;
}
.sec-sub { color: var(--muted); max-width: 60ch; margin: 0 0 34px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px){ .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: relative;
}
.step .num {
  font-family: 'IBM Plex Mono', monospace; font-size: .8rem; color: var(--accent);
  font-weight: 600; letter-spacing: .1em;
}
.step h3 { font-family: 'Space Grotesk', sans-serif; margin: 10px 0 6px; font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Article grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px){ .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .grid { grid-template-columns: 1fr; } }
.card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; color: var(--ink);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d3d9e6; }
.card .tag { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; color: var(--scan); letter-spacing: .08em; text-transform: uppercase; }
.card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.08rem; margin: 10px 0 6px; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq details {
  border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 12px; background: var(--paper);
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none;
  font-family: 'Space Grotesk', sans-serif; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Article page ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 50px 20px 20px; }
.article .kicker { font-family:'IBM Plex Mono', monospace; color: var(--scan); font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; }
.article h1 { font-family:'Space Grotesk', sans-serif; font-weight:700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height:1.1; letter-spacing:-.02em; margin:.5rem 0 .5rem; }
.article .meta { color: var(--muted); font-size:.9rem; margin-bottom: 30px; }
.article h2 { font-family:'Space Grotesk', sans-serif; font-size:1.5rem; margin: 38px 0 12px; letter-spacing:-.01em; }
.article h3 { font-family:'Space Grotesk', sans-serif; font-size:1.18rem; margin: 26px 0 8px; }
.article p, .article li { font-size: 1.05rem; color: #2b3648; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article blockquote {
  border-left: 3px solid var(--scan); margin: 24px 0; padding: 4px 18px; color: var(--muted);
  background: var(--mist); border-radius: 0 8px 8px 0;
}
.article code {
  font-family:'IBM Plex Mono', monospace; background: var(--mist); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 6px; font-size: .9em;
}
.article pre {
  background: var(--ink); color: #eaf0ff; padding: 18px; border-radius: 12px; overflow: auto;
  font-family:'IBM Plex Mono', monospace; font-size: .88rem; line-height: 1.5;
}
.article pre code { background: none; border: 0; padding: 0; color: inherit; }
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--mist); border-radius: 0 10px 10px 0; padding: 16px 18px; margin: 24px 0;
}
.tool-cta {
  margin: 34px 0; background: var(--ink); color: #fff; border-radius: 16px; padding: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.tool-cta h4 { font-family:'Space Grotesk', sans-serif; margin: 0 0 4px; font-size: 1.15rem; }
.tool-cta p { margin: 0; color: #9aa7c7; font-size: .92rem; }
.tool-cta .btn { flex: none; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--mist); padding: 40px 0; margin-top: 20px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot .brand { margin-bottom: 8px; }
.foot p { color: var(--muted); font-size: .9rem; margin: 6px 0 0; max-width: 40ch; }
.foot-links { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-col h5 { font-family:'Space Grotesk', sans-serif; font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; color: var(--muted); margin: 0 0 10px; }
.foot-col a { display: block; color: var(--ink); font-size: .92rem; margin: 6px 0; }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

/* Ad slot placeholder */
.ad-slot {
  border: 1px dashed var(--line); border-radius: 12px; background: var(--mist);
  color: var(--muted); text-align: center; padding: 20px; font-size: .82rem;
  font-family:'IBM Plex Mono', monospace; margin: 30px auto;
}
