:root{
  --bg:#fbfbfd;
  --paper:#fffaf1;
  --ink:#0f172a;
  --muted:#475569;
  --line:rgba(15,23,42,.12);
  --card:#ffffff;
  --accent:#f59e0b;
  --accent2:#3b82f6;
  --radius:18px;
  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --max: 1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{overflow-x:hidden}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--ink);
  background:
    url("/assets/img/paper-bg.svg") center/cover no-repeat,
    radial-gradient(900px 500px at 18% 12%, rgba(245,158,11,.10), transparent 60%),
    radial-gradient(850px 520px at 76% 18%, rgba(59,130,246,.10), transparent 62%),
    var(--bg);
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block;height:auto}
.container{max-width:var(--max);margin:0 auto;padding:0 18px}
.skip{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip:focus{left:16px;top:16px;width:auto;height:auto;z-index:999;background:#fff;color:#000;padding:10px 12px;border-radius:12px}

header{
  position:sticky;top:0;z-index:50;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.navbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px;font-weight:900}
.mark{
  width:36px;height:36px;border-radius:14px;
  border:1px solid rgba(15,23,42,.14);
  background: linear-gradient(135deg, rgba(245,158,11,.20), rgba(59,130,246,.16));
  display:grid;place-items:center;
}
.mark svg{width:18px;height:18px;opacity:.8}
.navlinks{display:flex;gap:18px;align-items:center}
.navlinks a{color:rgba(15,23,42,.78);font-weight:850}
.navlinks a:hover{color:var(--ink)}
.actions{display:flex;gap:10px;align-items:center}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:10px 14px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.75);
  color:var(--ink);
  font-weight:900;
}
.btn:hover{background:#fff}
.btn.primary{
  border:0;
  background: linear-gradient(135deg, rgba(245,158,11,.95), rgba(59,130,246,.85));
  color:#081224;
}
.iconbtn{
  width:44px;height:44px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.78);
  font-weight:900;
}
.iconbtn:hover{background:#fff}
.hamburger{display:none}

.panel{
  background: rgba(255,255,255,.86);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.hero{padding:34px 0 18px;position:relative;overflow:hidden}
.hero-grid{display:grid;grid-template-columns: 1.1fr .9fr;gap:14px;align-items:stretch}
.h1{
  font-family: ui-serif, Georgia, serif;
  font-size:46px;line-height:1.05;margin:10px 0 10px;
  letter-spacing:-.6px;
}
.lead{color:rgba(15,23,42,.72);font-size:16px;line-height:1.65;max-width:62ch}
.kicker{
  display:inline-flex;align-items:center;gap:10px;
  padding:8px 12px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.65);
  color:rgba(15,23,42,.72);
  font-weight:900;
}
.dot{width:9px;height:9px;border-radius:999px;background:linear-gradient(135deg,var(--accent),var(--accent2))}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

.floatbook{
  position:absolute; left:-34px; right:auto; top:-30px;
  width:320px; height:320px;
  opacity:.34;
  pointer-events:none;
  transform: translate3d(var(--px,0px), var(--py,0px), 0);
  transition: transform .06s linear;
}
.floatbook img{width:100%;height:100%}

.searchbar{
  display:flex;gap:10px;align-items:center;
  padding:12px 14px;border-radius:999px;border:1px solid var(--line);
  background: rgba(255,255,255,.78);
}
.searchbar input{border:0;outline:0;background:transparent;width:100%;font-weight:800}

.section{padding:18px 0}
.section h2{
  font-family: ui-serif, Georgia, serif;
  margin:0 0 12px;font-size:26px;letter-spacing:-.2px;
}
.sub{color:rgba(15,23,42,.72);margin:0 0 14px;max-width:72ch;line-height:1.65}

.grid{display:grid;grid-template-columns: repeat(3, minmax(0,1fr));gap:14px}
.card{
  padding:14px;border-radius:var(--radius);
  background: rgba(255,255,255,.88);
  border:1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}
.card:hover{transform: translateY(-2px); transition: transform .18s ease}
.small{font-size:12px;color:rgba(15,23,42,.60);font-weight:850}
.tag{display:inline-flex;margin-bottom:10px;color:rgba(15,23,42,.74);font-weight:900;font-size:12px;background:rgba(245,158,11,.10);border:1px solid rgba(245,158,11,.20);padding:6px 10px;border-radius:999px}

.book{
  display:grid; grid-template-columns: 120px 1fr; gap:12px; align-items:start;
}
.cover{
  border-radius:14px; overflow:hidden; border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.6);
}
.book h3{
  margin:2px 0 6px;
  font-family: ui-serif, Georgia, serif;
  font-size:18px; line-height:1.25;
}
.book p{margin:0;color:rgba(15,23,42,.72);line-height:1.55;font-size:14px}

