/* Site styles. Colors, sizes and fonts come from tokens.css (the design system). RTL first.
   The language: a living notebook. Pages open on ruled notebook paper with the margin line on the right;
   the content runs as chapters with a main column and a margin column that carries handwritten notes,
   sticky notes and taped-in photos. */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --rule: color-mix(in srgb, var(--water) 18%, var(--paper));
  --margin-line: color-mix(in srgb, var(--sun) 80%, var(--paper));
  --header-h: 76px;
  --margin-x: clamp(10px, 4vw, 56px);
  --tape: color-mix(in srgb, var(--paper-raised) 55%, transparent);
  --lift: 0 1px 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 12px 22px -12px color-mix(in srgb, var(--ink) 40%, transparent);
}
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 28px; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.skip { position: absolute; inset-inline-start: var(--space-4); top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Page frame ---------- */
.wrap { width: 100%; max-width: calc(var(--measure-page) + 2 * var(--space-8)); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 720px) { .wrap { padding-inline: var(--space-8); } }

/* Main column + margin column. In RTL the main column sits on the right, the margin on the left. */
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.row > * { min-width: 0; }
@media (min-width: 980px) { .row { grid-template-columns: minmax(0, 64ch) minmax(0, 1fr); column-gap: var(--space-16); } }
.main { display: grid; gap: var(--space-4); align-content: start; }
.main h2 { margin-top: var(--space-2); }
.main ul:not(.checks):not(.facts) { display: grid; gap: var(--space-2); padding-inline-start: var(--space-6); }
.main li::marker { color: var(--leaf); }
.margin { display: grid; gap: var(--space-8); align-content: start; justify-items: center; }
@media (min-width: 980px) { .margin { padding-top: var(--space-2); } }
.stack { display: grid; gap: var(--space-4); align-content: start; }
.block { padding-block: var(--space-8); }
@media (min-width: 980px) { .block { padding-block: var(--space-12); } }

/* ---------- Type ---------- */
.muted { color: var(--ink-muted); }
.kicker { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 460; color: var(--leaf); }
@media (max-width: 719px) {
  .t-title { font-size: 34px; line-height: 40px; }
  .t-heading { font-size: 26px; line-height: 32px; }
}
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.hand { font-family: var(--font-hand); font-size: 16px; line-height: 24px; color: var(--water); }
.ng-mark { background: var(--sun-mark); color: var(--ink); padding: 0 .18em; margin: 0 -.06em; border-radius: .35em .12em .4em .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tone-leaf { --tone: var(--leaf); --tone-wash: var(--leaf-wash); }
.tone-water { --tone: var(--water); --tone-wash: var(--water-wash); }
.tone-sun { --tone: var(--sun-ink); --tone-wash: var(--sun-mark); }

/* ---------- Notebook paper: ruled lines, and the margin line on the right like a Hebrew school notebook ---------- */
.notebook {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--margin-line), var(--margin-line)),
    repeating-linear-gradient(to bottom, transparent 0 35px, var(--rule) 35px 36px);
  background-size: 2px 100%, 100% 36px;
  background-position: right var(--margin-x) top, 0 0;
  background-repeat: no-repeat, repeat;
}
/* On phones the text keeps clear of the margin line. */
@media (max-width: 719px) { .notebook .wrap { padding-inline-start: calc(var(--margin-x) + 14px); } }
/* The first section of every page runs under the floating header. */
main > .notebook:first-child, main > .ph:first-child { margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h); }

