/* RESHIMU.AI — EDITIONS
   Layers on assets/global.css (v2, paper-first). Every colour, font and control
   here comes from the variables global.css defines.

   The parchment sheet is native now: the page is paper, the cover is paper. What
   separates them is the gold hairline and a slightly lighter ground, the same
   way a printed cover sits on a desk.

   Mobile-first throughout: these pages open in the WhatsApp in-app browser on a
   phone, and desktop is the secondary case. */

/* ----- SHARED: the sheet ----- */
.sheet {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--accent-soft);
  background: #F8F6F1;
}

/* 44px minimum tap target on the primary actions. */
.ed-cta, .ed-secondary .btn, .ed-share .btn, .ed-actions .btn { padding: 15px 22px; }
.ed-share .btn-link { padding: 15px 0; }

/* ----- INDEX: hero ----- */
.ed-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.ed-hero .he-title {
  font-family: var(--font-hebrew);
  direction: rtl;
  text-align: right;
  color: var(--accent);
  font-size: clamp(26px, 6.4vw, 40px);
  line-height: 1.35;
  font-weight: 500;
}
.ed-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  margin-top: 14px;
}
.ed-said {
  font: 400 13px/1.6 var(--font-mono);
  color: var(--muted);
  margin-top: 14px;
  letter-spacing: .02em;
}
.ed-kevius {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--text-2);
  padding-left: 18px;
  border-left: 2px solid var(--accent-soft);
  margin: 22px 0;
}
.ed-abstract { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.ed-hero, .ed-filters, .ed-grid-head { margin-top: 26px; }

.ed-links { display: flex; gap: 28px; }
.ed-link-gold { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.ed-link-gold:hover { border-bottom-color: var(--accent); }

.ed-method { margin-top: 20px; font-size: 16.5px; line-height: 1.7; color: var(--text-2); }
.ed-method-by { margin-top: 22px; font: 400 12px/1.8 var(--font-mono); color: var(--subtle); }

.ed-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ----- INDEX: library grid ----- */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 34px 26px;
}
.ed-card { display: flex; flex-direction: column; gap: 12px; }
.ed-card .sheet { transition: border-color 180ms ease-out, transform 180ms ease-out; }
.ed-card:hover .sheet { border-color: var(--accent); transform: translateY(-2px); }
.ed-card .t-en {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.22;
  color: var(--text);
  font-variation-settings: "opsz" 48;
}
.ed-card .t-meta {
  font: 400 11px/1.5 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Language / Hebrew-edition flag. Only where it distinguishes. */
.ed-card .t-lang, .ed-lang {
  font: 400 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  padding: 4px 8px;
}
.ed-card .t-lang { align-self: flex-start; }
.ed-lang { display: inline-block; margin-left: 10px; vertical-align: middle; }

/* ----- INDEX: filters ----- */
.ed-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.ed-filters select {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font: 400 15px/1 var(--font-body);
  padding: 10px 12px;
}
.ed-filters select:focus { outline: none; border-color: var(--text); }
.ed-empty { color: var(--muted); font-size: 15px; padding: 40px 0; }

/* ----- EDITION PAGE ----- */
.ed-page { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.ed-page .card-img {
  width: 100%;
  height: auto;
  margin-top: 18px;
  border: 1px solid var(--accent-soft);
}
.ed-abstract-page { margin-top: 30px; }
.ed-page .he-title {
  font-family: var(--font-hebrew);
  direction: rtl;
  text-align: right;
  color: var(--accent);
  font-size: clamp(25px, 7vw, 36px);
  line-height: 1.35;
  font-weight: 500;
  margin-top: 30px;
}
.ed-page h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(27px, 6vw, 38px);
  line-height: 1.14;
  margin-top: 12px;
}

.ed-cta { display: block; width: 100%; text-align: center; margin-top: 26px; }
.ed-secondary { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ed-secondary .btn { text-align: center; }

/* Hebrew elucidated edition: one RTL hook line and one RTL button. */
.ed-hebrew { margin-top: 26px; direction: rtl; text-align: right; }
.ed-kevius-he {
  font-family: var(--font-hebrew);
  font-style: normal;
  font-size: clamp(17px, 2.2vw, 20px);
  padding-left: 0;
  padding-right: 18px;
  border-left: 0;
  border-right: 2px solid var(--accent-soft);
  margin: 0 0 14px;
}
.ed-cta-he {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-hebrew);
  padding: 15px 22px;
}

.ed-meta {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px 16px;
  margin: 34px 0;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ed-meta dt {
  font: 400 10px/1.6 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.ed-meta dd { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.ed-share { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0; }
.ed-note {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 30px 0;
}
.ed-note strong { color: var(--text); font-weight: 500; }

/* ----- SUBSCRIBE FORM ----- */
.ed-sub-hint { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.ed-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ed-form .input { padding: 13px 14px; font-size: 16px; }
.ed-form .btn { padding: 15px 22px; }
.ed-form-msg { margin-top: 12px; font-size: 15px; color: var(--text-2); }
.cf-turnstile { margin-top: 12px; }

@media (min-width: 560px) {
  .ed-form { flex-direction: row; }
  .ed-form .input { flex-grow: 1; }
}

.ed-colophon {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font: 400 12px/1.8 var(--font-mono);
  color: var(--subtle);
}

/* ----- DESKTOP ----- */
@media (min-width: 760px) {
  .ed-hero { grid-template-columns: 300px 1fr; gap: 48px; }
  .ed-actions { margin-top: 30px; }
  .ed-cta { display: inline-block; width: auto; }
  .ed-cta-he { display: inline-block; width: auto; }
  .ed-secondary { flex-direction: row; flex-wrap: wrap; }
  .ed-page { padding: 0 32px; }
}
