/* =====================================================================
   Vitallin Tracker — Landing
   Temas: CLARO (padrão) + ESCURO  ·  Fonte: Plus Jakarta Sans + JetBrains Mono
   ===================================================================== */

/* ---------- TEMA CLARO (padrão) ---------- */
:root {
    --bg:          #F6F8FB;
    --bg-soft:     #EEF2F8;
    --surface:     #FFFFFF;
    --surface-2:   #EFF3F9;
    --muted:       #EEF2F7;
    --border:      #E2E8F0;
    --border-soft: #EAEEF4;
    --text:        #0F172A;
    --text-muted:  #475569;
    --text-dim:    #7C8AA0;
    --code-bg:     #F1F5F9;

    --accent:      #22C55E;   /* preenchimentos */
    --accent-ink:  #15803D;   /* texto accent sobre fundo claro */
    --accent-fg:   #04130a;   /* texto sobre preenchimento accent */
    --accent-press:#16A34A;
    --accent-2:    #0EA5E9;

    --hero-glow-1: rgba(14,165,233,.14);
    --hero-glow-2: rgba(34,197,94,.16);
    --grid-line:   rgba(15,23,42,.05);

    --shadow:    0 10px 30px rgba(15,23,42,.08);
    --shadow-lg: 0 24px 60px rgba(15,23,42,.14);
    --nav-bg:    rgba(255,255,255,.78);

    --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
    --maxw: 1160px;
    --ring: 0 0 0 3px rgba(34,197,94,.35);
}

/* ---------- TEMA ESCURO ---------- */
[data-theme="dark"] {
    --bg:          #0F172A;
    --bg-soft:     #0B1120;
    --surface:     #1E293B;
    --surface-2:   #172033;
    --muted:       #222c40;
    --border:      #2b3a52;
    --border-soft: #1e293b;
    --text:        #F8FAFC;
    --text-muted:  #94A3B8;
    --text-dim:    #64748B;
    --code-bg:     #0B1120;

    --accent:      #22C55E;
    --accent-ink:  #4ADE80;
    --accent-fg:   #04130a;
    --accent-press:#16A34A;
    --accent-2:    #38BDF8;

    --hero-glow-1: rgba(56,189,248,.16);
    --hero-glow-2: rgba(34,197,94,.16);
    --grid-line:   rgba(148,163,184,.06);

    --shadow:    0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
    --nav-bg:    rgba(15,23,42,.72);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    font-family: var(--font); background: var(--bg); color: var(--text);
    line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility; overflow-x: hidden;
    transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .92em; }
ul { list-style: none; }
strong { color: var(--text); font-weight: 700; }
svg.lucide { width: 1em; height: 1em; stroke-width: 2; vertical-align: middle; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 1000; background: var(--accent); color: var(--accent-fg); font-weight: 700; padding: 10px 16px; border-radius: var(--radius-sm); transition: top .2s ease; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ===================== BUTTONS ===================== */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; white-space: nowrap; }
.btn i, .btn svg.lucide { width: 18px; height: 18px; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-sm i, .btn-sm svg.lucide { width: 15px; height: 15px; }
.btn-accent { background: var(--accent); color: var(--accent-fg); box-shadow: 0 6px 20px rgba(34,197,94,.28); }
.btn-accent:hover { background: var(--accent-press); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text-dim); transform: translateY(-2px); }

/* ===================== NAV ===================== */
.nav { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border-soft); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 66px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, var(--accent), #15803d); color: #04130a; box-shadow: 0 0 18px rgba(34,197,94,.4); }
.brand-mark svg.lucide { width: 19px; height: 19px; }
.brand-accent { color: var(--accent-ink); }
.brand-logo { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; flex: none; }
.footer-brand-row { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand-row .brand-logo { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; margin-left: 10px; flex: 1; }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 8px; transition: color .2s ease, background .2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all .2s ease; }
.theme-toggle:hover { color: var(--text); border-color: var(--text-dim); transform: translateY(-1px); }
.theme-toggle svg.lucide { width: 18px; height: 18px; }
.icon-sun { display: none; } .icon-moon { display: inline-flex; }
[data-theme="dark"] .icon-sun { display: inline-flex; } [data-theme="dark"] .icon-moon { display: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }

