/* TurtleReport report screen. Scoped to .tly-app / .tly-rpt; the shell and base elements are in shell.css. */
/* Colours, type and sizes come from tokens.css (semantic tier). The PDF (.tly-rpt) always uses the light theme. */

.tly-app { color: var(--tly-ink); font: var(--tly-text-base)/var(--tly-leading) var(--tly-font); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: var(--tly-space-5); }
/* Tabular figures are for numbers that line up; in sentences they space out hyphens ("landing - page"). */
.tly-app p, .tly-app li, .tly-app summary, .tly-app .tly-hint, .tly-app .tly-lab, .tly-app .tly-vs, .tly-app .tly-gl-extra, .tly-app .tly-gl-was, .tly-app .tly-gl-prio, .tly-app .tly-gl-period { font-variant-numeric: normal; }
.tly-app * { box-sizing: border-box; }
.tly-app [hidden] { display: none !important; }
.tly-app a { color: var(--tly-accent); }
.tly-app :focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-app.is-loading #tly-main { opacity: .5; transition: opacity var(--tly-dur); }


/* buttons + inputs */
.tly-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--tly-space-2); height: var(--tly-ctl); border: 1px solid var(--tly-line-strong); background: var(--tly-surface); padding: 0 var(--tly-space-4); border-radius: var(--tly-radius); cursor: pointer; font: var(--tly-weight-medium) var(--tly-text-sm)/var(--tly-leading-none) var(--tly-font); letter-spacing: var(--tly-tracking); white-space: nowrap; text-decoration: none; color: var(--tly-ink); box-shadow: var(--tly-shadow-xs); transition: background-color var(--tly-dur) var(--tly-ease); }
body.tly-shell .wrap a.tly-btn, .tly-app a.tly-btn { color: var(--tly-ink); }
.tly-btn:hover { background: var(--tly-hover); }
.tly-btn:disabled { opacity: .5; cursor: default; }
.tly-btn-primary, body.tly-shell .wrap a.tly-btn-primary, .tly-app a.tly-btn-primary { background: var(--tly-primary); border-color: var(--tly-primary); color: var(--tly-on-primary); }
.tly-btn-primary:hover { background: var(--tly-primary-hover); border-color: var(--tly-primary-hover); }
.tly-btn-ghost, body.tly-shell .wrap a.tly-btn-ghost { border-color: transparent; background: none; box-shadow: none; color: var(--tly-ink-2); }
.tly-btn-sm { height: var(--tly-ctl-sm); padding: 0 var(--tly-space-3); font-size: var(--tly-text-xs); border-radius: var(--tly-radius); }
body.tly-shell .wrap .tly-app select, body.tly-shell .wrap .tly-app input[type=search] { height: var(--tly-ctl); min-height: var(--tly-ctl); padding: 0 var(--tly-space-3); border: 1px solid var(--tly-line-input); border-radius: var(--tly-radius); background-color: var(--tly-surface); width: 100%; max-width: none; min-width: 0; font: var(--tly-text-base) var(--tly-font); color: var(--tly-ink); }
body.tly-shell .wrap .tly-app select { padding-right: var(--tly-space-8); }

.tly-filters { display: flex; flex-wrap: wrap; gap: var(--tly-space-3); align-items: flex-end; background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-4) var(--tly-space-5); box-shadow: var(--tly-shadow-xs); }
.tly-field { display: flex; flex-direction: column; gap: var(--tly-space-2); min-width: 0; }
.tly-app .tly-lbl { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-muted); margin: 0; }
.tly-banner { background: var(--tly-warn-bg); color: var(--tly-warn-ink); border: 1px solid var(--tly-warn-line); border-radius: var(--tly-radius); padding: var(--tly-space-3) var(--tly-space-4); font-size: var(--tly-text-sm); }
.tly-error { background: var(--tly-bad-bg); color: var(--tly-bad-ink); border: 1px solid var(--tly-bad-line); border-radius: var(--tly-radius); padding: var(--tly-space-3) var(--tly-space-4); font-size: var(--tly-text-sm); }

#tly-main { display: flex; flex-direction: column; gap: var(--tly-space-5); }
.tly-title { display: flex; flex-direction: column; gap: var(--tly-space-1); padding-top: var(--tly-space-1); }
.tly-app .tly-title h2 { font-size: var(--tly-text-2xl); line-height: var(--tly-leading-tight); font-weight: var(--tly-weight-semibold); letter-spacing: var(--tly-tracking-tight); margin: 0; color: var(--tly-ink); }
.tly-meta { color: var(--tly-muted); font-size: var(--tly-text-sm); }
.tly-summary { margin: var(--tly-space-2) 0 0; font-size: var(--tly-text-base); color: var(--tly-ink-2); max-width: var(--tly-measure); }
.tly-summary b { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); }
.tly-app .up { color: var(--tly-good-ink); }
.tly-app .down { color: var(--tly-bad-ink); }

.tly-app .tly-sec { display: flex; align-items: baseline; gap: var(--tly-space-2); padding-top: var(--tly-space-3); }
.tly-app .tly-sec h2 { font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); margin: 0; }
.tly-app .tly-sec span { color: var(--tly-muted); font-size: var(--tly-text-sm); }

/* tiles */
.tly-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--tly-space-3); }
/* Even rows: never one tile left alone on the last row. */
@media (min-width: 783px) {
	.tly-tiles:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tly-tiles:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
	.tly-tiles:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.tly-tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.tly-tile { display: flex; flex-direction: column; align-items: stretch; gap: var(--tly-space-2); text-align: left; background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-4) var(--tly-space-4) var(--tly-space-3); cursor: pointer; min-width: 0; min-height: 138px; box-shadow: var(--tly-shadow-xs); font: inherit; color: var(--tly-ink); transition: border-color var(--tly-dur) var(--tly-ease), box-shadow var(--tly-dur) var(--tly-ease); }
