/* Phone-first: everything is designed at 360px wide, portrait. Wider screens only centre the column. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #5f5c55;
  --line: #e2ded5;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --radius: 16px;
  --tap: 64px; /* minimum height of any main button */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1f1e1b;
    --text: #f3f1ec;
    --muted: #aaa69d;
    --line: #34322d;
    --accent: #ff7a2f;
    --accent-text: #141412;
  }
}

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

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 18px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.page {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* Brand bar: the mark + wordmark, linking home from every page. See BRAND.md. */
.brandbar { display: flex; align-items: center; min-height: 48px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 0;
  text-decoration: none;
  color: var(--accent);
}

.brand-mark { width: 28px; height: 28px; flex: none; }

.wordmark {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tagline { font-size: 1.25rem; font-weight: 700; margin: 4px 0 0; }

h1 { font-size: 1.5rem; line-height: 1.2; margin: 8px 0; }

.muted { color: var(--muted); }

/* The tool fills the middle; the main action sits in the bottom third where a thumb reaches. */
.tool { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; min-height: 40dvh; }

.actions {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
}

.btn {
  min-height: var(--tap);
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation; /* no double-tap zoom delay */
}

.btn-main { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

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

/* Ads and long text live below the tool and never push the buttons around. */
.below { padding-top: 24px; border-top: 1px solid var(--line); }

.app-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }

.app-card {
  display: block;
  min-height: 88px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}

.app-card strong { display: block; font-size: 1.25rem; }

.app-card.soon { opacity: 0.6; }

.prose h2 { font-size: 1.2rem; margin-top: 24px; }

footer { margin-top: auto; padding-top: 24px; font-size: 0.9rem; color: var(--muted); }

footer a { display: inline-block; margin-right: 12px; padding: 8px 0; }
