/* BookBay.ro — hand-made site stylesheet (no build step). */

:root {
  --paper: #faf8f4;
  --paper-2: #f3eee4;
  --surface: #ffffff;
  --ink: #1d1914;
  --ink-2: #3b342c;
  --muted: #6b6359;
  --faint: #958c80;
  --line: #e6dfd2;
  --line-2: #efe9de;
  --brand: #00635d;
  --brand-ink: #004a45;
  --brand-soft: #e3f0ee;
  --wood: #382110;
  --gold: #e3a32b;
  --star-empty: #ddd6ca;
  --warn-bg: #fff3df;
  --warn-ink: #8a5300;
  --ok-bg: #e7f4ea;
  --ok-ink: #276b37;
  --sale: #b3261e;

  --serif: "Lora", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(40, 28, 14, .06), 0 1px 1px rgba(40, 28, 14, .04);
  --shadow: 0 1px 2px rgba(40, 28, 14, .05), 0 8px 24px -10px rgba(40, 28, 14, .18);
  --shadow-cover: 0 1px 1px rgba(30, 20, 10, .10), 0 6px 14px -6px rgba(30, 20, 10, .35), 0 18px 32px -18px rgba(30, 20, 10, .35);
  --gutter: 16px;
  --max: 1200px;
  --header-h: 64px;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --header-h: 72px; } }

/* ── base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.serif { font-family: var(--serif); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 760px; }
.wrap-mid { max-width: 960px; }
.page { padding-top: 24px; padding-bottom: 56px; }
@media (min-width: 1024px) { .page { padding-top: 32px; padding-bottom: 80px; } }

/* type scale */
.display { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); color: var(--ink); }
.h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.18; font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem); color: var(--ink); }
.h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; line-height: 1.25; font-size: clamp(1.35rem, 1.2rem + .7vw, 1.75rem); color: var(--ink); }
.h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; font-size: 1.2rem; color: var(--ink); }
.lead { font-size: 1.0625rem; color: var(--muted); line-height: 1.65; max-width: 62ch; }
@media (min-width: 1024px) { .lead { font-size: 1.125rem; } }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ── header ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--wood); letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.logo:hover { color: var(--wood); }
.logo span { color: var(--brand); }
@media (min-width: 1024px) { .logo { font-size: 1.85rem; } }

.nav { display: none; align-items: center; gap: 4px; margin-left: 20px; }
@media (min-width: 1024px) { .nav { display: flex; } }
.nav > a, .nav-drop > button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 999px; border: 0; background: none; cursor: pointer;
  font-size: .9375rem; font-weight: 500; color: var(--ink-2);
}
.nav > a:hover, .nav-drop:hover > button, .nav-drop:focus-within > button { background: var(--paper-2); color: var(--ink); }
.nav > a[aria-current="page"] { color: var(--brand); }
.nav-drop { position: relative; }
.nav-drop svg { width: 14px; height: 14px; transition: transform .15s; }
.nav-drop:hover svg, .nav-drop:focus-within svg { transform: rotate(180deg); }
.mega {
  position: absolute; left: -12px; top: 100%; padding-top: 10px;
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-drop:hover .mega, .nav-drop:focus-within .mega { visibility: visible; opacity: 1; transform: none; }
.mega-inner { width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 48px -16px rgba(40, 28, 14, .25); padding: 20px; }
.mega-title { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; padding: 0 10px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; }
.mega-grid a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: .9375rem; }
.mega-grid a:hover { background: var(--paper); color: var(--brand); }
.mega-grid a small { color: var(--faint); font-size: .8rem; }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-pill { position: relative; display: none; }
@media (min-width: 768px) { .search-pill { display: block; } }
.search-pill input {
  width: 260px; height: 42px; padding: 0 44px 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: .9375rem; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, width .2s;
}
@media (min-width: 1280px) { .search-pill input { width: 300px; } }
.search-pill input::placeholder { color: var(--faint); }
.search-pill input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 99, 93, .12); }
.search-pill button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.search-pill button:hover { background: var(--brand-ink); }
.search-pill svg, .icon-btn svg { width: 18px; height: 18px; }

.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.only-mobile-search { display: inline-grid; }
@media (min-width: 768px) { .only-mobile-search { display: none; } }

