:root {
  color-scheme: light;
  --guide-header-height: 64px;
  --ink: #193c3e;
  --text: #263f40;
  --muted: #526868;
  --paper: #f9f6ef;
  --line: #d9d8ca;
  --orange: #ab4629;
  --serif: Georgia, "Times New Roman", serif;
  font: 100%/1.55 "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
[hidden], html:not(.js) .with-js { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 10; background: white; top: 8px; left: 12px; padding: .7rem 1rem; }
:focus-visible { outline: 3px solid #b94e26; outline-offset: 4px; }
main:focus, .lesson-heading h2:focus { outline: none; }
.wrap { max-width: 1232px; margin-inline: auto; padding-inline: clamp(18px,4vw,50px); }
.mast { background: #173e40; color: #fff9ef; }
.mast-row { display: flex; align-items: center; min-height: var(--guide-header-height); gap: 20px; }
@media screen {
  html { scroll-padding-top: calc(var(--guide-header-height) + 8px); }
  .mast { position: sticky; top: 0; z-index: 4; }
}
.brand { text-decoration: none; font: italic 900 1.85rem/1 var(--serif); letter-spacing: -.08em; }
.mast-name { border-inline-start: 1px solid #70908a; padding-inline-start: 19px; font-size: .9rem; font-weight: 600; }
.pdf-button { margin-left: auto; border: 1px solid #87a09b; border-radius: 7px; padding: 7px 13px; display: flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 650; font-size: .86rem; }
.pdf-button:hover { background: #2b5151; }
.hero { display: grid; grid-template-columns: .98fr 1.02fr; gap: clamp(24px,5vw,82px); align-items: center; padding-block: clamp(36px,5vw,70px); }
.hero-copy h1 { font: 600 clamp(3.25rem,5.3vw,5.1rem)/.98 var(--serif); letter-spacing: -.055em; color: var(--ink); margin: 12px 0 18px; }
.hero-copy h1 em { color: var(--orange); font-weight: 400; }
.hero-copy>p:last-child { color: #495e5d; font-size: 1.05rem; max-width: 43ch; margin: 0; }
.kicker, .sample-tag { margin: 0; font: 750 .73rem/1.4 "Segoe UI",sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.kicker { color: #4d675c; }
.hero-sample { display: grid; grid-template-columns: 1fr .97fr; background: #fcf1da; box-shadow: 0 5px 0 -2px #daceb4, 0 6px 0 -2px #aa9a7c; border: 1px solid #d1c2a2; border-radius: 12px; padding: clamp(14px,2vw,28px); gap: 14px; align-items: center; color: #293f39; text-decoration: none; }
.hero-sample:hover { border-color: #a57e40; background: #faedce; }
.hero-art { position: relative; }
.hero-art img { display: block; width: 100%; border-radius: 48% 44% 46% 43%; mix-blend-mode: multiply; }
.sample-tag { font-size: .62rem; color: #7d5534; }
.sample-text { display: grid; gap: 7px; }
.sample-text strong { font: 600 clamp(1.7rem,2.8vw,2.75rem)/1.06 var(--serif); letter-spacing: -.055em; }
.sample-text strong i { font-weight: 400; }
.sample-desc { font: .91rem/1.5 "Segoe UI",sans-serif; }
.sample-link { justify-self: start; border-bottom: 1px solid #849788; font-weight: 700; font-size: .86rem; margin-top: 6px; }
.catalog { border-top: 1px solid #bdc7b9; padding: 30px 0 72px; }
.catalog-heading, .filter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-heading h2, .group-heading h3, .challenge h3 { font-family: var(--serif); color: var(--ink); }
.catalog-heading h2 { font-size: clamp(1.65rem,3vw,2.35rem); line-height: 1.2; margin: 0; letter-spacing: -.045em; }
.search { display: flex; align-items: center; gap: 9px; padding: 8px 13px; border: 1px solid #a9b4a9; border-radius: 8px; background: #fffdf8; }
.search:focus-within { outline: 2px solid #54827a; }
.search input { background: transparent; color: var(--text); font-size: .9rem; outline: 0; border: 0; width: 210px; min-width: 0; }
.filter-row { margin: 22px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button, #sem-resultados button { padding: 6px 13px; border: 1px solid #c9d0c4; border-radius: 24px; background: transparent; color: var(--text); font-size: .87rem; font-weight: 650; }
.filters button:hover { background: #e7ebdf; }
.filters button[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
#contagem { font-size: .84rem; color: var(--muted); }
.group-heading { display: flex; align-items: center; gap: 16px; margin: 26px 0 15px; }
.group-heading h3 { margin: 0; font-size: 1.38rem; font-weight: 600; letter-spacing: -.025em; }
.group-heading span { height: 1px; background: var(--line); flex: 1; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.topic-card { position: relative; display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 14px 19px 14px 10px; border: 1px solid var(--line); background: #fffcf6; border-radius: 9px; }
.topic-card:hover { border-color: #899d8e; background: #fffefa; }
.topic-card img { width: 78px; flex: 0 0 78px; mix-blend-mode: multiply; border-radius: 12px; }
.card-no { font-size: .68rem; letter-spacing: .07em; color: #5e7068; font-weight: 700; text-transform: uppercase; }
.topic-card h4 { font: 600 1.13rem/1.16 var(--serif); letter-spacing: -.025em; margin: 3px 0 6px; }
.topic-card p { font-size: .83rem; line-height: 1.43; color: #4d6260; margin: 0; }
.card-arrow { position: absolute; right: 8px; top: 4px; font-size: .9rem; color: #5f786b; }
#sem-resultados { padding: 32px 0 64px; }
.lesson { padding-bottom: 50px; }
.lesson-top, .turn-page { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lesson-top { padding-block: 19px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.lesson-top a { font-weight: 650; text-decoration: none; color: var(--ink); }
.lesson-top a:hover, .turn-page a:hover { text-decoration: underline; }
.lesson-top b { margin: 0 5px; font-weight: 400; }
.lesson-heading { text-align: center; padding: 30px 8px 25px; }
.lesson-heading h2 { margin: 0 auto; font: 600 clamp(2.3rem,4.2vw,4.4rem)/1.05 var(--serif); letter-spacing: -.052em; color: var(--ink); }
.lesson-heading p { color: #49625d; margin: 10px auto 0; font-size: 1.05rem; max-width: 65ch; }
.diagram { position: relative; isolation: isolate; display: grid; align-items: stretch; grid-template-columns: minmax(0,1fr) minmax(0,.72fr) minmax(0,1fr); column-gap: clamp(24px,3.5vw,54px); row-gap: 20px; }
.branch-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.core { grid-area: 1 / 2 / 3 / 3; align-self: center; margin: 0; padding: 12px 12px 15px; background: #fcf1da; border: 1px solid #d5c39d; box-shadow: 0 3px 0 -1px #d7c8aa; border-radius: 15px; text-align: center; }
.core img { display: block; width: min(185px,100%); margin: 0 auto; border-radius: 35%; mix-blend-mode: multiply; }
.core figcaption { padding-top: 11px; }
.core b, .core span { display: block; }
.core b { font: 600 clamp(1.05rem,1.52vw,1.3rem)/1.23 var(--serif); color: var(--ink); }
.core span { margin-top: 7px; line-height: 1.4; color: #535b4e; font-size: .86rem; }
.branch { padding: 16px 19px; border-radius: 10px; background: var(--tint); border: 1px solid var(--edge); border-top: 3px solid var(--accent); }
.branch-1 { grid-area: 1 / 1; --accent:#33705c; --edge:#bacdbb; --tint:#eef4e9; }
.branch-2 { grid-area: 1 / 3; --accent:#aa4b2f; --edge:#e1c2ac; --tint:#fcf0e6; }
.branch-3 { grid-area: 2 / 1; --accent:#6a5a8e; --edge:#d0c5dd; --tint:#f3eff8; }
.branch-4 { grid-area: 2 / 3; --accent:#88621f; --edge:#dbccaa; --tint:#fbf4e2; }
.branch h3 { font: 600 1.36rem/1.12 var(--serif); letter-spacing: -.026em; color: var(--accent); margin: 0 0 9px; }
.branch p { margin: 0; font-size: .94rem; line-height: 1.43; }
.example { border-left: 2px solid var(--accent); padding-left: 11px; margin-top: 12px; }
.example p[lang="en"] { color: var(--ink); font-weight: 700; }
.example p + p { color: #506361; font-size: .86rem; margin-top: 4px; }
.challenge { margin-top: 28px; display: grid; grid-template-columns: minmax(0,1fr) minmax(210px,.45fr); column-gap: 28px; align-items: start; background: #e8efe8; border: 1px solid #c8d3c6; border-radius: 10px; padding: 18px 21px; }
.challenge h3 { margin: 0 0 5px; font-size: 1.35rem; }
.challenge p { margin: 0; }
.challenge details { align-self: center; }
.challenge summary { cursor: pointer; font-size: .9rem; color: #1d4f45; font-weight: 700; padding: 6px 0; }
.challenge details[open]>div { padding-top: 8px; }
.challenge details p { margin-top: 5px; font-size: .9rem; }
.turn-page { align-items: flex-start; margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); }
.turn-page a { color: var(--ink); text-decoration: none; max-width: 47%; font: 600 1.16rem/1.3 var(--serif); }
.turn-page a:last-child { text-align: right; }
.turn-page small { display: block; margin-bottom: 3px; font: 600 .8rem/1.4 "Segoe UI",sans-serif; color: var(--muted); }
@media(max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .diagram { column-gap: 21px; grid-template-columns: minmax(0,1fr) minmax(0,.67fr) minmax(0,1fr); }
  .branch { padding: 14px; }
  .core { padding-inline: 9px; }
}
@media(max-width: 720px) {
  .hero { gap: 20px; }
  .hero-sample { grid-template-columns: 1fr; justify-items: center; }
  .hero-art { width: 105px; }
  .sample-tag, .sample-desc { display: none; }
  .sample-text { text-align: center; gap: 3px; }
  .sample-link { justify-self: center; }
  .diagram { display: flex; flex-direction: column; gap: 12px; padding-left: 15px; }
  .diagram::before { content: ""; position: absolute; top: 70px; bottom: 58px; left: 3px; border-left: 2px solid #afbcab; z-index: -1; }
  .branch-lines { display: none; }
  .core { width: 100%; display: flex; gap: 13px; align-items: center; padding: 13px; }
  .core img { width: 95px; margin: 0; }
  .core figcaption { text-align: left; padding: 0; }
  .branch { position: relative; }
  .branch::before, .core::before { content: ""; width: 12px; position: absolute; left: -13px; top: 50%; border-top: 2px solid var(--accent,#afbcab); }
  .core { position: relative; }
  .diagram::before { bottom: 0; }
  .branch:last-child::after { content: ""; position: absolute; left: -14px; top: calc(50% + 2px); bottom: -1px; width: 2px; background: var(--paper); }
  .challenge { grid-template-columns: 1fr; row-gap: 10px; }
  .filter-row { flex-wrap: wrap; gap: 9px; }
  .catalog-heading { flex-wrap: wrap; gap: 12px; }
}
@media(max-width: 540px) {
  :root { --guide-header-height: 55px; }
  .mast-row { gap: 11px; }
  .mast-name { font-size: .78rem; padding-inline-start: 10px; }
  .pdf-button { font-size: .8rem; padding: 6px 9px; }
  .hero { grid-template-columns: 1fr; padding: 27px 0; gap: 20px; }
  .hero-copy h1 { font-size: 3.2rem; margin: 8px 0 12px; }
  .hero-copy h1 br { display: none; }
  .hero-copy h1 em::before { content: " "; }
  .hero-copy>p:last-child { font-size: .98rem; }
  .hero-sample { display: flex; gap: 20px; padding: 14px; }
  .hero-art { flex: 0 0 31%; }
  .sample-tag { display: block; }
  .sample-text { text-align: left; }
  .sample-link { justify-self: start; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .catalog { padding-top: 22px; }
  .filter-row { margin-top: 14px; }
  .filters button { padding: 6px 10px; font-size: .8rem; }
  .card-grid { grid-template-columns: 1fr; gap: 9px; }
  .topic-card img { width: 66px; flex-basis: 66px; }
  .group-heading { margin-top: 20px; }
  .lesson-heading { padding-block: 22px; }
  .lesson-top { font-size: .78rem; }
  .lesson-heading p { font-size: .97rem; }
}
@media print {
  .mast, .lesson-top, .turn-page, .with-js, .skip { display: none !important; }
  body { background: white; }
  .wrap { padding: 0; }
  .lesson, .topic-card, .branch { break-inside: avoid; }
  a { text-decoration: none; }
}
