:root {
  --bg: #f7f5ef;
  --surface: #fffefa;
  --ink: #203c34;
  --muted: #626b61;
  --green: #173f35;
  --on-green: #fffdf4;
  --soft: #e9eee5;
  --line: #d9ddd2;
  --control: #7a867c;
  --gold: #9a7637;
  --gold-light: #dcc58b;
  --shadow: 0 12px 35px #253c3410;
  --radius: 20px;
  --sans: "DM Sans", Arial, sans-serif;
  --arabic: "Noto Naskh Arabic", serif;
  --reading: 1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111e1a;
  --surface: #192923;
  --ink: #eeeede;
  --muted: #b3c0b5;
  --green: #c9dfca;
  --on-green: #12291f;
  --soft: #263b31;
  --line: #3a4d42;
  --control: #899c8e;
  --gold: #ddc18a;
  --gold-light: #dcc58b;
  --shadow: 0 12px 35px #0002;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button,
.button {
  min-height: 44px;
  border: 1px solid var(--control);
  background: var(--surface);
  padding: 9px 17px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
button:hover,
.button:hover {
  background: var(--soft);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}
h2 {
  font-size: 2.4rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.16rem;
  line-height: 1.4;
}
.wrap {
  max-width: 1200px;
  margin: auto;
  padding-inline: 40px;
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 20;
  background: var(--surface);
  padding: 14px;
}
.skip:focus {
  top: 8px;
}
header {
  border-bottom: 1px solid var(--line);
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 98px;
}
.brand {
  font-size: 2rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -1px;
}
.mark {
  width: 36px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 50% 50% 3px 3px;
  display: grid;
  place-items: center;
  color: var(--gold);
  font: 24px var(--arabic);
}
nav {
  display: flex;
  gap: 28px;
}
nav a {
  font-size: 0.9rem;
  text-decoration: none;
}
nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.controls select {
  border: 0;
  background: transparent;
  max-width: 150px;
  padding: 10px 5px;
  min-height: 44px;
  color: var(--ink);
}
.icon {
  width: 44px;
  padding: 9px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  font-weight: 700;
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  padding-block: 65px 55px;
  align-items: center;
}
.hero h1 {
  max-width: 570px;
  margin-bottom: 22px;
}
.hero h1 em {
  font-weight: 400;
  color: var(--gold);
}
.lead {
  max-width: 445px;
  color: var(--muted);
  font-size: 1rem;
}
.hero-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 20px 0 0;
}
.quote {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 150px 150px 22px 22px;
  padding: 48px 35px 28px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow);
}
.quote:before {
  content: "✧";
  display: block;
  color: var(--gold);
  font-size: 30px;
  margin-bottom: 10px;
}
.arabic {
  font-family: var(--arabic);
  font-weight: 400;
  direction: rtl;
  text-align: right;
  font-size: calc(1.85rem * var(--reading));
  line-height: 2.1;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.quote .arabic {
  text-align: center;
  font-size: 1.53rem;
  line-height: 2.1;
  margin: 8px 0 20px;
}
.quote .translation {
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--muted);
}
.quote a {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.primary {
  background: var(--green);
  color: var(--on-green);
  border-color: var(--green);
}
.primary:hover {
  background: var(--green);
  filter: brightness(1.13);
}
.collection {
  padding-top: 22px;
  padding-bottom: 68px;
}
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}
.section-top h2 {
  margin: 0 0 6px;
}
.section-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.search {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--control);
  border-radius: 14px;
  background: var(--surface);
  padding: 9px 15px;
}
.search svg {
  flex-shrink: 0;
  width: 22px;
}
.search input {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  min-height: 42px;
  color: var(--ink);
}
.search:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.search button {
  border: 0;
}
.filters {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips a,
.chips button {
  font-size: 0.83rem;
  padding: 8px 15px;
  border-color: var(--control);
  text-decoration: none;
}
a[aria-pressed="true"],
button[aria-pressed="true"] {
  background: var(--green);
  color: var(--on-green);
  border-color: var(--green);
}
.select-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}
.select-row select {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--control);
  border-radius: 10px;
  min-height: 44px;
  padding: 8px 12px;
}
.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--control);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.save {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 8px;
  min-width: 44px;
  font-size: 21px;
}
.card h3 {
  margin-bottom: 13px;
}
.card h3 a {
  text-decoration: none;
}
.card .arabic {
  font-size: calc(1.55rem * var(--reading));
  margin: 10px 0 16px;
}
.translit {
  color: var(--muted);
  font-style: italic;
  font-size: calc(0.88rem * var(--reading));
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meaning {
  font-size: calc(0.92rem * var(--reading));
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-bottom {
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: var(--muted);
  gap: 12px;
}
.card-bottom a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiet-banner {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  gap: 35px;
}
.quiet-banner p {
  color: var(--muted);
  max-width: 640px;
  font-size: 0.88rem;
}
.quiet-banner h3 {
  margin: 0 0 9px;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.76rem;
}
.footer a {
  margin-left: 18px;
}
.empty {
  text-align: center;
  border: 1px dashed var(--control);
  padding: 55px 20px;
  border-radius: 20px;
  grid-column: 1/-1;
}
.empty h3 {
  font-family: Georgia, serif;
  font-size: 1.8rem;
}
.empty p {
  color: var(--muted);
}
.reader-wrap {
  max-width: 870px;
  margin: auto;
  padding: 35px 30px 65px;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
}
.reader-heading {
  margin-top: 30px;
}
.reader-heading h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  margin: 10px 0 20px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 18px;
}
.tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reader {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
}
.reader .arabic {
  font-size: calc(2.4rem * var(--reading));
  line-height: 2.15;
  margin: 15px 0 27px;
}
.reader .translit {
  font-size: calc(1rem * var(--reading));
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.reader .meaning {
  font-size: calc(1.06rem * var(--reading));
  line-height: 1.9;
}
.label {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 24px 0 10px;
}
.reader details {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
}
.reader summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}
.reader details p {
  font-size: calc(0.94rem * var(--reading));
  color: var(--muted);
}
.reader details a {
  font-size: 0.9rem;
}
.hint {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 20px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--on-green);
  padding: 12px 24px;
  border-radius: 40px;
  box-shadow: var(--shadow);
  z-index: 10;
  max-width: 90vw;
  text-align: center;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.mobile-verse {
  display: none;
}
main:focus {
  outline: 0;
}
@media (max-width: 950px) {
  .wrap {
    padding-inline: 24px;
  }
  .hero {
    gap: 30px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .head {
    gap: 15px;
  }
  nav {
    gap: 14px;
  }
  .quote {
    padding: 38px 22px 25px;
  }
  .hero h1 {
    font-size: 3.5rem;
  }
}
@media (max-width: 650px) {
  .wrap {
    padding-inline: 20px;
  }
  .head {
    min-height: 80px;
    flex-wrap: wrap;
    padding-block: 15px;
    gap: 10px;
  }
  .brand {
    font-size: 1.8rem;
  }
  .head nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  nav a {
    font-size: 0.82rem;
  }
  .controls {
    gap: 1px;
  }
  .controls select {
    font-size: 0.78rem;
    max-width: 100px;
  }
  .hero {
    display: block;
    padding-block: 36px 24px;
  }
  .hero h1 {
    font-size: 3.15rem;
    max-width: 450px;
  }
  .hero .lead {
    font-size: 0.92rem;
  }
  .hero-note {
    margin-top: 15px;
  }
  .quote {
    margin-top: 28px;
    padding: 22px;
    border-radius: 18px;
    text-align: left;
  }
  .quote:before {
    display: none;
  }
  .quote > .verse-full {
    display: none;
  }
  .mobile-verse {
    display: block;
  }
  .mobile-verse summary {
    cursor: pointer;
    min-height: 44px;
    font-size: 0.86rem;
  }
  .quote .arabic {
    font-size: 1.45rem;
  }
  .section-top {
    align-items: start;
  }
  .section-top h2 {
    font-size: 2rem;
  }
  .section-top .count-note {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .filters {
    gap: 14px;
  }
  .select-row {
    width: 100%;
    justify-content: space-between;
  }
  .select-row select {
    flex: 1;
  }
  .chips {
    gap: 6px;
  }
  .chips a,
  .chips button {
    font-size: 0.77rem;
    padding: 8px 12px;
  }
  .card {
    padding: 23px;
  }
  .quiet-banner {
    display: block;
  }
  .footer {
    flex-direction: column;
  }
  .footer a {
    margin: 0 20px 0 0;
  }
  .reader-wrap {
    padding: 22px 16px 45px;
  }
  .reader {
    padding: 25px 22px;
  }
  .reader .arabic {
    font-size: calc(2rem * var(--reading));
  }
  .toolbar button {
    font-size: 0.8rem;
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  header,
  .toolbar,
  .footer,
  .back,
  .toast {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  .reader {
    border: 0;
    padding: 0;
  }
  .reader details {
    display: block;
  }
  .reader-wrap {
    max-width: 100%;
  }
}

.bundles {
  padding: 20px 0 48px;
  scroll-margin-top: 20px;
}
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.bundle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bundle-art {
  background: #edf0e4;
  height: 148px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bundle-art.evening {
  background: #f0e7d9;
}
.bundle-art.sleep {
  background: #1d3c37;
}
.bundle-art svg {
  width: 220px;
  height: 140px;
}
.bundle-body {
  padding: 23px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.bundle-body h3 {
  font: 1.8rem Georgia, serif;
  margin: 8px 0 12px;
}
.bundle-body p {
  font-size: 0.86rem;
  color: var(--muted);
}
.bundle-body .button {
  margin-top: auto;
  align-self: start;
}
.bundle-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 6px 0 18px;
}
.rise {
  animation: sunrise 2.3s ease-out both;
}
.set {
  animation: sunset 2.3s ease-out both;
}
.stars {
  animation: starlight 2.3s ease-out both;
}
.moon {
  animation: moonrise 2.3s ease-out both;
}
@keyframes sunrise {
  from {
    transform: translateY(30px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes sunset {
  from {
    transform: translateY(-22px);
    opacity: 0.4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes starlight {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes moonrise {
  from {
    transform: translateY(10px);
    opacity: 0.3;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.bundle-hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: center;
  margin-top: 25px;
}
.bundle-hero h1 {
  font-size: 3.4rem;
  margin: 10px 0 16px;
}
.bundle-hero .bundle-art {
  border-radius: 90px 90px 18px 18px;
  height: 170px;
}
.bundle-hero svg {
  width: 170px;
}
.bundle-note {
  background: var(--soft);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.85rem;
  margin: 20px 0;
  color: var(--ink);
}
.bundle-note summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}
.bundle-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.bundle-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.bundle-list li {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.bundle-list .number {
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.bundle-list a {
  text-decoration: none;
  font-weight: 600;
}
.bundle-list small {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 400;
}
.bundle-list .arrow {
  margin-left: auto;
}
.progress-shell {
  margin: 20px 0 30px;
}
.progress-shell p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 6px;
  border: 0;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  accent-color: var(--green);
}
progress::-webkit-progress-bar {
  background: var(--soft);
}
progress::-webkit-progress-value {
  background: var(--green);
}
.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.reading-source {
  font-size: 0.8rem;
  color: var(--muted);
}
.all-items .reader {
  margin: 24px 0;
}
.all-items h2 {
  font-size: 1.8rem;
}
.basmala {
  margin-bottom: 15px !important;
  font-size: calc(1.7rem * var(--reading)) !important;
}
.bundle-card:hover {
  border-color: var(--control);
  box-shadow: var(--shadow);
}
.bundle-card:hover .button {
  background: var(--soft);
}
.bundle-card:hover .primary {
  background: var(--green);
}
@media (max-width: 850px) {
  .bundle-grid {
    gap: 12px;
  }
  .bundle-body {
    padding: 18px;
  }
  .head nav {
    gap: 14px;
  }
}
@media (max-width: 650px) {
  .bundle-grid {
    grid-template-columns: 1fr;
  }
  .bundle-card {
    display: grid;
    grid-template-columns: 110px 1fr;
  }
  .bundle-art {
    height: 100%;
    min-height: 220px;
  }
  .bundle-art svg {
    width: 160px;
    max-width: none;
    transform: translateX(-10px);
  }
  .bundle-body h3 {
    font-size: 1.6rem;
  }
  .bundle-hero {
    grid-template-columns: 1fr 100px;
    gap: 12px;
  }
  .bundle-hero h1 {
    font-size: 2.4rem;
  }
  .bundle-hero .bundle-art {
    height: 130px;
    min-height: 0;
  }
  .bundle-hero svg {
    width: 130px;
  }
  .head nav {
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .head nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  .reader-nav .button {
    flex: 1;
  }
  .bundles .section-top {
    flex-direction: column;
    align-items: start;
  }
  .bundle-list {
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rise,
  .set,
  .stars,
  .moon {
    animation: none !important;
  }
}
