/* hprworks.com: estilos base do site */
@font-face {
  font-family: "Hedvig Letters Serif";
  src: url("../fonts/hedvig-letters-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Reddit Sans";
  src: url("../fonts/reddit-sans-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Reddit Sans";
  src: url("../fonts/reddit-sans-var-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --emerald: #0B5D4B;
  --emerald-deep: #073F33;
  --emerald-ink: #052B23;
  --emerald-tint: #E3EEE9;
  --coral: #FF7A66;
  --coral-hover: #FF6A53;
  --ivory: #F5F7F4;
  --graphite: #1F2933;
  --ink-2: #3E4C59;
  --ink-3: #52606D;
  --line: #D5DDD8;
  --line-strong: #9AA8A1;
  --white: #FFFFFF;
  --serif: "Hedvig Letters Serif", Georgia, "Times New Roman", serif;
  --sans: "Reddit Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--emerald); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--emerald-deep); text-decoration-thickness: 0.14em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; box-shadow: 0 0 0 2px var(--white); border-radius: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .studio-band :focus-visible, .present :focus-visible { outline-color: var(--white); box-shadow: none; }
main:focus { outline: none; }

.skip-link { position: absolute; left: 0.5rem; top: -4rem; background: var(--white); color: var(--graphite); padding: 0.75rem 1rem; z-index: 100; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 0.5rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--emerald); }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); line-height: 1.2; }
h3 { font: 600 1.12rem/1.35 var(--sans); color: var(--graphite); }

/* Botoes */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem; border-radius: var(--radius); border: 2px solid transparent;
  font: 600 0.97rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-coral { background: var(--coral); color: var(--graphite); }
.btn-coral:hover { background: var(--coral-hover); color: var(--graphite); }
.btn-emerald { background: var(--emerald); color: var(--white); }
.btn-emerald:hover { background: var(--emerald-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--emerald); border-color: var(--emerald); }
.btn-quiet:hover { background: var(--emerald-tint); color: var(--emerald-deep); }
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; }
.text-link { font-weight: 600; }

/* Cabecalho */
.site-header { background: var(--emerald); color: var(--ivory); }
.site-header a { color: var(--ivory); text-decoration: none; }
.site-header .btn-coral { color: var(--graphite); }
.bar { display: flex; align-items: center; gap: 1rem 1.5rem; padding-block: 0.8rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; margin-right: auto; }
.brand-text { font: 400 1.45rem/1 var(--serif); letter-spacing: 0.005em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 0.35rem 0; font-size: 0.95rem; font-weight: 500; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: rgba(245, 247, 244, 0.6); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--coral); }
.nav-toggle { display: none; background: transparent; color: var(--ivory); border: 2px solid rgba(245, 247, 244, 0.7); border-radius: var(--radius); padding: 0.45rem 0.85rem; font: 600 0.95rem var(--sans); cursor: pointer; }

@media (max-width: 62rem) {
  .bar { gap: 0.6rem 1rem; }
  .js .nav-toggle { display: inline-flex; }
  .site-nav { order: 5; width: 100%; }
  .js .site-nav[data-open="false"] { display: none; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: 0.5rem; }
  .site-nav a { padding: 0.6rem 0; width: 100%; }
}
@media (max-width: 30rem) {
  .bar .btn-coral { padding: 0.6rem 0.8rem; font-size: 0.9rem; }
  .brand-text { font-size: 1.25rem; }
}

/* Rodape */
.site-footer { background: var(--graphite); color: var(--ivory); margin-top: 5rem; padding-top: 3rem; }
.site-footer a { color: var(--ivory); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem 3rem; }
.footer-name { font: 400 1.6rem/1.1 var(--serif); margin-bottom: 0.75rem; }
.footer-head { font-weight: 600; margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer p { color: #D5DDD8; }
.footer-legal { padding-block: 1.75rem 2rem; margin-top: 2rem; border-top: 1px solid rgba(245, 247, 244, 0.2); }
.footer-legal p { margin: 0; font-size: 0.9rem; }
@media (max-width: 48rem) { .footer-grid { grid-template-columns: 1fr; } }

/* Migalhas de pao */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; list-style: none; padding: 0; margin: 1.5rem 0 1rem; font-size: 0.9rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line-strong); }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--emerald); }

/* Texto corrido (artigos e paginas) */
.prose { max-width: 44rem; }
.prose > * + * { margin-top: 1rem; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 2.75rem; scroll-margin-top: 1.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--emerald); }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 46rem; }
.prose .lead p { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }

