/* Manual de Marca Fernando Souza */

/* A Nexa (fonte da marca) é usada se estiver instalada no computador de quem abre o manual.
   Para servir os arquivos pelo site, coloque os .woff2 licenciados em assets/fonts/ e
   acrescente no src: , url("../fonts/nexa-heavy.woff2") format("woff2") (veja LEIA-ME.txt).
   Sem a fonte, as amostras caem para Montserrat. */
@font-face {
  font-family: "Nexa";
  src: local("Nexa Heavy"), local("Nexa-Heavy");
  font-weight: 800 900;
  font-display: swap;
}
@font-face {
  font-family: "Nexa";
  src: local("Nexa Regular"), local("Nexa-Regular"), local("NexaRegular");
  font-weight: 400;
  font-display: swap;
}

:root {
  --noite: #161E31;
  --marinho: #2C3D5B;
  --gelo: #EBF5F7;
  --ceu: #BDE6EF;
  --gold: #D7C08E;

  --ground: #0F1525;
  --deep: #0B101C;
  --surface: #161E31;
  --raised: #1F2A42;
  --active: #26324D;
  --line: #243049;
  --ink: #EBF5F7;
  --muted: #9DAAC0;
  --danger: #F2A49A;

  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-brand: "Nexa", var(--font);

  --r-card: 8px;
  --r-ctl: 6px;
  --sidebar: 248px;
  --gutter: 48px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--ceu); color: var(--noite); }
:focus-visible { outline: 2px solid var(--ceu); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ceu); color: var(--noite); padding: 10px 14px; border-radius: var(--r-ctl); }
.skip:focus { top: 12px; }
.noscript { padding: 40px; }

/* ---------- Shell ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 12px 20px;
  background: var(--ground);
  border-right: 1px solid var(--line);
  z-index: 30;
  overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; text-decoration: none; }
.sidebar .brand img { width: 34px; height: auto; }
.sidebar .brand strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.sidebar .brand small { display: block; font-size: 13px; color: var(--muted); }

nav { margin-top: 12px; display: grid; gap: 2px; }
.nav-group { font-size: 13px; color: var(--muted); padding: 0 10px; margin: 28px 0 6px; }
nav a {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 10px;
  border-radius: var(--r-ctl);
  font-size: 14px; color: var(--ink); text-decoration: none;
  transition: background-color .15s var(--ease);
}
nav a svg { color: var(--muted); }
nav a:hover { background: var(--raised); }
nav a[aria-current="page"] { background: var(--active); font-weight: 600; }
nav a[aria-current="page"] svg { color: var(--ceu); }

.sidebar-foot { margin-top: auto; padding: 24px 6px 0; }
.sidebar-foot p { font-size: 12px; color: var(--muted); margin-top: 8px; padding: 0 2px; }
.sidebar-pdf {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 4px;
  font-size: 13px; font-weight: 500; text-decoration: none; border-radius: var(--r-ctl);
  transition: background-color .15s var(--ease);
}
.sidebar-pdf:first-of-type { margin-top: 14px; }
.sidebar-pdf:hover { background: var(--raised); }
.sidebar-pdf svg { color: var(--ceu); }

.topbar { display: none; }
.scrim { display: none; }

main {
  margin-left: var(--sidebar);
  padding: 36px var(--gutter) 96px;
  max-width: calc(var(--sidebar) + 1100px + var(--gutter) * 2);
  display: grid;
  gap: 20px;
  outline: none;
}

/* ---------- Componentes ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border: 0; border-radius: var(--r-ctl);
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s var(--ease), transform .12s var(--ease), color .15s;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.btn-primary { background: var(--ceu); color: var(--noite); }
.btn-primary:hover { background: #d3eff5; }
.btn-quiet { background: var(--raised); color: var(--ink); }
.btn-quiet:hover { background: var(--active); }
.btn-cream { background: var(--ceu); color: var(--noite); }
.btn-cream:hover { background: #d3eff5; }
.btn-ghost-cream { background: rgba(235, 245, 247, .1); color: var(--gelo); }
.btn-ghost-cream:hover { background: rgba(235, 245, 247, .18); }

/* Botões de copiar trocam o ícone por um check por um instante */
.btn svg + svg, .icon-btn svg + svg, .value-row svg + svg { display: none; }
.is-done svg:first-of-type { display: none; }
.is-done svg + svg { display: block; }
.is-done { color: var(--ceu); }
.btn-primary.is-done { color: var(--noite); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .15s var(--ease), color .15s;
}
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.panel-forest .icon-btn { color: rgba(235, 245, 247, .7); }
.panel-forest .icon-btn:hover { background: rgba(235, 245, 247, .12); color: var(--gelo); }