.tly-tile:hover { border-color: var(--tly-line-strong); }
/* Selection is neutral; the series colour stays on the swatch and the chart. */
.tly-tile[aria-pressed=true] { border-color: var(--tly-ink); background: var(--tly-subtle); }
.tly-tile .tly-lab { display: flex; align-items: center; gap: var(--tly-space-2); font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); color: var(--tly-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tly-tile .tly-lab i { width: 8px; height: 8px; border-radius: var(--tly-radius-xs); background: var(--c); flex: none; }
.tly-row { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; }
.tly-tile .tly-big { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); letter-spacing: var(--tly-tracking-tight); line-height: 32px; }
.tly-tile svg { width: 100%; height: 30px; display: block; margin-top: auto; }
.tly-tile.is-na { cursor: default; opacity: 1; }
.tly-tile.is-na .tly-big { font-size: var(--tly-text-base); font-weight: var(--tly-weight-medium); color: var(--tly-muted); letter-spacing: 0; line-height: var(--tly-leading-snug); }
.tly-chip { display: inline-flex; align-items: center; height: var(--tly-badge-h); padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); white-space: nowrap; background: var(--tly-flat-bg); color: var(--tly-muted); }
.tly-chip.good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-chip.bad { background: var(--tly-bad-bg); color: var(--tly-bad-ink); }
.tly-vs { font-size: var(--tly-text-xs); color: var(--tly-muted); white-space: nowrap; }
.tly-app .good, .tly-rpt .good { color: var(--tly-good-ink); }
.tly-app .bad, .tly-rpt .bad { color: var(--tly-bad-ink); }
.tly-app .flat, .tly-rpt .flat { color: var(--tly-muted); }

/* cards */
.tly-grid { display: grid; gap: var(--tly-space-5); }
/* Two-column splits use the golden ratio (1.618 : 1). */
.tly-g-main { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
.tly-g-half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tly-g-kw { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); }
.tly-card { background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-5); min-width: 0; display: flex; flex-direction: column; gap: var(--tly-space-4); box-shadow: var(--tly-shadow-xs); }
.tly-ch { display: flex; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); flex-wrap: wrap; min-height: 32px; }
.tly-app .tly-ch h3 { font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); margin: 0; color: var(--tly-ink); }
.tly-hint { color: var(--tly-muted); font-size: var(--tly-text-sm); }
.tly-right { margin-left: auto; display: flex; gap: var(--tly-space-2); align-items: center; }
.tly-chartbox { position: relative; height: 290px; }
.tly-chartbox.tly-short { height: 250px; }
.tly-chartbox.tly-mini { height: 190px; }
.tly-chartbox.tly-grow { flex: 1; min-height: 290px; height: auto; }
.tly-empty { color: var(--tly-muted); font-size: var(--tly-text-sm); padding: var(--tly-space-6) var(--tly-space-2); text-align: center; line-height: var(--tly-leading); }
.tly-app .tly-note { font-size: var(--tly-text-xs); color: var(--tly-muted); line-height: var(--tly-leading); }
.tly-callout { background: var(--tly-subtle); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-4); display: flex; flex-direction: column; gap: var(--tly-space-2); font-size: var(--tly-text-sm); color: var(--tly-ink-2); line-height: var(--tly-leading); }
.tly-callout strong { color: var(--tly-ink); }

/* leads */
.tly-lead-total { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; }
.tly-lead-total .tly-big { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); letter-spacing: var(--tly-tracking-tight); line-height: 32px; color: var(--tly-lead); }
.tly-bars { display: flex; flex-direction: column; gap: var(--tly-space-3); }
.tly-barrow { display: grid; grid-template-columns: minmax(0, 1fr) 3.5em 3.8em; gap: var(--tly-space-2) var(--tly-space-2); align-items: center; }
.tly-barrow .n { text-align: right; font-weight: var(--tly-weight-semibold); }
.tly-barrow .d { text-align: right; font-size: var(--tly-text-xs); }
.tly-track { grid-column: 1 / -1; height: 6px; background: var(--tly-flat-bg); border-radius: var(--tly-radius-xs); overflow: hidden; }
.tly-track .tly-fill { height: 100%; background: var(--tly-lead); border-radius: var(--tly-radius-sm); }
.tly-minilist { display: flex; flex-direction: column; gap: var(--tly-space-2); border-top: 1px solid var(--tly-line); padding-top: var(--tly-space-4); margin-top: auto; }
.tly-minilist .t { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-muted); }
.tly-minilist .r { display: grid; grid-template-columns: minmax(0, 1fr) 3em; gap: var(--tly-space-2); font-size: var(--tly-text-sm); }
.tly-minilist .r span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tly-minilist .r span:last-child { text-align: right; font-weight: var(--tly-weight-semibold); }

/* business profile + AI */
.tly-gbp-body, .tly-ai-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); gap: var(--tly-space-5); align-items: stretch; }
.tly-ai-body { align-items: start; }
.tly-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-2); }
.tly-stat { background: var(--tly-subtle); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-3) var(--tly-space-4); display: flex; flex-direction: column; gap: var(--tly-space-2); min-width: 0; }
.tly-stat .tly-lab { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-muted); }
.tly-stat .tly-big { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); letter-spacing: var(--tly-tracking-tight); line-height: 32px; }
.tly-stat.is-call .tly-big { color: var(--tly-call); }
.tly-stat.is-ai .tly-big { color: var(--tly-ai); }
.tly-stat.is-lead .tly-big { color: var(--tly-lead); }
.tly-ai-side { display: flex; flex-direction: column; gap: var(--tly-space-3); min-width: 0; }
.tly-subt { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-muted); }
.tly-srcs { display: flex; gap: var(--tly-space-2); flex-wrap: wrap; }
.tly-src { display: inline-flex; align-items: center; gap: var(--tly-space-2); height: 24px; padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-subtle); border: 1px solid var(--tly-line); font-size: var(--tly-text-xs); color: var(--tly-ink-2); }
.tly-src b { font-weight: var(--tly-weight-semibold); color: var(--tly-ink); }

