/* Phase 3. Material treatments are isolated from readable text and the shared shell. */
.site-footer__mark { overflow-wrap: anywhere; }
.lexicon-main {
  --stone: #252522;
  --bronze: #79604a;
  background: radial-gradient(ellipse at 0 20%, #e8ddc806, transparent 65%);
}
.lexicon-main p { margin: 0; }
.lexicon-main :is(h2, h3) {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  text-transform: uppercase;
}
.lexicon-main h2 { font-size: clamp(32px, 4.5vw, 64px); }
.lexicon-main h3 { font-size: clamp(27px, 3vw, 42px); }
.lexicon-main .lex-meta,
.closing-ledger :is(dt, dd) {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1.8;
  text-transform: uppercase;
}
.lexicon-main .reflection {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.4;
}
.lexicon-heading { padding-bottom: clamp(36px, 5vw, 64px); }
.lexicon-heading > .lex-meta:first-child,
.section-heading > .lex-meta,
.vault-heading > .lex-meta { color: var(--feedback-blue); margin-bottom: 16px; }
.lexicon-intro { max-width: 65ch; margin-top: 28px !important; line-height: 1.8; font-size: 18px; }
.lexicon-main .archive-stamp {
  display: inline-block;
  margin-top: 28px;
  padding: 8px 14px;
  color: #e4a998;
  border: 1px solid var(--oxide-red);
}
.lex-section { padding-block: clamp(36px, 5vw, 72px); border-top: 1px solid var(--asphalt); }
.section-heading { margin-bottom: 32px; }
.section-heading .reflection { max-width: 50ch; margin-top: 22px; }

/* The same working inscription survives differently on each stone surface. */
.domain-plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.domain { min-width: 0; background: linear-gradient(120deg, #25252250, #101014); }
.domain-stone {
  height: clamp(170px, 21vw, 280px);
  background: url('../assets/glyph-wall.jpg') center / cover no-repeat;
  pointer-events: none;
  -webkit-mask-image: var(--erosion);
  mask-image: var(--erosion);
}
.domain--oshun .domain-stone {
  opacity: .4;
  filter: grayscale(.85) contrast(.65) brightness(1.4) blur(1.7px);
  --erosion: radial-gradient(ellipse at 44% 42%, #000 8%, #000b 27%, #0004 47%, transparent 69%);
}
.domain--shu .domain-stone {
  filter: grayscale(.72) contrast(1.25) brightness(1.18);
  --erosion: linear-gradient(176deg, transparent 1%, #000 2%, #000 96%, transparent 98%);
}
.domain--geb .domain-stone {
  opacity: .65;
  filter: grayscale(.8) contrast(.88) blur(.45px);
  --erosion: linear-gradient(112deg, transparent 3%, #000 5%, #000 25%, #0005 27%, #000 31%, #000 45%, #0003 49%, transparent 55%, #0007 63%, #000 72%, transparent 94%);
  clip-path: polygon(3% 4%, 24% 0, 28% 7%, 62% 2%, 77% 6%, 96% 0, 100% 37%, 95% 45%, 99% 83%, 83% 100%, 58% 95%, 48% 100%, 18% 95%, 0 100%, 4% 67%, 0 52%);
}
.domain--sekhmet .domain-stone {
  filter: saturate(.55) contrast(1.55) brightness(1.35);
  --erosion: linear-gradient(92deg, transparent, #000 1%, #000 99%, transparent);
}
.domain--shango { grid-column: 1 / -1; }
.domain--shango .domain-stone {
  height: clamp(130px, 15vw, 190px);
  opacity: .22;
  filter: grayscale(1) contrast(.7) brightness(1.3) blur(1px);
  --erosion: linear-gradient(104deg, transparent 8%, #0008 11%, transparent 14%, transparent 36%, #000 38%, transparent 42%, transparent 69%, #0009 71%, transparent 75%, transparent);
}
.domain-copy { padding: 22px 24px 28px; border-top: 1px solid #e8ddc83d; }
.domain-copy .lex-meta { color: #bfb7a8; margin-bottom: 10px; }
.domain-copy > p:last-child { margin-top: 16px; max-width: 60ch; line-height: 1.75; }

/* Only the name compartment has a scrim. The seal and status remain legible. */
.sealed-vault {
  position: relative;
  isolation: isolate;
  margin-block: 8px clamp(36px, 5vw, 72px);
  border: 1px solid #79604a;
  background: #24231f;
  box-shadow: inset 0 0 0 7px #101014, inset 0 0 0 8px #79604a66;
  scroll-margin-top: 100px;
}
.vault-stone {
  position: absolute;
  inset: 8px;
  z-index: -1;
  background: url('../assets/glyph-wall.jpg') center / cover;
  filter: grayscale(.9) brightness(.35);
  pointer-events: none;
}
.vault-heading { padding: clamp(24px, 4vw, 48px); background: #101014d9; }
.vault-heading > p:last-child { margin-top: 20px; max-width: 55ch; line-height: 1.8; }
.vault-band {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  min-height: 88px;
  border-block: 3px solid #8b7056;
  background: repeating-linear-gradient(3deg, #0000 0 5px, #0002 6px 7px), linear-gradient(#625140, #3b3028 45%, #584334 48%, #302821);
  box-shadow: 0 5px 0 #08090a88;
  pointer-events: none;
}
.vault-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 4px double #a98c6d;
  border-radius: 50%;
  color: #ceb494;
  background: #352a23;
  box-shadow: inset 2px 3px 5px #000a, 2px 3px 0 #161310;
  font: 16px var(--font-mono);
  transform: rotate(-9deg);
}
.vault-seal:nth-child(2) { transform: rotate(7deg); }
.vault-seal:nth-child(3) { transform: rotate(-4deg); }
.vault-seal::after { content: ''; position: absolute; width: 110%; height: 3px; background: #161310; border-bottom: 1px solid #a98c6d; transform: rotate(-35deg); }
.vault-withheld { position: relative; padding: 30px clamp(24px, 4vw, 48px); background: #191918; }
.vault-names { color: #b9b2a4; font-size: clamp(18px, 2vw, 25px); line-height: 1.7; }
.vault-scrim { position: absolute; inset: 0; background: #101014; opacity: .53; pointer-events: none; transition: opacity 260ms var(--ease-micro); }
.sealed-vault:hover .vault-scrim,
.sealed-vault:focus-visible .vault-scrim { opacity: .14; }
.lexicon-main .vault-status { display: flex; align-items: center; gap: 14px; padding: 22px clamp(24px, 4vw, 48px); background: #101014ef; }
.lock-mark { position: relative; flex: 0 0 15px; height: 13px; border: 1px solid #c5ac8e; }
.lock-mark::before { content: ''; position: absolute; width: 9px; height: 9px; bottom: 11px; left: 2px; border: 1px solid #c5ac8e; border-bottom: 0; border-radius: 5px 5px 0 0; }

/* One continuous dig section: youngest above, oldest beneath, every layer live. */
.strata { position: relative; padding-top: 24px; }
.strata-layers { list-style: none; padding: 0; margin: 0; }
.city-marker { position: relative; z-index: 2; border-bottom: 1px solid var(--feedback-blue); padding-bottom: 10px; }
.city-marker::after { content: ''; position: absolute; right: 0; bottom: -5px; width: 9px; height: 9px; background: var(--feedback-blue); }
.city-marker span { display: block; color: #82c7e1; }
.stratum { position: relative; isolation: isolate; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 36px clamp(22px, 4vw, 48px) 42px; }
.stratum::before { content: ''; position: absolute; inset: -9px 0 0; z-index: -1; background: repeating-linear-gradient(174deg, #e8ddc806 0 1px, transparent 2px 7px), linear-gradient(100deg, var(--layer), #1c1d1d); clip-path: polygon(0 5px, 9% 11px, 21% 3px, 38% 9px, 52% 0, 69% 8px, 82% 3px, 94% 9px, 100% 4px, 100% 100%, 0 100%); }
.stratum:nth-child(even)::before { clip-path: polygon(0 9px, 14% 2px, 30% 7px, 43% 0, 59% 9px, 73% 4px, 89% 12px, 100% 3px, 100% 100%, 0 100%); }
.stratum--machine { --layer: #293e3a; }
.stratum--broadcast { --layer: #293a3f; }
.stratum--mechanism { --layer: #3b3730; }
.stratum--inscribed { --layer: #413730; }
.stratum--spoken { --layer: #302a29; }
.stratum-index { padding-top: 5px; color: #c8c4b8; }
.stratum p { max-width: 65ch; margin-top: 14px; line-height: 1.75; }

/* Filed sheets with administrative headers and strips, not floating cards. */
.specimen-files { border-top: 1px solid #a39884; }
.specimen { background: repeating-linear-gradient(0deg, #e8ddc803 0 1px, transparent 1px 5px), #1d1e1d; border-bottom: 1px solid #a39884; }
.specimen-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 14px 24px; border-bottom: 1px solid #e8ddc826; color: #c2bcaf; }
.specimen-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 30px 24px; }
.specimen-body p { max-width: 62ch; line-height: 1.8; }
.lexicon-main .status-strip { padding: 10px 24px; background: #20302a; border-left: 4px solid var(--jade); }
.lexicon-main .status-strip--contested { background: #393126; border-left-color: #b8996e; }
.lexicon-main .status-strip--prohibited { background: #3d2323; border-left-color: #c36a60; }
.specimen--unbound { background-color: #44403a; }
.specimen-body .redacted-record { margin-top: 18px; }
.redaction { display: block; height: 18px; margin-top: 8px; background: #050506; pointer-events: none; }
.redaction--long { width: 90%; }
.redaction--short { width: 56%; }

/* Ma'at is the whole ground. Rot consumes only a narrow edge of that ground. */
.maat-ground { position: relative; isolation: isolate; padding: clamp(28px, 5vw, 64px); border: 1px solid #647365; background: repeating-linear-gradient(168deg, #e8ddc807 0 1px, transparent 2px 8px), linear-gradient(100deg, #303b32, #202923); }
.maat-copy { max-width: 70%; }
.maat-copy .reflection { margin-top: 24px; }
.maat-copy > p:last-child { margin-top: 12px; line-height: 1.75; }
.isfet-intrusion { position: absolute; inset: -2px -2px -2px auto; width: 17%; background: repeating-linear-gradient(21deg, #331e1b 0 5px, #151713 6px 10px, #101014 11px 15px); clip-path: polygon(78% 0, 100% 0, 100% 100%, 38% 100%, 52% 90%, 19% 81%, 43% 69%, 4% 59%, 31% 53%, 20% 40%, 59% 31%, 35% 24%, 70% 16%); pointer-events: none; }
.isfet-note { position: relative; max-width: 31ch; margin-top: 48px; padding-right: 14px; border-right: 2px solid #b27563; margin-left: auto; margin-right: 8%; }
.lexicon-main .isfet-note h3 { font-size: 24px; }
.isfet-note p { margin-top: 12px; line-height: 1.75; }
.lexicon-main .gap-statement { max-width: 52ch; margin-top: 28px; }
.closing-ledger { border-top: 1px solid #a39884; padding-top: 28px; }
.lexicon-main .closing-ledger h2 { color: #bfb7a8; margin-bottom: 24px; }
.closing-ledger dl { margin: 0; }
.closing-ledger dl > div { display: grid; grid-template-columns: 24ch minmax(0, 1fr); gap: 12px 24px; padding-block: 14px; border-bottom: 1px dotted #e8ddc82e; }
.closing-ledger dd { margin: 0; overflow-wrap: anywhere; }
.lexicon-main :focus-visible { outline: 2px solid var(--feedback-blue); outline-offset: 2px; }
@media (max-width: 620px) {
  .domain-plates { grid-template-columns: minmax(0, 1fr); }
  .domain-stone { height: 200px; }
  .domain-copy { padding-inline: 18px; }
  .stratum { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-inline: 18px; }
  .stratum h3 { font-size: 26px; overflow-wrap: anywhere; }
  .specimen-body { grid-template-columns: minmax(0, 1fr); }
  .specimen-header, .specimen-body, .lexicon-main .status-strip { padding-inline: 18px; }
  .maat-copy { max-width: 85%; }
  .isfet-note { max-width: 24ch; margin-right: 6%; }
  .closing-ledger dl > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
/* Touch and reduced motion expose the same partial view without requiring hover. */
@media (hover: none), (pointer: coarse) {
  .vault-scrim { opacity: .14; }
}
@media (prefers-reduced-motion: reduce) {
  .lexicon-main *, .lexicon-main *::before, .lexicon-main *::after { animation: none; transition: none; scroll-behavior: auto; }
  .vault-scrim { opacity: .14; }
}
