/* Ayam · legal & support pages. Same palette as the app ("Living Calendar"). */
:root {
  --cobalt: #1f3fd8;
  --mint: #7fe0a6;
  --vermilion: #ff5a36;
  --paper: #f5f2ea;
  --surface: #fcfaf5;
  --ink: #121212;
  --muted: rgba(18, 18, 18, 0.62);
  --hairline: rgba(18, 18, 18, 0.14);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f10;
    --surface: #1c1c1f;
    --ink: #f5f2ea;
    --muted: rgba(245, 242, 234, 0.62);
    --hairline: rgba(245, 242, 234, 0.16);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }

.shell {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

/* Poster hero: cobalt field with a cropped vermilion disc */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--cobalt);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 28px 30px;
  margin-bottom: 28px;
}
.hero::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  right: -70px; top: -60px;
  border-radius: 50%;
  background: var(--vermilion);
}
.hero > * { position: relative; z-index: 1; }
.hero .brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.hero .brand img { width: 44px; height: 44px; border-radius: 10px; }
.hero .brand span { font-weight: 800; font-size: 20px; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.85;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 18px;
  font-size: 14px; opacity: 0.9;
}

/* Language switch: chips like the app's filters */
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.langs a {
  text-decoration: none;
  font-weight: 600; font-size: 15px;
  padding: 7px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: 6px;
}
.langs a:first-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.back { display: inline-block; margin-bottom: 18px; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }

article { margin-bottom: 48px; }
article > h2 {
  font-size: 28px; font-weight: 900; line-height: 1.15;
  margin: 0 0 6px; letter-spacing: -0.01em;
}
article > .lang-label { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
h3 {
  font-size: 18px; font-weight: 800;
  margin: 28px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
p, li { max-width: 68ch; }
ul { padding-inline-start: 1.2em; }
li { margin: 4px 0; }

.callout {
  background: var(--mint);
  color: #121212;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-weight: 600;
  margin: 18px 0 8px;
}

/* Arabic: right-to-left, no letter-spacing, slightly larger */
[dir="rtl"] { font-size: 18px; }
[dir="rtl"] .eyebrow, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; text-transform: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 28px; }
.card {
  display: block; text-decoration: none;
  border-radius: var(--radius);
  padding: 20px;
  min-height: 120px;
  font-weight: 800; font-size: 20px;
}
.card small { display: block; font-weight: 500; font-size: 14px; margin-top: 8px; opacity: 0.85; }
.card.mint { background: var(--mint); color: #121212; }
.card.vermilion { background: var(--vermilion); color: #121212; }
.card.surface { background: var(--surface); border: 1px solid var(--hairline); }

footer {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
}
footer .rule { flex: 1; height: 1px; background: var(--hairline); }
footer .ar { letter-spacing: 0; text-transform: none; font-size: 14px; }
