/* Brain Bee Library — design system (Template I)
   One file for every page. Colours and fonts live in :root; components below.
   No JavaScript needed: everything here is plain CSS. */

/* ---- Fonts (self-hosted, SIL Open Font License, see fonts/OFL.txt) ---- */
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans.woff2") format("woff2");
  font-weight: 200 1000; font-display: swap; }

/* ---- Tokens ---- */
:root {
  --bg: #FFFDFB;
  --ink: #202344;        /* main text */
  --plum: #2B1638;       /* hero text & dark buttons */
  --muted: #4A4F6E;      /* secondary text (passes 4.5:1 on light backgrounds) */
  --navy: #0B2A5B;       /* footer, logo "Library" */
  --honey: #F2A104;      /* credit hexagons */
  --honey-text: #B06F00; /* logo "Brain Bee" (large text) */
  --pink: #FF5DA8;       /* accents with dark text */
  --pink-text: #B4306A;  /* pink you can read as text */
  --blue-text: #3E4BD8;  /* links */
  --yellow: #FFDC74;
  --green: #B7ED7B;
  --mint: #D3F5E2;
  --soft-pink: #FFE6F1;
  --soft-blue: #E5EDFF;
  --soft-green: #E9FBD8;
  --butter: #FFF4CC;
  --cream: #FFF8ED;
  --line: #EEEEF5;
  --danger: #B42318;
  --danger-bg: #FDECEA;
  --ok-bg: #E9FBD8;

  --f-display: "Fredoka", "Nunito Sans", system-ui, sans-serif;
  --f-head: "Bricolage Grotesque", "Nunito Sans", system-ui, sans-serif;
  --f-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 14px; --r-md: 22px; --r-lg: 32px; --r-xl: 44px; --pill: 999px;
  --shadow: 0 14px 34px rgba(32, 35, 68, 0.10);
  --wrap: 1200px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body);
  font-size: 17px; line-height: 1.6; font-weight: 500; }
img { max-width: 100%; display: block; }
a { color: var(--blue-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .4em; }
h1, h2 { font-family: var(--f-head); font-weight: 800; letter-spacing: -1px; }
h1 { font-size: clamp(34px, 4.6vw, 52px); }
h2 { font-size: clamp(28px, 3.8vw, 44px); }
h3 { font-family: var(--f-head); font-weight: 800; font-size: 22px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue-text); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--pill); z-index: 10; }
.skip:focus { left: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.muted { color: var(--muted); }
.kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--pink-text); margin-bottom: 8px; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.section-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 6px; }
.section-head p { margin: 0; }

