/* Editorial pages: ivory paper, graphite typography, restrained gold detail.
   Scope deliberately excludes search forms, publisher pages and manifests. */
body.nc-editorial { background: #f4f1e9; }
body.nc-editorial main {
  color: #35332e;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
}
body.nc-editorial main :is(h1,h2,h3,h4) {
  color: #302f2b !important;
  font-family: "Playfair Display", Georgia, serif;
  text-shadow: none !important;
  text-align: left;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.3;
}
body.nc-editorial main :is(h1,h2,h3,h4,p,.subtitle,.page-subtitle)::first-letter {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-shadow: none !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}
body.nc-editorial main h1 { font-size: clamp(2.15rem,4.8vw,3.7rem); }
body.nc-editorial main h2 { font-size: clamp(1.5rem,2.5vw,2rem); }
body.nc-editorial main h3 { font-size: 1.25rem; }
body.nc-editorial main p { color: inherit; }
body.nc-editorial main a:not(.btn):not(.editorial-button) {
  color: #64502a;
  text-decoration-color: #bda571;
  text-underline-offset: .22em;
}
body.nc-editorial main a:focus-visible,
body.nc-editorial main summary:focus-visible {
  outline: 2px solid #8c6d31;
  outline-offset: 5px;
}
body.nc-editorial main .guide-kicker {
  color: #78623a;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
body.nc-editorial main :is(.hero,.hero-guide) {
  background: #faf8f2;
  border: 1px solid #d5c5a2;
  box-shadow: 0 16px 42px rgba(65,51,27,.06);
  color: #35332e;
}
body.nc-editorial main :is(.function-card,.guide-card) {
  background: linear-gradient(135deg,#fffdf8,#f8f4eb);
  border: 1px solid #cbb581;
  box-shadow: 0 12px 32px rgba(65,51,27,.06), inset 0 0 0 5px #fffdf8;
  border-radius: 16px;
}
body.nc-editorial main :is(.function-card,.guide-card) h2 { font-size: 1.45rem; }
body.nc-editorial main .engine-number { color: #897039; }
body.nc-editorial main .nc-callout {
  background: #eee8da;
  color: #35332e;
  border: 1px solid #cbb581;
  box-shadow: inset 0 0 0 6px #f7f3e9;
}
body.nc-editorial main .nc-actions a { background: #35332e; color: #fffdf6 !important; }
body.nc-editorial main :is(.btn,.editorial-button) {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  border: 1px solid #8d7747;
  background: #35332e;
  color: #fffdf6 !important;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 5px 15px rgba(44,38,27,.1);
}
body.nc-editorial main :is(.btn,.editorial-button):hover { background: #504735; }
/* Reading layout */
body.nc-editorial main.obituary-search-guide {
  max-width: 1120px;
  margin: 48px auto 72px;
  padding: 0 24px;
}
.editorial-hero {
  padding: clamp(28px,5vw,60px);
  border: 1px solid #cbb581;
  border-radius: 18px;
  background: radial-gradient(ellipse at top right,#f2e8d0 0,transparent 55%),#fffcf5;
  box-shadow: inset 0 0 0 7px #faf7ef,0 18px 45px rgba(67,51,26,.07);
}
.editorial-hero h1 { max-width: 880px; margin: 18px 0 24px; }
.editorial-lead { max-width: 760px; font-size: 1.2rem; margin: 0 0 28px; }
.article-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 24px 8px;
  margin: 8px 0 24px;
  border-bottom: 1px solid #d5c5a2;
  font-size: .92rem;
}
.obituary-search-guide .guide-article {
  max-width: 850px;
  margin: 0 auto;
  padding: clamp(24px,4vw,52px);
  border: 1px solid #ded4c0;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 16px 44px rgba(65,51,27,.04);
}
.obituary-search-guide .guide-article h2 { margin: 48px 0 18px; scroll-margin-top: 120px; }
.obituary-search-guide .guide-article h2:first-child { margin-top: 0; }
.obituary-search-guide .guide-article h3 { margin: 30px 0 12px; }
.obituary-search-guide .guide-article p { margin: 0 0 20px; }
.search-steps { padding-left: 25px; }
.search-steps li { padding-left: 5px; margin: 14px 0; }
.search-steps li::marker { color: #8b713a; font-weight: 700; }
.article-table-wrap { overflow-x: auto; margin: 28px 0; }
.article-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .94rem; }
.article-table caption { text-align: left; font-weight: 600; padding-bottom: 12px; }
.article-table th { background: #f0eadc; font-weight: 600; }
.article-table :is(th,td) { padding: 11px 14px; border-bottom: 1px solid #e1d7c3; }
.article-note {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 3px solid #b69a60;
  background: #f5f0e5;
  font-size: .97rem;
}
.search-faq details { border-bottom: 1px solid #ded4c0; padding: 18px 0; }
.search-faq summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.search-faq summary::marker { color: #8b713a; }
.obituary-search-guide .search-faq details p { margin: 15px 0 0; }
.guide-closing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 36px; }
.obituary-search-guide .article-back { margin: 32px 0 0; font-size: .9rem; }
body.nc-editorial main.faq-necro { max-width: 960px; }
body.nc-editorial .faq-item {
  padding: 28px;
  background: #fffdf8;
  border: 1px solid #d5c5a2;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(65,51,27,.045);
}
body.nc-editorial .faq-guide-entry { border-color: #bda16a; background: #faf5e9; }
@media (max-width:600px) {
  body.nc-editorial main.obituary-search-guide { margin-top: 24px; padding: 0 14px; }
  .editorial-hero { padding: 30px 23px; }
  .editorial-lead { font-size: 1.08rem; }
  .article-index { gap: 10px 18px; }
  .article-index strong { flex-basis: 100%; }
  .obituary-search-guide .guide-article { padding: 26px 20px; }
  .article-table :is(th,td) { padding: 10px 8px; }
  body.nc-editorial .faq-item { padding: 24px 20px; }
}
/* Restore permanent gold frames and slow border light on public cards.
   Decoration is masked to the border, never over text or photographs. */
.necrologio-card, .home-style .card-carved {
  border-color: #bfa16a;
  box-shadow: 0 16px 38px rgba(70,45,20,.12),inset 0 0 0 1px rgba(255,249,225,.85);
}
.necrologio-card::before, .home-style .card-carved::before {
  z-index: 2;
  border-color: rgba(184,138,53,.45);
  pointer-events: none;
}
.necrologio-card::after, .home-style .card-carved::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  background: transparent;
  box-shadow: none;
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .necrologio-card::after, .home-style .card-carved::after {
    background: conic-gradient(from var(--nc-frame-angle),transparent 0 55%,rgba(198,160,74,.3) 65%,#f8e3a2 74%,#ba903f 80%,transparent 91%);
    -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ncFrameLight 18s linear infinite;
  }
  .is-event-card::after { opacity: 1; animation-duration: 12s; }
}
@property --nc-frame-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes ncFrameLight { to { --nc-frame-angle: 360deg; } }
@media (hover:hover) {
  .necrologio-card:hover, .home-style .card-carved:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(70,45,20,.16),0 0 24px rgba(205,169,89,.14),inset 0 0 0 1px #f9e6b8;
  }
}
@media (prefers-reduced-motion:reduce) {
  .necrologio-card, .home-style .card-carved { transition: none; }
  .necrologio-card::after, .home-style .card-carved::after, .is-event-card::after { animation: none !important; }
  .necrologio-card:hover, .home-style .card-carved:hover { transform: none; }
}
/* Existing information pages share the same paper and reading rhythm. */
body.nc-editorial main.guide-page { max-width: 1080px; margin: 36px auto 64px; padding: 0 20px; }
body.nc-editorial main.guide-page .hero { padding: 36px 28px; border-radius: 16px; margin-bottom: 30px; }
body.nc-editorial main.guide-page .hero h1 { margin: 10px 0 18px; }
body.nc-editorial main.guide-page .guide-article {
  background: #fffdf8;
  padding: clamp(24px,4vw,48px) !important;
  border: 1px solid #ded4c0;
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(65,51,27,.04);
}
body.nc-editorial main.guide-page .guide-article h2 { margin-top: 34px; }
body.nc-editorial main.legal {
  width: calc(100% - 32px);
  max-width: 920px;
  box-sizing: border-box;
  margin: 40px auto 64px;
  padding: clamp(24px,4vw,48px);
  background: #fffdf8;
  border: 1px solid #cbb581;
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(65,51,27,.06);
}
body.nc-editorial main hr { border: 0; border-top: 1px solid #ded4c0; margin: 30px 0; }
/* Guide cards and controls: restrained motion, with keyboard/touch feedback. */
body.nc-editorial main .guide-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
body.nc-editorial main .guide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  body.nc-editorial main .guide-card::after {
    background: conic-gradient(from var(--nc-frame-angle),transparent 0 60%,#b89b60 73%,#f5dda0 80%,transparent 95%);
    -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ncFrameLight 20s linear infinite;
  }
  body.nc-editorial main .guide-card:nth-child(2n)::after { animation-delay: -7s; }
}
body.nc-editorial main :is(.editorial-button,.btn,.nc-actions a,button,.guide-category summary) {
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}
body.nc-editorial main .guide-category summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body.nc-editorial main .guide-category summary::after { content: "+"; color: #8c713b; font-size: 1.25rem; }
body.nc-editorial main .guide-category[open] summary::after { content: "−"; }
body.nc-editorial main .guide-category#uso-necrologi { border-color: #bda16a; scroll-margin-top: 110px; background: #fffaf0; }
body.nc-editorial main .guide-read-more { display: block; margin-top: 18px; font-size: .88rem; font-weight: 600; color: #78623a; }
@media (hover:hover) and (pointer:fine) {
  body.nc-editorial main .guide-card:hover {
    transform: translateY(-5px);
    border-color: #b59653;
    box-shadow: 0 18px 38px rgba(65,51,27,.13),0 0 18px rgba(194,162,89,.13);
  }
  body.nc-editorial main :is(.editorial-button,.btn,.nc-actions a,button):not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(65,51,27,.16),0 0 0 1px #c5a45f;
  }
  body.nc-editorial main .guide-category summary:hover { background: #f5efdf; }
}
body.nc-editorial main :is(.guide-card,.editorial-button,.btn,.nc-actions a,button,.guide-category summary):focus-visible {
  outline: 2px solid #947437;
  outline-offset: 4px;
}
body.nc-editorial main :is(.editorial-button,.btn,.nc-actions a,button):not(:disabled):active { transform: translateY(1px); box-shadow: inset 0 1px 4px rgba(0,0,0,.18); }
@media (prefers-reduced-motion:reduce) {
  body.nc-editorial main :is(.guide-card,.editorial-button,.btn,.nc-actions a,button,.guide-category summary) { transition: none; transform: none !important; }
  body.nc-editorial main .guide-card::after { animation: none; }
}
