:root {
  --coe-ink: #173c32;
  --coe-ink-soft: #42655a;
  --coe-paper: #fcf9ed;
  --coe-sand: #efe4c8;
  --coe-gold: #b78435;
  --coe-gold-light: #e7ce93;
  --coe-green: #266850;
  --coe-green-deep: #124232;
  --coe-line: rgba(38, 104, 80, .18);
  --coe-shadow: 0 18px 48px rgba(26, 63, 48, .12);
}

.coe-view .site-content,
.coe-view #content {
  background: transparent;
}

.coe-shell {
  box-sizing: border-box;
  max-width: 1120px;
  margin: 44px auto 72px;
  padding: 0 24px;
  color: var(--coe-ink);
  font-family: inherit;
}

.coe-shell *,
.coe-shell *::before,
.coe-shell *::after { box-sizing: border-box; }

.coe-eyebrow {
  margin: 0 0 10px;
  color: var(--coe-gold);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.coe-hero {
  position: relative;
  overflow: hidden;
  min-height: 535px;
  padding: 66px 8% 54px;
  border: 1px solid var(--coe-gold-light);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 20%, rgba(231, 206, 147, .42), transparent 25%),
    radial-gradient(circle at 12% 82%, rgba(119, 160, 113, .18), transparent 32%),
    var(--coe-paper);
  box-shadow: var(--coe-shadow);
  text-align: center;
}

.coe-hero::before,
.coe-hero::after {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(183, 132, 53, .26);
  border-radius: 50%;
  content: "";
}

.coe-hero::before { top: -72px; right: -58px; }
.coe-hero::after { bottom: -94px; left: -38px; width: 210px; height: 210px; }

.coe-hero__content { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.coe-hero h1 { margin: 0; color: var(--coe-green-deep); font-size: clamp(2rem, 5vw, 3.55rem); line-height: 1.3; }
.coe-hero__intro { max-width: 540px; margin: 20px auto 26px; color: var(--coe-ink-soft); font-size: 1.09rem; line-height: 2; }

.coe-hero__ornament {
  position: absolute;
  right: 10%; left: 10%;
  height: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 12px, var(--coe-gold) 12px 14px, transparent 14px 25px);
  opacity: .62;
}
.coe-hero__ornament--top { top: 23px; }
.coe-hero__ornament--bottom { bottom: 23px; }

.coe-quran-mark { position: relative; z-index: 1; width: min(100%, 410px); margin: 8px auto 24px; }
.coe-quran-mark__star { color: var(--coe-gold); font-size: 2.65rem; line-height: 1; }
.coe-quran-mark__lines { position: relative; height: 57px; margin: 3px 0 10px; border: 7px solid var(--coe-green); border-radius: 10px 10px 28px 28px; box-shadow: inset 0 0 0 4px var(--coe-gold-light); }
.coe-quran-mark__lines::before,
.coe-quran-mark__lines::after { position: absolute; top: 11px; right: 11%; left: 11%; height: 1px; background: var(--coe-gold); content: ""; box-shadow: 0 13px 0 var(--coe-gold); }
.coe-quran-mark__lines::after { top: 37px; box-shadow: none; }
.coe-quran-mark__verse { color: var(--coe-green); font-family: serif; font-size: clamp(1rem, 2.6vw, 1.32rem); }

.coe-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 23px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.coe-button:hover { transform: translateY(-2px); }
.coe-button:focus-visible,
.coe-quick-link:focus-visible,
.coe-page-grid a:focus-visible,
.coe-back-link:focus-visible { outline: 3px solid var(--coe-gold); outline-offset: 3px; }
.coe-button--primary { min-width: 248px; color: #fff; background: var(--coe-green); box-shadow: 0 10px 22px rgba(38, 104, 80, .28); }
.coe-button--primary:hover { background: var(--coe-green-deep); color: #fff; }
.coe-button svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.coe-guidance { margin: 16px 0 0; color: var(--coe-ink-soft); font-size: .88rem; }

.coe-quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.coe-quick-link { display: flex; align-items: center; gap: 15px; min-height: 94px; padding: 19px 21px; border: 1px solid var(--coe-line); border-radius: 18px; background: #fff; color: var(--coe-ink); box-shadow: 0 7px 22px rgba(26, 63, 48, .06); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.coe-quick-link:hover { border-color: var(--coe-gold); color: var(--coe-ink); transform: translateY(-2px); }
.coe-quick-link--muted { opacity: .65; cursor: not-allowed; }
.coe-quick-link__icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--coe-sand); color: var(--coe-green); font-size: 1.35rem; }
.coe-quick-link strong,.coe-quick-link small { display: block; }
.coe-quick-link strong { margin-bottom: 6px; }
.coe-quick-link small { color: var(--coe-ink-soft); }

.coe-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0; padding: 15px; border-radius: 13px; background: rgba(239, 228, 200, .56); color: var(--coe-ink-soft); font-size: .91rem; text-align: center; }
.coe-note p { margin: 0; }
.coe-note > span { color: var(--coe-gold); }

