@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #07070b;
  --bg-elevated: #0d0d14;
  --surface: #14141d;
  --surface-alt: #1b1b26;
  --surface-high: #24242f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f7f7fa;
  --text-secondary: #a3a3b3;
  --text-tertiary: #6e6e80;
  --accent: #9b84ff;
  --accent-muted: rgba(155, 132, 255, 0.16);
  --gradient: linear-gradient(90deg, #7c5cff 0%, #d946a8 50%, #ff7a59 100%);
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 96px;
}

header.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0 8px;
}

.mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mark svg {
  width: 16px;
  height: 16px;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.hero {
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1 {
  font-weight: 800;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0 0 10px;
}

.meta {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 24px;
}

.crosslink {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.crosslink a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.crosslink a:hover {
  text-decoration: underline;
}

nav.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 36px;
}

nav.toc .toc-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

nav.toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  -webkit-columns: 2;
}

nav.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

nav.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}

nav.toc a:hover {
  color: var(--text-primary);
}

section {
  margin-bottom: 30px;
  scroll-margin-top: 24px;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 0 12px;
  padding-top: 4px;
}

h2 .num {
  color: var(--accent);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin: 0 0 12px;
}

ul,
ol.plain {
  color: var(--text-secondary);
  font-size: 14.5px;
  padding-left: 20px;
  margin: 0 0 12px;
}

li {
  margin-bottom: 6px;
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

a {
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 16px 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13.5px;
  margin: 10px 0 20px;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

th {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: var(--surface-alt);
}

tr:last-child td {
  border-bottom: none;
}

td strong {
  display: block;
  margin-bottom: 2px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}

.pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 12.5px;
}

footer a {
  color: var(--text-tertiary);
}

@media (max-width: 480px) {
  h1 {
    font-size: 26px;
  }
  nav.toc ol {
    columns: 1;
    -webkit-columns: 1;
  }
}

/* Habitfern: the app's green and cream, instead of the Clipper purple. */
:root {
  --accent: #8FE0B0;
  --accent-muted: rgba(143, 224, 176, 0.14);
  --gradient: linear-gradient(90deg, #2F6F4E 0%, #5DA47A 55%, #C2601C 100%);
}
