/* Bina · SHARE. Built from the SHARE design system, to the letter:
     tokens   tokens.css beside this file, byte-identical to the share-design-system skill's references/tokens.css
              ("per the official SHARE Brand Guide"); loaded first, never edited
     spec     readiverse-haven lightning-design-system/projects/share-fund/DESIGN.md and components/*.md
   Rules this file keeps (tests/py/beer/test_share_design_fidelity.py fails on drift):
     - no colour literal: every colour is a token (var(--...)), or color-mix() of two tokens for an alpha the spec
       names (the nav's black at 85%), or `transparent`
     - no font family but the token families (var(--font-serif) Cormorant, var(--font-sans) Inter); the brand names
       no Hebrew face (an open question for SHARE), so Hebrew falls back inside the serif stack
     - weights from the brand's set: Cormorant 300-700 (italic 400), Inter 300-800
   Accents per section (the brand's accent triple): SHARE teaching = dark gold (default), primary sources = blue
   (Chaya, depth and intellect), a course = teal (Neshama). Light gold is the highlight (moments, numbers). */

:root {
  --nav-h: 64px;
  --gutter: var(--section-padding-x);
  --nav-fill: color-mix(in srgb, var(--bg) 85%, transparent);         /* the brand's rgba(0,0,0,0.85) */
  --veil: color-mix(in srgb, var(--bg) 70%, transparent);
  --shadow: color-mix(in srgb, var(--bg) 60%, transparent);
  color-scheme: dark;
}

body { font-size: 15px; line-height: 1.7; color: var(--text-strong); min-height: 100vh; }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---- atmosphere: the brand's hero glow (radial accent-bg, 8s) and footer glow, kept under 15% ---- */
.atmos { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.atmos-glow { position: absolute; width: 600px; height: 600px; left: 50%; top: -260px; margin-left: -300px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-bg) 0%, transparent 70%); animation: heroGlow 8s ease-in-out infinite; }
.atmos-glow--2 { width: 800px; height: 400px; top: auto; bottom: -200px; margin-left: -400px; animation: none; opacity: .6;
  background: radial-gradient(ellipse, var(--accent-bg), transparent 70%); }
@keyframes heroGlow { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* ---- nav (components/nav.md) ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter); background: var(--nav-fill); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.nav-mark { width: 26px; height: 26px; display: none; }
.nav-word { height: 18px; width: auto; }
.nav-sep { width: 1px; height: 20px; background: var(--hairline-hover); }
.nav-name { font-family: var(--font-serif); font-weight: 500; font-size: 22px; letter-spacing: -.5px; color: var(--ink-bronze); }
.nav-tabs { margin-left: auto; display: flex; gap: 6px; }
.nav-tab, .nav-new { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px; border: 1px solid transparent; color: var(--text-soft); transition: color .3s var(--ease-soft); white-space: nowrap; }
.nav-tab:hover, .nav-new:hover { color: var(--text-strong); }
a.nav-tab { text-decoration: none; display: inline-flex; align-items: center; }
.nav-tab[aria-selected="true"] { color: var(--text-strong); border-color: var(--accent); background: var(--accent-bg); }
.nav-new { border-color: var(--hairline-hover); }
.nav-team { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--share-light-gold);
  border: 1px solid var(--share-light-gold-dim); border-radius: 20px; padding: 2px 10px; }

.app { position: relative; z-index: 1; padding-top: var(--nav-h); }
.view { min-height: calc(100vh - var(--nav-h)); }

/* ---- type roles (the brand's .t-overline / .t-body / .t-section-head live in tokens.css) ---- */
.overline { font-family: var(--font-sans); font-weight: 500; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
/* empty states (components/loading-and-empty.md): a Cormorant 300 bronze line over an Inter 800 cream word, app-scaled */
.display { text-align: center; margin: 18px 0 22px; line-height: .95; }
.display-serif { display: block; font-family: var(--font-serif); font-weight: 300; font-size: clamp(40px, 7vw, 88px); letter-spacing: -2px; color: var(--ink-bronze); }
.display-sans { display: block; font-family: var(--font-sans); font-weight: 800; font-size: clamp(44px, 8.5vw, 104px); letter-spacing: -3px; color: var(--ink-primary); }
.lede { font-family: var(--font-serif); font-weight: 400; font-size: clamp(20px, 3vw, 28px); line-height: 1.6; letter-spacing: -0.3px; color: var(--text-mid);
  max-width: var(--list-max); margin: 0 auto; text-align: center; }

/* ---- pills: the nav-link pattern for every button (Inter 600, 11px, 1.5px, 6px 14px, radius 20px) ---- */
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--hairline-hover); color: var(--text-mid);
  text-decoration: none; white-space: nowrap; transition: color .3s var(--ease-soft), border-color .3s var(--ease-soft), background .3s var(--ease-soft); }
