@font-face { font-family: 'Inter'; src: url('fonts/Inter-Regular.woff') format('woff'); font-display: swap; font-weight: 400; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-Medium.woff') format('woff'); font-display: swap; font-weight: 500; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-SemiBold.woff') format('woff'); font-display: swap; font-weight: 600; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-Bold.woff') format('woff'); font-display: swap; font-weight: 700; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-ExtraBold.woff') format('woff'); font-display: swap; font-weight: 800; }
@font-face { font-family: 'Lora'; src: url('fonts/Lora-Variable.woff') format('woff'); font-display: swap; font-weight: 400 700; font-style: normal; }
@font-face { font-family: 'Lora'; src: url('fonts/Lora-Italic-Variable.woff') format('woff'); font-display: swap; font-weight: 400 700; font-style: italic; }

:root {
  --navy: #1E3A5F; --navy-2: #2E5C8A; --navy-dk: #15294A;
  --gold: #E0A33A; --gold-dk: #9A6A12; --gold-bg: #FFF5DC;
  --green: #2E7D4F; --green-bg: #EAF5EE;
  --red: #B3362C; --red-bg: #FBEAE8;
  --blue-bg: #EAF1F9; --line: #D5DCE4; --muted: #5F6B78; --ink: #1E2A38;
  --page: #F4F6F9; --card: #FFFFFF;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--page);
  font-size: 14.5px; line-height: 1.5; display: grid; grid-template-columns: 268px 1fr; }

/* ---------- sidebar */
nav#side { background: var(--navy); color: #DCE5F0; height: 100vh; overflow-y: auto; position: sticky; top: 0;
  padding: 22px 0 28px; display: flex; flex-direction: column; }
