/* off the record: design direction 4, "misprint lines, bloom colors" */

/* Fonts are self-hosted in /fonts (SIL Open Font License), so visitors'
   phones make no requests to Google or any other outside server. */

@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/assistant-hebrew-wght-normal.woff2) format('woff2');
  unicode-range: U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/assistant-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/assistant-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* Stand-in for the festival's title lettering (heavy, wide). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: block;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2');
}

:root {
  --ink: #1B3A2B;          /* deep festival green: text and ruled lines */
  --green: #155238;        /* emerald festival green */
  --green-2: #2A7A52;      /* lighter green mixed into the grain */
  --pink: #DB2A78;         /* magenta: live dot, leading theme */
  --pink-2: #E5559A;       /* lighter magenta mixed into the grain */
  /* (the grain colours are read by visual.js, board.js and ask.js too) */
  --prompt: #5f6b64;       /* the grey of "ask anything…" before you type */
  --pink-text: #B81A63;    /* deeper magenta wherever there is text on/in pink */
  --pink-soft: #FBEAF2;    /* a pale wash of magenta, behind pink text */
  --muted: #3d4a43;
  --fine: #4d5a52;
  --hair: #d3d8d5;         /* fine dividers inside a section */
  --band: #F1F0EF;
  --bg: #FFFFFF;
  --bg-fade: rgba(255, 255, 255, .97);   /* the page, for the fade behind the "ask anything…" bar */
  --card: #E8EFEA;         /* question cards: a pale wash of festival green on the white page */
  --gutter: 24px;
  --nav-h: 44px;           /* the about · schedule · … bar fixed at the top */
  /* One scale for every heading on the page (bigger on a computer, below):
     --h1 sections: about, schedule, ask anything, "20 questions so far",
          people, privacy (large and light)
     --h2 a picked theme's name, heading its questions
     --h3 items inside a section: a person's name, a session's title
     labels (12px pink capitals, spaced): a role, a day, "before you ask" */
  --h1: 30px;
  --h2: 22px;
  --h3: 18px;
  --body: 'Assistant', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Archivo', 'Arial Black', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Anything scrolled into view lands below the bar at the top, not under it */
html { scroll-padding-top: var(--nav-h); }
/* While the sheet is open, the page behind it stays still */
html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--ink); }
a:hover { color: var(--pink-text); }

:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

.page {
  max-width: 720px;
  margin: 0 auto;
  /* room for the "ask anything…" bar at the bottom of the screen */
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* ---------- the bar at the top: about · schedule · people · privacy ---------- */

/* It slides down once the "+" rows have scrolled away (content.js) */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
  transform: translateY(-100%); transition: transform .25s ease;
}
.topnav.is-shown { transform: none; }
.topnav-in {
  max-width: 720px; margin: 0 auto; height: var(--nav-h); padding: 0 var(--gutter);
  display: flex; justify-content: center; align-items: center; gap: 26px;
}

/* ---------- header and title ---------- */

