:root {
  color-scheme: light;
  --start-paper: #f5f3ed;
  --start-surface: #fffdf8;
  --start-ink: #17382f;
  --start-muted: #445c51;
  --start-line: #d5ded3;
  --start-green: #133e34;
  --start-gold: #f1d6a5;
  font: 16px/1.65 system-ui, "Noto Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--start-paper); color: var(--start-ink); }
a { color: inherit; text-underline-offset: .22em; }
:is(a, summary):focus-visible { outline: 3px solid #a3621e; outline-offset: 4px; }

.start-header, .start-shell, .start-footer {
  inline-size: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.start-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: 4.75rem;
}

.start-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-block-size: 44px;
  font: 650 1.5rem/1.2 Georgia, "Noto Naskh Arabic", serif;
  text-decoration: none;
}

.start-language-menu summary {
  min-block-size: 44px;
  padding: .5rem .85rem;
  border: 1px solid var(--start-line);
  border-radius: .7rem;
  background: var(--start-surface);
  cursor: pointer;
}

.start-language-menu ul {
  position: absolute;
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  inline-size: min(100%, 30rem);
  margin: .45rem 0 0;
  padding: .65rem;
  list-style: none;
  background: var(--start-surface);
  border: 1px solid var(--start-line);
  border-radius: .9rem;
  box-shadow: 0 12px 28px #12382b22;
}

.start-language-menu a {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: .4rem;
  border-radius: .45rem;
  overflow-wrap: anywhere;
}

.start-language-menu a:is(:hover, [aria-current]) { background: #e4eee7; }

.start-hero {
  --start-fade: 90deg;
  display: flex;
  align-items: center;
  min-block-size: 21rem;
  padding: clamp(1.25rem, 5vw, 4rem);
  border-radius: 1.4rem;
  background: linear-gradient(var(--start-fade), #103729 12%, #103729eb 49%, #10372954 100%),
              #103729 url("/sakinah-morning-courtyard-750.webp") center 56% / cover;
  color: #fffaf0;
}

[dir="rtl"] .start-hero { --start-fade: 270deg; }
.start-hero-copy { max-inline-size: 40rem; }
.start-hero h1, .start-lesson h2 {
  margin: 0 0 .7rem;
  font-family: Georgia, "Noto Naskh Arabic", serif;
  font-weight: 650;
  line-height: 1.2;
  text-wrap: balance;
}
.start-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.4rem); }
.start-hero p { margin: 0; max-inline-size: 58ch; color: #f0ede2; }

.start-actions, .start-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem .9rem;
  margin-block-start: 1.3rem;
}

.start-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-block-size: 44px;
  max-inline-size: 100%;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: var(--start-green);
  color: #fffdf8;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.start-hero .start-button { background: var(--start-gold); color: #16392e; }
.start-hero .start-button-secondary {
  border-color: #fffaf07a;
  background: #113b30;
  color: #fffaf0;
}
.start-hero .start-button:focus-visible { outline-color: var(--start-gold); }
.start-button:hover { filter: brightness(1.08); }

.start-lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}

.start-lesson {
  display: flex;
  flex-direction: column;
  padding: clamp(1.1rem, 3.5vw, 2rem);
  border: 1px solid var(--start-line);
  border-radius: 1.1rem;
  background: var(--start-surface);
  scroll-margin-block-start: 1rem;
}

.start-lesson h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.start-lesson h3 { margin: 1rem 0 .4rem; font-size: 1.05rem; }
.start-lesson p { margin: 0 0 .35rem; color: var(--start-muted); }
.start-lesson-actions { margin-block-start: auto; padding-block-start: .85rem; }
.start-source { display: inline-flex; align-items: center; min-block-size: 44px; font-size: .875rem; }

.start-tool-links, .start-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding-block: .8rem;
}

.start-tool-links a, .start-footer a {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
}

.start-tool-links a {
  padding: .4rem .85rem;
  border: 1px solid var(--start-line);
  border-radius: .7rem;
  background: var(--start-surface);
  text-decoration: none;
}
.start-tool-links a:hover { background: #e4eee7; }
.start-footer { margin-block-start: .8rem; border-block-start: 1px solid var(--start-line); color: var(--start-muted); }

@media (max-width: 44rem) {
  .start-hero { min-block-size: 0; }
  .start-lesson-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 24rem) {
  .start-language-menu ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
