/* Silent Development. Dark by default; light when the visitor switches. */
:root,
:root[data-theme="dark"] {
  --bg: #0f1411;
  --surface: #161d19;
  --surface-hover: #1c2520;
  --border: #26312b;
  --text: #e6ece8;
  --muted: #95a39b;
  --accent: #4fbf7a;        /* card-table green, lifted for dark backgrounds */
  --accent-ink: #0b1a11;
  --chip: #1f2924;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .25);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-hover: #fbfcfa;
  --border: #dfe4dd;
  --text: #17201b;
  --muted: #5d6b63;
  --accent: #1e7a45;
  --accent-ink: #ffffff;
  --chip: #eef1ec;
  --shadow: 0 1px 2px rgb(20 40 28 / .06), 0 8px 24px rgb(20 40 28 / .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: background-color .2s, color .2s;
}
main, .site-header, .site-footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
main { flex: 1; }
a { color: var(--accent); }
img { display: block; }

/* Header: the mark is masked from mark.svg and painted with currentColor. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}
.mark {
  width: 40px;
  height: 46px;
  background: currentColor;
  -webkit-mask: url(assets/mark.svg) center / contain no-repeat;
  mask: url(assets/mark.svg) center / contain no-repeat;
}
.brand-name {
  font-family: "Avenir Next", Avenir, Futura, "Century Gothic", "Jost", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }

/* Intro */
.intro { padding: 40px 0 36px; }
.intro h1, .app-page h1 {
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.intro h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.intro p, .lede { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* Tiles: 1 per row on phones, up to 4 on wide screens. */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0 0 48px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}
.tile a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform .15s, background-color .15s, border-color .15s;
}
.tile a:hover, .tile a:focus-visible {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tile-icon {
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.tile.is-soon .tile-icon { opacity: .85; }
.tile-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tile-name { font-weight: 600; font-size: 1.1rem; }
.tile-tagline { color: var(--muted); font-size: .95rem; flex: 1; }

.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font-size: .78rem;
}
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  vertical-align: middle;
}
.badge-beta { border-color: var(--accent); color: var(--accent); }

/* App page */
.back { margin: 8px 0 24px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--text); }
.app-page { max-width: 720px; padding-bottom: 56px; }
.app-head { display: flex; gap: 24px; align-items: center; margin-bottom: 28px; }
.app-icon { width: 128px; height: 128px; border-radius: 22.5%; box-shadow: var(--shadow); flex: none; }
.app-page h1 { font-size: 2.2rem; }
.app-page h2 { margin: 40px 0 8px; font-size: 1.2rem; font-weight: 600; }
.app-page section { scroll-margin-top: 24px; }
.features { padding-left: 1.2em; color: var(--text); }
.features li { margin: 4px 0; }
.features li::marker { color: var(--accent); }
.actions { margin: 28px 0 0; }
.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.button.is-disabled { background: var(--chip); color: var(--muted); }

.plain-list { padding-left: 1.2em; }

.site-footer {
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}
.site-footer p { margin: 0; }

@media (max-width: 560px) {
  main, .site-header, .site-footer { padding-left: 16px; padding-right: 16px; }
  .brand-name { font-size: .95rem; letter-spacing: .2em; }
  .mark { width: 32px; height: 37px; }
  .app-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .app-icon { width: 96px; height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Header navigation */
.site-header { flex-wrap: wrap; gap: 12px 24px; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .theme-toggle { margin-left: 4px; }

/* Buy me a coffee: their brand yellow, so it reads as theirs at a glance. */
.coffee {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 12px 18px 12px 14px;
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.coffee:hover, .coffee:focus-visible { border-color: #ffdd00; transform: translateY(-1px); }
.coffee-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffdd00;
}
.coffee-logo img { width: 20px; height: auto; }
.coffee-logo { font-size: 1.3rem; }
.coffee-text { display: flex; flex-direction: column; line-height: 1.4; }
.coffee-text strong { font-weight: 600; }
.coffee-text span { color: var(--muted); font-size: .9rem; }
.intro .coffee { margin-top: 28px; }

/* About page */
.prose { max-width: 680px; padding: 16px 0 56px; }
.prose h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 600; letter-spacing: -.02em; }
.prose h2 { margin: 44px 0 12px; font-size: 1.25rem; font-weight: 600; }
.ethos { margin: 0; }
.ethos dt { margin-top: 20px; font-weight: 600; color: var(--accent); }
.ethos dd { margin: 4px 0 0; }

@media (max-width: 560px) {
  .site-nav { gap: 10px 16px; flex-wrap: wrap; }
  .coffee { display: flex; }
}

/* Bullet lists: short points with a green marker. */
.points { margin: 0; padding-left: 1.2em; }
.points li { margin: 6px 0; }
.points li::marker { color: var(--accent); }
.points strong { color: var(--text); }
.intro-points { color: var(--muted); font-size: 1.1rem; }
.intro-points a { color: var(--accent); }
.lede-points { color: var(--muted); font-size: 1.15rem; }
.ethos li { margin: 12px 0; }
.app-page h2 + .points, .prose h2 + .points { margin-top: 4px; }
.note { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }

/* Footer: a row of links, wrapping on phones. */
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