.pill:hover { color: var(--text-strong); border-color: var(--accent-dim); }
.pill--primary { background: var(--accent-bg); border-color: var(--accent); color: var(--text-strong); }
.pill--fill { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.pill--fill:hover { color: var(--bg); border-color: var(--accent); filter: brightness(1.12); }
.pill svg { flex: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-mid);
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--hairline); background: var(--surface-1); transition: color .3s, border-color .3s; }
.chip:hover { color: var(--text-strong); border-color: var(--accent-dim); }
.chip[dir="rtl"] { text-transform: none; letter-spacing: 0; font-size: 13px; }
.linkish { color: var(--ink-bronze); text-decoration: underline; text-decoration-color: var(--ink-bronze-muted); text-underline-offset: 3px; }
.linkish:hover { color: var(--text-strong); }
/* Internal tag (components/source-card.md): a tiny uppercase pill with a circled i, text-soft, no hover */
.internal { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-soft); border: 1px solid var(--hairline-hover); border-radius: 10px; padding: 0 6px 0 3px; margin-left: 2px; }
.internal i { font-style: normal; width: 11px; height: 11px; border-radius: 50%; border: 1px solid currentColor; display: inline-grid; place-items: center;
  font-size: 8px; font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; }

/* ---- status line (components/chat.md): Inter 13px text-soft with a light band sweeping across ---- */
.status { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.status-text { background: linear-gradient(90deg, var(--text-soft) 0%, var(--share-light-tan) 45%, var(--text-soft) 90%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 2s var(--ease-soft) infinite; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--share-light-gold); box-shadow: 0 0 12px var(--share-light-gold-dim); animation: breathe 1.6s ease-in-out infinite; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ======================================== SEARCH ======================================== */
.view-search { padding: 0 var(--gutter) 120px; }
.s-hero { text-align: center; padding-top: clamp(48px, 11vh, 128px); }
.searchbar { position: relative; display: flex; align-items: center; gap: 10px; max-width: var(--prose-max); margin: 40px auto 20px; padding: 8px 8px 8px 50px;
  border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface-2); transition: border-color .4s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.searchbar:focus-within { border-color: var(--accent-dim); box-shadow: 0 0 12px var(--accent-dim); }
.searchbar-icon { position: absolute; left: 20px; color: var(--ink-bronze); }
.searchbar-input { flex: 1; min-width: 0; outline: 0; font-size: 16px; color: var(--text-strong); padding: 10px 0; }
.searchbar-input::placeholder { color: var(--text-soft); }
.searchbar .pill { padding: 10px 18px; }
.view-search.has-results .s-hero, .view-search.has-results #sChips { display: none; }
.view-search.has-results .searchbar { margin-top: 32px; max-width: var(--content-max); }
.s-status { margin: 28px 0 0; justify-content: center; }
.s-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; max-width: var(--content-max); margin: 40px auto 0; align-items: start; }
.s-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); margin-bottom: 28px; flex-wrap: wrap; }
.s-head h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.1; color: var(--ink-primary); }
.s-head h2 em { font-style: italic; font-weight: 400; color: var(--ink-bronze); }
.s-head p { font-size: 13px; color: var(--text-soft); }
.results { list-style: none; display: grid; gap: 24px; }
.s-aside { display: grid; gap: 24px; position: sticky; top: calc(var(--nav-h) + 24px); }