.layout{display:grid;grid-template-columns: 290px 1fr;gap:14px;align-items:start}
.sidebar{position:sticky;top:90px;padding:14px}
.side-title{font-weight:950;margin:0 0 10px}
.side-list{display:flex;flex-direction:column;gap:8px}
.side-link{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;border-radius:14px;border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  color:rgba(15,23,42,.78);font-weight:900;
}
.side-link:hover{background:#fff}
.side-link[aria-current="page"]{background:rgba(245,158,11,.10);border-color:rgba(245,158,11,.20)}
.count{font-size:12px;color:rgba(15,23,42,.55)}

.carousel{
  display:flex; gap:12px; overflow:auto; padding-bottom:10px;
  scroll-snap-type:x mandatory;
}
.carousel::-webkit-scrollbar{height:10px}
.carousel::-webkit-scrollbar-thumb{background:rgba(15,23,42,.10);border-radius:999px}
.slide{flex:0 0 320px; scroll-snap-align:start}

.drawer{position:fixed; inset:0; z-index:70; display:none}
.drawer[aria-hidden="false"]{display:block}
.drawer .backdrop{position:absolute;inset:0;background:rgba(15,23,42,.40)}
.drawer .panel{
  position:absolute;right:0;top:0;height:100%;width:min(92vw, 360px);
  border-radius:0;border-left:1px solid var(--line);
  padding:16px;background:#fff;
}
.drawer .panel .navlinks{flex-direction:column;align-items:flex-start;gap:12px}
.drawer .panel .navlinks a{
  padding:10px 12px;border-radius:14px;width:100%;
  background: rgba(15,23,42,.04);border:1px solid rgba(15,23,42,.08)
}
.drawer .panel .navlinks a:hover{background: rgba(15,23,42,.06)}
.drawer-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.drawer-title{font-weight:950}

.breadcrumbs{display:flex;gap:8px;flex-wrap:wrap;color:rgba(15,23,42,.55);font-weight:900;font-size:12px;margin:10px 0 14px}
.breadcrumbs a{color:rgba(15,23,42,.62)}
.breadcrumbs a:hover{color:var(--ink)}
.breadcrumbs .sep{opacity:.5}

.reveal{opacity:0;transform:translateY(10px);transition:opacity .55s ease, transform .55s ease}
.reveal.is-in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .reveal{transition:none}
}

footer{border-top:1px solid var(--line);margin-top:28px;padding:22px 0 28px;color:rgba(15,23,42,.58)}
.foot{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.foot a{color:rgba(15,23,42,.68);font-weight:900}
.foot a:hover{color:var(--ink)}
.foot small{display:block;max-width:70ch;line-height:1.6}

.plain-contact{color:inherit;text-decoration:none}

@media (max-width: 940px){
  .hero-grid{grid-template-columns:1fr}
  .h1{font-size:40px}
  .layout{grid-template-columns:1fr}
  .sidebar{position:relative;top:auto}
  .hamburger{display:inline-flex}
  .navlinks{display:none}
  .floatbook{left:-40px; right:auto; top:-10px;width:280px;height:280px}
}
@media (max-width: 520px){
  .h1{font-size:34px}
  .grid{grid-template-columns:1fr}
  .slide{flex-basis: 84vw}
  .book{grid-template-columns: 1fr; }
}


/* Carousel arrows overlay */
.panel[data-carousel]{position:relative}
.panel[data-carousel] .car-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.panel[data-carousel] .car-top .car-label{display:flex;gap:10px;align-items:center}
.panel[data-carousel] .car-arrows{position:absolute;top:50%;left:10px;right:10px;display:flex;justify-content:space-between;pointer-events:none;transform:translateY(-6px)}
.panel[data-carousel] .car-arrows button{pointer-events:auto}
.panel[data-carousel] .car-arrows .iconbtn{background:rgba(255,255,255,.88)}
.panel[data-carousel] .carousel{padding:4px 2px 12px}

/* Mobile: make arrows always visible and keep layout within viewport */
@media (max-width: 940px){
  .panel[data-carousel] .car-top{margin-bottom:8px}
  .panel[data-carousel] .car-arrows{left:8px;right:8px}
}


/* Safer overflow handling (avoid breaking headlines into single letters) */
h1,h2,h3{overflow-wrap:normal;word-break:normal;hyphens:auto}
.lead,.sub,.breadcrumbs,.card p{overflow-wrap:break-word;word-break:break-word}
.plain-contact{overflow-wrap:break-word;word-break:break-word}


.hero-grid > *{min-width:0}