.table-wrap { overflow-x: auto; margin-block: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.table-wrap:focus-visible { outline-offset: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; min-width: 30rem; }
caption { text-align: left; padding: 0.8rem 1rem; font-weight: 600; color: var(--graphite); caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 1rem; border-top: 1px solid var(--line); }
thead th { background: var(--emerald-tint); color: var(--emerald-deep); font-weight: 600; }
tbody th { font-weight: 600; background: #FBFCFB; }

.checklist { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem 0.7rem; margin-block: 1.5rem; }
.checklist h3 { margin: 0 0 0.7rem; }
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 1.05rem; height: 1.05rem; border: 2px solid var(--emerald); border-radius: 3px; background: var(--white); }

.example { background: var(--emerald-tint); border-left: 4px solid var(--emerald); padding: 1.1rem 1.4rem; margin-block: 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; }
.example h3 { margin: 0 0 0.5rem; color: var(--emerald-deep); }
.example p:last-child { margin-bottom: 0; }

.callout { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--coral); padding: 0.95rem 1.3rem; margin-block: 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; }
.callout p { margin: 0; }
.callout-title { font-weight: 700; margin-bottom: 0.25rem !important; }

/* Listas de artigos (linhas com miniatura) */
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.row { border-top: 1px solid var(--line); }
.row-link { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem 1.5rem; align-items: center; padding: 1.15rem 0.25rem; color: inherit; text-decoration: none; }
.row-link:hover .row-title { text-decoration: underline; text-decoration-thickness: 0.07em; }
.row-link:hover .thumb { border-color: var(--emerald); }
.row-text { display: grid; gap: 0.15rem; }
.row-cat { font-size: 0.88rem; font-weight: 600; color: var(--ink-3); }
.row-title { font: 400 1.4rem/1.25 var(--serif); color: var(--emerald); }
.row-desc { color: var(--ink-2); font-size: 0.97rem; max-width: 62ch; }
@media (max-width: 36rem) { .row-link { grid-template-columns: 5.5rem 1fr; gap: 0.25rem 1rem; } .row-title { font-size: 1.2rem; } .row-desc { display: none; } }

.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--white); border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; }
.thumb i { position: absolute; display: block; }
.thumb[data-layout="bullets"] i:nth-child(1), .thumb[data-layout="two"] i:nth-child(1), .thumb[data-layout="image"] i:nth-child(1) { left: 10%; top: 16%; width: 42%; height: 11%; background: var(--emerald); }
.thumb[data-layout="bullets"] i:nth-child(2) { left: 10%; top: 44%; width: 72%; height: 7%; background: var(--graphite); opacity: 0.4; }
.thumb[data-layout="bullets"] i:nth-child(3) { left: 10%; top: 62%; width: 56%; height: 7%; background: var(--graphite); opacity: 0.4; }
.thumb[data-layout="two"] i:nth-child(2) { left: 10%; top: 42%; width: 36%; height: 34%; background: var(--emerald-tint); }
.thumb[data-layout="two"] i:nth-child(3) { left: 54%; top: 42%; width: 36%; height: 34%; background: var(--emerald-tint); }
.thumb[data-layout="quote"] i:nth-child(1) { left: 10%; top: 20%; width: 4%; height: 56%; background: var(--coral); }
.thumb[data-layout="quote"] i:nth-child(2) { left: 22%; top: 28%; width: 62%; height: 11%; background: var(--emerald); }
.thumb[data-layout="quote"] i:nth-child(3) { left: 22%; top: 50%; width: 40%; height: 8%; background: var(--graphite); opacity: 0.4; }
.thumb[data-layout="image"] i:nth-child(2) { left: 10%; top: 44%; width: 34%; height: 7%; background: var(--graphite); opacity: 0.4; }
.thumb[data-layout="image"] i:nth-child(3) { left: 54%; top: 22%; width: 36%; height: 56%; background: var(--emerald-tint); border: 1px solid var(--emerald); }
.thumb[data-layout="section"] { background: var(--emerald); border-color: var(--emerald); }
.thumb[data-layout="section"] i:nth-child(1) { left: 12%; top: 34%; width: 56%; height: 14%; background: var(--ivory); }
.thumb[data-layout="section"] i:nth-child(2) { left: 12%; top: 58%; width: 30%; height: 6%; background: var(--coral); }
.thumb[data-layout="section"] i:nth-child(3) { display: none; }

