/*
 * texs.org header chrome — geometry per /Users/texjernigan/Dropbox/_Code/CHROME-SPEC.md.
 * No deviations: 16px inset, 4px icon gap, 40px trigger, 288px panel, absolute
 * positioning — the same values VHS uses in LabelDesignerClientPage.js
 * (`absolute top-4 right-4`).
 *
 * ── Every rule is scoped under #texs-chrome, and that is not tidiness ───────
 * Twenty Twenty-One ships
 *
 *     button:not(:hover):not(:active):not(.has-background) {
 *         background-color: var(--global--color-primary);   -- resolves to #2d2d2d
 *     }
 *
 * Three :not() pseudo-classes give that selector 0,3,1 specificity, so a plain
 * `.tx-trigger` (0,1,0) loses and the hamburger renders as a dark filled box.
 * The `#texs-chrome` prefix takes it to 1,1,0, which wins. TT1 styles bare
 * `a` and `button` just as aggressively, so the whole file stays scoped.
 */

#texs-chrome {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	gap: 4px;                  /* CHROME-SPEC §1 — 4px is the one that matters */
	z-index: 9999;             /* clears the badge and share button, both 9999 */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Light palette. Redefined for dark below; every colour in this file reads
	   from these, so the two themes can never drift apart. */
	--tx-surface: #fff;
	--tx-ink: #111827;
	--tx-muted: #6b7280;
	--tx-faint: #9ca3af;
	--tx-hairline: rgba(17, 24, 39, .08);
	--tx-wash: rgba(17, 24, 39, .05);
	--tx-trigger-ink: #4b5563;
	--tx-avatar-bg: #e5e7eb;
	--tx-shadow: 0 12px 32px rgba(17, 24, 39, .14), 0 2px 6px rgba(17, 24, 39, .06);
	--tx-focus: #2563eb;
	--tx-purple: #a855f7;   /* CHROME-SPEC §5: changelog / what's new */
}

#texs-chrome[hidden] { display: none; }

/* ── The hamburger ───────────────────────────────────────────────────────── */

#texs-chrome .tx-trigger {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 8px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--tx-trigger-ink);
	cursor: pointer;
	transition: color .15s ease, background-color .15s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	letter-spacing: normal;      /* TT1 letterspaces buttons */
	text-transform: none;
}

#texs-chrome .tx-trigger:hover,
#texs-chrome .tx-trigger[aria-expanded="true"] {
	color: var(--tx-ink);
	background: var(--tx-wash);
}

#texs-chrome .tx-trigger:focus-visible {
	outline: 2px solid var(--tx-focus);
	outline-offset: 2px;
}

#texs-chrome .tx-trigger svg {
	width: 24px;
	height: 24px;
	display: block;
}

/* ── The split flag/hamburger trigger (CHROME-SPEC §3) ───────────────────────
   On site pages with a language picker the flag + code sits on the hamburger's
   left as ONE control: the wrapper has the radius and the only hover wash, both
   halves are transparent with color: inherit. Never give .tx-flag or the
   wrapped .tx-trigger a :hover background of their own — that is the
   double-highlight trap the spec warns about. */
#texs-chrome .tx-button {
	display: inline-flex;
	align-items: center;
	border-radius: 8px;
	color: var(--tx-trigger-ink);
	transition: color .15s ease, background-color .15s ease;
}

#texs-chrome .tx-button:hover,
#texs-chrome .tx-button--open {
	color: var(--tx-ink);
	background: var(--tx-wash);
}

#texs-chrome .tx-button .tx-trigger,
#texs-chrome .tx-button .tx-trigger:hover,
#texs-chrome .tx-button .tx-trigger[aria-expanded="true"] {
	background: transparent;
	color: inherit;
}

#texs-chrome .tx-flag {
	display: flex;
	align-items: center;
	gap: 5px;
	height: 40px;
	padding: 8px 4px 8px 8px;     /* full height, tight on the inner edge */
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