.top {
  padding: 12px var(--gutter) 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logos { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo-link { display: inline-flex; min-height: 44px; align-items: center; }
.logo { display: block; width: auto; }
/* The Institute's logo is drawn in fine lines, so it sits a little taller
   than the festival's bold one. (Larger, with thickened lines, was tried on
   20 Nov and reverted on 21 Nov: too big and too heavy.) */
.logo-ci { height: 42px; }
.logo-jidw { height: 28px; }

/* On a phone the lettering is a little smaller, so the question box fits on
   the first screen */
.title { position: relative; margin: 12px auto 0; width: 100%; max-width: 268px; font-size: inherit; font-weight: inherit; }
.title-frames { position: relative; display: block; }
.title-img { display: block; width: 100%; height: auto; }
/* The lettering is animated dot by dot on a canvas laid over the picture */
.title-canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
.title-img.under-canvas { opacity: 0; }
.live {
  position: absolute; top: -8px; right: -6px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--ink);
}
/* The "live" light: a slow fade in and out, like an on-air sign */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: on-air 2.4s ease-in-out infinite; }
@keyframes on-air { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.subtitle { margin: 0; font-size: 18px; line-height: 1.28; text-align: center; }

/* Under the subtitle, under a ruled line, as in v1: who made it (pink) and
   where (green). On phones they stack, both to the left; on wider screens
   they sit side by side, the festival's to the right. Regular weight, so
   the lines read easily. */
.credits {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  border-top: 1px solid var(--ink); padding-top: 14px; margin-top: 6px;
}
.credits p { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 400; }
.credits .credit-sarah { color: var(--pink-text); text-align: left; }
.credits .credit-festival { color: var(--green); text-align: left; }
.credits cite { font-style: italic; }

/* The links in the bar at the top */
.info-link {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 40px;
  display: inline-flex; align-items: center; font-size: 15px; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.info-link:hover { color: var(--pink-text); }
.info-link:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* ---------- the "+" rows ---------- */
/* about · schedule · people · privacy under the credits, and the two notes
   under "before you ask": a heading with a pink + that turns into × when
   open. No ruled lines between them, just a little air. */

.folds { display: flex; flex-direction: column; }
.fold-h { margin: 0; font: inherit; }
.fold-toggle {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 46px;
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 0;
  font-size: var(--h1); font-weight: 200; line-height: 1.15; color: var(--ink);
}
/* (the + sits just after the words, not out at the far edge) */
@media (hover: hover) { .fold-toggle:hover { color: var(--pink-text); } }
.fold-toggle:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }
.fold-plus { color: var(--pink-text); font-size: .85em; font-weight: 200; line-height: 1; transition: transform .2s; }
/* a little more air above each section after the first */
.info .fold + .fold, .info-more .fold + .fold { margin-top: 10px; }
.fold-toggle[aria-expanded="true"] .fold-plus { transform: rotate(45deg); }
.fold-body { padding: 0 0 16px; animation: rise .25s ease-out both; }
.fold-body > p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.info { padding: 18px var(--gutter) 0; }
/* people · privacy, at the bottom, after the questions */
.info-more { padding-top: 32px; padding-bottom: 6px; }

/* about: closed, its opening shows (content.js) then a pink "read more…";
   a tap anywhere on it opens the rest, and closes it again. */
.fold-peek .fold-body { animation: none; }
.fold-tap .fold-body { cursor: pointer; }   /* about, schedule: a tap anywhere opens or closes */
.fold-peek:not(.is-open) .about-text,
.fold-peek.is-open .about-lead { display: none; }
.about-lead { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
/* on the same line, after a little more space than between sentences */
.read-more {
  all: unset; cursor: pointer; white-space: nowrap; margin-left: .7em;
  color: var(--pink-text); font-weight: 400;
}
@media (hover: hover) { .read-more:hover { text-decoration: underline; text-underline-offset: 3px; } }
.read-more:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* people: a heading that's always open, then everyone, each opening on
   their own (content.js). Closed, a person shows their name and +, role,
   and the first line of their bio fading out on the second. */
.people-h { font-size: var(--h1); font-weight: 200; line-height: 1.15; padding: 6px 0 12px; }
.person.has-more { cursor: pointer; }
.person-toggle {
  all: unset; box-sizing: border-box; cursor: pointer; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
}
.person-toggle:disabled { cursor: default; }
.person-toggle:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }
.person-toggle .fold-plus { font-size: 20px; }
.person:not(.has-more) .fold-plus { display: none; }
.person-toggle[aria-expanded="true"] .fold-plus { transform: rotate(45deg); }
@media (hover: hover) { .person.has-more:hover .person-name { color: var(--pink-text); } }
.person:not(.is-open) .person-bio ~ .person-bio { display: none; }
.person:not(.is-open) .person-bio {
  max-height: 3em; overflow: hidden;   /* two lines (line-height 1.5) */
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent);
}
/* (a bio that fits in the two lines doesn't fade) */
.person:not(.has-more) .person-bio { -webkit-mask-image: none; mask-image: none; }

/* ---------- ask ---------- */

/* The ask section sits straight on the white page */
.band { background: none; }

.ask {
  padding: 12px var(--gutter) 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* One pale panel: the "ask anything" heading, then quieter text under it
   (the intro, and "before you ask" with Sarah's two notes, closed to start
   with), then the box */
.ask-panel { background: var(--band); border-radius: 3px; padding: 18px 16px 16px; }
.ask-h { margin: 0; font-size: var(--h1); font-weight: 200; line-height: 1.15; color: var(--ink); }
.intro { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--fine); }
.before { margin: 14px 0 12px; }
.before-h {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--pink-text);
}
/* small rows, in proportion with the label */
.folds-ask .fold-toggle { min-height: 36px; padding: 2px 0; gap: 8px; font-size: 14px; font-weight: 400; }
.folds-ask .fold-plus { font-size: 17px; }
.folds-ask .fold-body { padding: 0 0 8px; }
.folds-ask .fold-body > p { font-size: 14px; line-height: 1.5; }