/* Artigo */
.article-head { padding-bottom: 1.5rem; }
.article-head h1 { max-width: 26ch; }
.article-cat { margin: 0 0 0.5rem; font-weight: 600; font-size: 0.95rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 1.25rem 0 0; color: var(--ink-3); font-size: 0.93rem; }
.article-meta span { white-space: nowrap; }
.article-layout { display: grid; grid-template-columns: 14.5rem minmax(0, 44rem); gap: 3.5rem; align-items: start; padding-top: 1rem; }
.toc { position: sticky; top: 1.5rem; font-size: 0.93rem; }
.toc-title { font-weight: 600; margin-bottom: 0.6rem; color: var(--graphite); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.35rem 0 0.35rem 0.9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--emerald); border-left-color: var(--emerald); }
.toc a.is-current { color: var(--emerald-deep); font-weight: 600; border-left-color: var(--coral); }
.article-body .lead { margin-bottom: 0.5rem; }
.mistakes { list-style: none; padding: 0 !important; }
.mistakes li { padding: 0.8rem 0 0.8rem 1.1rem; border-left: 3px solid var(--coral); background: var(--white); margin-bottom: 0.6rem; padding-right: 1rem; }
.faq h3 { margin-top: 1.5rem; }
.sources { padding-left: 1.4rem; }
.sources li { margin-bottom: 0.9rem; }
.src-note, .src-date { display: block; color: var(--ink-2); font-size: 0.95rem; }
.src-date { color: var(--ink-3); font-size: 0.88rem; }
.sources-intro { color: var(--ink-2); }
.back-link { margin-top: 1.5rem; }
@media (max-width: 62rem) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 0.9rem 1rem 0.5rem; }
  .toc ol { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

/* Paginas simples e categorias */
.page-head { padding-bottom: 1.5rem; }
.page-head h1 { max-width: 24ch; }
.page-meta { color: var(--ink-3); font-size: 0.93rem; margin: 1rem 0 0; }
.page-body { padding-bottom: 1rem; }
.cat-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; padding-bottom: 1.5rem; }
.cat-head h1 { max-width: 20ch; }
.cat-head .lead { margin-top: 1rem; }
.cat-body { padding-block: 1rem 0; }
@media (max-width: 52rem) { .cat-head { grid-template-columns: 1fr; } }
.section-tight { margin-top: 2.5rem; }
.section-tight h2 { margin-bottom: 1rem; }
.other-cats { margin-top: 3.5rem; }
.other-cats h2 { margin-bottom: 1rem; }
.other-cats ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 2rem; }
.other-cats li a { font: 400 1.3rem/1.25 var(--serif); display: block; }
.other-cats li span { display: block; color: var(--ink-2); font-size: 0.95rem; margin-top: 0.25rem; }
.plain-list { padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.5rem; }
.not-found h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin: 1.75rem 0 0; }

/* Cor de cada categoria: miniaturas, rotulos e cabecalho do artigo */
[data-cat="planning"] { --c1: #0B5D4B; --c2: #E3EEE9; }
[data-cat="slide-design"] { --c1: #1E3A8A; --c2: #EEF2FF; }
[data-cat="delivering"] { --c1: #1F2933; --c2: #FFE3DD; }
[data-cat="school-and-teaching"] { --c1: #6B2D86; --c2: #EADFF0; }
[data-cat="files-and-fixes"] { --c1: #0B2545; --c2: #D8F0EB; }
.thumb[data-layout="bullets"] i:nth-child(1), .thumb[data-layout="two"] i:nth-child(1), .thumb[data-layout="image"] i:nth-child(1), .thumb[data-layout="quote"] i:nth-child(2) { background: var(--c1, var(--emerald)); }
.thumb[data-layout="two"] i:nth-child(2), .thumb[data-layout="two"] i:nth-child(3) { background: var(--c2, var(--emerald-tint)); }
.thumb[data-layout="image"] i:nth-child(3) { background: var(--c2, var(--emerald-tint)); border-color: var(--c1, var(--emerald)); }
.thumb[data-layout="section"] { background: var(--c1, var(--emerald)); border-color: var(--c1, var(--emerald)); }
.row-cat { color: var(--c1, var(--ink-3)); }
.article-cat a { color: var(--c1, var(--emerald)); }
.row-link:hover { background: rgba(255, 255, 255, 0.75); }
.row-link:hover .thumb { border-color: var(--c1, var(--emerald)); }
::selection { background: rgba(255, 122, 102, 0.45); color: var(--graphite); }

/* Cabecalho do artigo: titulo e slide-resumo lado a lado */
.article-head-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 4vw, 3.5rem); align-items: center; }
.article-head-slide .slide-frame { outline: 1px solid var(--line-strong); box-shadow: 0 18px 36px -22px rgba(5, 43, 35, 0.55); }
@media (max-width: 62rem) { .article-head-grid { grid-template-columns: minmax(0, 1fr); } .article-head-slide { max-width: 30rem; } }

/* Impressao dos artigos */
@media print {
  .site-header, .site-footer, .toc, .skip-link, .crumbs { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
  .article-layout { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