/* ===================== HERO ===================== */
.hero { position: relative; padding: 80px 0 66px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% 0 auto 0; height: 560px; pointer-events: none; background: radial-gradient(55% 60% at 78% 0%, var(--hero-glow-1), transparent 60%), radial-gradient(50% 60% at 18% 8%, var(--hero-glow-2), transparent 60%); }
.hero-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .7; background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0/40px 40px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0/40px 40px; mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 620px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px; margin-bottom: 22px; box-shadow: var(--shadow); }
.badge.sm { padding: 4px 10px; font-size: 12px; box-shadow: none; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.07; font-weight: 800; letter-spacing: -.03em; margin-bottom: 20px; }
.grad { background: linear-gradient(100deg, var(--accent-ink), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.12rem; color: var(--text-muted); margin-bottom: 30px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 30px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats dd { font-size: .82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Terminal (sempre escuro) */
.terminal { background: #0B1120; border: 1px solid #243047; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: #0e1626; border-bottom: 1px solid #1e293b; }
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot.r { background: #ff5f57; } .tdot.y { background: #febc2e; } .tdot.g { background: #28c840; }
.terminal-title { margin-left: 8px; font-family: var(--mono); font-size: 12.5px; color: #64748B; display: inline-flex; align-items: center; gap: 6px; }
.terminal-title svg.lucide { width: 14px; height: 14px; }
.terminal-body { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #cbd5e1; padding: 18px 20px; white-space: pre-wrap; word-break: break-word; min-height: 320px; max-height: 370px; overflow-y: scroll; scrollbar-width: none; }
.terminal-body::-webkit-scrollbar { display: none; }
.c-ok { color: #4ADE80; font-weight: 700; } .c-info { color: #38BDF8; } .c-val { color: #fde68a; } .c-dim { color: #64748B; } .c-warn { color: #fbbf24; }
.cursor { display: inline-block; width: 8px; height: 15px; background: #4ADE80; margin-left: 2px; vertical-align: text-bottom; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-line { animation: termIn .28s ease both; }
@keyframes termIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ===================== SECTIONS ===================== */
.section { padding: 84px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.eyebrow { display: inline-block; color: var(--accent-ink); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.lead { color: var(--text-muted); font-size: 1.08rem; margin-top: 14px; }
code, .lead code { background: var(--muted); padding: 2px 7px; border-radius: 6px; color: var(--accent-ink); border: 1px solid var(--border-soft); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: .98rem; }
.ficon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: rgba(34,197,94,.12); color: var(--accent-ink); margin-bottom: 18px; border: 1px solid rgba(34,197,94,.22); }
.ficon svg.lucide { width: 23px; height: 23px; }

/* ===================== FLOW ===================== */
.flow { display: flex; align-items: stretch; gap: 8px; justify-content: center; flex-wrap: wrap; }
.flow-node { flex: 1 1 200px; max-width: 250px; position: relative; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); }
.flow-node.accent { border-color: rgba(34,197,94,.4); box-shadow: 0 0 0 1px rgba(34,197,94,.15), var(--shadow); }
.flow-node h3 { font-size: 1.12rem; margin-bottom: 6px; }
.flow-node p { color: var(--text-muted); font-size: .92rem; }
.flow-step { position: absolute; top: 16px; right: 18px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); font-weight: 700; }
.flow-arrow { display: grid; place-items: center; color: var(--accent-ink); padding: 0 2px; }
.flow-arrow svg.lucide { width: 26px; height: 26px; }

/* ===================== STACK ===================== */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chip { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 18px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.chip:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.cicon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--muted); color: var(--accent-ink); margin-bottom: 6px; }
.cicon svg.lucide { width: 19px; height: 19px; }
.chip b { font-size: 1.02rem; font-weight: 700; }
.chip span { color: var(--text-dim); font-size: .86rem; }

/* Vitrine de hardware (foto da placa + specs) */
.hw-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.hw-photo { margin: 0; }
.hw-photo img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-lg); }
.hw-photo figcaption { margin-top: 12px; text-align: center; font-size: .85rem; color: var(--text-muted); font-family: var(--mono); }
.hw-photo .cred { color: var(--text-dim); }
.hw-info .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.spec-list { display: grid; gap: 12px; margin-bottom: 22px; }
.spec-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .95rem; }
.spec-list li svg.lucide { flex: none; width: 20px; height: 20px; color: var(--accent-ink); }
.spec-list b { color: var(--text); margin-right: 4px; }

/* ===================== PLATFORM ===================== */
.platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.platform-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 14px; }
.check-list { display: grid; gap: 12px; margin: 24px 0 30px; }
.check-list li { display: flex; align-items: center; gap: 11px; color: var(--text-muted); }
.check-list li svg.lucide { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(34,197,94,.15); color: var(--accent-ink); border: 1px solid rgba(34,197,94,.3); box-sizing: content-box; }
.platform-mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg); }
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mock-title { font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.mock-title svg.lucide { width: 17px; height: 17px; color: var(--accent-ink); }
.mock-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.kpi-num { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-num.up { color: var(--accent-ink); }
.kpi-lbl { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.mock-map { position: relative; height: 150px; border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; border: 1px solid var(--border-soft); background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0/26px 26px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0/26px 26px, var(--surface-2); }
.mock-route { position: absolute; left: 12%; top: 70%; width: 70%; height: 40%; border-top: 2px dashed var(--accent-2); border-left: 2px dashed var(--accent-2); border-radius: 40px 0 0 0; opacity: .7; transform: rotate(-6deg); }
.pin { position: absolute; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.pin.p1 { left: 18%; top: 60%; } .pin.p2 { left: 55%; top: 38%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(56,189,248,.2);} .pin.p3 { left: 78%; top: 30%; }
.mock-rows { display: grid; gap: 8px; }
.mrow { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 13px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; }
.mrow span { display: inline-flex; align-items: center; gap: 7px; }
.mrow svg.lucide { width: 14px; height: 14px; color: var(--text-dim); }
.mrow .ok { color: var(--accent-ink); } .mrow .dim { color: var(--text-dim); }

/* ---- Platform grid: texto esq (0.7) + browser dir (1.3) ---- */
.plat-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 52px;
    align-items: center;
}
.plat-copy h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 10px; }
.plat-copy .lead { color: var(--text-muted); margin-bottom: 0; }
.plat-copy .check-list { margin: 20px 0 26px; }

/* ---- Platform screenshot gallery ---- */
.plat-preview { min-width: 0; }
.plat-browser {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0,0,0,.18), 0 0 0 1px var(--border);
    background: var(--surface);
}
.plat-browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-soft);
}
.plat-dots { display: flex; gap: 6px; flex: none; }
.plat-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.plat-dot-r { background: #FF5F57; }
.plat-dot-y { background: #FEBC2E; }
.plat-dot-g { background: #28C840; }
.plat-url {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-dim);
    background: var(--muted);
    border-radius: 20px;
    padding: 4px 14px;
    max-width: 210px;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
}
.plat-url svg.lucide { width: 11px; height: 11px; flex: none; }
.plat-bar-space { width: 52px; flex: none; }
.plat-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
    overflow-x: auto;
    scrollbar-width: none;
}
.plat-tabs::-webkit-scrollbar { display: none; }
.plat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
    font-family: var(--font);
}
.plat-tab:hover { color: var(--text); }
.plat-tab.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.plat-tab svg.lucide { width: 13px; height: 13px; }
/* screenshots */
.plat-screens {
    position: relative;
    aspect-ratio: 2940 / 1442;
    overflow: hidden;
    background: var(--surface-2);
}
.plat-screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.plat-screen.active { opacity: 1; }

