/* ==========================================================================
   תורה על הביט - שפת העיצוב של האתר
   נגזרת מהכריכה: נייבי עמוק, זהב עתיק, קלף.
   מצב בהיר = עמודי הספר (לבן־שמנת, טקסט נייבי). מצב כהה = הכריכה הקדמית (נייבי).
   ========================================================================== */

/* Light mode follows the book's own pages: off-white paper, navy text, gold
   for headings and accents. (It used to be tan parchment with brown text,
   which read as a generic template rather than as this book.) */
:root {
    --paper:       #FAF8F3;
    --surface:     #FFFFFF;
    --surface-2:   #F1EDE4;
    --ink:         #14243F;
    --ink-soft:    #3B4A63;
    /* Captions: 5.6:1 against --paper, over the 4.5 minimum for small text. */
    --muted:       #5B6577;
    --rule:        #E2DCCF;
    --gold:        #8A6420;   /* בטוח לטקסט */
    --gold-bright: #C9973F;   /* דקורטיבי */
    --navy:        #14243F;
    --navy-deep:   #0E1B30;
    --wave-blue:   #2C6E9B;
    --gold-tint:   #F4EEE1;
    --on-accent:   #FFFFFF;
    --shadow-sm:   0 1px 2px rgba(20,36,63,.06);
    --shadow:      0 1px 2px rgba(20,36,63,.06), 0 8px 24px rgba(20,36,63,.07);
    --shadow-lg:   0 2px 6px rgba(20,36,63,.08), 0 20px 50px rgba(20,36,63,.12);
    --ray:         radial-gradient(120% 90% at 85% -15%, rgba(201,151,63,.28), transparent 62%);
    /* The cover artwork - tree, roots, and sound waves - behind hero sections.
       Two files, one per theme, so the art matches the palette instead of
       being tinted into mud. */
    --backdrop-art: url("/content/site/images/brand/backdrop-light.jpg");
    --backdrop-veil: 80%;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper:       #0E1B30;
        --surface:     #142338;
        --surface-2:   #1B2E48;
        --ink:         #EDE1C6;
        --ink-soft:    #C3B392;
        --muted:       #93866B;
        --rule:        #27405F;
        --gold:        #E0B667;
        --gold-bright: #E9C77F;
        --navy:        #EDE1C6;
        --navy-deep:   #0A1526;
        --wave-blue:   #5FA3CE;
        --gold-tint:   #1C2B41;
        --on-accent:   #0E1B30;
        --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
        --shadow:      0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.4);
        --shadow-lg:   0 2px 6px rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.5);
        --ray:         radial-gradient(120% 90% at 85% -15%, rgba(224,182,103,.20), transparent 62%);
        --backdrop-art: url("/content/site/images/brand/backdrop-dark.jpg");
        --backdrop-veil: 74%;
    }
}

:root[data-theme="dark"] {
    --paper:       #0E1B30;
    --surface:     #142338;
    --surface-2:   #1B2E48;
    --ink:         #EDE1C6;
    --ink-soft:    #C3B392;
    --muted:       #93866B;
    --rule:        #27405F;
    --gold:        #E0B667;
    --gold-bright: #E9C77F;
    --navy:        #EDE1C6;
    --navy-deep:   #0A1526;
    --wave-blue:   #5FA3CE;
    --gold-tint:   #1C2B41;
    --on-accent:   #0E1B30;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
    --shadow:      0 1px 2px rgba(0,0,0,.45), 0 10px 28px rgba(0,0,0,.4);
    --shadow-lg:   0 2px 6px rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.5);
    --ray:         radial-gradient(120% 90% at 85% -15%, rgba(224,182,103,.20), transparent 62%);
    --backdrop-art: url("/content/site/images/brand/backdrop-dark.jpg");
    --backdrop-veil: 74%;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.serif {
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--gold-bright);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Skip link - נגישות מקלדת */
.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    background: var(--gold);
    color: var(--on-accent);
    padding: 12px 20px;
    z-index: 100;
    border-radius: 0 0 8px 8px;
}
.skip-link:focus {
    inset-inline-start: 16px;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: 24px;
}

/* ---------- typography ---------- */
h1, h2, h3 {
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
    line-height: 1.2;
    text-wrap: balance;
    margin: 0;
}
h1 { font-size: clamp(34px, 5.6vw, 60px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; }
h3 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 700; }

/* No letter-spacing: Hebrew has no capitals, and tracked-out small labels
   are a Latin-template habit that just looks broken in Hebrew. */
.eyebrow {
    font-size: 15px;
    color: var(--gold);
    font-weight: 600;
    margin: 0 0 10px;
}