/* tables */
.tly-scroll { overflow-x: auto; min-width: 0; }
.tly-app table { border-collapse: collapse; width: 100%; font-size: var(--tly-text-sm); }
.tly-app th, .tly-app td { padding: var(--tly-space-3); text-align: right; white-space: nowrap; border-bottom: 1px solid var(--tly-line); vertical-align: middle; }
.tly-app th:first-child, .tly-app td:first-child { text-align: left; padding-left: 0; }
.tly-app th:last-child, .tly-app td:last-child { padding-right: 0; }
.tly-app th { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-muted); border-bottom-color: var(--tly-line-strong); padding-top: 0; }
.tly-app tbody tr:last-child td { border-bottom: 0; }
.tly-app tbody tr:hover td { background: var(--tly-hover); }
.tly-app td.key { width: 100%; max-width: 0; }
.tly-app td.key > a, .tly-app td.key > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tly-ink); text-decoration: none; }
.tly-app td.key > a:hover { text-decoration: underline; }
.tly-app td.key > a:focus-visible, .tly-app td.key > span:focus-visible { white-space: normal; overflow-wrap: anywhere; outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius); }
.tly-app .tly-sort { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; cursor: pointer; user-select: none; border-radius: var(--tly-radius-sm); }
.tly-app .tly-sort:hover, .tly-app th[aria-sort] .tly-sort { color: var(--tly-ink); }
.tly-bar-chg { display: inline-grid; grid-template-columns: 3.6em 40px; gap: var(--tly-space-2); align-items: center; }
.tly-bar-chg span { text-align: right; }
.tly-bar-chg i { display: block; height: 6px; border-radius: var(--tly-radius-sm); min-width: 3px; justify-self: start; }
.tly-bar-chg.good i { background: var(--tly-good); }
.tly-bar-chg.bad i { background: var(--tly-bad); }
.tly-vd { display: inline-grid; grid-template-columns: auto 2.8em; gap: var(--tly-space-2); align-items: baseline; }
.tly-vd .d { text-align: left; font-size: var(--tly-text-xs); }
/* Headings over a number with a change or bar after it line up with the number, not with the end of the cell. */
.tly-app th.is-vd { padding-right: calc(10px + 2.8 * 13px + 6px); }
.tly-app th.is-vd:last-child { padding-right: calc(2.8 * 13px + 6px); white-space: normal; line-height: var(--tly-leading-tight); }
/* A long conversion label wraps to two lines at most. */
.tly-app th.is-vd:last-child > span { display: inline-block; min-width: 7em; max-width: 7.5em; }
.tly-app th.is-bar { padding-right: calc(10px + 40px + 8px); }
.tly-tag { display: inline-flex; align-items: center; height: 20px; font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-flat-bg); color: var(--tly-muted); }
.tly-tag.is-new { background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-tag.is-gone { background: var(--tly-bad-bg); color: var(--tly-bad-ink); }

/* rankings */
.tly-p1 { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; }
.tly-p1 .tly-big { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); letter-spacing: var(--tly-tracking-tight); line-height: 32px; }
.tly-p1 .t { color: var(--tly-ink-2); }
.tly-buckets { display: flex; flex-direction: column; justify-content: space-evenly; gap: var(--tly-space-3); flex: 1; max-height: 420px; border-top: 1px solid var(--tly-line); padding-top: var(--tly-space-4); }
.tly-bucket { display: grid; grid-template-columns: 52px minmax(0, 1fr) 3em 3.4em; gap: var(--tly-space-2); align-items: center; font-size: var(--tly-text-sm); }
.tly-bucket b { font-weight: var(--tly-weight-semibold); }
.tly-bucket .tr { display: flex; flex-direction: column; gap: var(--tly-space-1); }
.tly-bucket .b1, .tly-bucket .b0 { height: 8px; border-radius: var(--tly-radius-sm); min-width: 3px; }
.tly-bucket .b1 { background: var(--tly-pos); }
.tly-bucket .b0 { background: var(--tly-series-prev); }
.tly-bucket .n { text-align: right; font-weight: var(--tly-weight-semibold); }
.tly-bucket .d { text-align: right; font-size: var(--tly-text-xs); }
.tly-legend { display: flex; gap: var(--tly-space-4); font-size: var(--tly-text-xs); color: var(--tly-muted); }
.tly-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--tly-radius-xs); margin-right: var(--tly-space-2); vertical-align: -1px; }

