/* Tekstvast website. Same calm look as the app: warm off-white page, near-black text,
   neutral greys that meet WCAG AA, no meaning carried by colour alone. */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-raised: #EFEFEC;
  --text: #111113;
  --text-2: #4E4E53;
  --text-3: #646469;
  --line: #E2E2DE;
  --inverse: #111113;
  --on-inverse: #FFFFFF;
  --focus: #111113;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0B;
    --surface: #151517;
    --surface-raised: #1E1E21;
    --text: #F4F4F2;
    --text-2: #B0B0B5;
    --text-3: #8E8E94;
    --line: #2A2A2E;
    --inverse: #F4F4F2;
    --on-inverse: #0B0B0C;
    --focus: #F4F4F2;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 1.1rem; font-size: 0.95rem; color: var(--text-2); }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Type */
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.1rem, 6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; letter-spacing: -0.015em; margin: 2.6rem 0 0.75rem; line-height: 1.25; }
h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 36rem; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; color: var(--text-3); }

/* Hero */
.hero { padding: 2.5rem 0 1rem; }
.hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); margin-bottom: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line);
}
.pill.primary { background: var(--inverse); color: var(--on-inverse); border-color: var(--inverse); }
.pill.secondary { background: var(--surface-raised); color: var(--text); }
.pill.primary:hover, .pill.secondary:hover { text-decoration: none; filter: brightness(0.94); }
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-2);
  background: var(--surface-raised); border-radius: 999px; padding: 0.35rem 0.85rem; margin-top: 1.25rem; }
.status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--text); }

/* Cards */
.cards { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin: 1.5rem 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; }
.card .icon { font-size: 1.4rem; line-height: 1; display: inline-block; margin-bottom: 0.6rem; }
.card p { margin: 0; color: var(--text-2); font-size: 0.97rem; }

/* Own-line sample, same visual language as the app: bar + JIJ tag, not colour */
.sample { margin-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1.5rem 0 0; }
.line { padding: 0.55rem 0.8rem; border-radius: var(--radius-sm); }
.line + .line { margin-top: 0.3rem; }
.role { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 0.45rem; }
.line p { margin: 0.1rem 0 0; }
.dir { font-style: italic; color: var(--text-3); }
.line.mine { background: var(--surface-raised); box-shadow: inset 4px 0 0 var(--inverse); }
.line.mine .role { color: var(--text); font-weight: 800; }
.tag { background: var(--inverse); color: var(--on-inverse); border-radius: 999px; padding: 0 0.45rem; font-size: 0.68rem; letter-spacing: 0.06em; }

/* Prose pages */
.prose { padding: 1.5rem 0 1rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin: 1.25rem 0; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
dl.facts { display: grid; grid-template-columns: 1fr; gap: 0.2rem 1rem; margin: 0; }
@media (min-width: 560px) { dl.facts { grid-template-columns: 11rem 1fr; } }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0 0 0.6rem; color: var(--text-2); }

code {
  font: 0.88em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--surface-raised); border-radius: 6px; padding: 0.08em 0.35em;
  white-space: nowrap;
}

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin: 0 0 0.6rem; }
summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details[open] summary { margin-bottom: 0.5rem; }
details p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3.5rem; padding: 1.5rem 0 2.5rem; font-size: 0.9rem; color: var(--text-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.1rem; }

@media (prefers-reduced-motion: no-preference) {
  .pill { transition: filter 0.15s ease; }
}