/* ---------- Header: a floating pill with a sun-water-leaf edge ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding: 12px var(--space-2) 0; pointer-events: none; }
@media (min-width: 720px) { .site-header { padding-inline: var(--space-4); } }
.site-header .wrap {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: var(--space-6);
  max-width: 1180px; min-height: 64px; border-radius: 999px; padding-inline: var(--space-4) var(--space-6);
  border: 1.5px solid transparent;
  background: linear-gradient(color-mix(in srgb, var(--paper) 92%, transparent), color-mix(in srgb, var(--paper) 92%, transparent)) padding-box,
              linear-gradient(90deg, var(--sun), var(--water), var(--leaf)) border-box;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 10%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ng-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); flex: none; }
.ng-brand-mark { width: 48px; height: 48px; border-radius: var(--radius-full); }
.ng-brand-text { display: grid; line-height: 1; }
.ng-brand-name { font-family: var(--font-display); font-size: 26px; line-height: 28px; font-weight: 600; }
.ng-brand-title { font-family: var(--font-display); font-size: 15px; line-height: 18px; font-weight: 440; color: var(--leaf); }
.ng-nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); flex: 1; }
.ng-nav a { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink-muted); text-decoration: none; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.ng-nav a:hover { color: var(--ink); }
.ng-nav a[aria-current="page"] { color: var(--leaf); border-bottom-color: var(--sun); }
.menu { display: none; margin-inline-start: auto; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border: 1.5px solid var(--line-strong); border-radius: var(--radius-full); font-weight: 600; font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; inset-inline: 0; top: 100%; margin-top: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: var(--space-4) var(--space-4) var(--space-6); display: grid; gap: var(--space-1); box-shadow: var(--shadow-sm); }
.menu-panel a { display: block; padding: var(--space-3) 0; font-size: 18px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.menu-panel a[aria-current="page"] { color: var(--leaf); }
@media (max-width: 1079px) {
  .ng-nav, .site-header .header-cta { display: none; }
  .menu { display: block; }
  .ng-brand-mark { width: 42px; height: 42px; }
  .ng-brand-name { font-size: 23px; line-height: 25px; }
  .ng-brand-title { font-size: 14px; }
}
/* In the dark theme the watercolor emblem sits on a paper disc, so its black ring stays visible. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .emblem-disc { background: #f7f8f3; padding: 3px; } }
:root[data-theme="dark"] .emblem-disc { background: #f7f8f3; padding: 3px; }

/* ---------- Page hero: the title in two weights, a watercolor that paints itself in ---------- */
.ph-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; padding-block: var(--space-8) var(--space-12); }
@media (min-width: 980px) {
  .ph-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: var(--space-12); min-height: 440px; padding-block: var(--space-12) var(--space-16); }
  .ph-solo .ph-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: var(--space-12); }
}
.ph-text { display: grid; gap: var(--space-4); justify-items: start; }
.ph-text > * { max-width: 100%; }
.crumb { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--leaf); text-decoration: none; }
a.crumb:hover { text-decoration: underline; }
.ph-title { font-family: var(--font-display); font-size: clamp(52px, 7.4vw, 108px); line-height: .92; letter-spacing: -0.01em; display: flex; flex-wrap: wrap; gap: 0 .22em; margin: 0; }
.ph-a { font-weight: 700; color: var(--ink); }
.ph-b { font-weight: 300; color: var(--leaf); }
.ph-title .char { display: inline-block; }
.ph-lead { font-size: 19px; line-height: 31px; color: var(--ink-muted); max-width: 52ch; }
.ph-lead strong { color: var(--ink); font-weight: 600; }
.ph-cta { margin-top: var(--space-2); }
.ph-art { display: grid; justify-items: center; gap: var(--space-2); }
.ph-ill { width: min(380px, 78vw); height: auto; }
.ph-note { max-width: 30ch; text-align: center; font-size: 17px; line-height: 26px; transform: rotate(-2deg); }
/* The emblem is a full disc: a little smaller than the watercolors. */
.ph-ill.ph-emblem { width: min(280px, 60vw); }
@media (max-width: 979px) {
  .ph-grid { gap: var(--space-4); }
  .ph-ill { width: min(220px, 58vw); }
  .ph-ill.ph-emblem { width: min(180px, 48vw); }
  .ph-art .ng-frame { width: min(276px, 70vw) !important; }
}
/* On phones the bar at the bottom already offers WhatsApp and a call. */
@media (max-width: 719px) { .ph-cta a[href^="https://wa.me"], .ph-cta a[href^="tel:"] { display: none; } }
/* The groups page opens on a dark game board: a square grid, like a battle map. */
.ph-dark { background-color: var(--root); color: var(--on-root);
  background-image: linear-gradient(color-mix(in srgb, var(--on-root) 7%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--on-root) 7%, transparent) 1px, transparent 1px);
  background-size: 36px 36px; }