/* detail tabs */
.tly-tabs { display: flex; gap: var(--tly-space-1); flex-wrap: wrap; border-bottom: 1px solid var(--tly-line); margin: -4px 0 0; }
.tly-tabs button { border: 0; background: none; padding: var(--tly-space-3) var(--tly-space-3); cursor: pointer; color: var(--tly-muted); font: var(--tly-weight-medium) var(--tly-text-base) var(--tly-font); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tly-tabs button:hover { color: var(--tly-ink); }
.tly-tabs button[aria-selected=true] { color: var(--tly-ink); border-bottom-color: var(--tly-primary); }
.tly-tools { display: flex; gap: var(--tly-space-2); flex-wrap: wrap; align-items: center; }
.tly-app .tly-tools input { flex: 1; width: 200px; }
.tly-count { color: var(--tly-muted); font-size: var(--tly-text-sm); }
.tly-more { display: flex; justify-content: center; }
.tly-footer { color: var(--tly-muted); font-size: var(--tly-text-xs); max-width: var(--tly-measure); display: flex; flex-direction: column; gap: var(--tly-space-2); padding-top: var(--tly-space-3); border-top: 1px solid var(--tly-line); margin-top: var(--tly-space-2); }

@media (max-width: 1100px) {
	.tly-g-main, .tly-g-half, .tly-g-kw, .tly-gbp-body, .tly-ai-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
	.tly-filters { grid-template-columns: minmax(0, 1fr); }
	.tly-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tly-tile .tly-big { font-size: var(--tly-text-2xl); }
	.tly-chartbox { height: 240px; }
	.tly-card { padding: var(--tly-space-4); }
}
@media (prefers-reduced-motion: reduce) {
	.tly-app * { transition: none !important; }
}

/* PDF report (rendered off-screen at A4 width) */
#tly-rptHost { position: fixed; left: -12000px; top: 0; width: 794px; pointer-events: none; }
/* The PDF is drawn by html2canvas, which places text using the page's layout but draws it without
   OpenType features or letter-spacing, leaving gaps ("Oct 12 , 2026", "1 45"). So the PDF uses
   static system fonts, proportional digits and no letter-spacing; the screen keeps Inter. */
.tly-rpt { --tly-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.tly-rpt, .tly-rpt * { font-variant-numeric: normal !important; letter-spacing: 0 !important; font-feature-settings: normal !important; }
body.tly-shell .wrap .tly-rpt h2, body.tly-shell .wrap .tly-rpt h3 { font-family: var(--tly-font); }
.tly-rpt { color: var(--tly-ink); font: 12px/1.5 var(--tly-font); width: 794px; background: #fff; font-variant-numeric: tabular-nums; }
.tly-rpt * { box-sizing: border-box; }
.tly-rpt .r-page { width: 794px; height: 1123px; background: #fff; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 24px; }
.tly-rpt .r-cover { flex: none; background: var(--tly-accent); color: #fff; padding: 28px 40px 26px; display: flex; flex-direction: column; gap: 6px; }
.tly-rpt .r-cover-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 12px; }
.tly-rpt .r-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13px; }
.tly-rpt .r-prep { opacity: .8; }
.tly-rpt .r-site { font-size: 13px; font-weight: 500; opacity: .85; }
body.tly-shell .wrap .tly-rpt .r-cover h1, .tly-rpt .r-cover h1 { margin: 0; padding: 0; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.tly-rpt .r-dates { font-size: 12px; opacity: .85; }
.tly-rpt .r-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 22px 40px 14px; border-bottom: 1px solid var(--tly-line); font-size: 12px; color: var(--tly-muted); }
.tly-rpt .r-head .r-brand { color: var(--tly-ink); }
.tly-rpt .r-body { flex: 1; min-height: 0; overflow: hidden; padding: 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.tly-rpt .r-body > * { flex: none; }
.tly-rpt .r-foot { flex: none; height: 40px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--tly-line); font-size: 10px; color: var(--tly-muted); }
.tly-rpt .r-summary { margin: 0; font-size: 14px; line-height: 1.6; color: var(--tly-ink-2); }
.tly-rpt .r-summary b { color: var(--tly-ink); font-weight: 600; }
.tly-rpt .r-summary .up { color: var(--tly-good-ink); }
.tly-rpt .r-summary .down { color: var(--tly-bad-ink); }
.tly-rpt .r-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tly-rpt .r-kpi { border: 1px solid var(--tly-line); border-top: 3px solid var(--c); border-radius: var(--tly-radius); padding: 11px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.tly-rpt .r-lab { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 500; color: var(--tly-muted); }
.tly-rpt .r-lab i { display: block; width: 8px; height: 8px; border-radius: var(--tly-radius-xs); background: var(--c); }
.tly-rpt .r-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.tly-rpt .r-row { display: flex; align-items: center; gap: 8px; }
.tly-rpt .r-sec { border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.tly-rpt .r-h { display: flex; align-items: baseline; gap: 10px; }
.tly-rpt .r-h h2 { margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: var(--tly-ink); }
.tly-rpt .r-h span { font-size: 11px; color: var(--tly-muted); }
.tly-rpt .r-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.tly-rpt .r-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tly-rpt .r-stat { background: var(--tly-subtle); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.tly-rpt .r-stat .r-big { font-size: 20px; }
.tly-rpt .r-stat.is-ai .r-big { color: var(--tly-ai); }
.tly-rpt .r-stat.is-lead .r-big { color: var(--tly-lead); }
.tly-rpt .r-stat.is-call .r-big { color: var(--tly-call); }
.tly-rpt .r-subt { font-size: 10.5px; font-weight: 600; color: var(--tly-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.tly-rpt .r-total { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tly-rpt .r-num { font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.tly-rpt .r-num.is-lead { color: var(--tly-lead); }
.tly-rpt .r-bars { display: flex; flex-direction: column; gap: 10px; }
.tly-rpt .r-bar { display: grid; grid-template-columns: minmax(0, 1fr) 40px 44px; gap: 4px 8px; align-items: center; font-size: 12px; }
.tly-rpt .r-bar .n { text-align: right; font-weight: 600; }
.tly-rpt .r-bar .d { text-align: right; font-size: 11px; }
.tly-rpt .r-track { grid-column: 1 / -1; height: 5px; background: var(--tly-flat-bg); border-radius: var(--tly-radius-xs); overflow: hidden; }
.tly-rpt .r-fill { height: 100%; background: var(--tly-lead); border-radius: var(--tly-radius-xs); }
.tly-rpt .r-li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--tly-line); font-size: 12px; }
.tly-rpt .r-li:last-child { border-bottom: 0; }
.tly-rpt .r-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; }
.tly-rpt .r-table th { font-size: 10.5px; font-weight: 500; color: var(--tly-muted); text-align: right; padding: 0 6px 7px; border-bottom: 1px solid var(--tly-line-strong); white-space: normal; overflow-wrap: anywhere; }
.tly-rpt .r-table td { text-align: right; padding: 6px; border-bottom: 1px solid var(--tly-line); white-space: nowrap; overflow: hidden; }
.tly-rpt .r-table th:first-child, .tly-rpt .r-table td:first-child { text-align: left; padding-left: 0; }
.tly-rpt .r-table th:last-child, .tly-rpt .r-table td:last-child { padding-right: 0; }
.tly-rpt .r-table tr:last-child td { border-bottom: 0; }
.tly-rpt .r-src { display: flex; flex-wrap: wrap; gap: 6px; }
.tly-rpt .r-src span { border: 1px solid var(--tly-line); background: var(--tly-subtle); border-radius: var(--tly-radius-xs); padding: 3px 10px; font-size: 11px; color: var(--tly-ink-2); }
.tly-rpt .r-note { font-size: 11.5px; color: var(--tly-muted); line-height: 1.5; }
.tly-rpt .r-bucks { display: flex; flex-direction: column; gap: 10px; }
.tly-rpt .r-buck { display: grid; grid-template-columns: 52px minmax(0, 1fr) 40px 44px; gap: 10px; align-items: center; font-size: 12px; }
.tly-rpt .r-buck .tr { display: flex; flex-direction: column; gap: 3px; }
.tly-rpt .r-buck .b1, .tly-rpt .r-buck .b0 { height: 7px; border-radius: var(--tly-radius-sm); min-width: 3px; }
.tly-rpt .r-buck .b1 { background: var(--tly-pos); }
.tly-rpt .r-buck .b0 { background: var(--tly-series-prev); }
.tly-rpt .r-buck .n { text-align: right; font-weight: 600; }
.tly-rpt .r-buck .d { text-align: right; font-size: 11px; }
.tly-rpt .r-legend { display: flex; gap: 16px; font-size: 11px; color: var(--tly-muted); }
.tly-rpt .r-legend i { display: inline-block; width: 9px; height: 9px; border-radius: var(--tly-radius-xs); margin-right: 6px; }
.tly-rpt .r-notes { font-size: 10px; color: var(--tly-muted); line-height: 1.55; display: flex; flex-direction: column; gap: 5px; }
.tly-rpt .tly-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: var(--tly-radius-sm); font-size: 11px; font-weight: 600; background: var(--tly-flat-bg); color: var(--tly-muted); }
.tly-rpt .tly-chip.good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-rpt .tly-chip.bad { background: var(--tly-bad-bg); color: var(--tly-bad-ink); }
.tly-rpt .tly-vs { font-size: 11px; color: var(--tly-muted); }

/* sections added by per-site collection settings */
#tly-searchBlock { display: flex; flex-direction: column; gap: var(--tly-space-5); }
.tly-stats.tly-stats-wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* filters, branding, segments, data tables */
.tly-filters > .tly-field { flex: 1 1 200px; max-width: 280px; }
.tly-custom { display: flex; gap: var(--tly-space-2); align-items: flex-end; flex-wrap: wrap; }
.tly-custom .tly-field { width: 160px; }
body.tly-shell .wrap .tly-app input[type=date] { height: var(--tly-ctl); padding: 0 var(--tly-space-3); }
.tly-app .tly-brand-logo { display: block; height: 32px; width: auto; max-width: 180px; }
.tly-linkbtn { border: 0; background: none; padding: 0; color: var(--tly-accent); font: var(--tly-weight-semibold) var(--tly-text-sm) var(--tly-font); cursor: pointer; text-align: left; }
.tly-linkbtn:hover { text-decoration: underline; }
.tly-datatable { font-size: var(--tly-text-sm); color: var(--tly-muted); }
.tly-datatable summary { cursor: pointer; width: max-content; }
.tly-datatable summary:hover { color: var(--tly-ink); }
.tly-datatable .tly-scroll { max-height: 280px; overflow: auto; margin-top: var(--tly-space-2); }
.tly-rpt .r-logo { display: block; width: auto; max-width: 160px; background: #fff; border-radius: var(--tly-radius-sm); padding: 3px; }
.tly-rpt .r-head .r-logo { border: 1px solid var(--tly-line); }
.tly-rpt .r-cover-right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 782px) { .tly-filters > .tly-field { max-width: none; } }

/* Read-only comparison range next to the period picker (every period compares with the one before it). */
.tly-compare-text { display: flex; align-items: center; min-height: 36px; color: var(--tly-ink-2); font-size: var(--tly-text-sm); white-space: nowrap; }

/* Period quick buttons (7 days · 28 days · 3 months · 6 months · Custom) and the compare switch.
   Every control in the filter bar is exactly --tly-ctl tall, so the labels line up. */
.tly-filters > .tly-period-field, .tly-filters > .tly-compare-field { flex: 0 1 auto; max-width: none; }
.tly-seg { box-sizing: border-box; display: inline-flex; height: var(--tly-ctl); border: 1px solid var(--tly-line-input); border-radius: var(--tly-radius-sm); overflow: hidden; background: var(--tly-surface); }
body.tly-shell .wrap .tly-app .tly-seg-btn { appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; height: 100%; min-height: 0; margin: 0; padding: 0 var(--tly-space-4); border: 0; border-left: 1px solid var(--tly-line); border-radius: 0; background: transparent; box-shadow: none; color: var(--tly-ink-2); font: inherit; font-size: var(--tly-text-base); font-weight: var(--tly-weight-medium); line-height: var(--tly-leading-none); cursor: pointer; white-space: nowrap; }
body.tly-shell .wrap .tly-app .tly-seg-btn:first-child { border-left: 0; }
body.tly-shell .wrap .tly-app .tly-seg-btn:hover { background: var(--tly-flat-bg); color: var(--tly-ink); }
body.tly-shell .wrap .tly-app .tly-seg-btn[aria-pressed="true"], body.tly-shell .wrap .tly-app .tly-seg-btn[aria-pressed="true"]:hover { background: var(--tly-ink); color: var(--tly-surface); font-weight: var(--tly-weight-semibold); }
/* The frame clips an outer ring, so the focus ring sits inside the button. */
body.tly-shell .wrap .tly-app .tly-seg-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--tly-accent-mark); }
.tly-compare-row { display: flex; align-items: center; gap: var(--tly-space-3); height: var(--tly-ctl); }
.tly-compare-toggle { display: inline-flex; align-items: center; gap: var(--tly-space-2); margin: 0; color: var(--tly-ink); font-size: var(--tly-text-base); white-space: nowrap; cursor: pointer; }
body.tly-shell .wrap .tly-app .tly-compare-toggle input[type=checkbox] { margin: 0; }
.tly-compare-field .tly-compare-text { display: inline; min-height: 0; color: var(--tly-muted); font-size: var(--tly-text-sm); white-space: nowrap; }
.tly-compare-field .tly-compare-text[hidden] { display: none; }
#tly-periodSelect[hidden] { display: none !important; }
/* Comparison off: hide every change chip and "vs" note. */
.tly-no-compare .tly-chip, .tly-no-compare .tly-vs, .tly-no-compare .tly-vd .d { display: none !important; }
@media (max-width: 782px) { .tly-seg { display: flex; width: 100%; } body.tly-shell .wrap .tly-app .tly-seg-btn { flex: 1 1 auto; justify-content: center; padding: 0 var(--tly-space-2); } .tly-compare-row { flex-wrap: wrap; height: auto; min-height: var(--tly-ctl); } }

/* At a glance, then details on request */
.tly-insights { gap: var(--tly-space-4); }
.tly-insights .tly-summary { margin: 0; max-width: var(--tly-measure); font-size: var(--tly-text-base); line-height: var(--tly-leading); }
.tly-ins-go { flex: none; min-height: 24px; margin: 0; padding: 2px var(--tly-space-2); border: 0; border-radius: var(--tly-radius-sm); background: none; color: var(--tly-accent); font: var(--tly-weight-medium) var(--tly-text-xs)/var(--tly-leading) var(--tly-font); cursor: pointer; }
.tly-ins-go:hover { background: var(--tly-hover); text-decoration: underline; }

/* Details: each section shows a one-line summary and opens on request. */
.tly-details-bar { align-items: center; padding-top: var(--tly-space-2); }
.tly-details-bar .tly-fold-all { margin-left: auto; font-size: var(--tly-text-sm); }
#tly-main [data-fold] { scroll-margin-top: 72px; }
.tly-fold-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); }
.tly-fold-sum { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-5); margin-left: auto; color: var(--tly-ink-2); font-size: var(--tly-text-sm); }
.tly-fold-sum:empty { display: none; }
.tly-fold-part { display: inline-flex; align-items: center; gap: var(--tly-space-2); white-space: nowrap; }
.tly-fold-k { color: var(--tly-muted); }
.tly-fold-part b { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); }
.tly-fold-btn { display: inline-flex; align-items: center; gap: var(--tly-space-2); height: var(--tly-ctl-sm); margin: 0; padding: 0 var(--tly-space-3) 0 var(--tly-space-3); border: 1px solid var(--tly-line-strong); border-radius: var(--tly-radius-sm); background: var(--tly-surface); color: var(--tly-ink); font: var(--tly-weight-medium) var(--tly-text-sm)/var(--tly-leading-none) var(--tly-font); white-space: nowrap; cursor: pointer; }
.tly-fold-btn:hover { background: var(--tly-hover); }
.tly-fold-sum:empty + .tly-fold-btn, .tly-fold-head > .tly-fold-btn:only-of-type:first-child { margin-left: auto; }
.tly-fold-btn svg { transition: transform var(--tly-dur) var(--tly-ease); }
.is-open > .tly-fold-head .tly-fold-btn svg { transform: rotate(180deg); }
/* A closed card is just its heading row. */
.tly-card.tly-fold:not(.is-open) { gap: 0; }
/* Pages and Keywords hold two cards each: the group is the card, the inner cards sit flat inside it. */
.tly-fold-group { display: flex; flex-direction: column; gap: var(--tly-space-4); min-width: 0; padding: var(--tly-space-5); background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); box-shadow: var(--tly-shadow-xs); }
.tly-fold-group > .tly-sec { padding-top: 0; min-height: 32px; }
.tly-app .tly-fold-group > .tly-sec h2 { font-size: var(--tly-text-md); }
.tly-fold-group .tly-card { box-shadow: none; }

