/* Declarações conjuntas das Coroas: o instrumento em que várias Casas Soberanas falam a uma só voz.
   Distinta da nota da Chancelaria (nota.css), dos tratados (tratado.css) e das proclamações (proclamacao.css):
   um pórtico azul-noite com as grandes armas de todas as Coroas signatárias, a anfitriã ao centro;
   uma folha de velino com moldura dupla em ouro; seções em numerais romanos à margem; e, ao fim,
   a subscrição de cada Coroa sob as suas armas. Cada declaração é um documento do CMS com um bloco
   html-bruto em <main class="dw">. Nenhum ornamento é caractere de texto: tudo é desenho (CSS). */

.dw { --dw-noite: #0d1529; --dw-noite-2: #18254a; --dw-velino: #fbf7ee; --dw-velino-2: #f2ead8; --dw-tinta: #221d17;
  --dw-suave: #6a5c48; --dw-ouro: #b08d3e; --dw-ouro-c: #dcc07a; --dw-rubro: #7c1d22; --dw-azul: #14213d; --dw-linha: #d9ccb0;
  background: linear-gradient(180deg, var(--dw-noite) 0, var(--dw-noite) 34rem, #e7e0d1 34rem, #ddd4c1 100%);
  color: var(--dw-tinta); font-family: "EB Garamond", Georgia, serif; overflow-x: clip; padding-bottom: 4rem; }
.dw *, .dw *::before, .dw *::after { box-sizing: border-box; }
.dw img { display: block; max-width: 100%; height: auto; }
.dw a { color: inherit; }

/* ── Pórtico com as armas ────────────────────────────────────────────── */
.dw-portico { position: relative; isolation: isolate; text-align: center; color: #f4ecd8; padding: 1.6rem 1.25rem 3rem;
  background:
    radial-gradient(60% 70% at 50% 38%, rgba(220, 192, 122, .16), transparent 70%),
    radial-gradient(120% 90% at 50% 0%, var(--dw-noite-2), var(--dw-noite) 72%); }
.dw-portico::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .06;
  background: repeating-linear-gradient(45deg, var(--dw-ouro-c) 0 1px, transparent 1px 26px), repeating-linear-gradient(-45deg, var(--dw-ouro-c) 0 1px, transparent 1px 26px); }
.dw-portico::after { content: ""; position: absolute; inset: 14px; z-index: -1; pointer-events: none;
  border: 1px solid rgba(220, 192, 122, .3); box-shadow: 0 0 0 5px rgba(220, 192, 122, .05), 0 0 0 6px rgba(220, 192, 122, .18); }
.dw-trilha, .dw-volta { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .9rem; max-width: 980px; margin: 0 auto;
  font-family: "Cinzel", Georgia, serif; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; }
.dw-trilha { margin-bottom: 2rem; color: rgba(244, 236, 216, .6); }
.dw-trilha a, .dw-volta a { text-decoration: none; }
.dw-trilha a:hover { color: var(--dw-ouro-c); }
.dw-trilha span { opacity: .5; }
.dw-volta { margin-top: 2.4rem; gap: .6rem 2rem; color: var(--dw-suave); }
.dw-volta a:hover { color: var(--dw-rubro); }