/* The box: a white page with a ruled edge. While you're writing in it, a
   pink line sits slightly off, like a misprint. */
.composer { display: flex; flex-direction: column; gap: 6px; }
.c-field {
  --pad-y: 14px; --pad-x: 16px;   /* also places the typed prompt (below) */
  position: relative;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: var(--pad-y) var(--pad-x) 10px;
  transition: box-shadow .2s;
  cursor: text;   /* a tap anywhere on the box starts writing (ask.js) */
}
.c-field:focus-within { box-shadow: 4px 4px 0 var(--pink); }

textarea {
  display: block;
  width: 100%;
  min-height: calc(1.4em * 3);
  resize: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-family: inherit;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.4;
  background: transparent;
  color: var(--ink);
}
textarea::placeholder { color: var(--prompt); }
textarea:focus { outline: none; }

/* The question box and its typed prompt ("write your question here…")
   share one font: large and light. The box starts one line tall, sitting
   right on the fine line under it, as if writing on a line, and grows as
   you type. */
.c-box, .c-prompt { font-size: 24px; font-weight: 200; line-height: 1.3; }
.c-box { min-height: 1.3em; }

/* The typed prompt sits exactly where the words will go, with a thin pink
   cursor blinking after it. Hidden once there's text in the box; tapping
   into the box (the phone's cursor jumps to the start) fades it away, and it
   fades back if the box is left empty. */
.c-prompt {
  position: absolute; top: var(--pad-y); left: var(--pad-x); right: var(--pad-x); margin: 0;
  pointer-events: none; color: var(--prompt); transition: opacity .3s ease;
}
.c-box:not(:placeholder-shown) + .c-prompt { display: none; }
.c-field:focus-within .c-prompt { opacity: 0; }
.c-caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  vertical-align: -0.16em; background: var(--pink); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* A fine line under where you write, like a line on paper; "Please write
   in English." (and the characters left) just under it */
.c-under {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--hair);
}
/* "ask someone specific" on the left, send on the right */
.c-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.c-foot .send { margin-left: auto; }
/* (with no names to offer, ask.js moves "Please write in English." here) */
.c-foot .hint { flex: 1; min-width: 0; }

/* An open invitation in plain words with a pink + after them (no pill).
   Once a name is picked it shows just that name, pink and bold. */
.c-for-toggle {
  all: unset; box-sizing: border-box; cursor: pointer; min-width: 0;
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden;
}
.c-for-text { overflow: hidden; text-overflow: ellipsis; }
.c-for-plus { order: 2; color: var(--pink-text); font-size: 20px; line-height: 1; }   /* no animation, on purpose */
.c-for-toggle[aria-expanded="true"] .c-for-plus { transform: rotate(45deg); }
@media (hover: hover) { .c-for-toggle:hover { color: var(--pink-text); } }
.c-for-toggle.has-pick { color: var(--pink-text); font-weight: 600; }
.c-for-toggle.has-pick .c-for-plus { display: none; }
.c-for-toggle:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }
.hint { margin: 0; font-size: 13px; line-height: 1.4; color: var(--fine); }
.count { flex: none; font-size: 13px; color: var(--fine); font-variant-numeric: tabular-nums; }
.count.near { color: var(--pink-text); font-weight: 600; }

/* send: a filled pill, in the same shape as the names beside it but taller,
   so it reads as the main thing to tap */
.send {
  flex: none;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--pink-text);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
/* Quieter until there's something to send */
.composer:not(.has-text) .send { opacity: .55; }
.send:active { transform: scale(.94); }
.send:disabled { opacity: .6; cursor: progress; }

.error { margin: 0; font-size: 15px; font-weight: 600; color: var(--pink-text); }
.error:empty { display: none; }

/* The names, once opened: quiet words in a row, like the theme names. The
   picked one turns pink and bold. */
.c-for { margin-top: 2px; }   /* opens and closes at once: no animation */
.addressees { display: flex; flex-wrap: wrap; gap: 0 18px; }
.chip {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 30px;
  display: inline-flex; align-items: center;
  font-size: 14px; color: var(--ink); white-space: nowrap;   /* the size of "most asked" */
}
@media (hover: hover) { .chip:hover { color: var(--pink-text); } }
.chip[aria-pressed="true"] { color: var(--pink-text); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* "Thank you." after sending: a pink dot that blooms, and a short line */
.c-sent { display: flex; gap: 10px; align-items: baseline; padding: 6px 0 2px; animation: rise .45s ease-out both; }
.c-sent:focus { outline: none; }
.c-sent p { margin: 0; font-size: 17px; line-height: 1.45; }
.c-sent b { font-weight: 600; color: var(--pink-text); }
.c-sent-dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pink);
  transform: translateY(-1px); animation: bloom .7s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bloom {
  0% { transform: scale(0); }
  55% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

/* The words of a sent question, drifting off as grain (drawn by ask.js) */
.dissolve { position: fixed; pointer-events: none; z-index: 60; }

.text-link {
  all: unset;
  box-sizing: border-box;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--pink-text); }