.input {
  height: 40px; width: 100%; padding: 0 12px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
.input:focus { outline: 2px solid var(--ceu); outline-offset: -1px; border-color: transparent; }

.file-link b { font-weight: 700; }
.file-link small { font-size: 12px; font-weight: 500; opacity: .7; margin-left: 6px; }
.file-link span { white-space: nowrap; }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ceu); text-decoration: none; }
.text-link:hover svg { transform: translateX(3px); }
.text-link svg { transition: transform .2s var(--ease); }
.footnote { font-size: 13px; color: var(--muted); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-head h1 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 62ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--surface); border-radius: var(--r-card); padding: 28px; }
.panel-forest { background: var(--marinho); color: var(--gelo); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.panel-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.panel p + p { margin-top: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.statement { font-size: 17px; line-height: 1.6; }

/* Itens de grid não podem crescer além da coluna por causa da largura natural das imagens */
main > *, .pair > *, .shortcuts > *, .logo-grid > *, .color-grid > *, .seal-grid > *, .file-grid > *, .pairs-grid > *, .app-grid > * { min-width: 0; }

.bg-gelo { background: var(--gelo); }
.bg-noite { background: var(--deep); }
.bg-paper { background: #ffffff; }
.bg-none { background: var(--deep); }

/* ---------- Início ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 56px;
  background: var(--noite) url("../previews/backgrounds/background-1.jpg") center / cover no-repeat;
  color: var(--gelo);
  border-radius: var(--r-card);
  padding: 72px 56px;
  min-height: 380px;
}
.hero-logo { width: 100%; max-width: 520px; }
.hero h1 { font-family: var(--font-brand); font-size: 34px; line-height: 1.1; font-weight: 900; letter-spacing: -0.02em; }
.hero p { margin-top: 14px; font-size: 16px; opacity: .88; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shortcut {
  display: grid; grid-template-rows: 112px auto auto; gap: 2px;
  background: var(--surface); border-radius: var(--r-card); padding: 14px 14px 18px;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.shortcut:hover { transform: translateY(-2px); background: var(--raised); }
.shortcut:hover .shortcut-label::after { transform: translateX(3px); opacity: 1; }
.shortcut-art { display: grid; place-items: center; background: var(--deep); border-radius: var(--r-ctl); margin-bottom: 12px; overflow: hidden; }
.shortcut-label { font-size: 15px; font-weight: 700; padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.shortcut-label::after { content: "→"; opacity: .4; transition: transform .2s var(--ease), opacity .2s; }
.shortcut-meta { font-size: 13px; color: var(--muted); padding: 0 4px; }
.art-logo img { height: 60px; width: auto; }
.art-swatch { grid-template-columns: 3fr 2fr 1fr 1fr .6fr; place-items: stretch; }
.art-swatch i { display: block; }
.art-type { background: var(--marinho); color: var(--gelo); font-family: var(--font-brand); font-size: 56px; font-weight: 900; letter-spacing: -0.03em; }
.art-seal img { height: 88px; width: auto; }

.concept { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 8px; align-items: start; padding: 36px 40px; }
.concept .panel-head { grid-column: 1 / -1; }
.concept-quote { font-family: var(--font-brand); font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; color: var(--ceu); }
.concept-quote::before { content: "“"; }
.concept-quote::after { content: "”"; }
.concept-body p { opacity: .9; }
.pillars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pillars li { background: rgba(235, 245, 247, .1); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }

.values ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.values li { background: var(--raised); border-radius: var(--r-ctl); padding: 20px; display: grid; gap: 4px; align-content: start; }
.values strong { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--ceu); }
.values span { color: var(--ink); opacity: .85; }

.home-apps .panel-head { align-items: center; }
.home-apps-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 12px; }
.home-app { position: relative; display: block; height: 240px; border-radius: var(--r-ctl); overflow: hidden; text-decoration: none; }
.home-app img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.home-app:hover img { transform: scale(1.04); }
.home-app span {
  position: absolute; left: 10px; bottom: 10px;
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Logos ---------- */

.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.logo-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.logo-stage {
  display: grid; place-items: center;
  aspect-ratio: 16 / 10; padding: 56px;
  background: var(--gelo);
  transition: background-color .3s var(--ease);
}
.logo-stage img { max-height: 100%; max-width: 100%; width: auto; }
.logo-card:not(.is-wide) .logo-stage img { height: 66%; }
.logo-card.on-dark .logo-stage { background: var(--deep); }
.logo-body { padding: 20px; display: grid; gap: 16px; }
.logo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-row h2 { font-size: 17px; font-weight: 700; }
.logo-color { font-size: 13px; color: var(--muted); }
.dots { display: flex; gap: 8px; }
.dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); border: 0; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(235, 245, 247, .25);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.dot:hover { transform: scale(1.08); }
.dot[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(235, 245, 247, .25), 0 0 0 2px var(--surface), 0 0 0 4px var(--ceu); }
.logo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.png-originals { display: grid; gap: 28px; }
.png-originals .panel-head { margin-bottom: 0; }
.png-group h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.png-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.png-tile { display: grid; gap: 6px; }
.png-stage { display: block; height: 96px; padding: 16px; border-radius: var(--r-ctl); overflow: hidden; }
.png-stage img { width: 100%; height: 100%; object-fit: contain; }
.png-stage.bg-noite { box-shadow: inset 0 0 0 1px var(--line); }
.png-meta { font-size: 13px; line-height: 1.35; padding: 0 2px; }
.png-formats { display: flex; gap: 4px; }
.png-formats a {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; text-decoration: none;
  padding: 5px 0; border-radius: 4px; background: var(--raised); color: var(--ink);
  transition: background-color .15s var(--ease), color .15s;
}
.png-formats a:hover { background: var(--ceu); color: var(--noite); }

/* ---------- Cores ---------- */

.color-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.color-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.color-field {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  width: 100%; aspect-ratio: 4 / 4.6; padding: 22px;
  border: 0; text-align: left; cursor: pointer; color: var(--gelo);
  box-shadow: inset 0 0 0 1px rgba(235, 245, 247, .1); /* o Azul Noite tem a mesma cor do cartão */
  border-radius: var(--r-card) var(--r-card) 0 0;
  transition: filter .2s;
}
.color-field:hover { filter: brightness(1.12); }
.color-field.is-light { color: var(--noite); }
.color-field.is-light:hover { filter: brightness(.97); }
.color-role { font-size: 13px; opacity: .8; }
.color-name { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; margin-top: 2px; }
.color-hex { font-size: 15px; opacity: .85; }
.value-list { padding: 12px; display: grid; gap: 6px; }
.value-row {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  background: var(--raised); border: 0; border-radius: var(--r-ctl);
  cursor: pointer; text-align: left;
  transition: background-color .15s var(--ease);
}
.value-row:hover { background: var(--active); }
.value-row .value-key { font-weight: 700; font-size: 13px; width: 44px; }
.value-row .value-val { flex: 1; font-size: 14px; }
.value-row svg { color: var(--muted); }
.value-row.is-done svg { color: var(--ceu); }

.gold { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: center; }
.gold-copy p { color: var(--muted); margin-top: 6px; max-width: 40ch; }
.gold .color-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--raised); }
.gold .color-field { aspect-ratio: auto; min-height: 168px; box-shadow: none; }
.gold .value-list { align-content: center; }
.gold .value-row { background: var(--surface); }

