/* Treinamento Now 111
   Paleta da marca NOW (laranja, amarelo, vermelho) sobre neutros quentes.
   Layout: barra fixa com marca + menu de módulos; cada módulo é uma tela própria dentro de <main id="app">. */
:root {
  --bg: #FAF7F3; --surface: #FFFFFF; --surface2: #F3EEE8; --fg: #1E1712; --muted: #6E625A; --line: #E4DBD2;
  --orange: #FF6B00; --sun: #FFB400; --red: #C62A1F; --ink: #1E1712;
  --nasc: #E9A300; --nasc-bg: #FFF2CC; --poen: #C8402E; --poen-bg: #FBE1DC;
  --ok: #1F8A4C; --ok-bg: #DDF3E5; --bad: #B42318; --bad-bg: #FDE4E1;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15110E; --surface: #1F1915; --surface2: #2A221C; --fg: #F4ECE4; --muted: #B3A79D; --line: #3A3029;
  --orange: #FF7A1A; --sun: #FFC233; --red: #F0604F;
  --nasc: #FFC233; --nasc-bg: #3A2E10; --poen: #F07A62; --poen-bg: #3D1F19;
  --ok: #5FD08D; --ok-bg: #16301F; --bad: #FF8A7A; --bad-bg: #3A1A16; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #15110E; --surface: #1F1915; --surface2: #2A221C; --fg: #F4ECE4; --muted: #B3A79D; --line: #3A3029;
  --orange: #FF7A1A; --sun: #FFC233; --red: #F0604F;
  --nasc: #FFC233; --nasc-bg: #3A2E10; --poen: #F07A62; --poen-bg: #3D1F19;
  --ok: #5FD08D; --ok-bg: #16301F; --bad: #FF8A7A; --bad-bg: #3A1A16; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; font-stretch: 88%; outline: none; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; font-stretch: 88%; }
h2.sub { margin: 2rem 0 1rem; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
code { font-size: .85em; background: var(--surface2); padding: .05rem .3rem; border-radius: 4px; }
.muted { color: var(--muted); }
.note { font-size: .82rem; color: var(--muted); }
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- barra superior e menu ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.logo { font-family: var(--display); font-weight: 900; font-stretch: 72%; font-size: 1.6rem; text-decoration: none; line-height: 1; }
.logo span { color: var(--orange); }
.prog { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.prog-track { width: 110px; height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
#progressbar { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.themebtn { border: 1px solid var(--line); background: var(--surface); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
.nav { border-top: 1px solid var(--line); }
.nav-in { display: flex; gap: .2rem; overflow-x: auto; padding-block: .4rem; scrollbar-width: thin; }
.nav a { white-space: nowrap; text-decoration: none; font-size: .85rem; font-weight: 600; padding: .4rem .75rem; border-radius: 999px; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.nav a:hover { background: var(--surface2); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.nav a .dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.nav a.done .dot { background: var(--ok); border-color: var(--ok); }

/* ---------- views ---------- */
.view { animation: in .25s ease-out; }
@keyframes in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.block { padding-block: 2.2rem 3rem; }
.modhead { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.6rem; }
.modhead .t { flex: 1; min-width: 0; display: grid; gap: .35rem; }
.modhead .t p { max-width: 64ch; color: var(--muted); }
.modnum { font-family: var(--display); font-weight: 900; font-stretch: 70%; font-size: 3rem; line-height: .9; color: var(--orange); }
.modnum.sm { font-size: 1.8rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.row-wrap { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.split > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; min-width: 0; }
.card h3 { margin-bottom: .45rem; }
.card p, .card li { font-size: .93rem; }
ul.clean { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
ul.clean li { padding-left: 1.1rem; position: relative; }
ul.clean li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; background: var(--orange); border-radius: 1px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.pitch { background: var(--surface2); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .95rem; border-left: 4px solid var(--orange); }
.pitch b { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; display: block; margin-bottom: .25rem; color: var(--orange); }
.time { display: flex; align-items: baseline; gap: .5rem; }
.time b { font-family: var(--display); font-size: 2.2rem; font-weight: 900; font-stretch: 75%; color: var(--orange); line-height: 1; }
.big { font-family: var(--display); font-weight: 900; font-stretch: 78%; font-size: 2.4rem; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.stats p { margin-top: .3rem; }

/* botões */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: var(--orange); color: var(--ink); font-weight: 700; border-radius: 999px; padding: .6rem 1.15rem; cursor: pointer; text-decoration: none; font-size: .92rem; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--fg); }
.btn.ghost:hover { border-color: var(--orange); }
.btn.sm { padding: .3rem .8rem; font-size: .8rem; }
.btn.dark { background: var(--ink); color: #FFFFFF; }
.btn.ghost-dark { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.donebtn { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: .55rem 1rem; font-size: .85rem; font-weight: 600; cursor: pointer; }
.donebtn[aria-pressed="true"] { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.simbtn { border: 1.5px solid var(--orange); color: var(--orange); background: transparent; border-radius: 999px; padding: .2rem .7rem; font-size: .78rem; font-weight: 700; cursor: pointer; }
.simbtn:hover { background: var(--orange); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .12rem .6rem; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.chip.n { background: var(--nasc-bg); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--nasc); }
.chip.p { background: var(--poen-bg); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--poen); }
.chip.v { background: var(--ok-bg); color: var(--ok); }
.chip.x { background: var(--surface2); color: var(--muted); }
.chip.m { background: var(--surface2); color: var(--fg); }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--poen-bg); color: var(--fg); }

/* imagens */
.ph { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface2); aspect-ratio: 4 / 3; max-width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.tall { aspect-ratio: 4 / 4.2; }
.ph.wide { aspect-ratio: 16 / 9; }
.ph figcaption { position: absolute; left: .6rem; bottom: .6rem; background: rgba(30, 23, 18, .78); color: #FFFFFF; font-size: .76rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.ph.noimg { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); }
.ph.noimg figcaption { position: static; background: transparent; color: var(--muted); }

/* ---------- início ---------- */
.hero { background: var(--orange); color: var(--ink); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -12%; top: -30%; width: 58%; height: 170%; background: var(--sun); transform: skewX(-18deg); }
.hero-in { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 2.6rem max(16px, env(safe-area-inset-right, 0px)) 2.6rem max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: end; }
.hero-in > * { min-width: 0; }
.brand { font-size: clamp(3.4rem, 9vw, 6.6rem); font-weight: 900; font-stretch: 72%; margin: .3rem 0 .6rem; }
.brand span { color: #FFFFFF; }
.lead { font-size: 1.06rem; max-width: 34em; }
.cta { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.fact { background: #FFFFFF; color: #1E1712; border-radius: var(--radius); padding: .85rem .95rem; }
.fact b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.fact small { font-size: .78rem; color: #5B5048; }
.modcards { margin-top: 1rem; }
.modcard { display: grid; gap: .35rem; align-content: start; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; transition: border-color .15s, transform .15s; }
.modcard:hover { border-color: var(--orange); transform: translateY(-2px); }
.modcard p { font-size: .88rem; color: var(--muted); }
.modcard .state { font-size: .8rem; font-weight: 700; color: var(--orange); margin-top: .3rem; }
.modcard.done .state { color: var(--ok); }

/* ---------- lazer ---------- */
.lazer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; align-items: start; }
.tabs { display: grid; gap: .4rem; }
.tabs button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .65rem .8rem; cursor: pointer; display: grid; gap: .1rem; }
.tabs button span { font-size: .82rem; color: var(--muted); }
.tabs button[aria-selected="true"] { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }

/* ---------- objeções ---------- */
.objs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
.objlist { display: grid; gap: .4rem; }
.objlist button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .65rem .8rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
.objlist button[aria-selected="true"] { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.objcard { display: grid; gap: .8rem; justify-items: start; }
.answer { display: grid; gap: .6rem; background: var(--surface2); border-radius: 8px; padding: 1rem; width: 100%; }

/* ---------- planta ---------- */
.planwrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.2rem; align-items: start; }
.planwrap > * { min-width: 0; }
.svgbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; overflow-x: auto; }
.svgbox svg { width: 100%; height: auto; min-width: 520px; display: block; }
.svgbox text { font-family: var(--body); fill: var(--fg); }
.svgbox .lbl { font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.svgbox .lbl2 { font-size: 12px; font-weight: 700; }
.svgbox .cp { font-size: 13px; font-weight: 800; }
.svgbox .tiny { font-size: 9px; fill: var(--muted); }
.u rect { stroke: var(--fg); stroke-width: 1.2; cursor: pointer; }
.u.n rect { fill: var(--nasc-bg); }
.u.p rect { fill: var(--poen-bg); }
.u:hover rect, .u.sel rect { stroke-width: 3; stroke: var(--orange); }
.u text { font-weight: 700; font-size: 15px; pointer-events: none; }
.legend { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
.detail h2 { font-size: 1.8rem; }

/* ---------- tabela ---------- */
.stats { margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .8rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: .42rem .85rem; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.inp { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .5rem .65rem; font-size: .9rem; }
.toggle { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--orange); }
.tablebox { overflow: auto; max-height: 70vh; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 900px; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface2); position: sticky; top: 0; z-index: 1; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " ↕"; opacity: .4; }
td.r, th.r { text-align: right; }
tbody tr:hover { background: var(--surface2); }
tr.sold td { color: var(--muted); text-decoration: line-through; }
tr.sold td.keep { text-decoration: none; }

/* ---------- simulador ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.2rem; align-items: start; }
.sim > *, .res > * { min-width: 0; }
.ctl { display: grid; gap: 1.05rem; position: sticky; top: 110px; }
.ctl hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
.field label { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.field label output { color: var(--orange); font-weight: 800; font-variant-numeric: tabular-nums; }
.field select, .field input[type=text] { width: 100%; }
input[type=range] { width: 100%; accent-color: var(--orange); }
.res { display: grid; gap: 1rem; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.fin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .85rem; min-width: 0; }
.step .k { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.step .v { font-family: var(--display); font-weight: 800; font-stretch: 82%; font-size: 1.32rem; line-height: 1.15; margin: .2rem 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.step .s { font-size: .78rem; color: var(--muted); }
.steps .step .v { font-size: 1.12rem; overflow-wrap: normal; white-space: nowrap; }
.step.hl { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.step.hl .k, .step.hl .s { color: var(--bg); opacity: .75; }
.bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.bar div { display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--ink); overflow: hidden; white-space: nowrap; transition: flex-basis .25s; }
.b1 { background: var(--sun); } .b2 { background: var(--orange); } .b3 { background: var(--red); color: #FFFFFF !important; } .b4 { background: var(--surface2); color: var(--fg) !important; }
.barleg { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.barleg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.barleg i.outline { box-shadow: inset 0 0 0 1px var(--line); }
.timeline h3 { font-size: .95rem; }
.timeline svg { width: 100%; height: auto; display: block; }
.timeline text { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.timeline text.strong { fill: var(--fg); font-weight: 700; }
textarea#proposta { width: 100%; min-height: 160px; border: 1px solid var(--line); background: var(--surface2); border-radius: 8px; padding: .7rem; font-size: .85rem; color: var(--fg); resize: vertical; }

/* ---------- quiz ---------- */
.qprog { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
#qbar { height: 100%; width: 0; background: var(--orange); transition: width .3s; }
.q { display: grid; gap: .9rem; padding: 1.5rem; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.opts button { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 8px; padding: .75rem .9rem; cursor: pointer; font-size: .93rem; }
.opts button:hover:not(:disabled) { border-color: var(--orange); }
.opts button.right { background: var(--ok-bg); border-color: var(--ok); }
.opts button.wrong { background: var(--bad-bg); border-color: var(--bad); }
.opts button:disabled { cursor: default; }
.exp { font-size: .9rem; color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding-block: 1.6rem 2rem; font-size: .82rem; color: var(--muted); }
.foot p + p { margin-top: .4rem; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .hero-in, .planwrap, .sim, .split, .lazer, .objs { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctl { position: static; }
}
@media (max-width: 600px) {
  .g2, .g3, .g4, .opts, .fin { grid-template-columns: 1fr; }
  .prog-track { display: none; }
  .hero::after { width: 90%; right: -58%; }
  .modhead { flex-direction: column; gap: .3rem; }
}
