/* page.css — source-card + headline-shift. Edit those files. */

/* Source citation overlay — same chrome as Today's meaning; click, not hover. */

.chip.is-source-open,
.hs-src.is-source-open {
  border-color: var(--culture);
  color: var(--culture);
}

.source-card-pop {
  position: fixed;
  z-index: 46;
  max-width: min(22rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: .85rem 1.9rem .9rem .95rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--culture);
  background: #fffcf7;
  box-shadow: 0 6px 22px rgba(61, 54, 48, .12);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}

/* color-mix() with var() is not dropped at parse time: Safari < 16.2 keeps it and computes transparent. */
@supports (color: color-mix(in srgb, red, blue)) {
  .source-card-pop {
    border: 1px solid color-mix(in srgb, var(--culture) 28%, var(--rule));
    border-left: 2px solid var(--culture);
    background: color-mix(in srgb, var(--paper) 96%, #fff);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--ink) 12%, transparent);
  }
}

.source-card-pop.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.source-card-pop[hidden] {
  display: block;
  visibility: hidden;
}

.source-card-pop.is-open[hidden] {
  visibility: visible;
}

.source-card-close {
  position: absolute;
  top: .35rem;
  right: .4rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.source-card-close:hover,
.source-card-close:focus-visible {
  color: var(--ink);
}

.source-card-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--culture) 45%, transparent);
  outline-offset: 1px;
}

.source-card-label {
  margin: 0 0 .45rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.source-card-who {
  margin: 0 0 .12rem;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}

.source-card-key {
  margin: 0 0 .35rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
  color: var(--culture);
}

.source-card-img {
  display: block;
  width: 100%;
  max-height: 11rem;
  object-fit: contain;
  object-position: left top;
  margin: 0 0 .45rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}

.source-card-img[hidden] {
  display: none;
}

.source-card-pop:has(.source-card-board-wrap:not([hidden])) .source-card-img {
  margin-bottom: .25rem;
}

.source-card-board-wrap {
  margin: 0 0 .5rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .78rem;
  line-height: 1.4;
}

.source-card-board-wrap[hidden] {
  display: none;
}

.source-card-note {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.source-card-note[hidden] {
  display: none;
}

.source-card-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  margin: .55rem 0 0;
  padding-top: .45rem;
  border-top: 1px solid var(--rule);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .8rem;
  line-height: 1.4;
}

.source-card-open,
.source-card-board {
  color: var(--accent);
  text-decoration: none;
}

.source-card-open:hover,
.source-card-open:focus-visible,
.source-card-board:hover,
.source-card-board:focus-visible {
  text-decoration: underline;
}

.source-card-ext {
  font-size: .75em;
}

.source-card-held {
  color: var(--ink-soft);
  font-style: italic;
}

.source-card-held[hidden],
.source-card-open[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .source-card-pop {
    transition: none;
  }
}

/* Works-cited list (/sources) */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin: 1.5rem 0 0;
}

.sources-item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin: 0;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.sources-plate {
  flex: 0 0 6.5rem;
  width: 6.5rem;
  height: auto;
  max-height: 8.5rem;
  margin-left: auto;
  object-fit: contain;
  object-position: right top;
}

.sources-plate[hidden] {
  display: none;
}

.sources-copy {
  flex: 1;
  min-width: 0;
}

.sources-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sources-who {
  margin: 0 0 .15rem;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
}

.sources-key {
  margin: 0 0 .35rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
  color: var(--culture);
}

.sources-note {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.sources-open,
.sources-held {
  margin: .4rem 0 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
}

.sources-open a {
  color: var(--accent);
  text-decoration: none;
}

.sources-open a:hover,
.sources-open a:focus-visible {
  text-decoration: underline;
}

.sources-held {
  color: var(--ink-soft);
  font-style: italic;
}

.sources-used {
  margin: .4rem 0 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
  line-height: 1.45;
}

.sources-used-label {
  color: var(--ink-soft);
}

.sources-used a {
  color: var(--accent);
  text-decoration: none;
}

.sources-used a:hover,
.sources-used a:focus-visible {
  text-decoration: underline;
}

.chip[id^="cite-"],
.hs-src[id^="cite-"] {
  scroll-margin-top: calc(var(--site-header-h, 2.7rem) + 1rem);
}

.chip.is-cite-target,
.hs-src.is-cite-target,
.chip[id^="cite-"]:target,
.hs-src[id^="cite-"]:target {
  border-color: var(--culture);
  color: var(--culture);
  background: #e8efec;
  background: color-mix(in srgb, var(--culture) 16%, #fff);
  box-shadow: 0 0 0 3px rgba(79, 122, 106, .35);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--culture) 35%, transparent);
}


/* Headline-shift strip — one module. Prefix: hs- */
headline-shift-strip,
.hs-strip,
.strip-key {
  --hs-gold: #c4a35a;
  --hs-amber: #c47a3a;
  --hs-rust: #9a3b2f;
  --hs-steel: #3d5a80;
  --hs-slate: #5a6a73;
  --hs-teal: #2a6f6f;
  --hs-wine: #7a2e45;
  --hs-bottle: #4a3f55;
}
headline-shift-strip,
.hs-strip {
  display: block;
  --hs-paper: #fbf7f0;
  --hs-ink: #1c1917;
  --hs-muted: #6b645a;
  --hs-rule: #d4c8b4;
  --hs-year-col: 4.75rem;
  --hs-dot-col: 0.9rem;
  --hs-gutter: 0.75rem;
  background: var(--hs-paper);
  color: var(--hs-ink);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  padding: 0.5rem 0 0.25rem;
  position: relative;
}
.hs-strip[data-chrome="full"] {
  padding: 1.5rem 1.15rem 1.15rem;
  border: 1px solid var(--hs-rule);
}