.ph-dark .ph-a { color: var(--on-root); }
.ph-dark .ph-b { color: var(--leaf-on-root); }
.ph-dark .ph-lead { color: var(--on-root-muted); }
.ph-dark .crumb { color: var(--leaf-on-root); }
.ph-dark .ng-btn-secondary, .dragons .ng-btn-secondary { color: var(--on-root); border-color: var(--on-root-muted); }

/* ---------- Chapters: a ruled line, a handwritten tag, a heading, and the margin beside it ---------- */
.chapter { padding-block: var(--space-8); }
.chapter + .chapter { padding-top: 0; }
@media (min-width: 980px) { .chapter { padding-block: var(--space-12); } .chapter + .chapter { padding-top: 0; } }
.chapter .row { position: relative; padding-top: var(--space-8); }
.chapter .row::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1.5px; background: var(--line-strong); transform-origin: right center; transform: scaleX(var(--draw, 1)); }
.chapter-tag { font-size: 20px; line-height: 26px; }
.main .chapter-h, .chapter-h { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; font-weight: 600; margin: 0 0 var(--space-1); }
.main h3 { font-size: 19px; line-height: 28px; font-weight: 600; margin-top: var(--space-2); }

/* ---------- Margin pieces ---------- */
/* A sticky note, taped on. */
.postit { position: relative; display: grid; gap: var(--space-2); width: min(100%, 320px); padding: var(--space-6) var(--space-6) var(--space-4); background: color-mix(in srgb, var(--sun) 30%, var(--paper-raised)); box-shadow: var(--lift); transform: rotate(-1.5deg); font-size: 16px; line-height: 25px; color: var(--ink); }
.postit.tone-water { background: color-mix(in srgb, var(--water) 16%, var(--paper-raised)); transform: rotate(1.2deg); }
.postit.tone-leaf { background: color-mix(in srgb, var(--leaf) 16%, var(--paper-raised)); transform: rotate(1deg); }
.postit::before, .snap::before { content: ""; position: absolute; top: -11px; left: 50%; width: 88px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: var(--tape); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.postit-h { font-family: var(--font-hand); font-size: 18px; line-height: 26px; font-weight: 500; color: var(--ink); }
.facts { list-style: none; display: grid; gap: var(--space-2); padding: 0; }
.facts li { padding-inline-start: var(--space-5, 20px); position: relative; }
.facts li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 11px; width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--sun); }
.postit .facts li::before { background: var(--ink); width: 5px; height: 5px; top: 10px; }
/* A photo taped into the notebook, with a handwritten caption. */
.snap { position: relative; margin: 0; width: min(100%, 340px); padding: 10px 10px 12px; background: var(--paper-raised); box-shadow: var(--lift); transform: rotate(1.6deg); }
.margin > .snap:nth-child(even) { transform: rotate(-1.4deg); }
.snap img { width: 100%; object-fit: cover; }
.snap figcaption { font-family: var(--font-hand); font-size: 15px; line-height: 22px; color: var(--ink-muted); text-align: center; margin-top: var(--space-2); }
/* A handwritten line with the arrow leaving the end of the text above, going down, then left to the note. */
.ng-note { display: inline-flex; align-items: flex-start; gap: var(--space-2); margin: 0; font-family: var(--font-hand); font-size: 16px; line-height: 24px; font-weight: 400; color: var(--water); max-width: 34ch; }
.ng-note-arrow { width: 44px; height: 34px; flex: none; color: var(--ink-muted); margin-top: -18px; }
.margin > .hand { max-width: 28ch; text-align: center; font-size: 17px; line-height: 26px; transform: rotate(-2deg); }
blockquote.pull { margin: 0; max-width: 30ch; font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 460; color: var(--ink); position: relative; padding-top: var(--space-6); }
blockquote.pull::before { content: "”"; position: absolute; top: -18px; inset-inline-start: -4px; font-family: var(--font-display); font-size: 72px; line-height: 1; color: var(--sun); }
blockquote.pull footer { margin-top: var(--space-2); font-family: var(--font-body); font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* A pen doodle in the margin, drawn as it scrolls into view. */
.doodle-fig { margin: 0; display: grid; justify-items: center; gap: var(--space-2); }
.doodle { width: min(300px, 80vw); height: auto; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dd-scribble { stroke: var(--water); stroke-width: 2.2; }
.dd-line { stroke: var(--leaf); stroke-width: 2.6; }
.dd-target { stroke: var(--ink); stroke-width: 1.8; }
.doodle-fig figcaption { max-width: 28ch; text-align: center; font-size: 17px; line-height: 26px; transform: rotate(-2deg); }

/* A checklist in the notebook: drawn boxes, ticked in leaf green. */
.checks { list-style: none; display: grid; gap: var(--space-3); padding: 0; }
.checks li { position: relative; padding-inline-start: 38px; }
.checks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 4px; width: 20px; height: 20px; border: 1.75px solid var(--ink); border-radius: 3px 6px 4px 5px; transform: rotate(-3deg); }
.checks li::after { content: ""; position: absolute; inset-inline-start: 9px; top: 1px; width: 8px; height: 16px; border: solid var(--leaf); border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(40deg) scale(var(--chk, 1)); transform-origin: 50% 80%; }

/* ---------- Tabs: pages of the notebook, with a colored index tab ---------- */
.tabs { display: grid; gap: var(--space-3); }
.tabs-sec { padding-block: var(--space-12); }
.tabs-sec .tabs { margin-top: var(--space-6); }
.tab { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; gap: var(--space-2); padding: var(--space-5, 20px) var(--space-6); background: var(--paper-raised); border: 1px solid var(--line); border-radius: 4px 18px 18px 4px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease-out; }
.tab-ear, .tab-body { grid-column: 1; }
.tab-side { grid-column: 2; grid-row: 1 / span 2; justify-self: center; }
.tab-ill { width: 92px; height: 92px; object-fit: contain; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.tab-dl { display: grid; justify-items: center; gap: 2px; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--tone); }
.tab-dl .ng-icon { width: 44px; height: 44px; padding: 10px; border-radius: var(--radius-full); background: var(--tone-wash); color: var(--ink); }
@media (min-width: 760px) {
  .tab { grid-template-columns: 200px minmax(0, 1fr) 132px; padding-block: var(--space-3); padding-inline-start: 0; }
  .tab-ear { grid-column: 1; }
  .tab-body { grid-column: 2; }
  .tab-side { grid-column: 3; grid-row: 1; }
  .tab-ill { width: 132px; height: 132px; margin-block: -12px; }
}
.tab-ear { justify-self: start; display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 30px; line-height: 1; font-weight: 600; color: var(--ink); padding: 14px 22px; border-radius: 0 14px 14px 0; background: var(--tone-wash); margin-inline-start: -1px; transition: padding .25s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 759px) { .tab-ear { border-radius: 14px; font-size: 26px; } }
.tab-body { font-size: 17px; line-height: 28px; color: var(--ink); display: grid; gap: 2px; }
.tab-meta { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--tone); }
.tab-title { font-weight: 600; }
.tab-small { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.tab:hover { transform: translateX(-6px); box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 10%, transparent); }
.tab:hover .tab-ear { padding-inline-end: 34px; }
.tab:hover .tab-ill { transform: translateY(-6px) rotate(-3deg) scale(1.06); }

