/* Tratados internacionais — o instrumento diplomático sobre a mesa verde da
   conferência. Cada tratado é um documento do CMS com um bloco html-bruto em
   <main class="tt">. Usa as fontes do portal (Cinzel, Cormorant Garamond,
   EB Garamond) e Pinyon Script para as firmas. Nenhum ornamento é caractere
   de texto: tudo é desenho (SVG ou CSS), para que nenhum aparelho o troque
   por emoji. Todo bloco centrado usa margem automática. */

.tt { --tt-azul: #101a2e; --tt-azul-2: #1d2d50; --tt-ouro: #b8962e; --tt-ouro-c: #d4af5a; --tt-ouro-p: #edd98a;
  --tt-papel: #f8f1e1; --tt-papel-2: #efe4ca; --tt-tinta: #2b1f14; --tt-suave: #6a5435; --tt-verde: #17342a; --tt-verde-2: #0e231c;
  --tt-cera: #8e1b24; --tt-cera-2: #1f4a3a;
  background: var(--tt-verde-2); color: var(--tt-tinta); font-family: "EB Garamond", Georgia, serif; overflow-x: clip; }
.tt *, .tt *::before, .tt *::after { box-sizing: border-box; }
.tt img { display: block; max-width: 100%; height: auto; margin-left: auto; margin-right: auto; }
.tt a { color: inherit; }
.tt-oculto { position: absolute; width: 0; height: 0; overflow: hidden; }
.tt-nobr { white-space: nowrap; }

