
:root {
  color-scheme: light;
  --ink: #2c2435;
  --paper: #faf8f2;
  --lilac: #d7c7ff;
  --mint: #b8eed8;
  --rule: 2px solid var(--ink);
  --display: "Bricolage Grotesque", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1.05rem/1.55 var(--sans); }
a { color: #493476; text-decoration-thickness: .09em; text-underline-offset: .18em; }
a:hover { color: #683dad; }
:focus-visible { outline: 3px solid #4935a1; outline-offset: 4px; }
.skip { position: absolute; z-index: 2; top: .4rem; left: .5rem; padding: .5rem .8rem; background: white; transform: translateY(-165%); }
.skip:focus { transform: none; }
.masthead { border-bottom: var(--rule); }
.bar, .home, .inner { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.bar { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font: 700 clamp(1rem, 3vw, 1.48rem)/1 var(--display); letter-spacing: -.055em; }
.brand:hover { color: var(--ink); }
.brand-word { font-style: italic; }
.brand-mark { position: relative; display: inline-block; width: 1.15em; height: 1.34em; margin: 0 .64em 0 .13em; transform: rotate(-11deg); border: 2px solid; border-radius: .09em .16em .16em .12em; background: var(--lilac); box-shadow: inset .14em 0 var(--ink), .09em .10em 0 var(--ink); }
.brand-mark::before { content: ""; position: absolute; left: .25em; top: .27em; height: 2px; width: .48em; background: var(--ink); box-shadow: 0 .18em var(--ink); }
.brand-mark::after { content: ""; position: absolute; left: .03em; bottom: 0; right: 0; height: .14em; background: var(--paper); border-top: 1px solid; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.65rem, 2.6vw, 2rem); }
nav a { color: var(--ink); font: 700 .95rem var(--sans); padding-block: .65rem; }
.nav-action, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 1rem;
  min-height: 2.75rem; border: var(--rule); border-radius: .38rem;
  padding: .6rem 1.15rem; box-shadow: 3px 3px 0 var(--ink);
  background: var(--mint); color: var(--ink); font: 750 1rem/1.3 var(--sans); text-decoration: none; cursor: pointer;
}
.nav-action { background: #ece0ff; }
button:hover, .nav-action:hover { background: #ffdd8a; color: var(--ink); }
button:active, .nav-action:active { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px,2px); }
button:disabled { opacity: .65; cursor: default; }
.home { margin-block: clamp(1.5rem, 4.8vw, 4rem) 5rem; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 6vw, 3.85rem); }
h2 { font-size: clamp(1.65rem, 4.2vw, 2.25rem); }
h3 { font-size: 1.38rem; }
p { margin-block: 1rem; }
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; isolation: isolate; align-items: stretch;
  border: var(--rule); border-radius: .8rem; background: var(--lilac); box-shadow: 5px 5px var(--ink);
}
.hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(1.5rem, 4.4vw, 4rem); padding-right: 0; }
.hero h1 { font-size: clamp(2.8rem, 5.7vw, 5rem); line-height: 1; letter-spacing: -.062em; }
.hero h1 em { display: inline-block; position: relative; z-index: 0; font-family: Georgia, serif; font-weight: 500; letter-spacing: -.075em; }
.hero h1 em::after { content: ""; position: absolute; z-index: -1; left: -.01em; right: -.06em; bottom: -.025em; height: .105em; border-radius: 50%; background: #ffcc77; transform: rotate(-3deg); }
.hero-copy p { max-width: 34ch; margin: 1.5rem 0 0; font-size: clamp(1rem, 1.65vw, 1.25rem); }
.book-scene { container-type: inline-size; display: grid; place-items: center; min-height: clamp(17rem, 30vw, 25rem); border-radius: inherit; background-image: radial-gradient(#63557c55 .8px, transparent 1px); background-size: 12px 12px; mask-image: linear-gradient(to right, transparent, black 15%); }
.drawing { --line: .11em solid var(--ink); position: relative; width: 18em; height: 14em; font-size: min(5cqw, 1.55rem); }
.book-shadow { position: absolute; background: #a799cd; width: 12em; height: 2.35em; bottom: .13em; left: 3.25em; transform: rotate(-5deg); border-radius: 50%; }
.book { position: absolute; width: 14em; height: 4.1em; }
.book i { position: absolute; display: block; transform-origin: left top; border: var(--line); }
.lid { left: 0; top: 0; width: 9.5em; height: 4em; transform: matrix(1,.19,1,-.67,0,0); background: var(--cover); }
.spine { left: 0; top: 0; width: 9.5em; height: 1.65em; transform: skewY(10.76deg); background: var(--cover); border-radius: .13em 0 0 .16em; }
.spine::before, .spine::after { content: ""; position: absolute; top: 0; bottom: 0; left: .55em; width: .2em; border-inline: .08em solid; }
.spine::after { left: auto; right: .55em; }
.pages { left: 9.45em; top: 1.8em; width: 4.03em; height: 1.65em; transform: skewY(-33.82deg); background: repeating-linear-gradient(to bottom, #fff6db 0 .21em, #b6a8a7 .22em .25em); box-shadow: inset 0 .11em var(--cover), inset 0 -.11em var(--cover); }
.apricot { --cover: #ffce7e; top: 9.8em; left: 2em; transform: rotate(-5deg); }
.mint { --cover: #90d9bd; top: 7.9em; left: 1.7em; transform: rotate(5deg); }
.mint .spine { background: repeating-linear-gradient(to bottom, #fff6db 0 .22em, #b6a8a7 .23em .26em); box-shadow: inset 0 .15em var(--cover), inset 0 -.15em var(--cover); }
.mint .spine::before, .mint .spine::after { display: none; }
.mint .pages { background: var(--cover); }
.pink { --cover: #ffa5ba; top: 5.9em; left: 2.4em; transform: rotate(-10deg); }
.pink .lid::before { content: ""; position: absolute; inset: .31em; border: .065em solid; }
.pink .lid::after { content: ""; position: absolute; left: 3.2em; top: .78em; width: 2.9em; height: 2.4em; background: var(--ink); clip-path: polygon(50% 0, 61% 36%, 99% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 36%); }
.glint { position: absolute; background: var(--ink); clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 61%, 50% 100%, 36% 61%, 0 50%, 36% 36%); }
.glint-one { width: 2em; height: 2.6em; left: .5em; top: 2.8em; transform: rotate(8deg); }
.glint-two { width: 1.4em; height: 1.7em; right: .65em; bottom: 2.8em; transform: rotate(-10deg); }
.glint-three { width: .7em; height: 1em; right: .22em; bottom: 4.4em; }
.finder { margin: clamp(2rem, 5vw, 3.75rem) auto 0; max-width: 50rem; }
.finder h1, .finder h2 { margin-bottom: 1.2rem; }
label { font-weight: 680; }
.finder label { display: block; margin-bottom: .42rem; }
.search-row { display: flex; gap: .65rem; }
input, select, textarea { max-width: 100%; min-height: 2.85rem; border: var(--rule); border-radius: .35rem; padding: .58rem .8rem; background: white; color: var(--ink); font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-width: 0; }
input[type="checkbox"], input[type="radio"] { min-height: 0; }
.finder .search-filter { margin-top: .75rem; }
.search-row input { flex: 1; width: 100%; }
.arrow { font-size: 1.3em; line-height: 1; }
.results, .inner { overflow-wrap: anywhere; }
.results { max-width: 50rem; margin: 2.25rem auto; }
.results ul { list-style: none; padding: 0; border-top: var(--rule); }
.results li { display: flex; align-items: flex-start; gap: 1rem; padding: .85rem .15rem; border-bottom: 1px solid #c6bdc7; }
.results .book-cover { flex: none; }
.results li p { margin: .35rem 0 0; }
.results a:has(cite), .results cite a { font-weight: 720; }
.inner { max-width: 52rem; margin-block: clamp(2rem, 6vw, 4.5rem) 4rem; padding: clamp(1.25rem, 4vw, 3.15rem); border: var(--rule); border-top: .6rem solid var(--ink); border-radius: .65rem; background: #fffcf8; box-shadow: 4px 4px 0 #c5b3ec; }
.inner h1 { margin-bottom: 1.3rem; }
.inner h2, .inner h3 { margin-top: 1.75rem; margin-bottom: .65rem; }
.inner img { max-width: min(100%, 17rem); height: auto; }
.inner form { margin-block: 1rem; }
.inner form label { display: block; }
.inner input[type="checkbox"] + label, .inner input[type="radio"] + label { display: inline; }
.inner input + button, .inner select + button { margin-block: .35rem; }
.inner ul, .inner ol { padding-inline-start: 1.5rem; }
.inner li { margin-block: .3rem; }
.inner fieldset { margin: 1rem 0; padding: 1rem; border: 1px solid #b5aabd; border-radius: .4rem; min-inline-size: 0; }
.inner legend { font-weight: 700; }
.inner .word-cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 1.35rem; padding: 0; list-style: none; }
.word-cloud li { max-width: 100%; padding: .55rem .85rem; background: #eee5ff; border: 1px solid var(--ink); border-radius: .5rem; }
.word-cloud li:nth-child(3n+2) { background: #e1f4e9; }
.word-cloud li:nth-child(3n) { background: #ffead1; }
.word-label { font-family: var(--display); font-weight: 700; }
.word-count, .word-cloud summary { font-size: .88rem; }
.word-cloud summary { padding-block: .25rem; cursor: pointer; text-decoration: underline; text-underline-offset: .16em; }
.book-author { font-size: 1.25rem; }
.book-cover { border: 1px solid var(--ink); box-shadow: 3px 3px var(--lilac); }
#your-word { padding: 1rem; border: 1px solid var(--ink); border-radius: .45rem; background: #f1eaff; }
#word-hint { margin: .2rem 0 .65rem; }

.word-cloud .weight-1 { font-size: 1rem; }
.word-cloud .weight-2 { font-size: 1.28rem; }
.word-cloud .weight-3 { font-size: 1.55rem; }
.word-cloud .weight-4 { font-size: 1.8rem; }
.word-cloud .weight-5 { font-size: 2.1rem; }
@media (max-width: 650px) {
  .bar, .home, .inner { width: calc(100% - 2rem); }
  .bar { min-height: 4.35rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.7rem 1.5rem 0; }
  .hero h1 { font-size: clamp(2.18rem, 10.8vw, 4rem); }
  .hero-copy p { margin-top: 1rem; }
  .book-scene { min-height: 0; height: clamp(9.25rem, 37vw, 12.4rem); mask-image: linear-gradient(to bottom, transparent, black 18%); }
  .drawing { font-size: min(3.1cqw, .85rem); }
  .finder { margin-top: 2.1rem; }
}
@media (max-width: 380px) {
  .bar { gap: .4rem; }
  nav { gap: .5rem; }
  nav a, .nav-action { font-size: .85rem; }
  .nav-action, .search-row button { padding-inline: .65rem; }
  .arrow { display: none; }
}
@media (forced-colors: active) {
  .brand-mark, .book-scene, .hero h1 em::after { display: none; }
  .hero { display: block; }
  .hero-copy { padding: 1.5rem; }
}