/* Closed sections share one grid: title, hint, summary, button, so every row lines up. */
@media (min-width: 783px) {
	.tly-app .tly-fold-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: var(--tly-space-3); }
	.tly-app .tly-fold-head > :is(h2, h3) { grid-column: 1; }
	.tly-app .tly-fold-head > span:not(.tly-fold-sum) { grid-column: 2; min-width: 0; }
	.tly-app .tly-fold-head > .tly-fold-sum { grid-column: 3; margin-left: 0; justify-content: flex-end; }
	.tly-app .tly-fold-head > .tly-fold-btn { grid-column: 4; margin-left: 0; }
}

/* About this data */
.tly-about > summary { width: max-content; max-width: 100%; color: var(--tly-muted); font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); cursor: pointer; }
.tly-about > summary:hover { color: var(--tly-ink); }
.tly-about .tly-footer { margin-top: var(--tly-space-3); padding-top: 0; border-top: 0; }

/* Phones: the period buttons share the width; closed sections put the summary under the title. */
@media (max-width: 782px) {
	.tly-fold-head .tly-hint { display: none; }
	.tly-fold-head > .tly-fold-btn { margin-left: auto; }
	.tly-fold-head .tly-fold-sum { order: 3; flex-basis: 100%; margin-left: 0; }
	.tly-fold-group > .tly-sec > span:not(.tly-fold-sum) { display: none; }
	.tly-fold-group { padding: var(--tly-space-4); }
	.tly-details-bar > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tly-fold-btn svg { transition: none; } }
