/* Palette taken from the logo: the rust of its background and the silver of the calligraphy. */
:root {
  --rust: #7f3b24;
  --page: #efeeeb;
  --panel: #ffffff;
  --line: #d6d3ce;
  --ink: #26221f;
  --muted: #69635d;
  --hover: #f6f5f3;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1b1816;
    --panel: #25211e;
    --line: #3b3632;
    --ink: #eeeae5;
    --muted: #aaa39c;
    --hover: #2d2925;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

/* The logo is the page's one bold element: it fills a rust band and fades into it at the edges. */
.crest {
  display: flex;
  justify-content: center;
  height: calc(clamp(200px, 34vh, 300px) + env(safe-area-inset-top));
  padding-block: calc(0.75rem + env(safe-area-inset-top)) 0.25rem;
  background: var(--rust);
  overflow: hidden;
}

.crest img {
  height: 100%;
  width: auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.75rem 1rem calc(2rem + env(safe-area-inset-bottom));
}

h1 {
  margin: 0 0 0.75rem;
  padding-inline: 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

/* One grouped list, the rows split by hairlines, like a phone's settings screen. */
.apps {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.apps li + li { border-top: 1px solid var(--line); }

.apps a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 0.875rem;
  align-items: center;
  min-height: 4.5rem;
  padding: 0.875rem 1rem;
  color: inherit;
  text-decoration: none;
}

.apps a:hover { background: var(--hover); }

.apps a:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: -3px;
  border-radius: 14px;
}

@media (prefers-color-scheme: dark) {
  .apps a:focus-visible { outline-color: #d9a48f; }
}

.apps img {
  grid-row: 1 / span 3;
  width: 48px;
  height: 48px;
  border-radius: 11px;
}

.apps a::after {
  content: "";
  grid-column: 3;
  grid-row: 1 / span 3;
  width: 0.5rem;
  height: 0.5rem;
  /* Left and bottom borders turned 45deg: a chevron pointing left, forward in Arabic. */
  border-inline-end: 2px solid var(--muted);
  border-block-end: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-inline-start: 0.25rem;
}

.name {
  grid-column: 2;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  text-align: start;
}

.name[dir="ltr"] { text-align: right; }

.what {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.where {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: right;
}
