/* The public page. Copied unchanged from docs/reference/index.html; additions are at the end. */
:root { --ground: #131218; --surface: #1C1B22; --line: #3A3842; --text: #F2EFE9; --soft: #C9C5CE; --muted: #A9A5AE; --grow: 1.1s cubic-bezier(.2,.8,.2,1); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--text); font-family: 'Bricolage Grotesque', system-ui, sans-serif; }
a { color: var(--soft); } a:hover { color: var(--text); }
p { margin: 0; }
main { max-width: 1040px; margin: 0 auto; padding: 40px 16px 64px; display: flex; flex-direction: column; gap: 44px; }
header { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 600; color: var(--text); text-decoration: none; }
.mini { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.mini i { width: 5px; border-radius: 2px; }
.muted { color: var(--muted); font-size: 14px; }
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.lede { margin-top: 16px; max-width: 34rem; font-size: 19px; line-height: 1.5; color: var(--soft); }
form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { flex: 999 1 300px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 10; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.dym { padding: 8px 10px; font-size: 14px; color: var(--muted); }
.dym em { color: var(--text); }
.opt { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.opt:hover { background: #26242D; }
.opt[aria-selected="true"] { background: #2A2830; outline: 2px solid var(--text); outline-offset: -2px; }
.thumb { width: 32px; height: 48px; flex: none; object-fit: cover; background: var(--line); border-radius: 2px 5px 5px 2px; box-shadow: inset 3px 0 0 rgba(0,0,0,.25); }
.opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-text b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.25; }
.opt-text small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--muted); }
.dot { width: 10px; height: 10px; flex: none; border-radius: 50%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input { height: 56px; padding: 0 18px; font: inherit; font-size: 18px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
button { font: inherit; cursor: pointer; }
.go { flex: 1 1 170px; height: 56px; padding: 0 28px; white-space: nowrap; font-size: 17px; font-weight: 600; color: var(--ground); background: var(--text); border: 0; border-radius: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips button { min-height: 44px; padding: 0 16px; font-size: 15px; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; }
.chips button:hover { border-color: var(--muted); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.shelf { flex: 1 1 260px; height: 230px; display: flex; gap: 12px; align-items: flex-end; justify-content: center; }
.shelf i { width: 36px; border-radius: 6px; box-shadow: inset -5px 0 0 rgba(0,0,0,.18); animation: bob 3.4s ease-in-out infinite; }

.card { padding: 32px; background: var(--surface); border-radius: 20px; animation: rise .5s ease-out both; }
.loading { display: flex; align-items: center; gap: 20px; font-size: 19px; }
.reader { display: flex; gap: 6px; height: 48px; align-items: flex-end; }
.reader i { width: 10px; height: 48px; border-radius: 3px; transform-origin: bottom; animation: read .9s ease-in-out infinite; }

.result { display: flex; flex-wrap: wrap; gap: 40px; padding: 40px 32px; border-radius: 24px; }
.book { flex: 1 1 180px; max-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.cover { aspect-ratio: 2 / 3; display: flex; overflow: hidden; background: #2A2830; border-radius: 4px 12px 12px 4px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.spine, .bands { display: flex; flex-direction: column; }
.spine { width: 16px; flex: none; box-shadow: inset -3px 0 0 rgba(0,0,0,.25); }
.spine i, .bands i { flex: 1 1 0; transition: flex-grow var(--grow); }
.face { flex: 1 1 0; min-width: 0; position: relative; }
.face img, .bands { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.label { position: absolute; left: 12px; right: 12px; top: 16px; display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--ground); border-radius: 6px; }
.label b { font-size: 18px; font-weight: 800; line-height: 1.1; }
.label small { font-size: 12px; color: var(--soft); }
.scores { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.scores h2 { margin: 6px 0 0; font-size: 2.4rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.headline { margin-top: 8px; font-size: 20px; }
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 52px; column-gap: 16px; row-gap: 2px; align-items: center; }
li b { display: block; font-size: 17px; font-weight: 600; }
li small { font-size: 13px; color: var(--muted); }
li .desc { grid-column: 2 / 4; font-size: 13px; line-height: 1.4; color: var(--muted); }
.track { height: 14px; overflow: hidden; background: #2A2830; border-radius: 7px; }
.bar { height: 100%; width: 0; border-radius: 7px; transition: width var(--grow); }
.pending .track { animation: pulse 1.2s ease-in-out infinite; }
.pct { font-family: 'IBM Plex Mono', monospace; font-size: 15px; text-align: right; }
.note { font-size: 13px; line-height: 1.5; color: var(--muted); }

.mine { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.mine-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.mine-head b { font-size: 17px; font-weight: 600; }
.pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; }
.pick i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.pick[aria-pressed="true"] { color: var(--ground); background: var(--c); border-color: var(--c); }
.pick[aria-pressed="true"] i { background: var(--ground); }
.verdict { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #26242D; border-radius: 14px; }
.verdict i { width: 18px; height: 18px; flex: none; border-radius: 50%; }
.verdict b { display: block; font-size: 19px; font-weight: 800; }
.verdict span { font-size: 14px; color: var(--soft); }
li { transition: opacity .3s; } li.dim { opacity: .45; }
.tag { margin-left: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; vertical-align: middle; color: var(--ground); background: var(--text); border-radius: 999px; }
.legend { display: flex; flex-direction: column; gap: 18px; }
.legend h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.legend-card { display: flex; gap: 14px; padding: 18px; background: var(--surface); border-radius: 16px; }
.legend-card i { width: 12px; flex: none; border-radius: 4px; }
.legend-card b { font-size: 17px; font-weight: 600; }
.legend-card b span { font-weight: 400; color: var(--muted); }
.legend-card p { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--soft); }

footer { padding-top: 24px; border-top: 1px solid #2C2A33; font-size: 14px; line-height: 1.6; color: var(--muted); }
footer p { max-width: 46rem; }
@media (max-width: 720px) {
  .shelf { display: none; } /* decoration only; keeps the result near the search on phones */
  li { grid-template-columns: minmax(0, 1fr) 44px; }
  li > div:first-child { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  li .desc { grid-column: 1 / -1; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes read { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Additions to the reference page */
/* Apple's terms: its covers and blurbs sit next to a link to the book in Apple Books. */
.store { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }
