/* Design tokens and the parts both pages share. Neo-brutalist: paper, thick ink
   outlines, hard offset shadows, one saturated colour per app. */
:root {
  color-scheme: light dark;
  --paper: oklch(96.5% 0.025 85);
  --surface: oklch(99% 0.01 85);
  --ink: oklch(20% 0.02 60);
  --ink-soft: oklch(42% 0.02 60);
  --accent: oklch(68% 0.2 38);
  --accent-ink: oklch(18% 0.02 40);
  --lemon: oklch(90% 0.16 100);
  --mint: oklch(84% 0.13 165);
  --danger: oklch(55% 0.22 27);

  --font: -apple-system, BlinkMacSystemFont, 'Sukhumvit Set', 'Thonburi', 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
  --border: 2px solid var(--ink);
  --radius: 18px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lift: 7px 7px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 40px);
  --duration: 150ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme='dark'] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: oklch(20% 0.02 60);
    --surface: oklch(26% 0.02 60);
    --ink: oklch(95% 0.02 85);
    --ink-soft: oklch(78% 0.02 85);
    --accent: oklch(72% 0.19 38);
    --accent-ink: oklch(18% 0.02 40);
    --lemon: oklch(82% 0.15 100);
    --danger: oklch(72% 0.19 27);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  position: relative;
}
/* paper grain */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(100%, 1120px); margin-inline: auto; padding-inline: var(--gutter); }

/* app icon: the rounded square every app gets */
.icon {
  border: var(--border);
  border-radius: 22%;
  background: #fff; /* sites ship transparent icons drawn for a light page */
  object-fit: cover;
  flex: none;
}

.btn {
  font: 600 0.95rem/1 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  min-height: 44px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-danger { color: var(--danger); }
.btn-small { min-height: 36px; padding: 0.5rem 0.8rem; font-size: 0.85rem; box-shadow: 2px 2px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