/* Closed sections stay short so the list of details scans quickly. */
.tly-card.tly-fold:not(.is-open), .tly-fold-group:not(.is-open) { padding-top: var(--tly-space-4); padding-bottom: var(--tly-space-4); }
@media (max-width: 480px) {
	/* Five period buttons on two rows instead of squeezed into one. */
	.tly-app .tly-period-field { width: 100%; }
	.tly-app #tly-periodSeg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; height: auto; }
	body.tly-shell .wrap .tly-app .tly-seg-btn { justify-content: center; height: 36px; padding: 0 var(--tly-space-1); border-left: 1px solid var(--tly-line); border-top: 1px solid var(--tly-line); font-size: var(--tly-text-sm); }
	body.tly-shell .wrap .tly-app .tly-seg-btn:nth-child(3n+1) { border-left: 0; }
	body.tly-shell .wrap .tly-app .tly-seg-btn:nth-child(-n+3) { border-top: 0; }
}

/* At a glance answers three questions */
.tly-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tly-gl-q { display: flex; flex-direction: column; gap: var(--tly-space-2); min-width: 0; }
.tly-app .tly-gl-q h4 { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0; font-size: var(--tly-text-sm); font-weight: var(--tly-weight-semibold); color: var(--tly-ink-2); }
.tly-gl-q h4::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tly-accent); }
.tly-gl-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--tly-space-4); }
/* Stat columns, not nested cards: a hairline rule separates them and survives wrapping. */
.tly-gl-metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 2px 0 2px var(--tly-space-3); border-left: 1px solid var(--tly-line-strong); }
.tly-gl-lab { font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); color: var(--tly-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tly-gl-val { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-1) var(--tly-space-2); }
.tly-gl-num { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); line-height: 32px; letter-spacing: var(--tly-tracking-tight); color: var(--tly-ink); }
.tly-gl-was { font-size: var(--tly-text-sm); color: var(--tly-muted); }
.tly-gl-val .tly-chip { font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); }
.tly-no-compare .tly-gl-was { display: none; }
.tly-gl-note { display: flex; gap: var(--tly-space-2); align-items: flex-start; margin: var(--tly-space-3) 0 0; padding: var(--tly-space-3) var(--tly-space-3); border-radius: var(--tly-radius); background: var(--tly-warn-bg); color: var(--tly-warn-ink); font-size: var(--tly-text-sm); line-height: var(--tly-leading); }
.tly-gl-note::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--tly-warn-ink); color: var(--tly-warn-bg); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-bold); line-height: var(--tly-leading-none); }
.tly-gl-why { margin: 0; font-size: var(--tly-text-sm); line-height: var(--tly-leading); color: var(--tly-ink-2); }
.tly-gl-why b { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); }
.tly-gl-extra { font-size: var(--tly-text-xs); color: var(--tly-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tly-gl-metric svg { display: block; width: 100%; height: 22px; margin-top: var(--tly-space-2); }
.tly-gl-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: var(--tly-space-6); padding-top: var(--tly-space-4); border-top: 1px solid var(--tly-line); }
.tly-gl-issue, .tly-gl-next { gap: var(--tly-space-2); }
.tly-gl-issue.is-bad h4::before { background: var(--tly-bad); }
.tly-gl-issue.is-good h4::before { background: var(--tly-good); }
.tly-gl-next h4::before { background: var(--tly-good); }
.tly-gl-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tly-space-2); min-width: 0; }
.tly-gl-title { font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); line-height: var(--tly-leading-tight); color: var(--tly-ink); overflow-wrap: anywhere; }
.tly-gl-ev, .tly-gl-text { margin: 0; font-size: var(--tly-text-sm); line-height: var(--tly-leading); color: var(--tly-ink-2); }
.tly-gl-text { color: var(--tly-ink); }
.tly-gl-body .tly-btn { margin-top: var(--tly-space-1); }
.tly-gl-more { border-top: 1px solid var(--tly-line); padding-top: var(--tly-space-3); }
.tly-gl-more > summary { width: max-content; max-width: 100%; color: var(--tly-accent); font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); cursor: pointer; }
.tly-gl-more ul { display: flex; flex-direction: column; gap: var(--tly-space-2); margin: var(--tly-space-3) 0 0; padding: 0; list-style: none; }
.tly-gl-more li { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tly-space-3); margin: 0; }
.tly-gl-more-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--tly-text-sm); line-height: var(--tly-leading); }
.tly-gl-more-text strong { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); overflow-wrap: anywhere; }
.tly-gl-more-text span { color: var(--tly-ink-2); }
@media (max-width: 600px) { .tly-gl-more li { flex-direction: column; gap: var(--tly-space-1); } }
/* Which period each number belongs to, and the detailed steps. */
.tly-gl-qh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--tly-space-1) var(--tly-space-3); }
.tly-app .tly-gl-period { display: inline-flex; align-items: center; gap: var(--tly-space-2); max-width: 100%; font-size: var(--tly-text-xs); line-height: var(--tly-leading-snug); color: var(--tly-muted); }
.tly-app .tly-gl-period::before { content: ""; flex: none; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 1v2h6V1h2v2h1.5c.8 0 1.5.7 1.5 1.5v9c0 .8-.7 1.5-1.5 1.5h-13C.7 15 0 14.3 0 13.5v-9C0 3.7.7 3 1.5 3H3V1h2zM2 7v6h12V7H2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 1v2h6V1h2v2h1.5c.8 0 1.5.7 1.5 1.5v9c0 .8-.7 1.5-1.5 1.5h-13C.7 15 0 14.3 0 13.5v-9C0 3.7.7 3 1.5 3H3V1h2zM2 7v6h12V7H2z'/%3E%3C/svg%3E") center / contain no-repeat; opacity: .8; }
.tly-gl-body .tly-gl-period { padding: 2px var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-subtle); border: 1px solid var(--tly-line); }
.tly-gl-body .tly-gl-period.is-monitor { background: var(--tly-warn-bg); border-color: transparent; color: var(--tly-warn-ink); }
.tly-gl-more-text .tly-gl-period { margin-top: 2px; }
.tly-gl-steps { width: 100%; }
.tly-gl-steps > summary { width: max-content; max-width: 100%; color: var(--tly-accent); font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); cursor: pointer; }
.tly-gl-steps > summary:focus-visible { outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius); }
.tly-gl-steps ol { display: flex; flex-direction: column; gap: var(--tly-space-2); margin: var(--tly-space-2) 0 2px; padding: 0 0 0 var(--tly-space-5); list-style: decimal; font-size: var(--tly-text-sm); line-height: var(--tly-leading); color: var(--tly-ink); }
.tly-gl-steps li { margin: 0; padding-left: 2px; overflow-wrap: anywhere; }
.tly-gl-steps li::marker { color: var(--tly-muted); font-weight: var(--tly-weight-semibold); }
.tly-gl-step-go { display: inline; margin: 0 0 0 var(--tly-space-2); padding: 0; border: 0; background: none; color: var(--tly-accent); font: inherit; font-weight: var(--tly-weight-medium); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tly-gl-step-go:hover { color: var(--tly-accent-hover); }
.tly-gl-step-go:focus-visible { outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius-sm); }
@media (max-width: 782px) {
	.tly-gl-pair { grid-template-columns: minmax(0, 1fr); }
	.tly-gl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-2); }
	.tly-gl-num { font-size: var(--tly-text-xl); line-height: 28px; }
}