.text-link:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* The ask sheet is as tall as the box in it (on a phone, no empty white
   under it); it grows upwards when the names open. A keyboard still
   shrinks it, through the sheet's max-height. */
.ask-sheet { --sheet-h: auto; }
@media (min-width: 720px) {
  .ask-sheet { --sheet-h: min(520px, 80vh); }
}

/* ---------- inside the about · schedule · people · privacy rows ---------- */

/* about */
.about-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.about-text:empty { display: none; }

/* schedule */
.schedule { list-style: none; margin: 0; padding: 0; }
.sch-row {
  border-top: 1px solid var(--hair); padding: 12px 0;
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px;
}
.sch-row:first-child { border-top: 0; padding-top: 0; }
.sch-row:last-child { padding-bottom: 0; }
.sch-when { display: flex; flex-direction: column; line-height: 1.15; }
.sch-day { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--pink-text); }
.sch-date { font-size: 26px; font-weight: 200; }
.sch-time { font-size: 14px; font-weight: 400; margin-top: 4px; }
.sch-what { display: flex; flex-direction: column; gap: 4px; }
.sch-title { font-size: var(--h3); font-weight: 400; }
.sch-line { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }

/* people */
.people-list { list-style: none; margin: 0; padding: 0; }
.person { border-top: 1px solid var(--hair); padding: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.person:first-child { border-top: 0; padding-top: 0; }
.person-name { font-size: var(--h3); font-weight: 400; }
.person-role { font-size: 12px; font-weight: 600; color: var(--pink-text); text-transform: uppercase; letter-spacing: 1px; line-height: 1.4; }
.person-bio { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

/* privacy */
.privacy-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* ---------- the board ---------- */

.board { padding: 28px var(--gutter) 6px; display: flex; flex-direction: column; gap: 12px; }
/* "20 questions so far" heads the questions, centered like the title. One
   size, large and light; the number stands out by its pink alone. */
.board-count {
  margin: 0; display: flex; justify-content: center; align-items: baseline; gap: .28em;
  font-size: var(--h1); font-weight: 200; line-height: 1.15;
}
.bc-n { display: inline-block; color: var(--pink-text); font-weight: 300; font-variant-numeric: tabular-nums; }
.bc-n.tick { animation: tick .5s ease-out; }

.board-grid { display: flex; flex-direction: column; gap: 14px; }
.visual-col, .list-col { min-width: 0; }
/* (no scroll anchoring: when a theme is picked and the list changes beside
   the picture, the page stays exactly where it is) */
.list-col { display: flex; flex-direction: column; overflow-anchor: none; }

/* The themes: clouds floating together, sized by how much they are asked */
.visual { position: relative; width: 100%; margin: 6px 0 4px; }
.visual canvas { display: block; cursor: pointer; }
.visual-labels { position: absolute; inset: 0; pointer-events: none; }

.theme-pill {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  /* no bubble: the dotted white patch behind the name is drawn in the picture */
  background: none; color: var(--muted); border: 0; border-radius: 0;
  padding: .2em .4em; font-family: inherit; font-weight: 400; line-height: 1.15;
  cursor: pointer; min-height: 30px;
  /* long names ("silence, censorship, freedom, and fear") wrap onto two or
     three short centred lines, so they fit on their cloud */
  white-space: normal; width: max-content; max-width: 9em; text-align: center; overflow-wrap: anywhere;
  display: flex; flex-direction: column; align-items: center; justify-content: center;   /* centred both ways in its white patch */
  transition: opacity .3s; z-index: 2;
}
/* A bigger invisible tap area around small pills */
.theme-pill::after { content: ''; position: absolute; inset: -8px -4px; }
/* the picked theme: its name a little stronger (no underline); the other
   clouds fade, so the picked one stands out */
.theme-pill[aria-pressed="true"] .pill-name { font-weight: 600; color: var(--ink); }
.theme-pill:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* Themes that don't fit in the picture on a phone, as names */
.theme-more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; margin-top: -4px; }
.theme-more-h { font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--pink-text); }
.theme-more-btn {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 40px;
  display: inline-flex; align-items: center; font-size: 15px;
  text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 4px;
}
.theme-more-btn:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

