/* Sulamita Youth: /faces/ (2026-11-02, Fable design facepage-1102).
   An ink band, a paper sheet riding the seam with the member's own portrait
   mounted on it, three hairline facts, their years, then everyone the archive
   knows by face. Every colour is a house token from styles.css; the only
   shadow on the page is the portrait's gold one. Light only, like the site. */

.faces-page { background: var(--bone); }
.faces-page main.fx { padding-bottom: 56px; }

.fx-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* the mono voice: eyebrows, labels, counts, years */
.fx-mono,
.fx-eyebrow,
.fx-tile-n,
.fx-rail-y,
.fx-facts dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
}

/* ── the eyebrow, with its 32px rule drawing out (T14) ─────────────────── */
.fx-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent-glow);
}
.fx-eyebrow::before {
  content: "";
  flex: 0 0 32px;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  animation: fx-rule 500ms var(--ease) both;
}
.fx-eyebrow-light { color: var(--gold-text); }
@keyframes fx-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── 4a. ink band ─────────────────────────────────────────────────────── */
.fx-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  padding: 36px 0 124px;
}
.fx-band-copy { position: relative; }
.fx-band h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 14px 0 0;
  max-width: 16ch;
  text-wrap: balance;
}
.fx-lede {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  line-height: 1.55;
  margin: 12px 0 0;
  max-width: 34ch;
}
/* the one wash: a gold radial pinned to the band's lower edge */
.fx-wash {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -104px;
  height: 260px;
  background: radial-gradient(closest-side, rgba(236, 195, 92, 0.22), transparent 70%);
  pointer-events: none;
}
/* signed out, or a leader with no member card: no sheet rides the seam */
.fx[data-own="none"] .fx-band { padding-bottom: 36px; }
.fx[data-own="none"] .fx-lede { display: none; }

/* ── 4b. the paper sheet and the mounted portrait ─────────────────────── */
.fx-sheet-wrap { position: relative; }
.fx-sheet {
  position: relative;
  box-sizing: border-box;
  margin-top: -56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0 20px 20px;
  text-align: center;
  animation: fx-settle 700ms var(--ease-press) backwards;
}
.fx-sheet[hidden] { display: none; }
@keyframes fx-settle { from { transform: translateY(24px); } to { transform: none; } }

.fx-portrait {
  box-sizing: border-box;
  display: block;
  width: 128px;
  height: 128px;
  margin: -64px auto 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bone);
  border: 4px solid var(--paper);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow-accent-soft);
}
.fx-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* B and C: the dashed silhouette, never an empty grey disc */
.fx-portrait.is-unclear {
  background: var(--bone) no-repeat center / 100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='38' r='20' fill='none' stroke='%23b8ab93' stroke-width='3' stroke-dasharray='5 5'/%3E%3Cpath d='M14 100c4-24 20-36 36-36s32 12 36 36' fill='none' stroke='%23b8ab93' stroke-width='3' stroke-dasharray='5 5'/%3E%3C/svg%3E");
}
.fx-portrait.is-unclear img { display: none; }

.fx-who { margin-top: 14px; }
.fx-who .fx-mono { color: var(--steel); }
.fx-who h2,
.fx-card-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.fx-card-p {
  color: var(--steel);
  font-size: 16px;
  line-height: 1.55;
  margin: 8px auto 0;
  max-width: 36ch;
}
#fx-matching .fx-card-h { margin-top: 14px; }
.fx-card { padding-top: 28px; }
.fx[data-own="none"] .fx-sheet { margin-top: 20px; }

/* ── 4c. hairline facts ───────────────────────────────────────────────── */
.fx-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fx-facts[hidden] { display: none; }
.fx-facts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 12px 4px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.fx-facts > div:first-child { border-left: 0; }
.fx-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fx-facts dt { margin-top: 6px; color: var(--steel); letter-spacing: 0.14em; }

/* ── 4d. through the years ────────────────────────────────────────────── */
.fx-years { margin-top: 22px; text-align: left; }
.fx-years[hidden] { display: none; }
.fx-years-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--steel);
}
.fx-years-head .fx-mono { color: var(--steel); }
.fx-rail {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 12px -20px 0;
  padding: 10px 20px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
}
.fx-rail::-webkit-scrollbar { display: none; }
/* the end spacer: a scroller drops its end padding in WebKit, which clipped
   the gold ring of the latest year against the sheet edge */
.fx-rail::after { content: ""; flex: 0 0 8px; }
/* the one hairline behind the faces, at their centre line: drawn between
   neighbours, so it travels with the strip however far it scrolls */
.fx-rail-cell + .fx-rail-cell::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 36px;
  width: 14px;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.fx-rail-cell {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  min-height: 44px;
  scroll-snap-align: end;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fx-rail-face {
  box-sizing: border-box;
  display: block;
  width: 56px;
  height: 56px;
  margin-top: 8px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bone);
  border: 2px solid var(--paper);
  outline: 1px solid var(--line);
}
.fx-rail-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fx-rail-y { margin-top: 8px; color: var(--steel); letter-spacing: 0.14em; }
.fx-rail-cell.is-now .fx-rail-face {
  width: 72px;
  height: 72px;
  margin-top: 0;
  outline: 2px solid var(--accent);
  box-shadow: var(--shadow-accent-soft);
}
.fx-rail-cell.is-now .fx-rail-y { color: var(--gold-text); font-weight: 700; }