/* As cinco Coroas num pentágono, todas do mesmo tamanho: nenhuma precede as outras. O título ocupa o centro. */
.dw-pentagono { position: relative; width: min(100%, 50rem); aspect-ratio: 1 / .9; margin: 0 auto 1.2rem; }
.dw-armas { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.dw-armas li { position: absolute; left: var(--x); top: var(--y); width: 19%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; }
.dw-armas img { width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.dw-armas span { display: block; margin-top: .55rem; font-family: "Cinzel", Georgia, serif; font-size: clamp(.42rem, 1.1vw, .56rem); letter-spacing: .14em; line-height: 1.45;
  text-transform: uppercase; color: rgba(244, 236, 216, .72); }
.dw-centro { position: absolute; left: 50%; top: 52%; width: 56%; transform: translate(-50%, -50%); }
.dw-sobre { margin: 0 auto; font-family: "Cinzel", Georgia, serif; font-size: clamp(.5rem, 1.3vw, .7rem); line-height: 1.7; letter-spacing: .3em; text-transform: uppercase; color: var(--dw-ouro-c); }
.dw-titulo { margin: .7rem auto .3rem; font-family: "Cinzel Decorative", "Cinzel", Georgia, serif; font-weight: 700; line-height: 1;
  font-size: clamp(1.45rem, 5.6vw, 3.6rem); letter-spacing: .04em; color: #fbf3df; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.dw-titulo small { display: block; margin-bottom: .45rem; font-family: "Cinzel", Georgia, serif; font-weight: 600; font-size: .3em; letter-spacing: .5em; color: var(--dw-ouro-c); }
.dw-regua { width: min(26rem, 80%); height: 9px; margin: 1.1rem auto; background:
  linear-gradient(180deg, transparent 0 1px, rgba(220, 192, 122, .55) 1px 2px, transparent 2px 4px, var(--dw-ouro-c) 4px 5px, transparent 5px 7px, rgba(220, 192, 122, .55) 7px 8px, transparent 8px); }
.dw-coroas { max-width: 44rem; margin: 0 auto; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.22rem; line-height: 1.5; color: rgba(244, 236, 216, .86); }
.dw-data { margin: 1rem auto 0; font-family: "Cinzel", Georgia, serif; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(244, 236, 216, .6); }

/* ── A folha ─────────────────────────────────────────────────────────── */
.dw-folha { position: relative; isolation: isolate; max-width: 900px; margin: -1.4rem auto 0; padding: 3.2rem clamp(1.4rem, 7vw, 5.2rem) 2.6rem;
  background:
    radial-gradient(90% 40% at 50% 0%, #fffdf6, transparent 70%),
    linear-gradient(180deg, var(--dw-velino), var(--dw-velino-2));
  box-shadow: 0 30px 60px -24px rgba(13, 21, 41, .55), 0 6px 16px -6px rgba(13, 21, 41, .35); }
.dw-folha::before { content: ""; position: absolute; inset: 12px; z-index: -1; pointer-events: none;
  border: 1px solid var(--dw-ouro); outline: 1px solid rgba(176, 141, 62, .45); outline-offset: 4px; }
.dw-folha::after { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: .045;
  background: url("/img/cartas/brasao-imperial.webp") center 40% / min(44%, 330px) auto no-repeat; filter: grayscale(1); }

.dw-ref { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem 2rem; margin: 0 0 2rem; font-size: .95rem; color: var(--dw-suave); }
.dw-ref p { margin: 0; line-height: 1.55; }
.dw-ref__data { text-align: right; }
.dw-tipo { display: inline-block; margin-bottom: .35rem; padding: .2rem .65rem .16rem; border: 1px solid var(--dw-rubro); color: var(--dw-rubro);
  font-family: "Cinzel", Georgia, serif; font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.dw-ref strong { font-family: "Cinzel", Georgia, serif; font-size: .78rem; font-weight: 600; letter-spacing: .14em; color: var(--dw-tinta); }
.dw-dest { margin: 0 0 .5rem; font-size: 1.06rem; }
.dw-dest span, .dw-assunto span { font-family: "Cinzel", Georgia, serif; font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dw-suave); margin-right: .6rem; }
.dw-assunto { margin: 0 0 2rem; padding-bottom: 1.4rem; border-bottom: 3px double var(--dw-linha); font-size: 1.08rem; font-weight: 600; line-height: 1.5; color: var(--dw-azul); }

.dw-texto { font-size: 1.13rem; line-height: 1.8; text-align: justify; hyphens: auto; }
.dw-texto p { margin: 0 0 1rem; }
.dw-abertura::first-letter { float: left; margin: .32rem .55rem 0 0; font-family: "Cinzel Decorative", "Cinzel", Georgia, serif; font-weight: 700; font-size: 4rem; line-height: .78; color: var(--dw-rubro); }
.dw-secao { position: relative; margin: 2rem 0 0; }
.dw-secao h3 { display: flex; align-items: baseline; gap: .9rem; margin: 0 0 .7rem; font-family: "Cinzel", Georgia, serif; font-size: .8rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dw-azul); }
.dw-secao h3 b { flex: 0 0 auto; min-width: 2.4rem; font-size: 1.25rem; letter-spacing: .08em; color: var(--dw-rubro); }
.dw-secao h3::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--dw-linha); align-self: center; }
.dw-alineas { list-style: none; margin: .4rem 0 1.2rem; padding: 0; counter-reset: dw; }
.dw-alineas li { position: relative; counter-increment: dw; margin: 0 0 .55rem; padding-left: 2.3rem; }
.dw-alineas li::before { content: counter(dw, lower-alpha) ")"; position: absolute; left: .2rem; top: 0; font-family: "Cinzel", Georgia, serif; font-weight: 600; color: var(--dw-rubro); }
.dw-cortesia { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--dw-linha); }
.dw-datacao { margin: 1.8rem 0 0; text-align: center; font-style: italic; color: var(--dw-suave); }

/* ── Subscrição das Coroas ───────────────────────────────────────────── */
/* As assinaturas têm todas o mesmo corpo de letra (altura própria de cada uma, inline); a da Coroa
   anfitriã, a mais longa, abre a subscrição numa linha só sua. */