/* An issue that touches the client's goals and priorities. */
.tly-app .tly-gl-prio { display: inline-flex; align-items: center; gap: var(--tly-space-1); width: max-content; max-width: 100%; height: 20px; padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-accent-bg); color: var(--tly-accent-ink); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); line-height: var(--tly-leading-none); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tly-app .tly-gl-prio::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tly-gl-more-text .tly-gl-prio { margin: 2px 0; }

/* All data: tools on one line with room around them, a one-line legend, readable on phones. */
#tly-tableCard .tly-tools { margin: var(--tly-space-4) 0 var(--tly-space-2); gap: var(--tly-space-2) var(--tly-space-3); }
.tly-app #tly-tableCard .tly-tools input { flex: 0 1 320px; width: auto; min-width: 0; }
#tly-tableCard .tly-count { margin-left: auto; white-space: nowrap; }
#tly-tableCard .tly-tab-hint { margin: 0 0 var(--tly-space-4); font-size: var(--tly-text-xs); line-height: var(--tly-leading); color: var(--tly-muted); }
#tly-tableCard .tly-tab-hint:empty { display: none; }
#tly-tableCard th[title] { cursor: help; }
#tly-tableCard th[title] .tly-sort { cursor: pointer; }
@media (max-width: 782px) {
	/* Tabs stay on one line and scroll, instead of stacking three rows. */
	#tly-tableCard .tly-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	#tly-tableCard .tly-tabs::-webkit-scrollbar { display: none; }
	#tly-tableCard .tly-tabs button { flex: none; white-space: nowrap; }
	/* Filter on its own line; the count and CSV under it. */
	.tly-app #tly-tableCard .tly-tools input { flex: 1 1 100%; }
	#tly-tableCard .tly-count { margin-left: 0; }
	#tly-tableCard #tly-csvBtn { margin-left: auto; }
	/* The first column stays in view while the numbers scroll, and long keywords wrap instead of "roof r…". */
	#tly-tableCard .tly-scroll th.key, #tly-tableCard .tly-scroll td.key { position: sticky; left: 0; z-index: 1; width: auto; min-width: 140px; max-width: 170px; padding-right: var(--tly-space-3); background: var(--tly-surface); box-shadow: 1px 0 0 var(--tly-line); }
	#tly-tableCard .tly-scroll td.key > a, #tly-tableCard .tly-scroll td.key > span { white-space: normal; overflow-wrap: anywhere; line-height: var(--tly-leading-snug); }
	#tly-tableCard tbody tr:hover td.key { background: var(--tly-hover); }
}
/* Page paths and keywords are text: tabular figures made their hyphens wide ("/roof - repair"). */
.tly-app td.key, .tly-app th.key { font-variant-numeric: normal; }
.tly-app td.key .tly-key-note { margin-left: var(--tly-space-1); color: var(--tly-muted); font-size: var(--tly-text-xs); }
