/* Deep-link alias for legacy #figures → tenets section */
.fm-deep-alias{display:block;height:0;width:0;overflow:hidden;scroll-margin-top:72px}

/* Field-manual figure plates — Making Software–adjacent language.
   Scoped to #tenets / #figures / .fm-figures. Does not rebuild the whole page. */

.fm-figures{
  --fm-paper:#fdfdfb;
  --fm-plate:#f9fafc;
  --fm-ink:#16171a;
  --fm-muted:#787b87;
  --fm-blue:#293cff;
  --fm-line:#dadde9;
  --fm-serif:Georgia,"Times New Roman",serif;
  --fm-mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  background:var(--fm-paper);
  color:var(--fm-ink);
  padding:96px 0 88px;
  border-bottom:1px solid var(--fm-line);
}

.fm-wrap{max-width:1512px}

.fm-masthead{
  max-width:none;
  margin-bottom:48px;
}
.fm-masthead-meta{
  display:flex;
  justify-content:space-between;
  gap:20px;
  font:10px/1.4 var(--fm-mono);
  letter-spacing:.06em;
  color:var(--fm-blue);
  border-top:1px solid var(--fm-blue);
  padding-top:14px;
  margin-bottom:28px;
}
.fm-masthead h2{
  font-family:var(--fm-serif);
  font-weight:400;
  font-size:clamp(32px,4.2vw,52px);
  letter-spacing:-.04em;
  line-height:1.12;
  margin:0;
  color:var(--fm-ink);
}
.fm-masthead h2 em{font-style:italic;color:var(--fm-blue)}
.fm-lede{
  font-family:var(--fm-serif);
  font-weight:400;
  font-size:clamp(24px,2.35vw,36px);
  line-height:1.32;
  letter-spacing:-.028em;
  color:#2c2d33;
  margin:28px 0 0;
  max-width:34em;
}
.fm-honesty{
  font:10px/1.85 var(--fm-mono);
  color:var(--fm-muted);
  margin:20px 0 0;
  letter-spacing:.02em;
  max-width:62ch;
}

.fm-index{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:0 20px;
  margin:28px 0 12px;
  border-top:1px solid var(--fm-line);
}
.fm-index-link{
  display:grid;
  gap:6px;
  text-decoration:none;
  color:inherit;
  border-bottom:1px solid var(--fm-line);
  padding:14px 0 16px;
  min-height:72px;
  transition:color .15s,border-color .15s;
}
.fm-index-link:hover{color:var(--fm-blue);border-color:var(--fm-blue)}
.fm-index-num{
  font:10px/1.4 var(--fm-mono);
  letter-spacing:.04em;
  color:var(--fm-blue);
}
.fm-index-title{
  font:400 15px/1.35 var(--fm-serif);
  letter-spacing:-.02em;
}

.fm-plates{margin-top:8px}

.fm-plate{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(0,2.2fr);
  gap:clamp(24px,5vw,64px);
  align-items:center;
  padding:56px 0 64px;
  border-bottom:1px solid var(--fm-line);
  scroll-margin-top:72px;
}
/* Explicit L/R — alias spans previously broke :nth-child(even) so every plate flipped. */
.fm-plate--media-left{
  grid-template-columns:minmax(0,2.2fr) minmax(220px,1fr);
}
.fm-plate--media-left .fm-caption{grid-column:2;grid-row:1}
.fm-plate--media-left .fm-artwork{grid-column:1;grid-row:1}
.fm-plate--media-right{
  grid-template-columns:minmax(220px,1fr) minmax(0,2.2fr);
}
.fm-plate--media-right .fm-caption{grid-column:1;grid-row:1}
.fm-plate--media-right .fm-artwork{grid-column:2;grid-row:1}
.fm-plate:last-of-type{border-bottom:0;padding-bottom:12px}

.fm-chapter-next{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-top:48px;
  font:500 14px/1.4 var(--fm-serif);
  color:var(--fm-muted);
  text-decoration:none;
  border-bottom:1px solid var(--fm-line);
  padding-bottom:4px;
  letter-spacing:-.01em;
}
.fm-chapter-next:hover{color:var(--fm-blue);border-color:var(--fm-blue)}

.fm-eyebrow{
  font:10px/1.6 var(--fm-mono);
  letter-spacing:.05em;
  color:var(--fm-blue);
}
.fm-caption h3{
  font-family:var(--fm-serif);
  font-weight:400;
  font-size:clamp(28px,3.2vw,44px);
  letter-spacing:-.04em;
  line-height:1.12;
  margin:18px 0 0;
  max-width:14ch;
  color:var(--fm-ink);
}
.fm-concept{
  font-family:var(--fm-serif);
  font-size:17px;
  line-height:1.7;
  color:#404149;
  margin:20px 0 0;
  max-width:32ch;
}

