:root {
  --bg: #f7f5fb;
  --surface: #ffffff;
  --text: #2d2640;
  --sub: #6a6280;
  --border: #e6e1f0;
  --violet: #6d28d9;
  --violet-dark: #5b21b6;
  --rose: #db2777;
  --lilac: #ede9fe;
  --col: 42rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.1rem/1.75 Georgia, Cambria, "Times New Roman", serif;
}

h1, h2, h3, .site-name, .pill-nav, .ftr, .aside-box .ttl, .toc .ttl { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--rose); }

.col { width: min(100% - 2.4rem, var(--col)); margin: 0 auto; }

/* header */
.hdr { text-align: center; padding: 2.2rem 0 1.4rem; background: radial-gradient(circle at 50% 0, #ede9fe 0, var(--bg) 70%); }
.ornament { width: 64px; height: 64px; display: block; margin: 0 auto .5rem; }
.site-name { display: inline-block; font-size: 1.55rem; font-weight: 800; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.site-name:hover { color: var(--violet); }
.hdr .sub { margin: .1rem 0 1.1rem; color: var(--sub); font-size: .98rem; font-style: italic; }
.pill-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.pill-nav a { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.pill-nav a:hover, .pill-nav a[aria-current="page"] { border-color: var(--violet); color: var(--violet); background: var(--lilac); }

/* content */
.content { padding: 1.5rem 0 3.5rem; }
.content h1 { font-size: clamp(1.85rem, 4.4vw, 2.45rem); line-height: 1.2; margin: .5rem 0 1rem; font-weight: 800; text-align: center; }
.content h2 { font-size: 1.35rem; margin: 2.3rem 0 .55rem; font-weight: 700; }
.content h2::before { content: "◎ "; color: var(--rose); font-weight: 400; }
.content h3 { font-size: 1.08rem; margin: 1.5rem 0 .3rem; font-weight: 700; }
.content p, .content ul, .content ol { margin: 0 0 1.05rem; }
.content li { margin-bottom: .4rem; }
.standfirst { font-size: 1.2rem; color: var(--sub); text-align: center; margin: 0 auto 2rem !important; max-width: 36rem; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.3rem; margin: 0 0 2rem; }
.toc .ttl { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sub); font-weight: 700; margin-bottom: .3rem; display: block; }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: 1rem; }
.toc li { margin-bottom: .15rem; }

.aside-box { background: var(--lilac); border-radius: 16px; padding: 1.1rem 1.3rem; margin: 1.75rem 0; }
.aside-box .ttl { display: block; font-weight: 700; color: var(--violet-dark); margin-bottom: .3rem; font-size: 1rem; }
.aside-box p:last-child, .aside-box ul:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--violet); color: #fff; font: 700 .9rem/1.8rem system-ui, sans-serif; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; margin: 1.25rem 0 2.25rem; }
.tiles a { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.05rem 1.2rem; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.tiles a:hover { border-color: var(--violet); box-shadow: 0 6px 20px -12px rgba(109,40,217,.5); color: var(--text); }
.tiles strong { display: block; font-family: system-ui, sans-serif; font-size: 1.05rem; margin-bottom: .2rem; }
.tiles span { color: var(--sub); font-size: .97rem; line-height: 1.5; }

.onward { text-align: center; margin-top: 2.75rem; font-family: system-ui, sans-serif; font-size: .98rem; }

/* footer */
.ftr { border-top: 1px solid var(--border); color: var(--sub); font-size: .87rem; text-align: center; padding: 1.5rem 0 2rem; }
.ftr p { margin: 0 0 .25rem; }

@media (prefers-reduced-motion: reduce) { .tiles a { transition: none; } }