.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    font-family: inherit;
}
/* Navy and gold, like the cover. */
.btn-primary {
    background: var(--navy);
    color: var(--on-accent);
    border-color: var(--navy);
}
.btn-primary:hover { background: var(--gold); border-color: var(--gold); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink-soft);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}
.site-header .bar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
    font-size: 21px;
    font-weight: 700;
    white-space: nowrap;
}
.brand .mark { display: block; width: 30px; height: 30px; }

.site-nav { margin-inline-start: auto; }
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 15.5px;
    white-space: nowrap;
}
/* Seven items fit comfortably on a wide screen and not much below it, so
   tighten the spacing rather than let the bar wrap into the logo. */
@media (max-width: 1080px) {
    .site-nav ul { gap: 2px; }
    .site-nav a { padding: 8px 8px; font-size: 14.5px; }
    .site-header .bar { gap: 12px; }
}
.site-nav a:hover { color: var(--gold); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--gold); font-weight: 600; }

.theme-toggle {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink-soft);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    flex: 0 0 auto;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px; height: 40px;
        margin-inline-start: auto;
        background: transparent;
        border: 1px solid var(--rule);
        border-radius: 4px;
        color: var(--ink);
        cursor: pointer;
        font-size: 18px;
    }
    .site-nav {
        display: none;
        position: absolute;
        inset-inline: 0;
        top: 100%;
        background: var(--surface);
        border-bottom: 1px solid var(--rule);
        padding: 12px 24px 18px;
        margin: 0;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .site-nav a { padding: 11px 12px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }

/* ---------- wave divider (from the cover) ---------- */
.wave {
    display: block;
    width: 100%;
    height: 34px;
    color: var(--gold-bright);
    opacity: .5;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before {
    content: "";
    position: absolute;
    inset: -80px -10% auto -10%;
    height: 120%;
    background: var(--ray);
    pointer-events: none;
}
.hero .container { position: relative; }

/* Puts the cover artwork behind a section. The veil keeps body text at full
   contrast - the art is atmosphere, never something you have to read through. */
.has-art { position: relative; isolation: isolate; }
.has-art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            to bottom,
            color-mix(in srgb, var(--paper) var(--backdrop-veil), transparent),
            var(--paper) 92%
        ),
        var(--backdrop-art) center / cover no-repeat;
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 18px; }
.hero .lede { max-width: 54ch; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 20px 0 0; font-size: 14.5px; color: var(--muted); }

/* ---------- image frames / placeholders ---------- */
.frame {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: var(--shadow-lg);
}
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

.frame-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 28px;
    border: 1px dashed var(--rule);
    border-radius: 6px;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            color-mix(in srgb, var(--gold-bright) 7%, transparent) 12px,
            color-mix(in srgb, var(--gold-bright) 7%, transparent) 24px
        ),
        var(--surface-2);
    color: var(--muted);
    box-shadow: none;
}
.frame-ph .ph-icon { font-size: 26px; opacity: .55; }
.frame-ph .ph-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.frame-ph .ph-file {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 12.5px;
    direction: ltr;
    color: var(--muted);
    background: color-mix(in srgb, var(--ink) 6%, transparent);
    padding: 2px 8px;
    border-radius: 4px;
}

.ratio-cover  { aspect-ratio: 3 / 4; }
.ratio-banner { aspect-ratio: 21 / 8; }   /* wide screenshots */
.ratio-wide   { aspect-ratio: 4 / 3; }
.ratio-spread { aspect-ratio: 16 / 10; }
.ratio-square { aspect-ratio: 1 / 1; }

/* ---------- value cards ---------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.value-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
}
.value-card h3 { margin-bottom: 8px; }
.value-card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.value-card .glyph { color: var(--gold-bright); font-size: 22px; margin-bottom: 12px; display: block; }

/* ---------- proof / stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}
.stat {
    text-align: center;
    padding: 24px 16px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
}
.stat .n {
    display: block;
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
    font-size: clamp(30px, 4.6vw, 44px);
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.stat .l { font-size: 14.5px; color: var(--ink-soft); }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

/* ---------- pricing ---------- */
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
}
.plan {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}
.plan.featured {
    border-color: var(--gold);
    box-shadow: var(--shadow);
}
.plan .badge {
    position: absolute;
    top: -12px;
    inset-inline-start: 26px;
    background: var(--gold);
    color: var(--on-accent);
    font-size: 12.5px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 3px;
}
/* h2 in the markup so the outline does not skip a level; sized as a card
   heading rather than a section heading. */
.plan h2 { margin: 0; font-size: clamp(19px, 2.2vw, 23px); }
.plan .price {
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.plan .price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 15.5px; color: var(--ink-soft); }
.plan ul li { display: flex; gap: 9px; align-items: flex-start; }
.plan ul li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: .75em; background: var(--gold-bright); }
.plan .btn { margin-top: auto; }

