/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens (Curlify app – light theme) ── */
:root {
  --bg:           #fcfaf8;
  --surface:      #ffffff;
  --surface-2:    #f5f2ef;
  --border:       #e8e2da;
  --text:         #1a1a1a;
  --text-dim:     #6b7280;
  --text-muted:   #9ca3af;
  --tint:         #6366f1;
  --tint-light:   #818cf8;
  --tint-dim:     rgba(99, 102, 241, 0.07);
  --tint-border:  rgba(99, 102, 241, 0.18);
  --warn-bg:      #fffbeb;
  --warn-border:  #f59e0b;
  --warn-text:    #92400e;
  --radius:       14px;
  --radius-sm:    10px;
}

/* ── Base ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  background: rgba(252, 250, 248, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  z-index: 10;
}

nav a {
  color: var(--tint);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

nav a:hover { color: var(--tint-light); }

/* ── Page layout ── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

/* ── Headings ── */
h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

h2 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: var(--tint);
  border-radius: 99px;
  flex-shrink: 0;
}

h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  margin: 1.25rem 0 0.55rem;
}

p {
  color: var(--text-dim);
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

a { color: var(--tint); text-decoration: none; }
a:hover { color: var(--tint-light); text-decoration: underline; }

/* ── Sections as cards ── */
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-top: 0.875rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
}

/* ── Lists ── */
ul {
  padding-left: 1.2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

li { margin-bottom: 0.4rem; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  background: var(--surface-2);
  color: var(--tint-light);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}

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

/* ── Callouts ── */
blockquote, .note {
  background: var(--tint-dim);
  border-left: 3px solid var(--tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 1rem 0;
}

.warning {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--warn-text);
  margin: 1rem 0;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--tint); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
  main { padding: 1.5rem 1rem 5rem; }
  h1 { font-size: 1.5rem; }
  section { padding: 1.1rem 1.1rem; }
  table { font-size: 0.8rem; }
  th, td { padding: 0.5rem 0.6rem; }
}
