:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --surface: #fffaf2;
  --surface-strong: #f0e5d4;
  --ink: #1f2a24;
  --muted: #657268;
  --accent: #526c57;
  --accent-dark: #314737;
  --line: #dfd4c4;
  --danger: #8a3d32;
  --shadow: 0 18px 50px rgba(68, 54, 35, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #efe3cf 0, transparent 34rem), var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a,
.back-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
}

.nav a:hover,
.back-link:hover {
  background: rgba(82, 108, 87, 0.1);
  color: var(--accent-dark);
}

.app {
  min-height: calc(100vh - 190px);
  padding: 26px 0 56px;
  outline: none;
}

.hero {
  max-width: 840px;
  padding: 66px 0 46px;
}

.eyebrow,
.section-label {
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin-bottom: 20px;
}

h1 span {
  color: var(--muted);
  display: block;
  font-size: 0.45em;
  letter-spacing: 0;
  margin-top: 10px;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.lead,
.page-heading p {
  color: var(--muted);
  font-size: 1.14rem;
  max-width: 720px;
}

.actions,
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  cursor: pointer;
  display: inline-flex;
  font: 700 0.95rem Arial, sans-serif;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fffaf2;
}

.button.danger {
  color: var(--danger);
}

.principles,
.journey {
  display: grid;
  gap: 16px;
}

.principles {
  grid-template-columns: repeat(3, 1fr);
}

.principles article,
.panel,
.source-note,
.saved-card,
.verse-card {
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading.narrow {
  max-width: 760px;
}

.verse-list {
  display: grid;
  gap: 14px;
}

.verse-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.verse-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.verse-number,
.saved-meta {
  color: var(--muted);
  font: 700 0.84rem Arial, sans-serif;
}

.arabic {
  font-family: "Traditional Arabic", "Amiri", "Scheherazade New", serif;
  font-size: 1.75rem;
  line-height: 1.9;
}

.arabic.large {
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1.8;
  margin-bottom: 12px;
}

.translation {
  color: var(--accent-dark);
  font-size: 1.2rem;
}

.small-note,
.status,
.source-note,
.site-footer {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.read-panel {
  background: linear-gradient(145deg, #fffaf2, #efe4d2);
}

.panel ul,
.panel ol,
.source-note ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.journal-panel label,
.filter-label {
  display: block;
  font: 700 0.92rem Arial, sans-serif;
  margin-bottom: 8px;
}

textarea,
select {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  font: inherit;
  padding: 14px 16px;
  width: 100%;
}

textarea:focus,
select:focus,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(82, 108, 87, 0.25);
  outline-offset: 3px;
}

.saved-list {
  display: grid;
  gap: 16px;
}

.saved-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.empty-state {
  background: rgba(255, 250, 242, 0.7);
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  padding: 24px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 34px;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principles article,
  .panel,
  .source-note,
  .saved-card,
  .verse-card {
    border-radius: 22px;
    padding: 20px;
  }

  .saved-meta {
    flex-direction: column;
  }
}