.coe-result__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.coe-brand { color: var(--coe-green-deep); font-weight: 800; text-decoration: none; }
.coe-brand span { color: var(--coe-gold); font-size: 1.45rem; vertical-align: -2px; }
.coe-back-link { color: var(--coe-ink-soft); font-size: .93rem; text-decoration: underline; text-underline-offset: 4px; }

.coe-result-card { overflow: hidden; border: 1px solid var(--coe-line); border-radius: 23px; background: #fff; box-shadow: var(--coe-shadow); }
.coe-result-card__heading { padding: 30px 36px; color: #fff; background: linear-gradient(120deg, var(--coe-green-deep), var(--coe-green)); }
.coe-result-card__heading--success-strong { background: linear-gradient(120deg, #0e4e3d, #21805e); }
.coe-result-card__heading--success { background: linear-gradient(120deg, #17644d, #43976c); }
.coe-result-card__heading--neutral { background: linear-gradient(120deg, #72541c, #b1842e); }
.coe-result-card__heading--warning { background: linear-gradient(120deg, #87451d, #c87929); }
.coe-result-card__heading--danger { background: linear-gradient(120deg, #6f1e2c, #a93848); }
.coe-result-card__heading .coe-eyebrow { color: var(--coe-gold-light); }
.coe-result-card__heading h1 { margin: 0; color: #fff !important; font-size: clamp(2rem, 5vw, 3.2rem); }
.coe-result-details { display: grid; grid-template-columns: 1fr; margin: 0; padding: 14px 36px; }
.coe-result-details > div { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 19px 0; border-bottom: 1px solid var(--coe-line); }
.coe-result-details > div:last-child { border-bottom: 0; }
.coe-result-details dt { color: var(--coe-green); font-weight: 800; }
.coe-result-details dd { margin: 0; color: #33473f; line-height: 2; }
.coe-reference { display: flex; flex-wrap: wrap; gap: 11px; padding: 21px 36px 28px; background: #fcfbf6; }
.coe-reference span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--coe-gold-light); border-radius: 9px; color: var(--coe-ink-soft); }
.coe-reference strong { color: var(--coe-green-deep); }
.coe-repeat-form { margin: 24px 0; text-align: center; }
.coe-button--secondary { color: var(--coe-green); background: var(--coe-sand); }
.coe-button--secondary:hover { background: var(--coe-gold-light); color: var(--coe-green-deep); }

.coe-pages-spread {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px clamp(24px, 5vw, 62px) 54px;
  border: 1px solid #d4ad62;
  border-radius: 23px;
  background-color: #f8efd7;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(183, 132, 53, .16) 1px, transparent 1.5px),
    radial-gradient(circle at 22px 22px, rgba(38, 104, 80, .09) 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(255, 255, 255, .48), rgba(233, 214, 170, .34));
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: inset 0 0 0 8px rgba(255, 252, 239, .68), 0 13px 32px rgba(89, 66, 25, .10);
}
.coe-pages-spread::before {
  position: absolute;
  z-index: -1;
  inset: 13px;
  border: 1px solid rgba(146, 101, 27, .48);
  border-radius: 16px;
  content: "";
}
.coe-pages-spread::after {
  position: absolute;
  z-index: -1;
  right: 50%;
  bottom: 12px;
  width: 155px;
  height: 25px;
  color: rgba(159, 111, 31, .58);
  content: "۞  ✦  ۞  ✦  ۞";
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: .31em;
  text-align: center;
  transform: translateX(50%);
}
.coe-section-heading { margin-bottom: 25px; text-align: center; }
.coe-section-heading h2 { margin: 0; color: var(--coe-green-deep); font-size: clamp(1.35rem, 3.5vw, 2rem); }
.coe-section-heading > p:last-child { margin: 8px 0 0; color: var(--coe-ink-soft); }
.coe-pages-spread__images {
  display: flex;
  direction: rtl;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  max-width: 744px;
  margin: 0 auto;
  padding: 15px;
  border: 4px double rgba(150, 104, 29, .65);
  border-radius: 9px;
  background: rgba(255, 253, 244, .72);
  box-shadow: 0 12px 26px rgba(67, 53, 23, .15);
}
.coe-pages-spread__images figure { width: 50%; max-width: 350px; margin: 0; padding: 8px; border: 1px solid rgba(174, 126, 45, .48); background: #fffdf7; box-shadow: 0 5px 16px rgba(26, 63, 48, .12); text-align: center; }
.coe-pages-spread__images img { display: block; width: 100%; height: auto; }
.coe-pages-spread__images figcaption { padding: 11px 4px 3px; color: var(--coe-ink-soft); font-size: .9rem; }

.coe-translation { margin-top: 24px; border: 1px solid var(--coe-line); border-radius: 17px; background: #fff; }
.coe-translation details[open] { padding-bottom: 8px; }
.coe-translation summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; color: var(--coe-green-deep); cursor: pointer; font-weight: 800; list-style: none; }
.coe-translation summary::-webkit-details-marker { display: none; }
.coe-translation details[open] .coe-summary-icon { transform: rotate(180deg); }
.coe-summary-icon { color: var(--coe-gold); font-size: 1.35rem; transition: transform .2s ease; }
.coe-translation__content { max-height: 570px; margin: 0 16px 16px; overflow: auto; border-top: 1px solid var(--coe-line); scroll-behavior: smooth; }
.coe-verse { position: relative; padding: 17px 45px 17px 16px; border-bottom: 1px solid var(--coe-line); }
.coe-verse:target { background: #fff5d8; }
.coe-verse__number { position: absolute; top: 18px; right: 12px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--coe-sand); color: var(--coe-green); font-size: .75rem; font-weight: 800; }
.coe-verse p { margin: 0; }
.coe-verse__arabic { color: #1f302a; font-family: serif; font-size: 1.14rem; line-height: 2; }
.coe-verse__persian { margin-top: 7px !important; color: var(--coe-ink-soft); line-height: 1.9; }
.coe-note--result { margin-top: 24px; }

.coe-pages-index__heading { max-width: 730px; margin: 0 auto 29px; text-align: center; }
.coe-pages-index__heading h1 { margin: 0; color: var(--coe-green-deep); font-size: clamp(1.7rem, 4vw, 2.65rem); }
.coe-pages-index__heading > p:last-child { color: var(--coe-ink-soft); line-height: 1.9; }
.coe-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.coe-page-grid a { padding: 14px 15px; border: 1px solid var(--coe-line); border-radius: 12px; background: #fff; color: var(--coe-green-deep); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.coe-page-grid a:hover { border-color: var(--coe-gold); box-shadow: 0 7px 15px rgba(26, 63, 48, .09); color: var(--coe-green-deep); transform: translateY(-2px); }
.coe-page-grid span,.coe-page-grid small { display: block; }
.coe-page-grid span { font-weight: 800; }
.coe-page-grid small { margin-top: 6px; color: var(--coe-ink-soft); font-size: .79rem; }

@media (max-width: 700px) {
  .coe-shell { margin-top: 28px; padding: 0 15px; }
  .coe-hero { min-height: auto; padding: 58px 22px 44px; }
  .coe-quick-links { grid-template-columns: 1fr; }
  .coe-result-card__heading,.coe-result-details,.coe-reference { padding-right: 21px; padding-left: 21px; }
  .coe-result-details > div { grid-template-columns: 1fr; gap: 7px; }
  .coe-pages-spread { padding: 39px 14px 46px; }
  .coe-pages-spread__images { gap: 5px; padding: 7px; }
  .coe-pages-spread__images figure { padding: 4px; }
  .coe-page-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .coe-page-grid a { padding: 12px 10px; }
}

@media (max-width: 390px) {
  .coe-result__header { align-items: flex-start; flex-direction: column; }
  .coe-page-grid { grid-template-columns: 1fr; }
}