/* "Tap a theme to see its questions.": up top, right under "20 questions so
   far", in pink, so guests know the picture is there to be tapped */
.visual-hint { margin: -2px 0 4px; font-size: 17px; font-weight: 400; color: var(--pink-text); text-align: center; }

/* Before there are themes: words from the questions */
.cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 6px 0 14px; line-height: 1.15; }
.cloud-word { color: var(--green); font-weight: 300; }
.cloud-word.top { color: var(--pink-text); font-weight: 400; }

/* "newest · most asked", or a picked theme in their place: it stays at the
   top of the screen while you scroll through the questions */
.list-bar {
  position: sticky; top: var(--nav-h); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.sort { display: flex; gap: 18px; }
.sort-btn {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 46px; font-size: 14px;
  display: inline-flex; align-items: center; border-bottom: 2px solid transparent;
}
.sort-btn[aria-pressed="true"] { font-weight: 600; border-bottom-color: var(--pink); }
.sort-btn:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }
/* The picked theme, like a chosen tab: its name in bold, underlined in
   pink | its tagline; ↑ on the right goes back to everything */
.bar-theme { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.bt-words { margin: 0; min-width: 0; padding: 13px 0 12px; font-size: 14px; line-height: 1.4; }
.bt-name {
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 7px;
}
.bt-tagline { font-weight: 300; color: var(--muted); }
.bt-up {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none; margin-left: auto; margin-right: -8px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.bt-up svg { width: 20px; height: 20px; fill: none; stroke: var(--pink-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .bt-up:hover { background: var(--pink-soft); } }
.bt-up:focus-visible { outline: 2px solid var(--pink-text); outline-offset: -2px; }


/* New questions wait here, so the list doesn't move while you read */
.new-pill {
  all: unset; box-sizing: border-box; cursor: pointer; align-self: center;
  margin: 12px 0 0; min-height: 36px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  animation: rise .3s ease-out both;
}
.new-pill:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; }

.board-empty { margin: 0; padding: 18px 0; font-size: 18px; color: var(--muted); }

/* The questions: no boxes, just the words on the white page, one after
   another, with air between them. Each question is in green, in pink
   brackets (like "[Israeli]" in the subtitle), with the triangle to echo
   it underneath. (No day or time: guests don't see when it was asked.) */
.questions { list-style: none; margin: 0; padding: 6px 0 0; display: flex; flex-direction: column; }
.q { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 0 8px; position: relative; background: var(--bg); }
/* A question moving up after a tap glides over the ones it passes */
.q.is-rising { z-index: 2; }
.q-head { display: flex; align-items: baseline; gap: 12px; width: 100%; }
/* Under the words: the triangle, and who the question is for, in small
   green bold ("for: Machol Shalem") */
.q-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 18px; }
.q-for { font-size: 13px; font-weight: 600; color: var(--green); }
.q-text { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.4; color: var(--green); overflow-wrap: anywhere; white-space: pre-line; }
.q-text::before, .q-text::after { color: var(--pink); font-weight: 600; font-size: 1.2em; line-height: 0; }
.q-text::before { content: '['; margin-right: 3px; }
.q-text::after { content: ']'; margin-left: 3px; }

/* The triangle: echo the question ("I want to ask this too"), with how many
   are asking beside it. An outline until tapped; then solid magenta, and the
   number goes up. Tapping again takes it back. */
.echo {
  all: unset; box-sizing: border-box; position: relative; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px 0 4px; margin-left: 4px;
  color: var(--green); transition: color .15s;
}
.echo-icon svg {
  display: block; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round;
  transition: fill .15s;
}
.echo-n { font-size: 15px; font-variant-numeric: tabular-nums; min-width: 1.5ch; }
.echo:hover { color: var(--pink-text); }
.echo[aria-pressed="true"] { color: var(--pink-text); font-weight: 600; }
.echo[aria-pressed="true"] .echo-icon svg { fill: var(--pink); stroke: var(--pink); }
.echo:disabled { opacity: .8; }
.echo:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 2px; border-radius: 4px; }
.echo.bump .echo-icon { animation: lift .4s ease-out; }
.echo.bump .echo-n { animation: tick .4s ease-out; }
@keyframes lift { 0% { transform: none; } 40% { transform: translateY(-5px) scale(1.15); } 100% { transform: none; } }
@keyframes tick { 0% { transform: translateY(5px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* "I want to ask this too": a quiet line of pink text beside the triangle,
   only just after a tap. It drifts in and fades away by itself (an error
   message stays a little longer). */
.tip {
  position: absolute; left: calc(100% + 2px); top: 50%; z-index: 3;
  font-size: 13px; font-weight: 400; color: var(--pink-text); white-space: nowrap;
  opacity: 0; transform: translateY(-50%); pointer-events: none;
}
.echo.show-tip .tip { animation: tip-fade 1.6s ease-out forwards; }
.echo.show-tip.tip-long .tip { animation-duration: 3.5s; }
@keyframes tip-fade {
  0% { opacity: 0; transform: translate(-4px, -50%); }
  15% { opacity: 1; transform: translate(0, -50%); }
  55% { opacity: 1; }
  100% { opacity: 0; transform: translate(0, -50%); }
}

/* ---------- "ask anything…" at the bottom of the screen ---------- */

.ask-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 18px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-fade) 62%, transparent);
  transform: translateY(110%); transition: transform .3s ease; pointer-events: none;
}
.ask-bar.is-shown { transform: none; pointer-events: auto; }
.ask-bar-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 560px; margin: 0 auto; min-height: 52px; padding: 0 6px 0 18px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--pink);
  font-size: 17px; color: var(--prompt);
}
.ask-bar-btn:focus-visible { outline: 2px solid var(--pink-text); outline-offset: 3px; }
.ask-bar-plus {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pink-text); color: #fff; font-size: 26px; font-weight: 300; line-height: 1;
}