/* ---- a SHARE piece (components/source-card.md and search-results.md) ---- */
.piece { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--surface-1); overflow: hidden; transition: border-color .4s var(--ease-soft), background .4s var(--ease-soft); animation: rise .6s var(--ease-soft) both; }
.piece:hover { border-color: var(--hairline-hover); background: var(--surface-2); }
.piece.is-lit { border-color: var(--share-dark-gold); }
.piece--text, .piece--playing { grid-template-columns: minmax(0, 1fr); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.piece-media { position: relative; aspect-ratio: 16 / 9; align-self: start; background: var(--surface-2); overflow: hidden; margin: 28px 0 28px 28px; border-radius: 8px; }
.piece--playing .piece-media { margin: 0; border-radius: 0; }
.piece-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-soft); }
.piece:hover .piece-media img { transform: scale(1.03); }
.play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; }
.play-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--veil); color: var(--share-light-tan);
  border: 1px solid var(--hairline-hover); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .4s var(--ease-soft), border-color .3s; }
.play:hover .play-btn { transform: scale(1.08); border-color: var(--accent); }
.moment { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .5px; color: var(--share-light-gold); background: var(--nav-fill); border-radius: 10px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.piece-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }
.piece-body { padding: 28px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.piece-top { display: flex; align-items: center; gap: 10px; }
.piece-n, .cite { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 20px; font-family: var(--font-sans);
  font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; text-decoration: none;
  color: var(--share-light-gold); background: var(--share-dark-gold-bg); border: 1px solid var(--share-dark-gold-dim); }
.piece-kicker { font-size: 12px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(22px, 2.2vw, 26px); line-height: 1.12; letter-spacing: -.5px; color: var(--share-light-tan); }
.piece-who { font-size: 13px; color: var(--text-mid); }
.piece-who b { font-weight: 500; color: var(--text-strong); }
.piece-why { font-size: 15px; line-height: 1.7; color: var(--text-strong); }
.piece-words { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 19px; line-height: 1.6; color: var(--text-strong);
  border-left: 2px solid var(--accent-dim); padding-left: 16px; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.piece-words[dir="rtl"] { border-left: 0; border-right: 2px solid var(--accent-dim); padding: 0 16px 0 0; font-style: normal; }
.piece-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }

/* ---- panels (components/primary-sources.md, course-panel.md): Brand card with its own accent triple ---- */
.panel { border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-1); padding: 28px; position: relative; overflow: hidden; animation: rise .7s var(--ease-soft) both; }
.panel--primary { --accent: var(--share-blue); --accent-dim: var(--share-blue-dim); --accent-bg: var(--share-blue-bg); }
.panel--course { --accent: var(--share-teal); --accent-dim: var(--share-teal-dim); --accent-bg: var(--share-teal-bg); border-color: var(--accent-dim); }
.panel-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(24px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -.5px; color: var(--share-light-tan); margin: 10px 0 4px; }
.panel-sub { font-size: 13px; color: var(--text-soft); }
.steps { list-style: none; margin-top: 18px; display: grid; position: relative; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; position: relative; transition: background .3s; }
.step:hover { background: var(--accent-bg); }
.step + .step::before { content: ""; position: absolute; left: 21px; top: -10px; height: 20px; width: 1px; background: var(--accent-dim); }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); }
.step.is-first .step-n { color: var(--bg); background: var(--accent); }
.step-name { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--text-strong); }
.step-src { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.step-src button { color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--hairline-hover); text-underline-offset: 2px; text-align: left; }
.step-src button:hover { color: var(--text-strong); }
.tag { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--share-light-gold);
  border: 1px solid var(--share-light-gold-dim); border-radius: 10px; padding: 0 7px; margin-left: 6px; vertical-align: 2px; }