#texs-chrome .tx-flag:hover { background: transparent; }

#texs-chrome .tx-flag:focus-visible {
	outline: 2px solid var(--tx-focus);
	outline-offset: 2px;
	border-radius: 8px;
}

/* System emoji, sized by font-size; the Twemoji <img> fallback is 1em square. */
#texs-chrome .tx-flag-emoji { font-size: 17px; line-height: 1; }
#texs-chrome .tx-lang-flag  { font-size: 16px; line-height: 1; }
#texs-chrome img.tx-flag-emoji,
#texs-chrome img.tx-lang-flag {
	width: 1em;
	height: 1em;
	max-width: none;
	display: inline-block;
	vertical-align: -0.125em;
	object-fit: contain;
}
#texs-chrome .tx-flag-code { font-size: 12px; font-weight: 600; letter-spacing: .02em; }

/* ── The language grid under the version row (CHROME-SPEC §6) ──────────────── */

#texs-chrome .tx-lang-toggle { gap: 6px; }
#texs-chrome .tx-chevron { display: flex; opacity: .5; transition: transform .2s ease; }
#texs-chrome .tx-chevron svg { width: 14px; height: 14px; }
#texs-chrome .tx-chevron.open { transform: rotate(180deg); }

/* Four across: 27 languages in seven rows. */
#texs-chrome .tx-langs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2px;
	padding: 6px 10px 8px;
}

#texs-chrome .tx-lang {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 6px;
	border-radius: 6px;
	color: var(--tx-muted);
	font-size: 12px;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: background-color .15s ease;
}

#texs-chrome .tx-lang:hover,
#texs-chrome .tx-lang:focus {
	background: var(--tx-wash);
	color: var(--tx-ink);
	text-decoration: none;
	box-shadow: none;
}

#texs-chrome .tx-lang--on { color: var(--tx-focus); font-weight: 600; }
#texs-chrome .tx-lang-code { font-size: 11px; font-weight: 600; }

/* ── The dark-mode toggle beside the hamburger ───────────────────────────────── */
/* poster-lang's .controls .theme geometry exactly: a 32px square with 8px
   padding and radius holding a 16px icon, quiet until the hover wash — a
   smaller square than the 40px trigger so the pair reads as the posters'
   “quiet control + menu”, not two hamburgers. Same TT1 specificity trap as
   .tx-trigger: the #texs-chrome prefix is load-bearing. */
#texs-chrome .tx-mode {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 8px;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--tx-trigger-ink);
	cursor: pointer;
	transition: color .15s ease, background-color .15s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	letter-spacing: normal;
	text-transform: none;
}

#texs-chrome .tx-mode:hover {
	color: var(--tx-ink);
	background: var(--tx-wash);
}

#texs-chrome .tx-mode:focus-visible {
	outline: 2px solid var(--tx-focus);
	outline-offset: 2px;
}

#texs-chrome .tx-mode svg {
	width: 16px;
	height: 16px;
	display: block;
}

/* ── The NYC clock ───────────────────────────────────────────────────────────
   Leftmost in the cluster. CHROME-SPEC.md §1 gives bare icons a 4px gap and
   anything text-shaped beside them 8px — the container's gap is 4px, so this
   adds the other 4px itself rather than changing a number the icon row
   depends on.

   Tabular figures because the width must not twitch as the minute changes:
   this sits 16px off the right edge, so a proportional "1" would walk the
   whole cluster sideways. Same TT1 specificity trap as everything else in
   this file — the #texs-chrome prefix is load-bearing. */
#texs-chrome .tx-clock {
	display: block;
	margin-right: 4px;
	padding: 0 2px;
	color: var(--tx-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	/* TT1 puts a bottom border on <time> in entry meta; this is not that. */
	border: 0;
	text-decoration: none;
	text-transform: none;
}