/* ---------- the sheet: the same box, sliding up from the bottom ---------- */

.sheet {
  position: fixed; inset: auto 0 var(--kb, 0px) 0; margin: 0;
  width: 100%; max-width: 100%;
  max-height: min(92vh, var(--vh, 100vh));
  border: 0; padding: 0; background: transparent; color: var(--ink);
  overflow: visible;
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet.is-open { transform: none; }
.sheet::backdrop { background: rgba(27, 58, 43, .38); }
.sheet-inner {
  max-width: 640px; margin: 0 auto; height: var(--sheet-h, auto); max-height: inherit; overflow-y: auto;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 6px;
}
.sheet-inner::before {
  content: ''; display: block; width: 38px; height: 4px; border-radius: 2px;
  background: var(--hair); margin: 0 auto 2px;
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
/* × in the top corner of every sheet */
.sheet-x {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none; margin-left: auto; margin-right: -8px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.sheet-x svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.sheet-x:hover svg { stroke: var(--pink-text); }
.sheet-x:focus-visible { outline: 2px solid var(--pink-text); outline-offset: -2px; }
.sheet-h { margin: 0; font-size: 22px; font-weight: 300; }
@media (prefers-reduced-motion: reduce) {
  .sheet, .ask-bar, .topnav { transition: none; }
  .live-dot, .c-caret, .c-sent, .c-sent-dot, .fold-body, .new-pill, .bc-n.tick, .echo.bump .echo-icon, .echo.bump .echo-n { animation: none; }
}

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
  :root { --gutter: 40px; --h1: 34px; --h2: 26px; }
  .top { padding: 22px var(--gutter) 10px; gap: 16px; }
  .logo-ci { height: 56px; }
  .logo-jidw { height: 36px; }
  .title { max-width: 460px; margin-top: 18px; }
  .subtitle { font-size: 22px; }
  .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credits .credit-festival { text-align: right; }
  .info { padding-top: 22px; }
  .ask { padding: 16px var(--gutter) 10px; }
  .folds-ask .fold-toggle { font-size: 15px; }
  .fold-body > p { font-size: 16px; }
  .intro, .folds-ask .fold-body > p { font-size: 15px; }
  .ask-panel { padding: 24px 24px 22px; }
  .board { padding: 40px var(--gutter) 10px; }
  .sheet { bottom: 24px; }
  .sheet-inner { border-radius: 16px; padding: 14px 26px 22px; }
}

/* Wide screens: the visual and the list side by side, wider than the text above */
@media (min-width: 1000px) {
  .board {
    width: min(1140px, calc(100vw - 48px));
    margin-left: calc(50% - min(1140px, calc(100vw - 48px)) / 2);
  }
  .board-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .visual-col { position: sticky; top: calc(var(--nav-h) + 20px); }
  .list-bar { margin: 0; padding: 0; }
}