.fm-artwork{
  margin:0;
  border:1px solid #e0e3ee;
  background-color:var(--fm-plate);
  background-image:
    linear-gradient(#293cff08 1px,transparent 1px),
    linear-gradient(90deg,#293cff08 1px,transparent 1px);
  background-size:10px 10px;
  position:relative;
  min-height:min(52vh,560px);
}
.fm-artwork::before,
.fm-artwork::after{
  content:"+";
  position:absolute;
  color:var(--fm-blue);
  font:12px/1 var(--fm-mono);
  z-index:1;
  top:-7px;
  pointer-events:none;
}
.fm-artwork::before{left:-5px}
.fm-artwork::after{right:-5px}

.fm-artwork-link{
  display:block;
  position:relative;
  width:100%;
  text-decoration:none;
  color:inherit;
}
.fm-artwork-link img{
  display:block;
  width:100%;
  height:auto;
  min-height:min(48vh,520px);
  object-fit:contain;
  background:transparent;
}
.fm-view-cue{
  position:absolute;
  right:12px;
  bottom:12px;
  border:1px solid var(--fm-blue);
  background:var(--fm-paper);
  color:var(--fm-blue);
  font:10px/1.4 var(--fm-mono);
  padding:7px 9px;
  opacity:0;
  transform:translateY(3px);
  transition:opacity .15s,transform .15s;
}
.fm-artwork-link:hover .fm-view-cue,
.fm-artwork-link:focus-visible .fm-view-cue{
  opacity:1;
  transform:none;
}

/* Dark theme — html[data-theme=dark] set by theme.js */
html[data-theme="dark"] .fm-figures{
  --fm-paper:#0e1016;
  --fm-plate:#141821;
  --fm-ink:#e8eaf2;
  --fm-muted:#9aa0b4;
  --fm-blue:#8ea0ff;
  --fm-line:#2a3040;
  isolation:isolate;
  color:var(--fm-ink);
  background-color:var(--fm-paper);
  background-image:
    linear-gradient(rgba(243,238,230,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,238,230,.11) 1px, transparent 1px);
  background-size:28px 28px;
  background-position:0 0;
}
html[data-theme="dark"] .fm-masthead h2{color:var(--fm-ink)}
html[data-theme="dark"] .fm-lede,
html[data-theme="dark"] .fm-concept{color:#c4c8d6}
html[data-theme="dark"] .fm-lede{color:#e8eaf2}
html[data-theme="dark"] .fm-artwork{
  border-color:rgba(243,238,230,.14);
  background-color:transparent;
  background-image:none;
}
html[data-theme="dark"] .fm-view-cue{
  background:#141821;
  border-color:var(--fm-blue);
  color:var(--fm-blue);
}
html[data-theme="dark"] .fm-caption h3{color:var(--fm-ink)}

@media (max-width:1000px){
  .fm-index{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:850px){
  .fm-plate,
  .fm-plate--media-left,
  .fm-plate--media-right{
    grid-template-columns:1fr;
    gap:28px;
    padding:48px 0;
    align-items:start;
  }
  /* Mobile: image first, then caption — consistent for every plate */
  .fm-plate--media-left .fm-artwork,
  .fm-plate--media-right .fm-artwork{grid-column:1;grid-row:1}
  .fm-plate--media-left .fm-caption,
  .fm-plate--media-right .fm-caption{grid-column:1;grid-row:2}
  .fm-caption h3{max-width:none;font-size:clamp(28px,7vw,36px)}
  .fm-concept{max-width:none}
  .fm-artwork{min-height:0}
  .fm-artwork-link img{min-height:0}
  .fm-view-cue{display:none}
}
@media (max-width:600px){
  .fm-figures{padding:72px 0 56px}
  .fm-index{grid-template-columns:1fr 1fr;column-gap:18px}
  .fm-index-title{font-size:15px}
  .fm-masthead-meta{font-size:10px}
}

@media (prefers-reduced-motion:reduce){
  .fm-index-link,
  .fm-view-cue{transition:none}
}


/* Loop plates: video sets the height; keep plate grid calm */
.fm-artwork--loop{min-height:0}
.fm-artwork--loop .concept-loop{min-height:0}
@media (max-width:850px){
  .fm-artwork--loop{min-height:0}
}
