/* A(DAI) — the entity view. Shared by the standalone page (/<type>/<slug>,
   src/entity/page.ts) and the /field overlay (js-interface/entity-view.js);
   the markup is rendered server-side by src/entity/view.ts. */

body.ev-locked { overflow: hidden; }
#entity-view {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--void, #0C0C0E);
  color: var(--text, #E8E6E1);
  font-family: var(--mono, 'SF Mono', 'Menlo', 'Consolas', monospace);
  overflow: auto;
  display: none;
}
#entity-view.is-open { display: block; }

.ev-close {
  position: fixed; left: 16px; top: 50%; transform: translateY(-50%);
  width: 40px; padding: 8px 4px; border: 1px solid #2a2a2c; background: rgba(0,0,0,0.4);
  color: var(--text, #E8E6E1); font-family: inherit; font-size: 12px; line-height: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; z-index: 1100;
}
.ev-close:hover { background: rgba(255,255,255,0.06); }
.ev-close-x { font-size: 16px; }
.ev-close-key { color: #6a6a6c; font-size: 10px; letter-spacing: 0.05em; }

.ev-rec {
  position: fixed; left: 16px; bottom: 24px;
  color: #4a4a4c; font-size: 10px; letter-spacing: 0.08em;
  writing-mode: vertical-rl; transform: rotate(180deg);
  z-index: 1100; pointer-events: none;
}

.ev-header-icons {
  position: fixed; right: 24px; top: 16px;
  display: flex; gap: 12px; z-index: 1100;
}
.ev-icon {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #8a8a8c; font-family: inherit;
  cursor: pointer; font-size: 16px; line-height: 1;
}
.ev-icon:hover { color: var(--text, #E8E6E1); }

.ev-article {
  max-width: 980px; margin: 0 auto; padding: 64px 56px 96px;
}

.ev-breadcrumb {
  color: #8a8a8c; font-size: 13px; letter-spacing: 0.02em; margin-bottom: 24px;
}
.ev-bc-type { color: var(--text); }
.ev-bc-sep { color: #4a4a4c; padding: 0 6px; }
.ev-bc-slug { color: #8a8a8c; }

.ev-title {
  font-family: inherit; font-weight: 700; letter-spacing: -0.01em;
  font-size: 56px; line-height: 1.05; color: var(--text);
  margin-bottom: 8px;
}
.ev-dates {
  font-weight: 400; font-size: 28px; color: #6a6a6c; padding-left: 8px;
}

.ev-tagline {
  font-size: 14px; color: var(--text); margin-bottom: 32px;
}
.ev-tagline-cf { color: #6a6a6c; padding-left: 12px; }

.ev-hero {
  position: relative; margin: 32px 0 0;
  width: 100%; aspect-ratio: 16/9;
  border: 1px solid #2a2a2c; background: #111114;
  overflow: hidden; display: block;
}
.ev-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ev-hero[data-hatch="1"]::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, #1a1a1c 0 1px, transparent 1px 12px);
}
.ev-hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px; color: #8a8a8c; font-size: 12px;
  background: linear-gradient(to top, rgba(12,12,14,0.92), rgba(12,12,14,0));
}
.ev-hero--image .ev-hero-cap { background: linear-gradient(to top, rgba(12,12,14,0.85), rgba(12,12,14,0)); }
.ev-mono-tag { color: #b4b4b6; }
.ev-mono-dim { color: #6a6a6c; }

.ev-hr { border: 0; border-top: 1px solid #2a2a2c; margin: 48px 0 32px; }

.ev-bio {
  font-size: 18px; line-height: 1.55; color: var(--text); margin-bottom: 40px;
}
.ev-bio-mark { color: var(--brand-color, #4169B0); padding-left: 4px; }

.ev-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 48px;
  margin-bottom: 48px; font-size: 14px;
}
.ev-meta-col { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; align-content: start; }
.ev-meta-k { color: #6a6a6c; }
.ev-meta-v { color: var(--text); }

.ev-quote {
  border-left: 2px solid #2a2a2c; padding: 12px 0 12px 24px; margin: 0 0 56px;
}
.ev-quote-text { font-size: 18px; line-height: 1.6; color: var(--text); margin-bottom: 12px; }
.ev-quote-attr { font-size: 13px; color: #8a8a8c; }

.ev-section { margin-bottom: 56px; }
.ev-h2 {
  font-size: 14px; font-weight: 400; color: var(--text);
  border-bottom: 1px solid #2a2a2c; padding-bottom: 6px; margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.ev-h2-count { color: #6a6a6c; padding-left: 8px; }
.ev-h2-source { color: #6a6a6c; padding-left: 12px; font-size: 12px; font-style: italic; }

.ev-empty {
  color: #8a8a8c; font-size: 13px; padding: 12px 0;
}
.ev-empty em { color: var(--brand-color, #4169B0); font-style: normal; }

.ev-works { display: flex; flex-direction: column; gap: 24px; }
.ev-work {
  display: grid; grid-template-columns: 240px 1fr; gap: 32px;
  align-items: start;
}
.ev-work-img {
  position: relative; aspect-ratio: 1/1; width: 100%;
  border: 1px solid #2a2a2c; background: #111114; overflow: hidden;
  display: block;
}
.ev-work-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ev-work-img[data-hatch="1"]::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, #1a1a1c 0 1px, transparent 1px 10px);
}
.ev-work-img-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px; color: #8a8a8c; font-size: 11px;
  background: linear-gradient(to top, rgba(12,12,14,0.95), rgba(12,12,14,0));
  line-height: 1.4;
}
.ev-work-body { padding-top: 4px; }
.ev-work-title { font-size: 14px; font-weight: 400; margin-bottom: 6px; color: var(--text); }
.ev-work-title strong { font-weight: 700; }
.ev-work-year { color: #8a8a8c; font-weight: 400; padding-left: 4px; }
.ev-work-medium { font-size: 13px; color: #8a8a8c; margin-bottom: 8px; }
.ev-work-method { color: #b4b4b6; }
.ev-work-blurb { font-size: 13px; color: var(--text); }

.ev-rel-group { margin-bottom: 24px; }
.ev-rel-h3 {
  font-size: 13px; font-weight: 400; color: #8a8a8c; margin-bottom: 8px;
}
.ev-h3-count { color: #4a4a4c; padding-left: 6px; }
.ev-rel-list { list-style: none; padding: 0; margin: 0; }
.ev-rel-row {
  display: grid; grid-template-columns: 100px 110px 1fr auto; gap: 12px;
  padding: 4px 0; font-size: 13px; align-items: baseline;
}
.ev-rel-leader { color: #2a2a2c; letter-spacing: 0.04em; overflow: hidden; }
.ev-rel-tag { color: #6a6a6c; }
.ev-rel-name { color: var(--text); }
.ev-rel-qualifier { color: #8a8a8c; text-align: right; }
.ev-rel-row[data-node-id] { cursor: pointer; }
.ev-rel-row[data-node-id]:hover,
.ev-rel-row[data-node-id]:focus-visible {
  background: rgba(255,255,255,0.045); outline: none;
}
.ev-rel-row[data-node-id]:hover .ev-rel-name,
.ev-rel-row[data-node-id]:focus-visible .ev-rel-name {
  color: #fff; text-decoration: underline; text-underline-offset: 3px;
}

.ev-contrib-link {
  color: #8a8a8c; text-decoration: underline dotted; text-underline-offset: 3px;
}
.ev-contrib-link:hover { color: var(--text); }

.ev-list { list-style: none; padding: 0; margin: 0; }
.ev-list-row {
  padding: 4px 0; font-size: 13px; color: var(--text);
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline;
}
.ev-list-idx, .ev-list-year { color: #8a8a8c; min-width: 56px; }

/* ---- embedding neighbours block ---- */
.ev-embeddings .ev-emb-group { margin-bottom: 32px; }
.ev-emb-h3 {
  font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 4px;
}
.ev-emb-key {
  color: #6a6a6c; font-weight: 400; padding-left: 6px; font-size: 11px;
}
.ev-emb-blurb { font-size: 12px; color: #8a8a8c; margin: 0 0 12px; }

/* ---- "who is this for" toggle (style-kin panel) ---- */
.ev-aud { margin: 0 0 14px; }
.ev-aud-tabs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.ev-aud-tab {
  background: transparent; border: 0; padding: 2px 0;
  font-family: inherit; font-size: 11px; letter-spacing: 0.04em;
  color: #6a6a6c; cursor: pointer; text-transform: lowercase;
}
.ev-aud-tab:hover { color: #b4b4b6; }
.ev-aud-tab[aria-pressed="true"] {
  color: var(--text); border-bottom: 1px solid var(--brand-color, #4169B0);
}
.ev-aud-tab:focus-visible { outline: 1px solid var(--brand-color, #4169B0); outline-offset: 2px; }
.ev-aud-line {
  font-size: 12px; color: #8a8a8c; margin: 0; cursor: pointer;
  line-height: 1.45;
}
.ev-emb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.ev-emb-card {
  display: flex; flex-direction: column; gap: 6px;
  background: transparent; border: 1px solid #2a2a2c; padding: 6px;
  color: inherit; font-family: inherit; text-align: left;
  cursor: pointer; transition: border-color 200ms, background 200ms;
}
.ev-emb-card:hover { border-color: #4a4a4c; background: rgba(255,255,255,0.02); }
.ev-emb-thumb {
  position: relative; aspect-ratio: 1/1; width: 100%;
  background: #111114; overflow: hidden;
}
.ev-emb-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ev-emb-thumb-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px; font-size: 10px; color: #8a8a8c; text-align: center;
  line-height: 1.3;
}
.ev-emb-thumb-empty[data-hatch="1"]::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, #1a1a1c 0 1px, transparent 1px 10px);
}
.ev-emb-meta {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px; line-height: 1.35;
}
.ev-emb-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-emb-row { display: flex; justify-content: space-between; color: #8a8a8c; }
.ev-emb-type { color: #6a6a6c; }
.ev-emb-sim { color: var(--brand-color, #4169B0); font-variant-numeric: tabular-nums; }

.ev-provenance {
  margin-top: 64px; padding-top: 16px; border-top: 1px solid #2a2a2c;
  font-size: 11px; color: #6a6a6c; letter-spacing: 0.04em;
}
.ev-prov-tag { color: #8a8a8c; }
.ev-prov-link {
  color: #8a8a8c; text-decoration: underline dotted; text-underline-offset: 3px;
}
.ev-prov-link:hover { color: var(--text); }
.ev-prov-warn { color: #c4a868; }

@media (max-width: 768px) {
  .ev-article { padding: 56px 24px 80px; }
  .ev-title { font-size: 36px; }
  .ev-meta { grid-template-columns: 1fr; gap: 4px; }
  .ev-meta-col { grid-template-columns: 100px 1fr; }
  .ev-work { grid-template-columns: 1fr; gap: 16px; }
  .ev-rel-row { grid-template-columns: 1fr auto; gap: 6px; }
  .ev-rel-leader, .ev-rel-tag { display: none; }
}

/* ---- links inside the article ---- */
:where(.ev-article) a { color: inherit; }
.ev-bc-field { color: #8a8a8c; text-decoration: none; }
.ev-bc-field:hover { color: var(--text, #E8E6E1); }
.ev-claim { margin: -4px 0 10px; font-size: 11px; }
.ev-claim a { color: inherit; }
.ev-claimed { color: #6fbf8a; }
.ev-prose { font-size: 14px; line-height: 1.6; color: var(--text, #E8E6E1); }
.ev-meta-v a { text-decoration: underline dotted; text-underline-offset: 3px; }
.ev-rel-list > li { list-style: none; }
a.ev-rel-row { color: inherit; text-decoration: none; }
.ev-work-link { display: block; text-decoration: none; }
.ev-work-title a { text-decoration: none; }
.ev-work-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.ev-emb-card { text-decoration: none; }

/* ---- standalone page (src/entity/page.ts) ---- */
body.ev-page {
  --void: #0C0C0E;
  --text: #E8E6E1;
  --brand-color: #4169B0;
  --mono: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
  margin: 0; background: var(--void); color: var(--text); -webkit-font-smoothing: antialiased; }
body.ev-page *, body.ev-page *::before, body.ev-page *::after { box-sizing: border-box; }
:where(body.ev-page) :where(h1, h2, h3, p, figure, dl, dd, blockquote, ul) { margin: 0; padding: 0; }
#entity-view.is-page { position: static; display: block; overflow: visible; min-height: 100vh; }
.ev-topbar {
  max-width: 980px; margin: 0 auto; padding: 20px 56px 0;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 12px; letter-spacing: 0.04em;
}
.ev-topbar a { color: #8a8a8c; text-decoration: none; }
.ev-topbar a:hover { color: var(--text); }
.ev-topbar-home { color: var(--text) !important; font-weight: 700; }
.ev-topbar-home span { color: #6a6a6c; font-weight: 400; }
.ev-topbar-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
#entity-view.is-page .ev-article { padding-top: 40px; }
@media (max-width: 768px) {
  .ev-topbar { padding: 16px 16px 0; }
  #entity-view.is-page .ev-article { padding: 32px 16px 64px; }
}
/* The embedding-neighbour loading cue (the field's own copy is in style.css). */
@keyframes adai-spin-rot { to { transform: rotate(360deg); } }
@keyframes adai-emb-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
body.ev-page .adai-spin {
  display: inline-block; width: 10px; height: 10px;
  border: 1.5px solid rgba(168, 196, 224, 0.28); border-top-color: #A8C4E0; border-radius: 50%;
  animation: adai-spin-rot 0.7s linear infinite; flex: 0 0 auto;
}
body.ev-page .adai-embed-loading {
  display: inline-flex; align-items: center; gap: 7px;
  color: #A8C4E0; font-size: 11px; letter-spacing: 0.07em;
  animation: adai-emb-pulse 1.2s ease-in-out infinite;
}
body.ev-page .adai-embed-retry {
  display: inline-flex; align-items: center; gap: 5px;
  color: #c4a944; font-size: 10px; letter-spacing: 0.05em; cursor: pointer;
}
body.ev-page .adai-embed-retry:hover { color: #e0c75a; text-decoration: underline; }
body.ev-page .adai-embed-retry::before { content: '↻'; font-size: 12px; }
/* The subject's word on a relation (claims): contests and context. */
.ev-rel-note { font-size: 12px; color: #8a8a8c; padding: 0 0 6px 234px; line-height: 1.45; }
.ev-rel-note--contest { color: #d4a574; }
@media (max-width: 768px) { .ev-rel-note { padding-left: 0; } }
/* A collection's holdings (works held): the maker under the title. */
.ev-held-by { color: #8a8a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