.prim { margin-top: 16px; padding: 18px 20px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface-1); display: grid; gap: 8px; transition: border-color .3s, background .3s; }
.prim:hover { border-color: var(--accent-dim); background: var(--surface-2); }
.prim.is-lit { border-color: var(--share-blue); }
.prim-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prim-genre { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.origin { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 0 8px; border-radius: 20px; border: 1px solid var(--hairline-hover); color: var(--text-soft); }
.origin--cited { background: var(--accent-bg); border-color: var(--accent); color: var(--text-strong); }
.prim-rel { font-size: 12px; color: var(--text-soft); font-style: italic; }
.prim-ref { font-family: var(--font-serif); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--share-light-tan); }
.prim-he { font-family: var(--font-serif); font-size: 18px; line-height: 1.6; color: var(--text-strong); direction: rtl; text-align: right;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prim-en { font-size: 15px; line-height: 1.7; color: var(--text-mid); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.prim a { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.prim a:hover { text-decoration: underline; }
.cite--primary { color: var(--share-blue); background: var(--share-blue-bg); border-color: var(--share-blue-dim); }
.cite:hover { background: var(--share-dark-gold-dim); }
.cite--primary:hover { background: var(--share-blue-dim); }
.answer .cite { margin: 0 1px 0 3px; vertical-align: 2px; height: 18px; min-width: 18px; padding: 0 5px; }
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: flex-start; }

/* feedback: quiet thumbs and a comment, the nav-link pattern at micro size */
.fb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.fb-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 20px; border: 1px solid var(--hairline);
  color: var(--text-soft); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; transition: color .3s, border-color .3s; }
.fb-btn:hover { color: var(--text-strong); border-color: var(--accent-dim); }
.fb-btn.is-on { color: var(--share-light-gold); border-color: var(--share-light-gold-dim); background: var(--share-light-gold-bg); }
.fb-msg { font-size: 12px; color: var(--text-soft); }
.fb-form { display: flex; gap: 8px; align-items: flex-end; width: 100%; margin-top: 4px; }
.fb-text { flex: 1; min-width: 0; resize: vertical; border: 1px solid var(--hairline-hover); border-radius: 12px; background: var(--surface-2); padding: 10px 12px;
  font-size: 14px; color: var(--text-strong); outline: 0; }
.fb-text:focus { border-color: var(--accent-dim); }

/* skeletons (components/loading-and-empty.md) */
.skel { height: 196px; border-radius: 12px; border: 1px solid var(--hairline); background: linear-gradient(90deg, var(--surface-2) 0%, var(--hairline-hover) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: sweep 1.8s linear infinite; }

/* ======================================== CHAT ======================================== */
.view-chat { display: flex; flex-direction: column; padding: 0 var(--gutter); }
.c-empty { text-align: center; padding-top: clamp(40px, 10vh, 120px); }
.c-verse { font-family: var(--font-serif); font-size: 16px; color: var(--text-soft); letter-spacing: .5px; }
body.has-thread .c-empty { display: none; }
.thread { width: 100%; max-width: var(--prose-max); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; padding: 40px 0 0; }
body.has-thread .thread { padding-bottom: 240px; }
.dock { width: 100%; max-width: var(--prose-max); margin: 40px auto 0; display: grid; gap: 14px; }
body.has-thread .dock { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; padding: 48px var(--gutter) max(14px, env(safe-area-inset-bottom));
  max-width: calc(var(--prose-max) + 2 * var(--gutter)); background: linear-gradient(180deg, transparent 0%, var(--nav-fill) 35%, var(--bg) 70%); z-index: 20; }
body.has-thread .chips--chat { display: none; }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--surface-2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: border-color .4s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.composer:focus-within { border-color: var(--accent-dim); box-shadow: 0 0 12px var(--accent-dim); }
.composer-mark { width: 22px; height: 22px; margin-bottom: 9px; }
.composer-input { flex: 1; min-width: 0; resize: none; outline: 0; font-size: 16px; line-height: 1.5; color: var(--text-strong); padding: 9px 0; max-height: 180px; }
.composer-input::placeholder { color: var(--text-soft); }
.composer-send { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); background: var(--share-dark-gold);
  transition: filter .3s, opacity .3s; }
.composer-send:hover { filter: brightness(1.15); }
.composer-send:disabled { opacity: .4; cursor: default; }
.keep { font-size: 12px; color: var(--text-soft); text-align: center; }
.meter { font-size: 12px; color: var(--share-light-gold); text-align: center; }
.meter:empty { display: none; }

.msg { display: flex; flex-direction: column; animation: rise .5s var(--ease-soft) both; }
.msg-user { align-items: flex-end; }
.bubble-user { max-width: min(80%, 600px); padding: 12px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline);
  font-size: 15px; line-height: 1.7; color: var(--text-strong); white-space: pre-wrap; }
