/* The full handbook and Labbaik share the main app's palette and type. */
:root {
  color: #183a31;
  background: #f6f2e9;
  --forest: #185b4e;
  --deep: #103e37;
  --ink: #183a31;
  --muted: #52665d;
  --paper: #f6f2e9;
  --white: #fffdf7;
  --line: #ded9cc;
  --mint: #e0eee7;
  --sand: #f2e5d3;
  --gold: #f0d8a8;
  --library-radius: 18px;
}

body {
  background: radial-gradient(ellipse at 97% 2%, #e2ebde 0%, transparent 30rem), var(--paper);
}

::selection { color: var(--deep); background: #d4e9d9; }

.masthead {
  background: linear-gradient(165deg, #fffaf0, #edf0e4 73%);
}

.brand img { object-fit: contain; }

.primary-nav a { border-radius: 13px; }
.primary-nav [aria-current] { color: var(--deep); background: #d9e8dd; }

.screen-heading {
  --heading-surface: #13463c;
  --heading-end: #1f5c50;
  --heading-copy: #e5efe7;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(19px, 5vw, 44px);
  color: #fffdf7;
  background: linear-gradient(112deg, var(--heading-surface) 33%, var(--heading-end));
  border-radius: clamp(17px, 3vw, 24px);
}

.screen-heading::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 79% 29%, #ffe7b4 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 92% 81%, #ffe7b4 0 3px, transparent 4px),
    repeating-radial-gradient(circle at 99% 111%, transparent 0 20px, #fbdb9d40 21px 22px, transparent 23px 42px);
  opacity: .58;
  mask-image: linear-gradient(90deg, transparent 24%, #000 78%);
}

.screen-heading h1 { position: relative; max-inline-size: 22ch; }
.screen-heading p { position: relative; color: var(--heading-copy); max-inline-size: 62ch; }
.screen-heading h1:focus-visible { outline-color: var(--gold); }

#guide > .screen-heading {
  --heading-surface: #173c34;
  --heading-end: #327668;
}

#counters > .screen-heading {
  --heading-surface: #543d2e;
  --heading-end: #755841;
  --heading-copy: #fff0d8;
}

#game > .screen-heading {
  --heading-surface: #293b52;
  --heading-end: #38546a;
  --heading-copy: #e7eef9;
}

.back-link { color: #21584b; }
.site-footer { font-size: .79rem; }
.search-label { margin-bottom: 8px; }
.home-search input, .filters input, .filters select {
  border-color: #a9bcb0;
  border-radius: 13px;
}

.feature {
  border-radius: 22px;
  background: var(--deep);
}

.feature picture::after {
  background: linear-gradient(90deg, var(--deep), #103e3763 34%, transparent 76%);
}

.shortcut-grid { gap: 10px; }
.shortcut, .game-entry { border-radius: var(--library-radius); }
.shortcut:nth-child(1) { background: #e9f2e8; }
.shortcut:nth-child(2) { background: #f6eade; }
.shortcut:nth-child(3) { background: #f5edd8; }
.shortcut:nth-child(4) { background: #e8eef4; }
.shortcut:hover, .game-entry:hover { border-color: #8caa9b; }
.game-entry { background: #eee8f1; }
.game-entry + .game-entry { background: #e4ecef; }
.game-entry .tile-icon { background: #425b6a; }

.quick-results a {
  padding-inline: 12px;
  border-radius: 10px;
  min-block-size: 48px;
}

.filters {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--library-radius);
  background: var(--white);
}

.result-count { margin-block: 13px; }
.topic-list { gap: 12px; }
.manual-section + .manual-section { margin-block-start: 20px; }
.manual-section > h2 { color: var(--deep); margin-block-end: 3px; }
.manual-section > .source { margin-block-end: 11px; }

.topic { border-radius: var(--library-radius); }
.topic summary {
  min-block-size: 70px;
  padding: 14px clamp(13px, 3vw, 20px);
  border-radius: var(--library-radius);
  background: linear-gradient(112deg, #fffdf7 38%, #f0eee0);
}

.topic summary > span:first-child { min-inline-size: 0; overflow-wrap: anywhere; }
.topic summary:hover, .topic[open] summary { background: #eaf1e8; }
.topic[open] summary { border-radius: var(--library-radius) var(--library-radius) 0 0; }
.topic-summary { margin-block-start: 3px; font-size: .87rem; }
.topic-category { margin-block-end: 3px; font-weight: 700; color: #426357; }
.topic-chevron { color: var(--forest); display: grid; place-items: center; flex: none; }

.topic-content {
  max-inline-size: 72ch;
  margin-inline: auto;
  padding: clamp(15px, 4vw, 31px);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.topic-content > * + * { margin-block-start: 13px; }
.reading-block { padding-block: 19px 10px; }
.reading-block h2, .reading-block h3 { color: var(--deep); }
.reading-steps { margin-block: 10px 0; }
.reading-steps li + li { margin-block-start: 14px; }
.reading-steps p { color: #2e4a40; }

.arabic {
  color: #17392e;
  border-radius: 13px;
  background: #f1eadd;
  padding-inline: clamp(12px, 4vw, 24px);
}

.reading-dua { margin-block-start: 18px; }
.step-figure { margin-block: 13px 18px; }
.step-figure img { border-radius: 13px; }
.tawaf-flow {
  border-radius: 15px;
  background: radial-gradient(ellipse at center, #e8f0e4 0 36%, #f4f0e7 37%);
}

.reading-rounds {
  margin-block: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.reading-rounds > div { padding: 9px 11px; }
.reading-rounds > div:nth-child(2n) { background: #f4f5ed; }
.reading-rounds > div:last-child { border-block-end: 0; }
.reading-rounds > div:first-child { border-radius: 12px 12px 0 0; }
.reading-rounds > div:last-child { border-radius: 0 0 12px 12px; }
.umrah-stages { border-radius: var(--library-radius); }
.checklist label { padding-block: 5px; }
.checklist li + li { border-block-start: 1px solid var(--line); }
.checklist input { flex: none; }
.button { border-radius: 12px; }
.secondary { border-color: #8da99a; }

.counter {
  --counter-surface: #edf3ec;
  --counter-ink: #164b3e;
  border-radius: var(--library-radius);
  background: linear-gradient(145deg, var(--counter-surface), var(--white) 76%);
}

.counter:nth-child(2) { --counter-surface: #f4eadd; --counter-ink: #704629; }
.counter h3, .counter-display { color: var(--counter-ink); }
.counter-display { font-size: clamp(1.75rem, 4.6vw, 2.45rem); }
.counter progress, .practice-meter progress { accent-color: var(--forest); }
.counter-next { min-block-size: auto; }

.practice-card {
  --mission-surface: #e8e2ef;
  --mission-ink: #573d69;
  border-radius: var(--library-radius);
  background: linear-gradient(116deg, var(--white) 38%, var(--mission-surface));
}

.tawaf-card { --mission-surface: #dfeee5; --mission-ink: #215e4c; }
.saee-card { --mission-surface: #f5e7d7; --mission-ink: #76472c; }
.practice-card .practice-icon {
  color: var(--mission-ink);
  background: var(--mission-surface);
  border-radius: 13px;
}

.practice-card:hover { border-color: #829e91; }
.practice-card small { font-size: .88rem; }
.practice-status { color: var(--mission-ink); background: var(--mission-surface); border-radius: 8px; }
.practice-status:empty { display: none; }
.game-main { border-radius: 22px; }
.practice-instruction { max-inline-size: 63ch; }
.practice-position { margin-block-start: 9px; }

.route, .destinations {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 10px;
  background: #e9f0e6;
}

.route { background: radial-gradient(circle at 50% 50%, #d7e7de 0 31%, #e9f0e6 32% 54%, #f2f5ed 55%); }
.destinations { background: #f5e9da; }
.route button, .destinations button, .sequence-tiles button { border-radius: 11px; }
.destinations button { background: #fff9ee; border-color: #ad987b; }
.route [data-next="true"], .destinations [data-next="true"], .sequence-tiles [data-next="true"] {
  border-color: #777b40;
  background: #f2edcf;
}

.route [data-current="true"], .destinations [data-current="true"] {
  background: var(--deep);
  color: var(--white);
}

.sequence-result { color: var(--deep); border-radius: 12px; }

@media (width <= 820px) {
  .masthead { background: #fffaf0; }

  .primary-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: #fffdf7;
    box-shadow: 0 -5px 20px #15382b0d;
  }
}

@media (width <= 480px) {
  .screen-heading::before { opacity: .42; }
  .screen-heading h1 { font-size: clamp(1.46rem, 5.35vw, 1.92rem); }
  .feature { border-radius: 18px; }
  .shortcut-grid { gap: 8px; }
  .filters { padding: 12px; }
  .topic summary { padding-block: 12px; }
  .topic summary strong { font-size: 1.06rem; }
  .reading-rounds > div { grid-template-columns: minmax(3.8rem, .34fr) minmax(0, 1fr); }
  .route { gap: 5px; }
  .destinations { gap: 9px; }
}

@media (width <= 350px) {
  .step-figure-portrait { grid-template-columns: 1fr; }
  .step-figure-portrait img { max-inline-size: min(100%, 155px); }
  .practice-card { padding: 12px; }
  .practice-card .practice-icon { width: 38px; height: 38px; }
  .route button, .destinations button { font-size: .85rem; overflow-wrap: anywhere; }
}


#hajj-guide {
  color: #183a31;
  margin-block: 1rem 1.5rem;
}

#hajj-guide [hidden],
#hajj-guide[hidden],
#prepare-flight[hidden] {
  display: none;
}

#hajj-day-menu h2 {
  margin: 1.1rem 0 .46rem;
  color: #183e34;
  font-size: 1.01rem;
}

.hajj-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hajj-day-grid li {
  display: flex;
  min-width: 0;
}

.hajj-day-grid a {
  display: grid;
  align-content: center;
  gap: .16rem;
  width: 100%;
  min-height: 64px;
  padding: .57rem .7rem;
  border: 1px solid #c4d7ca;
  border-radius: 13px;
  background: #eff6ee;
  color: #174537;
  text-decoration: none;
  line-height: 1.4;
}

.hajj-day-grid a:hover {
  background: #dfeee3;
}

.hajj-day-grid small,
.hajj-menu-tools small,
.hajj-dua small,
.hajj-note small {
  color: #445e51;
  font-size: .83rem;
  font-weight: 500;
}

.hajj-guide-stage {
  padding: clamp(.86rem, 3.4vw, 1.45rem);
  border: 1px solid #ded8cb;
  border-radius: 18px;
  background: #fffcf5;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.hajj-guide-stage h2 {
  margin: 1rem 0 .45rem;
  font-size: clamp(1.07rem, 4.4vw, 1.42rem);
  line-height: 1.45;
  color: #103e37;
}

.hajj-guide-stage > :first-child,
.hajj-note > :first-child,
.hajj-dua > :first-child {
  margin-block-start: 0;
}

.hajj-guide-stage :is(ol, ul) {
  padding-inline-start: 1.4rem;
  margin: 0;
}

.hajj-guide-stage li {
  padding-inline-start: .18rem;
  margin-block: .7rem;
}

.hajj-guide-stage li p {
  margin: .18rem 0 0;
}

.hajj-guide-stage ol > li::marker {
  color: #245b4a;
  font-weight: 780;
}

.hajj-menu-tools {
  display: grid;
  justify-items: start;
  gap: .2rem;
  margin-block: .68rem;
}

.hajj-menu-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .28rem .68rem;
  border: 1px solid #adc6b6;
  border-radius: 10px;
  color: #154638;
  background: #edf5ed;
  font-weight: 700;
  text-underline-offset: .16em;
}

.hajj-menu-tools a:hover {
  background: #dcece2;
}

.hajj-route {
  margin: 0;
  padding: .6rem .72rem;
  border: 1px solid #cedccd;
  border-radius: 11px;
  background: #f3f7ef;
}

.hajj-route strong {
  display: block;
  color: #245747;
}

.hajj-day-prayer {
  margin-block: .55rem .85rem;
}

.hajj-types {
  margin: .4rem 0 0;
}

.hajj-types dt {
  color: #276353;
  font-weight: 820;
}

.hajj-types dd {
  margin: .15rem 0 .73rem;
}

.hajj-note,
.hajj-dua {
  padding: .74rem .8rem;
  border-radius: 11px;
  background: #e8f1e7;
  margin: .76rem 0 0;
}

.hajj-note p,
.hajj-dua p {
  margin: .35rem 0 0;
}

.hajj-dua {
  background: #f7eedf;
  border: 1px solid #e8d9bc;
}

.hajj-reading {
  padding: .24rem 0;
  color: #203a31;
  font-family: "Noto Naskh Arabic", "Geeza Pro", serif;
  font-size: clamp(1.42rem, 5vw, 1.75rem);
  line-height: 1.95;
  text-align: start;
}

.hajj-next {
  margin-block-start: 1.1rem;
}

.hajj-next a {
  display: grid;
  min-height: 50px;
  padding: .48rem .8rem;
  background: #245848;
  color: #fff;
  border-radius: 11px;
  text-decoration: none;
}

.hajj-next a:hover {
  background: #1d4639;
}

.hajj-next small {
  font-size: .76rem;
}

.hajj-source-list a {
  text-underline-offset: .15em;
  overflow-wrap: anywhere;
}

@media (min-width: 650px) {
  .hajj-day-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hajj-guide-stage {
    max-width: 76ch;
  }
}