/* Grega romana: a faixa que fecha a capa e emoldura o instrumento. */
.tt-grega { height: 22px; background-color: var(--tt-azul); background-repeat: repeat-x; background-position: center;
  background-size: 24px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='22' viewBox='0 0 24 22'%3E%3Cpath d='M0 19H24M20 19V3H4V15H16V7H8V11H12' fill='none' stroke='%23d4af5a' stroke-width='1.6' stroke-linecap='square'/%3E%3C/svg%3E"); }

/* ── I. Capa ─────────────────────────────────────────────────────────── */
.tt-capa { position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #f6eedb;
  padding: 2.8rem 1.5rem 3.6rem;
  background:
    radial-gradient(50% 55% at 50% 30%, rgba(237, 217, 138, .14), transparent 70%),
    radial-gradient(120% 90% at 50% 0%, #22345c, var(--tt-azul) 72%); }
.tt-capa::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .06;
  background: repeating-linear-gradient(90deg, #d4af5a 0 1px, transparent 1px 64px), repeating-linear-gradient(0deg, #d4af5a 0 1px, transparent 1px 64px); }
.tt-trilha { margin: 0 auto 2.2rem; font-family: "Cinzel", Georgia, serif; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(246, 238, 219, .62); }
.tt-trilha a { text-decoration: none; }
.tt-trilha a:hover { color: var(--tt-ouro-p); }
.tt-trilha span { margin: 0 .6rem; color: var(--tt-ouro); }
.tt-armas { width: clamp(84px, 10vw, 118px); margin: 0 auto 1.5rem; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .5)); }
.tt-rot { display: block; margin: 0 auto .9rem; font-family: "Cinzel", Georgia, serif; font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--tt-ouro-c); }
.tt-capa h1 { max-width: 34ch; margin: 0 auto; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.12; color: #fbf4e2; text-wrap: balance; }

/* As duas Altas Partes, frente a frente, unidas pela coroa de louro. */
.tt-frente { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.4rem; max-width: 760px; margin: 2.2rem auto 0; }
.tt-frente__parte { margin: 0; text-wrap: balance; font-family: "Cinzel", Georgia, serif; font-size: .82rem; letter-spacing: .2em; line-height: 1.7; text-transform: uppercase; color: #f6eedb; }
.tt-frente__parte:first-child { text-align: right; }
.tt-frente__parte:last-child { text-align: left; }
.tt-frente__louro { width: 84px; height: 84px; color: var(--tt-ouro-c); }
.tt-capa__data { margin: 1.8rem auto 0; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.12rem; color: var(--tt-ouro-p); }
.tt-ler { display: inline-block; margin: 1.8rem auto 0; padding: .7rem 1.5rem; border: 1px solid rgba(212, 175, 90, .6); font-family: "Cinzel", Georgia, serif; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; text-decoration: none; color: var(--tt-ouro-p); transition: background .3s, color .3s; }
.tt-ler:hover { background: var(--tt-ouro-c); color: var(--tt-azul); }

/* ── II. A mesa verde da conferência ─────────────────────────────────── */
.tt-mesa { position: relative; padding: 3.6rem 1.25rem 3rem;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 255, 255, .06), transparent 70%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, var(--tt-verde), var(--tt-verde-2)); }

/* O instrumento: velino, filete azul, fio de ouro e a grega em cima e embaixo. */
.tt-instrumento { position: relative; max-width: 880px; margin: 0 auto; padding: 0 0 3rem;
  background:
    radial-gradient(120% 70% at 50% 0%, #fdf8ec 0%, var(--tt-papel) 55%, var(--tt-papel-2) 100%);
  border: 2px solid var(--tt-azul);
  box-shadow: 0 0 0 6px var(--tt-papel), 0 0 0 7px var(--tt-ouro), 0 30px 60px rgba(0, 0, 0, .45), 0 6px 14px rgba(0, 0, 0, .3); }
.tt-instrumento::before { content: ""; position: absolute; inset: 34px 12px 12px; border: 1px solid rgba(184, 150, 46, .55); pointer-events: none; }
.tt-instrumento::after { content: ""; position: absolute; left: 50%; top: 52%; width: min(440px, 70%); aspect-ratio: 337 / 420; transform: translate(-50%, -50%);
  background: url("/img/cartas/brasao-imperial.webp") center / contain no-repeat; opacity: .045; pointer-events: none; }
.tt-instrumento > .tt-grega:first-child { margin-bottom: 2.6rem; }
.tt-corpo { position: relative; z-index: 1; padding: 0 clamp(1.6rem, 6vw, 4.2rem); }

.tt-registro { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.6rem; margin: 0 auto 2.4rem; }
.tt-registro__ref, .tt-registro__tipo { font-family: "Cinzel", Georgia, serif; font-size: .6rem; letter-spacing: .16em; line-height: 1.9; text-transform: uppercase; color: var(--tt-suave); }
.tt-registro__ref { text-align: left; }
.tt-registro__tipo { text-align: right; }
.tt-registro__ref strong { display: block; margin-bottom: .2rem; font-weight: 600; color: var(--tt-ouro); letter-spacing: .26em; }
.tt-registro img { width: 64px; }

.tt-titulo { max-width: 28ch; margin: 0 auto; text-align: center; font-family: "Cinzel", Georgia, serif; font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.35; letter-spacing: .04em; color: var(--tt-azul); text-wrap: balance; }
.tt-latim { max-width: 40ch; margin: .9rem auto 0; text-align: center; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.18rem; line-height: 1.4; color: var(--tt-suave); text-wrap: balance; }

.tt-divisor { width: 240px; max-width: 70%; height: 18px; margin: 2.2rem auto; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 18'%3E%3Cg fill='none' stroke='%23b8962e' stroke-width='1'%3E%3Cpath d='M0 9H96M144 9H240'/%3E%3Cpath d='M120 1L128 9L120 17L112 9Z' fill='%23b8962e' fill-opacity='.18'/%3E%3Cpath d='M120 5L124 9L120 13L116 9Z' fill='%23b8962e'/%3E%3C/g%3E%3Cg fill='%23b8962e'%3E%3Ccircle cx='103' cy='9' r='2'/%3E%3Ccircle cx='137' cy='9' r='2'/%3E%3Ccircle cx='90' cy='9' r='1.2'/%3E%3Ccircle cx='150' cy='9' r='1.2'/%3E%3C/g%3E%3C/svg%3E"); }

.tt-prosa p, .tt-art p { margin: 0; font-size: 1.12rem; line-height: 1.82; text-align: justify; hyphens: auto; -webkit-hyphens: auto; color: var(--tt-tinta); }
.tt-prosa p + p, .tt-art p + p { margin-top: .85rem; }
/* Cada cláusula do preâmbulo (Fazemos, Animados, Reconhecendo…) abre em capitais, com a inicial maior em ouro. */
.tt-abre { font-family: "Cinzel", Georgia, serif; font-weight: 600; font-size: .92em; letter-spacing: .1em; text-transform: uppercase; color: var(--tt-azul); }
.tt-abre__ini { font-size: 1.55em; line-height: 0; color: var(--tt-ouro); }

.tt-cab { display: flex; align-items: center; gap: 1rem; margin: 0 auto 1.6rem; font-family: "Cinzel", Georgia, serif; font-size: .7rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--tt-ouro); }
.tt-cab::before, .tt-cab::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(184, 150, 46, .7)); }
.tt-cab::after { background: linear-gradient(90deg, rgba(184, 150, 46, .7), transparent); }

