:root {
  color-scheme: dark;
  --paper: var(--temple-paper, #f2e8d3);
  --muted: #c5bda9;
  --edge: #5e5341;
  --serif: var(--temple-serif, Georgia, serif);
  --sans: var(--temple-sans, system-ui, sans-serif);
  --page-gutter: clamp(1.25rem, 5.7vw, 6.5rem);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--paper); background: var(--temple-ink, #151410); font: 1rem/1.75 var(--sans); }
a { color: inherit; text-underline-offset: .25em; }
button, summary { cursor: pointer; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f9d49b; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 1rem; left: 1rem; z-index: 8; padding: .7rem 1rem; background: #25211a; }
.landing { background: var(--temple-ink, #151410); }
.hero { position: relative; isolation: isolate; background: #181612; }
.backdrop, .backdrop img, .courtyard-film, .hero::after {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.backdrop img, .courtyard-film { object-fit: cover; }
.courtyard-film:not(.playing) { visibility: hidden; }
.hero::after {
  content: "";
  background: linear-gradient(0deg, rgba(13,12,10,.95), transparent 24%, transparent 76%, rgba(13,12,10,.8)),
              linear-gradient(90deg, rgba(15,15,12,.92) 0%, rgba(18,17,14,.74) 24%, rgba(22,18,13,.15) 63%, transparent 85%);
}
.hero-inner, .guide, .foot-inner {
  width: min(100%,108rem); margin-inline: auto; padding-inline: var(--page-gutter);
}
.hero-inner {
  position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100svh;
  padding-top: max(env(safe-area-inset-top),clamp(1rem,3.3vh,2.7rem));
  padding-bottom: max(env(safe-area-inset-bottom),1rem);
}
.hero header, .controls, .actions, .foot-inner, .hero-credit, .guide-languages { display: flex; align-items: center; }
.hero header {
  justify-content: space-between; gap: 1rem; padding-bottom: clamp(.75rem,2vh,1.45rem);
  border-bottom: 1px solid rgba(214,188,142,.35);
}
.wordmark {
  display: grid; grid-template-columns: auto auto; align-items: center; column-gap: .85rem;
  font-family: var(--serif); font-size: clamp(1.25rem,2.1vw,1.8rem); line-height: 1.12; letter-spacing: .12em;
}
.wordmark .brand-seal { grid-column: 1; grid-row: 1 / span 2; width: 2.6rem; height: 2.6rem; }
.wordmark b, .wordmark-name { font-weight: 550; }
.wordmark-subtitle {
  grid-column: 2; display: block; margin-top: .4rem; font: normal .63rem/1 Georgia,serif;
  letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
}
.home-header-controls, .language-switch { display: flex; align-items: center; }
.home-header-controls { gap: 1.2rem; }
.language-switch { gap: .15rem; }
.language-switch button, .controls button {
  background: rgba(21,19,15,.65); border: 1px solid #8e8068; border-radius: 2px; min-height: 44px;
  padding: .4rem .75rem; font-size: .875rem; line-height: 1.2;
}
.language-switch button { border: 0; border-bottom: 1px solid transparent; padding-inline: .6rem; background: transparent; }
.language-switch button[aria-pressed="true"] { color: #ffe0ad; border-color: #d8bb83; }
.controls { gap: .48rem; flex-wrap: wrap; }
.controls button { display: inline-flex; align-items: center; gap: .5rem; }
.controls button:hover, .language-switch button:hover { background: rgba(87,70,45,.8); }
.intro { margin-block: auto; max-width: 43rem; padding-block: clamp(2rem,6vh,5rem); }
h1, h2 { font-family: var(--serif); font-weight: 500; }
.landing .intro h1 {
  margin: 0; color: var(--paper); font: 400 clamp(4.7rem,10.8vw,11.5rem)/1.1 var(--temple-display,var(--serif));
  letter-spacing: .028em; text-wrap: balance; text-shadow: 0 2px 17px #110e0980;
}
.landing .temple-invitation {
  margin: .55rem 0 .85rem; color: #f8e2bc; font: 500 clamp(1.2rem,2.3vw,2rem)/1.5 var(--serif);
  letter-spacing: .18em;
}
.intro p {
  max-width: 34rem; margin: 1.1rem 0 1.6rem; font-size: clamp(1rem,1.3vw,1.14rem);
  line-height: 1.9; text-shadow: 0 1px 7px #130f0c;
}
.actions { gap: clamp(1.1rem,3vw,2.4rem); flex-wrap: wrap; }
.enter, .guide-link { min-height: 48px; display: inline-flex; align-items: center; }
.enter {
  position: relative; justify-content: center; padding: .68rem 1.8rem; color: #fff6e8;
  background: linear-gradient(110deg, #9b442f, var(--temple-seal,#9b382b)); border: 1px solid #c98265;
  box-shadow: inset 0 0 0 3px #802f236e, inset 0 0 0 4px #d4a27e55;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 650; letter-spacing: .045em; text-decoration: none;
}
.enter:hover { background: #a84732; border-color: #e8b796; }
.guide-link { text-decoration-color: #bca786; text-underline-offset: .42em; }
.hero-credit {
  justify-content: space-between; gap: .35rem 1.2rem; padding-block: .65rem .2rem; flex-wrap: wrap;
  border-top: 1px solid rgba(202,177,135,.34);
}
.author { font-size: .88rem; color: #e7dcc8; }
.guide-languages { gap: .25rem 1rem; flex-wrap: wrap; font-size: .9rem; }
.guide-languages a, .guide-languages [aria-current] { display: inline-flex; align-items: center; min-height: 44px; }
.guide-languages a { text-decoration: none; }
.guide-languages a:hover { text-decoration: underline; }
.guide-languages [aria-current] { color: #ecd3a7; text-decoration: underline; text-underline-offset: .4em; }
.guide {
  display: grid; grid-template-columns: minmax(0,4fr) minmax(0,5fr); align-items: start;
  gap: clamp(2.25rem,8vw,9rem); padding-block: clamp(3.2rem,8vw,7.8rem);
}
.guide h2 { margin: 0 0 1.25rem; font: 500 clamp(2.25rem,4.3vw,4.4rem)/1.18 var(--temple-display,var(--serif)); text-wrap: balance; }
.guide-heading::before { content: ""; display: block; width: 2.75rem; height: 3px; background: var(--temple-seal,#af4b3a); margin-bottom: 1.1rem; }
.guide p { max-width: 40em; margin: 0; color: var(--muted); }
.guide-heading p+p { margin-top: 1rem; }
.guide a, footer a { text-decoration-color: #9c8763; }
.guide-next a { display: inline-block; padding-block: .2rem; }
.answers { border-bottom: 1px solid var(--edge); }
.answers details { border-top: 1px solid var(--edge); }
summary { min-height: 44px; }
.answers summary {
  position: relative; padding: 1.15rem 2rem 1.15rem 0; font-family: var(--serif);
  font-size: clamp(1.1rem,1.5vw,1.35rem); line-height: 1.45; list-style: none;
}
.answers summary::-webkit-details-marker { display: none; }
.answers summary::after {
  content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%);
  font: 400 1.35rem/1 var(--sans); color: #c7ac82;
}
.answers details[open] summary::after { content: "−"; }
.answers p { padding-bottom: 1.3rem; }
footer { color: var(--muted); border-top: 1px solid var(--edge); font-size: .9rem; }
.foot-inner { justify-content: space-between; align-items: start; gap: 1rem; padding-block: 1.6rem 2.2rem; }
.foot-inner>div>span { font-size: .84rem; }
.foot-inner address { font-style: normal; overflow-wrap: anywhere; }
.landing:lang(en) .intro h1, .landing:lang(ms) .intro h1 {
  font: 500 clamp(3.7rem,7vw,7.4rem)/.99 var(--serif); letter-spacing: -.045em;
}
.landing:lang(en) .intro, .landing:lang(ms) .intro { max-width: 43rem; }
.landing:lang(ms) .intro h1 { font-size: clamp(3rem,6vw,6.5rem); }
.landing:lang(en) .guide h2, .landing:lang(ms) .guide h2 { font-family: var(--serif); letter-spacing: -.025em; }
html[lang="en"] .wordmark { font-size: 1.4rem; letter-spacing: .025em; }
html[lang="en"] .wordmark-subtitle { display: none; }
html[lang="en"] .temple-invitation { letter-spacing: .005em; }
@media(max-width:720px) {
  .hero::after {
    background: linear-gradient(0deg,#100e0df7 0%,#17140fe6 20%,#19150e8c 48%,transparent 74%),
                linear-gradient(180deg,#13120edf,transparent 22%);
  }
  .hero header { flex-wrap: wrap; gap: .45rem; }
  .hero:has(.home-header-controls) header { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .home-header-controls { display: contents; }
  .language-switch { grid-row: 1; grid-column: 2; }
  .home-header-controls .controls { grid-column: 1/-1; justify-self: end; }
  .controls button { font-size: .8rem; padding-inline: .65rem; }
  .intro { margin-block: auto 0; padding-block: 2.5rem 1.8rem; }
  .landing .intro h1 { font-size: clamp(4.5rem,18vw,7.8rem); }
  .landing:lang(en) .intro h1 { font-size: clamp(3.2rem,12vw,5.4rem); }
  .landing:lang(ms) .intro h1 { font-size: clamp(2.9rem,10.7vw,5.1rem); }
  .guide { grid-template-columns: 1fr; gap: 1.85rem; }
  .guide-languages { gap: .1rem .85rem; }
  .hero-credit { align-items: flex-start; flex-direction: column; gap: .18rem; }
  .wordmark { column-gap: .55rem; }
  .wordmark .brand-seal { width: 2.1rem; height: 2.1rem; }
  .foot-inner { flex-direction: column; }
}
@media(max-height:510px) and (orientation:landscape) {
  .hero-inner { padding-block: .65rem; }.hero header { padding-bottom:.45rem; }
  .intro { padding-block: .7rem; }.landing .intro h1{font-size:clamp(3rem,8vh,4rem)}
  .landing:lang(en) .intro h1,.landing:lang(ms) .intro h1 {font-size:2.8rem}
  .intro p, .landing .temple-invitation { margin:.35rem 0; line-height:1.5; }
  .hero-credit {flex-direction:row;align-items:center;padding-block:.2rem}
}