/* The colon blinks once a second, the way a bedside clock does.

   `step-end` rather than a fade: an eased opacity ramp reads as a pulse, and
   the thing being imitated is a hard on/off. `opacity`, never `display` or a
   width change — the cluster is anchored to the right edge, so a colon that
   stopped taking up space would twitch the whole row twice a second.

   It is animated in CSS rather than on a 500ms JS timer so the browser owns
   the cadence: a background tab throttles it for free, and it cannot drift
   from the minute tick. chrome.js keeps this element out of its repaint for
   the same reason — replacing the node would restart the animation and jump
   the blink's phase every minute. */
@keyframes tx-clock-blink {
	50% { opacity: 0; }
}

#texs-chrome .tx-clock-colon {
	animation: tx-clock-blink 1s step-end infinite;
}

/* ── The panel ───────────────────────────────────────────────────────────── */

#texs-chrome .tx-panel {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 4px;
	width: 288px;
	padding: 8px 0;
	border: 1px solid var(--tx-hairline);
	border-radius: 12px;
	background: var(--tx-surface);
	box-shadow: var(--tx-shadow);
	color: var(--tx-ink);
	text-align: start;        /* the panel takes the page's direction (chrome.js) */
}

#texs-chrome .tx-divider-bottom { border-bottom: 1px solid var(--tx-hairline); }
#texs-chrome .tx-divider-top    { border-top: 1px solid var(--tx-hairline); }

#texs-chrome .tx-section { padding: 4px 0; }

#texs-chrome .tx-label {
	padding: 6px 16px 2px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tx-faint);
}

/* The sites heading carries the globe, so it lays out as a row rather than as
   a bare caption. */
#texs-chrome .tx-label--globe {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* The globe's own colour, fixed across the family (spec §5). The two themes
   take different hues rather than one hue at two lightnesses: the red holds up
   on white, while on the dark panel it burns, so dark gets teal-300 instead. */
#texs-chrome .more-sites-icon { color: #ff1800; }
html.is-dark-theme #texs-chrome .more-sites-icon { color: #5eead4; }

/* ---- the turning globe ----
   The "More texs.org sites" mark, identical in every texs.org app — see
   ../../../CHROME-SPEC.md §5. Six meridian PAIRS evenly spread across the cycle (their
   delays are set inline where the SVG is built), each cut to the half facing
   the viewer. rx is a geometry property, so it animates from CSS in SVG — in
   user units, which is why these look unitless against a 0 0 24 24 viewBox.

   One cycle is a HALF rotation (φ: 0 → 180°), which is all it takes: at 180°
   the pair has swapped ends and the figure repeats. Hence:

     rx         = 10.5·sin φ, sampled at 22.5° steps — a meridian races through
                  the center and stalls at the limb, and linear rx is the thing
                  that reads as breathing rather than turning. The steps have to
                  be this fine near 50%: at the limb the true sine turns around
                  with zero velocity, and coarse sampling puts a hard V-bounce
                  there instead.
     dashoffset = 25 or 75, stepped at the handoffs — hidden-line removal. Only
                  the half currently facing the viewer is drawn; there is no
                  dimmed back half, so the whole mark is one flat colour.

   Turning RIGHT TO LEFT: the right half is the visible one while rx shrinks,
   the left half while it grows, so a meridian enters at the right limb, crosses
   the face and leaves at the left.

   ONE ellipse per pair covers both halves, because the dash offset alone says
   which half is drawn. rx interpolates and the offset must not (interpolating
   it would wipe the visible half around the ellipse), hence two animations with
   different timing functions rather than one set of keyframes.

   Both handoffs are invisible without any fade: at 50% rx is at its maximum, so
   the meridian lies exactly on the outline circle and the jump repaints the
   same pixels; at 100% rx is ~0, so both halves have collapsed onto the same
   line down the center.

   Slow on purpose: this sits beside a static list, and anything quicker turns a
   menu row into something that wants watching. */
