:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2efe8;
  --text: #1f2328;
  --muted: #5d636b;
  --border: #e3ded3;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ec;
  --mark: #fff1b8;
  --mark-ink: #5a4500;
  --ok: #1f7a3d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .04);
  --font: "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c;
    --surface: #1d2126;
    --surface-2: #252a30;
    --text: #e8e6e1;
    --muted: #a3a8ae;
    --border: #343a41;
    --accent: #5cc4a6;
    --accent-ink: #0f1a17;
    --accent-soft: #1d3530;
    --mark: #4a3d10;
    --mark-ink: #ffe9a3;
    --ok: #6fd48f;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  --bg: #15181c;
  --surface: #1d2126;
  --surface-2: #252a30;
  --text: #e8e6e1;
  --muted: #a3a8ae;
  --border: #343a41;
  --accent: #5cc4a6;
  --accent-ink: #0f1a17;
  --accent-soft: #1d3530;
  --mark: #4a3d10;
  --mark-ink: #ffe9a3;
  --ok: #6fd48f;
  --shadow: none;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--accent); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
}
.skip:focus {
  inset-inline-start: 16px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
}
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 16px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Hero */
.hero { padding: 56px 0 40px; }
.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.2;
  margin: 0 0 16px;
}
.hero p {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 24px;
}
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.25; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; max-width: 680px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections and cards */
section { padding: 24px 0; }
h2 { font-size: 26px; margin: 0 0 16px; line-height: 1.3; }
h3 { font-size: 19px; margin: 0 0 8px; line-height: 1.35; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 28px; line-height: 1; margin-bottom: 10px; }

.rules { counter-reset: rule; list-style: none; padding: 0; margin: 0; }
.rules li {
  counter-increment: rule;
  position: relative;
  padding-inline-start: 44px;
  margin-bottom: 14px;
}
.rules li::before {
  content: counter(rule);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Placeholder the owner must fill before going live */
.fill {
  background: var(--mark);
  color: var(--mark-ink);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 600;
}

/* Prompt library */
.filters {
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.filters label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.filters input, .filters select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.result-count { color: var(--muted); font-size: 15px; margin: 0 0 16px; }

.prompt-list { display: grid; gap: 16px; }
.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.prompt-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  font-size: 13px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 10px;
}
.tag.tested { background: var(--accent-soft); color: var(--ok); font-weight: 600; }
.prompt-text {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin: 0 0 12px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.prompt-text[dir="ltr"] { text-align: left; }
.slot {
  background: var(--mark);
  color: var(--mark-ink);
  border-radius: 4px;
  padding: 0 3px;
}
.tip { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.copy-btn { flex-shrink: 0; padding: 6px 14px; font-size: 15px; }
.copy-btn.done { background: var(--ok); }

details.example {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
details.example summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}
details.example .ex-input { font-size: 14px; color: var(--muted); margin: 10px 0 6px; }
details.example .ex-output {
  white-space: pre-wrap;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Workshop */
.modules { display: grid; gap: 12px; }
.module {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.module .num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
}
.module ul { margin: 6px 0 0; padding-inline-start: 20px; color: var(--muted); }
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fact { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; }
.fact b { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.cta {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.cta p { color: var(--muted); }
.cta .btn-row { justify-content: center; }

/* Curricula */
.product h3 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.price { font-size: 18px; white-space: nowrap; }
.product ul { padding-inline-start: 20px; margin: 0 0 16px; color: var(--muted); }
.subject-head { margin-top: 12px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 15px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .hero { padding: 36px 0 24px; }
  .module { grid-template-columns: 1fr; gap: 8px; }
  .prompt-card header { flex-direction: column; }
}
