/* Trilha • Editorial academic interface
   Progressive enhancement only: works without JS libraries and preserves the existing course content.
   Scope: visual design, accessibility and responsive layout. No login or persisted data changes. */
:root {
  --bg: #f3f1eb;
  --paper: #fffefa;
  --ink: #14233b;
  --ink2: #435066;
  --muted: #58667b;
  --line: #d7dce1;
  --rule: #e9e5dd;
  --blue: #274e74;
  --blue-soft: #e3eaf0;
  --hl: #f1d9a5;
  --margin: #aa7846;
  --ok: #22674f;
  --ok-soft: #e1f0e7;
  --r: 10px;
}
html { color-scheme: light; }
body {
  background: radial-gradient(circle at 94% -10%, #e6e9ef 0, transparent 38%), var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}
.app {
  max-width: 760px;
  padding: 22px 18px calc(98px + var(--safe-b));
}
.top {
  padding: 8px 0 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--read);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -.045em;
}
.logo svg { width: 34px; height: 34px; }
.pill {
  background: transparent;
  border-color: var(--line);
  font-weight: 600;
  font-size: 12px;
}
h1, h2, h3 { letter-spacing: -.035em; }
#v-home::before {
  content: "FORMAÇÃO LIVRE  /  APRENDIZADO CONTÍNUO";
  display: block;
  width: fit-content;
  margin: 4px 0 22px;
  font: 600 11px/1.5 var(--ui);
  letter-spacing: .14em;
  color: var(--blue);
}
.sec { margin: 32px 0 14px; align-items: end; gap: 12px; }
.sec h2 {
  font-family: var(--read);
  font-size: clamp(22px, 2.7vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}
.sec span { font-size: 12px; text-align: right; }
.grid { grid-template-columns: minmax(0, 1fr); gap: 13px; counter-reset: curso; }
.course {
  min-height: 164px;
  padding: 22px;
  gap: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(20, 35, 59, .025);
  counter-increment: curso;
}
.course:hover, .course:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 12px 30px rgba(20, 35, 59, .075);
}
.course .em {
  font-size: 0;
  width: 42px;
  height: 42px;
  background: transparent !important;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue);
}
.course .em::after {
  content: counter(curso, decimal-leading-zero);
  font: 600 15px/1 var(--read);
}
.course b {
  font: 600 clamp(17px, 1.6vw, 20px)/1.35 var(--read);
  letter-spacing: -.02em;
}
.course small { font-size: 12.5px; line-height: 1.5; }
.course .tab { width: 4px; height: 40px; right: 0; border-radius: 0; }
.course .done-badge { border-radius: 3px; }
.notebook {
  border-radius: 9px;
  background-image: none;
  box-shadow: 0 10px 30px rgba(20, 35, 59, .03);
}
.notebook::before { display: none; }
.nb-in { padding: clamp(22px, 3vw, 34px); }
.continue h2, .reader h1 { font-family: var(--read); }
.continue h2 { font-size: clamp(23px, 3vw, 30px); }
.reader .nb-in { padding: clamp(24px, 4.2vw, 48px); }
.reader h1 { font-size: clamp(27px, 4vw, 42px); line-height: 1.2; }
.reader p { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.8; color: var(--ink); max-width: 68ch; overflow-wrap: break-word; }
.reader strong { background: linear-gradient(transparent 66%, #f0dcae 66%); }
.reader .kicker { color: var(--margin); letter-spacing: .12em; }
.c-head {
  background: linear-gradient(130deg, #152a47, #253f58) !important;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 9px;
}
.c-head h1 {
  font-family: var(--read);
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.18;
}
.c-head p { font-size: 16px; max-width: 65ch; }
.c-head .meta span { background: rgba(255,255,255,.13); border-radius: 3px; }
.search, .lesson-row, .q, .official, .why div {
  border-radius: 8px;
  border-color: var(--line);
}
.search input { min-height: 50px; }
.lesson-row { min-height: 72px; padding: 18px; }
.lesson-row b { font-size: 15px; }
.lesson-row .n { background: var(--blue-soft); color: var(--blue); border-radius: 5px; }
.btn, .opt, .field input, .notes, .goal, .task { border-radius: 6px; }
.btn-main { background: var(--blue); }
.btn-hl { background: var(--hl); }
.btn-ink { background: var(--ink); }
.btn { min-height: 48px; }
.cert { border-color: var(--blue); outline-color: var(--hl); border-radius: 6px; }
.cert h2, .cert .name { font-family: var(--read); }
.nav {
  max-width: 760px;
  border-color: var(--line);
  box-shadow: 0 -5px 22px rgba(20, 35, 59, .04);
}
.nav button { min-height: 48px; }
.nav button.on { color: var(--blue); background: var(--blue-soft); }
.onb { background: var(--bg); }
.onb .wrap { max-width: 620px; }
.onb h1 { font-family: var(--read); font-weight: 600; }
.foot { font-size: 12px; }
:focus-visible { outline-color: #b58239; outline-offset: 3px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course { min-height: 205px; }
  .app { padding-left: 28px; padding-right: 28px; }
}
@media (min-width: 1120px) {
  .app {
    max-width: 1360px;
    padding: 38px 62px 100px 286px;
  }
  .top { margin-bottom: 36px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .course { min-height: 220px; }
  .nav {
    position: fixed;
    top: 137px;
    left: max(22px, calc((100vw - 1360px) / 2 + 46px));
    bottom: auto;
    transform: none;
    width: 208px;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 12px 32px rgba(20, 35, 59, .05);
  }
  .nav button {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    font-size: 13px;
    padding: 10px 12px;
  }
  .nav button span { font-size: 19px; }
  .reader { max-width: 880px; }
}
@media (max-width: 370px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .top { flex-wrap: wrap; }
  .pill { margin-left: 0; }
  .nav button { font-size: 12px; line-height: 1.25; min-height: 52px; }
}
@media (prefers-contrast: more) {
  :root { --muted: #34435a; --line: #5c6d80; }
  .course, .notebook, .lesson-row { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .course, .btn, .view, .nav button { animation: none !important; transition: none !important; }
}
@media print {
  body { background: white; }
  .cert { border-color: #274e74; }
}
