:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --band: #f1ece1;
  --ink: #1d2422;
  --muted: #5b6662;
  --line: #e2dccf;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #d8efe7;
  --warn-soft: #fbe3d9;
  --warn-ink: #9a3412;
  --gold: #c8901c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111615;
    --surface: #18201e;
    --band: #151c1a;
    --ink: #e8ece9;
    --muted: #9aa7a2;
    --line: #2a3532;
    --accent: #3fbf9f;
    --accent-ink: #0c1412;
    --accent-soft: #163a31;
    --warn-soft: #3a2018;
    --warn-ink: #f4a582;
    --gold: #e0b14a;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }

code {
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

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

h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font: 700 1.5rem Fraunces, Georgia, serif; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
nav a:hover { color: var(--ink); }
nav { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { nav { gap: 14px; } nav a { font-size: 0.88rem; } }
@media (max-width: 560px) { nav a:not(:first-child):not(:last-child) { display: none; } }

/* hero */
.hero { padding: 64px 0 40px; }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 12px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 0 32px; }

.compare {
  margin: 0 0 32px; max-width: 720px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 20px 16px;
}
.compare .row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.compare .row p { margin: 0; font-size: 1.1rem; }
.compare .who { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.compare .good-row .who { color: var(--accent); }
.compare figcaption { font-size: 0.85rem; color: var(--muted); padding-top: 12px; }
@media (max-width: 560px) { .compare .row { grid-template-columns: 1fr; gap: 2px; } }

mark { border-radius: 4px; padding: 0 0.2em; font-weight: 600; }
mark.bad { background: var(--warn-soft); color: var(--warn-ink); text-decoration: line-through; text-decoration-thickness: 1px; }
mark.good { background: var(--accent-soft); color: var(--accent); }
.he { font-family: "Frank Ruhl Libre", "Noto Serif Hebrew", serif; font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }

/* chips */
.words { padding: 8px 0 48px; }
.words-label { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-style: italic; }

/* sections */
section { padding: 64px 0; }
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--muted); max-width: 680px; margin: 0 0 28px; }
.small { font-size: 0.88rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 4px;
}
.card p { margin: 0 0 12px; }
.card .btn { align-self: flex-start; margin: 4px 0 8px; }
.card.feature { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.shot { margin: 32px 0 0; text-align: center; }
.shot img { max-width: min(100%, 360px); height: auto; border-radius: 10px; border: 1px solid var(--line); }
.shot figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

.other { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; }
.other summary { cursor: pointer; font-weight: 600; }
.other ul { margin: 12px 0 4px; padding-left: 1.2em; }
.other li { margin-bottom: 8px; }

.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; gap: 24px; } }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 20px 22px; }
.note p { margin: 0; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
td:not(:first-child), th:not(:first-child) { text-align: right; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td b { color: var(--accent); }

.links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.links a {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.links a:hover { border-color: var(--accent); }
.links b { color: var(--accent); }
.links span { font-size: 0.9rem; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.foot p { margin: 0; }

/* download block: centred, large targets, sits between the word chips and the app details */
.download { text-align: center; padding: 56px 0 64px; background: linear-gradient(180deg, var(--bg), var(--accent-soft)); border-top: 1px solid var(--line); }
.download .section-lede { margin-left: auto; margin-right: auto; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.dl {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 30px 22px; border-radius: 18px; text-decoration: none;
  background: var(--surface); color: var(--ink); border: 2px solid var(--accent);
  transition: transform .12s ease, box-shadow .12s ease;
}
.dl:hover { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 25%, transparent); }
.dl.primary { background: var(--accent); color: var(--accent-ink); }
.dl-os { font: 700 1.8rem Fraunces, Georgia, serif; }
.dl-os::before { content: "↓ "; }
.dl-what { font-weight: 600; }
.dl-ver { font-size: 0.85rem; opacity: 0.8; }
.dl-alt { margin: 24px 0 0; color: var(--muted); font-size: 0.95rem; }

/* inner pages */
.page-head { padding: 56px 0 24px; }
.page-head .lede { margin-bottom: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.page section { padding: 24px 0 48px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 32px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.fact b { display: block; font: 700 1.4rem Fraunces, Georgia, serif; color: var(--accent); }
.fact span { font-size: 0.88rem; color: var(--muted); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 4px; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.tag.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* contact form */
.form { max-width: 620px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 500; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--warn-ink); }
.dl-big { max-width: none; margin-bottom: 8px; }
.dl-big .dl { padding: 34px 24px; }
.dl-big .dl-os { font-size: 2rem; }
.prose .dl-alt { text-align: center; }
pre { background: var(--band); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

/* interactive charts (charts.js); the tables next to them are the no-JS view */
:root { --viz-other: #b8b2a5; --viz-zone: #f6f2ea; }
@media (prefers-color-scheme: dark) { :root { --viz-other: #4d5955; --viz-zone: #1c2523; } }
.viz { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 12px; margin: 0 0 16px; }
.viz:not(.viz-ready) { display: none; }
.viz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.viz-chip { font: 500 0.85rem Inter, system-ui, sans-serif; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.viz-chip:hover { color: var(--ink); border-color: var(--accent); }
.viz-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.viz-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz svg .grid { stroke: var(--line); stroke-width: 1; }
.viz svg .axis { stroke: var(--muted); stroke-width: 1; }
.viz svg .tick { fill: var(--muted); font: 12px Inter, system-ui, sans-serif; }
.viz svg .tick.sub { font-size: 10.5px; opacity: 0.85; }
.viz svg .val { fill: var(--ink); font: 600 12.5px Inter, system-ui, sans-serif; }
.viz svg .zone { fill: var(--viz-zone); }
.viz svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.viz svg .line.target { stroke-dasharray: 5 5; }
.viz svg .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.viz svg .dot.target { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.viz svg .dot.stock { fill: var(--muted); }
.viz svg .dot.pending { fill: var(--surface); stroke: var(--muted); stroke-width: 2; stroke-dasharray: 2 2; }
.viz svg .hit { fill: transparent; cursor: pointer; }
.viz svg .pt:focus { outline: none; }
.viz svg .pt:focus .dot, .viz svg .pt:hover .dot { stroke-width: 3; }
.viz-note { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-sizing: border-box; }
.viz-legend .k-measured { background: var(--accent); }
.viz-legend .k-target { border: 2px solid var(--accent); }
.viz-legend .k-stock { background: var(--muted); }
.viz-legend .k-pending { border: 2px dashed var(--muted); }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 0.8rem; line-height: 1.4; display: grid; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); }
.viz-tip[hidden] { display: none; }
.viz-bars { display: grid; gap: 6px; margin-top: 4px; }
.viz-bar { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr 3.4rem; gap: 10px; align-items: center; font-size: 0.88rem; }
.viz-bar .name { color: var(--muted); }
.viz-bar.ours .name { color: var(--ink); font-weight: 600; }
.viz-bar .track { height: 14px; }
.viz-bar .fill { display: block; height: 100%; min-width: 4px; border-radius: 0 4px 4px 0; background: var(--viz-other); transition: width .35s ease; }
.viz-bar.ours .fill { background: var(--accent); }
.viz-bar .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 560px) { .viz-bar { grid-template-columns: 1fr 3.2rem; } .viz-bar .name { grid-column: 1 / -1; margin-bottom: -4px; } }
@media (prefers-reduced-motion: reduce) { .viz-bar .fill { transition: none; } }

/* logo mark before the wordmark; files in img/brand/, from Hebrish-Mgmt/brand/logo */
.brand { display: inline-flex; align-items: center; }
.brand::before { content: ""; flex: none; margin-right: 10px; width: 1.4em; height: 1.4em; background: url(/img/brand/mark.svg) center / contain no-repeat; }
@media (prefers-color-scheme: dark) { .brand::before { background-image: url(/img/brand/mark-dark.svg); } }

/* share bars: footer of every page, larger on home and support */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; }
.share-label { font-weight: 600; color: var(--muted); margin-right: 4px; }
.share-btn {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; font-size: 0.88rem; text-decoration: none; cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn[hidden] { display: none; }
.share-lg { margin: 4px 0 24px; }
.share-lg .share-btn { padding: 10px 18px; font-size: 0.95rem; font-weight: 600; }
.share-lg .share-label { display: none; }
.tell { padding: 48px 0; text-align: center; }
.tell .section-lede { margin: 0 auto 20px; }
.tell .share { justify-content: center; }

/* newsletter signup (newsletter.js → /api/subscribe) */
.signup { display: grid; gap: 8px; max-width: 480px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type=email] {
  flex: 1 1 220px; min-width: 0; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
}
.signup input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup button { cursor: pointer; font: inherit; font-weight: 600; }
.signup button:disabled { opacity: 0.6; cursor: default; }
.news { padding: 48px 0; text-align: center; }
.news .section-lede, .news .signup { margin-left: auto; margin-right: auto; }
.news-note { margin-bottom: 32px; }
.news-note p { margin: 0 0 12px; }

/* home: dataset sentences, romanized term highlighted with the Hebrew spelling above it */
.sentences { padding: 8px 0 56px; }
.said { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.said li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 30px 22px 16px; font-size: 1.15rem; line-height: 2.6;
}
.term { position: relative; display: inline-block; line-height: 1.3; }
.term .he {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  white-space: nowrap; font-size: 0.95em; font-weight: 700; color: var(--muted); line-height: 1.1;
}
.term mark { cursor: help; }

/* home: copyable share text */
.snippet {
  max-width: 640px; margin: 0 auto 20px; text-align: left;
  background: var(--surface); border: 1px dashed var(--accent); border-radius: 14px; padding: 16px 18px;
}
.snippet p { margin: 0 0 12px; user-select: all; }
.snippet .btn[hidden] { display: none; }