/* ===================== COMANDOS ===================== */
.channel-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.channel { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px; padding: 6px 14px; }
.channel svg.lucide { width: 14px; height: 14px; color: var(--accent-ink); }
.search-wrap { position: relative; max-width: 620px; margin: 0 auto; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); display: flex; }
.search-icon svg.lucide { width: 18px; height: 18px; }
.search-input { width: 100%; font-family: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px 48px; transition: border-color .2s ease, box-shadow .2s ease; }
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.clear-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer; background: var(--muted); color: var(--text-muted); display: grid; place-items: center; }
.clear-btn:hover { background: var(--border); color: var(--text); }
.clear-btn svg.lucide { width: 15px; height: 15px; }
.search-results { text-align: center; color: var(--text-dim); font-size: .9rem; margin-top: 12px; min-height: 18px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 26px 0 34px; }
.tab { font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: all .2s ease; }
.tab:hover { color: var(--text); border-color: var(--border); }
.tab.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; }
.commands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.command-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: rise .4s ease both; box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.command-card:hover { border-color: var(--border); transform: translateY(-2px); }
.command-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.command-name { font-weight: 700; font-size: 1.04rem; letter-spacing: -.01em; }
.command-category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: var(--muted); color: var(--text-muted); border: 1px solid var(--border-soft); }
.command-description { color: var(--text-muted); font-size: .94rem; flex: 1; }
.command-syntax { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--code-bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.syntax-text { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); word-break: break-all; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); background: var(--muted); border: 1px solid var(--border-soft); border-radius: 8px; padding: 7px 11px; cursor: pointer; transition: all .2s ease; white-space: nowrap; }
.copy-btn:hover { color: var(--text); border-color: var(--border); }
.copy-btn svg.lucide { width: 14px; height: 14px; }
.copy-btn.copied { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.command-aliases, .command-example { font-size: .85rem; color: var(--text-dim); }
.command-aliases code, .command-example code { background: var(--muted); }
.no-results { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-dim); }
.no-results svg.lucide { width: 38px; height: 38px; opacity: .5; margin-bottom: 12px; }