.msg-ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.msg-ai-head img { width: 22px; height: 22px; border-radius: 50%; }
.msg-ai-head span { font-size: 12px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
.answer { font-size: 16.5px; line-height: 1.7; color: var(--text-strong); }
.answer p + p, .answer ul + p, .answer p + ul { margin-top: 16px; }
.answer strong { color: var(--share-light-tan); font-weight: 600; }
.answer em { font-family: var(--font-serif); font-size: 1.1em; font-style: italic; }
.answer ul { padding-left: 20px; }
.answer[dir="rtl"] { font-family: var(--font-serif); font-size: 19px; }
.answer .err { color: var(--text-mid); }
.cursor { display: inline-block; width: 7px; height: 16px; margin-left: 3px; vertical-align: -2px; background: var(--share-light-gold); animation: breathe 1s steps(2) infinite; }
.msg-status { margin: 4px 0 0; }
.c-status { margin-bottom: 2px; justify-content: center; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.cards .piece, .cards .piece--text { grid-template-columns: minmax(0, 1fr); }
.cards .piece-media { margin: 0; border-radius: 0; }
.cards .piece-body { padding: 24px 28px 28px; }
.cards .piece-title { font-size: 22px; }
.verse-card { border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-1); padding: 28px; display: grid; gap: 8px; align-content: start; animation: rise .6s var(--ease-soft) both;
  --accent: var(--share-blue); --accent-dim: var(--share-blue-dim); --accent-bg: var(--share-blue-bg); }
.verse-card.is-lit { border-color: var(--share-blue); }
.msg-panels { display: grid; gap: 16px; margin-top: 16px; }
.series-link { margin-top: 18px; }
.series-link .pill { text-transform: none; letter-spacing: 0.3px; font-size: 12px; max-width: 100%; white-space: normal; text-align: left; }
.deeper { margin-top: 16px; font-size: 13px; color: var(--text-soft); }
.deeper a { color: var(--ink-bronze); text-decoration: none; border-bottom: 1px solid var(--ink-bronze-muted); }
.deeper a:hover { color: var(--text-strong); }
.suggest { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.suggest .chip { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---- gate ---- */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: var(--veil); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.gate-card { width: 100%; max-width: 460px; border: 1px solid var(--hairline-hover); border-radius: 12px; background: var(--bg); padding: 32px; display: grid; gap: 10px; }
.gate-title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 4vw, 34px); letter-spacing: -1px; color: var(--share-light-tan); line-height: 1.1; }
.gate-text { color: var(--text-mid); }
.gate-form { display: grid; gap: 12px; margin-top: 6px; }
.gate-input { padding: 12px 16px; border-radius: 999px; border: 1px solid var(--hairline-hover); background: var(--surface-2); outline: 0; color: var(--text-strong); }
.gate-input:focus { border-color: var(--accent-dim); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-mid); }
.consent input { margin-top: 4px; accent-color: var(--share-dark-gold); }
.gate-actions { display: flex; justify-content: flex-end; gap: 8px; }
.team-privacy { margin-top: 8px; font-size: 13px; color: var(--text-mid); }
.gate-err { font-size: 13px; color: var(--share-light-gold); min-height: 1em; }

.lab-card { max-width: var(--prose-max); }
.lab-text { width: 100%; min-height: 50vh; resize: vertical; border: 1px solid var(--hairline-hover); border-radius: 12px; background: var(--surface-1);
  padding: 16px; font-family: var(--font-sans); font-size: 13px; line-height: 1.6; color: var(--text-strong); outline: 0; }
.lab-text:focus { border-color: var(--accent-dim); }
.lab-actions { flex-wrap: wrap; }
body.has-draft #labBtn { color: var(--share-light-gold); border-color: var(--share-light-gold-dim); }

/* ---- footer ---- */
.foot { position: relative; z-index: 1; max-width: var(--prose-max); margin: 0 auto; padding: 40px var(--gutter) 48px; text-align: center; font-size: 12px; color: var(--text-soft); line-height: 1.7; }
.foot-credit { margin-top: 8px; color: var(--ink-bronze-muted); letter-spacing: .5px; }
.foot a { color: var(--ink-bronze); text-decoration: none; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 8px; }
.foot-legal a, .team-privacy a { color: var(--text-mid); text-decoration: underline; }
body.has-thread.view-is-chat .foot { display: none; }

