:root {
  color-scheme: light;
  --ink: #1d1933;
  --muted: #575269;
  --brand: #5140bc;
  --brand-hover: #41319f;
  --line: #e2ddef;
  --lavender: #f6f3ff;
  --white: #fff;
  font: 100%/1.6 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fcfbff; color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible { outline: 3px solid #765dff; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex: none;
  font-size: 1.2rem;
  font-weight: 850;
  text-decoration: none;
}
.brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: .53rem;
  background: var(--brand);
}
.brand-mark::before {
  content: "";
  width: .85rem;
  height: 1rem;
  border: 1.5px solid white;
  border-radius: .14rem;
  background: linear-gradient(white, white) center 32% / .38rem 1px no-repeat,
              linear-gradient(white, white) center 63% / .38rem 1px no-repeat;
}
.site-nav, .footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1.5rem; }
.site-nav a, .footer-inner nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.site-nav a { font-weight: 700; padding-block: .35rem; }
.site-nav a:hover, .footer-inner nav a:hover { color: var(--brand); text-decoration: underline; }

.hero {
  background: radial-gradient(ellipse at 82% 10%, #e9e2ff 0, transparent 62%), #f7f4ff;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3.25rem, 7vw, 6rem);
}
.hero h1 { font-size: clamp(3.1rem, 6.1vw, 5.1rem); line-height: 1.09; letter-spacing: -.085em; font-weight: 850; }
.hero h1 span { color: var(--brand); }
.hero-copy p { max-width: 24rem; margin-top: 1.35rem; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.15rem); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .6rem 1rem;
  border: 1px solid transparent;
  border-radius: .62rem;
  font-weight: 750;
  font-size: .925rem;
  text-align: center;
  text-decoration: none;
}
.primary { background: var(--brand); color: var(--white); }
.primary:hover { background: var(--brand-hover); }
.secondary { background: var(--white); color: #3e3292; border-color: #cac0e8; }
.secondary:hover { background: #f0ebff; }

.reader-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #393251;
  border-radius: 1.05rem;
  background: #201b34;
  color: #fff;
  box-shadow: 0 1.25rem 3rem #3c277431;
}
.preview-top, .reader-preview figcaption { display: flex; align-items: center; gap: .65rem; padding: .85rem 1.05rem; }
.preview-top { border-bottom: 1px solid #433a5a; }
.window-dot { width: .6rem; height: .6rem; flex: none; border-radius: 50%; background: #ad98ff; }
.preview-filename { font-size: .875rem; font-weight: 700; }
.preview-tag { margin-left: auto; font-size: .8rem; color: #e1d8ff; }
.preview-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(8rem, 1fr); gap: .75rem; padding: .9rem; }
.preview-paper { padding: .85rem .45rem; border-radius: .55rem; background: #fcfaff; color: #332b45; }
.preview-paper p { display: grid; grid-template-columns: 1.5rem 1fr; gap: .25rem; padding: .25rem .3rem; font-size: .78rem; }
.preview-paper p span { color: #6e6385; font: .73rem/1.7 ui-monospace, monospace; }
.preview-paper .preview-heading { margin-bottom: .38rem; color: var(--ink); font-size: .96rem; font-weight: 850; }
.preview-current { border-radius: .3rem; background: #ebe3ff; color: #3b268a; }
.preview-bookmarks { padding: .6rem .4rem; font-size: .8rem; }
.preview-bookmarks strong { display: block; padding: 0 .45rem; margin-bottom: .6rem; }
.bookmark { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem; margin-bottom: .25rem; padding: .45rem; border-radius: .38rem; color: #eee9f8; }
.bookmark.active { background: #45366e; }
.bookmark small { font-size: .73rem; color: #ded0ff; white-space: nowrap; }
.reader-preview figcaption { justify-content: space-between; background: #2c2442; color: #eee6ff; font-size: .77rem; }

.features { padding-block: clamp(2.5rem, 5.25vw, 4.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.95rem); line-height: 1.28; letter-spacing: -.06em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.4rem); margin-top: 1.35rem; }
.feature-grid article { border-top: 2px solid #d7caef; padding-top: .9rem; }
h3 { font-size: 1.12rem; letter-spacing: -.035em; }
.feature-grid p, .resources p { margin-top: .43rem; color: var(--muted); }

.resources { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.resources article { border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1.15rem, 3vw, 1.85rem); }
.download { background: var(--lavender); }
.contact { background: var(--white); }
.resources h2 { font-size: 1.35rem; }
.resources p { margin-block: .55rem 1rem; }
.text-link { display: inline-block; margin: .5rem 0 0 .6rem; color: var(--brand); font-size: .88rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { min-height: 5.25rem; padding-block: 1rem; }

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .reader-preview { width: min(100%, 38rem); }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .site-nav, .footer-inner nav { gap: .35rem .75rem; }
  .hero-grid { padding-block: 2.65rem; }
  .hero h1 { font-size: clamp(2.9rem, 11vw, 3.65rem); }
  .feature-grid, .resources { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 25rem) {
  .preview-main { grid-template-columns: 1fr; }
  .preview-bookmarks { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
  .preview-bookmarks strong { grid-column: 1 / -1; margin-bottom: .2rem; }
}


.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.download .text-link { margin-left: 0; }
