:root {
  --bg: #fbfcf8;
  --surface: #f1f5e9;
  --text: #1c2117;
  --muted: #5a6352;
  --accent: #3f6212;
  --accent-soft: #d9f99d;
  --line: #dde3d3;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12150f;
    --surface: #1b2016;
    --text: #e8ece2;
    --muted: #a2ab98;
    --accent: #bef264;
    --accent-soft: #2c3a14;
    --line: #2d3426;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main, header, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header { padding-top: 2rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand svg { width: 2rem; height: 2rem; }

h1 { font-size: 2.2rem; line-height: 1.2; margin: 2.5rem 0 0.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.25rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }

.lead { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1rem 0;
}

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

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.summary {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 0.25rem;
  margin: 1.5rem 0;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0 0 0.25rem; }

ol.steps { padding-left: 1.5rem; margin: 0 0 1rem; }
ol.steps li { margin-bottom: 0.6rem; padding-left: 0.25rem; }

details {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
}

details:first-of-type { border-top: 1px solid var(--line); }

summary {
  cursor: pointer;
  font-weight: 600;
}

details p { margin: 0.6rem 0 0.25rem; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border-radius: 0.3rem;
  padding: 0.05rem 0.3rem;
}

.small { font-size: 0.9rem; }

/* StorySlice page: the app's own colours (BrandColors in the app), scoped to this page. */
.app-storyslice {
  --bg: #fafbfd;
  --surface: #eef0f6;
  --text: #141722;
  --muted: #555d70;
  --accent: #c7254a;
  --accent-soft: #ffe1e6;
  --line: #dde1ea;
}

@media (prefers-color-scheme: dark) {
  .app-storyslice {
    --bg: #0c0e13;
    --surface: #161a24;
    --text: #e9ecf3;
    --muted: #9aa3b6;
    --accent: #ff8a52;
    --accent-soft: #3a1f2a;
    --line: #262b38;
  }
}

.app-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 2rem 0 1.5rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, #1c2030, #0c0e13);
  border: 1px solid var(--line);
  color: #ffffff;
}

.app-hero h1 { margin: 0 0 0.35rem; color: #ffffff; }

.app-icon {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 22%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-tagline { font-size: 1.15rem; color: #d5dae6; margin-bottom: 0.75rem; }

.app-meta { margin: 0; color: #b4bccd; font-size: 0.95rem; }

.app-hero .tag {
  background: linear-gradient(135deg, #ff8a52, #ff4d6d);
  color: #0c0e13;
  margin-right: 0.4rem;
}

@media (max-width: 30rem) {
  .app-hero { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
  .app-icon { width: 72px; height: 72px; }
}

.app-storyslice ol.steps { list-style: none; padding-left: 0; counter-reset: step; }

.app-storyslice ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  min-height: 1.9rem;
}

.app-storyslice ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a52, #ff4d6d);
  color: #0c0e13;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.8rem;
  text-align: center;
}
