*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0a08;
  --bg-2: #141009;
  --panel: #1a1411;
  --card: #1e1713;
  --card-2: #241b16;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #f5efe9;
  --text-2: #b3a59a;
  --text-3: #7e7169;
  --orange: #ff7a1a;
  --orange-2: #ff9a45;
  --orange-deep: #e9600c;
  --orange-soft: rgba(255,122,26,.12);
  --orange-line: rgba(255,122,26,.28);
  --cream: #fbf2e7;
  --cream-2: #f3e4d3;
  --ink: #2a1c13;
  --ink-2: #6f5a4b;
  --radius: 16px;
  --sidebar: 248px;
  --rail: 330px;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
}

html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(900px 420px at 40% -8%, rgba(255,122,26,.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { background: rgba(255,122,26,.10); color: var(--orange-2); padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
[hidden] { display: none !important; }

.ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Marca ===== */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 44px; height: 44px; border-radius: 11px; display: block; }
.brand-word { display: flex; flex-direction: column; line-height: .92; font-weight: 800; letter-spacing: .02em; }
.brand-word span {
  font-size: 19px;
  background: linear-gradient(180deg, #f4f1ee 0%, #b9b3ae 55%, #8d8781 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word strong {
  font-size: 23px; font-weight: 800;
  background: linear-gradient(180deg, #ffa24d 0%, #ff7a1a 55%, #d95a08 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-lg .brand-icon { width: 56px; height: 56px; border-radius: 13px; }
.brand-lg .brand-word span { font-size: 23px; }
.brand-lg .brand-word strong { font-size: 28px; }

/* ===== Estrutura ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar); flex-shrink: 0;
  display: flex; flex-direction: column; gap: 28px;
  padding: 26px 16px 20px;
  background: linear-gradient(180deg, #120d0a, #0f0b09);
  border-right: 1px solid var(--line);
}
.sidebar > .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 12px 14px; border-radius: 12px; border: 1px solid transparent;
  color: #d9cfc7; font-size: 15px; font-weight: 500; text-align: left;
  transition: background .18s, color .18s, border-color .18s;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav-item.active {
  color: var(--orange-2); font-weight: 600;
  background: linear-gradient(90deg, rgba(255,122,26,.16), rgba(255,122,26,.06));
  border-color: var(--orange-line);
}
.nav-item.active::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--orange); }
.nav-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--orange-2); background: var(--orange-soft); border-radius: 999px; padding: 1px 8px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; border-top: 1px solid var(--line); }
.nav-sub { padding: 9px 14px; font-size: 14px; color: var(--text-2); }
.nav-sub .ico { width: 18px; height: 18px; }

.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  background: rgba(14,10,8,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand-mobile, .only-mobile, .icon-btn.only-mobile { display: none; }
.search {
  flex: 1; max-width: 560px; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line-2);
  color: var(--text-2); transition: border-color .18s, background .18s;
}
.search:focus-within { border-color: var(--orange-line); background: rgba(255,122,26,.05); color: var(--orange-2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--text-2); }

.content {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 28px;
  padding: 30px 32px 60px; max-width: 1440px; width: 100%;
}
.main { min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.rail { display: flex; flex-direction: column; gap: 20px; align-self: start; }

/* ===== Hero ===== */
.hero h1 { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--orange); background: linear-gradient(180deg, #ffa24d, #ff7a1a 60%, #e9600c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 10px; color: var(--text-2); font-size: 18px; font-weight: 500; }
.hero-sub i { font-style: normal; margin: 0 8px; color: var(--text-3); }

/* ===== Agentes ===== */
.agents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent-card {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
  padding: 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.agent-card:hover { transform: translateY(-2px); border-color: var(--orange-line); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.agent-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.tile {
  width: 56px; height: 56px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
  color: var(--orange);
  background: linear-gradient(160deg, rgba(255,122,26,.20), rgba(255,122,26,.06));
  border: 1px solid rgba(255,122,26,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.tile .ico { width: 26px; height: 26px; }
.agent-body { min-width: 0; flex: 1; }
.agent-body strong { display: block; font-size: 17px; font-weight: 600; color: #fff; line-height: 1.25; }
.agent-body p { font-size: 13px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.agent-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--orange-2); font-size: 14px; font-weight: 500; }
.agent-link .ico { width: 16px; height: 16px; transition: transform .18s; }
.agent-card:hover .agent-link .ico { transform: translateX(3px); }
.agent-count { font-size: 12px; color: var(--text-3); margin-left: 6px; font-weight: 500; }

/* ===== Seções ===== */
.section-title { font-size: 19px; font-weight: 700; margin-bottom: 14px; letter-spacing: -.01em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border-radius: 12px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2);
  font-size: 15px; font-weight: 500; color: #eee5de; transition: border-color .18s, background .18s;
}
.chip .ico { color: var(--orange); }
.chip:hover { border-color: var(--orange-line); background: var(--card-2); }

/* ===== Lista de skills ===== */
.skills-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.skills-head .section-title { margin-bottom: 0; }
.skills-meta { display: flex; align-items: center; gap: 14px; }
.skills-count { color: var(--text-2); font-size: 14px; }
.skills-count strong { color: var(--orange-2); }
.link-btn { color: var(--orange-2); font-size: 13px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.skills-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.skill-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  transition: border-color .18s, transform .18s;
}
.skill-card:hover { border-color: var(--orange-line); transform: translateY(-2px); }
.skill-card.flash { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card-top .tile { width: 42px; height: 42px; border-radius: 11px; }
.card-top .tile .ico { width: 21px; height: 21px; }
.card-kicker { flex: 1; min-width: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-2); }
.fav-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); transition: color .18s, background .18s; }
.fav-btn:hover { color: var(--orange-2); background: rgba(255,255,255,.05); }
.fav-btn.on { color: var(--orange); }
.fav-btn.on .ico { fill: currentColor; }
.skill-card h3 { font-size: 16px; font-weight: 600; line-height: 1.3; color: #fff; }
.card-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.45; flex: 1; }
.card-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; transition: background .18s, border-color .18s, transform .1s;
}
.btn-sm .ico { width: 17px; height: 17px; }
.btn-sm:active { transform: scale(.98); }
.btn-sm.primary { flex: 1; color: #fff; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); box-shadow: 0 6px 18px rgba(255,122,26,.25); }
.btn-sm.primary:hover { background: linear-gradient(180deg, #ff9640, #f0680f); }
.btn-sm.ghost { border: 1px solid var(--line-2); color: #e8ded6; }
.btn-sm.ghost:hover { border-color: var(--orange-line); background: var(--orange-soft); }
.empty {
  grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--text-2);
  border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ===== Guia ===== */
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.panel { padding: 20px; border-radius: var(--radius); background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); }
.panel h3 { font-size: 17px; margin: 4px 0 10px; }
.panel ol { padding-left: 20px; color: var(--text-2); font-size: 14px; }
.panel ol li { margin-bottom: 6px; }
.panel ol strong { color: var(--text); }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-2); }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange-2); font-weight: 700; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* ===== Visões =====
   Início: banner de novidades, tipos, kits, destaques e lista. Kits: só a grade de kits.
   Kit: barra do kit + itens. Tipo/Novidades/Stack: só a lista. Guia: só o guia. */
#guideSection, #kitBar, #kitsSection, #novidadesBanner { display: none; }
body[data-view="inicio"] #kitsSection,
body[data-view="kits"] #kitsSection { display: block; }
body[data-view="inicio"] #novidadesBanner:not([hidden]) { display: block; }
body[data-view="kit"] #kitBar { display: block; }
body[data-view="guia"] #guideSection { display: block; }
body:not([data-view="inicio"]) #agentsSection,
body:not([data-view="inicio"]) #featuredSection,
body[data-view="guia"] #skillsSection,
body[data-view="kits"] #skillsSection,
body.buscando #agentsSection,
body.buscando #kitsSection,
body.buscando #novidadesBanner,
body.buscando #featuredSection { display: none !important; }

/* ===== Rail ===== */
.rail-card {
  padding: 20px; border-radius: 18px;
  background: linear-gradient(180deg, #221a15, #1a1411);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.rail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rail-head .tile { width: 46px; height: 46px; border-radius: 12px; }
.rail-head .tile .ico { width: 23px; height: 23px; }
.rail-head h3 { font-size: 20px; font-weight: 700; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 11px; font-size: 14px; font-weight: 500; color: #e9dfd7;
  background: rgba(255,255,255,.035); border: 1px solid var(--line-2);
  transition: border-color .18s, background .18s, color .18s;
}
.cat-chip .ico { width: 17px; height: 17px; color: var(--text-2); }
.cat-chip small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.cat-chip:hover { border-color: var(--orange-line); }
.cat-chip.active { color: #fff; background: linear-gradient(180deg, rgba(255,122,26,.28), rgba(255,122,26,.14)); border-color: var(--orange); }
.cat-chip.active .ico, .cat-chip.active small { color: #ffd2ad; }

.bonus-card { background: linear-gradient(180deg, #1c1511, #130f0c); }
.bonus-badge {
  display: inline-block; padding: 5px 11px; border-radius: 8px;
  background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.bonus-card h3 { font-size: 22px; font-weight: 800; font-style: italic; letter-spacing: -.01em; margin: 12px 0 14px; line-height: 1.15; }
.bonus-video {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 70%, #5a2c0f 0%, #2a160b 45%, #120c09 100%);
  border: 1px solid var(--line-2);
}
.bonus-glow { position: absolute; inset: auto 10% 12% 10%; height: 40%; background: radial-gradient(closest-side, rgba(255,140,50,.55), transparent); filter: blur(10px); }
.bonus-folder { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); color: #ff8a2e; }
.bonus-folder .ico { width: 120px; height: 120px; fill: rgba(255,122,26,.85); stroke: #ffb070; stroke-width: 1; filter: drop-shadow(0 10px 22px rgba(255,110,20,.45)); }
.bonus-play {
  position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20,12,8,.55); border: 2px solid rgba(255,255,255,.9); color: #fff;
  transition: transform .18s;
}
.bonus-play .ico { width: 24px; height: 24px; fill: #fff; stroke: none; margin-left: 3px; }
.bonus-video:hover .bonus-play { transform: translate(-50%, -50%) scale(1.07); }
.bonus-bar { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 10px; color: #fff; }
.bonus-bar .ico { width: 13px; height: 13px; fill: #fff; stroke: none; }
.bonus-bar .bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); position: relative; }
.bonus-bar .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 22%; border-radius: 3px; background: var(--orange); }
.lessons { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.lessons a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); font-size: 14.5px; font-weight: 500;
  transition: border-color .18s, background .18s;
}
.lessons a:hover { border-color: var(--orange-line); background: var(--orange-soft); }
.lessons a span { flex: 1; }
.lessons .chev { width: 17px; height: 17px; color: var(--text-3); }
.bonus-note { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.45; }

/* ===== Abas inferiores (celular) ===== */
.tabbar { display: none; }

/* ===== Modal (card creme) ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(8,5,3,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; animation: fade .18s ease; }
.modal-box {
  width: 100%; max-width: 680px; max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 26px; border-radius: 22px;
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.55);
  animation: rise .22s ease;
}
.modal-grip { display: none; }
.modal-header { display: flex; align-items: center; gap: 14px; }
.tile-light { background: linear-gradient(160deg, #ffe0c4, #ffd0a8); border-color: rgba(233,96,12,.18); color: var(--orange-deep); }
.modal-heading { flex: 1; min-width: 0; }
.modal-kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-deep); }
.modal-header h2 { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
.fav-light { color: #b7a18f; }
.fav-light:hover { background: rgba(0,0,0,.05); color: var(--orange-deep); }
.fav-light.on { color: var(--orange-deep); }
.modal-close { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.modal-close:hover { background: rgba(0,0,0,.06); }
.modal-desc { color: var(--ink-2); margin: 14px 0 6px; font-size: 15px; }
.modal-fonte { font-size: 12.5px; color: var(--ink-2); margin: -2px 0 4px; }
.modal-fonte a { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 2px; }
.credits > p { color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.credits ul { padding-left: 18px; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.credits ul li { margin-bottom: 4px; word-break: break-word; }
.credits details p { font-size: 12.5px; color: var(--text-3); }
.checklist { list-style: none; margin: 14px 0 18px; border-top: 1px solid rgba(42,28,19,.10); border-bottom: 1px solid rgba(42,28,19,.10); padding: 8px 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 8px 2px; }
.chk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ffe3cb; color: var(--orange-deep); flex-shrink: 0; }
.chk .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.checklist strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.checklist small { color: var(--ink-2); font-size: 13px; }
.modal-tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 11px; background: rgba(42,28,19,.07); margin-bottom: 12px; }
.modal-tab { padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.modal-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.modal-content-area {
  max-height: 34vh; overflow-y: auto; padding: 16px 18px; border-radius: 14px;
  background: rgba(255,255,255,.7); border: 1px solid rgba(42,28,19,.08);
  color: #3a2a1f; font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.modal-content-area.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.modal-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 15px 20px; border-radius: 13px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, #ff8a2e, var(--orange-deep));
  box-shadow: 0 10px 24px rgba(233,96,12,.35); transition: transform .1s, filter .18s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(.99); }
.modal-actions-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid rgba(42,28,19,.16); background: rgba(255,255,255,.5);
}
.btn-ghost .ico { width: 17px; height: 17px; color: var(--orange-deep); }
.btn-ghost:hover { background: #fff; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Login ===== */
body.locked .app { display: none; }
#authGate { display: none; }
body.locked #authGate { display: flex; }
.auth-gate {
  min-height: 100vh; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(700px 400px at 50% 20%, rgba(255,122,26,.14), transparent 60%), var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px; padding: 34px 30px; border-radius: 22px;
  background: linear-gradient(180deg, #221a15, #171210); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.auth-card .brand { margin-bottom: 26px; }
.auth-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.auth-sub { color: var(--text-2); font-size: 14.5px; margin: 8px 0 20px; }
#authForm { display: flex; flex-direction: column; gap: 10px; }
#authEmail {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 16px; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); outline: none;
}
#authEmail:focus { border-color: var(--orange-line); background: rgba(255,122,26,.05); }
#authEmail::placeholder { color: var(--text-3); }
#authBtn {
  padding: 14px; border-radius: 12px; font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); box-shadow: 0 10px 24px rgba(233,96,12,.3);
}
#authBtn:hover { filter: brightness(1.06); }
#authBtn:disabled { opacity: .6; cursor: default; }
.auth-msg { min-height: 18px; font-size: 13px; margin-top: 12px; color: var(--text-2); }
.auth-msg.erro { color: #f87171; }
.auth-help { color: var(--text-2); font-size: 12.5px; margin-top: 12px; line-height: 1.5; }
.auth-help a { color: var(--orange-2); }
.auth-help a:hover { text-decoration: underline; }

/* ===== Responsivo ===== */
@media (max-width: 1240px) {
  .content { grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; padding: 26px 24px 60px; }
  .topbar { padding: 16px 24px; }
}
@media (max-width: 1060px) {
  :root { --sidebar: 84px; }
  .sidebar { padding: 22px 12px; align-items: center; }
  .sidebar > .brand { padding: 0; }
  .sidebar .brand-word, .nav-item span, .nav-badge { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item.active::before { display: none; }
  .content { grid-template-columns: 1fr; }
  .rail { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; order: -1; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .brand-mobile { display: flex; gap: 9px; }
  .brand-mobile .brand-icon { width: 34px; height: 34px; border-radius: 9px; }
  .brand-mobile .brand-word span { font-size: 14px; }
  .brand-mobile .brand-word strong { font-size: 17px; }
  .icon-btn.only-mobile { display: grid; margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; padding: 11px 14px; }
  .content { display: flex; flex-direction: column; gap: 22px; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .main, .rail { display: contents; }
  .hero { order: 1; }
  .cats-card { order: 2; }
  .agents { order: 3; }
  .featured { order: 4; }
  .skills { order: 5; }
  .guide { order: 6; }
  .bonus-card { order: 7; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 15px; margin-top: 6px; }
  .agents-grid { grid-template-columns: 1fr; gap: 10px; }
  .agent-card { padding: 14px; gap: 14px; }
  .tile { width: 48px; height: 48px; }
  .tile .ico { width: 23px; height: 23px; }
  .agent-body strong { font-size: 16px; }
  .rail-card { padding: 16px; box-shadow: none; }
  .cats-card .rail-head { margin-bottom: 12px; }
  .cats-card .rail-head .tile { width: 38px; height: 38px; }
  .cats-card .rail-head h3 { font-size: 17px; }
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chip { flex-shrink: 0; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 11px 16px 11px 13px; font-size: 14px; }
  .skills-list { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  body[data-view="agentes"] .cats-card,
  body[data-view="agentes"] .bonus-card { display: none; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(16,11,9,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-2);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 10px; color: var(--text-3); font-size: 11px; font-weight: 600; }
  .tab .ico { width: 22px; height: 22px; }
  .tab.active { color: var(--orange-2); }
  .tab.active .ico { filter: drop-shadow(0 0 8px rgba(255,122,26,.45)); }

  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box { max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet .25s ease; }
  .modal-grip { display: block; width: 42px; height: 5px; border-radius: 5px; background: rgba(42,28,19,.18); margin: 0 auto 14px; }
  .modal-header h2 { font-size: 19px; }
  .modal-header .tile { width: 44px; height: 44px; }
  .modal-content-area { max-height: 30vh; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Claude Flow (Xpress) — extensões do design system
   ===================================================================== */
.brand-icon { object-fit: cover; }
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.nav-item.active .nav-count { color: var(--orange-2); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.sidebar { overflow-y: auto; }
.nav { gap: 3px; }
.nav-item { padding: 10px 14px; }

/* tipos na Início: grade de 3 */
.types-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agent-card .agent-body p { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* cards de componente */
.card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.card-meta .dl { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .dl .ico { width: 14px; height: 14px; }
.card-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skills-toolbar { display: flex; align-items: center; gap: 10px; }
.sort-select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; color: var(--text);
  background: rgba(255,255,255,.035) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b3a59a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 30px 8px 12px; cursor: pointer;
}
.sort-select option { background: #1a1411; }
.load-more { display: flex; justify-content: center; margin-top: 18px; }
.load-more .btn-sm { flex: 0 0 auto; padding: 11px 22px; }

/* rail: stack */
.stack-card .rail-head h3 { font-size: 18px; }
.stack-empty { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.stack-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; max-height: 220px; overflow-y: auto; }
.stack-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.stack-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-list li em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-2); }
.stack-list li button { color: var(--text-3); display: grid; place-items: center; }
.stack-list li button:hover { color: #fff; }
.stack-list li button .ico { width: 15px; height: 15px; }
.rail-card .btn-sm.primary { width: 100%; }

/* bloco de código (dark e creme) */
.code-pill {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 12px;
  background: #140f0c; border: 1px solid var(--line-2); color: #ffd2ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
}
.code-pill code { flex: 1; min-width: 0; background: none; padding: 0; color: inherit; overflow-x: auto; white-space: nowrap; }
.code-pill button { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); }
.code-pill button .ico { width: 16px; height: 16px; }
.modal-box .code-pill { margin: 16px 0 6px; }
.modal-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 18px; }
.modal-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(42,28,19,.08); font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.modal-steps li b { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ffe3cb; color: var(--orange-deep); font-size: 12px; }
.modal-steps li strong { display: block; color: var(--ink); font-size: 13.5px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.modal-meta span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(42,28,19,.06); color: var(--ink-2); }
.modal-box { max-width: 760px; }
.modal-content-area { max-height: 38vh; }

/* rodapé do conteúdo */
.foot-note { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 1.55; }

/* carregando */
.loading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 0; color: var(--text-2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--orange-soft); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* seletor de idioma no topo (substitui o flutuante) */
#cct-lang-switch { display: none !important; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); margin-left: auto; }
.lang-switch button { padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.lang-switch button.on { color: #fff; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); }

/* menu "Mais" no celular */
.more-sheet { position: fixed; inset: 0; z-index: 55; display: none; align-items: flex-end; background: rgba(8,5,3,.6); }
.more-sheet.open { display: flex; }
.more-box { width: 100%; padding: 12px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #1a1411; border-top: 1px solid var(--line-2); animation: sheet .22s ease; }
.more-box .modal-grip { display: block; background: rgba(255,255,255,.15); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.more-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: #e9dfd7; }
.more-grid button .ico { color: var(--orange); width: 22px; height: 22px; }
.more-grid button small { font-size: 11px; color: var(--text-3); font-weight: 500; }

@media (max-width: 1240px) { .types-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1060px) {
  .nav-count, .nav-sep { display: none; }
}
@media (max-width: 760px) {
  .types-grid { grid-template-columns: 1fr 1fr; }
  .types-grid .agent-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .types-grid .agent-body p { display: none; }
  .stack-card { order: 8; }
  .modal-steps { grid-template-columns: 1fr; }
  .lang-switch { margin-left: 0; }
  .topbar .lang-switch button { padding: 5px 8px; }
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .skills-toolbar { width: 100%; justify-content: space-between; }
}

/* quebra de texto longo (caminhos, descrições) — evita a caixa passar da tela */
.modal-box { min-width: 0; overflow-x: hidden; }
.modal-desc, .modal-meta span, .modal-header h2, .card-desc, .skill-card h3 { overflow-wrap: anywhere; }
.modal-meta span { max-width: 100%; }
.skills-list { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.skill-card, .code-pill, .card-meta { min-width: 0; }
.card-meta .card-path { min-width: 0; flex: 1; }
@media (max-width: 760px) {
  .skills-list { grid-template-columns: minmax(0, 1fr); }
  .modal-steps { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Logo completo (imagem) ===== */
.brand-logo { display: block; width: 196px; max-width: 100%; height: auto; }
.brand-icon-only { display: none; }
.sidebar > .brand { padding: 0 6px; }
.brand-lg .brand-logo { width: 236px; }
.brand-mobile .brand-logo { width: 124px; }
@media (max-width: 1060px) {
  .sidebar .brand-logo { display: none; }
  .sidebar .brand-icon-only { display: block; }
}

/* =====================================================================
   Expansão do catálogo: kits, novidades, fonte/licença, sistema (curl)
   ===================================================================== */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head .section-title { margin-bottom: 2px; }
.section-sub { color: var(--text-2); font-size: 14px; }
.section-head .link-btn { white-space: nowrap; }

/* banner de novidades (Início) */
.nb-in {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,122,26,.20), rgba(255,122,26,.04) 55%), linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--orange-line); transition: transform .18s, box-shadow .18s;
}
.nb-in:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.nb-badge { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 5px 10px; border-radius: 999px; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); }
.nb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nb-text strong { font-size: 16px; }
.nb-text span { color: var(--text-2); font-size: 13px; }
.nb-cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--orange-2); font-weight: 600; font-size: 14px; }
.nb-cta .ico { width: 16px; height: 16px; }

/* kits */
.kits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kit-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); min-width: 0;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); transition: border-color .18s, transform .18s;
}
.kit-card:hover { border-color: var(--orange-line); transform: translateY(-2px); }
.kit-main { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; }
.kit-main .tile { flex-shrink: 0; }
.kit-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kit-body strong { font-size: 16px; }
.kit-body p { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.kit-tipos { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kit-actions { display: flex; gap: 8px; }
.kit-actions .btn-sm.ghost { flex: 0 0 auto; }
a.btn-sm { display: inline-flex; align-items: center; justify-content: center; }

.kit-bar { margin-bottom: 26px; }
.kit-bar-in { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.kit-bar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kit-bar-text strong { font-size: 16px; }
.kit-bar-text span { color: var(--text-2); font-size: 13.5px; }
.kit-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kit-bar-actions .btn-sm { flex: 0 0 auto; padding-left: 16px; padding-right: 16px; }
.kit-bar .stack-empty { margin-top: 10px; font-size: 12.5px; }
.code-block {
  margin: 0; padding: 14px; border-radius: 12px; background: #140f0c; border: 1px solid var(--line-2); color: #ffd2ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all; max-height: 190px; overflow-y: auto;
}

/* selo "Novo" */
.badge-novo { flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-2); padding: 3px 8px; border-radius: 999px; background: var(--orange-soft); border: 1px solid var(--orange-line); }

/* seletor de sistema (comandos curl) */
.so-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0; font-size: 12.5px; color: var(--text-2); }
.so-switch button { padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-3); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.so-switch button.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); }
.modal-box .so-switch { color: var(--ink-2); margin: 14px 0 -8px; }
.modal-box .so-switch button { color: var(--ink-2); border-color: rgba(42,28,19,.14); background: rgba(255,255,255,.6); }
.modal-box .so-switch button.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ff8a2e, var(--orange-deep)); }
.code-pill.multi code { white-space: pre-wrap; word-break: break-all; max-height: 110px; overflow-y: auto; }

/* fonte, licença e avisos no detalhe */
.modal-fonte { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.modal-fonte a { color: var(--orange-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.modal-nota { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: #7a3b0b; background: #ffe9d4; border: 1px solid rgba(233,96,12,.25); }

/* créditos no guia */
.credits { margin-top: 16px; }
.credits p { color: var(--text-2); font-size: 14px; }
.credits ul { list-style: none; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.credits li { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.credits li a { color: var(--orange-2); font-weight: 600; }
.credits details { border-top: 1px solid var(--line); padding-top: 12px; }
.credits summary { cursor: pointer; color: var(--text); font-size: 14px; font-weight: 600; }
.license-text { margin-top: 10px; font-size: 11.5px; line-height: 1.55; color: var(--text-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 1240px) { .kits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .kits-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kit-card { padding: 14px; }
  .kits { order: 3; }
  .novidades-banner { order: 2; }
  .kit-bar { order: 2; }
  .nb-in { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .nb-cta { width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* grade de tipos: 10 tipos → 2 linhas de 5 no desktop (cards compactos) */
@media (min-width: 1241px) {
  .types-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .types-grid .agent-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
  .types-grid .agent-body p { display: none; }
  .types-grid .tile { width: 44px; height: 44px; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  .types-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .types-grid .agent-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .types-grid .agent-body p { display: none; }
}
@media (min-width: 761px) {
  .types-grid .agent-body { min-width: 0; width: 100%; }
  .types-grid .agent-body strong { font-size: 15.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .types-grid .agent-link { white-space: nowrap; font-size: 13px; }
  .types-grid .al-txt { display: none; }
  .types-grid .agent-count { order: -1; margin: 0 6px 0 0; font-size: 13px; color: var(--text-2); font-weight: 600; }
}

/* cards de kit: ícone em cima, texto com largura total, botões em uma linha */
.kit-main { flex-direction: column; gap: 12px; }
.kit-main .tile { width: 46px; height: 46px; }
.kit-actions .btn-sm { white-space: nowrap; }
.kit-actions .btn-sm.primary { flex: 1; min-width: 0; }
body[data-view="kits"] #kitsSection .section-head { display: none; }
@media (min-width: 761px) { .types-grid .agent-body strong { font-size: 14.5px; letter-spacing: -.01em; } }
.kit-actions .btn-sm { padding-left: 12px; padding-right: 12px; font-size: 13.5px; }
@media (min-width: 1241px) { .kit-actions .btn-sm.primary .ico { display: none; } }

/* =====================================================================
   Barras de rolagem na paleta do sistema (finas, laranja translúcido)
   Chrome/Edge/Safari usam ::-webkit-scrollbar; o Firefox usa scrollbar-color.
   (No Chrome 121+, definir scrollbar-width/color num elemento desliga o
   ::-webkit-scrollbar dele — por isso as propriedades padrão ficam só no Firefox.)
   ===================================================================== */
:root { color-scheme: dark; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: rgba(255,122,26,.24); border: 3px solid transparent; border-radius: 10px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,122,26,.5); }
/* sidebar: trilho bem estreito, mais visível ao passar o mouse */
.sidebar { overflow-x: hidden; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { border: 0; border-radius: 4px; background-color: rgba(255,122,26,.16); }
.sidebar:hover::-webkit-scrollbar-thumb { background-color: rgba(255,122,26,.42); }
/* áreas creme do detalhe do item */
.modal-box::-webkit-scrollbar-thumb, .modal-content-area::-webkit-scrollbar-thumb { background-color: rgba(42,28,19,.18); }
.modal-box::-webkit-scrollbar-thumb:hover, .modal-content-area::-webkit-scrollbar-thumb:hover { background-color: rgba(233,96,12,.5); }
@supports not selector(::-webkit-scrollbar) {
  html, .sidebar, .code-block, .code-pill code, .stack-list, .more-box { scrollbar-width: thin; scrollbar-color: rgba(255,122,26,.3) transparent; }
  .modal-box, .modal-content-area { scrollbar-width: thin; scrollbar-color: rgba(42,28,19,.25) transparent; }
}

/* =====================================================================
   Menu lateral recolhido (desktop) — botão no header, à esquerda da busca
   Abaixo de 1060px a sidebar já fica só com ícones (regras do responsivo).
   ===================================================================== */
.sidebar { transition: width .22s ease, padding .22s ease; }
.menu-toggle { flex-shrink: 0; transition: border-color .18s, background .18s, color .18s; }
.menu-toggle:hover, .menu-toggle:focus-visible { border-color: var(--orange-line); background: var(--orange-soft); color: var(--orange-2); outline: none; }
.menu-toggle .ico-abrir, .menu-colapsado .menu-toggle .ico-fechar { display: none; }
.menu-colapsado .menu-toggle .ico-abrir { display: block; }
@media (min-width: 1061px) {
  body.menu-colapsado { --sidebar: 84px; }
  .menu-colapsado .sidebar { padding: 22px 12px 20px; align-items: center; }
  .menu-colapsado .sidebar > .brand { padding: 0; }
  .menu-colapsado .sidebar .brand-logo { display: none; }
  .menu-colapsado .sidebar .brand-icon-only { display: block; }
  .menu-colapsado .sidebar .nav-item span,
  .menu-colapsado .sidebar .nav-count { display: none; }
  .menu-colapsado .sidebar .nav-item { justify-content: center; padding: 12px; }
  .menu-colapsado .sidebar .nav-item.active::before { display: none; }
  .menu-colapsado .sidebar .nav-sep { width: 32px; margin: 8px auto; }
  .menu-colapsado .sidebar-foot { align-items: center; width: 100%; }
}
@media (max-width: 1060px) { .menu-toggle { display: none; } }

/* dica com o nome do item quando a sidebar está só com ícones */
.nav-tip {
  position: fixed; z-index: 70; transform: translateY(-50%); pointer-events: none; opacity: 0; transition: opacity .12s;
  padding: 7px 11px; border-radius: 9px; white-space: nowrap; font-size: 13px; font-weight: 600; color: #fff;
  background: #241b16; border: 1px solid var(--orange-line); box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.nav-tip.show { opacity: 1; }
.nav-tip::before { content: ''; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; background: #241b16; border-left: 1px solid var(--orange-line); border-bottom: 1px solid var(--orange-line); transform: translateY(-50%) rotate(45deg); }
/* variante abaixo do elemento (botão do header) */
.nav-tip.abaixo { transform: translateX(-50%); }
.nav-tip.abaixo::before { left: 50%; top: -5px; transform: translateX(-50%) rotate(135deg); }

/* sidebar: marca no topo e rodapé fixos; só a lista de navegação rola (o botão de recolher fica sempre visível) */
.sidebar { overflow: hidden; }
.sidebar > .nav { flex: 1 1 auto; min-height: 0; align-self: stretch; overflow-y: auto; overflow-x: hidden; margin: 0 -8px; padding: 0 8px; }
.sidebar-foot { margin-top: 0; flex-shrink: 0; align-self: stretch; }
.sidebar > .nav::-webkit-scrollbar { width: 4px; }
.sidebar > .nav::-webkit-scrollbar-thumb { border: 0; border-radius: 4px; background-color: rgba(255,122,26,.16); }
.sidebar:hover > .nav::-webkit-scrollbar-thumb { background-color: rgba(255,122,26,.42); }
@supports not selector(::-webkit-scrollbar) {
  .sidebar > .nav { scrollbar-width: thin; scrollbar-color: rgba(255,122,26,.3) transparent; }
}

/* ===== Pacotes extras (order bumps) =====
   Pacotes: grade de pacotes. Pacote: barra (baixar .zip ou desbloquear) + skills do pacote.
   Skills bloqueadas aparecem com cadeado; o conteúdo só vem da API depois da compra. */
#pacoteBar, #pacotesSection, #pacotesBanner { display: none; }
body[data-view="pacotes"] #pacotesSection { display: block; }
body[data-view="pacote"] #pacoteBar { display: block; }
body[data-view="inicio"] #pacotesBanner:not([hidden]) { display: block; }
body[data-view="pacotes"] #skillsSection,
body.buscando #pacotesBanner { display: none !important; }
#pacotesBanner { margin-top: -12px; }
.nb-pacote { background: radial-gradient(120% 140% at 100% 0%, rgba(255,154,69,.22), rgba(255,122,26,.04) 55%), linear-gradient(180deg, var(--card-2), var(--card)); }

.pacotes .kits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pacote-card.is-locked .tile, .pack-item.is-locked .tile { color: var(--text-2); background: rgba(255,255,255,.05); border-color: var(--line-2); }
.pacote-status { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-2); }
.pacote-card.is-open { border-color: var(--orange-line); }
.pacote-bar .link-btn { align-self: center; }
.pacote-creditos { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pacote-creditos summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text); }
.pacote-creditos p { margin-top: 8px; font-size: 13px; color: var(--text-2); }
.pacote-creditos ul { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.pacote-creditos li { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.pacote-creditos li a { color: var(--orange-2); font-weight: 600; }

.badge-lock, .badge-ok { flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge-lock { color: var(--text-2); background: rgba(255,255,255,.05); border: 1px solid var(--line-2); }
.badge-ok { color: #7ee2a8; background: rgba(46,204,113,.10); border: 1px solid rgba(46,204,113,.28); }
.pack-item.is-locked h3, .pack-item.is-locked .card-desc { opacity: .78; }
.btn-sm .ico, .btn-primary .ico { flex-shrink: 0; }
button.ghost[disabled] { opacity: .55; cursor: not-allowed; }
.pacote-email { margin-top: 8px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.pacote-email b { color: var(--text); }
.pack-lock .pacote-email { color: var(--ink-2); }
.pack-lock .pacote-email b { color: var(--ink); }

/* detalhe de skill de pacote: sem comando de instalação (vem em .zip) nem estrela da stack */
.modal-box.is-pack #modalCmdBox,
.modal-box.is-pack #modalFav,
.modal-box.is-pack > .modal-steps,
.modal-box.is-pack .modal-actions > .btn-primary { display: none; }
.modal-pack .modal-steps { margin-top: 16px; }
.pack-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pack-actions .link-btn { color: var(--orange-deep); }
.pack-lock { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px; border-radius: 12px; background: #fff4e8; border: 1px solid rgba(233,96,12,.22); color: var(--ink); }
.pack-lock > .ico { width: 22px; height: 22px; flex-shrink: 0; color: var(--orange-deep); margin-top: 2px; }
.pack-lock strong { display: block; font-size: 15px; }
.pack-lock p { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

@media (max-width: 760px) {
  .pacotes .kits-grid { grid-template-columns: minmax(0, 1fr); }
  .pacotes { order: 3; }
  .pacote-bar { order: 2; }
  #pacotesBanner { margin-top: 0; order: 2; }
  .pack-actions .btn-primary { width: 100%; justify-content: center; }
}