/* mobile menu: <details> */
.mnav { position: static; }
@media (min-width: 1024px) { .mnav { display: none; } }
.mnav > summary { list-style: none; }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav .i-close { display: none; }
.mnav[open] .i-close { display: block; }
.mnav[open] .i-open { display: none; }
.mnav-panel {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -20px rgba(40, 28, 14, .3);
  padding: 16px var(--gutter) 28px;
}
.mnav-panel .search-row { margin-bottom: 12px; }
.mnav-links a { display: block; padding: 12px 4px; font-size: 1.0625rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.mnav-cats { margin-top: 18px; }
.mnav-cats .mega-title { padding: 0; }
.mnav-cats .chips { gap: 8px; }

/* ── search field (pages) ─────────────────────────────── */
.search-row { display: flex; gap: 8px; width: 100%; max-width: 560px; }
.search-row input {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 1rem; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.search-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 99, 93, .12); }

/* ── buttons & chips ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .9375rem; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 14px -6px rgba(0, 74, 69, .55); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-lg { height: 52px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; font-weight: 500; line-height: 1.3;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { color: var(--faint); font-weight: 400; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 32px), transparent); }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: 0 0 auto; }
@media (min-width: 1024px) { .chips-scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; } }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-sale { background: #fde8e6; color: var(--sale); }

/* ── breadcrumbs ──────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8125rem; color: var(--faint); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { opacity: .6; }
.crumbs .here { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ── sections ─────────────────────────────────────────── */
.section { margin-top: 48px; }
@media (min-width: 1024px) { .section { margin-top: 64px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head p { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-head { margin-bottom: 28px; }
.page-head .lead { margin-top: 10px; }
.page-head .chips { margin-top: 20px; }

.band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── home hero ────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(900px 300px at 85% -40%, rgba(0, 99, 93, .10), transparent 70%),
  radial-gradient(700px 260px at -10% 120%, rgba(56, 33, 16, .07), transparent 70%),
  var(--paper-2);
  border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: 36px; padding-bottom: 36px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 1024px) { .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding-top: 56px; padding-bottom: 56px; gap: 48px; } }
.hero .lead { margin-top: 14px; }
.hero .search-row { margin-top: 22px; }
.hero .chips { margin-top: 18px; }
.hero-covers { display: none; position: relative; height: 300px; }
@media (min-width: 1024px) { .hero-covers { display: block; } }
.hero-covers a { position: absolute; width: 150px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-cover); transition: transform .25s; aspect-ratio: 2 / 3; background: var(--line); }
.hero-covers a img { width: 100%; height: 100%; object-fit: cover; }
.hero-covers a:nth-child(1) { left: 6%; top: 40px; transform: rotate(-7deg); }
.hero-covers a:nth-child(2) { left: 32%; top: 0; z-index: 2; width: 172px; }
.hero-covers a:nth-child(3) { left: 61%; top: 44px; transform: rotate(6deg); }
.hero-covers a:hover { transform: translateY(-6px) rotate(0); z-index: 3; }

/* ── book grid & card ─────────────────────────────────── */
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
@media (min-width: 560px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 860px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .book-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 24px; } }
.book-grid.cols-5 { }
@media (min-width: 1100px) { .book-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-cover {
  position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, var(--paper-2), var(--line));
  box-shadow: var(--shadow-cover);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.14) 0, rgba(255,255,255,.10) 3%, rgba(255,255,255,0) 7%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-cover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(30,20,10,.1), 0 14px 28px -10px rgba(30,20,10,.4); }