#texs-chrome .more-sites-globe {
  flex-shrink: 0;
  overflow: visible;
}
#texs-chrome .more-sites-globe-m {
  animation:
    more-sites-globe-turn 9s linear infinite,
    more-sites-globe-half 9s step-end infinite;
}
@keyframes more-sites-globe-turn {
  0%     { rx: 0.1px; }
  12.5%  { rx: 4.018px; }
  25%    { rx: 7.425px; }
  37.5%  { rx: 9.701px; }
  45%    { rx: 10.371px; }
  50%    { rx: 10.5px; }
  55%    { rx: 10.371px; }
  62.5%  { rx: 9.701px; }
  75%    { rx: 7.425px; }
  87.5%  { rx: 4.018px; }
  100%   { rx: 0.1px; }
}
/* step-end holds each value for its whole segment, so this is a clean flip at
   50% and again at the loop point — never a sweep. The 100% stop is not
   optional: without it the implicit final keyframe would fall back to the
   element's own attribute, which differs per meridian. */
@keyframes more-sites-globe-half {
  0%, 100% { stroke-dashoffset: 75px; }
  50%      { stroke-dashoffset: 25px; }
}
/* rx never reaches 0 — SVG2 drops an ellipse whose rx is 0, which would blink
   the meridian out at every crossing. 0.1 user units is under a tenth of a
   device pixel at 16px, so the pair still lands on the center line. */

/* The markup's own staggered rx and dash offsets are the still frame, so
   switching the animation off is the whole opt-out — nothing to restate. */
@media (prefers-reduced-motion: reduce) {
	#texs-chrome .more-sites-globe-m { animation: none; }
}

/* ── The version row (CHROME-SPEC §6 — first thing in the panel) ─────────── */

#texs-chrome .tx-version {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 16px 10px;
}

#texs-chrome .tx-version-label {
	display: block;
	font-size: 9px;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tx-faint);
}

#texs-chrome .tx-version-value {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	line-height: 1;
	color: var(--tx-muted);
}

/* Left group: version stack, then the ⓘ (16px, purple) that opens What's new. */
#texs-chrome .tx-version-left {
	display: flex;
	align-items: center;
	gap: 6px;
}

#texs-chrome .tx-info {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--tx-purple);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	transition: background-color .15s ease;
}

#texs-chrome .tx-info:hover { background: var(--tx-wash); }
#texs-chrome .tx-info svg { width: 16px; height: 16px; display: block; }
#texs-chrome .tx-icon--purple { color: var(--tx-purple); }

/* The What's new row is a <button>; TT1 gives buttons its bold UI font. Match the link rows. */
#texs-chrome button.tx-item {
	font-family: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	border-radius: 0;
}

/* Right group of the version row: the bare 20px toggles, 12px apart. */
#texs-chrome .tx-toggles {
	display: flex;
	align-items: center;
	gap: 12px;
}

#texs-chrome .tx-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--tx-muted);
	cursor: pointer;
	transition: color .15s ease;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}

#texs-chrome .tx-toggle:hover { color: var(--tx-ink); }

#texs-chrome .tx-toggle:focus-visible {
	outline: 2px solid var(--tx-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

#texs-chrome .tx-toggle svg { width: 20px; height: 20px; display: block; }

/* ── Rows (CHROME-SPEC §5) ───────────────────────────────────────────────── */

#texs-chrome .tx-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 16px;
	border: 0;
	background: transparent;
	font-size: 14px;
	line-height: 1.3;
	color: var(--tx-ink);
	text-align: start;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease;
	box-sizing: border-box;
}

/* TT1 underlines and shadow-underlines every link in the flow; this is chrome. */
#texs-chrome .tx-item,
#texs-chrome .tx-item:hover,
#texs-chrome .tx-item:focus {
	text-decoration: none;
	box-shadow: none;
}

#texs-chrome .tx-item:hover { background: var(--tx-wash); }