body.embedded .atmos { display: none; }
/* embedded: the iframe takes the height the page reports, so nothing may be sized by the viewport (5 Nov 2026: 100vh
   minimums under a ResizeObserver grew the frame from 3,149 to 28,112 px in three seconds) */
body.embedded, body.embedded .view { min-height: 0; }
body.embedded .s-hero, body.embedded .c-empty { padding-top: 40px; }
body.embedded.has-thread .dock { position: static; margin: 24px auto 0; padding: 0; background: none; }
body.embedded.has-thread .thread { padding-bottom: 0; }

/* ======================================== responsive (the brand's 768 / 480 rules) ======================================== */
@media (max-width: 960px) {
  .s-body { grid-template-columns: minmax(0, 1fr); }
  .s-aside { position: static; }
}
@media (max-width: 768px) {
  :root { --nav-h: 56px; --gutter: 24px; }
  .nav { gap: 10px; }
  .nav-word { height: 13px; }
  .nav-name { font-size: 19px; }
  .nav-tabs { gap: 2px; }
  .nav-tab, .nav-new { padding: 6px 10px; letter-spacing: 1px; }
  .display-serif { letter-spacing: -1.5px; }
  .display-sans { letter-spacing: -2px; }
  .searchbar { padding: 6px 6px 6px 44px; margin-top: 28px; }
  .searchbar-icon { left: 16px; }
  .piece { grid-template-columns: minmax(0, 1fr); }
  .piece-media { margin: 0; border-radius: 0; }
  .piece-body { padding: 24px; }
  .panel { padding: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .answer { font-size: 16px; }
  body.has-thread .thread { padding-bottom: 210px; }
  .chips { justify-content: center; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .nav-sep, .nav-word { display: none; }
  .nav-mark { display: block; }
  .nav-tab, .nav-new { font-size: 8px; letter-spacing: .5px; padding: 6px 9px; }
  /* a team session on a phone has four tabs (Archive, 18 Nov 2026): the Team badge (the footer says "Team view") and
     the prompt lab (a desktop tool: a whole system prompt to edit) give way, and in a chat the name gives way to
     "+ New"; the mark still names the page */
  body.is-team .nav-team, body.is-team #labBtn { display: none !important; }
  body.is-team.has-thread .nav-name { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* the outside teachers' archive (team only, beer/archive.py) */
.archive { margin-top: 40px; border-top: 1px solid var(--hairline); padding-top: 24px; }
.archive-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.archive-title { font-family: var(--font-serif); font-size: 22px; font-weight: 500; margin: 0; color: var(--ink-bronze); }
.archive-empty { margin-top: 12px; color: var(--text-soft); }
.archive-rows { list-style: none; display: grid; gap: 18px; margin: 16px 0 0; padding: 0; }
.archive-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
.archive-teacher { font-weight: 600; color: var(--text-strong); }
.archive-shiur { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--hairline-hover); text-underline-offset: 3px; }
.archive-shiur:hover { text-decoration-color: var(--accent); }
.archive-date, .archive-time { font-variant-numeric: tabular-nums; color: var(--text-soft); }
.archive-words { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

/* ---- SHARE's own series as one item (beer/series.py, 18 Nov 2026): the course panel's shape, gold accent ---- */
.panel--series { --accent: var(--share-light-gold); --accent-dim: var(--share-light-gold-dim); --accent-bg: var(--surface-2); border-color: var(--accent-dim); }
.panel--series .overline .internal { margin-left: 10px; vertical-align: 1px; }
.panel--series .series-link { margin-top: 14px; }
.panel--series .step-name a { color: var(--text-strong); text-decoration: none; border-bottom: 1px solid var(--hairline-hover); }
.panel--series .step-name a:hover { border-bottom-color: var(--accent); }
.panel--series .step-src a { color: var(--text-soft); }
.panel--series > .pill { margin-top: 12px; }
.series-results { display: grid; gap: 16px; margin: 0 0 24px; }

/* no Yochai service or graph is configured (the server sets these on <body>): no Texts tab, and no Yochai credit */
body[data-texts="off"] #tab-texts, body[data-yochai="off"] .yochai-only { display: none; }