.card-badge { position: absolute; left: 8px; top: 8px; z-index: 1; max-width: calc(100% - 16px); background: rgba(255, 243, 223, .96); color: var(--warn-ink); box-shadow: var(--shadow-sm); font-size: .6875rem; }
.card-body { padding-top: 12px; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.card-title:hover { color: var(--brand); }
.card-author { display: block; margin-top: 4px; font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-author:hover { color: var(--brand); }
.card-rating { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.card-rating svg { width: 14px; height: 14px; fill: var(--gold); }
.card-rating b { color: var(--ink); font-weight: 600; }

.empty { padding: 48px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager .pos { font-size: .875rem; color: var(--muted); }
.pager .pos b { color: var(--ink); }
.pager .btn { height: 42px; }
.pager .spacer { width: 1px; }

/* ── panels ───────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
@media (min-width: 640px) { .panel { padding: 28px; } }
.panel + .panel { margin-top: 20px; }

/* ── book page ────────────────────────────────────────── */
.book {
  display: grid; gap: 16px 18px; align-items: start;
  grid-template-columns: 116px minmax(0, 1fr);
  grid-template-areas: "cover head" "buy buy" "main main";
}
@media (min-width: 560px) { .book { grid-template-columns: 168px minmax(0, 1fr); gap: 20px 28px; } }
.book-side { display: contents; }
.book-cover { grid-area: cover; }
.book-cover .cover-frame { position: relative; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-cover); aspect-ratio: 2 / 3; background: var(--paper-2); }
.book-cover .cover-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,0,0,.16) 0, rgba(255,255,255,.12) 2.5%, rgba(255,255,255,0) 6%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-head { grid-area: head; min-width: 0; }
.book-buy { grid-area: buy; }
.book-main { grid-area: main; min-width: 0; }

@media (min-width: 1024px) {
  .book {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas: "side head" "side main";
    gap: 8px 56px;
  }
  .book-side { display: block; grid-area: side; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 24px); }
  .book-cover { max-width: none; }
  .book-buy { margin-top: 24px; }
}
@media (min-width: 1200px) { .book { grid-template-columns: 320px minmax(0, 1fr); gap: 8px 72px; } }

.book-head .badge { margin-bottom: 10px; }
.book-title { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -.015em; line-height: 1.12; font-size: clamp(1.5rem, 1.05rem + 2.3vw, 2.75rem); overflow-wrap: anywhere; }
.book-ro { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.book-ro em { color: var(--ink-2); }
.book-author { margin-top: 8px; font-size: 1rem; color: var(--muted); }
@media (min-width: 1024px) { .book-author { font-size: 1.125rem; margin-top: 12px; } }
.book-author a { font-weight: 600; }
.rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; }
.stars { display: inline-flex; gap: 1px; }
.stars svg { width: 18px; height: 18px; }
@media (min-width: 1024px) { .stars svg { width: 22px; height: 22px; } }
.s-full { fill: var(--gold); }
.s-empty { fill: var(--star-empty); }
.s-half { fill: url(#star-half); }
.rating-value { font-weight: 700; font-size: 1.125rem; color: var(--ink); }
@media (min-width: 1024px) { .rating-value { font-size: 1.375rem; } }
.rating-count { font-size: .8125rem; color: var(--muted); flex-basis: 100%; }
@media (min-width: 560px) { .rating-count { flex-basis: auto; } }
.book-head .chips { margin-top: 18px; }
.book-intro { margin-top: 20px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
@media (min-width: 1024px) { .book-intro { font-size: 1.1875rem; font-family: var(--serif); line-height: 1.65; color: var(--ink); } }
.book-head .chips.desktop { display: none; }
@media (min-width: 560px) { .book-head .chips.desktop { display: flex; } .book-main > .chips.mobile { display: none; } }
@media (max-width: 559px) { .book-intro.desktop { display: none; } }
@media (min-width: 560px) { .book-main > .book-intro.mobile { display: none; } }

/* buy box */
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
@media (min-width: 1024px) { .buybox { padding: 20px; } }
.buybox-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.buybox-label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.price { font-weight: 700; color: var(--ink); font-size: 1.75rem; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price small { font-size: .55em; font-weight: 600; margin-left: 2px; }
.price-old { color: var(--faint); text-decoration: line-through; font-size: .875rem; font-variant-numeric: tabular-nums; }
.buybox-store { margin-top: 4px; font-size: .875rem; color: var(--muted); }
.buybox-store b { color: var(--ink); font-weight: 600; }
.buybox .btn { margin-top: 14px; }
.buybox-foot { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.buybox-foot a { font-weight: 600; }
.buybox-note { margin-top: 10px; font-size: .75rem; color: var(--faint); line-height: 1.45; }
.buybox-empty { font-size: .9375rem; color: var(--muted); }
.buybox-empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-family: var(--serif); font-size: 1.0625rem; }

/* offers comparison */
.offers { list-style: none; display: grid; gap: 10px; }
.offer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "store price" "cta cta";
  gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: border-color .15s, box-shadow .15s;
}
.offer:hover { border-color: var(--brand); box-shadow: 0 6px 18px -10px rgba(0, 74, 69, .35); color: var(--ink-2); }
.offer.is-best { border-color: rgba(0, 99, 93, .45); background: linear-gradient(0deg, rgba(0, 99, 93, .035), rgba(0, 99, 93, .035)), var(--surface); }
.offer-store { grid-area: store; min-width: 0; }
.offer-store strong { display: block; color: var(--ink); font-size: 1rem; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.offer-price { grid-area: price; text-align: right; }
.offer-price .price { font-size: 1.25rem; }
.offer-cta { grid-area: cta; }
.offer-cta .btn { width: 100%; height: 42px; }
@media (min-width: 640px) {
  .offer { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "store price cta"; padding: 14px 18px; gap: 18px; }
  .offer-cta .btn { width: auto; }
}
.offers-note { margin-top: 12px; font-size: .75rem; color: var(--faint); }

/* sections inside the book page */
.book-main > * + * { margin-top: 20px; }
.book-main > .chips + * { margin-top: 20px; }
.book-sec { padding-top: 28px; border-top: 1px solid var(--line); margin-top: 36px !important; }
.book-sec:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1024px) { .book-main > .book-sec:first-of-type { margin-top: 36px !important; } }
.book-sec > .h2 { margin-bottom: 16px; }

/* details table */
.facts { display: grid; grid-template-columns: 1fr; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: .9375rem; }
.facts > div:first-child { border-top: 0; }
@media (min-width: 640px) { .facts > div:nth-child(2) { border-top: 0; } .facts > div:nth-child(odd) { border-right: 1px solid var(--line-2); } }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.faq details[open] { border-color: rgba(0, 99, 93, .35); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 999px; background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300635d' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 18px 18px; color: var(--ink-2); line-height: 1.7; }
.faq .faq-a > * + * { margin-top: .8em; }

/* reviews */
.quotes { display: grid; gap: 14px; }
@media (min-width: 900px) { .quotes.n3 { grid-template-columns: 1fr; } }
.quote { position: relative; margin: 0; padding: 20px 20px 20px 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2); font-family: var(--serif); font-style: italic; line-height: 1.65; }
.quote::before { content: "\201E"; position: absolute; left: 16px; top: -2px; font-size: 3.4rem; line-height: 1; color: var(--brand); opacity: .35; font-style: normal; }
.fineprint { margin-top: 12px; font-size: .75rem; color: var(--faint); }

/* ── prose ────────────────────────────────────────────── */
.prose { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.75; }
@media (min-width: 1024px) { .prose { font-size: 1.125rem; } }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.35rem, 1.2rem + .7vw, 1.75rem); line-height: 1.28; color: var(--ink); margin-top: 2em; letter-spacing: -.005em; }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.35; color: var(--ink); margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(0, 99, 93, .4); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.1em; }
.prose img { border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 600; background: var(--paper-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .callout { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 1.25em 1.5em; }
.prose .callout a.button { display: inline-block; margin-top: .6em; background: var(--brand); color: #fff; text-decoration: none; padding: .65em 1.25em; border-radius: 10px; font-weight: 600; font-size: .9375rem; }
.prose .callout a.button:hover { background: var(--brand-ink); color: #fff; }
.prose-book > h2:first-child { margin-top: 0; }

/* ── blog ─────────────────────────────────────────────── */
/* Cards: generated linocut cover on a paper panel, then kind · time, serif title, blurb, date · Citește. */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1024px) { .post-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post {
  position: relative; display: flex; flex-direction: column; min-height: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d9d0c0; }
.post-media { aspect-ratio: 16 / 9; background: #f4f1ea; overflow: hidden; border-bottom: 1px solid var(--line-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post:hover .post-media img { transform: scale(1.03); }
.post-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.post-meta { font-size: .8125rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-meta .dot, .byline .dot { width: 3px; height: 3px; border-radius: 9px; background: currentColor; }
.post-kind { color: var(--brand); font-weight: 600; }
.post-title { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.3; color: var(--ink); letter-spacing: -.005em; }
.post-title a { color: inherit; }
.post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post:hover .post-title a { color: var(--brand); }
.post-desc { color: var(--muted); font-size: .9375rem; line-height: 1.6; flex: 1; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; font-size: .875rem; color: var(--ink); font-weight: 500; }
.post-more { font-weight: 600; font-size: .875rem; color: var(--brand); white-space: nowrap; }

/* featured: image left, text right on a warm panel */
.post-feature { background: #f4f1ea; border-color: #e8e0cf; }
.post-feature .post-media { border-bottom: 0; }
.post-feature .post-body { padding: 24px; gap: 12px; }
.post-feature .eyebrow { margin-bottom: 2px; }
.post-feature .post-title { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.15rem); line-height: 1.18; }
.post-feature .post-desc { font-size: 1rem; flex: 0 1 auto; }
.post-feature .post-foot { margin-top: 8px; }
@media (min-width: 860px) {
  .post-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
  .post-feature .post-media { aspect-ratio: auto; height: 100%; min-height: 360px; }
  .post-feature .post-body { padding: 40px 44px; }
}

.blog-hero { text-align: center; padding-top: 12px; padding-bottom: 36px; }
@media (min-width: 1024px) { .blog-hero { padding-top: 32px; padding-bottom: 52px; } }
.blog-hero-title { margin: 10px auto 0; max-width: 18ch; font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.08; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
.blog-hero .lead { margin: 16px auto 0; max-width: 56ch; }
.blog-list { margin-top: 56px; }
.section-head .eyebrow + .h2 { margin-top: 4px; }

/* article */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--brand); transform: scaleX(0); transform-origin: 0 50%; }
.article-head { margin-bottom: 0; }
.article-title { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; font-size: clamp(2rem, 1.3rem + 2.9vw, 3.15rem); }
.article-head .lead { margin-top: 16px; font-size: 1.125rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.byline-avatar { flex: 0 0 auto; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--brand); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.byline-who { display: flex; flex-direction: column; line-height: 1.3; font-size: .875rem; color: var(--muted); }
.byline-who b { color: var(--ink); font-weight: 600; font-size: .9375rem; }
.byline-meta { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.byline > .byline-avatar { margin-right: -12px; }

.article-cover { margin: 36px auto 0; max-width: 1104px; }
.article-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; background: #f4f1ea; border: 1px solid var(--line-2); }
@media (max-width: 639px) { .article-cover { padding-left: 0; padding-right: 0; } .article-cover img { border-radius: 0; border-left: 0; border-right: 0; } }

.article-layout { max-width: 760px; margin-top: 40px; }
.article-layout.has-toc { max-width: 760px; }
@media (min-width: 1100px) {
  .article-layout.has-toc { max-width: 1104px; display: grid; grid-template-columns: 240px minmax(0, 720px); justify-content: space-between; gap: 48px; }
}
.article-main { min-width: 0; }
.article-layout .prose { font-size: 1.09rem; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 20px); }

.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 22px 1fr; gap: 4px; padding: 6px 0; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--faint); padding-top: 1px; }
.toc a:hover, .toc a[aria-current] { color: var(--brand); }
.toc a[aria-current]::before { color: var(--brand); }
.toc-title { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.toc-side { display: none; }
@media (min-width: 1100px) {
  .toc-side { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding-right: 8px; border-right: 1px solid var(--line); }
  .toc-inline { display: none; }
}
.toc-inline { margin-bottom: 28px; background: #f4f1ea; border: 1px solid #e8e0cf; border-radius: 14px; padding: 4px 18px; }
.toc-inline summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 600; color: var(--ink); }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary span { font-weight: 400; font-size: .8125rem; color: var(--faint); }
.toc-inline summary::after { content: "+"; font-size: 1.25rem; line-height: 1; color: var(--brand); margin-left: 12px; }
.toc-inline[open] summary::after { content: "−"; }
.toc-inline[open] summary span { display: none; }
.toc-inline ol { padding-bottom: 12px; }

.about-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 48px; padding: 22px 24px; background: #f4f1ea; border: 1px solid #e8e0cf; border-radius: 18px; }
.about-kicker { font-size: .75rem; color: var(--faint); }
.about-name { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: var(--ink); }
.about-text { margin-top: 6px; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.about-box .link-more { margin-top: 10px; }
.article-foot { margin-top: 72px; }

/* "Rezumă cu: ChatGPT · Perplexity · Claude · Gemini · Grok" (src/content/summarize.ts) */
.ai-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin-top: 18px; }
.ai-sum-lbl { font-size: .875rem; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.ai-sum ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ai-sum a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap; transition: background .15s, border-color .15s; }
.ai-sum a:hover { background: var(--paper-2); border-color: #d9d0c0; color: var(--ink); }
.ai-sum a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ai-sum svg { width: 16px; height: 16px; flex: none; display: block; }
@media (max-width: 620px) { .ai-sum-lbl { flex: 0 0 100%; } .ai-sum ul { gap: 6px; } .ai-sum a { height: 32px; padding: 0 11px 0 9px; font-size: .8125rem; gap: 6px; } }
.book-head .ai-sum { margin-top: 16px; }
.ai-sum-name { display: inline; }
@media (max-width: 559px) {
  .book-head .ai-sum { gap: 8px; }
  .book-head .ai-sum-lbl { flex: 0 0 100%; font-size: .8125rem; }
  .book-head .ai-sum ul { gap: 6px; }
  .book-head .ai-sum a { width: 34px; height: 34px; padding: 0; justify-content: center; }
  .book-head .ai-sum-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── static / legal pages ─────────────────────────────── */
.doc .panel { padding: 24px; }
@media (min-width: 640px) { .doc .panel { padding: 40px; } }
.doc .prose h2 { font-size: 1.375rem; }
.doc .prose > ul { padding: 1em 1.2em 1em 2.2em; background: var(--paper); border-radius: 10px; }
.doc-updated { margin-top: 10px; font-size: .875rem; color: var(--faint); }

.form { display: grid; gap: 18px; }
.field label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 1rem; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 99, 93, .12); }
.field ::placeholder { color: var(--faint); }
.form-result { text-align: center; font-size: .9375rem; color: var(--muted); min-height: 1.5em; }
.form-result.ok { color: var(--ok-ink); }
.form-result.err { color: var(--sale); }

/* ── 404 ──────────────────────────────────────────────── */
.nf { text-align: center; padding: 40px 0 8px; }
.nf-code { font-family: var(--serif); font-weight: 600; font-size: clamp(5rem, 3rem + 10vw, 9rem); line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px #d3c5ad; background: linear-gradient(180deg, #efe7d8, var(--paper)); -webkit-background-clip: text; background-clip: text; }
.nf .h1 { margin-top: 8px; }
.nf .lead { margin: 12px auto 0; }
.nf .search-row { margin: 28px auto 0; }
.nf .chips { justify-content: center; margin-top: 28px; }

/* ── author ───────────────────────────────────────────── */
.author-head { display: flex; align-items: center; gap: 18px; }
.author-photo { width: 84px; height: 84px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 4px var(--surface), var(--shadow); flex: 0 0 auto; }
@media (min-width: 1024px) { .author-photo { width: 112px; height: 112px; } }
.author-bio { margin-top: 24px; max-width: 760px; }

/* ── footer ───────────────────────────────────────────── */
.site-footer { margin-top: 72px; background: #1f1a15; color: #c9bfb1; }
@media (min-width: 1024px) { .site-footer { margin-top: 96px; } }
.footer-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 40px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand .logo { color: #f4ede2; }
.footer-brand .logo span { color: #6cc4bb; }
.footer-brand p { margin-top: 14px; font-size: .9375rem; line-height: 1.65; color: #a99f91; max-width: 34ch; }
.site-footer h4 { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #f4ede2; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: #c9bfb1; font-size: .9375rem; }
.site-footer a:hover { color: #fff; }
.site-footer .more { color: #6cc4bb; font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.09); padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .8125rem; color: #8d8376; }
.footer-bottom strong { color: #c9bfb1; font-weight: 600; }

/* ── utilities ────────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.center { text-align: center; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: initial; } }

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

.offer-price .price-old { display: block; }
.more-offers { margin-top: 10px; }
.more-offers > summary { list-style: none; }
.more-offers > summary::-webkit-details-marker { display: none; }
.more-offers[open] > summary { display: none; }
.hero-inner { grid-template-columns: minmax(0, 1fr); }
.hero-inner > * { min-width: 0; }
.site-footer .logo { font-size: 1.6rem; }
.book .chip { font-size: .8125rem; padding: 5px 12px; }
.doc-item > * + * { margin-top: .5em; } .doc-item h3 { margin-top: 0; }
.book-alt { margin-top: 6px; font-family: var(--sans); font-size: .875rem; font-weight: 400; line-height: 1.45; color: var(--muted); letter-spacing: 0; }
.book-alt + .book-alt { margin-top: 2px; }
.series-box { background: linear-gradient(180deg, #fbf6ea, #f6efdf); border: 1px solid #eadcc0; border-radius: var(--radius); padding: 20px; }
@media (min-width: 640px) { .series-box { padding: 24px 28px; } }
.series-box > .h3 { margin-bottom: 10px; }
.series-box .prose { font-size: 1rem; }
.mega-grid a { align-items: baseline; }
@media (max-width: 559px) { .book-alt { font-size: .8125rem; } }

/* blog authors */
img.byline-avatar { object-fit: cover; border-radius: 999px; }
.author-hero { display: flex; gap: 24px; align-items: center; margin: 24px 0 40px; }
.author-photo { width: 120px; height: 120px; border-radius: 999px; object-fit: cover; flex: none; }
@media (max-width: 600px) { .author-hero { flex-direction: column; text-align: center; } }
