/* Corey's Book Reviews: pale cream page, cornflower blue, one reader's shelf. */

/* ---------- colour roles ----------
   --page, --card, --ink…    neutral page colours
   --panel / --on-panel      MEDIUM blue with white text: sidebar, phone bar, the "Hey, I'm Corey" panel
   --soft / --on-soft        LIGHT blue with navy text: score box, Book Score stamp, My Recommendation, badges
   --link                    DARKER blue for links and book titles on the page
   --bar                     score bar fill (not text)
   Blue text never sits on a blue background. */

:root {
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --sidebar: 300px;
  --gutter: clamp(16px, 3vw, 48px);

  --ink: #23272d;
  --ink-soft: #454b53;
  --muted: #5d6570;
  --on-panel: #ffffff;
  --panel-line: rgba(255, 255, 255, .34);
  --panel-field: #ffffff;
  --goods: #2f6b45;
  --goods-bg: #e5eedf;
  --bads: #9a4a26;
  --bads-bg: #f4e4d6;
  --highlight: #f6e3a8;
  --shadow: 0 1px 0 rgba(20, 30, 40, .05), 0 8px 24px -12px rgba(20, 30, 40, .28);
  --cover-shadow: 0 1px 1px rgba(10, 20, 30, .14), 0 10px 22px -8px rgba(10, 20, 30, .42);
  --cover-ring: 0 0 0 0 transparent;

  /* Cornflower blue. The medium shade is the lightest that keeps white text at WCAG AA. */
  --page: #faf6ee; --card: #fffdf8; --card-deep: #f1ebdf; --rule: #e3dbcc;
  --panel: #3c6eda; --soft: #dfe8fb; --on-soft: #12213f; --soft-line: #bccdf3; --link: #2557c3; --bar: #3c6eda; --on-panel-field: #12213f;

  /* Logo: warm orange and gold against the blue and cream. Text uses --logo-text (4.75:1 on cream). */
  --logo-text: #b4501a; --logo-ink: #2a1a0e; --logo-navy: #12213f;

  /* One look for everyone: the light cornflower design, even on devices set to dark mode. */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- shell: sidebar on the left, content beside it ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.main { padding: clamp(28px, 4vw, 56px) var(--gutter) 40px; max-width: 1480px; min-width: 0; }

.sidebar {
  background: var(--panel);
  color: var(--on-panel);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar:focus { outline: none; }
.sidebar__inner { padding: 32px 28px 40px; display: flex; flex-direction: column; gap: 20px; }
/* A faint line between sections (search, filters, menu links, Genres, Series, Find me on)
   so they don't blend together. Same in the phone menu, which is this sidebar. */
.sidebar__inner > * + *,
.side-nav ul + .side-h,
.shelf-controls .shelf-filter { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 20px; }
.sidebar :focus-visible, .topbar :focus-visible, .hello :focus-visible { outline-color: var(--on-panel); }

/* ---------- the logo (E6) ---------- */
/* "Corey’s" in Merienda, the gold-and-orange underline a small gap below the tail of
   the "y" (measured), and BOOK REVIEWS in navy. Every part scales together with --s,
   so it looks the same at any size; it always sits on cream. */
.mh-name { --s: 1; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1; }
.mh-hand { font-family: "Merienda", cursive; font-weight: 700; font-size: calc(2.87rem * var(--s)); line-height: 1.12; padding-bottom: .1em; color: var(--logo-text); }
.mh-swash { font-size: calc(2.87rem * var(--s)); width: calc(240px * var(--s)); height: calc(22px * var(--s)); margin: .169em 0 calc(8px * var(--s)); }
.mh-caps { font-family: var(--display); font-weight: 700; font-size: calc(1.1rem * var(--s)); letter-spacing: .32em; text-transform: uppercase; color: var(--logo-navy); }

/* At the top of the sidebar: the logo and tagline on a small cream card. */
.brand-card { background: var(--card); color: var(--ink); border-radius: 14px; padding: 16px 12px 14px; text-align: center; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .45); }
.brand-card__logo { display: flex; justify-content: center; text-decoration: none; border-radius: 8px; }
.brand-card .mh-name { --s: .88; }
.brand-card__tagline { margin: 10px 0 0; font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.sidebar .brand-card :focus-visible, .topbar__logo:focus-visible { outline-color: var(--link); }
/* Phones: a small logo in the top bar (also on cream). */
.topbar__logo { display: flex; background: var(--card); border-radius: 10px; padding: 4px 10px 3px; text-decoration: none; }
.topbar__logo .mh-name { --s: .42; }
.topbar__logo .mh-swash { margin-bottom: calc(5px * var(--s)); }
#latest { scroll-margin-top: 96px; }

.side-h { font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
.side-nav ul, .socials ul { list-style: none; margin: 0; padding: 0; }
.side-nav ul + .side-h { margin-top: 20px; }
.side-nav li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 0; }
.side-nav a, .socials a { color: var(--on-panel); text-decoration: none; }
.side-nav a:hover { text-decoration: underline; }
.count { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* "Find me on": each official mark on a white tile (light-background variants),
   same size for every platform, name as text beside it. */
.socials ul, .social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 1rem; list-style: none; margin: 0; padding: 0; }
.social { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.social:hover span:last-child { text-decoration: underline; }
.social__tile { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border-radius: 8px; }
.social__tile img { width: 24px; height: 24px; object-fit: contain; }
.social__tile--none { background: transparent; }
.social-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 640px; }
.social-row .social { color: var(--link); }
.social-row .social__tile { box-shadow: 0 0 0 1px var(--rule); }


/* search */
.search { position: relative; }
.search__label { display: block; font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.search__input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--on-panel-field);
  background: var(--panel-field); border: 1px solid var(--panel-line); border-radius: 10px;
  padding: 10px 12px;
}
.search__input::placeholder { color: var(--muted); }
.search__input:focus { outline: 2px solid var(--on-panel); outline-offset: 2px; }
.search__results { list-style: none; margin: 8px 0 0; padding: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); }
.search__results a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 6px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.search__results a:hover, .search__results a:focus-visible { background: var(--card-deep); outline-color: var(--link); }
.search__results img, .search__results .thumb { width: 34px; height: 50px; object-fit: cover; border-radius: 2px; background: var(--rule); }
.search__results b { display: block; font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--link); }
.search__results small { color: var(--muted); font-size: .85rem; }
.search__empty { padding: 8px; color: var(--muted); font-size: .95rem; }

