/* Alter Academy app pages. Plain CSS, no build step.
   Colours and sizes are the phone app's tokens (apps/mobile/lib/core/tokens), same names as
   apps/admin/src/styles/tokens.css, plus the phone's dark theme. Inter is self-hosted (OFL). */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #faf8f4;
  --s1: #ffffff;
  --s2: #f3f0ea;
  --line: #e4dfd6;
  --line2: #cfc8bc;
  --tx: #121210;
  --tx2: #2e2b26;
  --t2: #5d584f; /* secondary text: 6.6:1 on the page. The faint --t3 is never used for text. */
  --accent: #f59e0b;
  --accent-fg: #d97706;
  --accent-ink: #9a5200;
  --on-accent: #121210;
  --accent-tint: rgba(245, 158, 11, 0.14);
  --accent-line: rgba(217, 119, 6, 0.45);
  --r-card: 16px;
  --r-input: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121210;
    --s1: #1a1a17;
    --s2: #22211d;
    --line: #2b2a25;
    --line2: #3d3b35;
    --tx: #f3f0ea;
    --tx2: #dcd7cd;
    --t2: #b4aea3;
    --accent-fg: #f59e0b;
    --accent-ink: #fbbf24;
    --accent-tint: rgba(245, 158, 11, 0.14);
    --accent-line: rgba(245, 158, 11, 0.42);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx2);
  font:
    500 15px/1.6 'Inter',
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* One column with a 16 px gutter; it also works at phone width. */
.top,
main,
.foot {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding-inline: 16px;
}

.top {
  padding-block: 20px 8px;
}

.brand {
  display: inline-block;
  line-height: 0;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

main {
  padding-block: 16px 40px;
}

h1 {
  margin: 8px 0 12px;
  color: var(--tx);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h2 {
  margin: 28px 0 6px;
  color: var(--tx);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

strong {
  color: var(--tx);
  font-weight: 650;
}

:focus-visible {
  outline: 3px solid var(--accent-fg);
  outline-offset: 2px;
}

.lead {
  color: var(--tx2);
  font-size: 16px;
}

.updated {
  color: var(--t2);
  font-size: 13px;
}

/* A box for a heads-up: draft legal text, or "this cannot be undone". */
.note {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-card);
  background: var(--accent-tint);
  color: var(--tx);
  font-size: 14px;
}

.note p:last-child {
  margin-bottom: 0;
}

.card {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--s1);
}

.card h2 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: var(--r-input);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.foot {
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  color: var(--t2);
  font-size: 13px;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot li {
  margin: 0;
}

/* Padding makes each footer link at least 24 px high (WCAG 2.2 target size). */
.foot a {
  display: inline-block;
  padding-block: 6px;
  color: var(--t2);
}

@media (min-width: 720px) {
  h1 {
    font-size: 34px;
  }
}
