:root { --ds-page:#f6f5f1; --ds-ink:#1d1c1a; --ds-ink-2:#5b5952; --ds-ink-4:#9b988f; --ds-hairline:#e3e1da; --ds-teal:#0f766e; }
html, body, #root { margin: 0; min-height: 100%; }
body { background: var(--ds-page); font-family: -apple-system, 'Segoe UI', Arial, 'Noto Sans Hebrew', sans-serif; }
.rtl { direction: rtl; text-align: right; }

.page { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--ds-hairline); border-radius: 16px; padding: 20px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.title { font-size: 24px; font-weight: 700; margin: 0 0 2px; color: var(--ds-ink); }
.fact { font-size: 15px; color: var(--ds-ink-2); margin-bottom: 10px; }
.intro { font-size: 15px; line-height: 1.6; color: var(--ds-ink-2); margin: 0 0 12px; }
.cover { display: block; width: 100%; border-radius: 12px; margin: 4px 0 8px; }
.group { border-top: 1px solid var(--ds-hairline); padding: 12px 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.group-label { font-size: 17px; font-weight: 700; color: var(--ds-ink); }
.caption { font-size: 13px; color: var(--ds-ink-2); line-height: 1.5; }
.closing { font-size: 12px; color: var(--ds-ink-4); text-align: center; padding: 14px 0 4px; }

.file-button { display: inline-block; box-sizing: border-box; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; text-align: center; }
.file-button[data-variant="primary"] { background: var(--ds-teal); color: #fff; border-color: var(--ds-teal); }
.file-button[data-variant="secondary"] { background: #fff; color: var(--ds-teal); border-color: var(--ds-teal); }
.file-button.is-compact { padding: 10px 16px; }
button.file-button { appearance: none; }

.version { font-size: 10px; color: var(--ds-ink-4); text-align: center; padding: 6px 0 4px; }

.q-screen { display: flex; flex-direction: column; padding: 16px 18px 6px; box-sizing: border-box; background: var(--ds-page); }
.q-label { font-size: 13px; font-weight: 600; color: var(--ds-ink-2); margin-bottom: 8px; }
.q-text { font-size: 18px; line-height: 1.55; margin: 0 0 8px; color: var(--ds-ink); }
.q-bullets { margin: 2px 0 8px; padding-inline-start: 20px; font-size: 16px; line-height: 1.5; color: var(--ds-ink); }
.q-bullets li { margin-bottom: 2px; }
.q-areas { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.q-prompt { font-size: 17px; font-weight: 600; margin: 0 0 4px; color: var(--ds-ink); }
.answer-box { display: block; width: 100%; height: 150px; box-sizing: border-box; resize: none; border: 1px solid var(--ds-hairline); border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 17px; line-height: 1.6; color: var(--ds-ink); background: #fff; direction: rtl; text-align: right; }
.answer-box:focus { outline: 2px solid var(--ds-teal); outline-offset: 0; border-color: var(--ds-teal); }
.answer-box:disabled { opacity: 0.6; }

.q-bottom { margin-top: 14px; }
.q-nav { display: flex; justify-content: space-between; gap: 12px; }
.q-nav .file-button { min-height: 44px; min-width: 96px; }

.send-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0 12px; text-align: center; }
.send-button { min-height: 48px; min-width: 220px; font-size: 17px; }

.restore { margin-top: 6px; border-top: 1px dashed var(--ds-hairline); padding-top: 8px; }
.restore summary { font-size: 13px; color: var(--ds-ink-2); cursor: pointer; }
.restore textarea { width: 100%; box-sizing: border-box; height: 90px; margin-top: 8px; border: 1px solid var(--ds-hairline); border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 14px; }
.restore .file-button { margin-top: 6px; }

@media (min-width: 768px) {
    .q-screen { max-width: 720px; margin: 0 auto; padding: 28px 24px 10px; }
    .answer-box { font-size: 18px; height: 180px; }
}
@media (max-height: 700px) {
    .q-screen { padding-top: 10px; }
    .q-text { font-size: 16px; line-height: 1.45; }
    .q-bullets { font-size: 14px; }
    .answer-box { height: 110px; }
    .q-bottom { margin-top: 8px; }
}

/* Compact single-screen home */
.home-screen .title { font-size: 22px; margin: 0; }
.home-screen .fact { font-size: 14px; color: var(--ds-ink-2); margin: 2px 0 4px; }
.home-screen .intro { font-size: 14px; line-height: 1.5; color: var(--ds-ink-2); margin: 0 0 8px; }
.home-screen .cover { height: 110px; object-fit: cover; border-radius: 12px; margin: 0 0 8px; }
.ch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--ds-hairline); padding: 7px 0; }
.ch-name { font-size: 16px; font-weight: 700; color: var(--ds-ink); }
.ch-prog { font-size: 12px; color: var(--ds-ink-2); }
.ch-row .file-button { padding: 8px 14px; font-size: 15px; min-width: 86px; }
.home-screen .q-bottom { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.btn-row { display: flex; gap: 8px; width: 100%; }
.btn-row .file-button { flex: 1; min-width: 0; }
.q-text.small { font-size: 15px; }
@media (max-height: 700px) {
    .home-screen .cover { display: none; }
    .home-screen .intro { margin-bottom: 4px; }
    .ch-row { padding: 5px 0; }
}