/* phone top bar, hidden on wide screens */
.topbar { display: none; }
.menu-btn { font: inherit; }
.scrim { display: none; }

/* ---------- shared bits ---------- */

.eyebrow { font-family: var(--display); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.byline { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); margin: 4px 0 10px; }
.meta-line { margin: 2px 0; color: var(--muted); font-size: 1rem; }
.meta-line a { color: var(--link); }
.chip { display: inline-block; font-size: .82rem; padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); text-decoration: none; background: var(--card); }
.chip:hover { border-color: var(--link); color: var(--link); }
.read-more { font-family: var(--display); font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }

.cover { border-radius: 3px 6px 6px 3px; box-shadow: var(--cover-ring), var(--cover-shadow); background: var(--rule); }

/* A cover linked from Open Library sits on top of the coloured book. While it loads,
   the spot is a plain soft-coloured book shape (the coloured book stays hidden, so it
   doesn't flash up first); only if the link fails does the picture remove itself and
   the coloured book show. */
.cover-frame { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; }
.cover-frame > .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-frame > .cover--remote { background: transparent; }
.cover-frame--loading { border-radius: 3px 6px 6px 3px; background: var(--card-deep); box-shadow: var(--cover-ring); }
.cover-frame--loading > .cover--book { visibility: hidden; }
/* The plain coloured "book" with the title printed on it. */
.cover--book {
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14% 12% 14% 16%;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0 5%, rgba(255, 255, 255, .08) 5% 6.5%, transparent 6.5%), var(--book);
  color: #fff; overflow: hidden; text-align: left;
}
.cover--book__title { font-family: var(--display); font-weight: 600; font-size: clamp(.85rem, 1.4vw, 1.15rem); line-height: 1.15; overflow-wrap: anywhere; }
.cover--book__author { font-size: .8rem; font-style: italic; opacity: .92; }
.review__cover .cover-frame .cover--book__title { font-size: 1.5rem; }