.usage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.usage-copy p { color: var(--ink); opacity: .9; margin: 8px 0 20px; }
.proportion-bar { display: flex; height: 88px; border-radius: var(--r-ctl); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(235, 245, 247, .1); }
.proportion-bar span { display: flex; align-items: flex-end; padding: 10px 12px; color: var(--gelo); font-size: 12px; font-weight: 600; min-width: 76px; }
.proportion-bar em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Peça de exemplo do manual: fundo azul noite, título em Nexa Heavy, destaque em azul céu */
.post-sample {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  background: var(--noite); border-radius: var(--r-ctl);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 8%;
}
.post-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-logo { position: relative; width: 34%; margin-bottom: auto; }
.post-title {
  position: relative; font-family: var(--font-brand); font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -0.01em; color: var(--gelo);
  overflow-wrap: anywhere;
}
.post-title span { color: var(--ceu); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .12em; }
.post-sub { position: relative; margin-top: 14px; color: var(--gelo); opacity: .85; font-size: 16px; max-width: 36ch; }
.post-sub:empty { display: none; }
.post-sample.is-large { aspect-ratio: 16 / 9; margin-top: 16px; }
.post-sample.is-large .post-logo { width: 18%; }
.post-sample.is-large .post-title { font-size: clamp(32px, 5vw, 72px); }

