/* Orbit · Headlines mode (assets/js/headlines.js). Look and feel from mockups/tour/meanwhile-2-galveston-desktop.html
   (strip, split card, badge scale, nearest relatives) and meanwhile-3-jfk-phone.html (one card above the time bar).
   Uses orbit.css tokens and tour.css's icons and claim badges; every class is prefixed hl-. */
.i-news { --i: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3.5' y='4.5' width='17' height='15' rx='1.5' fill='none' stroke='black' stroke-width='1.7'/><path d='M7 8.5h10M7 12h4.5M7 15.5h4.5M14 12h3v3.5h-3z' stroke='black' stroke-width='1.6' stroke-linecap='round'/></svg>"); }

/* ---------- the toggle: on the time bar beside "All time" (desktop), a round button above it (phone) ---------- */
.timebar.has-hl { grid-template-columns: auto 150px 1fr auto auto; }
.hl-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0 13px 0 11px; }
.hl-toggle .t-ico { width: 15px; height: 15px; }
.hl-toggle .st { display: none; font: 600 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: #0a0f1e; color: #fff; }
.hl-toggle[aria-pressed="true"] .st { display: inline; }
.hl-fab { display: none; color: var(--text); }
.hl-fab .t-ico { width: 18px; height: 18px; }
.hl-fab[aria-pressed="true"] { background: #fff; color: #0a0f1e; border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .45); }
body.hl-on #hint { display: none; }
body.t-live .hl-ui { display: none !important; }
.hl-hint { position: absolute; z-index: 3; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; font: 500 11px var(--mono); color: var(--text); background: var(--glass-strong); border: 1px solid var(--edge-strong); white-space: nowrap; pointer-events: none; }
.hl-hint::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 10px; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); }