/* Cores por categoria */
.category-consulta  { color: #0284c7; background: rgba(2,132,199,.1);   border-color: rgba(2,132,199,.25); }
.category-rede      { color: #6366f1; background: rgba(99,102,241,.1);  border-color: rgba(99,102,241,.25); }
.category-config    { color: #0891b2; background: rgba(8,145,178,.1);   border-color: rgba(8,145,178,.25); }
.category-energia   { color: #b45309; background: rgba(180,83,9,.1);    border-color: rgba(180,83,9,.25); }
.category-alarme    { color: #dc2626; background: rgba(220,38,38,.1);   border-color: rgba(220,38,38,.25); }
.category-sensor    { color: #059669; background: rgba(5,150,105,.1);   border-color: rgba(5,150,105,.25); }
.category-rele      { color: #9333ea; background: rgba(147,51,234,.1);  border-color: rgba(147,51,234,.25); }
.category-bluetooth { color: #2563eb; background: rgba(37,99,235,.1);   border-color: rgba(37,99,235,.25); }
.category-sistema   { color: #475569; background: rgba(71,85,105,.1);   border-color: rgba(71,85,105,.25); }
.category-debug     { color: #ea580c; background: rgba(234,88,12,.1);   border-color: rgba(234,88,12,.25); }
[data-theme="dark"] .category-consulta  { color: #38BDF8; background: rgba(56,189,248,.12); }
[data-theme="dark"] .category-rede      { color: #818CF8; background: rgba(129,140,248,.12); }
[data-theme="dark"] .category-config    { color: #22D3EE; background: rgba(34,211,238,.12); }
[data-theme="dark"] .category-energia   { color: #FBBF24; background: rgba(251,191,36,.12); }
[data-theme="dark"] .category-alarme    { color: #F87171; background: rgba(248,113,113,.12); }
[data-theme="dark"] .category-sensor    { color: #34D399; background: rgba(52,211,153,.12); }
[data-theme="dark"] .category-rele      { color: #C084FC; background: rgba(192,132,252,.12); }
[data-theme="dark"] .category-bluetooth { color: #60A5FA; background: rgba(96,165,250,.12); }
[data-theme="dark"] .category-sistema   { color: #A3B2C7; background: rgba(163,178,199,.12); }
[data-theme="dark"] .category-debug     { color: #FB923C; background: rgba(251,146,60,.12); }

/* ===================== FOOTER ===================== */
.footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); padding: 52px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; padding-bottom: 28px; }
.footer-brand { font-size: 18px; font-weight: 800; }
.footer-grid p { color: var(--text-dim); font-size: .92rem; margin-top: 10px; max-width: 460px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-links a { color: var(--text-muted); font-size: .94rem; display: inline-flex; align-items: center; gap: 5px; }
.footer-links a:hover { color: var(--accent-ink); }
.footer-links svg.lucide { width: 14px; height: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border-soft); padding-top: 22px; color: var(--text-dim); font-size: .85rem; }

/* ===================== TOAST ===================== */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(140%); display: inline-flex; align-items: center; gap: 9px; z-index: 1000; background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: 14px; padding: 12px 18px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.3); transition: transform .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.toast svg.lucide { width: 17px; height: 17px; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===================== DOWNLOAD CTA ===================== */
.dl-cta {
    margin-top: 48px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}
.dl-head {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    margin-bottom: 24px;
}
.dl-head > svg.lucide { flex: none; width: 30px; height: 30px; color: var(--accent-ink); }
.dl-head h3 { font-size: 1.3rem; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.dl-head p { font-size: .92rem; color: var(--text-muted); margin: 0; }

.dl-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 760px;
    margin: 0 auto;
}
.dl-btn {
    flex: 1 1 320px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
    transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease, background .15s ease;
}
.dl-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(34,197,94,.2), var(--shadow-lg);
}
.dl-ico {
    flex: none;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text);
}
.dl-btn:hover .dl-ico { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: var(--accent-ink); }
.dl-ico svg.lucide { width: 24px; height: 24px; }
.dl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-top { font-size: 1rem; font-weight: 700; color: var(--text); }
.dl-sub { font-size: .8rem; color: var(--text-dim); }
.dl-arrow { flex: none; width: 18px; height: 18px; color: var(--text-dim); transition: color .15s ease, transform .15s ease; }
.dl-btn:hover .dl-arrow { color: var(--accent-ink); transform: translateY(2px); }

.dl-btn.dl-soon { border-color: var(--accent); }
.dl-btn.dl-soon .dl-sub { color: var(--accent-ink); font-weight: 600; }

/* botão desabilitado (Windows em breve) */
.dl-btn.dl-disabled {
    cursor: default;
    opacity: .65;
    background: var(--surface-2);
    border-style: dashed;
}
.dl-btn.dl-disabled:hover { transform: none; border-color: var(--border); box-shadow: none; }
.dl-btn.dl-disabled:hover .dl-ico { background: var(--surface-2); border-color: var(--border-soft); color: var(--text-muted); }
.dl-btn.dl-disabled .dl-ico { color: var(--text-muted); }
.dl-soon-badge {
    flex: none;
    font-size: 11px; font-weight: 700; letter-spacing: .03em;
    padding: 4px 10px; border-radius: 20px;
    background: var(--muted); color: var(--text-dim);
    border: 1px solid var(--border-soft);
}

.dl-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 22px 0 0;
    font-size: .82rem;
    color: var(--text-dim);
}
.dl-note svg.lucide { width: 15px; height: 15px; color: var(--accent-ink); }

/* instruções de abertura no macOS */
.dl-help {
    max-width: 620px;
    margin: 20px auto 0;
    text-align: left;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: var(--bg);
    overflow: hidden;
}
.dl-help summary {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    font-size: .88rem; font-weight: 600; color: var(--text-muted);
    cursor: pointer; user-select: none; list-style: none;
    transition: color .15s ease;
}
.dl-help summary::-webkit-details-marker { display: none; }
.dl-help summary:hover { color: var(--text); }
.dl-help summary svg.lucide { width: 15px; height: 15px; flex: none; color: var(--accent-ink); }
.dl-help[open] summary { border-bottom: 1px solid var(--border-soft); }
.dl-help-body { padding: 16px; }
.dl-help-body > p { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 12px; }
.dl-steps { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 9px; }
.dl-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-muted); line-height: 1.5; }
.dl-stepn {
    flex: none; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(34,197,94,.14); color: var(--accent-ink);
    border: 1px solid rgba(34,197,94,.3);
    font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.dl-steps code { font-family: var(--mono); font-size: .82em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
.dl-steps strong { color: var(--text); }
.dl-help-alt {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: .82rem; color: var(--text-dim); line-height: 1.5;
    margin: 0; padding-top: 12px; border-top: 1px dashed var(--border-soft);
}
.dl-help-alt svg.lucide { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.dl-help-alt strong { color: var(--text-muted); }

@media (max-width: 560px) {
    .dl-cta { padding: 24px 18px; }
    .dl-head { flex-direction: column; text-align: center; gap: 10px; }
    .dl-btn { flex-basis: 100%; }
}

/* ===================== PINOUT DIAGRAM ===================== */
.pinout-wrap {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--border-soft);
}
.pinout-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 32px;
}
.pinout-title-row > svg.lucide { flex: none; width: 28px; height: 28px; color: var(--accent-ink); margin-top: 3px; }
.pinout-title-row h3 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.pinout-title-row p { font-size: .9rem; color: var(--text-muted); margin: 0; }
.pinout-title-row code { font-family: var(--mono); font-size: .85em; background: var(--code-bg); padding: 1px 6px; border-radius: 5px; }

/* --- Diagrama de 3 colunas --- */
.po-diagram {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    max-width: 820px;
    margin: 0 auto 40px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.1));
}

/* Chips (caixas dos módulos) */
.po-chip {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 0;
}
.po-chip-l { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.po-chip-r { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: none; }
.po-chip-hdr {
    padding: 12px 16px 10px;
    background: var(--surface-2);
    border-bottom: 1.5px solid var(--border);
}
.po-chip-l .po-chip-hdr { border-radius: var(--radius-sm) 0 0 0; }
.po-chip-r .po-chip-hdr { border-radius: 0 var(--radius-sm) 0 0; }
.po-chip-name { display: block; font-size: .95rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.po-chip-sub  { display: block; font-size: .75rem; color: var(--text-dim); margin-top: 2px; }

/* Linhas de pino */
.po-pin {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border-soft);
    font-size: .88rem;
    font-family: var(--mono);
}
.po-pin:last-child { border-bottom: none; }
.po-pin-l { justify-content: flex-end; gap: 10px; }
.po-pin-r { justify-content: flex-start; gap: 10px; }
.po-lbl { color: var(--text); font-weight: 600; white-space: nowrap; }
.po-func { font-family: var(--font); font-size: .78rem; font-style: normal; color: var(--text-dim); margin-left: 4px; font-weight: 400; }
.po-dim { color: var(--text-dim); }

/* Pino NC (AD0 → GND local, sem fio para o ESP32) */
.po-pin-nc .po-lbl { color: var(--text-dim); }
.po-pin-nc .po-dot { opacity: .5; }

/* Dot colorido */
.po-dot {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--c, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, transparent) 18%, transparent);
}

/* Coluna de fios (meio) */
.po-wires {
    display: flex;
    flex-direction: column;
    background: var(--surface-2);
    border-top: 1.5px solid var(--border);
    border-bottom: 1.5px solid var(--border);
}
.po-whdr {
    /* espaçador que iguala a altura do cabeçalho dos chips */
    flex: none;
    height: 57px; /* mesmo que .po-chip-hdr: padding(22px) + line-height */
    border-bottom: 1.5px solid var(--border);
}
.po-w {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 4px;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
}
.po-w:last-child { border-bottom: none; }
.po-w::after {
    content: '';
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--c, transparent);
    border-radius: 2px;
}
.po-w-nc::after { background: transparent; border-top: 2px dashed var(--border); height: 0; }

/* Passo a passo */
.po-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.po-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.po-step-badge {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
    margin-top: 1px;
}
.po-steps li strong { color: var(--text); }
.po-steps li code { font-family: var(--mono); font-size: .82em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; color: var(--accent-ink); }

/* Tabela de pinos (details/summary) */
.po-table-wrap {
    max-width: 820px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.po-table-wrap summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 18px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-2);
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: color .15s ease;
}
.po-table-wrap summary::-webkit-details-marker { display: none; }
.po-table-wrap summary:hover { color: var(--text); }
.po-table-wrap summary svg.lucide { width: 15px; height: 15px; flex: none; }
.po-table-wrap[open] summary { border-bottom: 1px solid var(--border-soft); }
.po-table-scroll { overflow-x: auto; }
.po-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.po-table th { text-align: left; padding: 9px 16px; background: var(--surface-2); color: var(--text-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border-soft); }
.po-table td { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text-muted); font-family: var(--mono); font-size: .84rem; }
.po-table td:first-child { font-weight: 700; color: var(--text); }
.po-table td:last-child { font-family: var(--font); font-size: .88rem; }
.po-table tr:last-child td { border-bottom: none; }
.po-table tr.pt-i2c td:first-child { color: #3B82F6; }
.po-table tr.pt-relay td:first-child { color: #F59E0B; }
.po-table tr.pt-adc td:first-child { color: var(--accent-ink); }
.po-table-legend { display: flex; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border-soft); background: var(--surface-2); }
.ptl { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.ptl.pt-modem { background: rgba(100,116,139,.12); color: var(--text-dim); }
.ptl.pt-i2c   { background: rgba(59,130,246,.12);  color: #3B82F6; }
.ptl.pt-relay { background: rgba(245,158,11,.12);  color: #D97706; }
.ptl.pt-adc   { background: rgba(34,197,94,.12);   color: var(--accent-ink); }

/* --- Responsivo pinout --- */
@media (max-width: 640px) {
    .po-diagram { grid-template-columns: 1fr 60px 1fr; }
    .po-chip-hdr { padding: 9px 10px 8px; }
    .po-pin { height: 40px; padding: 0 9px; font-size: .78rem; }
    .po-whdr { height: 50px; }
    .po-func { display: none; }
}

/* ===================== RELEASES ===================== */
.releases-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 52px;
    padding-left: 36px;
}
/* linha vertical */
.releases-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 16px;
    bottom: 40px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}
.release-item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 22px 24px 18px;
    box-shadow: var(--shadow);
    transition: box-shadow .2s ease, border-color .2s ease;
}
.release-item:hover { box-shadow: var(--shadow-lg); }
/* dot */
.release-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    z-index: 1;
    transition: border-color .2s ease;
}
/* destaque versão atual */
.release-current {
    border-color: rgba(34,197,94,.35);
    box-shadow: 0 0 0 1px rgba(34,197,94,.1), var(--shadow);
}
.release-current::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}

.release-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.release-version {
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.release-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
}
.release-badge.current {
    background: rgba(34,197,94,.12);
    color: var(--accent-ink);
    border: 1px solid rgba(34,197,94,.28);
}
.release-date {
    font-size: .85rem;
    color: var(--text-dim);
    margin-left: auto;
}
.release-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 14px;
}
.release-changes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.release-changes li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.release-changes li svg.lucide {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
}
.rc-feat svg.lucide { color: var(--accent-ink); }
.rc-fix  svg.lucide { color: var(--accent-2); }

/* ===================== FLASHER MOCKUP ===================== */
.fm-showcase {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 52px;
    align-items: center;
    margin-top: 52px;
}
.fm-left { min-width: 0; }

/* coluna direita */
.fm-info { display: flex; flex-direction: column; gap: 18px; }
.fm-info-title { font-size: 1.65rem; font-weight: 700; line-height: 1.3; color: var(--text); margin: 0; }
.fm-info-lead { color: var(--text-muted); font-size: 1rem; line-height: 1.65; margin: 0; }
.fm-features { list-style: none; display: flex; flex-direction: column; gap: 9px; padding: 0; margin: 0; }
.fm-features li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 11px 14px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: .93rem; line-height: 1.5;
}
.fm-features li svg.lucide { flex: none; width: 18px; height: 18px; color: var(--accent-ink); margin-top: 1px; }
.fm-features strong { color: var(--text); }

.fm-window {
    width: 100%;
    background: #0F172A;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 36px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07);
    font-family: var(--font);
    user-select: none;
}
/* título da janela (estilo macOS) */
.fm-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: #1a2236;
    border-bottom: 1px solid #2b3a52;
}
.fm-dots { display: flex; gap: 7px; flex: none; }
.fm-dot { width: 13px; height: 13px; border-radius: 50%; }
.fm-dot-r { background: #FF5F57; }
.fm-dot-y { background: #FEBC2E; }
.fm-dot-g { background: #28C840; }
.fm-wintitle {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
    letter-spacing: .01em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 52px; /* equilibra os dots */
}
/* corpo */
.fm-body { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.fm-apphead { display: flex; align-items: center; gap: 14px; }
.fm-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; flex: none; }
.fm-apptitle { font-size: 17px; font-weight: 700; color: #F8FAFC; }
.fm-appsub { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.fm-demo-tag {
    margin-left: auto; align-self: flex-start;
    font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #4ADE80; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
    padding: 3px 8px; border-radius: 20px;
}
/* cartão formulário */
.fm-card { background: #1E293B; border: 1px solid #334155; border-radius: 10px; }
.fm-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.fm-lbl { font-size: 12px; font-weight: 700; color: #94A3B8; width: 86px; flex: none; }

/* dropdown (USB / velocidade) */
.fm-dropdown { position: relative; flex: 1; min-width: 0; }
.fm-dropdown.fm-narrow { flex: none; width: 104px; }
.fm-select {
    width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    background: #0B1220; border: 1px solid #334155; border-radius: 6px;
    padding: 7px 10px; font-size: 12.5px; color: #F8FAFC;
    font-family: var(--mono); cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fm-select:hover { border-color: #475569; }
.fm-dropdown.open .fm-select { border-color: #22C55E; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.fm-select-val { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fm-arrow { color: #94A3B8; font-size: 10px; margin-left: 6px; flex: none; transition: transform .2s ease; }
.fm-dropdown.open .fm-arrow { transform: rotate(180deg); }
.fm-menu {
    position: absolute; top: calc(100% + 5px); left: 0; right: 0;
    list-style: none; margin: 0; padding: 4px;
    background: #1E293B; border: 1px solid #3E4C63; border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
    z-index: 20;
    opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
.fm-dropdown.open .fm-menu { opacity: 1; transform: none; pointer-events: auto; }
.fm-opt {
    font-family: var(--mono); font-size: 12px; color: #CBD5E1;
    padding: 7px 10px; border-radius: 5px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background .12s ease, color .12s ease;
}
.fm-opt:hover { background: #2b3a52; color: #fff; }
.fm-opt.active { background: rgba(34,197,94,.16); color: #4ADE80; font-weight: 600; }

/* botões */
.fm-btn-sec {
    flex: none; border: none; font-family: var(--font);
    background: #334155; color: #F8FAFC;
    font-size: 12px; font-weight: 600;
    padding: 8px 13px; border-radius: 6px;
    white-space: nowrap; cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.fm-btn-sec:hover { background: #3E4C63; }
.fm-btn-sec:active { transform: scale(.96); }
.fm-btn-sec.spinning { color: #94A3B8; pointer-events: none; }

/* checkbox */
.fm-chk {
    display: flex; align-items: center; gap: 7px;
    color: #F8FAFC; font-size: 12px;
    background: none; border: none; font-family: var(--font);
    cursor: pointer; padding: 4px 0;
}
.fm-chkbox {
    width: 16px; height: 16px; border-radius: 4px;
    border: 1px solid #334155; background: #0B1220; flex: none;
    display: grid; place-items: center;
    transition: background .15s ease, border-color .15s ease;
}
.fm-chk[aria-checked="true"] .fm-chkbox { background: #22C55E; border-color: #22C55E; }
.fm-chk[aria-checked="true"] .fm-chkbox::after {
    content: ''; width: 4px; height: 8px;
    border: solid #04130a; border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-0.5px, -1px);
}
.fm-chklbl { white-space: nowrap; }

/* botão gravar (CTA) */
.fm-btn-accent {
    display: block; width: calc(100% - 28px);
    margin: 4px 14px 10px; border: none; font-family: var(--font);
    background: #22C55E; color: #04130a;
    font-size: 14px; font-weight: 700;
    padding: 13px 16px; border-radius: 8px;
    text-align: center; letter-spacing: .01em; cursor: pointer;
    transition: background .15s ease, transform .1s ease, opacity .15s ease;
}
.fm-btn-accent:hover { background: #16A34A; }
.fm-btn-accent:active { transform: scale(.985); }
.fm-btn-accent:disabled, .fm-btn-accent.busy {
    background: #1F3D2A; color: #4ADE80; cursor: progress; opacity: .9;
}
.fm-window.busy .fm-select, .fm-window.busy .fm-btn-sec, .fm-window.busy .fm-chk { opacity: .55; pointer-events: none; }

/* barra de progresso */
.fm-prog-wrap {
    height: 9px;
    background: #0B1220;
    border: 1px solid #2a3748;
    border-radius: 6px;
    margin: 0 14px 12px;
    overflow: hidden;
}
.fm-prog-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #16A34A, #22C55E);
    border-radius: 6px;
    transition: width .35s cubic-bezier(.4,0,.2,1);
}
.fm-prog-bar.done { background: #22C55E; }
/* console de logs */
.fm-console { background: #0B1120; border: 1px solid #334155; border-radius: 10px; overflow: hidden; }
.fm-con-hdr { font-size: 10px; font-weight: 700; color: #94A3B8; letter-spacing: .08em; padding: 9px 12px 5px; border-bottom: 1px solid #1E293B; }
.fm-log {
    font-family: var(--mono); font-size: 11.5px; color: #E2E8F0; line-height: 1.7;
    padding: 8px 12px 10px; height: 200px; overflow-y: auto; scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}
.fm-log::-webkit-scrollbar { width: 6px; }
.fm-log::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.fm-line { animation: fm-lineIn .25s ease both; }
@keyframes fm-lineIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.fm-line.fm-l-muted { color: #94A3B8; }
.fm-line.fm-l-prog  { color: #93C5FD; }
.fm-line.fm-l-ok    { color: #4ADE80; font-weight: 600; }
.fm-line.fm-l-err   { color: #F87171; font-weight: 600; }
/* cursor piscante na última linha */
.fm-cursor { display: inline-block; color: #22C55E; animation: fm-blink 1s step-end infinite; margin-left: 2px; }
@keyframes fm-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.fm-statusbar { font-size: 11.5px; color: #94A3B8; padding: 2px 2px; font-weight: 600; }
.fm-statusbar.ok  { color: #4ADE80; }
.fm-statusbar.err { color: #F87171; }
/* dica abaixo da janela */
.fm-hint {
    display: flex; align-items: center; gap: 7px; justify-content: center;
    margin-top: 14px; font-size: .85rem; color: var(--text-dim);
}
.fm-hint svg.lucide { width: 15px; height: 15px; color: var(--accent-ink); }
.fm-hint strong { color: var(--text-muted); }
/* responsivo */
@media (max-width: 540px) {
    .fm-wintitle { display: none; }
    .fm-row { flex-wrap: wrap; gap: 8px; }
    .fm-select { font-size: 11.5px; }
    .fm-chklbl { font-size: 11px; }
    .fm-log { font-size: 10.5px; height: 170px; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .terminal { order: 2; }
    .platform-grid { grid-template-columns: 1fr; gap: 36px; }
    .plat-grid { grid-template-columns: 1fr; gap: 36px; }
    .cards-3 { grid-template-columns: 1fr; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .hw-grid { grid-template-columns: 1fr; gap: 30px; }
    .hw-photo { max-width: 460px; margin: 0 auto; }
    .flow { flex-direction: column; align-items: stretch; }
    .flow-node { max-width: none; }
    .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
    .fm-showcase { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
    .nav-links { display: none; }
    .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 14px 24px; gap: 4px; }
    .nav-cta { display: none; }
    .nav-toggle { display: inline-flex; }
    .section { padding: 60px 0; }
    .hero { padding: 50px 0 48px; }
    .hero-stats { gap: 22px; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
    .container { padding: 0 18px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .stack-grid, .hw-info .stack-grid { grid-template-columns: 1fr; }
    .command-syntax { flex-direction: column; align-items: stretch; }
    .copy-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
