/* hprworks.com: aparencia dos slides (home, editor, apresentar e PDF).
   Todos os tamanhos usam cqw (1% da largura do slide), entao o slide escala sem distorcer. */

@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-var-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-var-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

/* Seis conjuntos de cores e fontes. Contrastes conferidos (ver Methodology and Sources). */
[data-theme="evergreen"] { --bg: #F5F7F4; --fg: #1F2933; --title: #0B5D4B; --hero-bg: #0B5D4B; --hero-fg: #F5F7F4; --hero-mark: #FF7A66; --soft: #E3EEE9; --mark: #FF7A66; --f-head: "Hedvig Letters Serif", Georgia, serif; --f-body: "Reddit Sans", Arial, sans-serif; --w-head: 400; }
[data-theme="slate"]     { --bg: #1F2933; --fg: #F5F7F4; --title: #FF9D8D; --hero-bg: #FF7A66; --hero-fg: #1F2933; --hero-mark: #1F2933; --soft: #2D3B48; --mark: #FF7A66; --f-head: "Work Sans", Arial, sans-serif; --f-body: "Work Sans", Arial, sans-serif; --w-head: 700; }
[data-theme="paper"]     { --bg: #FFFFFF; --fg: #1B1F23; --title: #1E3A8A; --hero-bg: #1E3A8A; --hero-fg: #FFFFFF; --hero-mark: #93C5FD; --soft: #EEF2FF; --mark: #2563EB; --f-head: "Source Serif 4", Georgia, serif; --f-body: "Atkinson Hyperlegible", Verdana, sans-serif; --w-head: 600; }
[data-theme="ocean"]     { --bg: #0B2545; --fg: #EAF2FB; --title: #8DD3C7; --hero-bg: #8DD3C7; --hero-fg: #0B2545; --hero-mark: #0B2545; --soft: #13315C; --mark: #8DD3C7; --f-head: "Atkinson Hyperlegible", Verdana, sans-serif; --f-body: "Atkinson Hyperlegible", Verdana, sans-serif; --w-head: 700; }
[data-theme="plum"]      { --bg: #F7F3F8; --fg: #2A1B33; --title: #6B2D86; --hero-bg: #4A1D5F; --hero-fg: #F7F3F8; --hero-mark: #E9B8FF; --soft: #EADFF0; --mark: #9B51E0; --f-head: "Source Serif 4", Georgia, serif; --f-body: "Work Sans", Arial, sans-serif; --w-head: 600; }
[data-theme="contrast"]  { --bg: #000000; --fg: #FFFFFF; --title: #FFD400; --hero-bg: #FFD400; --hero-fg: #000000; --hero-mark: #000000; --soft: #1A1A1A; --mark: #FFD400; --f-head: "Atkinson Hyperlegible", Verdana, sans-serif; --f-body: "Atkinson Hyperlegible", Verdana, sans-serif; --w-head: 700; }

.slide-frame {
  container-type: size;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
}
.slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 2.5cqw;
  line-height: 1.35;
  text-align: left;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  --body: 2.5cqw;
}
.slide[data-size="s"] { --body: 2.1cqw; }
.slide[data-size="m"] { --body: 2.5cqw; }
.slide[data-size="l"] { --body: 3cqw; }

.r { position: absolute; margin: 0; overflow: hidden; overflow-wrap: break-word; }
.r-title { font-family: var(--f-head); font-weight: var(--w-head); color: var(--title); }
.r-body, .r-body2 { font-size: var(--body); line-height: 1.35; }
.r p { margin: 0 0 0.55em; }
.r ul, .r ol { margin: 0; padding: 0; list-style: none; }
.r li { position: relative; padding-left: 1.15em; margin: 0 0 0.45em; }
.r ul li::before { content: ""; position: absolute; left: 0; top: 0.52em; width: 0.42em; height: 0.42em; background: var(--mark); }
.r ol { counter-reset: n; }
.r ol li::before { counter-increment: n; content: counter(n) "."; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--title); }
.r strong, .r b { font-weight: 700; }

/* Layout: bullets (tambem a base dos outros) */
.r-title { left: 6cqw; top: 4.2cqw; width: 88cqw; height: 10.5cqw; font-size: 3.8cqw; line-height: 1.15; display: flex; align-items: flex-start; }
.r-body { left: 6cqw; top: 17cqw; width: 88cqw; height: 34.5cqw; }

/* Layout: two columns */
.slide[data-layout="two"] .r-body { width: 41cqw; }
.r-body2 { left: 53cqw; top: 17cqw; width: 41cqw; height: 34.5cqw; }
.slide[data-layout="two"]::before { content: ""; position: absolute; left: 49.6cqw; top: 17.5cqw; width: 0.25cqw; height: 31cqw; background: var(--mark); opacity: 0.5; }

/* Layout: quote */
.slide[data-layout="quote"]::before { content: ""; position: absolute; left: 6cqw; top: 11cqw; width: 0.8cqw; height: 29cqw; background: var(--mark); }
.r-quote { left: 11cqw; top: 9cqw; width: 80cqw; height: 33cqw; font-family: var(--f-head); font-weight: var(--w-head); color: var(--title); font-size: 4.4cqw; line-height: 1.25; display: flex; align-items: center; }
.r-attr { left: 11cqw; top: 44cqw; width: 80cqw; height: 6cqw; font-size: 2.2cqw; color: var(--fg); }

/* Layout: image with text */
.slide[data-layout="image"] .r-body { width: 44cqw; }
.r-image { left: 54cqw; top: 17cqw; width: 40cqw; height: 34.5cqw; background: var(--soft); }
.r-image img, .r-image svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Layouts com faixa de cor: title e section */
.slide[data-layout="title"], .slide[data-layout="section"] { background: var(--hero-bg); color: var(--hero-fg); }
.slide[data-layout="title"] .r-title, .slide[data-layout="section"] .r-title { color: var(--hero-fg); }
.slide[data-layout="title"]::before { content: ""; position: absolute; left: 8cqw; top: 11cqw; width: 9cqw; height: 0.9cqw; background: var(--hero-mark); }
.slide[data-layout="title"] .r-title { left: 8cqw; top: 14.5cqw; width: 82cqw; height: 22cqw; font-size: 6.4cqw; line-height: 1.08; align-items: flex-end; }
.r-sub { left: 8cqw; top: 40cqw; width: 82cqw; height: 9cqw; font-size: 2.6cqw; line-height: 1.35; color: inherit; }
.slide[data-layout="section"]::before { content: ""; position: absolute; left: 8cqw; top: 33.2cqw; width: 84cqw; height: 0.3cqw; background: var(--hero-mark); }
.slide[data-layout="section"] .r-title { left: 8cqw; top: 14cqw; width: 84cqw; height: 17.5cqw; font-size: 5.2cqw; line-height: 1.1; align-items: flex-end; }
.slide[data-layout="section"] .r-sub { top: 36.5cqw; font-size: 2.4cqw; }

/* Quadro pequeno (blocos de categoria): textos maiores para ler em tela pequena */
.is-tile .r-title { font-size: 6.4cqw; top: 5cqw; height: 13cqw; }
.is-tile .r-body, .is-tile .r-body2 { font-size: 4.3cqw; top: 22cqw; }
.is-tile .slide[data-layout="two"] .r-body { width: 41cqw; }
.is-tile .slide[data-layout="two"]::before { top: 22.5cqw; height: 26cqw; }
.is-tile .slide[data-layout="title"] .r-title { font-size: 8cqw; top: 14.5cqw; }
.is-tile .slide[data-layout="section"] .r-title { font-size: 7.6cqw; top: 12cqw; height: 19cqw; }
.is-tile .slide[data-layout="section"] .r-sub, .is-tile .r-sub { font-size: 3.6cqw; }
.is-tile .r-quote { font-size: 5.6cqw; }
.is-tile .r-attr { font-size: 3.4cqw; top: 45cqw; }
.is-tile .slide[data-layout="image"] .r-title { font-size: 5.6cqw; }
.is-tile .slide[data-layout="image"] .r-body { width: 44cqw; }
.is-tile .r-image { top: 22cqw; height: 29cqw; }
.is-thumb { pointer-events: none; }

/* Texto "selecionado" (so nas ilustracoes da home) */
.r .is-sel { background: rgba(255, 122, 102, 0.42); border-radius: 0.12em; padding: 0.05em 0.14em; margin-left: -0.14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Quadro do hero (home): textos maiores, como na tela do editor */
.is-hero .r-title { font-size: 5.4cqw; top: 5cqw; height: 14cqw; }
.is-hero .r-body { font-size: 3.6cqw; top: 22cqw; height: 30cqw; }
.is-hero .slide[data-layout="title"] .r-title { font-size: 7cqw; top: 14.5cqw; height: 22cqw; }
.is-hero .r-sub { font-size: 3.2cqw; }
.is-hero .slide[data-layout="image"] .r-body { width: 44cqw; }
.is-hero .r-image { top: 22cqw; height: 29cqw; }

/* Slide de abertura no topo dos artigos */
.is-card .slide[data-layout="title"] .r-title { font-size: 5.6cqw; top: 12cqw; height: 25cqw; left: 7cqw; width: 86cqw; }
.is-card .slide[data-layout="title"] .r-sub { font-size: 3cqw; top: 41cqw; left: 7cqw; }
.is-card .slide[data-layout="title"]::before { left: 7cqw; top: 8.5cqw; }

/* Estado de edicao (editor) */
.is-editing .r[contenteditable] { cursor: text; }
.is-editing .r[contenteditable]:hover { outline: 0.2cqw dashed color-mix(in srgb, var(--title) 55%, transparent); outline-offset: 0.3cqw; }
.is-editing .r[contenteditable]:focus { outline: 0.28cqw solid var(--title); outline-offset: 0.3cqw; overflow: visible; z-index: 2; }
.is-editing .slide[data-layout="title"] .r[contenteditable]:focus,
.is-editing .slide[data-layout="section"] .r[contenteditable]:focus { outline-color: var(--hero-fg); }
.is-editing .r[data-placeholder]:empty::before { content: attr(data-placeholder); opacity: 0.55; font-style: italic; pointer-events: none; }
.is-editing .r.is-over { outline: 0.28cqw solid #D64545; outline-offset: 0.3cqw; }
.is-editing .r-image { cursor: pointer; }
.is-editing .r-image:not(:has(img))::before { content: "Add an image from your device"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2cqw; font-size: 2cqw; color: var(--fg); border: 0.25cqw dashed var(--title); }
.is-editing .r-image:has(img) { outline: none; }
