:root {
  --sand: #f7ecd6;
  --sand-deep: #ecd6ad;
  --sky: #cfe8f6;
  --ink: #3b2a1a;
  --ink-soft: #6e5640;
  --gold: #e8a53a;
  --gold-deep: #c47f16;
  --card: #fffaf0;
  --line: #e6d3b0;
  --soon: #b9a68a;
  --radius: 22px;
  --shadow: 0 8px 24px rgba(120, 80, 30, .14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Rubik", "Heebo", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0, var(--sand) 520px, var(--sand) 100%);
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.5rem; }
.logo .mark { width: 48px; height: 48px; border-radius: 50%; box-shadow: var(--shadow); }
.hero-logo { width: 150px; height: 150px; margin: 0 auto 10px; border-radius: 50%; box-shadow: var(--shadow); }
.logo .mark svg { width: 26px; height: 26px; }
.top nav a { text-decoration: none; font-weight: 600; color: var(--ink-soft); margin-inline-start: 18px; }
.top nav a:hover { color: var(--gold-deep); }

/* hero */
.hero { padding: 28px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 8px; font-weight: 800; letter-spacing: -.5px; }
.hero p { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--ink-soft); margin: 0 auto 26px; max-width: 640px; }
.featured { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center; background: var(--card); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); text-align: start; }
.featured .thumb { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.featured .thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured .badge { display: inline-block; background: var(--gold); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 14px; font-size: .95rem; }
.featured h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 10px 0 6px; }
.featured p { margin: 0 0 16px; color: var(--ink-soft); }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .2s; }
.play svg { width: 34px; height: 34px; fill: var(--gold-deep); margin-left: 6px; }
a:hover .play span { transform: scale(1.08); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 999px; box-shadow: 0 4px 0 var(--gold-deep); transition: transform .1s; }
.btn:hover { transform: translateY(-2px); }