/* ---------- the strip: newspaper cards for the events around the year ---------- */
.hl-strip { position: absolute; z-index: 3; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 121px); height: 90px; pointer-events: none; }
.hl-row { display: flex; justify-content: center; gap: 8px; }
.hl-label { position: absolute; left: 16px; top: 4px; font: 500 10.5px/1.55 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.hl-label b { display: flex; align-items: center; gap: 5px; font: 600 12px var(--sans); letter-spacing: .08em; color: var(--gold); }
.hl-label .t-ico { width: 13px; height: 13px; }
.hl-slot { width: 190px; flex: none; }
.hl-h { position: relative; flex: none; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 190px; height: 86px; padding: 13px 13px 10px; border-radius: 14px; text-align: left; pointer-events: auto; overflow: hidden; background: var(--glass); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 36px rgba(0, 0, 0, .38); transition: opacity .25s, border-color .25s, background .25s; }
.hl-h::before { content: ""; position: absolute; left: 13px; right: 13px; top: 6px; height: 2px; border-top: 1px solid rgba(255, 255, 255, .2); border-bottom: 1px solid rgba(255, 255, 255, .09); }
.hl-h:hover { border-color: var(--edge-strong); }
.hl-h .hrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hl-h .hy { font: 600 22px/1 var(--mono); letter-spacing: -.03em; color: var(--text); }
.hl-h .hk { font: 500 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hl-h .ht { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: -.012em; line-height: 1.22; color: #d9deea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-h .hm { position: absolute; left: 13px; right: 13px; bottom: 9px; display: flex; align-items: center; gap: 6px; font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; }
.hl-h .hm .fd { width: 6px; height: 6px; border-radius: 50%; background: var(--c-documented); box-shadow: 0 0 6px var(--c-documented); flex: none; }
.hl-h.faded { opacity: .42; }
.hl-h.active { background: rgba(20, 22, 30, .86); border-color: rgba(255, 210, 122, .6); box-shadow: 0 0 0 4px rgba(255, 210, 122, .07), 0 0 30px rgba(255, 210, 122, .2), 0 14px 36px rgba(0, 0, 0, .45); }
.hl-h.active::before { border-top-color: rgba(255, 210, 122, .6); border-bottom-color: rgba(255, 210, 122, .25); }
.hl-h.active .hy { color: var(--gold); }
.hl-h.active .ht { color: #fff; }
.hl-h.active .hk { color: rgba(255, 210, 122, .75); }
/* a ⊘ Not ours headline is still the current card, but drawn in dashed grey, never gold */
.hl-h.active.notours { border: 1px dashed rgba(255, 255, 255, .42); box-shadow: 0 0 0 4px rgba(255, 255, 255, .04), 0 14px 36px rgba(0, 0, 0, .45); }
.hl-h.active.notours::before { border-top-color: rgba(255, 255, 255, .3); border-bottom-color: rgba(255, 255, 255, .12); }
.hl-h.active.notours .hy { color: #fff; }
.hl-h.active.notours .hk { color: var(--muted); }

/* ---------- the split card: THE WORLD | THE FAMILY, in the right panel's slot ---------- */
.hl-card { position: absolute; z-index: 3; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 219px); width: min(508px, calc(100% - 32px)); max-height: calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 323px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; border-radius: var(--r-panel); padding: 18px 20px; background: rgba(10, 14, 26, .95); }
#panel.open ~ .hl-card { visibility: hidden; }
.hl-kick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hl-kick .dot, .hl-ph .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.hl-head { display: flex; align-items: flex-end; gap: 14px; margin-top: 10px; }
.hl-year { font: 600 44px/.9 var(--mono); letter-spacing: -.045em; color: var(--gold); flex: none; }
.hl-year.plain { color: #fff; }
.hl-head .tt { min-width: 0; padding-bottom: 1px; }
.hl-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
.hl-head .meta { margin-top: 5px; font: 11px var(--mono); color: var(--faint); }
.hl-head .meta b { color: var(--muted); font-weight: 500; }
.hl-cols { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 0 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--edge); }
.hl-cols .col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hl-cols .col + .col { border-left: 1px solid var(--edge); padding-left: 20px; }
.hl-cols .ck, .hl-pfam .ck { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.hl-cols .ck .t-ico { width: 13px; height: 13px; color: var(--faint); }
.hl-blurb { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.hl-dist { margin: 0; font: 11px/1.55 var(--mono); color: var(--muted); }
.hl-dist b { color: var(--gold); font-weight: 500; }
.hl-dist .grey { color: var(--text); }
.hl-inset { position: relative; height: 122px; border-radius: 14px; overflow: hidden; border: 1px solid var(--edge-strong); background: #0b1224; box-shadow: inset 0 0 30px rgba(0, 0, 0, .6); }
.hl-inset svg { display: block; width: 100%; height: 100%; font-family: var(--sans); }
.hl-inset .mono { font-family: var(--mono); }
.hl-pulse { transform-box: fill-box; transform-origin: center; animation: hlPulse 2.4s var(--ease) infinite; }
@keyframes hlPulse { from { transform: scale(.35); opacity: .95; } to { transform: scale(2.1); opacity: 0; } }

/* a family member on the card: name, relationship, the note, one badge, the record */
.hl-fam { display: grid; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.hl-fam:last-child { border-bottom: 0; padding-bottom: 0; }
.hl-fam .fn { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.012em; line-height: 1.2; }
.hl-fam .fr { font-size: 12px; color: var(--muted); line-height: 1.35; }
.hl-fam .ft { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: #dfe3ee; text-wrap: pretty; }
.hl-fam .ff { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-width: 0; }
.hl-fam .ff .t-badge { height: 22px; font-size: 10.5px; letter-spacing: .04em; padding: 0 7px 0 6px; }
.hl-fam .ff .t-ev-chip { height: 24px; max-width: 100%; font-size: 11.5px; padding: 0 8px 0 6px; gap: 5px; min-width: 0; }
.hl-fam .ff .t-ev-chip .t-ico { width: 13px; height: 13px; }
.hl-fam .ff .t-ev-chip .cl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 10px var(--c, #fff); flex: none; }
.hl-dot.ring { background: transparent; border: 1.5px solid rgba(255, 255, 255, .6); box-shadow: none; }

/* the worked-out verdict: the badge scale, one plain sentence, the nearest relatives, what was checked */
.hl-vocab { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hl-vocab .t-badge { height: 20px; font-size: 9.5px; letter-spacing: .05em; padding: 0 7px 0 6px; gap: 5px; }
.hl-vocab .t-badge > i { width: 6px; height: 6px; }
.hl-vocab .t-badge.context > i { width: 7px; height: 7px; }
.hl-vocab .t-badge.coincidence > i, .hl-vocab .t-badge.not-ours > i { width: auto; height: auto; }
.hl-vocab .t-badge.off { opacity: .3; }
.hl-vocab .t-badge.on { color: #fff; border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 3px rgba(255, 255, 255, .07); }
.hl-vocab .t-badge.on.documented, .hl-vocab .t-badge.on.probable, .hl-vocab .t-badge.on.lead { border-style: solid; border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.hl-say { margin: 0; font-size: 13.5px; line-height: 1.5; color: #e6e9f2; text-wrap: pretty; }
.hl-say b { font-weight: 600; }
.hl-sub { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.hl-nearest { margin: 0; padding: 0; list-style: none; display: grid; border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .025); }
.hl-nearest li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 10px 8px; border-top: 1px solid var(--edge); }
.hl-nearest li:first-child { border-top: 0; background: rgba(255, 255, 255, .035); }
.hl-nearest .mi { font: 600 13px/1.25 var(--mono); letter-spacing: -.02em; color: var(--text); text-align: right; }
.hl-nearest .mi small { display: block; font: 500 9.5px var(--mono); color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.hl-nearest .who { font-size: 11.5px; line-height: 1.4; color: var(--muted); min-width: 0; }
.hl-nearest .who b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); font-weight: 600; }
.hl-nearest .who .hl-dot { width: 7px; height: 7px; }
.hl-nearest .more { color: var(--faint); white-space: nowrap; }
.hl-named { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.hl-named li { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hl-named li .hl-dot { width: 7px; height: 7px; transform: translateY(-1px); }
.hl-named b { color: var(--text); font-weight: 600; }
.hl-named .pl { color: var(--faint); }
.hl-checked { margin: 0; font: 10.5px/1.5 var(--mono); color: var(--faint); }

/* ---------- phone: one card docked above the time bar ---------- */
@media (max-width: 760px) {
  .timebar.has-hl { grid-template-columns: auto 1fr auto; }
  .hl-toggle { display: none; }
  .hl-fab { display: grid; }
  .hl-strip { display: none; }
  .hl-hint { bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); }
  .hl-card.phone { left: 12px; right: 12px; top: auto; width: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 172px); max-height: min(42vh, calc(100% - env(safe-area-inset-top, 0px) - 300px)); padding: 16px 16px 15px; border-radius: 22px; touch-action: pan-y; }
  #panel.open ~ .hl-card, .legend.show ~ .hl-card { visibility: hidden; }
  .hl-card .grab { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 72px; height: 20px; touch-action: none; }   /* drag it down to tuck the card away */
  .hl-card .grab::before { content: ""; position: absolute; left: 18px; right: 18px; top: 6px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .25); }
  .hl-ph { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
  .hl-ph .hl-year { font-size: 34px; }
  .hl-ph .t-kicker { display: inline-flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; }
  .hl-ph .t-kicker .where { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .hl-ph .spacer, .hl-pfam .spacer { flex: 1; }
  .hl-nav { display: inline-flex; gap: 4px; flex: none; }
  .hl-nav button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); }
  .hl-nav button:disabled { opacity: .3; }
  .hl-nav .t-ico { width: 15px; height: 15px; }
  .hl-card.phone .hl-title { margin-top: 9px; font-size: 16.5px; line-height: 1.2; }
  .hl-card.phone .hl-blurb { margin-top: 8px; font-size: 13px; }
  .hl-pfam { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--edge); display: grid; gap: 9px; }
  .hl-pfam .row { display: flex; align-items: center; gap: 8px; }
  .hl-pfam .hl-say { font-size: 14px; }
  .hl-pfam .hl-fam { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; padding-bottom: 9px; }
  .hl-pfam .hl-fam .fr { align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hl-pfam .hl-fam .ft, .hl-pfam .hl-fam .ff { grid-column: 1 / -1; }
  .hl-pfam .hl-fam .ft { font-size: 13.5px; }
  .hl-pfam .hl-fam:last-child { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .hl-pulse { animation: none; opacity: .5; } }