.pairs h2 { font-size: 17px; font-weight: 700; margin: 12px 0 14px; }
.pairs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pair-swatch { border-radius: var(--r-card); padding: 40px 28px 18px; display: grid; gap: 28px; }
.pair-swatch img { width: 100%; }
.pair-swatch span { font-size: 13px; opacity: .85; }

/* ---------- Tipografia ---------- */

.specimen {
  background: var(--marinho); color: var(--gelo);
  border-radius: var(--r-card); padding: 48px 56px;
  display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: end;
  font-family: var(--font-brand);
}
.specimen-aa { font-size: clamp(96px, 13vw, 184px); line-height: .85; font-weight: 900; letter-spacing: -0.03em; }
.specimen-name { font-size: 14px; opacity: .75; margin-bottom: 10px; font-family: var(--font); }
.specimen-set { font-size: clamp(18px, 2vw, 26px); line-height: 1.45; font-weight: 900; overflow-wrap: anywhere; }

.family { display: grid; align-content: start; gap: 6px; }
.family-role { font-size: 13px; color: var(--muted); }
.family h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-family: var(--font-brand); }
.family h2.is-headline { font-weight: 900; }
.family h2.is-body { font-weight: 400; }
.family dl { display: grid; margin: 14px 0 4px; }
.family dl > div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.family dt { color: var(--muted); }
.family code { font-family: inherit; }
.family-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tester-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: start; gap: 24px; }
.tester-inputs { display: grid; gap: 8px; }

/* ---------- Selos ---------- */