/* ── 4e. the one primary action ───────────────────────────────────────── */
.fx-pill {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 0 24px;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
}
.fx-pill-fit { display: inline-flex; width: auto; padding: 0 28px; }

/* ── 4f. find a person ────────────────────────────────────────────────── */
.fx-find { padding-top: 32px; }
.fx-find[hidden] { display: none; }
.fx-find h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 10px 0 0;
}
.fx-note { color: var(--steel); font-size: 16px; line-height: 1.55; margin: 8px 0 0; max-width: 46ch; }

/* equal thirds; the track is bone so it differs from the paper around it,
   the active segment is paper + hairline + bold (two changes). Segments are
   44px on their own box (house floor), so the track is 52. */
.fx-switch {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--oak-300);
}
.fx-switch button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--graphite);
  font: 500 15px/1 var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--press-up) var(--ease-press);
}
.fx-switch button[aria-pressed="true"] {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 700;
}
.fx-switch button:active { transition-duration: var(--press-down); transform: scale(0.97); }

.fx-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 18px;
  margin-top: 20px;
}
.fx-grid.is-swap-next { animation: fx-swap-next 220ms var(--ease) backwards; }
.fx-grid.is-swap-prev { animation: fx-swap-prev 220ms var(--ease) backwards; }
@keyframes fx-swap-next { from { transform: translateX(8px); opacity: 0.4; } }
@keyframes fx-swap-prev { from { transform: translateX(-8px); opacity: 0.4; } }

.fx-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform var(--press-up) var(--ease-press);
}
.fx-tile:active { transition-duration: var(--press-down); transform: scale(0.96); }
.fx-tile-face {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--paper);
  outline: 1px solid var(--line);
}
.fx-tile-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fx-tile-n {
  margin-top: 6px;
  color: var(--steel);
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fx-tile.is-me .fx-tile-face { outline: 2px solid var(--accent); }
.fx-tile.is-me .fx-tile-n { color: var(--gold-text); font-weight: 700; }
.fx-tile.is-skel .fx-tile-face {
  background: linear-gradient(90deg, var(--oak-300), var(--oak-100), var(--oak-300));
  background-size: 200% 100%;
  animation: fx-shimmer 1.4s linear infinite;
}

.fx-failed { color: var(--steel); font-size: 16px; margin: 20px 0 0; }
.fx-failed[hidden] { display: none; }
.fx-again {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  margin: -12px 0;
  border: 0;
  background: none;
  color: var(--gold-text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}

.fx-more-wrap { display: flex; justify-content: center; margin: 24px 0 8px; }
.fx-more-wrap[hidden] { display: none; }
.fx-more {
  min-height: 48px;
  padding: 0 24px;
  line-height: 1;
  background: var(--control-bg);
  color: var(--ink);
  border: 1px solid var(--control-line-strong);
  box-shadow: var(--shadow-control);
  touch-action: manipulation;
}

/* ── D. loading shapes ────────────────────────────────────────────────── */
.fx-skel-face,
.fx-skel-line,
.fx-skel-block {
  background: linear-gradient(90deg, var(--oak-300), var(--oak-100), var(--oak-300));
  background-size: 200% 100%;
  animation: fx-shimmer 1.4s linear infinite;
}
.fx-own-skel { animation: none; }
.fx-own-skel .fx-portrait { box-shadow: none; }
.fx-skel-line { display: block; width: 120px; height: 26px; margin: 20px auto 0; border-radius: 8px; }
.fx-skel-block { display: block; height: 64px; margin-top: 18px; border-radius: 8px; }
.fx-skel-block[hidden] { display: none; }
@keyframes fx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* focus, the house way */
.fx a:focus-visible,
.fx button:focus-visible {
  outline: 2px solid var(--gold-ring);
  outline-offset: 3px;
}
.fx-tile:focus-visible { outline: none; }
.fx-tile:focus-visible .fx-tile-face { outline: 2px solid var(--gold-ring); outline-offset: 3px; }

/* ── desktop: a 12-column frame from 1024 ─────────────────────────────── */
@media (min-width: 640px) {
  .fx-wrap { padding-inline: 32px; }
  .fx-rail { margin-inline: -20px; }
}
@media (min-width: 1024px) {
  .fx-wrap { padding-inline: 48px; }
  .fx-band { padding: 56px 0 172px; }
  .fx-band h1 { font-size: 48px; max-width: 18ch; }
  .fx-band-copy > * { max-width: 50%; }
  .fx-sheet { width: 50%; margin-inline: auto; }
  .fx-portrait { width: 160px; height: 160px; margin-top: -80px; }
  .fx-find > * { max-width: none; }
  .fx-find { max-width: calc(1200px * 8 / 12 + 96px); }
  .fx-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* reduced motion: no settle, no rule draw, no swap, no shimmer; all visible */
@media (prefers-reduced-motion: reduce) {
  .fx-sheet,
  .fx-eyebrow::before,
  .fx-grid.is-swap-next,
  .fx-grid.is-swap-prev,
  .fx-skel-face,
  .fx-skel-line,
  .fx-skel-block,
  .fx-tile.is-skel .fx-tile-face { animation: none; }
  .fx-tile, .fx-switch button { transition: none; }
}