#texs-chrome .tx-item:focus-visible {
	outline: 2px solid var(--tx-focus);
	outline-offset: -2px;
}

#texs-chrome .tx-icon {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#texs-chrome .tx-icon svg { width: 16px; height: 16px; display: block; }

#texs-chrome .tx-item-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Latin app names in the RTL panel: their trailing "?!" is a run of neutrals and
   printed as "!?What the G$*g!€ Font". plaintext lets each label take its own
   direction; text-align keeps it beside its icon (poster-lang's fix). */
#texs-chrome .tx-item-name { unicode-bidi: plaintext; }
#texs-chrome [dir="rtl"] .tx-item-name { text-align: right; }

/* ── Signed-in identity ──────────────────────────────────────────────────── */

#texs-chrome .tx-user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
}

#texs-chrome .tx-avatar {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--tx-avatar-bg) center / cover no-repeat;
	color: var(--tx-trigger-ink);
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

#texs-chrome .tx-user-text { min-width: 0; }

#texs-chrome .tx-user-name {
	display: block;
	font-size: 14px;
	color: var(--tx-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#texs-chrome .tx-user-plan {
	display: block;
	margin-top: 1px;
	font-size: 12px;
	color: var(--tx-muted);
}

/* ── Dark ────────────────────────────────────────────────────────────────── */

/*
 * Keyed off Twenty Twenty-One's own class rather than a class of ours, so the
 * chrome cannot drift out of step with the page: whatever puts the site into
 * dark — our menu toggle, TT1's footer button, the head script, or a second
 * tab — moves the chrome with it for free.
 */
html.is-dark-theme #texs-chrome {
	--tx-surface: #1f2430;
	--tx-ink: #f3f4f6;
	--tx-muted: #9ca3af;
	--tx-faint: #6b7280;
	--tx-hairline: rgba(255, 255, 255, .10);
	--tx-wash: rgba(255, 255, 255, .07);
	--tx-trigger-ink: #d1d5db;
	--tx-avatar-bg: #374151;
	--tx-shadow: 0 12px 32px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
	--tx-focus: #60a5fa;
	--tx-purple: #c084fc;
}

/* ── The logged-in admin bar ─────────────────────────────────────────────── */

/*
 * WordPress pushes the *document* down with `html { margin-top: 32px }`, but an
 * absolutely-positioned element resolves against the initial containing block,
 * which that margin does not move — so the cluster sits underneath the bar.
 * Offset it by the bar's own height instead.
 *
 * The home badge opposite has the same problem and the same fix. It is styled
 * from the shared https://texs.org/code/global.css, which other texs.org
 * projects also load, so it is corrected here rather than there — this file
 * only ever loads on this site.
 */
body.admin-bar #texs-chrome { top: 48px; }         /* 16 + 32 */
body.admin-bar a #menu      { top: 64px; }         /* 32 + 32 */

/* Below 782px WordPress's bar is 46px tall, and below 600px it scrolls away
   with the page instead of being fixed — at which point no offset is wanted. */
@media screen and (max-width: 782px) {
	body.admin-bar #texs-chrome { top: 62px; }     /* 16 + 46 */
	body.admin-bar a #menu      { top: 70px; }     /* 24 + 46 */
}

@media screen and (max-width: 600px) {
	body.admin-bar #texs-chrome { top: 16px; }
	body.admin-bar a #menu      { top: 24px; }
}

/* TT1 renders its own dark-mode button bottom-of-page when the theme mod is
   on. The menu owns that control here, so the button is hidden — not dequeued,
   because its script is what keeps `aria-pressed` and localStorage coherent. */
#dark-mode-toggler { display: none !important; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 380px) {
	#texs-chrome .tx-panel { width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
	#texs-chrome .tx-trigger,
	#texs-chrome .tx-toggle,
	#texs-chrome .tx-item { transition: none; }
	/* A blinking element is the plainest case this preference covers. The
	   colon stays, it just stops moving. */
	#texs-chrome .tx-clock-colon { animation: none; opacity: 1; }
}


