:root {
  --ink: #302063;
  --green: #6230a7;
  --paper: #fffaf2;
  --muted: #514372;
  --line: #e4cafa;
}
header { background: #f2e3ff; border-bottom-color: #dfc0ff; }
.brand .flower { color: #a51668; }
nav a:hover, .languages a:hover { text-decoration: underline; }
.hero h1 { color: #522a9d; }
.hero img { border: 7px solid #fff; box-shadow: 0 0 0 3px #f6ad27; }
.hero figure::after { color: #bd2475; }
.hero .secondary { background: #ffe171; border-color: #ffe171; color: var(--ink); }
button:hover, .button:hover { text-decoration: underline; }
:focus-visible { outline-color: #912eaa; }
.stories {
  background-color: #fff0bd;
  background-image: repeating-linear-gradient(0deg, transparent 0 21px, #f6b9cc44 21px 42px),
    repeating-linear-gradient(90deg, transparent 0 21px, #f6b9cc44 21px 42px);
}
.stories .intro { background: #fff8da; padding: clamp(16px, 3vw, 30px); border-radius: 24px; }
#nascimento, .baptism-story, .small { border-top: 7px solid; }
#nascimento { background: #ffdaec; border-color: #e7488f; }
#nascimento .label { color: #842354; }
#nascimento .quote { border-color: #ba2c6d; }
.baptism-story { background: #c9f3ff; border-color: #21a8cf; }
.small { background: #fff09e; border-color: #e3a113; }
.small .label { color: #663784; }
.small.temple { background: #e5d3ff; border-color: #a268e8; }
.tree .person { background: #f0e1ff; }
.tree .person:nth-child(2n) { background: #d0f6e9; border-color: #99dec8; }
.tree .person:nth-child(3n) { background: #ffe1f0; border-color: #f1b2d3; }
.research { background: #d8f7ee; }
.research-links a { border-color: #a5e0cc; }
footer { background: #f2e3ff; }
dialog::backdrop { background: #44217e99; }
input, textarea { border-color: #8b71ad; }

.research-shelves {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  margin-top: 26px;
}
.research-shelf {
  padding: clamp(16px, 3vw, 27px);
  border-radius: 27px;
  background: #ffeb9d;
}
.research-shelf:nth-child(2) { background: #e8d8ff; }
.research-shelf:nth-child(3) { grid-column: 1 / -1; background: #bdeceb; }
.research-shelf h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.research-shelf .research-links {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  margin-top: 16px;
}
.research-shelf .research-links a {
  background: #fffdf7;
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #7653a326;
  padding: 9px 9px 16px;
}
.research-shelf img {
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 10px;
  margin-bottom: 12px;
}
.research-shelf strong, .research-shelf span { margin-inline: 7px; }
.research-shelf .research-links a:hover { border-color: #7a48bb; }

@media (max-width: 740px) {
  .research-shelves { grid-template-columns: 1fr; }
}

.welcome-video { padding: 0 0 clamp(26px, 4vw, 50px); }
.welcome-video > summary { width: fit-content; min-height: 52px; list-style: none; }
.welcome-video > summary::-webkit-details-marker { display: none; }
.welcome-video > summary:hover { text-decoration: underline; }
.welcome-video video {
  display: block;
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  margin-top: 16px;
  border-radius: 18px;
  background: var(--ink);
}

.research-shelf > summary {
  cursor: pointer;
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 700;
}
.research-shelf > summary img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}
.research-shelf > summary:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.research-shelf.research-feature {
  grid-column: 1 / -1;
  border: 3px solid #8b4db0;
  background: #ffe3f0;
}
.research-shelf.research-feature:last-child {
  background: #e8dcff;
}
.research-feature > summary {
  font-size: clamp(1.5rem, 3vw, 2rem);
  min-height: 48px;
}
.research-feature .research-links a { padding: 18px; }
.research-feature .research-links strong,
.research-feature .research-links span { margin-inline: 0; }
.affiliate-state {
  background: #fff;
  padding: 18px 22px;
  border-left: 5px solid #71439b;
  border-radius: 8px;
  max-width: 85ch;
  font-size: 1rem;
}
.nexo-ethics { max-width: 85ch; margin-bottom: 22px; }
.nexo-ethics summary, .dna-care summary {
  min-height: 48px;
  padding-block: 10px;
  font-weight: 700;
}
.nexo-ethics li, .dna-care li { margin-bottom: 12px; }

.field-hint {
  display: block;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--muted);
}

.hero .welcome-caption { font-size: 1rem; margin-top: 16px; max-width: 40ch; }
.family-start { margin-bottom: 44px; }
.family-start > details { background: #e8dcff; padding: 24px; border-radius: 24px; }
.family-start > details > summary { font-size: 1.3rem; min-height: 48px; }
.family-start h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-block: 24px 16px; }
#family-start-form { max-width: 720px; }
#family-name { margin-top: 8px; }
#family-next[hidden] { display: none; }
.family-choices { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
#family-download { margin-top: 10px; }

.story-title-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .16em;
}
.story-title-link:hover { color: #6230a7; }

#historias[hidden], #arvore[hidden], .own-family[hidden] { display: none !important; }
.own-family { padding-block: 32px 50px; }
.own-family > h2 { font-size: clamp(2rem, 4vw, 3rem); }
#family-person-form { display: grid; gap: 12px; max-width: 720px; margin-block: 24px; }
#family-person-form button { justify-self: start; }
#family-people > details { background: #e9f5ee; border: 2px solid #6f9b86; padding: 20px; border-radius: 18px; margin-block: 18px; }
#family-people summary { font-size: 1.4rem; min-height: 48px; }
.personal-memory { white-space: pre-wrap; overflow-wrap: anywhere; }
.family-file-label { align-self: center; }
#open-family-file { max-width: 420px; align-self: center; }

.filmoteca{padding-block:2rem}.filmoteca article{margin-block:1.5rem;padding:1.25rem;border:2px solid #a77ad1;border-radius:1rem}.filmoteca .button{margin:.35rem .5rem .35rem 0}

#family-stories{padding-block:1rem}#family-story-list details{margin-block:1rem;padding:1rem;border:2px solid #a77ad1;border-radius:1rem}

.stories .small.temple{display:block;padding:22px}.stories .small.temple img{width:100%;aspect-ratio:1.6;object-fit:cover;object-position:center;display:block}
.reading-simple .stories .small.temple img{display:none}
.family-tree-diagram{display:flex;flex-direction:column;align-items:center;gap:0;margin-block:28px}.family-tree-diagram>.person{min-width:200px;text-align:center}.missing-generation{max-width:390px;text-align:center;border-inline:2px dashed #9470b5;padding:22px 18px;margin-block:10px;font-weight:700}.missing-generation p{font-size:1rem;font-weight:400;margin-bottom:0}.tree-descendants{display:flex;gap:24px;justify-content:center;border-top:3px solid #9d75bc;padding-top:18px;width:min(100%,560px)}.tree-descendants .person{flex:1;text-align:center}.reading-simple .family-tree-diagram{display:block}.reading-simple .tree-descendants{display:block}.reading-simple .family-tree-diagram .person{display:block;margin-block:12px}@media(max-width:480px){.tree-descendants{gap:12px}.family-tree-diagram .person{padding:14px 10px}.missing-generation{max-width:100%}}
