/* The timeline on Home and the Feed. Rows are absolutely placed; their order never changes, so they animate in place. */

.tl-stage { position: relative; --ax: 150px; --co: 26px; }
.tl-row { position: absolute; left: 0; right: 0; }
.tl-row.is-clickable { cursor: pointer; }
.tl-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.is-ready .tl-row, .is-ready .tl-box, .is-ready .tl-branch, .is-ready .tl-fork {
	transition: top .7s var(--ease), height .7s var(--ease), opacity .3s ease;
}
.is-ready .tl-c, .is-ready .tl-dot { transition: transform .7s var(--ease), top .7s var(--ease); }

.tl-line-main, .tl-line-seg { position: absolute; left: var(--ax); width: 1px; background: var(--ink); transition: opacity .3s ease; }
.tl-line-main { top: 0; bottom: 0; }
.tl-future { position: absolute; top: 0; left: var(--ax); width: 3px; background: var(--bg); border-left: 1px dashed var(--ink); }
.tl-branch { position: absolute; width: 0; border-left: 1px dashed #666; }
.tl-fork { position: absolute; left: var(--ax); overflow: visible; }
.tl-fork path { fill: none; stroke: #666; stroke-width: 1; stroke-dasharray: 3 3; }
.tl-anchor, .tl-item-anchor { position: absolute; left: 0; width: 1px; pointer-events: none; }

.tl-left { position: absolute; top: 0; right: calc(100% - var(--ax) + 16px); white-space: nowrap; text-align: right; pointer-events: none; font-family: var(--mono); }
.tl-year { font-size: 15px; font-weight: 700; padding-top: 20px; }
.tl-year-gap { font-size: 11px; font-weight: 400; color: #666; padding-top: 7px; }
.tl-date { font-size: 11px; color: var(--muted); line-height: 30px; }
.tl-date-mini { line-height: 40px; }
.tl-date-focus { color: var(--ink); }

.tl-dot { position: absolute; z-index: 1; pointer-events: none; }
.tl-tick { width: 15px; height: 1px; background: var(--ink); }
.tl-tick-small { width: 7px; height: 1px; background: #777; }
.tl-tick-dot { width: 3px; height: 3px; border-radius: 50%; background: #666; }

.tl-c { position: absolute; left: calc(var(--ax) + var(--co)); max-width: calc(100% - var(--ax) - var(--co)); width: fit-content; min-width: 0; display: flex; flex-direction: column; gap: 6px; transform-origin: left top; }
.tl-work { display: flex; align-items: baseline; gap: 12px; height: 30px; line-height: 30px; max-width: 100%; overflow: hidden; white-space: nowrap; }
.tl-title { font-size: 16px; font-weight: 500; }
.tl-title-main { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tl-title-wip { font-size: 17px; font-style: italic; color: var(--muted); }
.tl-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tl-thumb { height: 230px; width: auto; max-width: 100%; object-fit: contain; object-position: left top; display: block; }
.tl-thumb-home { width: 400px; height: auto; }
.tl-line { display: block; line-height: 30px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-ghost { color: var(--muted); font-style: italic; }
.tl-mini { display: flex; align-items: center; height: 40px; }
.tl-mini img { height: 30px; width: auto; max-width: 90px; object-fit: contain; display: block; }
.tl-mark { display: block; margin-top: 10px; height: 1px; background: var(--ink); opacity: .55; }
.tl-rect { display: block; margin-top: 5px; height: 12px; background: #8c8c8c; opacity: .55; }
.tl-rect-work { background: var(--ink); height: 9px; margin-top: 7px; }

/* A post with text and images, without a headline: a line per paragraph and a rectangle per image, in order. */
.tl-shape { display: flex; align-items: center; gap: 5px; height: 30px; }
.tl-g-t { width: 26px; height: 1px; background: var(--ink); }
.tl-g-i { width: 15px; height: 11px; background: #8c8c8c; }

.tl-full { padding: 4px 0 18px; display: flex; flex-direction: column; gap: 10px; max-width: 40em; cursor: auto; }
.tl-full .tl-headline { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.tl-full .body .text { font-size: 15px; line-height: 1.55; }
.tl-full .body .images img { max-height: 420px; width: auto; max-width: 100%; }
.tl-rel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--mono); font-size: 12px; }
.tl-rel span { color: var(--muted); }
.tl-rel button { font: inherit; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* The card for an open work. */
.tl-box { position: absolute; z-index: 3; left: 0; right: 0; border: 1px solid var(--ink); background: var(--bg); overflow: hidden; overflow: clip; opacity: 0; height: 0; }
.tl-box-body { padding: 28px 32px 30px; display: flex; flex-wrap: wrap; gap: 22px 30px; align-items: flex-start; }
.tl-box-body > img { height: 210px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.tl-box-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.tl-box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl-box-head h2 { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; }
.tl-close { font: inherit; font-size: 22px; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px; color: var(--ink); }
.tl-box-text p { margin: 0; }
.tl-box-versions { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.tl-box-versions .is-open { font-weight: 700; }
.tl-box-summary { font-size: 16px; line-height: 1.55; max-width: 34em; }
.tl-open { align-self: flex-start; margin-top: 6px; font-family: var(--mono); font-size: 12px; text-decoration: none; border: 1px solid var(--ink); padding: 9px 13px; }

@media (max-width: 700px) {
	.tl-date { display: none; }
	.tl-year { font-size: 13px; }
	.tl-thumb { height: 160px; }
	.tl-thumb-home { width: min(400px, 70vw); }
	.tl-box-body { padding: 20px 18px 22px; }
	.tl-box-body > img { height: 160px; }
}
