:root {
  --bg: #1a0e0c;
  --surface: #261814;
  --border: rgba(255, 255, 255, 0.08);
  --text-hi: #f5e6dc;
  --text-mid: #c9b8aa;
  --text-low: #8a7a6e;
  --hermes: #e2581d;
  --hermes-soft: rgba(226, 88, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* Brand bar */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff8a4a 0%, #e2581d 100%);
  box-shadow: 0 6px 18px rgba(226, 88, 29, 0.4);
}
.brand .name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
}
.brand .name a {
  color: var(--text-hi);
  text-decoration: none;
}

h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: 0.5px;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--text-hi);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--text-mid);
}

p {
  margin: 12px 0;
  color: var(--text-mid);
}

strong {
  color: var(--text-hi);
  font-weight: 600;
}

a {
  color: var(--hermes);
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 88, 29, 0.35);
  transition: border-color 0.15s;
}
a:hover {
  border-bottom-color: var(--hermes);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

ul, ol {
  padding-left: 24px;
  color: var(--text-mid);
}
li {
  margin: 6px 0;
}

blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--hermes);
  background: var(--hermes-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-hi);
}
blockquote p {
  margin: 6px 0;
  color: var(--text-hi);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-hi);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  color: var(--text-hi);
  background: rgba(255, 255, 255, 0.03);
}
td {
  color: var(--text-mid);
}
td strong {
  color: var(--text-hi);
}

/* Footer nav */
.foot {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.foot a {
  font-size: 13px;
  color: var(--text-low);
  border: 0;
}
.foot a:hover {
  color: var(--text-hi);
}

/* Index card grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: transform 0.18s, border-color 0.18s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 88, 29, 0.5);
}
.card a {
  display: block;
  border: 0;
  color: var(--text-hi);
}
.card .t {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}
.card .d {
  font-size: 13px;
  color: var(--text-low);
}

/* Mobile */
@media (max-width: 520px) {
  .page { padding: 28px 18px 80px; }
  h1 { font-size: 24px; }
  h2 { font-size: 17px; }
  table { font-size: 13px; }
  th, td { padding: 8px 8px; }
}
