/* APOSTOLUS additions. Layout, navigation and components come from the two IATHEON copies beside this file
   (iatheon-base.css, iatheon-journal.css); nothing here restyles the header, sub bar, menu, cards or tables. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 100; top: 0; left: 0; padding: 10px 16px; background: var(--ink); color: var(--surface); transform: translateY(-115%); }
.skip-link:focus { transform: none; }
main :is(h2[id], h3[id], figure[id], details[id], section[id], .hero-num[id]) { scroll-margin-top: 140px; }
:lang(ko) :is(h1, h2, h3, .lede, .note, p, li, dd) { word-break: keep-all; }

/* The language choice is a pair of links (the address sets the language), drawn like the IATHEON segment buttons. */
.fm-language a { padding: 7px 11px; min-height: 30px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 12.5px/1.1 var(--sans); text-decoration: none; background: var(--ground); color: var(--ink-2); }
.fm-language a:hover { border-color: var(--ink); color: var(--ink); }
:root[data-skin="journal"] .fm-language a[aria-current="true"], :root[data-skin="journal"] .fm-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.fullmenu:not([open]) { display: none; }

/* Plate I: the evidence map is an SVG whose twelve nodes link to project records. */
.paper-plate { position: relative; display: flex; justify-content: center; align-items: center; flex: 1 0 auto; width: 100%; min-height: 390px; padding: 12px 25px; }
.paper-plate .plate-art { position: relative; display: block; width: min(100%, 434px); height: auto; overflow: visible; }
.paper-plate .plate-rule { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; stroke: var(--ink); stroke-width: 1; opacity: .12; }
.plate-lines { fill: none; stroke: var(--ink); stroke-width: .75; opacity: .46; }
.plate-neighbours { fill: none; stroke: var(--ink); stroke-width: .75; opacity: .22; }
.plate-node { fill: var(--ink); }
.plate-node.hub { fill: var(--clay); stroke: var(--eosin-ink); stroke-width: 1px; }
.plate-label { fill: var(--ink); font: 13px var(--mono); }
.paper-plate a:hover .plate-label, .paper-plate a:focus .plate-label { text-decoration: underline; }
.paper-plate a:hover .plate-node, .paper-plate a:focus .plate-node { r: 7px; }
:root[data-skin="journal"] .hero-stain { overflow: hidden; display: flex; flex-direction: column; }
:root[data-skin="journal"] .hero-stain figcaption { max-width: none; width: 100%; }
.map-plate { max-width: 620px; margin: 26px 0 8px; }
.map-plate .paper-plate { min-height: 520px; }

/* Project list: search form and cards. */
.field-row { display: flex; gap: 6px; flex-direction: column; min-width: min(100%, 200px); }
.field-row label { font-size: 13px; font-weight: 600; }
:root[data-skin="journal"] .filters { gap: 8px 16px; margin: 23px 0 12px; align-items: end; }
:root[data-skin="journal"] .filters input[type="search"], :root[data-skin="journal"] .filters select { height: 42px; min-width: 0; max-width: 100%; padding-inline: 12px; flex: none; }
:root[data-skin="journal"] .filters input::placeholder { color: var(--ink-3); opacity: 1; }
:root[data-skin="journal"] .filters .pill { min-height: 42px; }
.track-card { display: flex; flex-direction: column; gap: 8px; }
:root[data-skin="journal"] .track-card h2 { font-size: 22px; line-height: 1.35; padding-top: 0; border-top: 0; margin: 0; }
.track-card .tags { gap: 5px; }
.track-card .target { padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink-2); }
.track-card .target b { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 2px; }
.empty { border: 1px solid var(--line); background: var(--surface); padding: 18px; margin-top: 14px; }

/* Record lists: a name and a state on the left, the note on the right. */
.source-entries, .gate-entries { list-style: none; padding: 0; margin: 8px 0 0; }
.source-entries li, .gate-entries li { display: grid; grid-template-columns: minmax(185px, 1fr) minmax(0, 2fr); gap: 10px 24px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--line); }
.source-entries .tag, .gate-entries .tag { white-space: normal; width: fit-content; }
.source-entries p, .gate-entries p { margin: 0; }
.source-entries .source-name { font-weight: 600; }
.evaluation-rows li { grid-template-columns: minmax(0, 1fr) auto; }
.source-group { margin-top: 30px; }
.apostolus-code { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 8px; font-size: 13px; }
.evidence-box, td code, dd code { overflow-wrap: anywhere; }
.audit-details { margin-top: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-details > summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.data-table { width: 100%; }
.card .next-action { margin: 4px 0; }
.card.flat + .card.flat, .tags + .card.flat { margin-top: 10px; }
a.card { text-decoration: none; display: block; color: inherit; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.tag { white-space: normal; }
.crisis-line { border-left: 2px solid var(--clay); padding-left: 12px; max-width: 52em; }
.riscon-family-bar a:focus-visible, .riscon-company a:focus-visible { outline-color: #faf9f5; }

@media (max-width: 760px) {
  .hero-plate { order: 2; }
  .paper-plate { min-height: 0; padding: 18px 30px; }
  .paper-plate .plate-art { max-height: 392px; }
  .map-plate .paper-plate { min-height: 0; }
  .source-entries li, .gate-entries li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 520px) {
  .field-row { flex: 1 1 130px; min-width: 125px; }
  .field-row.field-query { flex: 1 1 100%; }
  .plate-label { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
.intro-card a.pill { align-self: flex-start; margin-top: auto; text-decoration: none; }
