@font-face { font-family: Bricolage; src: url(fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/figtree.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }

/* Quadro verde, giz e papel: a sala de aula onde estes projetos nascem. */
:root {
  --board: #12392f; --board-2: #1b4c3f; --chalk: #f2f5ee; --chalk-dim: #bcd2c6; --yellow: #ffd95a;
  --paper: #fff; --ink: #17261f; --ink-2: #4c5f55; --rule: #d5ded8; --tint: #eff4f0; --green: #0d6a4d;
  --red: #a92b1f; --red-tint: #fdeeec; --amber-tint: #fff6d9;
  --r: 8px; --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { accent-color: var(--green); scrollbar-color: #9db3a7 transparent; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 Figtree, sans-serif; caret-color: var(--green); }
main { flex: 1; padding-bottom: 4rem; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }
.bar :focus-visible, .foot :focus-visible { outline-color: var(--yellow); }
h1, h2, h3 { font-family: Bricolage, sans-serif; font-weight: 700; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: 1.4rem; margin: 2.75rem 0 1rem; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--green); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font: .92em ui-monospace, monospace; overflow-wrap: anywhere; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2.5rem, 78rem); margin-inline: auto; }
.narrow { max-width: 34rem; }
.page { padding-top: 3rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--yellow); color: var(--ink); padding: .5rem 1rem; z-index: 5; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }
html:not(.js) .js-only { display: none; }
.hint, .by, .work-by { color: var(--ink-2); }
.hint { font-size: .95rem; margin: 0; }
.by { margin: .4rem 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .4rem 1.15rem; border: 1.5px solid transparent; border-radius: var(--r); background: var(--green); color: #fff; font: 600 1rem/1.2 Figtree, sans-serif; text-decoration: none; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease); }
.btn:hover { background: #09523b; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.line { background: transparent; color: var(--green); border-color: #8fb3a3; }
.btn.line:hover { background: var(--tint); border-color: var(--green); }
.btn.chalk { background: var(--yellow); color: #22260f; }
.btn.chalk:hover { background: #ffe68f; }
.btn.red { background: var(--red); }
.btn.red:hover { background: #87210f; }
.small-btn { min-height: 2.25rem; font-size: .95rem; padding-inline: .8rem; }
.btn:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
td .linkish { color: var(--green); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.actions form { margin: 0; }

/* Cabeçalho: uma linha, em qualquer largura */
.bar { background: var(--board); color: var(--chalk); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; }
.brand { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; color: inherit; text-decoration: none; font: 700 1.2rem Bricolage, sans-serif; letter-spacing: -.02em; }
.brand svg { width: 1.5rem; fill: none; stroke: var(--yellow); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.bar nav { display: flex; align-items: center; gap: 1.35rem; font-size: 1rem; }
.bar nav > a:not(.btn), .menu summary { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--chalk); text-decoration: none; text-underline-offset: .4em; }
.bar nav > a:not(.btn):hover, .menu summary:hover { text-decoration: underline; }
.bar nav > a[aria-current]:not(.btn) { text-decoration: underline 2px var(--yellow); }
.bar .btn { min-height: 2.25rem; white-space: nowrap; padding-inline: .9rem; font-size: .95rem; }
.menu { position: relative; }
.menu summary { gap: .25rem; list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu summary svg { width: 1.1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu[open] summary svg { transform: rotate(180deg); }
.menu ul { position: absolute; z-index: 4; right: 0; top: 100%; min-width: 12rem; margin: .15rem 0 0; padding: .35rem; list-style: none; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 8px 24px rgb(18 57 47 / .18); }
.menu li a, .menu li button { display: flex; align-items: center; width: 100%; min-height: 2.75rem; padding: 0 .75rem; border: 0; border-radius: 5px; background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.menu li a:hover, .menu li button:hover { background: var(--tint); }
.menu li a[aria-current] { font-weight: 600; }
.menu li :focus-visible { outline-color: var(--green); outline-offset: -2px; }
@media (min-width: 44.01rem) { .slim { display: none; } }
@media (max-width: 44rem) { .bar nav > a.wide { display: none; } .bar nav { gap: 1rem; } }
@media (max-width: 26rem) { .cut { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .bar-in, .bar nav { gap: .6rem; } .menu-name { max-width: 3.4rem; } }

/* Galeria */
.gallery { padding-top: 2rem; }
.gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2.5rem; }
.gallery-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.search { display: flex; gap: .5rem; flex: 0 1 25rem; min-width: 0; }
.search input { flex: 1; min-width: 0; min-height: 2.75rem; padding: .4rem .9rem; border: 1.5px solid #6f8a7d; border-radius: var(--r); background: #fff; color: var(--ink); font: inherit; }
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 2.5rem; margin-top: 1.25rem; border-bottom: 1px solid var(--rule); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.5rem; min-width: 0; }
.tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); border-color: var(--rule); }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; border-color: var(--green); }
.order { display: flex; align-items: center; gap: 1rem; margin-left: auto; color: var(--ink-2); }
.order a { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; }
.order a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
.found { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.25rem; margin-top: 1.75rem; }
.found h2 { margin: 0; font-size: 1.2rem; }
.found a { display: inline-flex; align-items: center; min-height: 1.75rem; }

.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 2.5rem 2rem; }
.gallery > .works, .page > .works { margin-top: 2rem; }
.found + .works { margin-top: 1.25rem; }
/* O cartão inteiro abre o projeto, mas o leitor de tela ouve só o título como link. */
.work { position: relative; }
.work .work-title a { color: inherit; text-decoration: none; }
.work .work-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.work .work-title a:focus-visible { outline: none; }
.work .work-title a:focus-visible::after { outline: 3px solid var(--green); outline-offset: 5px; }
.work:hover .work-title a { text-decoration: underline 2px; text-underline-offset: .18em; }
.work:hover .thumb::after { border: 2px solid var(--green); }
.work-text { margin-top: .85rem; }
.work p { margin: .15rem 0 0; }
.work .work-by { color: var(--ink); }
.work .work-about { color: var(--ink-2); font-size: 1rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin-top: .4rem; }
/* Um projeto só: ocupa a largura em vez de sobrar num canto. */
@media (min-width: 52rem) {
  .works > .work:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; }
  .work:only-child .work-text { margin: 0; }
  .work:only-child .work-title { font-size: 1.9rem; }
  .work:only-child .work-about { -webkit-line-clamp: 5; line-clamp: 5; }
}
.thumb { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r); background: var(--tint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgb(0 0 0 / .1); }
.thumb-mark { position: absolute; inset: 0; margin: auto; width: 26%; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tone-0 { background: #ffd95a; } .tone-1 { background: #9fd8c0; } .tone-2 { background: #f5b5a0; } .tone-3 { background: #b5cdf2; }
.work-title { display: block; font: 600 1.2rem/1.25 Bricolage, sans-serif; letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.work-by { display: block; margin-top: .15rem; overflow-wrap: anywhere; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.25rem; margin-top: 3.5rem; }
.empty { padding: 2.5rem 0; max-width: 34rem; }
.empty h2 { margin: 0; } .empty p { margin: .6rem 0 1.4rem; color: var(--ink-2); }

.show-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.show-head > div:first-child { flex: 1 1 24rem; min-width: 0; }
.show-head > .actions { flex: none; }

/* Visualizador de projeto em tela cheia */
.preview { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #dfe7e2; }
.pv-bar { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .25rem .75rem; height: 3.5rem; padding: 0 .6rem; background: var(--board); color: var(--chalk); }
.pv-bar :focus-visible { outline-color: var(--yellow); }
.pv-panel :focus-visible { outline-color: var(--green); }
.pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 2.6rem; height: 2.6rem; padding: 0 .65rem; border: 0; border-radius: 6px; background: none; color: inherit; font: 500 1rem/1 Figtree, sans-serif; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .2s var(--ease); }
.pv-btn svg { width: 1.3rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pv-bar .pv-btn:hover { background: var(--board-2); }
.pv-bar .pv-btn[aria-pressed=true] { background: var(--chalk); color: var(--board); }
.pv-title { min-width: 0; padding-left: .85rem; border-left: 1px solid #3d6959; }
.pv-title h1, .pv-title p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title h1 { font-size: 1.05rem; letter-spacing: -.01em; }
.pv-title p { color: var(--chalk-dim); font-size: .9rem; line-height: 1.3; }
.pv-tools, .pv-devices { display: flex; gap: .15rem; }
.pv-info { grid-column: -2 / -1; }
.pv-info summary { list-style: none; }
.pv-info summary::-webkit-details-marker { display: none; }
.pv-info[open] summary { background: var(--board-2); }
.pv-panel { position: fixed; z-index: 2; top: 3.5rem; right: 0; bottom: 0; width: min(100%, 23rem); padding: 1rem 1.25rem 2rem; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); border-left: 1px solid var(--rule); }
.pv-panel h2 { margin: 1.75rem 0 .6rem; font-size: 1.25rem; }
.pv-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.pv-panel-head h2 { margin: 0; }
.pv-panel .pv-btn:hover { background: var(--tint); }
.pv-panel .facts div { grid-template-columns: 6.75rem minmax(0, 1fr); }
.pv-direct { margin: 1.25rem 0 0; }
.pv-stage { flex: 1; min-height: 0; min-width: 0; padding: 0; overflow: hidden; display: grid; place-items: center; }
.pv-stage .notice { margin: 1.25rem; max-width: 34rem; }
.pv-frame { width: 100%; height: 100%; overflow: hidden; background: #fff; }
.pv-frame.device { border-radius: 12px; box-shadow: 0 0 0 1px rgb(18 57 47 / .18); }
.pv-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; transform-origin: 0 0; }
.preview.focus .pv-bar { display: none; }
.pv-back { position: fixed; z-index: 3; right: .75rem; bottom: .75rem; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--chalk-dim); border-radius: var(--r); background: var(--board); color: var(--chalk); font: 600 .95rem Figtree, sans-serif; cursor: pointer; opacity: .75; transition: opacity .2s var(--ease); }
.pv-back:hover, .pv-back:focus-visible { opacity: 1; }
@media (min-width: 64rem) { .preview:has(.pv-info[open]) .pv-stage { margin-right: 23rem; } }
@media (max-width: 52rem) { .pv-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@media (max-width: 34rem) {
  .pv-bar { padding: 0 .25rem; gap: .25rem; }
  .pv-btn { min-width: 2.75rem; height: 2.75rem; padding: 0; }
  .pv-title { border: 0; padding: 0; }
  .pv-title p { display: none; }
  .pv-title h1 { font-size: .95rem; }
}

.prose { max-width: 68ch; white-space: pre-line; overflow-wrap: anywhere; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-2); } .facts dd { margin: 0; overflow-wrap: anywhere; }

.form { display: grid; gap: 1.25rem; margin: 1.75rem 0; justify-items: start; }
h2 + .form { margin-top: 0; }
.form > * { width: 100%; margin: 0; } .form > .btn { width: auto; }
.field { display: grid; gap: .35rem; }
.field label, legend { font-weight: 600; }
.field input:not([type=checkbox]), textarea, select { width: 100%; min-height: 2.85rem; padding: .55rem .8rem; border: 1.5px solid #94a99d; border-radius: var(--r); background: #fff; color: inherit; font: inherit; }
textarea { resize: vertical; }
.field input:focus, textarea:focus, select:focus { border-color: var(--green); }
.has-error input { border-color: var(--red) !important; }
.error { color: var(--red); margin: 0; font-size: .95rem; }
.choice { border: 0; padding: 0; display: grid; gap: .4rem; }
.choice label, .field .check { display: flex; gap: .6rem; align-items: center; font-weight: 400; }
.choice legend { margin-bottom: .4rem; }
input[type=radio], input[type=checkbox] { width: 1.15rem; height: 1.15rem; margin: 0; }
.cover { width: 14rem; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); }
.drop { border: 2px dashed #8fb3a3; border-radius: 12px; padding: 2rem 1.25rem; text-align: center; background: var(--tint); transition: background .2s, border-color .2s; }
.drop.over { border-color: var(--green); background: #dcebe2; }
.drop.ready { border-style: solid; border-color: var(--green); }
.drop-icon { width: 2.75rem; fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.drop-main { font: 600 1.15rem/1.3 Bricolage, sans-serif; margin: .5rem 0 .25rem; overflow-wrap: anywhere; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.1rem; }
.drop .btn { position: relative; background: #fff; }
.progress { display: grid; gap: .35rem; }
progress { width: 100%; height: .6rem; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: #dfe8e2; }
progress::-webkit-progress-bar { background: #dfe8e2; } progress::-webkit-progress-value { background: var(--green); } progress::-moz-progress-bar { background: var(--green); }
.notice { padding: .8rem 1rem; border-radius: var(--r); margin: 1.25rem 0; overflow-wrap: anywhere; }
.form > .notice { margin: 0; }
.notice.ok { background: #e0f1e7; color: #0a4632; }
.notice.bad { background: var(--red-tint); color: #7d1d13; }
.notice.warn { background: var(--amber-tint); color: #4f3c00; }
.issues { margin: .6rem 0 0; padding-left: 1.2rem; max-height: 16rem; overflow: auto; }
.danger summary, .inline-danger summary { cursor: pointer; color: var(--red); }
.inline-danger[open] summary { margin-bottom: .4rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; }
.split > div > h2:first-child { margin-top: 1rem; }
.rows { list-style: none; padding: 0; margin: 1rem 0 0; }
.rows li { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.thumb.small { width: 8rem; flex: none; }
.row-main { flex: 1 1 14rem; min-width: 0; } .row-main .work-title { margin: 0; } .row-main a.work-title { text-decoration: none; } .row-main a.work-title:hover { text-decoration: underline; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem 1.25rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.num { text-align: right; } .nowrap, td .actions { white-space: nowrap; }
td .actions { flex-wrap: nowrap; align-items: start; }
.foot { background: var(--board); color: var(--chalk-dim); font-size: .95rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 3rem; padding-block: 1.5rem; }
.foot p { margin: 0; max-width: 68ch; text-wrap: pretty; }
.foot strong { display: block; color: var(--chalk); font: 700 1.1rem/1.4 Bricolage, sans-serif; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--chalk); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .gallery { padding-top: 1.5rem; }
  .search { flex-basis: 100%; }
}
@media (max-width: 40rem) {
  .filters { border: 0; }
  .classes { flex-wrap: nowrap; width: 100%; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .classes a { flex: none; margin: 0; }
  .order { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
legend { padding: 0; }
::file-selector-button { font: 600 .95rem Figtree, sans-serif; color: var(--green); background: #fff; border: 1.5px solid #8fb3a3; border-radius: 6px; padding: .25rem .7rem; margin-right: .75rem; cursor: pointer; }
