/* Repertoire page styles. Owned by the repertoire page agent. Shared classes live in ../style.css (see INNER-PAGE KIT); do not redefine them here.
   Text stays inside 66% of .inner from 640px up (the strings run at ~72%). Animated: transform, opacity, clip-path only. */

/* ---------- hero intro ---------- */
.page-hero .intro .rep-lede { display: block; margin-bottom: .5rem; font: italic 300 clamp(1.9rem, 4.2vw, 3.6rem)/1.06 var(--serif); letter-spacing: -.015em; color: var(--cream); text-wrap: balance; }

/* ---------- bone: the note, then the controls (controls come from js/repertoire.js) ---------- */
.rep-note { display: block; }
.rep-a { display: block; font: 300 clamp(2rem, 5vw, 4.9rem)/1.04 var(--serif); letter-spacing: -.022em; }
.rep-a em { font-weight: 400; color: var(--cobalt); }
.rep-b { display: block; max-width: 40ch; margin-top: clamp(18px, 2.4vw, 30px); }
.rep-b a { display: inline-block; padding: .65rem 0; margin: -.65rem 0; color: var(--cobalt); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
.rep-b a:hover { text-decoration-thickness: 3px; }
.rep-b a:active { opacity: .7; }

.rep-ctl { display: grid; gap: clamp(22px, 3vw, 34px); margin-top: clamp(40px, 6vw, 88px); padding-top: clamp(22px, 3vw, 36px); border-top: 1px solid rgba(31, 63, 214, .3); }
.rep-ctl:empty { display: none; }
.rep-count { color: var(--cobalt); }
.rep-count .n { display: block; font: italic 300 clamp(4.6rem, 11vw, 9.5rem)/.88 var(--serif); letter-spacing: -.03em; }
.rep-count .u { display: block; margin-top: .55rem; font: 600 .76rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.rep-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.rep-chip { position: relative; isolation: isolate; min-height: 44px; padding: .75rem 1.1rem; border: 1px solid var(--cobalt); border-radius: 99px; background: none; color: var(--cobalt); font: 600 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: transform .35s var(--ease); }
.rep-chip::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .3s ease; }
.rep-chip:hover::before { opacity: .12; }
.rep-chip:active { transform: scale(.95); }
.rep-chip[aria-pressed="true"] { background: var(--cobalt); color: var(--cream); }
.rep-chip[aria-pressed="true"]::before { display: none; }
.rep-field { position: relative; margin-top: .8rem; }
.rep-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cobalt); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease); pointer-events: none; }
.rep-field:hover::after, .rep-field:focus-within::after { transform: scaleX(1); }
.rep-field input { display: block; width: 100%; min-height: 56px; padding: .5rem 0 .6rem; border: 0; border-bottom: 1.5px solid rgba(31, 63, 214, .4); border-radius: 0; background: transparent; color: var(--ink); font: italic 300 clamp(1.4rem, 2.6vw, 2.2rem)/1.2 var(--serif); -webkit-appearance: none; appearance: none; }
.rep-field input::placeholder { color: var(--cobalt); opacity: .8; }
.rep-field input::-webkit-search-cancel-button { height: 1.1em; width: 1.1em; cursor: pointer; }

/* ---------- deep: the index, grouped by period (.rep-h padding-bottom = room for descenders inside the wipe clip) ---------- */
.rep-groups { min-height: 40svh; }
.rep-g[hidden], .rep-w[hidden], .rep-none[hidden] { display: none; }
.rep-g:not([hidden]) ~ .rep-g:not([hidden]) { margin-top: clamp(64px, 10vw, 150px); }
.rep-h { padding-bottom: .18em; margin-bottom: calc(clamp(14px, 2vw, 28px) - .18em); font: italic 300 clamp(2.5rem, 11.6vw, 4.6rem)/1.02 var(--serif); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1.5px var(--mist); overflow-wrap: anywhere; }
.rep-g:nth-of-type(even) .rep-h { -webkit-text-stroke-color: var(--orange); }
.rep-n { display: inline-block; vertical-align: top; margin: .35rem 0 0 .4rem; font: 600 .78rem/1 var(--sans); letter-spacing: .16em; -webkit-text-stroke: 0; color: var(--mist); }
.rep-g:nth-of-type(even) .rep-n { color: var(--orange); }
.rep-l { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid rgba(203, 212, 255, .28); }
.rep-w { position: relative; z-index: 10; padding: 1rem 0 1.1rem; border-top: 1px solid rgba(203, 212, 255, .28); line-height: 1.45; color: var(--mist); }
.rep-w span { text-wrap: pretty; }
.rep-w b { display: block; margin-bottom: .15rem; font: italic 400 clamp(1.55rem, 3.1vw, 2.9rem)/1.1 var(--serif); letter-spacing: -.012em; color: var(--cream); }
.rep-none { position: relative; z-index: 10; max-width: 24ch; font: italic 300 clamp(1.8rem, 4vw, 3.4rem)/1.12 var(--serif); letter-spacing: -.01em; color: var(--cream); }

/* ---------- bone: next ---------- */
.big.rep-nt { font-size: clamp(2.6rem, 8vw, 8rem); }
.big.rep-nt em { color: var(--cobalt); }
.rep-next .arrow-link { padding: 1rem 0; }
.rep-nx { max-width: 38ch; margin: clamp(22px, 3vw, 40px) 0 clamp(14px, 2vw, 26px); }
.rep-next .label { margin-bottom: clamp(16px, 2vw, 28px); }

/* ---------- layout: widths, string lane ---------- */
@media (max-width: 639px) { .rep-chip { padding: .75rem .95rem; } .rep-chips { gap: .45rem; } }
@media (min-width: 640px) {
  .rep-note, .rep-ctl, .rep-groups, .rep-nt, .rep-nx { max-width: 66%; }
  .page-hero .intro { max-width: 66%; }
  .rep-h { font-size: clamp(3rem, 8.2vw, 8.6rem); }
  .rep-g:nth-of-type(even) .rep-h { text-align: end; }   /* every second period mark sits flush right: echoes the alternating rows on the home page */
  .rep-n { margin-top: .9rem; font-size: .86rem; }
}
@media (min-width: 800px) {
  .rep-ctl { grid-template-columns: clamp(7rem, 15vw, 15rem) minmax(0, 1fr); column-gap: clamp(16px, 3vw, 44px); }
  .rep-count { grid-row: 1 / span 2; }
}

/* ---------- reveals: hidden-initial only with JS and motion allowed ---------- */
html.js:not(.static) .rep-w { opacity: 0; transform: translateY(16px); }
html.js:not(.static) .rep-w.in { opacity: 1; transform: none; transition: opacity .7s ease, transform 1s var(--ease); }

/* ---------- right to left (Hebrew): see the note in ../style.css ---------- */
:where([dir="rtl"]) .rep-field::after { transform-origin: 100% 50%; }