.ship-note {
    margin-top: 22px;
    font-size: 15px;
    color: var(--ink-soft);
    background: var(--gold-tint);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 16px 20px;
}

/* ---------- quote / testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.quote {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.quote blockquote { margin: 0; font-size: 16.5px; color: var(--ink); }
.quote .who { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted); }
.quote .who .avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--rule);
    display: grid; place-items: center; color: var(--gold-bright);
    overflow: hidden; flex: 0 0 auto;
}
.quote .who .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- discussion question ---------- */
.question-card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--gold);
    border-radius: 4px;
    padding: clamp(28px, 4vw, 44px);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.question-card .q-mark { color: var(--gold-bright); font-size: 26px; }
.question-card p.q {
    font-family: "David Libre", "Frank Ruehl CLM", "Times New Roman", Georgia, serif;
    font-size: clamp(20px, 3vw, 27px);
    line-height: 1.5;
    margin: 14px auto 18px;
    max-width: 46ch;
    text-wrap: balance;
}

/* ---------- final cta ---------- */
.cta-band {
    background: var(--navy-deep);
    color: #EDE1C6;
    border-radius: 6px;
    padding: clamp(34px, 5vw, 60px);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    display: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #F3E7CB; margin-bottom: 12px; }
.cta-band p { color: #C3B392; max-width: 52ch; margin: 0 auto 26px; }
.cta-band .btn-primary { background: var(--gold-bright); border-color: var(--gold-bright); color: #0E1B30; }
.cta-band .btn-ghost { color: #EDE1C6; border-color: rgba(237,225,198,.35); }
.cta-band .btn-ghost:hover { color: #F3E7CB; border-color: #E0B667; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--rule);
    padding: 56px 0 32px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}
/* h2 rather than h4: the page outline runs h1 then h2 sections, and jumping
   to h4 here left a gap in the outline a screen reader navigates by. Sized
   down to stay visually secondary. */
.site-footer h2 {
    margin: 0 0 12px;
    font-family: system-ui, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
    font-size: 15px; font-weight: 700; 
    color: var(--gold);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* inline-block with vertical padding: as inline text these were 20px tall,
   below the 24px minimum target size, on every page of the site. */
.site-footer a {
    display: inline-block;
    padding-block: 3px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 15px;
}
.site-footer a:hover { color: var(--gold); }
.site-footer p { color: var(--ink-soft); font-size: 15px; margin: 0 0 10px; }
.footer-bottom {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- utilities ---------- */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ==========================================================================
   Accessibility menu
   The button sits at the bottom inline-end corner, small and out of the way,
   and the panel opens from it. Both live at the end of the DOM so they come
   last in tab order - a utility control should not be the first thing anyone
   reaches.
   ========================================================================== */
.a11y {
    position: fixed;
    /* The consent bar shares this corner. It reports its own height into
       --consent-h rather than us guessing, because that height changes with
       the viewport and with the text size the a11y menu itself sets. */
    inset-block-end: calc(16px + var(--consent-h, 0px));
    inset-inline-end: 16px;
    z-index: 90;
    /* No transition here on purpose. A transition on this property resolves
       only as animation frames advance, so anywhere frames are throttled the
       button stays pinned at the old offset - underneath the banner. A control
       that has to be reachable does not get to depend on an animation running. */
}
.a11y-btn {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--rule);
    background: var(--surface);
    color: var(--gold);
    cursor: pointer;
    box-shadow: var(--shadow);
    /* Quiet until wanted: it should be findable, not attention-seeking. */
    opacity: .72;
    transition: opacity .15s ease, transform .15s ease;
}
.a11y-btn:hover, .a11y-btn:focus-visible { opacity: 1; transform: translateY(-1px); }
.a11y-btn[aria-expanded="true"] { opacity: 1; }

.a11y-panel {
    position: absolute;
    inset-block-end: 60px;
    inset-inline-end: 0;
    width: min(19rem, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    text-align: start;
}
.a11y-panel[hidden] { display: none; }

.a11y-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.a11y-head h2 {
    margin: 0; font-size: 17px;
    font-family: system-ui, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
}
.a11y-close {
    margin-inline-start: auto;
    width: 32px; height: 32px;
    border: 1px solid var(--rule); border-radius: 4px;
    background: transparent; color: var(--ink-soft);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.a11y-close:hover { color: var(--gold); border-color: var(--gold); }

.a11y-group { margin-bottom: 14px; }
.a11y-lbl {
    display: block; font-size: 12.5px; 
    color: var(--muted); font-weight: 700; margin-bottom: 7px;
}
.a11y-row { display: flex; align-items: center; gap: 8px; }
.a11y-row button { flex: 1 1 auto; }
.a11y-out {
    min-width: 4ch; text-align: center;
    font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--ink);
}

.a11y-panel button:not(.a11y-close) {
    display: block; width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--rule); border-radius: 4px;
    background: var(--paper); color: var(--ink);
    font: inherit; font-size: 15px; text-align: start;
    cursor: pointer;
}
.a11y-panel button:not(.a11y-close):hover { border-color: var(--gold); }
.a11y-panel .a11y-toggle[aria-pressed="true"] {
    background: var(--gold); border-color: var(--gold);
    color: var(--on-accent); font-weight: 600;
}
.a11y-panel .a11y-toggle[aria-pressed="true"]::after { content: " \2713"; }

.a11y-foot {
    display: flex; align-items: center; gap: 12px;
    padding-top: 12px; border-top: 1px solid var(--rule);
    font-size: 14.5px;
}
.a11y-foot .a11y-reset { flex: 0 0 auto; width: auto !important; margin: 0 !important; }
.a11y-foot a { margin-inline-start: auto; }

/* ---------- what the settings actually do ---------- */

/* Text size. The stylesheet is in px throughout, so a root font-size would
   change nothing; zoom scales the rendered result instead. */
[data-a11y-zoomed] body { zoom: var(--a11y-zoom, 1); }

/* :root[...] rather than a bare attribute selector. The dark theme is defined
   on :root[data-theme="dark"], which outranks a lone [data-a11y-contrast] -
   so high contrast silently did nothing whenever dark mode was on. Equal
   specificity plus later position is what makes it win. */
:root[data-a11y-contrast] {
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F2F2F2;
    --ink: #000000;
    --ink-soft: #1A1A1A;
    --muted: #3A3A3A;
    --rule: #000000;
    --gold: #7A4E00;
    --gold-bright: #7A4E00;
    --gold-tint: #FFFFFF;
    --on-accent: #FFFFFF;
    --backdrop-veil: 100%;
}
:root[data-a11y-contrast] .cta-band,
:root[data-a11y-contrast] .a11y-btn { background: #000000; color: #FFFFFF; }
:root[data-a11y-contrast] .has-art::after { display: none; }
:root[data-a11y-contrast] * { box-shadow: none !important; text-shadow: none !important; }

[data-a11y-grayscale] body { filter: grayscale(1); }

[data-a11y-links] a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    outline: 1px dashed currentColor;
    outline-offset: 2px;
}

[data-a11y-readable] body,
[data-a11y-readable] .serif,
[data-a11y-readable] h1, [data-a11y-readable] h2, [data-a11y-readable] h3 {
    font-family: Arial, "Arial Hebrew", "Helvetica Neue", Helvetica, sans-serif !important;
    letter-spacing: normal !important;
}

[data-a11y-spacing] body {
    line-height: 2 !important;
    letter-spacing: .04em;
    word-spacing: .1em;
}
[data-a11y-spacing] p { margin-block: 1em; }

[data-a11y-still] *,
[data-a11y-still] *::before,
[data-a11y-still] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* The button overlaps the last line of the footer on a narrow screen. */
@media (max-width: 640px) {
    .site-footer { padding-bottom: 80px; }
}

@media print {
    .a11y { display: none; }
}

/* ==========================================================================
   Cookie consent
   Sits at the bottom, above the accessibility button but never covering the
   whole page. Both choices are the same size: a refusal that is harder to give
   than an agreement is not a choice.
   ========================================================================== */
.consent {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 95;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .16);
    padding: 16px 0 18px;
}
.consent[hidden] { display: none; }
.consent-inner {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: 24px;
    display: flex;
    align-items: center;
    gap: 20px 28px;
    flex-wrap: wrap;
}
.consent-copy { flex: 1 1 380px; }
.consent-copy h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-family: system-ui, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
}
.consent-copy p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-actions .btn { min-height: 46px; padding: 11px 22px; font-size: 15.5px; }

@media (max-width: 640px) {
    /* Room for the accessibility button, which lives in the same corner. */
    .consent { padding-bottom: 16px; }
    .consent-inner { gap: 14px; }
    .consent-actions { width: 100%; }
    .consent-actions .btn { flex: 1 1 0; }
}

/* A line under the buy strip: the two reasons someone might need to talk to a
   person instead of a checkout button. Small and calm on purpose - the one
   about affording the book should read as an open door, not an offer. */
.reach-line {
    margin: 18px 0 0;
    font-size: 15.5px;
    color: var(--ink-soft);
    text-align: center;
    text-wrap: pretty;
}