/* books */
.book { margin: 44px 0; }
.book h2 { font-size: 1.7rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.book h2::before { content: ""; width: 10px; height: 30px; border-radius: 6px; background: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; transition: transform .15s; }
a.card:hover { transform: translateY(-4px); }
.card .img { aspect-ratio: 16/9; background: var(--sand-deep); position: relative; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .img .play span { width: 52px; height: 52px; }
.card .img .play svg { width: 22px; height: 22px; }
.card .name { padding: 12px 14px; font-weight: 700; font-size: 1.15rem; display: flex; justify-content: space-between; align-items: center; }
.card .name small { font-weight: 500; color: var(--ink-soft); font-size: .85rem; }
.card.soon { box-shadow: none; border: 2px dashed var(--line); background: transparent; }
.card.soon .img { background: repeating-linear-gradient(-45deg, #f1e2c4, #f1e2c4 12px, #f5e8cf 12px, #f5e8cf 24px); display: grid; place-items: center; color: var(--soon); font-weight: 700; }
.card.soon .name { color: var(--soon); }

/* parasha page */
.crumbs { font-size: .95rem; color: var(--ink-soft); margin: 4px 0 14px; }
.crumbs a { text-decoration: none; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.player video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }
.page h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 6px; }
.info { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; margin: 26px 0 50px; }
.box { background: var(--card); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.box h2 { margin: 0 0 10px; font-size: 1.3rem; }
.box p { margin: 0 0 10px; }
.box ul { margin: 0; padding-inline-start: 22px; }
.box li { margin-bottom: 6px; }
.lesson { background: #fff3d6; border: 2px solid var(--gold); }
.note { font-size: .92rem; color: var(--ink-soft); }
.nav-pn { display: flex; justify-content: space-between; gap: 12px; margin: -26px 0 50px; }
.nav-pn a { text-decoration: none; font-weight: 700; color: var(--gold-deep); }

footer { text-align: center; padding: 30px 16px 40px; color: var(--ink-soft); font-size: .95rem; border-top: 1px solid var(--line); margin-top: 30px; }

@media (max-width: 760px) {
  .featured, .info { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .name { font-size: 1rem; padding: 10px 12px; }
}

/* ---- v2 additions ---- */
.skip { position: absolute; right: -999px; } .skip:focus { right: 8px; top: 8px; background: #fff; padding: 8px; z-index: 9; }
.top nav a { margin-inline-start: 16px; }
.acct { text-decoration: none; font-weight: 700; background: #fff; border: 2px solid var(--gold); border-radius: 999px; padding: 6px 16px; color: var(--gold-deep); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 10px 0 40px; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; text-align: center; transition: transform .15s; }
.tile:hover { transform: translateY(-4px); }
.tile .emoji { font-size: 2.6rem; } .tile b { font-size: 1.35rem; } .tile small { color: var(--ink-soft); font-size: 1rem; }
.how { margin: 30px 0 40px; text-align: center; } .how h2 { font-size: 1.8rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps div { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.steps span { font-size: 2.4rem; display: block; } .steps b { font-size: 1.2rem; } .steps p { color: var(--ink-soft); margin: 6px 0 0; }
.cta { text-align: center; background: #fff3d6; border: 3px solid var(--gold); border-radius: 28px; padding: 30px 20px; margin: 40px 0; }
.cta h2 { margin: 0 0 6px; } .cta p { margin: 0 0 16px; color: var(--ink-soft); }
.btn.big { font-size: 1.2rem; padding: 14px 30px; }
.btn.ghost { background: transparent; color: var(--gold-deep); border: 2px solid var(--gold); box-shadow: none; }
button.btn { border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
.lock { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.9); border-radius: 999px; padding: 2px 8px; font-size: .9rem; }
.lead { color: var(--ink-soft); font-size: 1.15rem; margin-top: -4px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.player { position: relative; }
.paywall { position: absolute; inset: 0; background: rgba(40, 25, 10, .88); display: grid; place-items: center; text-align: center; color: #fff; border-radius: var(--radius); padding: 16px; }
.paywall[hidden] { display: none; }
.pw-t { font-size: clamp(1.3rem, 3.5vw, 2.1rem); font-weight: 800; margin-bottom: 8px; }
.pw-s { opacity: .9; margin-bottom: 18px; }
.pw-login { display: block; margin-top: 12px; color: #ffe2a8; }
.qa { padding-inline-start: 22px; margin: 0; } .qa li { margin-bottom: 10px; } .qa .ans { display: block; color: var(--ink-soft); font-size: .95rem; }
.kid-line { font-size: 1.35rem; font-weight: 800; text-align: center; background: #fff3d6; border-radius: 16px; padding: 10px; }
.pack { margin-top: 18px; text-align: center; }
.price-card { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 28px; text-align: center; }
.price { font-size: 3rem; font-weight: 800; color: var(--gold-deep); } .price small { font-size: 1.1rem; color: var(--ink-soft); }
.perks { text-align: start; display: inline-block; margin: 12px auto 18px; font-size: 1.1rem; line-height: 1.9; }
#gbtn { display: flex; justify-content: center; margin: 10px 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.legal h1 { font-size: 2rem; } .legal h2 { font-size: 1.35rem; margin-top: 26px; } .legal p, .legal li { line-height: 1.8; }
.foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.foot-links a { color: var(--ink-soft); }
table.admin { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; } table.admin td, table.admin th { border: 1px solid var(--line); padding: 6px; }
@media (max-width: 760px) {
  .tiles, .steps { grid-template-columns: 1fr; }
  .top nav { display: none; }
}
.card .tag { position: absolute; bottom: 8px; right: 8px; background: #2f5d8a; color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.card.avot .img img { object-fit: cover; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.level h2 { color: #2f5d8a; font-size: 1.15rem; }
.pasuk-web { background: #fff; border-right: 5px solid #c8962e; padding: 8px 12px; border-radius: 8px; font-size: 1.1rem; }
.tiles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr 1fr; } }