/* ── What's new (the card the ⓘ and the menu row open) ─────────────────────
   Ported from poster-flag's .chlog. Its own mount on <body>, so it carries its
   own palette, scoped under its id against TT1's button and link rules. The list
   scrolls inside the card so the heading stays put. */

#texs-changelog {
	--cl-surface: #fff;
	--cl-ink: #111827;
	--cl-ink-2: #374151;
	--cl-muted: #6b7280;
	--cl-hairline: rgba(17, 24, 39, .1);
	--cl-band: #f5f3ff;
	--cl-link: #7c3aed;
	position: fixed;
	inset: 0;
	z-index: 10000;            /* over the chrome (9999) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vh 24px;
	background: rgba(17, 24, 39, .5);
	opacity: 0;
	transition: opacity .2s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html.is-dark-theme #texs-changelog {
	--cl-surface: #1f2430;
	--cl-ink: #f3f4f6;
	--cl-ink-2: #d1d5db;
	--cl-muted: #9ca3af;
	--cl-hairline: rgba(255, 255, 255, .12);
	--cl-band: rgba(192, 132, 252, .12);
	--cl-link: #c084fc;
	background: rgba(0, 0, 0, .6);
}

#texs-changelog[hidden] { display: none; }
#texs-changelog.on { opacity: 1; }

#texs-changelog .tx-cl-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(34rem, 100%);
	max-height: 100%;
	box-sizing: border-box;
	background: var(--cl-surface);
	color: var(--cl-ink);
	border-radius: 16px;
	padding: 30px clamp(20px, 4vw, 34px) 8px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	transform: translateY(8px);
	transition: transform .2s ease;
}

#texs-changelog.on .tx-cl-card { transform: none; }

/* Fade the last lines into the card rather than cutting them off. */
#texs-changelog .tx-cl-card::after {
	content: '';
	position: absolute;
	left: 1px;
	right: 1px;
	bottom: 1px;
	height: 44px;
	border-radius: 0 0 15px 15px;
	background: linear-gradient(to top, var(--cl-surface), transparent);
	pointer-events: none;
}

#texs-changelog .tx-cl-x,
#texs-changelog .tx-cl-x:hover,
#texs-changelog .tx-cl-x:focus {
	position: absolute;
	top: 12px;
	right: 14px;
	padding: 0 4px;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--cl-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

#texs-changelog .tx-cl-x:hover { color: var(--cl-ink); }

#texs-changelog h2 {
	margin: 0 0 6px;
	font: 700 20px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	letter-spacing: normal;
	color: var(--cl-ink);
}

#texs-changelog .tx-cl-sub {
	margin: 0 0 4px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--cl-muted);
}

#texs-changelog .tx-cl-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 0 26px;
	overscroll-behavior: contain;
}

#texs-changelog .tx-cl-date {
	display: inline-block;
	margin: 20px 0 8px;
	padding: 4px 10px;
	border: 1px solid var(--cl-hairline);
	border-radius: 7px;
	background: var(--cl-band);
	font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-variant-numeric: tabular-nums;
	color: var(--cl-ink);
}

#texs-changelog .tx-cl-body > .tx-cl-date:first-child { margin-top: 0; }

#texs-changelog .tx-cl-list {
	margin: 0;
	padding: 0 0 0 20px;
	list-style: disc;
}

#texs-changelog .tx-cl-list li {
	margin: 0 0 7px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--cl-ink-2);
}

#texs-changelog .tx-cl-list li::marker { color: var(--cl-muted); }
#texs-changelog .tx-cl-list b { color: var(--cl-ink); }
#texs-changelog .tx-cl-p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--cl-ink-2); }
#texs-changelog a { color: var(--cl-link); text-decoration: underline; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
	#texs-changelog, #texs-changelog .tx-cl-card { transition: none; }
}
