:root {
  --bg: #f6f3fa;
  --surface: #ffffff;
  --surface-soft: #faf8fc;
  --ink: #20182c;
  --muted: #71677f;
  --line: #e7dfef;
  --accent: #6c4ab6;
  --accent-deep: #4d2f91;
  --accent-soft: #eee8fb;
  --gold: #c99b43;
  --shadow: 0 20px 55px rgba(64, 40, 98, .10);
  --radius: 22px;
  --sidebar: 300px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.72; }
a { color: var(--accent-deep); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: white; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.site-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 30px 24px; background: #241a34; color: #fff; border-right: 1px solid rgba(255,255,255,.08); }
.sidebar__brand { display: flex; gap: 12px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand-mark { display: grid; place-items: center; width: 44px; aspect-ratio: 1; border-radius: 14px; background: linear-gradient(145deg, #8a64d8, #5a3aa2); color: white; font-family: Georgia, serif; font-size: 1.35rem; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.sidebar__brand strong, .sidebar__brand span { display: block; }
.sidebar__brand span { color: #bfb4ce; font-size: .8rem; }
.toc { margin-top: 24px; }
.toc__label { margin: 0 0 12px; color: #a998bb; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc > ul > li { margin-bottom: 10px; }
.toc > ul > li > a { color: #f5f1fa; font-weight: 700; }
.toc li ul { margin: 5px 0 0 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); }
.toc li li a { color: #bfb4ce; font-size: .82rem; }
.toc a { display: block; padding: 4px 0; text-decoration: none; line-height: 1.35; transition: color .2s ease, transform .2s ease; }
.toc a:hover, .toc a:focus { color: #fff; transform: translateX(3px); }
.sidebar__meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.sidebar__meta span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #cfc6d8; font-size: .72rem; }
.content { width: min(100%, 1120px); padding: 46px clamp(24px, 5vw, 72px) 60px; }
.hero { position: relative; display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; min-height: 470px; padding: clamp(34px, 6vw, 68px); overflow: hidden; border: 1px solid rgba(108,74,182,.12); border-radius: 32px; background: radial-gradient(circle at 85% 15%, rgba(201,155,67,.17), transparent 31%), linear-gradient(145deg, #fff, #f8f4fc); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(108,74,182,.10); border-radius: 23px; pointer-events: none; }
.hero__copy { position: relative; z-index: 1; }
.eyebrow, .section-kicker { display: inline-block; color: var(--accent); font-size: .76rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 12px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7vw, 6rem); line-height: .96; font-weight: 500; letter-spacing: -.045em; }
.hero__lead { max-width: 680px; margin: 20px 0 14px; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.45; color: #4c405b; }
.hero p:last-child { max-width: 710px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; }
.badges span { padding: 7px 12px; border: 1px solid #ddd2eb; border-radius: 999px; background: rgba(255,255,255,.72); color: #594a69; font-size: .8rem; font-weight: 750; }
.hero__art { position: relative; height: 330px; }
.tarot-card { position: absolute; width: 168px; height: 276px; border-radius: 18px; box-shadow: 0 25px 42px rgba(49,31,69,.24); }
.tarot-card--back { right: 55px; top: 35px; transform: rotate(12deg); display: grid; place-items: center; border: 10px solid #e7d6aa; outline: 2px solid #9b7430; outline-offset: -17px; background: repeating-radial-gradient(circle at 50% 50%, #5b3a92 0 7px, #6f4bad 8px 14px); color: #ead6a6; font-size: 3rem; }
.tarot-card--front { left: 5px; top: 8px; transform: rotate(-9deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; border: 8px solid #f0dfb2; outline: 1px solid #9d7530; outline-offset: -14px; background: linear-gradient(180deg, #211631, #49316f 58%, #211631); color: #f1d693; }
.tarot-card--front .moon { font-size: 5.4rem; line-height: 1; }
.tarot-card--front .stars { font-size: 1.1rem; letter-spacing: .2em; }
.callout { display: grid; grid-template-columns: 38px 1fr; gap: 14px; margin: 24px 0; padding: 19px 21px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.callout--hero { margin: 26px 0 56px; }
.callout__icon { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); position: relative; }
.callout__icon::after { content: "i"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font-family: Georgia, serif; font-weight: 700; }
.callout--warning { border-color: #ead8ae; background: #fffbf2; }
.callout--warning .callout__icon { background: #f8e8bf; }
.callout--warning .callout__icon::after { content: "!"; color: #8a6725; }
.callout--tip { border-color: #d6e7dd; background: #f7fcf9; }
.callout--tip .callout__icon { background: #dcefe4; }
.callout--tip .callout__icon::after { content: "✓"; color: #2c7650; font-family: inherit; }
.callout strong { display: block; margin-bottom: 3px; }
.callout p { margin: 0; color: var(--muted); }
.overview { margin: 64px 0 72px; }
.overview h2 { margin-top: 8px; }
.overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.overview-grid a { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; min-height: 132px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; box-shadow: 0 8px 22px rgba(63,43,85,.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.overview-grid a:hover { transform: translateY(-3px); border-color: #cdbde3; box-shadow: 0 13px 26px rgba(63,43,85,.09); }
.overview-grid strong { grid-row: 1 / 3; color: #b9a7ce; font-family: Georgia, serif; font-size: 1.35rem; }
.overview-grid span { color: var(--ink); font-weight: 800; }
.overview-grid small { color: var(--muted); line-height: 1.4; }
.doc-section { padding: 62px 0 12px; border-top: 1px solid var(--line); }
.doc-section > h2, .overview h2 { margin: 0 0 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.15rem, 4vw, 3.5rem); line-height: 1.08; font-weight: 500; letter-spacing: -.035em; }
h3 { margin: 42px 0 14px; font-size: 1.35rem; line-height: 1.25; }
p { max-width: 820px; }
ul, ol { max-width: 850px; padding-left: 1.35rem; }
li { margin: .42rem 0; padding-left: .25rem; }
li::marker { color: var(--accent); font-weight: 800; }
.table-wrap { width: 100%; margin: 24px 0 32px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 25px rgba(54,34,78,.04); }
table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .94rem; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #f2edf8; color: #4b3766; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fcfbfd; }
.code-block { margin: 24px 0 30px; padding: 22px; overflow-x: auto; border: 1px solid #3c2d4d; border-radius: 16px; background: #20172b; color: #f5effd; box-shadow: 0 14px 32px rgba(35,24,48,.18); }
.code-block code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88rem; line-height: 1.65; white-space: pre; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 70px; padding: 28px 0 5px; border-top: 1px solid var(--line); color: var(--muted); }
.footer strong { color: var(--ink); }

@media (max-width: 1050px) {
  .site-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 18px 22px; }
  .toc { display: none; }
  .sidebar__brand { padding-bottom: 0; border-bottom: 0; }
  .sidebar__meta { position: absolute; right: 20px; top: 9px; max-width: 45%; justify-content: flex-end; }
  .content { margin: 0 auto; }
}
@media (max-width: 760px) {
  .content { padding: 22px 16px 42px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 34px 26px; border-radius: 24px; }
  .hero__art { display: none; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .overview-grid a { min-height: 120px; }
  .doc-section { padding-top: 46px; }
  .footer { flex-direction: column; }
}
@media (max-width: 480px) {
  .sidebar__meta { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 30px 1fr; padding: 16px; }
  h1 { font-size: 3.2rem; }
}
@media print {
  :root { --bg: #fff; }
  body { background: #fff; font-size: 10.5pt; }
  .site-shell { display: block; }
  .sidebar, .skip-link, .hero__art, .overview { display: none !important; }
  .content { width: 100%; max-width: none; padding: 0; }
  .hero { display: block; min-height: auto; padding: 25mm 15mm 12mm; border: 0; border-radius: 0; box-shadow: none; page-break-after: always; }
  .hero::before { display: none; }
  .callout--hero { margin: 0 0 14mm; }
  .doc-section { padding-top: 10mm; page-break-before: auto; }
  .doc-section > h2 { page-break-before: always; }
  .doc-section:first-of-type > h2 { page-break-before: avoid; }
  h2, h3 { break-after: avoid; }
  .table-wrap, .callout, pre { break-inside: avoid; box-shadow: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 8.5pt; }
  a { color: inherit; text-decoration: none; }
  .footer { page-break-before: always; }
}


code {
  padding: .12em .38em;
  border-radius: 6px;
  background: #f0ebf7;
  color: #503681;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}
.code-block code {
  padding: 0;
  background: transparent;
  color: inherit;
}
h4 {
  margin: 30px 0 10px;
  font-size: 1.08rem;
}
.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 24px 0 34px;
}
.flow__step {
  position: relative;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.flow__step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 43px;
  z-index: 2;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}
.flow__step strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}
.flow__step span {
  display: block;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}
.feature-grid,
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 34px;
}
.feature-grid article,
.check-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(63,43,85,.04);
}
.feature-grid strong,
.check-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.feature-grid p,
.check-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.status--included { background: #dcefe4; color: #276645; }
.status--optional { background: #f1e9fb; color: #5a3790; }
.status--planned { background: #f8e8bf; color: #77591f; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow__step:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -19px;
  }
}
@media (max-width: 760px) {
  .feature-grid,
  .check-grid { grid-template-columns: 1fr; }
}
@media print {
  .flow { grid-template-columns: repeat(5, 1fr); }
  .flow__step,
  .feature-grid article,
  .check-grid article { break-inside: avoid; box-shadow: none; }
}