/* ---- Header ---- */
.site-header { background: var(--bg); border-bottom: 1px solid #F1EAF0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 52px; height: 51px; }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: 23px; letter-spacing: -.5px; line-height: 1; }
.brand-name .b1 { color: var(--honey-text); }
.brand-name .b2 { color: var(--navy); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-left: auto; font-weight: 700; font-size: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 10px 2px; }
.site-nav a:hover { color: var(--pink-text); }
.site-nav a.btn, .site-nav a.btn:hover { color: #fff; padding: 8px 18px; }
.site-nav form { margin: 0; }
.nav-count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: var(--pill); background: var(--pink); color: var(--ink); font-size: 13px; text-align: center; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 24px; border: 2px solid transparent; border-radius: var(--pill); cursor: pointer;
  font-family: var(--f-display); font-weight: 600; font-size: 17px; line-height: 1.1; text-decoration: none;
  background: var(--plum); color: #fff; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-honey { background: var(--yellow); color: var(--plum); }
.btn-honey:hover { background: #FFD04D; color: var(--plum); }
.btn-pink { background: var(--pink); color: var(--plum); }
.btn-pink:hover { background: #FF4598; color: var(--plum); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #D7D8ED; }
.btn-ghost:hover { background: var(--soft-blue); color: var(--ink); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 10px 2px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.linkbtn:hover { color: var(--pink-text); }
button:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---- Messages ---- */
.messages { list-style: none; margin: 20px auto 0; padding: 0 24px; max-width: var(--wrap); display: grid; gap: 10px; }
.msg { padding: 14px 18px; border-radius: var(--r-md); background: var(--ok-bg); font-weight: 700; }
.msg.error { background: var(--danger-bg); color: var(--danger); }
.msg.warning, .msg.info { background: var(--butter); }

/* ---- Cards & chips ---- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.card-tint { border: 0; }
.chip { display: inline-block; border-radius: var(--pill); padding: 8px 16px; font-weight: 800; font-size: 15px; text-decoration: none; color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-pink { background: var(--soft-pink); } .bg-blue { background: var(--soft-blue); }
.bg-green { background: var(--soft-green); } .bg-butter { background: var(--butter); }
.bg-mint { background: var(--mint); } .bg-cream { background: var(--cream); }

/* ---- Forms ---- */
label { font-weight: 800; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--cream);
  border: 2px solid #F3E2CB; border-radius: var(--r-sm); padding: 12px 16px; margin: 0 0 6px; }
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-text); outline: none; background: #fff; }
.form-stack p { margin: 0 0 16px; }
.form-stack .helptext, .helptext { display: block; color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 4px; }
.form-stack ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.errorlist, .form-stack ul.errorlist { list-style: none; margin: 4px 0 6px; padding: 0; color: var(--danger); font-weight: 700; font-size: 15px; }
input.is-invalid, textarea.is-invalid, select.is-invalid { border-color: var(--danger); background: var(--danger-bg); }
input.is-valid { border-color: #2E9E5B; }
.field-msg { display: block; font-size: 15px; font-weight: 700; margin-top: 4px; }
.field-msg.bad { color: var(--danger); }
.field-msg.good { color: #1E7A44; }
.form-errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--r-sm); padding: 12px 16px; font-weight: 700; margin-bottom: 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 200px; min-width: 0; margin: 0; border-radius: var(--pill); }

/* ---- Auth / small centred pages ---- */
.panel { max-width: 520px; margin: 40px auto; }
.panel .card { box-shadow: var(--shadow); border: 0; }
.panel-mascot { width: 96px; height: 94px; margin: 0 auto 8px; }
.center { text-align: center; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); background: var(--cream); }
tr:last-child td { border-bottom: 0; }
td form { margin: 0; }

/* ---- Hero (photo with overlapping card) ---- */
.hero { padding-top: 16px; }
.hero-photo { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 600px;
  display: flex; align-items: flex-end; padding: 32px; }
.hero-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero-card { position: relative; background: #fff; border-radius: var(--r-lg); padding: 34px; max-width: 540px;
  box-shadow: 0 20px 50px rgba(43, 22, 56, .2); color: var(--plum); }
.hero-card h1 { font-family: var(--f-display); font-weight: 700; letter-spacing: 0; font-size: clamp(40px, 5.4vw, 66px); line-height: 1.02; margin: 16px 0 14px; }
.hero-card h1 em { font-style: normal; color: var(--pink-text); }
.hero-card p { font-size: 19px; margin-bottom: 22px; }
.badge { display: inline-block; border-radius: var(--pill); padding: 6px 14px; font-weight: 800; font-size: 14px; background: var(--mint); color: var(--plum); }
.pin-result { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; }
.pin-result.ok { background: var(--soft-green); }
.pin-result.no { background: var(--soft-pink); }
@media (max-width: 640px) {
  .hero-photo { min-height: 0; padding: 0; flex-direction: column; border-radius: var(--r-lg); }
  .hero-photo > img { position: static; height: 300px; }
  .hero-card { border-radius: 0; box-shadow: none; max-width: none; padding: 26px 22px; }
}

/* ---- Ribbon ---- */
.ribbon { background: var(--ink); color: var(--yellow); border-radius: var(--pill); padding: 14px 28px; margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; font-family: var(--f-head); font-weight: 700; font-size: 20px; }
.ribbon .s1 { color: var(--pink); } .ribbon .s2 { color: var(--green); }

/* ---- Reader cards (kids / teens / mums) ---- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.reader { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); }
.reader img { width: 100%; height: 360px; object-fit: cover; object-position: 50% 25%; }
.reader-body { padding: 22px 24px 26px; display: grid; gap: 6px; }
.reader-body strong { font-family: var(--f-head); font-weight: 800; font-size: 26px; line-height: 1.1; }
.reader-tag { font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pink-text); }
.reader-go { font-weight: 800; }
.reader:hover .reader-go { text-decoration: underline; }

/* ---- Journey steps ---- */
.journey { background: var(--cream); border: 1px solid #F3E7D4; border-radius: 40px; padding: 48px 36px; }
.journey h2 { color: var(--navy); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.step { background: #fff; border: 1px solid #E8E5E9; border-radius: 26px; overflow: hidden; }
.step img { width: 100%; height: 220px; object-fit: cover; }
.step-body { padding: 20px 22px 24px; }
.step-num { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; }
.step h3 { margin: 10px 0 4px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .journey { padding: 32px 18px; border-radius: var(--r-lg); } }

/* ---- Book cards ---- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.book { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; }
.book-cover { height: 240px; border-radius: var(--r-sm); background: var(--soft-blue); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; }
.book-cover.empty { font-family: var(--f-display); font-weight: 600; color: var(--muted); padding: 16px; text-align: center; }
.book-title { display: block; font-weight: 800; margin-top: 12px; line-height: 1.3; color: var(--ink); text-decoration: none; }
a.book-title:hover { color: var(--pink-text); text-decoration: underline; }
.book-cover-link { display: block; text-decoration: none; }

/* Single book page */
.crumbs { margin: 28px 0 18px; font-weight: 700; color: var(--muted); }
.book-page { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 40px; align-items: start; }
.book-page-cover img, .book-page-cover .book-cover { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow); }
.book-page-cover .book-cover { height: 460px; }
.book-page-info h1 { margin: 14px 0 6px; }
.book-facts { margin: 18px 0 22px; max-width: 420px; }
.book-page-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.h3 { font-family: var(--f-head); font-weight: 800; font-size: 22px; letter-spacing: 0; }
@media (max-width: 720px) { .book-page { grid-template-columns: 1fr; } .book-page-cover { max-width: 280px; } }
.book-author { color: var(--muted); font-size: 15px; }
.book-cat { color: var(--muted); font-size: 14px; }
.book-links { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.book-links a { font-weight: 800; white-space: nowrap; }
.book-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status { display: inline-block; border-radius: var(--pill); padding: 4px 10px; font-size: 13px; font-weight: 800; }
.status.yes { background: var(--soft-green); }
.status.no { background: #F2F1FC; color: var(--muted); }
.status.hot { background: var(--yellow); }
.status.pink { background: var(--soft-pink); }
.covers-c1 { background: #FF8BBA; } .covers-c2 { background: #A9A2FF; } .covers-c3 { background: #FFD56B; } .covers-c4 { background: #B7ED7B; } .covers-c5 { background: #7FD4FF; }

/* ---- Search bar (catalogue) ---- */
.search { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 26px; }
.search input, .search select { margin: 0; }
@media (max-width: 640px) { .search { grid-template-columns: 1fr; } }
.pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 28px; font-weight: 700; }

/* ---- Hive (credits, deliveries, tracker) ---- */
.hive { background: var(--ink); color: #fff; border-radius: 40px; padding: 40px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.hive-intro { flex: 1 1 300px; display: flex; gap: 18px; align-items: center; }
.hive-intro img { width: 110px; height: 108px; flex: 0 0 110px; }
.hive-intro h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 6px; }
.hive-intro p { color: #D9D9EB; margin: 0; }
.hive-tiles { flex: 2 1 520px; display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 210px; border-radius: 26px; padding: 22px; color: var(--ink); background: #fff; }
.tile-label { font-weight: 800; font-size: 14px; }
.tile-big { font-family: var(--f-head); font-weight: 800; font-size: 44px; line-height: 1.15; margin: 6px 0 2px; }
.tile-big small { font-size: 20px; }
.hexes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.hex { width: 44px; height: 50px; }
.hex .full { fill: var(--honey); }
.hex .free { fill: var(--cream); stroke: #E7D5B5; stroke-width: 3; }
.tracker { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-weight: 800; flex: 1 1 100%; }
.tracker li { flex: 1 1 120px; text-align: center; border-radius: var(--pill); padding: 9px; border: 2px solid #4D5175; }
.tracker .done { background: var(--green); border-color: var(--green); color: var(--ink); }
.tracker .now { background: var(--pink); border-color: var(--pink); color: var(--ink); }
.tracker.light li { border-color: #D7D8ED; }
@media (max-width: 640px) { .hive { padding: 28px 20px; border-radius: var(--r-lg); } }

/* ---- Plans ---- */
.toggle { display: flex; flex-wrap: wrap; gap: 4px; background: #F2F1FC; border-radius: var(--pill); padding: 5px; }
.toggle a { text-decoration: none; color: var(--ink); font-weight: 800; padding: 10px 16px; border-radius: var(--pill); min-height: 44px; display: inline-flex; align-items: center; }
.toggle a[aria-current="true"] { background: var(--ink); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.plan { border-radius: 28px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.plan-name { font-family: var(--f-head); font-weight: 800; font-size: 24px; }
.plan-price { font-family: var(--f-head); font-weight: 800; font-size: 32px; line-height: 1.1; }
.plan-price small { font-family: var(--f-body); font-size: 15px; font-weight: 700; }
.plan .btn { margin-top: auto; }
.plan.dark { background: var(--ink); color: #fff; }
.plan.dark .muted { color: #D9D9EB; }

/* Plan cards with price breakdown */
.plans-note { margin: -8px 0 22px; }
.plan-card { background: #fff; border: 2px solid #fff; border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-top { padding: 26px 24px 22px; display: grid; gap: 6px; }
.plan-label { font-family: var(--f-body); font-weight: 800; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; margin: 0; color: var(--navy); }
.plan-top .plan-price { color: var(--navy); font-size: 44px; }
.plan-top .plan-price small { font-size: 15px; }
.plan-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plan-small { font-size: 14px; margin: 0; }
.plan-lines { margin: 0; display: grid; gap: 10px; }
.plan-lines div { display: flex; justify-content: space-between; gap: 12px; }
.plan-lines dt { color: var(--muted); }
.plan-lines dd { margin: 0; font-weight: 800; }
.plan-deliv { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.plan-total strong { display: block; font-family: var(--f-head); font-weight: 800; font-size: 30px; color: var(--navy); }
.plan-body .btn { margin-top: auto; }
.plan-card.is-current { border-color: var(--honey); }
.tone-butter { background: var(--butter); } .tone-pink { background: var(--soft-pink); }
.tone-blue { background: #E1EEF8; } .tone-lilac { background: #ECE7FF; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; }
.faq summary { font-weight: 800; font-size: 19px; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---- Account ---- */
.account-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin: 36px 0 24px; }
.account-head h1 { margin: 0; }
.notice { border-radius: var(--r-lg); padding: 24px 28px; background: var(--butter); }
.list-cards { display: grid; gap: 12px; }
.row-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.row-card .t { font-weight: 800; }

/* ---- Dashboard ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.stat { border-radius: var(--r-md); padding: 18px 20px; }
.stat strong { display: block; font-family: var(--f-head); font-size: 34px; line-height: 1.1; }
.alert { border-radius: var(--r-lg); padding: 24px; background: var(--danger-bg); border: 2px solid var(--danger); margin-bottom: 28px; }
.alert h2 { color: var(--danger); font-size: 26px; }

/* ---- Delivery page (phone first) ---- */
.delivery { max-width: 640px; }
.section-tight { padding: 12px 0 24px; }
.stop { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; margin-bottom: 14px; display: grid; gap: 10px; }
.stop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stop-name { font-size: 19px; }
.stop-address { margin: 0; color: var(--muted); }
.stop-call { font-weight: 800; font-size: 18px; text-decoration: none; padding: 8px 0; }
.stop-books { margin: 0; }
.stop-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.stop .btn { min-height: 52px; font-size: 18px; }
.stop .btn-small { min-height: 44px; font-size: 16px; }
.no-margin { margin: 0; }

/* ---- Legal pages ---- */
.legal { max-width: 860px; }
.legal h2 { font-size: 26px; margin: 34px 0 10px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .notice { margin-bottom: 8px; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #fff; margin-top: 72px; }
.site-footer .wrap { padding-top: 52px; padding-bottom: 32px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; gap: 18px; align-items: center; flex: 1 1 440px; }
.footer-brand img { width: 92px; height: 90px; flex: 0 0 92px; }
.footer-brand .big { font-family: var(--f-head); font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -1px; line-height: 1.05; }
.footer-brand .big span { color: var(--yellow); }
.footer-brand p { margin: 8px 0 0; color: #D9DFF0; }
.footer-links { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; font-weight: 700; }
.footer-links a { color: #fff; }

/* ---- Motion: respect people who prefer less of it ---- */
@media (prefers-reduced-motion: no-preference) {
  .reader, .step, .book, .btn { transition: transform .18s ease, background-color .18s ease; }
  .reader:hover, .book:hover { transform: translateY(-4px); }
}

/* ---- Small helpers (used instead of inline style="..." so the CSP can block inline styles) ---- */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 12px !important; }
.mt-2 { margin-top: 18px !important; }
.mt-3 { margin-top: 28px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 18px !important; }
.mb-3 { margin-bottom: 28px !important; }
.pt-1 { padding-top: 8px !important; }
.title-tight { margin: 10px 0 4px !important; }
.min-0 { min-width: 0; }
.items-center { align-items: center; }
.narrow { max-width: 560px; }
.small-note { font-size: 14px; }
.bg-yellow { background: var(--yellow); }
.bg-hotpink { background: var(--pink); }
.bg-lime { background: var(--green); }
.card-alert { border-color: var(--pink); }
.row-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cover-thumb { width: 64px; height: 88px; flex: 0 0 64px; font-size: 11px; padding: 4px; }
.file-input { flex: 1 1 220px; border-radius: var(--r-sm); }
.qr-wrap { display: flex; justify-content: center; }
.backup-codes { font-size: 18px; line-height: 1.7; padding: 14px 18px; border-radius: var(--r-sm); }
.scan-preview { max-height: 180px; border-radius: var(--r-sm); margin: 0 auto 16px; }
