/* ===========================================================
   Notes store - notebook theme (light)
   Ruled paper, red margin line, ballpoint-blue ink, red-pen
   price strikes, tape and stacked-page edges.
   =========================================================== */
:root {
  --paper: #fbfcff;
  --rule: #dce7f7;
  --margin: #f0a3a0;
  --ink: #14213d;
  --ink-soft: #5a6684;
  --accent: #2848d8;
  --accent-dark: color-mix(in srgb, var(--accent) 72%, #000);
  --accent-tint: color-mix(in srgb, var(--accent) 9%, #fff);
  --pen-red: #e0413a;
  --hl: #ffe94d;
  --line: #e4e9f4;
  --card: #fff;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 10px 24px -10px rgba(20, 33, 61, .18);
  --head: 'Shantell Sans', 'Segoe Print', 'Comic Sans MS', ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --wrap: 1040px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html.noscroll { overflow: hidden; }
h1, h2, h3, h4, .d, .prose, .offer, .rev-text { overflow-wrap: anywhere; }
body {
  margin: 0; color: var(--ink); font: 16px/1.55 var(--body);
  background: var(--paper) linear-gradient(transparent 31px, var(--rule) 32px) 0 0 / 100% 32px;
  min-height: 100vh; display: flex; flex-direction: column;
}
body::before { /* the red margin line */
  content: ''; position: fixed; top: 0; bottom: 0; left: max(10px, calc(50% - 548px));
  width: 2px; background: var(--margin); opacity: .65; pointer-events: none; z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* ---------- loading shapes (no text) ---------- */
/* darker base so the shapes read clearly on the ruled paper; a soft light band slides across (transform only, so it stays smooth) */
@keyframes shm { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk, .bind:empty { position: relative; overflow: hidden; background: #cdd8ec !important; border-radius: 6px; }
.sk::after, .bind:empty::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%); will-change: transform;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .62) 50%, rgba(255, 255, 255, 0) 100%);
  animation: shm 1.25s ease-in-out infinite;
}
.bind:empty { display: block; min-height: 1.1em; width: min(70%, 380px); }
.bind.wide:empty { width: min(100%, 520px); }
.skel { pointer-events: none; cursor: default; }
.skel .ln { height: 14px; border-radius: 6px; }
.skel .ln.t { height: 24px; width: 62%; }
.skel .ln.w80 { width: 80%; } .skel .ln.w55 { width: 55%; } .skel .ln.w40 { width: 40%; }

/* ---------- top: binding + brand ---------- */
.announce { background: var(--ink); color: #fff; text-align: center; font-size: 14px; padding: 7px 16px; position: relative; z-index: 2; }
.binding {
  height: 22px; background:
    radial-gradient(circle, #f1f4fb 0 3.5px, #aab5cf 4px 5px, transparent 5.5px) 0 center / 30px 22px repeat-x,
    #e6ecf8;
  border-bottom: 1px solid #d3dcee;
}
.top { padding: 14px 0 6px; }
.top .wrap { display: flex; align-items: center; gap: 14px; }
.top .brand { margin-right: auto; }
.cart-link { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #c6d3ec; color: var(--ink); text-decoration: none; transition: border-color .15s, color .15s; }
.cart-link:hover { border-color: var(--accent); color: var(--accent); }
.cart-link svg { width: 22px; height: 22px; }
.cart-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--pen-red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.brand { min-width: 0; white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 22px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.brand #siteName:empty { width: 120px; height: 24px; }
.back { white-space: nowrap; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.back:hover { color: var(--accent); }
.back svg { width: 18px; height: 18px; }

/* ---------- hero (small) ---------- */
.hero { padding: 22px 0 8px; }
.hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(26px, 5.2vw, 40px); max-width: 17em; }
.hero p { margin-top: 10px; max-width: 34em; color: var(--ink-soft); font-size: 17px; }
.hero .bind:empty + .bind:empty { margin-top: 12px; }
.hero-art { width: 120px; height: 120px; flex: none; }
@media (max-width: 640px) { .hero-art { display: none; } .hero .wrap { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 3px 0 var(--accent-dark); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--accent-dark); }
.btn.ghost { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.hero .btn { margin-top: 18px; }

/* ---------- sections ---------- */
.sec { padding: 30px 0 18px; }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(22px, 4vw, 30px); display: inline; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--hl) 75%, #fff) 62%); padding: 0 4px; margin-left: -4px; }
.sec-head h2.bind:empty { display: block; width: 240px; height: 30px; }
.sec-head p { margin-top: 8px; color: var(--ink-soft); }

/* ---------- jump buttons: a scrollable row of capsules ---------- */
.tabs-row { position: relative; margin: 0 0 20px; }
.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 5px 4px 9px; scrollbar-width: thin; scrollbar-color: #c3cfe6 transparent; overscroll-behavior-x: contain; }
.tabs.can-drag { cursor: grab; }
.tabs.drag { cursor: grabbing; user-select: none; }
.tabs::-webkit-scrollbar { height: 6px; } .tabs::-webkit-scrollbar-thumb { background: #c3cfe6; border-radius: 3px; }
.tabs-row.fade-r .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); }
.tabs-row.fade-l .tabs { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 34px), transparent); }
.tabs-row.fade-l.fade-r .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, transparent, #000 34px, #000 calc(100% - 34px), transparent); }
.tab-pill {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: #fff; border: 2px solid #c6d3ec; color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 2px 0 #dbe4f4; transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.tab-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.tab-pill:active { transform: translateY(2px); box-shadow: none; }
.tab-pill.sk { width: 100px; border-color: transparent; box-shadow: none; cursor: default; }
.tab-pill.sk:nth-child(2) { width: 124px; } .tab-pill.sk:nth-child(3) { width: 86px; }
.jump-target { scroll-margin-top: 18px; }
@keyframes flash { 0%, 100% { outline-color: transparent; } 20%, 70% { outline-color: var(--accent); } }
.flash { outline: 3px solid transparent; outline-offset: 5px; animation: flash 1.5s ease; }

/* ---------- class cards: composition notebook ---------- */
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 30px 28px; }
.cls {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border-radius: 4px 12px 12px 4px; padding-left: 18px; isolation: isolate;
  box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0 #d8e0f0, 8px 8px 0 -1px #fff, 8px 8px 0 0 #d8e0f0, 12px 14px 22px -10px rgba(20, 33, 61, .3);
  transition: transform .15s; cursor: pointer;
}
.cls::before { /* spine with stitching */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, #0f1a33, #1c2c52);
}
.cls::after {
  content: ''; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 0; border-left: 2px dashed rgba(255, 255, 255, .55);
}
.cls:hover { transform: translateY(-3px) rotate(-.3deg); }
.cls-cover { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; border-top-right-radius: 12px; background: #e9eef8; }
.cls-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cls h3 { font-size: 22px; }
.cls .d { color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
a.btn.block, .btn.block { width: 100%; }
.cls .btn { margin-top: auto; }
.noimg { background: repeating-linear-gradient(135deg, #eef2fa 0 10px, #e6ecf8 10px 20px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 4px; color: var(--ink); transform: rotate(-.8deg); }
.chip.c0 { background: #fff0a0; } .chip.c1 { background: #c8f1dc; } .chip.c2 { background: #ffd5df; } .chip.c3 { background: #cfe5ff; }
.chip:nth-child(even) { transform: rotate(.7deg); }

/* skeleton cards share the real cards' shape so nothing jumps when data arrives */
.cls.skel:hover, .note-card.skel:hover { transform: none; }
.cls.skel .cls-cover { aspect-ratio: 16 / 10; width: 100%; border-radius: 0 12px 0 0; }
.cls.skel .cls-body { gap: 12px; }
.cls.skel .btn-sk { height: 44px; border-radius: 10px; margin-top: auto; }
.note-card.skel .cover .sk { width: 100%; aspect-ratio: 210 / 297; border-radius: 3px; }
.note-card.skel .body-sk { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }

/* ---------- class page: notes list ---------- */
.page-head { padding: 12px 0 4px; }
.page-head h1 { font-size: clamp(26px, 5vw, 38px); margin-top: 6px; }
.page-head p, .page-head .d { color: var(--ink-soft); margin-top: 8px; max-width: 40em; }
.page-head .d:empty { display: none; }
.page-head + .tabs-row { margin: 16px 0 0; }
.page-head .chips { margin-top: 12px; }
.notes { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.note-card {
  position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 16px 16px 16px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: transform .15s; cursor: pointer;
}
.note-card::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .55; }
.note-card:hover { transform: translateY(-2px); }
.note-card .cover { position: relative; align-self: start; }
.note-card .cover::before { /* tape */
  content: ''; position: absolute; z-index: 1; top: -9px; left: 50%; width: 52px; height: 17px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 233, 77, .72); box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.note-card .cover img, .note-card .cover .noimg { width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 8px rgba(20, 33, 61, .25); background: #eef2fa; }
.note-card h3 { font-size: 20px; }
.note-card h3 a { text-decoration: none; color: inherit; }
.note-card:hover h3 a { color: var(--accent); }
.note-card .d { color: var(--ink-soft); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.price { font-family: var(--head); font-weight: 700; font-size: 26px; }
.was { position: relative; color: var(--ink-soft); font-size: 17px; padding: 0 2px; }
.was::after { content: ''; position: absolute; left: -3px; right: -3px; top: 52%; height: 2px; background: var(--pen-red); transform: rotate(-7deg); border-radius: 2px; }
.off { font-size: 13px; font-weight: 700; background: var(--hl); padding: 1px 8px; border-radius: 4px; transform: rotate(-1.5deg); align-self: center; }
@media (max-width: 420px) { .note-card { grid-template-columns: 92px 1fr; gap: 12px; padding-left: 20px; } .price { font-size: 22px; } }

.empty { padding: 32px 22px; text-align: center; color: var(--ink-soft); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- note page ---------- */
.note-layout { display: grid; gap: 22px; margin-top: 8px; padding-bottom: 40px;
  grid-template-areas: 'gal' 'info' 'pdfs' 'revs'; }
/* desktop: ONE page scroll. The main preview is sized from the window height so it fits the screen, with the small
   previews in a column on its right; the price/pay block sits beside them, and PDFs and reviews follow below. */
@media (min-width: 880px) {
  .note-layout { --gh: clamp(340px, calc(100vh - 185px), 800px); --tw: 92px; grid-template-columns: auto minmax(0, 1fr); gap: 20px 44px; grid-template-areas: 'gal info' 'pdfs pdfs' 'revs revs'; align-items: start; }
  @supports (height: 100svh) { .note-layout { --gh: clamp(340px, calc(100svh - 185px), 800px); } }
  .gallery { display: flex; align-items: flex-start; gap: 4px; width: calc(var(--gh) * 210 / 297 + var(--tw) + 4px); }
  .gallery .a4 { flex: none; width: calc(var(--gh) * 210 / 297); height: var(--gh); aspect-ratio: auto; }
  .gallery .thumbs { flex: none; flex-direction: column; width: var(--tw); height: var(--gh); margin-top: 0; overflow-x: hidden; overflow-y: auto; scroll-padding: 14px 0; }
  .gallery .thumb { flex: none; width: 64px; }
  .info { padding-top: 6px; }
}
.gallery { grid-area: gal; min-width: 0; }
.a4 { position: relative; aspect-ratio: 210 / 297; background: #cdd8ec; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 4px rgba(20, 33, 61, .1), 0 12px 24px -14px rgba(20, 33, 61, .4); outline-offset: 3px; }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: zoom-in; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; background: #e9eef8 center / cover no-repeat; position: relative; overflow: hidden; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s, transform .18s ease-out; -webkit-user-drag: none; user-select: none; }
.slide img.on { opacity: 1; }
.a4 .nav {
  position: absolute; top: 50%; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); display: grid; place-items: center; opacity: 0; transition: opacity .15s;
}
.a4 .nav svg { width: 20px; height: 20px; }
.a4 .prev { left: 10px; } .a4 .next { right: 10px; }
.a4:hover .nav, .a4:focus-within .nav { opacity: 1; }
@media (hover: none) { .a4 .nav { display: none; } }
/* desktop with a mouse: hover the main preview to zoom in where the pointer is (no fullscreen lightbox here) */
.a4 .zhint { display: none; }
@media (min-width: 880px) and (hover: hover) and (pointer: fine) {
  .slides { cursor: crosshair; }
  .a4.zoom .slide img { transform: scale(2.4); transform-origin: var(--zx, 50%) var(--zy, 50%); }
  .a4 .zhint { display: block; position: absolute; left: 10px; bottom: 10px; background: rgba(20, 33, 61, .78); color: #fff; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; pointer-events: none; transition: opacity .15s; }
  .a4.zoom .zhint { opacity: 0; }
}
.a4 .count { position: absolute; right: 10px; bottom: 10px; background: rgba(20, 33, 61, .78); color: #fff; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; pointer-events: none; }
/* roomy padding so the selected thumbnail's blue frame is never clipped, and layered above the main page's shadow */
.thumbs { position: relative; z-index: 1; display: flex; gap: 12px; margin-top: 12px; overflow-x: auto; padding: 14px; scrollbar-width: thin; scroll-padding: 0 14px; }
.thumb { position: relative; flex: 0 0 64px; aspect-ratio: 210 / 297; padding: 0; border: 0; border-radius: 3px; overflow: hidden; background: #cdd8ec; box-shadow: 0 1px 4px rgba(20, 33, 61, .28); opacity: .75; transition: opacity .15s, transform .15s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.thumb.sk { opacity: 1; box-shadow: none; }
.thumb.on { opacity: 1; outline: 3px solid var(--accent); outline-offset: 2px; transform: translateY(-2px); }

.info h1 { font-size: clamp(24px, 4.4vw, 34px); }
.info .price { font-size: 34px; }
.info .was { font-size: 20px; }
.info .off { font-size: 14px; }
.info .d { margin-top: 12px; color: var(--ink-soft); font-size: 17px; }
.buy { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; }
.buy-row { display: flex; gap: 10px; width: 100%; }
.buy-row .btn { flex: 1 1 0; min-width: 0; min-height: 54px; font-size: 18px; font-family: var(--head); white-space: nowrap; }
.buy-row .btn.ghost { background: #fff; }
.buy-row .btn.in-cart { box-shadow: inset 0 0 0 2px #1fa971; color: #0d6a44; background: #eefaf3; }
.pay { min-height: 54px; font-size: 19px; font-family: var(--head); }
.pay[disabled] { opacity: .6; }
@media (max-width: 380px) { .buy-row .btn { font-size: 16px; padding: 0 10px; } }
.bought { display: inline-flex; align-items: center; gap: 9px; padding: 6px 16px; border-radius: 999px; background: #e7f7ee; border: 1px solid #b9e6cf; color: #0d6a44; font-weight: 700; font-size: 14.5px; text-align: center; max-width: 100%; }
.bought::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #1fa971; box-shadow: 0 0 0 4px rgba(31, 169, 113, .2); }
.trust { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; color: #1fa971; flex: none; }
.info .skl { height: 14px; margin-top: 12px; }

.block { padding: 18px 18px 20px; }
.block h2 { font-size: 22px; margin-bottom: 14px; }
#pdfSec { grid-area: pdfs; min-width: 0; } #revSec { grid-area: revs; min-width: 0; } .info { grid-area: info; min-width: 0; }

/* pdf rows: thin slits */
.pdf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pdf-row { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 8px 0 14px; background: #fff; border: 1px solid #d6e0f2; border-radius: 8px; box-shadow: inset 0 -2px 0 #eef2fa; }
.pdf-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.more-btn { width: 100%; margin-top: 14px; }
#pdfSec { display: flex; flex-direction: column; gap: 22px; }
#pdfSec .block h2 { margin-bottom: 14px; }
.pdf-ico { flex: none; width: 22px; height: 22px; }
.pdf-row .sp { flex: 1 0 0; }
.sbtn { flex: none; min-height: 32px; padding: 0 12px; border-radius: 7px; font-size: 14px; font-weight: 700; border: 0; background: var(--accent); color: #fff; }
.sbtn:hover:not([disabled]) { background: var(--accent-dark); }
.sbtn.dl { background: #eef1f7; color: #9aa4bb; cursor: not-allowed; }
.more { margin-top: 12px; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 480px) { .sbtn { padding: 0 8px; font-size: 12.5px; min-height: 30px; } .pdf-row { padding: 0 6px 0 10px; gap: 6px; } .pdf-name { font-size: 14px; } .pdf-ico { width: 20px; height: 20px; } .block { padding: 16px 12px 18px; } }

/* reviews */
.rev-sum { display: grid; grid-template-columns: auto 1fr; gap: 12px 26px; align-items: center; margin-bottom: 18px; }
.rev-avg { text-align: center; }
.rev-avg b { font-family: var(--head); font-size: 48px; line-height: 1; display: block; }
.rev-avg small { color: var(--ink-soft); }
.stars { display: inline-block; letter-spacing: 2px; font-size: 18px; line-height: 1; background: linear-gradient(90deg, #f5a623 var(--p), #d9dfec var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 14px 1fr 26px; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.bar i { height: 8px; border-radius: 4px; background: #e8edf7; overflow: hidden; }
.bar i b { display: block; height: 100%; background: #f5a623; border-radius: 4px; }
.rev { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-top: 1px dashed #cdd8ee; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 700; color: var(--ink); }
.rev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.rev-top b { font-size: 16px; }
.rev-title { font-size: 18px; margin: 4px 0 2px; }
.rev-text { margin-top: 4px; }
.rev-time { color: var(--ink-soft); font-size: 13px; }
.write-rev { margin-top: 18px; padding: 16px; border: 2px dashed #c9d6ee; border-radius: 12px; background: #f7f9fe; color: var(--ink-soft); }
.write-rev h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.write-rev h3 svg { width: 18px; height: 18px; }
.write-rev .lock-note { margin: 4px 0 10px; font-weight: 600; }
.write-rev .pick { font-size: 26px; letter-spacing: 4px; color: #cfd6e6; line-height: 1; margin-bottom: 8px; }
.write-rev textarea { width: 100%; padding: 10px 12px; border: 1px solid #d5ddee; border-radius: 9px; background: #eef2f9; font: inherit; resize: none; margin-bottom: 10px; cursor: not-allowed; }
.write-rev .btn[disabled] { background: #dfe5f1; color: #98a3bb; box-shadow: none; cursor: not-allowed; transform: none; }
@media (max-width: 420px) { .rev-sum { grid-template-columns: 1fr; } .rev-avg { text-align: left; } }

/* sticky pay bar */
.sticky-pay {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  visibility: hidden; transform: translateY(100%); transition: transform .22s ease, visibility 0s linear .22s; backdrop-filter: blur(8px);
}
.sticky-pay.show { visibility: visible; transform: none; box-shadow: 0 -8px 24px -12px rgba(20, 33, 61, .3); transition: transform .22s ease, visibility 0s; }
.sticky-pay .in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.sticky-pay .pr { display: flex; flex-direction: column; line-height: 1.15; }
.sticky-pay .pr .price { font-size: 22px; }
.sticky-pay .pr .was { font-size: 14px; align-self: flex-start; }
.sticky-pay .btn { flex: 1; min-height: 48px; font-size: 18px; font-family: var(--head); }
body.has-sticky #footer { padding-bottom: 76px; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(9, 13, 28, .96); display: flex; flex-direction: column; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: #fff; font-weight: 600; }
.lb-x, .lb .nav { border: 0; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lb-x:hover, .lb .nav:hover { background: rgba(255, 255, 255, .26); }
.lb svg { width: 22px; height: 22px; }
.lb-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; padding: 0 8px 14px; }
.lb-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 3px; background: #fff; }
.lb .nav { position: absolute; top: 50%; margin-top: -21px; }
.lb .prev { left: 14px; } .lb .next { right: 14px; }
@media (hover: none) { .lb .nav { display: none; } }

/* pdf viewer */
.pv { position: fixed; inset: 0; z-index: 70; background: #dfe5f1; display: flex; flex-direction: column; }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(20, 33, 61, .08); }
.pv-title { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-btn { flex: none; width: 38px; height: 38px; border: 0; border-radius: 8px; background: #eef2fa; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.pv-btn:hover { background: #dfe7f6; }
.pv-btn svg { width: 20px; height: 20px; }
.pv-body { flex: 1; overflow: auto; padding: 14px 10px 40px; -webkit-overflow-scrolling: touch; }
.pv-pages { margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; width: max-content; min-width: 100%; }
.pv-page { background: #fff; box-shadow: 0 2px 10px rgba(20, 33, 61, .25); position: relative; flex: none; }
.pv-page canvas { display: block; width: 100%; height: 100%; user-select: none; -webkit-touch-callout: none; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(40, 72, 216, .18); border-top-color: var(--accent); animation: spin .8s linear infinite; position: absolute; top: 50%; left: 50%; margin: -17px 0 0 -17px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pv-err { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* instant skeleton shown the moment something is clicked, while the next page loads */
@keyframes navin { from { opacity: 0; } to { opacity: 1; } }
.nav-sk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; overflow: hidden; animation: navin .14s ease-out both; cursor: progress;
  background: var(--paper) linear-gradient(transparent 31px, var(--rule) 32px) 0 0 / 100% 32px; }

/* toast + footer */
#toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 90; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* checkout */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; margin: 18px 0 8px; }
.co-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.co-label { font-family: var(--head); font-weight: 700; font-size: 19px; margin: 0 0 2px; }
.co-item { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px 16px 16px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.co-item::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .55; }
.co-cover { align-self: start; }
.co-cover img, .co-cover .noimg, .co-cover.sk { width: 100%; aspect-ratio: 210 / 297; height: auto; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 8px rgba(20, 33, 61, .25); background: #eef2fa; }
.co-info h3 { font-size: 19px; }
.co-info .cls-name { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.co-info .price-row { margin-top: 10px; }
.co-info .price { font-size: 26px; }
.co-info .save { margin-top: 8px; font-weight: 700; font-size: 14px; color: #0d6a44; }
.co-rm { margin-top: 10px; background: none; border: 0; padding: 4px 0; color: var(--pen-red); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.co-sum { position: sticky; top: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.co-sum h2 { font-size: 21px; margin-bottom: 14px; }
.co-lines { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.co-lines li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); }
.co-lines li b { color: var(--ink); font-weight: 600; }
.co-lines .disc b { color: #0d6a44; }
.co-lines .tot { margin-top: 6px; padding-top: 12px; border-top: 2px dashed #cdd8ee; color: var(--ink); font-size: 18px; font-weight: 700; }
.co-lines .tot b { font-family: var(--head); font-size: 28px; }
.co-field { margin-top: 20px; }
.co-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.co-field label span { font-weight: 400; color: var(--ink-soft); }
.co-field input { width: 100%; min-height: 48px; padding: 0 14px; border: 2px solid #c6d3ec; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.co-field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.co-field input[aria-invalid=true] { border-color: var(--pen-red); }
.co-hint { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.co-err { margin-top: 6px; font-size: 14px; color: var(--pen-red); font-weight: 600; }
.co-go { width: 100%; margin-top: 18px; min-height: 52px; font-size: 18px; font-family: var(--head); }
.co-secure { margin-top: 12px; text-align: center; font-size: 13.5px; color: var(--ink-soft); }
.co-item.skel, .co-sum.skel { pointer-events: none; }
.co-empty { text-align: center; padding: 40px 22px; }
.co-empty .btn { margin-top: 18px; }
@media (max-width: 860px) { .co { grid-template-columns: minmax(0, 1fr); } .co-sum { position: static; } }
@media (max-width: 420px) { .co-item { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-left: 22px; } }

/* custom offer block and pages */
.offer-wrap { padding-top: 18px; }
.offer { max-width: 100%; }
.offer > :first-child { margin-top: 0; } .offer > :last-child { margin-bottom: 0; }
.offer img, .prose img, .offer video, .prose video, .offer iframe, .prose iframe { max-width: 100%; height: auto; }
.doc { padding: 22px 0 10px; max-width: 760px; }
.doc h1 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 18px; }
.doc h1.bind:empty { height: 36px; }
.prose { font-size: 17px; line-height: 1.7; }
.prose h2 { font-size: 24px; margin: 28px 0 8px; } .prose h3 { font-size: 19px; margin: 22px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; } .prose ul, .prose ol { padding-left: 22px; }
.prose a { color: var(--accent); }
.prose table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }

/* footer */
#footer { margin-top: auto; padding-top: 56px; }
#footer:not(:empty) { margin-top: 56px; background: #101a33; color: #c3cfe8; border-top: 5px solid var(--hl); padding: 44px 0 0; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 34px 64px; }
.foot-brand { flex: 1 1 280px; min-width: 0; }
.foot-name { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 23px; color: #fff; }
.foot-name img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.foot-about { margin-top: 12px; max-width: 34em; color: #a8b6d6; font-size: 15px; line-height: 1.65; }
.foot-about a { color: #fff; }
.foot-col { flex: 0 1 210px; min-width: 150px; }
.foot-col h4 { font-family: var(--head); font-size: 16px; color: #fff; margin: 0 0 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.foot-col ul.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.foot-col:has(ul.two) { flex-basis: 320px; }
.foot-col a { color: #c3cfe8; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-col svg { width: 18px; height: 18px; flex: none; }
.foot-bar { margin-top: 38px; padding: 20px 0 26px; border-top: 1px solid rgba(255, 255, 255, .13); font-size: 14px; color: #8b9bc0; }
@media (max-width: 600px) { #footer:not(:empty) { padding-top: 34px; } .foot-col, .foot-col:has(ul.two) { flex: 1 1 100%; } }

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

/* payment confirmation overlay + download page */
.co-wait { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(251, 252, 255, .9); backdrop-filter: blur(3px); }
.co-wait-box { width: min(420px, 100%); text-align: center; padding: 28px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.co-wait-box p { margin: 14px 0 0; font-weight: 600; line-height: 1.5; }
.co-wait-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.co-wait-actions:empty { display: none; }
.co-spin { width: 38px; height: 38px; margin: 0 auto; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--accent) 18%, transparent); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.co-spin[hidden] { display: none; }
.co-go[disabled] { opacity: .7; cursor: wait; }
.ord { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 18px 0 8px; }
.ord-box { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.ord-box h2 { font-size: 22px; } .ord-box p { margin: 4px 0 0; color: var(--ink-soft); }
.ord-ok { border-color: #bfe8d3; background: #f3fcf7; }
.ord-tick { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #1fa971; color: #fff; }
.ord-tick svg { width: 26px; height: 26px; }
.ord-empty, .ord-wait { flex-direction: column; text-align: center; padding: 34px 22px; }
.ord-empty .btn, .ord-wait .btn { margin-top: 10px; }
.ord-box.skel { flex-direction: column; align-items: stretch; }
.ord-item { padding: 18px; }
.ord-item h3 { font-size: 20px; margin-bottom: 12px; }
.ord-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ord-files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f7f9fe; border: 1px solid var(--line); border-radius: 10px; }
.ord-files svg { flex: none; width: 24px; height: 24px; color: var(--pen-red); }
.ord-fn { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ord-sz { flex: none; color: var(--ink-soft); font-size: 13.5px; }
.ord-files .btn { flex: none; min-height: 40px; padding: 0 16px; font-size: 15px; }
.ord-mail { padding: 18px; } .ord-mail h3 { font-size: 19px; } .ord-mail p { margin: 6px 0 0; color: var(--ink-soft); }
.ord-form { display: flex; gap: 10px; margin-top: 12px; }
.ord-form input { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 14px; border: 2px solid #c6d3ec; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.ord-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.ord-form .btn { flex: none; min-height: 46px; padding: 0 18px; }
.ord-form .btn[disabled] { opacity: .7; cursor: wait; }
.ord-note { color: var(--ink-soft); font-size: 14px; margin: 0; }
.ord-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ord-list li { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; }
.ol-main { flex: 1 1 auto; min-width: 0; } .ol-main h3 { font-size: 18px; overflow-wrap: anywhere; } .ol-meta { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.ord-list .btn { flex: none; min-height: 40px; padding: 0 18px; }
.ol-rm { flex: none; width: 34px; height: 34px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-soft); border-radius: 50%; }
.ol-rm:hover { background: #eef2fa; color: var(--pen-red); }
@media (max-width: 520px) { .ord-files li { flex-wrap: wrap; } .ord-fn { flex-basis: calc(100% - 40px); } .ord-files .btn { margin-left: auto; } .ord-form { flex-direction: column; } .ord-box { padding: 16px; } }
