/**
 * nanopub.css — Shared styles for all nanopublication pages
 * Used by: T2 (Image), T3 (Physical Specs), T5 (Artwork Context), T17 (Color Analysis)
 * Generated by: nodes/999/content_builders.py
 * Companion to: t9-base.css (site-wide styles)
 */

@import url('/fonts/fonts.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
}

/* ── Breadcrumb (single-line) ─────────────────────────────────────────── */

.catalog-breadcrumb {
  margin: 0 0 16px;
  font-size: 12px;
  color: #888;
}

.catalog-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}

.catalog-breadcrumb li {
  display: inline;
  white-space: nowrap;
}

.catalog-breadcrumb li + li::before {
  content: ' › ';
  color: #bbb;
  margin: 0 6px;
  white-space: pre;
}

.catalog-breadcrumb a {
  color: #555;
  text-decoration: none;
}

.catalog-breadcrumb a:hover { text-decoration: underline; }

/* ── Page layout ─────────────────────────────────────────────────────── */

.nanopub-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px var(--space-md, 2rem) 80px;
}

.nanopub-header {
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 20px;
  margin-bottom: 32px;
}

.asset-code {
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline;
}

/* Identifier strip — asset_code | sub_code on one line above the H1 */
.nanopub-codes {
  margin-bottom: 10px;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nanopub-codes .sub-code {
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  color: #444;
}

.nanopub-codes .code-sep {
  color: #bbb;
  margin: 0 4px;
}

.nanopub-title {
  font-size: 28px;
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 8px;
}

.nanopub-byline {
  font-size: 14px;
  color: #555;
}

/* ── 2-column layout ─────────────────────────────────────────────────── */
/* Single linear container; browser flows content across two balanced
   columns and decides where to break. Each direct child is treated as
   atomic so a section never splits mid-way across columns. */

.nanopub-flow {
  column-count: 2;
  column-gap: 48px;
  column-fill: balance;
}

.nanopub-flow > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 24px;
}

/* Legacy flex layout — kept for any older bake; new HTML uses .nanopub-flow */
.nanopub-cols {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.nanopub-col {
  flex: 1;
  min-width: 0;
}

/* ── Artwork image ────────────────────────────────────────────────────── */

.artwork-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  break-inside: avoid;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f5f5;
}

.artwork-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Claim ────────────────────────────────────────────────────────────── */

.claim-title {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  line-height: 1.3;
  break-inside: avoid;
}

.claim-text {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 24px;
  break-inside: avoid;
}

.claim-text p { margin: 0; }

/* ── Sections ─────────────────────────────────────────────────────────── */

section {
  margin: 32px 0;
  break-inside: avoid;
}

section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

/* ── Epistemic profile table ──────────────────────────────────────────── */

.epistemic-table { margin: 0 0 32px; }

.epistemic-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.epistemic-table th,
.epistemic-table td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.epistemic-table th {
  font-weight: bold;
  color: #333;
  width: 140px;
  white-space: nowrap;
}

.epistemic-table td { color: #555; }

/* ── Research context (T17: color / texture / brightness tables) ──────── */

.research-context {
  color: #333;
  line-height: 1.6;
}

.research-context p {
  margin: 0 0 12px;
}

.research-context h2 {
  font-size: 15px;
  font-weight: bold;
  color: #1a1a1a;
  margin: 28px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ddd;
}

.research-context h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.research-context table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0 0 20px;
}

.research-context th,
.research-context td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.research-context th {
  font-weight: bold;
  color: #333;
  background: #fafafa;
  white-space: nowrap;
}

.research-context td { color: #555; }

.research-context strong { color: #333; }

/* ── References ───────────────────────────────────────────────────────── */

.references-list,
.references ol {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.reference {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 24px;
  text-indent: -24px;
}

/* ── Relationships panel ("Where this work lives") ───────────────────── */
/* Mirrors .reference typographic rhythm — small, dense, subtle links.
   Body panel is the bundle's `to_body_panel_html` output: hubs, exhibitions,
   sister works, "Documented at", thematic elements. */

.cr-relationships {
  margin: 32px 0 24px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.cr-section-heading {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.cr-relationships h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin: 18px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.cr-relationships ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cr-relationships li {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
  padding-left: 18px;
  text-indent: -18px;
}

.cr-relationships li strong { color: #1a1a1a; }

.cr-relationships a {
  color: #333;
  text-decoration: underline;
  text-decoration-color: #ccc;
}

.cr-relationships a:hover {
  text-decoration-color: #666;
}

.cr-relationships small {
  font-size: 12px;
  color: #888;
}

.keyword-tags {
  margin-top: 6px;
  line-height: 2;
}

.keyword-tag {
  display: inline-block;
  font-size: 12px;
  color: #555;
  background: #f0f0f0;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
  border-radius: 3px;
}

/* ── Document metadata footer ─────────────────────────────────────────── */

.document-metadata {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 13px;
  color: #555;
}

.document-metadata dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 16px;
}

.document-metadata dt { font-weight: bold; color: #333; }
.document-metadata dd { color: #555; }

/* ── Checksum ─────────────────────────────────────────────────────────── */

.checksum-code {
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  font-size: 12px;
  word-break: break-all;
  color: #888;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nanopub-cols { flex-direction: column; }
  .nanopub-flow { column-count: 1; }
}

/* ── Print ────────────────────────────────────────────────────────────── */

@media print {
  body { padding: 0; }
  .nanopub-page { max-width: 100%; padding: 0; }
}
