:root {
  --coral: #E64A19;
  --peach: #FFCCBC;
  --burn: #BF360C;
  --sand: #FFF8F1;
  --ink: #4a1c0d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--sand);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}

a { color: var(--burn); text-decoration: none; }
a:hover { text-decoration: underline; }

.topstrip {
  background: var(--coral);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  gap: 16px;
}

.sigil {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
}

.anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
}

.anchors a { color: #ffe0d4; }

.cascade-hero {
  margin: 24px 24px 8px;
  background: #fff;
  border: 1px solid var(--peach);
  box-shadow: 10px 10px 0 var(--peach);
  padding: 28px 32px;
  position: relative;
}

.cascade-hero::after {
  content: "";
  position: absolute;
  inset: 8px -8px -8px 8px;
  border: 1px solid var(--coral);
  z-index: -1;
}

.cascade-hero h1 {
  font-size: 26px;
  color: var(--burn);
  margin-bottom: 10px;
}

.sandpage {
  display: flex;
  gap: 0;
  max-width: 1180px;
  margin: 20px auto 48px;
  align-items: flex-start;
}

.minimap {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 16px;
  padding: 16px 12px;
}

.minimap ol {
  list-style: none;
  counter-reset: toc;
}

.minimap li { counter-increment: toc; margin-bottom: 10px; }

.minimap a {
  display: block;
  font-size: 13px;
  padding: 6px 8px 6px 28px;
  position: relative;
  color: var(--burn);
  background: #fff;
  border-left: 3px solid var(--coral);
}

.minimap a::before {
  content: counter(toc);
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 11px;
  color: var(--coral);
}

.deck {
  flex: 1;
  position: relative;
  padding: 8px 20px 20px 8px;
}

.lamina {
  background: #fff;
  border: 1px solid var(--peach);
  padding: 22px 24px 18px;
  margin: 0 0 18px;
  position: relative;
}

.lamina:nth-child(odd) { transform: translateX(8px); }
.lamina:nth-child(even) { transform: translateX(-4px); margin-left: 12px; }

.lamina h2 {
  font-size: 21px;
  color: var(--coral);
  margin-bottom: 12px;
  background: linear-gradient(#fff 60%, #ffe8df 60%);
}

.lamina p { margin-bottom: 10px; }

.hist-quartet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.hist-quartet article {
  background: var(--sand);
  border-bottom: 4px solid var(--coral);
  padding: 14px;
}

.hist-quartet h3 { font-size: 16px; color: var(--burn); margin-bottom: 6px; }

.follow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 0;
}

.follow-steps li {
  list-style: none;
  padding: 12px 12px 12px 48px;
  border-bottom: 1px solid var(--peach);
  position: relative;
}

.follow-steps li span {
  position: absolute;
  left: 8px;
  top: 12px;
  width: 28px;
  height: 28px;
  background: var(--coral);
  color: #fff;
  text-align: center;
  line-height: 28px;
  font-size: 13px;
}

.backup-warn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 14px 0;
}

.backup-warn article {
  padding: 16px;
}

.backup-warn article:first-child {
  background: #ffe8df;
  border-right: 1px dashed var(--coral);
}

.backup-warn article:last-child { background: var(--sand); }

.backup-warn h3 { font-size: 16px; color: var(--burn); margin-bottom: 8px; }

.bound-sheet {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}

.bound-sheet th,
.bound-sheet td {
  border-bottom: 2px solid var(--peach);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.bound-sheet th { color: var(--coral); }

.rewind-note {
  background: #fff3e0;
  padding: 14px 16px;
  margin: 10px 0;
  border-left: 8px solid var(--burn);
}

.media-hist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-hist article {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--sand);
  padding: 12px;
}

.ask { margin: 16px 0 8px; }
.ask h3 { font-size: 17px; color: var(--burn); margin-bottom: 6px; }

.colophon {
  background: var(--burn);
  color: #ffe8df;
  padding: 26px 28px;
  font-size: 14px;
}

.colophon p { margin-bottom: 8px; }

@media (max-width: 880px) {
  .sandpage { flex-direction: column; }
  .minimap { position: relative; width: 100%; }
  .hist-quartet, .backup-warn { grid-template-columns: 1fr; }
  .lamina:nth-child(odd),
  .lamina:nth-child(even) { transform: none; margin-left: 0; }
  .topstrip { flex-direction: column; align-items: flex-start; }
}