.dw-subscricao { margin-top: 2.8rem; padding-top: 2rem; border-top: 3px double var(--dw-linha); }
/* Subscrição também em pentágono: as assinaturas nos vértices, a legenda ao centro. */
.dw-firmas { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 1.6rem 0; align-items: start; }
.dw-firma { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.dw-firma--top { grid-column: 8 / 14; grid-row: 1; }
.dw-firma--esq { grid-column: 1 / 7; grid-row: 2; }
.dw-firma--dir { grid-column: 15 / 21; grid-row: 2; }
.dw-firma--inf-esq { grid-column: 4 / 10; grid-row: 3; }
.dw-firma--inf-dir { grid-column: 12 / 18; grid-row: 3; }
.dw-firmas__centro { grid-column: 8 / 14; grid-row: 2; align-self: center; margin: 0; text-align: center; font-family: "Cinzel", Georgia, serif;
  font-size: .66rem; font-weight: 600; letter-spacing: .3em; line-height: 1.9; text-transform: uppercase; color: var(--dw-suave); }
.dw-firmas__centro::before, .dw-firmas__centro::after { content: ""; display: block; width: 3.5rem; height: 1px; margin: .7rem auto; background: var(--dw-ouro); }
.dw-firma > img { height: 4.6rem; width: auto; max-width: 7.5rem; object-fit: contain; margin-bottom: .6rem; filter: drop-shadow(0 3px 4px rgba(40, 30, 10, .2)); }
.dw-firma__por { margin: 0 0 .3rem; font-family: "Cinzel", Georgia, serif; font-size: .56rem; letter-spacing: .16em; line-height: 1.5; text-transform: uppercase; color: var(--dw-suave); min-height: 1.7rem; }
.dw-firma__traco { align-self: stretch; height: 4.9rem; display: flex; align-items: flex-end; justify-content: center; color: #1d2c55; border-bottom: 1px solid var(--dw-tinta); }
.dw-firma__traco svg { display: block; height: 3.5rem; width: auto; flex: 0 0 auto; max-width: 100%; margin-bottom: -.35rem; overflow: visible; }
.dw-firma__nome { margin: .55rem 0 0; font-family: "Cinzel", Georgia, serif; font-size: .78rem; font-weight: 600; letter-spacing: .06em; }
.dw-firma__titulo { margin: .12rem 0 0; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1rem; line-height: 1.3; color: var(--dw-suave); }

.dw-rodape { display: flex; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; margin-top: 2.6rem; padding-top: .9rem;
  border-top: 1px solid var(--dw-linha); font-family: "Cinzel", Georgia, serif; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dw-suave); }

/* ── Contexto ────────────────────────────────────────────────────────── */
.dw-contexto { max-width: 900px; margin: 2.6rem auto 0; padding: 0 1.25rem; font-size: 1.06rem; line-height: 1.7; color: var(--dw-tinta); }
.dw-contexto h2 { margin: .2rem 0 .7rem; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 1.9rem; color: var(--dw-azul); }
.dw-contexto p { margin: 0 0 .9rem; }
.dw-contexto a { color: var(--dw-rubro); }
.dw-rot { font-family: "Cinzel", Georgia, serif; font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--dw-ouro); }
.dw-vinculos { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding: 0; list-style: none; font-family: "Cinzel", Georgia, serif; font-size: .7rem; letter-spacing: .08em; }

@media (max-width: 720px) {
  .dw { background: linear-gradient(180deg, var(--dw-noite) 0, var(--dw-noite) 44rem, #e7e0d1 44rem, #ddd4c1 100%); }
  .dw-portico { padding: 1.2rem .9rem 2.6rem; }
  .dw-pentagono { width: 100%; aspect-ratio: 1 / 1.02; }
  .dw-armas li { width: 22%; }
  .dw-centro { width: 52%; top: 53%; }
  .dw-firmas { display: flex; flex-direction: column; align-items: center; gap: 2.4rem; }
  .dw-firmas__centro { order: -1; }
  .dw-firma { width: 100%; max-width: 17rem; }
  .dw-coroas { font-size: 1.08rem; }
  .dw-folha { margin: -1rem .5rem 0; padding: 2.4rem 1.3rem 2rem; }
  .dw-folha::before { inset: 7px; outline-offset: 3px; }
  .dw-ref { flex-direction: column; }
  .dw-ref__data { text-align: left; }
  .dw-texto { font-size: 1.05rem; text-align: left; }
  .dw-secao h3 b { min-width: 1.8rem; font-size: 1.05rem; }
  .dw-alineas li { padding-left: 1.9rem; }
}
