/* joao-barnabe.com — tokens do Brandbook Pessoal V3 (não trocar cores nem fontes) */
:root {
  --navy: #0A192F;
  --offwhite: #F8F9FA;
  --terracotta: #E07A5F;        /* só decorativo: bordas, detalhes — nunca texto nem fundo de botão */
  --terracotta-texto: #B94A28;  /* links, botões e números */
  --charcoal: #212529;
  --gray-border: #E0E0E0;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', Arial, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  --maxw: 1040px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--offwhite); color: var(--charcoal); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
a { color: var(--terracotta-texto); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--terracotta-texto); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

header.site { position: sticky; top: 0; z-index: 20; background: var(--navy); border-bottom: 3px solid var(--terracotta); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 9px; padding-bottom: 9px; }
/* header: menu + seletor de idioma */
header.site .right { display: flex; align-items: center; gap: 4px; }
.langsw { position: relative; margin: 0 0 0 16px; padding: 0; background: none; border: 0; border-radius: 0; }
.langsw summary { list-style: none; cursor: pointer; display: flex; align-items: center; border-radius: 6px; padding: 2px; }
.langsw summary::-webkit-details-marker { display: none; }
.langsw summary:hover { background: rgba(255,255,255,.12); }
.langsw ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--gray-border); border-radius: 10px; box-shadow: 0 6px 20px rgba(10,25,47,.18); min-width: 150px; }
.langsw li a { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 10px; border-radius: 6px; margin: 0; border: 0; }
.langsw li a:hover { background: var(--offwhite); color: var(--navy); }
.flagwrap { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(10,25,47,.25); flex: none; }
.flagwrap .flag { width: 100%; height: 100%; display: block; }