.seal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.seal-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.seal-card.is-wide { grid-column: 1 / -1; grid-template-columns: 1.4fr 1fr; grid-template-rows: none; }
.seal-stage { display: block; height: 340px; padding: 44px; overflow: hidden; transition: background-color .3s var(--ease); }
.seal-stage img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.seal-card:hover .seal-stage img { transform: rotate(-3deg) scale(1.03); }
.seal-body { padding: 20px; display: grid; gap: 16px; align-content: start; }
.seal-card.is-wide .seal-body { align-content: center; padding: 32px; }
.seal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seal-body h2 { font-size: 17px; font-weight: 700; }
.seal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented { display: inline-flex; background: var(--ground); border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.seg {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 4px;
  transition: background-color .15s var(--ease), color .15s;
}
.seg:hover { color: var(--ink); }
.seg[aria-pressed="true"] { background: var(--active); color: var(--ink); }
.seg[data-version="dourado"][aria-pressed="true"] { color: var(--gold); }

/* ---------- Diretrizes ---------- */

.anatomy { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: center; padding: 40px 48px; }
.anatomy img { width: 100%; }
.anatomy-lead { margin-top: 6px; opacity: .85; max-width: 60ch; }
.anatomy ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.anatomy li { display: grid; gap: 4px; padding: 16px 18px; background: rgba(235, 245, 247, .07); border-radius: var(--r-ctl); align-content: start; }
.anatomy li strong { color: var(--ceu); }
.anatomy li span { opacity: .88; font-size: 14px; }

.usage-card { display: grid; gap: 4px; align-content: start; }
.usage-art { display: block; height: 150px; padding: 28px; border-radius: var(--r-ctl); margin-bottom: 18px; overflow: hidden; }
.usage-art img { width: 100%; height: 100%; object-fit: contain; }
.usage-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.usage-cols h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li { background: var(--raised); padding: 4px 10px; border-radius: 999px; font-size: 13px; }

.rule-list { display: grid; gap: 10px; }
.rule-list li { display: flex; gap: 12px; align-items: flex-start; }
.rule-list svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; margin-top: 1px; stroke-width: 2.2; }
.rule-list.is-do svg { background: var(--ceu); color: var(--noite); }
.rule-list.is-dont svg { background: #3a2530; color: var(--danger); }

.elements { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.elements-art { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.elements-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 78% center; border-radius: var(--r-ctl); }
.elements .text-link { margin-top: 16px; }

/* ---------- Biblioteca ---------- */

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* A imagem ocupa a sobra de altura quando o cartão vizinho tem mais botões */
.app-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; display: grid; grid-template-rows: minmax(340px, 1fr) auto; min-width: 0; }
.app-card.is-wide { grid-column: span 2; }
.app-stage { display: block; height: 100%; overflow: hidden; background: var(--raised); }
.app-stage img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.app-stage:hover img { transform: scale(1.03); }
.app-body { padding: 16px 18px 18px; display: grid; gap: 12px; align-content: start; }
.app-body h2 { font-size: 16px; font-weight: 700; }
.app-files { display: flex; flex-wrap: wrap; gap: 8px; }
.app-files .btn { height: 34px; padding: 0 12px; font-size: 13px; }

.file-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.file-card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.file-stage { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.file-stage img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.file-stage:hover img { transform: scale(1.03); }
.file-body { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
.file-body h2 { font-size: 16px; font-weight: 700; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ceu); color: var(--noite); font-weight: 600;
  padding: 10px 16px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }

/* ---------- Movimento ---------- */

.rise { animation: rise .55s var(--ease) both; }
main > .rise:nth-child(2) { animation-delay: .06s; }
main > .rise:nth-child(3), main > div:nth-child(3) > .rise { animation-delay: .12s; }
main > :nth-child(4) .rise, main > .rise:nth-child(4) { animation-delay: .18s; }
main > :nth-child(5) .rise, main > .rise:nth-child(5) { animation-delay: .24s; }
.logo-grid > .rise:nth-child(2), .color-grid > .rise:nth-child(2), .seal-grid > .rise:nth-child(2), .file-grid > .rise:nth-child(2), .app-grid > .rise:nth-child(2) { animation-delay: .1s; }
.logo-grid > .rise:nth-child(n+3), .color-grid > .rise:nth-child(n+3), .seal-grid > .rise:nth-child(n+3), .file-grid > .rise:nth-child(n+3), .app-grid > .rise:nth-child(n+3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

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

/* ---------- Tablet ---------- */

@media (max-width: 1180px) {
  :root { --gutter: 32px; }
  .shortcuts { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 48px 40px; gap: 40px; }
  .concept { grid-template-columns: 1fr; }
  .values ul { grid-template-columns: repeat(2, 1fr); }
  .anatomy { grid-template-columns: 140px 1fr; gap: 32px; padding: 32px; }
  .anatomy ul { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: repeat(2, 1fr); }
  .gold, .usage, .elements { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .png-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-apps-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .home-apps-grid .home-app:last-child { display: none; }
  .tester-head { grid-template-columns: 1fr; }
}

/* ---------- Celular e tablet estreito: sidebar vira menu ---------- */

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  body.menu-open { overflow: hidden; }

  .topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 8px 0 16px;
    background: var(--ground);
    box-shadow: 0 1px 0 var(--line);
  }
  .topbar .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; white-space: nowrap; }
  .topbar .brand img { width: 24px; height: auto; }
  .topbar-title { flex: 1; color: var(--muted); font-size: 14px; padding-left: 10px; box-shadow: -1px 0 0 var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--r-ctl); cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; }

  .sidebar {
    width: min(320px, 86vw);
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
    border-right: 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, .45);
    visibility: hidden;
  }
  .menu-open .sidebar { transform: none; visibility: visible; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(5, 8, 15, .6); }
  .scrim[hidden] { display: none; }
  nav a { height: 44px; font-size: 15px; }

  main { margin-left: 0; padding: 20px var(--gutter) 64px; gap: 16px; }

  .page-head h1 { font-size: 26px; }
  .hero { grid-template-columns: 1fr; padding: 36px 24px 28px; gap: 28px; min-height: 0; }
  .hero-logo { max-width: 300px; }
  .hero h1 { font-size: 28px; }
  .hero-actions .btn { flex: 1; }
  .shortcuts { gap: 12px; }
  .shortcut { grid-template-rows: 88px auto auto; }
  .art-type { font-size: 44px; }
  .art-seal img { height: 70px; }
  .art-logo img { height: 46px; }

  .pair, .logo-grid, .seal-grid, .file-grid, .pairs-grid, .usage-cols { grid-template-columns: 1fr; gap: 16px; }
  .values ul { grid-template-columns: 1fr; gap: 10px; }
  .panel { padding: 22px 20px; }
  .concept { padding: 24px 20px; }
  .concept-quote { font-size: 22px; }

  .logo-stage { padding: 32px; }
  .logo-row { flex-direction: column; align-items: flex-start; }
  .dot { width: 36px; height: 36px; }
  .btn { height: 44px; }

  .color-grid { grid-template-columns: 1fr; gap: 16px; }
  .proportion-bar span { min-width: 0; padding: 10px 8px; font-size: 11px; }
  .proportion-bar em { white-space: normal; overflow: visible; }
  .color-field { aspect-ratio: auto; min-height: 150px; }
  .gold .color-card { grid-template-columns: 1fr; }

  .specimen { grid-template-columns: 1fr; gap: 20px; padding: 32px 24px; }
  .post-sample.is-large { aspect-ratio: 4 / 5; }
  .post-sample.is-large .post-logo { width: 40%; }

  .seal-card.is-wide { grid-template-columns: 1fr; }
  .seal-stage { height: 260px; padding: 32px; }

  .anatomy { grid-template-columns: 1fr; padding: 28px 20px; gap: 24px; }
  .anatomy img { width: 110px; }
  .elements-art img { aspect-ratio: 4 / 5; }

  .app-grid { grid-template-columns: 1fr; gap: 16px; }
  .app-card, .app-card.is-wide { grid-column: auto; grid-template-rows: 260px auto; }
  .app-files .btn { height: 40px; }
  .png-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .png-formats a { padding: 9px 0; font-size: 12px; }
  .home-apps-grid { grid-template-columns: 1fr 1fr; }
  .home-apps-grid .home-app:last-child { display: block; }
  .home-app { height: 150px; }
  .home-apps .panel-head { flex-direction: column; align-items: flex-start; }
  .family h2 { font-size: 26px; }
}
