:root {
  --accent: #6b5cf2;
  --accent-soft: rgba(107, 92, 242, 0.1);
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #11111a;
  --text-secondary: #6a6a78;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #9b8dff;
    --accent-soft: rgba(155, 141, 255, 0.14);
    --bg: #0e0e13;
    --surface: #1a1a22;
    --text: #f4f4f8;
    --text-secondary: #9a9aa8;
    --border: rgba(255, 255, 255, 0.1);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 20px 80px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; }

/* Header */
header.site {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px 0 28px;
}

.mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--accent), #4b3fd6);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 6px 18px rgba(107, 92, 242, 0.32);
}

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

header.site h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header.site p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

header.site a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 14px; }

/* Page title */
h2.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 20px 0 6px;
  line-height: 1.2;
}

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

/* Content */
h3 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 38px 0 10px;
}

h4 {
  font-size: 16px;
  font-weight: 650;
  margin: 22px 0 6px;
}

p, li { color: var(--text); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 8px; }

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

strong { font-weight: 650; }

code {
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Callout */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 32px;
}

.callout.accent {
  border-color: transparent;
  background: var(--accent-soft);
}

.callout h3 { margin-top: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* Card links */
.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 28px 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}

.card .t { font-weight: 650; font-size: 17px; margin-bottom: 3px; }
.card .d { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }

/* Back link */
.back {
  display: inline-block;
  margin: 34px 0 0;
  font-size: 15px;
  font-weight: 550;
}

/* Footer */
footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

footer a { color: var(--text-secondary); text-decoration: underline; }
footer .row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  h2.page-title { font-size: 27px; }
  header.site { padding-top: 30px; }
}