.brand { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: .2px; }
.brand:hover { color: #fff; }
nav a { color: #fff; text-decoration: none; margin-left: 18px; font-weight: 600; font-size: 14px; padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--terracotta); }

h1, h2, h3 { font-family: var(--font-serif); color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; }
h2 { font-size: 24px; margin: 30px 0 8px; }
h3 { font-size: 18px; margin: 16px 0 6px; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); display: inline-block; border: 1px solid var(--terracotta); border-radius: 999px; padding: 3px 12px; margin-bottom: 18px; }

.crumbs { padding-top: 20px; font-size: 14px; font-family: var(--font-mono); color: #5c636a; }
.crumbs span[aria-current] { color: var(--navy); }
.crumbs a { color: var(--terracotta-texto); margin: 0; padding: 0; font-weight: 400; font-size: inherit; border-bottom: 0; text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--navy); border-bottom: 0; }
.hero { padding: 32px 0 8px; }
.hero p.lead { font-size: 17px; max-width: 760px; margin: 0 0 4px; }
.btn { display: inline-block; background: var(--terracotta-texto); color: #fff; font-weight: 700; text-decoration: none; padding: 9px 20px; border-radius: 8px; font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 8px; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--navy); color: #fff; }
.btn.alt { background: transparent; color: var(--navy); border: 2px solid var(--navy); padding: 7px 18px; }
.btn.alt:hover { background: var(--navy); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.note { font-size: 15px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 12px 0; }
.card { background: #fff; border: 1px solid var(--gray-border); border-top: 4px solid var(--terracotta); border-radius: 10px; padding: 16px 18px; }
.grid.pilares { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card h3 { margin-top: 2px; }
.card p { margin: 6px 0; }
.card .kpi { font-family: var(--font-serif); font-size: 28px; font-weight: 700; color: var(--terracotta-texto); line-height: 1.1; }
.tag { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--terracotta); border-radius: 6px; padding: 2px 8px; color: var(--navy); }
.card .appicon { width: 56px; height: 56px; margin-bottom: 10px; }

.flist { list-style: none; padding: 0; margin: 10px 0; border-top: 1px solid var(--gray-border); }
.flist li { display: grid; grid-template-columns: 230px 1fr; gap: 6px 24px; padding: 12px 4px; border-bottom: 1px solid var(--gray-border); }
.flist h3 { margin: 0; font-size: 17px; }
.flist p { margin: 0; }
.vlist h3 { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
@media (max-width: 760px) { .flist li { grid-template-columns: 1fr; } }
/* seções que expandem e escondem (home) */
.fold details { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary h2 { margin: 24px 0 8px; }
.band.fold summary h2 { margin: 0 0 4px; }
.fold summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.fold details[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.band.fold summary::after { border-color: #fff; }
.fold summary:focus-visible { outline-offset: 2px; }
.plist { list-style: none; padding: 0; margin: 10px 0; border-top: 1px solid var(--gray-border); }
.prow { display: flex; align-items: center; gap: 18px; padding: 16px 4px; border-bottom: 1px solid var(--gray-border); }
.prow .appicon { width: 56px; height: 56px; flex: none; margin: 0; }
.prow .pinfo { flex: 1; min-width: 0; }
.prow h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prow p { margin: 4px 0; }
.prow .actions { margin: 0; flex: none; flex-direction: column; align-items: stretch; gap: 8px; }
.prow .actions .btn { text-align: center; }
.local { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.local .offline { flex: none; }
.local strong { font-family: var(--font-serif); font-size: 17px; color: var(--terracotta-texto); }
@media (max-width: 760px) { .prow { flex-wrap: wrap; } .prow .actions { flex-direction: row; width: 100%; } }
.band { background: var(--navy); color: var(--offwhite); margin-top: 22px; padding: 20px 0 22px; }
.band h2 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.band .kpis { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 10px; }
.band .kpi { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--terracotta); line-height: 1.1; }
.band p { margin: 4px 0 0; }

/* linha do tempo: régua proporcional aos anos + cards numerados */
.axis { position: relative; height: 112px; margin: 16px 0 4px; }
.axis .line { position: absolute; left: 0; right: 0; top: 52px; height: 2px; background: var(--gray-border); }
.axis .seg { position: absolute; top: -2px; height: 6px; border-radius: 3px; }
.axis .seg.s0 { background: var(--navy); }
.axis .seg.s1 { background: #5b6b82; }
.axis .seg .n { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--navy); }
.axis .ticks { position: absolute; left: 0; right: 0; top: 60px; }
.axis .tick { position: absolute; top: 0; width: 1px; height: 6px; background: #8a9099; }
.axis .tick .y { position: absolute; top: 9px; left: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; color: #5c636a; }
.axis .rot { position: absolute; top: 90px; height: 0; border-top: 2px dotted #8a9099; }
.axis .rot .rlbl { position: absolute; left: 50%; top: 5px; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-mono); font-size: 11px; color: #5c636a; }
.axis .mile { position: absolute; top: 4px; width: 1px; height: 46px; background: var(--terracotta); }
.axis .mile .lbl { position: absolute; top: -2px; left: 6px; white-space: nowrap; font-family: var(--font-mono); font-size: 11px; color: var(--navy); }
.axis .mile.edu { background: var(--navy); }
.axis .mile.end .lbl { left: auto; right: 6px; }
ol.timeline { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 12px; }
ol.timeline li { display: flex; flex-direction: column; border-top: 1px solid var(--gray-border); padding-top: 8px; }
ol.timeline .num { font-family: var(--font-mono); font-size: 12px; color: var(--navy); border: 1px solid var(--terracotta); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; margin-bottom: 8px; }
ol.timeline .uni { height: 36px; width: auto; align-self: flex-start; margin: -6px 0 0; }
ol.timeline .when { font-family: var(--font-mono); font-size: 13px; color: var(--navy); }
ol.timeline strong { font-size: 15px; line-height: 1.35; color: var(--navy); margin: 2px 0 4px; }
ol.timeline p { margin: 0; font-size: 14px; line-height: 1.5; }
ol.timeline .badge { display: none; }
@media (max-width: 900px) {
  .axis .tick:nth-child(even) .y { visibility: hidden; }
  .axis .mile .lbl { display: none; }
  .axis .mile { height: 26px; top: 24px; }
  ol.timeline { grid-template-columns: 1fr; gap: 0; }
  ol.timeline li { padding: 14px 0; }
  ol.timeline .badge { display: inline-block; align-self: flex-start; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--navy); border: 1px solid var(--terracotta); border-radius: 6px; padding: 3px 7px; background: #fff; }
}
.clist { list-style: none; padding: 0; margin: 10px 0; border-top: 1px solid var(--gray-border); }
.clist li { padding: 8px 4px; border-bottom: 1px solid var(--gray-border); }
.clist .when { font-family: var(--font-mono); font-size: 13px; color: var(--navy); display: inline-block; min-width: 84px; }
.langs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.langs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 10px 0; }
.lang { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--gray-border); border-top: 4px solid var(--terracotta); border-radius: 10px; padding: 10px 16px; }
.lang .flag { width: 34px; height: 34px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--gray-border); }
.lang strong { display: block; font-family: var(--font-serif); font-size: 17px; color: var(--navy); line-height: 1.2; }
.lang span { font-size: 15px; }
ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 52px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--terracotta); color: var(--navy); font-family: var(--font-serif); font-weight: 700; display: grid; place-items: center; }
code, pre { font-family: var(--font-mono); font-size: .9em; }
code { background: #fff; border: 1px solid var(--gray-border); border-radius: 5px; padding: 1px 6px; }
pre { background: var(--navy); color: var(--offwhite); border-radius: 10px; padding: 18px 20px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: none; padding: 0; color: inherit; }
table { border-collapse: collapse; width: 100%; margin: 18px 0; background: #fff; font-size: 15px; }
th, td { border: 1px solid var(--gray-border); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--navy); color: #fff; font-weight: 600; }
details { background: #fff; border: 1px solid var(--gray-border); border-radius: 10px; padding: 12px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--navy); }

footer.site { background: var(--navy); color: var(--offwhite); margin-top: 32px; padding: 16px 0; font-size: 14px; border-top: 3px solid var(--terracotta); }
footer.site a { color: #fff; }
footer.site a.ver { font-family: var(--font-mono); font-size: 12px; opacity: .85; }

article.doc { max-width: 860px; }
article.doc h1 { font-size: 40px; }
article.doc h2 { border-top: 1px solid var(--gray-border); padding-top: 28px; }
@media (max-width: 640px) { nav a { margin: 0 0 0 14px; } .hero { padding-top: 20px; } }

/* telas estreitas: tabelas e códigos rolam dentro da própria caixa, a página não estica */
article.doc { overflow-wrap: anywhere; }
article.doc table { display: block; max-width: 100%; overflow-x: auto; }
article.doc pre { max-width: 100%; }
article.doc img { max-width: 100%; height: auto; }

#lista { margin-top: 0; }