.brand { padding: 0 22px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 10px; }
.brand .kicker { font-size: 10.5px; letter-spacing: .16em; color: var(--gold); font-weight: 600; text-transform: uppercase; }
.brand h1 { font-size: 17px; line-height: 1.25; margin: 6px 0 4px; color: #fff; font-weight: 700; }
.brand p { margin: 0; font-family: 'Lora', serif; font-style: italic; font-size: 12.5px; color: #AFC0D6; }
.group { padding: 12px 22px 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8FA6C4; font-weight: 600; }
nav#side a { display: flex; align-items: center; gap: 10px; padding: 7px 22px; color: #DCE5F0; text-decoration: none;
  font-size: 13.5px; border-left: 3px solid transparent; }
nav#side a .ch { font-size: 10.5px; color: #8FA6C4; margin-left: auto; font-variant-numeric: tabular-nums; }
nav#side a:hover { background: rgba(255,255,255,.06); }
nav#side a.active { background: rgba(224,163,58,.12); border-left-color: var(--gold); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; padding: 18px 22px 0; font-size: 11px; color: #8FA6C4; line-height: 1.45; }

/* ---------- main */
main { height: 100vh; overflow-y: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 30px 36px 60px; }
.page-head { margin-bottom: 22px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dk); }
.page-head h2 { font-size: 26px; margin: 6px 0 6px; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
.page-head p.lead { margin: 0; max-width: 760px; color: var(--muted); font-size: 15px; }
h3 { font-size: 15.5px; color: var(--navy); margin: 0 0 12px; font-weight: 700; padding-left: 10px; border-left: 4px solid var(--gold); }
h3.green { border-left-color: var(--green); }
h4 { font-size: 13px; margin: 18px 0 8px; color: var(--navy); }
.grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 20px; align-items: start; }
.grid.even { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 1px 2px rgba(20,40,70,.06), 0 0 0 1px #E3E8EE; margin-bottom: 20px; }
.card.tinted { background: var(--blue-bg); box-shadow: none; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.inp { display: flex; align-items: center; border: 1px solid #C9D2DC; border-radius: 8px; background: #fff; overflow: hidden; }
.inp:focus-within { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(46,92,138,.15); }
.inp span { padding: 0 10px; color: var(--muted); font-size: 13px; background: #F6F8FB; align-self: stretch; display: flex; align-items: center; }
.inp input, .inp select { border: 0; outline: 0; padding: 9px 10px; font: inherit; width: 100%; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
select.plain { border: 1px solid #C9D2DC; border-radius: 8px; padding: 9px 10px; font: inherit; width: 100%; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; margin: 6px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 9px 14px; cursor: pointer; background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1px #C9D2DC; }
.btn.small { padding: 6px 10px; font-size: 12.5px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* results */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { border-radius: 9px; padding: 13px 14px; background: var(--blue-bg); }
.kpi .l { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 21px; font-weight: 800; color: var(--navy); margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.green { background: var(--green-bg); } .kpi.green .v { color: var(--green); }
.kpi.red { background: var(--red-bg); } .kpi.red .v { color: var(--red); }
.kpi.gold { background: var(--gold-bg); } .kpi.gold .v { color: var(--gold-dk); }
.verdict { border-radius: 9px; padding: 14px 16px; font-weight: 600; margin-bottom: 14px; display: flex; gap: 12px; align-items: flex-start; }
.verdict .ic { font-size: 18px; line-height: 1.2; }
.verdict.ok { background: var(--green-bg); color: var(--green); }
.verdict.bad { background: var(--red-bg); color: var(--red); }
.verdict.info { background: var(--gold-bg); color: #5A4510; }
.verdict small { display: block; font-weight: 400; color: var(--ink); margin-top: 3px; font-size: 13px; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.note b { color: var(--ink); }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { background: var(--navy); color: #fff; text-align: left; font-weight: 600; font-size: 11.5px; padding: 8px 10px; letter-spacing: .02em; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:nth-child(even) td { background: #F6F8FB; }
table.t td:first-child { font-weight: 600; color: var(--navy); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.hl td { background: var(--gold-bg) !important; }
table.t tr.total td { font-weight: 800; border-top: 2px solid var(--navy); }

.box { border-left: 5px solid var(--green); background: var(--green-bg); border-radius: 0 9px 9px 0; padding: 14px 18px; margin: 0 0 16px; }
.box .lab { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--green); text-transform: uppercase; margin-bottom: 6px; }
.box.red { border-color: var(--red); background: var(--red-bg); } .box.red .lab { color: var(--red); }
.box.gold { border-color: var(--gold); background: var(--gold-bg); } .box.gold .lab { color: var(--gold-dk); }
.box.navy { border-color: var(--navy); background: #F4F6F9; } .box.navy .lab { color: var(--navy); }
.box p { margin: 4px 0; }
ol.n, ul.b { margin: 6px 0; padding-left: 22px; } ol.n li, ul.b li { margin: 5px 0; }
.q { font-family: 'Lora', serif; font-style: italic; font-size: 16px; color: var(--ink); }

/* home */
.hero { background: var(--navy); color: #fff; border-radius: 14px; padding: 30px 32px; margin-bottom: 22px; position: relative; overflow: hidden; }
.hero .k { color: var(--gold); font-size: 11px; letter-spacing: .16em; font-weight: 600; text-transform: uppercase; }
.hero h2 { font-size: 28px; margin: 8px 0 6px; line-height: 1.2; }
.hero p { margin: 0; color: #C9D6E6; max-width: 620px; font-family: 'Lora', serif; font-style: italic; font-size: 15.5px; }
.hero .bars { position: absolute; right: 26px; bottom: 0; display: flex; gap: 7px; align-items: flex-end; opacity: .9; }
.hero .bars i { width: 15px; background: #2E5C8A; border-radius: 3px 3px 0 0; display: block; }
.hero .bars i.g { background: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: #fff; border-radius: 10px; padding: 16px 18px; text-decoration: none; color: inherit;
  box-shadow: 0 0 0 1px #E3E8EE; display: block; transition: box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: 0 0 0 2px var(--navy-2); transform: translateY(-1px); }
.tile .c { font-size: 11px; font-weight: 600; color: var(--gold-dk); letter-spacing: .08em; text-transform: uppercase; }
.tile .h { font-weight: 700; color: var(--navy); margin: 4px 0 3px; font-size: 15px; }
.tile .d { font-size: 13px; color: var(--muted); }

/* chapter conversations */
.convs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.conv { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 0 0 1px #E3E8EE; }
.conv.done { box-shadow: 0 0 0 2px var(--green); }
.conv .top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.conv .num { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.conv.done .num { background: var(--green); }
.conv .tt { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.conv .obs { font-size: 13px; margin-top: 8px; } .conv .sala { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.conv .check { margin-top: 10px; font-size: 12.5px; color: var(--green); font-weight: 600; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { font: inherit; font-size: 12.5px; border: 0; padding: 6px 12px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px #C9D2DC; cursor: pointer; color: var(--navy); }
.chip.on { background: var(--navy); color: #fff; box-shadow: none; }
.progress { height: 8px; background: #E3E8EE; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 99px; }

/* quiz */
.quiz-card { max-width: 720px; }
.quiz-s { font-size: 17px; font-family: 'Lora', serif; line-height: 1.55; margin: 6px 0 18px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opts button { font: inherit; font-weight: 700; padding: 14px; border-radius: 9px; border: 0; cursor: pointer; font-size: 15px; }
.quiz-opts .g { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px #E8B4AE; }
.quiz-opts .s { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1px #A9D2B8; }
.quiz-opts button:disabled { opacity: .45; cursor: default; }

svg text { font-family: 'Inter', 'Segoe UI', sans-serif; }
.svgwrap { width: 100%; max-width: 700px; display: block; }
a { color: var(--navy-2); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; margin-top: 6px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.disclaimer { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 30px; padding-top: 14px; }

@media (max-width: 980px) { .grid, .grid.even, .convs { grid-template-columns: 1fr; } body { grid-template-columns: 230px 1fr; } }
/* ---------- versão web: tabelas roláveis, barra superior e menu no celular */
.tscroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#topbar, #scrim { display: none; }

@media (max-width: 760px) {
  html, body { height: auto; }
  body { display: block; font-size: 15px; -webkit-text-size-adjust: 100%; }
  #topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    background: var(--navy); color: #fff; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
    box-shadow: 0 1px 6px rgba(10,25,45,.25); }
  #menuBtn { flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; padding: 0; }
  #menuBtn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
  .tb-title { min-width: 0; line-height: 1.2; }
  .tb-title .kicker { display: block; font-size: 9.5px; letter-spacing: .16em; color: var(--gold); font-weight: 600; text-transform: uppercase; }
  .tb-title b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  nav#side { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 85vw); height: 100%; z-index: 50;
    transform: translateX(-102%); transition: transform .22s ease; padding-top: calc(22px + env(safe-area-inset-top));
    padding-bottom: calc(28px + env(safe-area-inset-bottom)); box-shadow: 4px 0 18px rgba(10,25,45,.3); }
  body.menu-open nav#side { transform: none; }
  body.menu-open { overflow: hidden; }
  #scrim:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(10,20,35,.45); z-index: 40; }
  nav#side a { padding: 10px 22px; font-size: 14.5px; }
  main { height: auto; overflow: visible; }
  .wrap { padding: 20px 16px 48px; }
  .page-head h2 { font-size: 22px; }
  .card { padding: 16px; }
  .hero { padding: 22px 20px; }
  .hero h2 { font-size: 22px; }
  .hero .bars { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  .kpi .v { font-size: 18px; white-space: normal; }
  .inp input, .inp select, select.plain { font-size: 16px; } /* evita zoom automático no iPhone */
  table.t { min-width: 480px; }
  .quiz-opts { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }

@media print { #topbar, #scrim { display: none !important; } nav#side { display: none; } body { display: block; } main { height: auto; overflow: visible; } }

.site-back { display:inline-block; color:#DCE5F0; text-decoration:none; font-weight:600; font-size:12px; border-bottom:1px solid rgba(224,163,58,.6); padding-bottom:1px; }
.site-back:hover { color:#fff; }