/* As partes, lado a lado, separadas por dois anéis entrelaçados. */
.tt-partes { margin: 2.4rem auto; }
.tt-partes__lista { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 3.4rem; }
.tt-partes__lista::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: linear-gradient(transparent, rgba(184, 150, 46, .55) 20%, rgba(184, 150, 46, .55) 80%, transparent); }
.tt-partes__lista::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 22px; transform: translate(-50%, -50%); background: var(--tt-papel) center / 30px 18px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Cg fill='none' stroke='%23b8962e' stroke-width='1.6'%3E%3Ccircle cx='10' cy='9' r='7'/%3E%3Ccircle cx='20' cy='9' r='7'/%3E%3C/g%3E%3C/svg%3E"); }
.tt-parte .tt-parte__rot { margin: 0 0 .5rem; font-family: "Cinzel", Georgia, serif; font-size: .64rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--tt-ouro); }
.tt-parte__texto { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.14rem; line-height: 1.55; color: var(--tt-tinta); text-align: left; }

/* Os artigos. */
.tt-artigos { margin: 0 auto; padding: 0; list-style: none; }
.tt-art { margin: 0 auto; padding: 1.9rem 0 0; }
.tt-art + .tt-art { margin-top: 1.5rem; }
.tt-art__cab { margin: 0 auto 1rem; text-align: center; }
.tt-art__num { display: inline-flex; align-items: center; gap: .8rem; font-family: "Cinzel", Georgia, serif; font-size: .68rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--tt-ouro); }
.tt-art__num::before, .tt-art__num::after { content: ""; width: 28px; height: 1px; background: var(--tt-ouro); opacity: .7; }
.tt-art h3 { max-width: 34ch; margin: .45rem auto 0; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-style: italic; font-size: 1.42rem; line-height: 1.25; color: var(--tt-azul); text-wrap: balance; }

/* Fecho, data e firmas. */
.tt-fecho { max-width: 40em; margin: 0 auto; text-align: center; }
.tt-fecho p { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.24rem; line-height: 1.6; color: var(--tt-tinta); text-wrap: pretty; }
.tt-data { max-width: 46em; margin: 1.8rem auto 0; text-align: center; font-family: "Cinzel", Georgia, serif; font-size: .74rem; letter-spacing: .14em; line-height: 2; text-transform: uppercase; color: var(--tt-suave); }

.tt-firmas { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.4rem 2.8rem; margin: 3rem auto 0; }
.tt-firma { flex: 0 1 300px; min-width: 0; text-align: center; }
.tt-firma__manuscrita { display: flex; align-items: flex-end; justify-content: center; min-height: 3.6rem; margin: 0 auto; padding: 0 .4rem .2rem;
  border-bottom: 1px solid rgba(43, 31, 20, .7); font-family: "Pinyon Script", "Cormorant Garamond", cursive; font-size: 1.75rem; line-height: 1.15; color: #1d2c55; text-wrap: balance; }
.tt-firma__nome { margin: .8rem auto .25rem; font-family: "Cinzel", Georgia, serif; font-size: .86rem; font-weight: 600; letter-spacing: .06em; line-height: 1.4; color: var(--tt-azul); }
.tt-firma__titulo { margin: 0 auto; font-family: "Cinzel", Georgia, serif; font-size: .58rem; letter-spacing: .15em; line-height: 1.8; text-transform: uppercase; color: var(--tt-suave); }

/* Os selos de cera de cada Estado, presos pelo mesmo cordão de seda. */
.tt-selos { position: relative; display: flex; justify-content: center; gap: clamp(3rem, 14vw, 9rem); margin: 3rem auto 0; padding-top: .4rem; }
.tt-selos::before { content: ""; position: absolute; top: 46px; left: 50%; width: min(78%, 520px); height: 6px; transform: translateX(-50%); border-radius: 3px;
  background: repeating-linear-gradient(115deg, var(--tt-azul-2) 0 5px, var(--tt-ouro-c) 5px 8px, var(--tt-azul) 8px 13px, var(--tt-ouro) 13px 16px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .25); }
.tt-selo { position: relative; z-index: 1; width: 132px; text-align: center; }
.tt-selo__cera { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto;
  border-radius: 49% 51% 47% 53% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 35% 30%, #c94a4f, var(--tt-cera) 45%, #4e0c12 100%);
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .12), inset 2px 3px 6px rgba(255, 255, 255, .25), inset -3px -4px 8px rgba(0, 0, 0, .45), 0 6px 12px rgba(0, 0, 0, .35); }
.tt-selo:nth-child(2) .tt-selo__cera { background: radial-gradient(circle at 35% 30%, #4f8a73, var(--tt-cera-2) 45%, #0b2219 100%); }
.tt-selo__cera::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .3); box-shadow: 0 1px 0 rgba(255, 255, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .12); }
.tt-selo__cera span { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .08em; color: rgba(0, 0, 0, .42); text-shadow: 0 1px 0 rgba(255, 255, 255, .22); }
.tt-selo__rot { margin: .8rem auto 0; font-family: "Cinzel", Georgia, serif; font-size: .56rem; letter-spacing: .16em; line-height: 1.7; text-transform: uppercase; color: var(--tt-suave); }