/* ---------- Icons, ring, frame ---------- */
.ng-icon { flex: none; display: block; }
.ng-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ng-ring circle { fill: none; stroke: var(--ink); }
.ng-ring-out { stroke-width: var(--stroke-ring); }
.ng-ring-in { stroke-width: var(--stroke-ink); opacity: .85; }
.ng-frame { margin: 0; display: grid; gap: var(--space-2); justify-items: center; }
.ng-frame-box { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.ng-frame-img { position: absolute; inset: 10%; width: 80%; height: 80%; border-radius: var(--radius-full); object-fit: cover; background: var(--leaf-wash); }
.ng-frame-cap { font-family: var(--font-hand); font-size: 16px; line-height: 24px; color: var(--ink-muted); text-align: center; }
.ng-cred { display: inline-flex; align-items: baseline; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-full); font-size: 14px; line-height: 20px; color: var(--ink-muted); background: var(--paper-raised); }
.ng-cred-label { font-weight: 500; }
.ng-cred-value { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.creds { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.ng-btn { display: inline-flex; align-items: center; gap: var(--space-2); font: inherit; font-size: 16px; line-height: 20px; font-weight: 600; min-height: 44px; padding: 0 var(--space-6); border-radius: var(--radius-full); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out; }
.ng-btn-lg { min-height: 52px; font-size: 18px; padding: 0 var(--space-8); }
.ng-btn-primary { background: var(--leaf); color: var(--on-leaf); }
.ng-btn-primary:hover { background: var(--ink); color: var(--paper); }
.ng-btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.ng-btn-secondary:hover { border-color: var(--ink); }
.ng-btn-quiet { background: transparent; color: var(--water); padding: 0 var(--space-1); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ng-btn-quiet:hover { text-decoration-thickness: 2px; }
.ng-btn-arrow { transition: transform .16s ease-out; }
.ng-btn:hover .ng-btn-arrow { transform: translateX(-3px); }
.ng-btn .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- FAQ ---------- */
.faq { border-top: 1.5px solid var(--ink); }
.ng-faq { border-bottom: 1px solid var(--line); }
.ng-faq-q { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 560; color: var(--ink); }
.ng-faq-q::-webkit-details-marker { display: none; }
.ng-faq-sign { color: var(--leaf); flex: none; }
.ng-faq-minus { display: none; }
.ng-faq[open] .ng-faq-plus { display: none; }
.ng-faq[open] .ng-faq-minus { display: block; }
.ng-faq-a { padding: 0 0 var(--space-5, 20px); max-width: 64ch; }

/* ---------- Friends and Dragons: the dark board and the d20 ---------- */
.dragons { padding-block: var(--space-12); background: var(--root); color: var(--on-root); }
.dragons h2 { color: var(--on-root); }
.dragons-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .dragons-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.die-wrap { display: grid; justify-items: center; gap: var(--space-3); }
.die { width: 180px; height: 180px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.die svg { width: 100%; height: 100%; overflow: visible; }
.die-face { fill: var(--sun); stroke: var(--on-root); stroke-width: 2; stroke-linejoin: round; }
.die-mid { fill: color-mix(in srgb, var(--sun) 70%, #fff); stroke: var(--root); stroke-width: 1.6; stroke-linejoin: round; }
.die-edge { fill: none; stroke: var(--root); stroke-width: 1.4; stroke-linecap: round; opacity: .7; }
.die-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; fill: var(--root); }
.die-note { color: var(--leaf-on-root); font-size: 18px; line-height: 27px; max-width: 32ch; min-height: 81px; text-align: center; }
.die-more { color: var(--on-root-muted); font-size: 16px; line-height: 24px; margin-top: calc(-1 * var(--space-2)); }
.die-more[hidden] { display: block; visibility: hidden; }
@media (min-width: 980px) { .ph-dark .die { width: 240px; height: 240px; } }

/* ---------- The book: a real book, spine on the right as in every Hebrew book ---------- */
.book-sec { padding-block: var(--space-12); background: var(--sun-wash); overflow: hidden; }
.book { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .book { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-12); } }
.book-text { display: grid; gap: var(--space-4); }
.monster { justify-self: center; position: relative; width: min(330px, 72vw); transform-origin: 50% 90%; transform: rotate(2deg); }
.ph-art .monster { width: min(250px, 56vw); }
.book-cover { display: block; width: 100%; height: auto; border-radius: 10px 3px 3px 10px; box-shadow: 0 2px 4px color-mix(in srgb, var(--ink) 12%, transparent), 0 22px 44px -12px color-mix(in srgb, var(--ink) 38%, transparent); }
.monster::after { content: ""; position: absolute; inset-block: 0; right: 0; width: 16px; border-radius: 0 3px 3px 0; pointer-events: none;
  background: linear-gradient(to left, color-mix(in srgb, #000 16%, transparent), transparent 40%, color-mix(in srgb, #fff 22%, transparent) 55%, transparent); }
.monster:hover { animation: wiggle .6s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(2deg); } 25% { transform: rotate(-1deg); } 75% { transform: rotate(3.5deg); } }

/* ---------- The CV on ruled paper: every line of text sits on a notebook line ---------- */
.cv { padding-block: calc(72px + 9px) calc(72px - 9px); }
.cv * { line-height: 36px; }
.cv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-6); }
.cv-head h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 36px); font-weight: 600; }
.cv-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px var(--space-12); margin-top: 36px; }
@media (min-width: 980px) { .cv-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cv h3 { font-family: var(--font-hand); font-size: 19px; font-weight: 500; color: var(--leaf); }
.cv ul { list-style: none; display: grid; }
.cv li { position: relative; padding-inline-start: 18px; font-size: 16px; }
.cv li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }

/* ---------- Closing contact line (ends every page) ---------- */
.closing { display: grid; gap: var(--space-4); padding-block: var(--space-8); border-top: 1.5px solid var(--ink); }
@media (min-width: 980px) { .closing { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-16); align-items: center; padding-block: var(--space-10, 40px); } }
.closing h2 { font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 560; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.ng-field { display: grid; gap: var(--space-2); }
.ng-label { font-size: 15px; line-height: 20px; font-weight: 600; }
.ng-req { font-weight: 400; color: var(--ink-muted); }
.ng-input { font: inherit; font-size: 17px; line-height: 26px; color: var(--ink); background: var(--paper-raised); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); min-height: 44px; width: 100%; }
.ng-input[dir="ltr"] { text-align: right; }
.ng-input:focus-visible { border-color: var(--water); }
textarea.ng-input { resize: vertical; min-height: 130px; }
.ng-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.ng-error { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--alert); }
.ng-field-error .ng-input { border-color: var(--alert); }
.form-status { font-weight: 600; }
.form-status[data-state="ok"] { color: var(--leaf); }
.form-status[data-state="error"] { color: var(--alert); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.form-2 { display: grid; gap: var(--space-4); }
@media (min-width: 600px) { .form-2 { grid-template-columns: 1fr 1fr; } }
/* The form sits on a sheet torn from the notebook. */
.sheet { position: relative; padding: var(--space-8) var(--space-6) var(--space-6); background: var(--paper-raised); box-shadow: var(--lift); border-radius: 2px; }
@media (min-width: 720px) { .sheet { padding: var(--space-8) var(--space-10, 40px); } }

/* ---------- Contact list ---------- */
.contact-list { list-style: none; display: grid; width: min(100%, 380px); border-top: 1.5px solid var(--ink); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a, .contact-list .static { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--space-3); align-items: center; padding: var(--space-3) 0; color: var(--ink); text-decoration: none; }
.contact-list .ng-icon { grid-row: span 2; color: var(--leaf); }
.contact-list .cl-label { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.contact-list .cl-value { font-weight: 600; justify-self: start; }
.contact-list a:hover .cl-value { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--root); color: var(--on-root-muted); padding-block: var(--space-12) var(--space-8); font-size: 15px; line-height: 24px; }
.site-footer a { color: var(--on-root); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand { display: flex; gap: var(--space-3); align-items: center; }
.footer-brand img { width: 56px; height: 56px; border-radius: var(--radius-full); background: #f7f8f3; padding: 3px; }
.footer-name { font-family: var(--font-display); font-size: 26px; line-height: 28px; font-weight: 560; color: var(--on-root); }
.footer-title { font-family: var(--font-display); font-size: 16px; color: var(--leaf-on-root); }
.footer-h { font-size: 14px; font-weight: 600; color: var(--on-root); margin-bottom: var(--space-2); }
.footer-list { list-style: none; display: grid; gap: var(--space-1); }
.footer-base { margin-top: var(--space-8); padding-top: var(--space-4); border-top: 1px solid var(--on-root-muted); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-size: 14px; }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 719px) {
  .action-bar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); position: fixed; inset-inline: 0; bottom: 0; z-index: 30; padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
  .action-bar .ng-btn { justify-content: center; padding: 0 var(--space-3); }
  body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .monster:hover { animation: none; }
}
