:root {
  color-scheme: light dark;
  --background: light-dark(#f2efe7, #07090e);
  --surface: light-dark(#faf8f3, #101520);
  --border: light-dark(#cfc8b6, #313e57);
  --text: light-dark(#0c1017, #efece4);
  --muted: light-dark(#4a5160, #aab4c8);
  --accent: light-dark(#80570d, #dfb257);
  --action-text: light-dark(#fffaf0, #090b10);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
p, h1, h2, h3 { margin: 0; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--accent); text-underline-offset: 0.25em; }
button, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 5rem;
}
.site-header { border-block-end: 1px solid var(--border); }
.brand, .preferences, .launch-actions, .site-footer nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.brand { font-family: Georgia, serif; font-weight: 700; }

button, select, .button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button:hover, select:hover { border-color: var(--accent); }
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--action-text);
  font-weight: 700;
  text-decoration: none;
}
.button.primary:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 8vw, 7rem);
}
.platform { font-size: 0.875rem; font-variant-numeric: tabular-nums; color: var(--accent); text-align: start; }
.intro h1 {
  margin-block: 0.4rem 1rem;
  font-family: Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.05;
}
[lang="ar"] .intro h1 { font-family: inherit; line-height: 1.22; }
[dir="rtl"] .platform { text-align: right; }
.lead { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; max-width: 36rem; margin-block-end: 1.5rem; }
.hint { margin-block-start: 0.75rem; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.hint code { display: inline-block; overflow-wrap: anywhere; }
.launch {
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.launch h2 { font-size: 1.3rem; margin-block-end: 0.5rem; }
.launch p, .features p { color: var(--muted); line-height: 1.55; }
.launch pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0e131d;
  color: #f5d487;
  border: 1px solid #313e57;
  padding: 0.85rem;
  border-radius: 0.5rem;
  line-height: 1.65;
  font-size: 0.875rem;
}
.copy-status:empty { display: none; }
.copy-status { margin-block-start: 0.65rem; font-size: 0.875rem; }
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--border);
}
.features article { padding: 1.25rem; }
.features article + article { border-inline-start: 1px solid var(--border); }
.features h3 { font-size: 1.05rem; margin-block-end: 0.45rem; }
.site-footer { color: var(--muted); font-size: 0.875rem; padding-block: 0.75rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 44rem) {
  .shell { width: min(100% - 2rem, 70rem); }
  .site-header { padding-block: 0.75rem; }
  .hero, .features { grid-template-columns: minmax(0, 1fr); }
  .features article + article { border-inline-start: 0; border-block-start: 1px solid var(--border); }
}