.tt-instrumento > .tt-grega:last-child { position: absolute; left: 0; right: 0; bottom: 0; }

/* ── III. Registro e retorno ─────────────────────────────────────────── */
.tt-nota { max-width: 760px; margin: 2.4rem auto 0; text-align: center; font-family: "Cinzel", Georgia, serif; font-size: .62rem; letter-spacing: .16em; line-height: 2; text-transform: uppercase; color: rgba(246, 238, 219, .66); }
.tt-volta { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem 2rem; margin: 1.6rem auto 0; }
.tt-volta a { font-family: "Cinzel", Georgia, serif; font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; color: var(--tt-ouro-p); border-bottom: 1px solid rgba(212, 175, 90, .4); padding-bottom: .2rem; }
.tt-volta a:hover { color: #fff; border-color: var(--tt-ouro-p); }

/* ── Telas estreitas ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .tt-frente { grid-template-columns: 1fr; gap: .6rem; }
  .tt-frente__parte:first-child, .tt-frente__parte:last-child { text-align: center; }
  .tt-frente__louro { margin: 0 auto; width: 66px; height: 66px; }
  .tt-registro { grid-template-columns: 1fr; gap: 1rem; text-align: center; }
  .tt-registro img { order: -1; }
  .tt-registro__ref, .tt-registro__tipo { text-align: center; }
  .tt-partes__lista { grid-template-columns: 1fr; gap: 0; }
  .tt-partes__lista::before, .tt-partes__lista::after { content: none; }
  .tt-parte + .tt-parte::before { content: ""; display: block; height: 22px; margin: 1.6rem auto;
    background: center / 30px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18'%3E%3Cg fill='none' stroke='%23b8962e' stroke-width='1.6'%3E%3Ccircle cx='10' cy='9' r='7'/%3E%3Ccircle cx='20' cy='9' r='7'/%3E%3C/g%3E%3C/svg%3E"),
      linear-gradient(90deg, transparent 10%, rgba(184, 150, 46, .55) 30%, transparent 42%, transparent 58%, rgba(184, 150, 46, .55) 70%, transparent 90%) center / 100% 1px no-repeat; }
  .tt-parte .tt-parte__rot, .tt-parte__texto { text-align: center; }
}
@media (max-width: 640px) {
  .tt-capa { padding: 2.2rem 1.1rem 2.8rem; }
  .tt-mesa { padding: 2.2rem .75rem 2.4rem; }
  .tt-instrumento { box-shadow: 0 0 0 4px var(--tt-papel), 0 0 0 5px var(--tt-ouro), 0 18px 36px rgba(0, 0, 0, .45); padding-bottom: 2.6rem; }
  .tt-instrumento::before { inset: 30px 7px 7px; }
  .tt-instrumento > .tt-grega:first-child { margin-bottom: 2rem; }
  .tt-corpo { padding: 0 1.45rem; }
  .tt-prosa p, .tt-art p { font-size: 1.05rem; line-height: 1.75; }
  .tt-art h3 { font-size: 1.26rem; }
  .tt-fecho p { font-size: 1.12rem; }
  .tt-selos { gap: 1.6rem; }
  .tt-selos::before { top: 38px; }
  .tt-selo { width: 118px; }
  .tt-selo__cera { width: 80px; height: 80px; }
  .tt-selo__cera::before { inset: 11px; }
}