.badge { display: inline-flex; align-items: baseline; gap: 1px; background: var(--soft); color: var(--on-soft); border: 1px solid var(--soft-line); border-radius: 999px; padding: 3px 10px; font-family: var(--display); font-size: .9rem; line-height: 1.3; }
.badge b { font-weight: 700; font-size: 1.05em; }
.badge span { font-size: .8em; }
.badge--on-cover { position: absolute; top: 8px; right: -6px; box-shadow: var(--shadow); }
.badge--large { font-size: 1.05rem; margin: 10px 0 2px; }

/* ---------- home ---------- */

.hello {
  max-width: 1000px; margin-bottom: clamp(32px, 5vw, 56px);
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 38px);
  background: var(--panel); color: var(--on-panel); border-radius: 16px;
}
.hello__hand { font-family: var(--hand); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; margin: 0 0 10px; transform: rotate(-1.5deg); transform-origin: left; }
.hello__lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; margin: 0; max-width: 62ch; }
.hello a { color: var(--on-panel); }


.feature { margin-bottom: clamp(40px, 6vw, 72px); }
.feature__card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow); max-width: 1000px;
}
.feature__cover { display: block; transform: rotate(-1.2deg); transition: transform .25s ease; }
.feature__cover:hover { transform: rotate(0deg) translateY(-2px); }
.feature__title { font-family: var(--display); font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; margin: 0; }
.feature__title a { color: var(--link); text-decoration: none; }
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.feature__excerpt { margin: 16px 0 14px; color: var(--ink-soft); max-width: 62ch; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 36px 28px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card__link { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; width: 100%; }
.card__cover { position: relative; display: block; margin-bottom: 8px; transition: transform .2s ease; }
.card__cover .cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.card__link:hover .card__cover { transform: translateY(-4px) rotate(-.6deg); }
.card__title { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.2; color: var(--link); }
.card__link:hover .card__title { text-decoration: underline; }
.card__author { color: var(--muted); font-size: .95rem; font-style: italic; line-height: 1.2; }

/* ---------- review ---------- */

.review { max-width: 1000px; }
.review__head { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.review__cover .cover { transform: rotate(-1deg); }
.review__title { font-family: var(--display); font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 600; line-height: 1.02; letter-spacing: -.02em; margin: 0; color: var(--link); }

.stamp {
  display: inline-grid; justify-items: center; margin-top: 20px; padding: 12px 20px 10px;
  background: var(--soft); color: var(--on-soft);
  border: 2px solid var(--bar); border-radius: 14px; transform: rotate(-2deg);
}
.stamp__label { font-family: var(--display); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.stamp__num { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1; margin-top: 2px; }
.stamp__of { font-size: .82rem; }

.scores { display: grid; gap: 12px; max-width: 720px; margin: 0 0 clamp(28px, 4vw, 40px); padding: 20px 22px; background: var(--soft); color: var(--on-soft); border: 1px solid var(--soft-line); border-radius: 12px; }
.score { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) 64px; gap: 14px; align-items: center; }
.score__label { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.score__bar { height: 10px; background: var(--page); border: 1px solid var(--soft-line); border-radius: 999px; overflow: hidden; }
.score__bar span { display: block; height: 100%; background: var(--bar); border-radius: 999px; }
.score__num { font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-align: right; font-variant-numeric: tabular-nums; }
.score__num small { font-weight: 400; font-size: .75em; }

.prose { max-width: 68ch; font-size: 1.2rem; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose > p:first-child::first-letter {
  float: left; font-family: var(--display); font-weight: 600; font-size: 3.6em; line-height: .82;
  padding: .08em .1em 0 0; color: var(--link);
}

.gb { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1000px; margin: clamp(28px, 4vw, 44px) 0; }
.gb__col { border-radius: 12px; padding: 20px 24px 14px; }
.gb__col h2 { font-family: var(--hand); font-weight: 700; font-size: 2rem; line-height: 1; margin: 0 0 10px; }
.gb__col ul { margin: 0; padding: 0; list-style: none; }
.gb__col li { position: relative; padding-left: 28px; margin: 0 0 10px; line-height: 1.5; }
.gb__col li::before { position: absolute; left: 0; top: 0; font-family: var(--display); font-weight: 700; }
.gb__col--goods { background: var(--goods-bg); }
.gb__col--goods h2, .gb__col--goods li::before { color: var(--goods); }
.gb__col--goods li::before { content: "+"; }
.gb__col--bads { background: var(--bads-bg); }
.gb__col--bads h2, .gb__col--bads li::before { color: var(--bads); }
.gb__col--bads li::before { content: "–"; }

.rec { position: relative; max-width: 68ch; margin: clamp(28px, 4vw, 44px) 0; padding: 22px 26px 8px; background: var(--soft); color: var(--on-soft); border: 1px solid var(--soft-line); border-left: 5px solid var(--bar); border-radius: 4px 12px 12px 4px; box-shadow: var(--shadow); }
.rec__label { font-family: var(--hand); font-weight: 700; font-size: 1.9rem; line-height: 1; margin: 0 0 8px; }
.rec p { margin: 0 0 1em; font-size: 1.15rem; }
.rec a { color: inherit; }

/* ---------- the Bookshelf ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shelf-controls { display: flex; flex-direction: column; gap: 8px; }
.shelf-filter { border: 0; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
/* A fieldset's legend sits on its top border; float it so it stays below the divider. */
.shelf-filter .side-h { padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.shelf-filter .side-h + * { clear: both; }
.shelf-filter__opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.shelf-filter__opt input { accent-color: #fff; width: 16px; height: 16px; margin: 0; }
.shelf-filter__opt .count { margin-left: auto; }
.shelf-label { display: block; margin: 10px 0 0; }
.shelf-select { width: 100%; font: inherit; font-size: 1rem; color: var(--on-panel-field); background: var(--panel-field); border: 1px solid var(--panel-line); border-radius: 10px; padding: 8px 10px; }
.shelf-open-filters { display: none; }

.shelf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 22px; }
.shelf-book[hidden] { display: none; }
.shelf-book__link {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 0;
  font: inherit; text-align: left; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.shelf-book__cover { position: relative; display: block; width: 100%; margin-bottom: 6px; transition: transform .2s ease; }
.shelf-book__cover > .cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.shelf-book__link:hover .shelf-book__cover { transform: translateY(-3px); }
.shelf-book__title { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2; color: var(--link); }
.shelf-book__link:hover .shelf-book__title { text-decoration: underline; }
.shelf-book__author { color: var(--muted); font-size: .9rem; font-style: italic; line-height: 1.2; }
.score-badge { position: absolute; top: 6px; right: -6px; z-index: 1; background: var(--soft); color: var(--on-soft); border: 1px solid var(--soft-line); border-radius: 999px; padding: 1px 8px; font-family: var(--display); font-weight: 700; font-size: .85rem; box-shadow: var(--shadow); white-space: nowrap; }
.score-badge small { font-size: .72rem; font-weight: 600; opacity: .8; }
.tag { margin-top: 4px; font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--on-soft); background: var(--soft); border: 1px solid var(--soft-line); border-radius: 6px; padding: 2px 8px; }
.shelf-empty { color: var(--muted); font-style: italic; }

.book-card {
  width: min(92vw, 560px); padding: 24px; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.book-card[open] { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.book-card::backdrop { background: rgba(10, 20, 30, .5); }
.book-card__title { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; color: var(--link); margin: 0; }
.book-card__score { font-family: var(--display); font-weight: 700; color: var(--on-soft); margin: 10px 0 0; }
.book-card__score:empty { display: none; }
.book-card__close { margin-top: 16px; font: 600 1rem var(--display); color: var(--on-panel); background: var(--panel); border: 0; border-radius: 10px; padding: 8px 18px; cursor: pointer; }
@media (max-width: 480px) {
  .book-card[open] { grid-template-columns: 1fr; }
  .book-card__cover { max-width: 150px; }
}

/* ---------- genre / series pages and text pages ---------- */

.list-head { margin-bottom: clamp(24px, 4vw, 40px); }
.list-head__title, .page__title { font-family: var(--display); font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 6px; color: var(--link); }
.card__number { font-family: var(--display); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.page { max-width: 760px; }
.page__title { margin-bottom: 20px; }
.prose--plain > p:first-child::first-letter { float: none; font: inherit; padding: 0; color: inherit; }
/* Contact form */
.contact-form { display: grid; gap: 16px; max-width: 560px; margin: 8px 0 40px; }
.contact-form__field { display: grid; gap: 6px; font-family: var(--display); font-weight: 600; color: var(--ink); }
.contact-form__hint { font-family: inherit; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.contact-form input, .contact-form textarea { font: inherit; font-family: var(--body, inherit); font-weight: 400; width: 100%; padding: 10px 12px; border: 1px solid var(--soft-line); border-radius: 8px; background: var(--card); color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
/* The honeypot: off screen, for bots only. */
.contact-form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__send { justify-self: start; font: 600 1.05rem var(--display); padding: 11px 22px; border: 0; border-radius: 999px; background: var(--panel); color: #fff; cursor: pointer; }
.contact-form__send:hover { background: var(--link); }
.contact-form__send:disabled { opacity: .7; cursor: wait; }
.contact-form__error { margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--bads-bg); color: var(--bads); font-weight: 600; }


.foot { margin-top: clamp(56px, 8vw, 96px); padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .95rem; max-width: 1000px; }
.foot p { margin: 0 0 4px; }
.foot__small { font-size: .85rem; }

/* ---------- tablets and phones: sidebar becomes a slide-in panel from the left ---------- */

@media (max-width: 899px) {
  .shell { display: block; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 20; padding: 10px 16px;
    background: var(--panel); color: var(--on-panel);
  }
  .menu-btn {
    order: -1; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
    font-family: var(--display); font-weight: 600; font-size: 1rem;
    color: var(--on-panel); background: transparent; border: 1px solid var(--panel-line); border-radius: 10px; cursor: pointer;
  }
  .menu-btn::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 50% / 100% 2px no-repeat, linear-gradient(currentColor 0 0) 0 100% / 100% 2px no-repeat; }
  .sidebar {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; height: auto;
    width: min(86vw, 330px); transform: translateX(-102%); transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  body.menu-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(10, 20, 30, .45); }
  .scrim[hidden] { display: none; }
  body.menu-open { overflow: hidden; }

  .main { padding: 20px 16px 32px; }
  .shelf-open-filters { display: inline-flex; margin-top: 10px; font: 600 1rem var(--display); color: var(--on-panel); background: var(--panel); border: 0; border-radius: 10px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
  .shelf-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 24px 16px; }
  .review__head { grid-template-columns: 1fr; align-items: start; }
  .review__cover { max-width: 230px; }
}

@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .feature__card { grid-template-columns: 1fr; }
  .feature__cover { max-width: 190px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .score { grid-template-columns: 1fr 56px; row-gap: 6px; }
  .score__bar { grid-column: 1 / -1; grid-row: 2; }
  .prose { font-size: 1.1rem; }
  .gb__col, .rec { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
