/* History as data (/photography/timeline/, /photography/timeline/connections/, /on-this-day/): the decade bars and the
   life and production strips. Built by tools/build_history_pages.py. Colours are the timeline's own dot colours, from
   the theme variables, so light and dark follow. Each strip is a 1000-unit SVG stretched to its row; all text is HTML. */
.hx-decades { margin: 1.6rem 0 1.2rem; }
.hx-decades h2 { margin-bottom: .5rem; }
.hx-says { display: flex; gap: .6rem; align-items: flex-start; margin: .4rem 0 .6rem; font-size: .95rem; line-height: 1.65; }
.hx-says::before { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; margin-top: .1rem; background: url("/characters/xiaojiao/xiaojiao-avatar-64.png") center / cover no-repeat; }
.hx-caption { font-size: .86rem; color: var(--text2, #716669); margin: .3rem 0 .7rem; line-height: 1.6; }
.reading .hx-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .9rem; padding: 0; margin: .4rem 0 .7rem; }
.reading .hx-legend li { margin: 0; font-size: .8rem; line-height: 1.6; color: var(--text2, #716669); }
.hx-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: -.05rem; }
.hx-g-books { fill: var(--accent, #905760); background: var(--accent, #905760); }
.hx-g-tech { fill: var(--ink, #34504b); background: var(--ink, #34504b); }
.hx-g-shows { fill: var(--secondary-accent, #8c8f9b); background: var(--secondary-accent, #8c8f9b); }
.hx-g-groups { fill: var(--text2, #716669); background: var(--text2, #716669); opacity: .55; }
.hx-g-people { fill: var(--matcha, #647761); background: var(--matcha, #647761); }

.reading .hx-bars { list-style: none; padding: 0; margin: 0; }
.reading .hx-row { display: grid; grid-template-columns: 5.2rem 1fr 2.4rem; align-items: center; gap: .5rem; margin: 0; padding: .14rem .3rem; border-radius: .5rem; font-size: .82rem; line-height: 1.5; }
.hx-row .hx-label { color: var(--text2, #716669); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hx-row .hx-n { text-align: right; font-variant-numeric: tabular-nums; }
.hx-row[role="button"] { cursor: pointer; }
.hx-row[role="button"]:hover, .hx-row[role="button"]:focus-visible { background: var(--surface, #f4ece8); outline: none; }
.hx-row[role="button"]:focus-visible { box-shadow: 0 0 0 2px var(--accent, #905760); }
.hx-row[aria-pressed="true"] { background: var(--surface, #f4ece8); font-weight: 600; }
.hx-row[aria-pressed="true"] .hx-label { color: inherit; }
.hx-strip { display: block; width: 100%; height: 12px; overflow: visible; }
.hx-bars .hx-strip { height: 14px; border-radius: 3px; }
.hx-seg { transition: x .25s ease, width .25s ease; }
.hx-table, .hx-life details { border: 0; border-radius: 0; padding: 0; background: none; }
.hx-table { margin: .7rem 0 0; font-size: .85rem; }
.hx-table summary, .hx-life summary { cursor: pointer; color: var(--text2, #716669); font-family: inherit; font-weight: 400; font-size: .8rem; min-height: 1.6rem; display: list-item; }
.hx-table table { border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.hx-table th, .hx-table td { padding: .2rem .5rem; text-align: right; border-bottom: 1px solid var(--divider, #e8dfdb); white-space: nowrap; }
.hx-table th[scope="row"], .hx-table thead th:first-child { text-align: left; }
.hx-next { margin: 1rem 0 1.6rem; font-size: .92rem; }
.hx-next a::after { content: " →"; }

.hx-axis { display: flex; margin: .6rem 0 .2rem; font-size: .7rem; color: var(--text2, #716669); font-variant-numeric: tabular-nums; }
.hx-axis span { flex: 1 1 0; min-width: 0; border-left: 1px solid var(--divider, #e8dfdb); padding-left: .2rem; overflow: hidden; }
.reading .hx-lives { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.reading .hx-life { margin: 0; padding: .35rem 0 .3rem; border-bottom: 1px solid var(--divider, #e8dfdb); }
.reading .hx-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 0 0 .2rem !important; font-size: .92rem; line-height: 1.5; }
.hx-head a { text-decoration: none; }
.hx-head a:hover, .hx-head a:focus-visible { text-decoration: underline; }
.hx-years { flex: none; font-size: .78rem; color: var(--text2, #716669); font-variant-numeric: tabular-nums; }
.hx-span { fill: var(--text, #3f3a3b); opacity: .55; }
.hx-open { stroke: var(--text2, #716669); stroke-width: 2; stroke-dasharray: 10 10; opacity: .6; }
.hx-life details { margin-top: .2rem; }
.reading .hx-life details ul { margin: .2rem 0 .3rem; padding-left: 1.1rem; }
.reading .hx-life details li { margin: .1rem 0; font-size: .82rem; line-height: 1.6; }
.reading h3 small { font-weight: 400; font-size: .8em; color: var(--text2, #716669); }
.otd-rel { font-size: .8rem; margin-left: .3rem; color: var(--text2, #716669); text-decoration: none; border-bottom: 1px dotted var(--divider, #e8dfdb); white-space: nowrap; }
.otd-rel:hover, .otd-rel:focus-visible { color: var(--accent, #905760); }

@media (max-width: 560px) {
  .reading .hx-row { grid-template-columns: 4.9rem 1fr 2rem; gap: .35rem; padding-inline: .1rem; }
  .hx-axis span:nth-child(even) { color: transparent; }
}
@media (prefers-reduced-motion: no-preference) {
  .hx-bars .hx-strip { transform-origin: left center; animation: hx-grow .5s ease-out both; }
  @keyframes hx-grow { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .hx-seg { transition: none; }
}