.hs-kicker {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hs-muted);
  margin: 0 0 0.35rem;
}
.hs-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}
.hs-sub {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  color: var(--hs-muted);
  margin: 0 0 1.25rem;
}

.hs-rail { position: relative; }
.hs-rail::before {
  content: "";
  position: absolute;
  left: calc(var(--hs-year-col) + var(--hs-gutter) + (var(--hs-dot-col) / 2));
  top: 1.15rem;
  bottom: 1.6rem;
  width: 1.5px;
  background: var(--hs-rule);
  transform: translateX(-50%);
  pointer-events: none;
}

.hs-row {
  display: grid;
  grid-template-columns: var(--hs-year-col) var(--hs-dot-col) minmax(0, 1fr);
  grid-template-areas:
    "year dot who"
    ".    .   line"
    ".    .   note";
  column-gap: var(--hs-gutter);
  row-gap: 0.2rem;
  padding: 1.05rem 0 1.15rem;
  align-items: start;
}

.hs-year {
  grid-area: year;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.35;
  color: var(--hs-ink);
  padding-top: 0.08rem;
  white-space: nowrap;
}

.hs-dot {
  grid-area: dot;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.32rem;
  justify-self: center;
  border-radius: 50%;
  background: var(--hs-gold);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--hs-paper);
}
.hs-row[data-family="gold"] .hs-dot { background: var(--hs-gold); }
.hs-row[data-family="amber"] .hs-dot { background: var(--hs-amber); }
.hs-row[data-family="rust"] .hs-dot { background: var(--hs-rust); }
.hs-row[data-family="steel"] .hs-dot { background: var(--hs-steel); }
.hs-row[data-family="slate"] .hs-dot { background: var(--hs-slate); }
.hs-row[data-family="teal"] .hs-dot { background: var(--hs-teal); }
.hs-row[data-family="wine"] .hs-dot { background: var(--hs-wine); }
.hs-row[data-family="bottle"] .hs-dot { background: var(--hs-bottle); }

.hs-who {
  grid-area: who;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.5rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--hs-muted);
  margin: 0;
  line-height: 1.35;
}
.hs-who-text { min-width: 0; }

.hs-line {
  grid-area: line;
  font-size: 1.08rem;
  line-height: 1.45;
  margin: 0;
}
.hs-note {
  grid-area: note;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--hs-muted);
  margin: 0.1rem 0 0;
}

.hs-strip mark { color: inherit; background: none; }
.hs-hi {
  padding: 0.05em 0.18em;
  border-radius: 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hs-hi.gold { background: color-mix(in srgb, var(--hs-gold) 32%, transparent); }
.hs-hi.amber { background: color-mix(in srgb, var(--hs-amber) 30%, transparent); }
.hs-hi.rust { background: color-mix(in srgb, var(--hs-rust) 26%, transparent); }
.hs-hi.steel { background: color-mix(in srgb, var(--hs-steel) 28%, transparent); }
.hs-hi.slate { background: color-mix(in srgb, var(--hs-slate) 28%, transparent); }
.hs-hi.teal { background: color-mix(in srgb, var(--hs-teal) 28%, transparent); }
.hs-hi.wine { background: color-mix(in srgb, var(--hs-wine) 26%, transparent); }
.hs-hi.bottle { background: color-mix(in srgb, var(--hs-bottle) 26%, transparent); }

.hs-hi[role="button"] {
  cursor: pointer;
}
.hs-hi[role="button"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.hs-hi.is-outline {
  background: transparent;
}
.hs-hi.is-outline.gold { box-shadow: inset 0 0 0 1px var(--hs-gold); }
.hs-hi.is-outline.amber { box-shadow: inset 0 0 0 1px var(--hs-amber); }
.hs-hi.is-outline.rust { box-shadow: inset 0 0 0 1px var(--hs-rust); }
.hs-hi.is-outline.steel { box-shadow: inset 0 0 0 1px var(--hs-steel); }
.hs-hi.is-outline.slate { box-shadow: inset 0 0 0 1px var(--hs-slate); }
.hs-hi.is-outline.teal { box-shadow: inset 0 0 0 1px var(--hs-teal); }
.hs-hi.is-outline.wine { box-shadow: inset 0 0 0 1px var(--hs-wine); }
.hs-hi.is-outline.bottle { box-shadow: inset 0 0 0 1px var(--hs-bottle); }

.hs-src {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hs-muted);
  text-decoration: none;
  border: 1px solid var(--hs-rule);
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  white-space: nowrap;
  line-height: 1;
}
.hs-src:hover { color: var(--hs-wine); border-color: var(--hs-wine); }
.hs-src[role="button"] { cursor: pointer; }

.hs-foot {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--hs-muted);
  margin: 0.75rem 0 0;
  line-height: 1.45;
  padding-left: calc(var(--hs-year-col) + var(--hs-dot-col) + (var(--hs-gutter) * 2));
}

@media (max-width: 640px) {
  .hs-strip {
    --hs-year-col: 3.7rem;
    --hs-dot-col: 0.75rem;
    --hs-gutter: 0.5rem;
  }
  .hs-year { font-size: 0.7rem; }
  .hs-line { font-size: 0.98rem; }
  .hs-foot { padding-left: 0; }
}
