/* TurtleReport admin screens. Components only; base elements and the shell live in shell.css, values in tokens.css. */
.tly-lead { font-size: var(--tly-text-base); max-width: var(--tly-measure); color: var(--tly-ink-2); }
.tly-sub { color: var(--tly-muted); font-size: var(--tly-text-xs); }
.tly-warn-text { color: var(--tly-bad-ink); font-size: var(--tly-text-xs); }
.tly-error-text, body.tly-shell .wrap p.tly-error-text { color: var(--tly-bad-ink); }
.tly-req { color: var(--tly-bad-ink); }
body.tly-shell .wrap .tly-h2 { margin-top: var(--tly-space-8); }
.tly-panel .form-table select { min-width: 320px; max-width: 100%; }

/* empty state */
.tly-empty-card { background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius-lg); padding: var(--tly-space-8); max-width: 640px; box-shadow: var(--tly-shadow-xs); }
body.tly-shell .wrap .tly-empty-card h2 { margin: 0 0 var(--tly-space-2); font-size: var(--tly-text-xl); line-height: 28px; font-weight: var(--tly-weight-semibold); }
.tly-empty-card p { color: var(--tly-ink-2); }
.tly-empty-card .tly-page-actions { margin-top: var(--tly-space-5); }

/* tables */
.tly-table .column-primary { width: 32%; }
.tly-sources { margin: 0; }
.tly-sources li { margin: 0 0 var(--tly-space-1); display: flex; align-items: center; gap: var(--tly-space-2); }
.tly-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tly-line-strong); flex: none; }
.tly-dot.is-on { background: var(--tly-good); }
.tly-dot.is-bad { background: var(--tly-bad); }
.tly-inline-form { display: inline; }
.tly-inline-form .button-link { font-size: inherit; }
.tly-badge { display: inline-flex; align-items: center; gap: var(--tly-space-2); height: var(--tly-badge-h); padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-flat-bg); color: var(--tly-ink-2); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); white-space: nowrap; }
.tly-badge.is-good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-badge.is-bad { background: var(--tly-bad-bg); color: var(--tly-bad-ink); }
.tly-badge.is-warn { background: var(--tly-warn-bg); color: var(--tly-warn-ink); }

.tly-details { margin-top: var(--tly-space-2); }
.tly-details summary { cursor: pointer; color: var(--tly-accent); font-weight: var(--tly-weight-medium); }
.tly-mini-form { display: flex; flex-direction: column; gap: var(--tly-space-2); align-items: flex-start; padding: var(--tly-space-3) 0; }
.tly-mini-form label { display: flex; flex-direction: column; gap: var(--tly-space-1); }

/* connection methods */
.tly-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-5); }
body.tly-shell .wrap .tly-methods .tly-panel { margin: 0; }
.tly-stack { display: flex; flex-direction: column; gap: var(--tly-space-3); padding-bottom: var(--tly-space-2); }
.tly-stack > label { display: flex; flex-direction: column; gap: var(--tly-space-2); font-weight: var(--tly-weight-medium); color: var(--tly-ink); font-size: var(--tly-text-sm); }
.tly-check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: var(--tly-space-2); margin: 0 var(--tly-space-4) var(--tly-space-2) 0; font-weight: var(--tly-weight) !important; color: var(--tly-ink-2); }
.tly-lbl { font-weight: var(--tly-weight-medium); margin-bottom: var(--tly-space-1); color: var(--tly-ink); }
label.tly-lbl { display: block; margin-top: var(--tly-space-2); }

.tly-copy { display: flex; gap: var(--tly-space-2); align-items: center; flex-wrap: wrap; margin: var(--tly-space-2) 0 var(--tly-space-3); }
.tly-copy code { padding: var(--tly-space-2) var(--tly-space-3) !important; word-break: break-all; }

/* chips + pickers */
.tly-events { padding: 0 0 var(--tly-space-2); }
.tly-chips { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); }
.tly-event-groups { display: flex; flex-direction: column; gap: var(--tly-space-4); margin-top: var(--tly-space-2); }
.tly-event-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); font-size: var(--tly-text-sm); color: var(--tly-ink); }
.tly-event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px var(--tly-space-4); }
.tly-event { display: flex; align-items: center; gap: var(--tly-space-2); min-height: 34px; padding: 2px var(--tly-space-2); border-radius: var(--tly-radius-sm); color: var(--tly-ink-2); font-size: var(--tly-text-sm); cursor: pointer; }
.tly-event:hover { background: var(--tly-hover); }
/* A round tick, drawn over the real checkbox so keyboard and screen readers keep working. */
body.tly-shell .tly-event input[type="checkbox"] {
	appearance: none; -webkit-appearance: none;
	position: relative; flex: none; width: 20px; height: 20px; min-width: 20px; margin: 0; padding: 0;
	border: 1.5px solid var(--tly-line-input); border-radius: 50%; background: var(--tly-surface);
	box-shadow: none; cursor: pointer;
	transition: background-color var(--tly-dur) var(--tly-ease), border-color var(--tly-dur) var(--tly-ease);
}
body.tly-shell .tly-event input[type="checkbox"]::before { content: none; }
body.tly-shell .tly-event:hover input[type="checkbox"]:not(:checked) { border-color: var(--tly-faint); }
body.tly-shell .tly-event input[type="checkbox"]:checked { background: var(--tly-primary); border-color: var(--tly-primary); }
body.tly-shell .tly-event input[type="checkbox"]:checked::after {
	content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px;
	border: solid var(--tly-on-primary); border-width: 0 1.8px 1.8px 0; border-radius: var(--tly-radius-xs);
	transform: rotate(45deg);
}
body.tly-shell .tly-event input[type="checkbox"]:focus { outline: none; box-shadow: none; }
body.tly-shell .tly-event input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-event-name { flex: 0 1 auto; min-width: 8ch; font-family: var(--tly-font-mono); font-size: var(--tly-text-xs); color: var(--tly-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tly-event-count { order: 3; margin-left: auto; padding-left: var(--tly-space-2); flex: none; color: var(--tly-muted); font-size: var(--tly-text-xs); font-variant-numeric: tabular-nums; }
.tly-event-tip { order: 2; flex: none; height: 20px; background: var(--tly-accent-bg); color: var(--tly-accent-ink); font-size: var(--tly-text-xs); }
.tly-event-check { display: flex; flex-direction: column; gap: var(--tly-space-1); margin: var(--tly-space-2) 0 0; max-width: var(--tly-measure); }
.tly-check-line { display: flex; align-items: flex-start; gap: var(--tly-space-2); font-size: var(--tly-text-xs); line-height: var(--tly-leading); }
.tly-check-line::before { flex: none; font-weight: var(--tly-weight-bold); line-height: var(--tly-leading-snug); }
.tly-check-line.is-good { color: var(--tly-good-ink); }
.tly-check-line.is-good::before { content: "\2713"; }
.tly-check-line.is-info { color: var(--tly-muted); }
.tly-check-line.is-info::before { content: "\00B7"; }
.tly-check-line.is-warn { color: var(--tly-warn-ink); }
.tly-check-line.is-warn::before { content: "\0021"; }
.tly-chip-btn { display: inline-flex; align-items: center; height: var(--tly-ctl-sm); padding: 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-2); font: var(--tly-weight-medium) var(--tly-text-xs) var(--tly-font); cursor: pointer; transition: border-color var(--tly-dur) var(--tly-ease), color var(--tly-dur) var(--tly-ease); }
.tly-chip-btn:hover { border-color: var(--tly-accent); color: var(--tly-accent); }
.tly-chip-btn:focus-visible { outline: none; box-shadow: var(--tly-focus); }

.tly-user-picker { position: relative; max-width: 560px; }
.tly-user-list { margin: 0 0 var(--tly-space-2); padding: 0; list-style: none; }
.tly-user-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--tly-space-3); margin: 0 0 var(--tly-space-2); padding: var(--tly-space-2) var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); color: var(--tly-ink-2); }
.tly-user-list li strong { color: var(--tly-ink); }
.tly-user-results { position: absolute; z-index: 10; left: 0; right: 0; margin: var(--tly-space-1) 0 0; padding: var(--tly-space-1); list-style: none; max-height: 260px; overflow: auto; background: var(--tly-surface); border-radius: var(--tly-radius); box-shadow: var(--tly-shadow-pop); }
.tly-user-results li { margin: 0; padding: 0; }
.tly-user-results li.tly-sub { padding: var(--tly-space-2) var(--tly-space-3); }
.tly-user-results button { display: block; width: 100%; padding: var(--tly-space-2) var(--tly-space-3); border: 0; border-radius: var(--tly-radius-sm); background: none; color: var(--tly-ink-2); text-align: left; cursor: pointer; font: var(--tly-text-sm) var(--tly-font); }
.tly-user-results button:hover, .tly-user-results button:focus { background: var(--tly-hover); color: var(--tly-ink); outline: none; }

/* recipients (e-mail schedule) */
.tly-recipients { display: flex; flex-direction: column; gap: var(--tly-space-4); max-width: 640px; }
.tly-recipient-block { display: flex; flex-direction: column; gap: var(--tly-space-2); }
.tly-recipient-block > .tly-lbl { margin: 0; font-size: var(--tly-text-sm); }
.tly-count-pill { display: inline-flex; align-items: center; height: var(--tly-badge-h); padding: 0 var(--tly-space-2); margin-left: 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); }
.tly-people { margin: var(--tly-space-1) 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--tly-space-2); }
.tly-people li { margin: 0; display: inline-flex; align-items: center; height: 24px; padding: 0 var(--tly-space-3); 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-admin-choice { display: flex; flex-direction: column; gap: var(--tly-space-1); margin: 0 0 var(--tly-space-3); }

/* guide */
body.tly-shell .wrap.tly-guide { max-width: 960px; }
.tly-toc ol { columns: 2; margin-left: 1.4em; }
.tly-steps { margin-left: 1.4em; }
.tly-steps > li { max-width: var(--tly-measure); margin-bottom: var(--tly-space-3); line-height: var(--tly-leading); }
.tly-steps ul { list-style: disc; margin: var(--tly-space-2) 0 0 1.4em; }
.tly-note { background: var(--tly-accent-bg); color: var(--tly-ink-2); border-left: 3px solid var(--tly-accent); border-radius: 0 var(--tly-radius-sm) var(--tly-radius-sm) 0; padding: var(--tly-space-2) var(--tly-space-4); margin: var(--tly-space-3) 0; }
.tly-compare th[scope=row], .tly-trouble td:first-child { width: 30%; font-weight: var(--tly-weight-semibold); color: var(--tly-ink) !important; }

@media (max-width: 960px) {
	.tly-methods { grid-template-columns: minmax(0, 1fr); }
	.tly-toc ol { columns: 1; }
}
@media (max-width: 782px) {
	.tly-panel .form-table select { min-width: 0; width: 100%; }
}

/* "What this report collects" */
.tly-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--tly-space-3); margin: var(--tly-space-3) 0 var(--tly-space-2); }
.tly-section { border: 1px solid var(--tly-line); border-radius: var(--tly-radius); padding: var(--tly-space-4) var(--tly-space-4); margin: 0; background: var(--tly-surface); transition: background-color var(--tly-dur) var(--tly-ease); }
.tly-section.is-off { background: var(--tly-subtle); }
.tly-section.is-off .description, .tly-section.is-off .tly-inline-field, .tly-section.is-off .tly-metric-grid { opacity: .55; }
.tly-section-head { display: flex; align-items: center; gap: var(--tly-space-2); font-size: var(--tly-text-base); color: var(--tly-ink); }
.tly-section .description { margin: var(--tly-space-2) 0 var(--tly-space-2); }
.tly-inline-field { display: flex; align-items: center; gap: var(--tly-space-2); margin-top: var(--tly-space-2); }
.tly-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--tly-space-2); margin: var(--tly-space-1) 0 var(--tly-space-2); }
.tly-needs-note { color: var(--tly-bad-ink); margin: var(--tly-space-2) 0 0; font-size: var(--tly-text-xs); }
.tly-presets { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); }
.tly-groups { display: flex; flex-direction: column; gap: var(--tly-space-2); max-width: 720px; }
.tly-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: var(--tly-space-2); align-items: center; }
@media (max-width: 782px) { .tly-group { grid-template-columns: minmax(0, 1fr); } .tly-metric-grid { grid-template-columns: minmax(0, 1fr); } }

/* segments, e-mail schedule, media pickers, health */
.tly-segments { display: flex; flex-direction: column; gap: var(--tly-space-2); max-width: 900px; }
.tly-segment { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 2fr) auto; gap: var(--tly-space-2); align-items: center; }
.tly-inline-fields select { margin: 0 var(--tly-space-2) var(--tly-space-2) 0; }
.tly-media { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; }
.tly-media-preview { max-height: 48px; max-width: 200px; border: 1px solid var(--tly-line); border-radius: var(--tly-radius-sm); padding: var(--tly-space-1); background: var(--tly-p-white); }
.tly-health { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; margin-top: var(--tly-space-1); }
.tly-test-send { margin: calc(-1 * var(--tly-space-2)) 0 var(--tly-space-6); display: flex; gap: var(--tly-space-2); align-items: center; flex-wrap: wrap; }
.tly-submit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: var(--tly-space-3); margin: 0 0 var(--tly-space-5); padding: var(--tly-space-3) var(--tly-space-5); background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); box-shadow: var(--tly-shadow-sm); }
.tly-submit-bar p.submit { margin: 0; padding: 0; }
@media (max-width: 782px) { .tly-segment { grid-template-columns: minmax(0, 1fr); } }

/* wp-color-picker inside the shell */
body.tly-shell .wrap .wp-picker-container .wp-color-result.button { min-height: var(--tly-ctl-sm); padding: 0 0 0 var(--tly-space-8); }
body.tly-shell .wrap .wp-picker-container .wp-color-result-text { background: var(--tly-subtle); color: var(--tly-ink-2); border-left-color: var(--tly-line-strong); line-height: 30px; }

/* settings: e-mail overview */
.tly-cron-status { display: flex; align-items: flex-start; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-4); padding: var(--tly-space-3) var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); color: var(--tly-ink-2); font-size: var(--tly-text-sm); line-height: var(--tly-leading); }
.tly-cron-status .tly-badge { flex: none; }
.tly-table-scroll { overflow-x: auto; }
body.tly-shell .wrap .tly-schedule-table td { vertical-align: middle; }
body.tly-shell .wrap .tly-schedule-table .tly-sub { display: inline; }

/* setup checklist and connection test results */
.tly-checklist { list-style: none; margin: var(--tly-space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--tly-space-2) var(--tly-space-5); }
.tly-checklist li { display: flex; align-items: flex-start; gap: var(--tly-space-2); margin: 0; }
.tly-checklist .tly-dot { margin-top: var(--tly-space-2); }
.tly-step-text { display: flex; flex-direction: column; gap: 2px; color: var(--tly-ink); }
.tly-diag { margin: var(--tly-space-2) 0 var(--tly-space-1); padding: 0; list-style: none; }
.tly-diag li { display: flex; align-items: flex-start; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); color: var(--tly-ink-2); }
.tly-diag .tly-dot { margin-top: var(--tly-space-2); }
.tly-diag-help { display: block; margin-top: 2px; }

/* site editor: per-source connection */
.tly-source-conn { margin-top: var(--tly-space-2); color: var(--tly-ink-2); font-size: var(--tly-text-sm); }
.tly-source-conn select { min-width: 0 !important; }
.tly-source-account { display: flex; align-items: flex-end; gap: var(--tly-space-2); flex-wrap: wrap; margin: 0 0 var(--tly-space-2); }
.tly-account-pick { display: flex; flex-direction: column; gap: var(--tly-space-1); min-width: 0; }
.tly-account-label { color: var(--tly-muted); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); }
.tly-source-account select { min-width: 260px; max-width: 100%; }
.tly-connect-account { white-space: nowrap; }
body.tly-shell .wrap .tly-account-state { display: flex; align-items: center; gap: var(--tly-space-2); flex-wrap: wrap; margin: 0 0 var(--tly-space-2); font-size: var(--tly-text-xs); }
.tly-account-state .tly-warn-text, .tly-account-state a { font-size: var(--tly-text-xs); }
@media (max-width: 782px) { .tly-source-account select { min-width: 0; width: 100%; } .tly-account-pick { flex: 1 1 100%; } }

/* deliveries */
.tly-delivery-filter { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); align-items: center; margin: var(--tly-space-2) 0 var(--tly-space-4); clear: both; }
.tly-filters-links { margin-bottom: var(--tly-space-1); }
.tly-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-3); margin: 0 0 var(--tly-space-3); }
body.tly-shell .wrap .tly-delivery-table .check-column { width: 2.2em; padding: var(--tly-space-4) 0 0 var(--tly-space-3); vertical-align: top; }
body.tly-shell .wrap .tly-delivery-table thead .check-column { padding-top: var(--tly-space-3); vertical-align: middle; }
body.tly-shell .wrap .tly-delivery-table .check-column input { margin: 0; }
/* Open and Delete stay visible, not only on hover. */
body.tly-shell .wrap .tly-delivery-table .row-actions { position: static; left: auto; margin-top: var(--tly-space-2); padding: 0; color: var(--tly-muted); font-size: var(--tly-text-sm); }
body.tly-shell .wrap .tly-delivery-table .row-actions .button-link { font-size: inherit; line-height: inherit; padding: 0; min-height: 0; vertical-align: baseline; }
.tly-run-delete { margin-left: auto !important; }
.tly-run-actions { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); align-items: center; margin-top: var(--tly-space-3); }
.tly-checks { margin: 0; padding: 0; list-style: none; }
.tly-checks li { margin: 0 0 var(--tly-space-2); line-height: var(--tly-leading); color: var(--tly-ink-2); }
.tly-checks .tly-badge { margin-right: var(--tly-space-2); }
.tly-insight-list { display: flex; flex-direction: column; gap: var(--tly-space-2); max-width: 900px; margin: var(--tly-space-3) 0; }
.tly-insight { display: grid; grid-template-columns: auto 190px minmax(0, 1fr); gap: var(--tly-space-2); align-items: start; }
.tly-insight .tly-check { margin: var(--tly-space-2) 0 0; }
.tly-cron-help { margin: 0 0 var(--tly-space-4); }
.tly-cron-help .tly-copy code { font-size: var(--tly-text-xs); }
@media (max-width: 782px) { .tly-insight { grid-template-columns: auto minmax(0, 1fr); } .tly-insight textarea { grid-column: 1 / -1; } }

/* Setup guide: "let an AI assistant walk you through it". */
.tly-ai-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tly-space-4); }
.tly-ai-help-text { flex: 1 1 360px; min-width: 0; }
.tly-ai-help-text h2 { margin-top: 0; }
.tly-ai-help-text p { margin-bottom: 0; }
.tly-ai-help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); }

/* Settings → Who gets which report. */
.tly-recipients-table td { vertical-align: top; }
.tly-recipients-table select { min-width: 140px; }
.tly-recipients-table .tly-send-to .tly-check { display: block; margin-bottom: var(--tly-space-2); }
.tly-recipients-table .tly-send-to input[type="text"] { margin-bottom: var(--tly-space-1); }
.tly-recipients-save { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); margin: var(--tly-space-3) 0 0; }
.tly-by-person { margin-top: var(--tly-space-4); }
.tly-by-person-table { margin-top: var(--tly-space-2); }
.tly-cron-block { margin-top: var(--tly-space-6); padding-top: var(--tly-space-4); border-top: 1px solid var(--tly-line); }

/* Overview (agency dashboard). */
.tly-ov-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--tly-space-3); margin: var(--tly-space-4) 0; }
.tly-ov-card { display: flex; flex-direction: column; gap: var(--tly-space-1); padding: var(--tly-space-4) var(--tly-space-4); background: var(--tly-surface); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); }
.tly-ov-card-label { color: var(--tly-muted); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); }
.tly-ov-card-num { font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); line-height: 32px; color: var(--tly-ink); font-variant-numeric: tabular-nums; }
.tly-ov-card-num.is-warn { color: var(--tly-warn-ink); }
.tly-ov-toolbar { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); }
.tly-ov-table td { vertical-align: middle; }
.tly-ov-table .tly-ov-num { font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); color: var(--tly-ink); font-variant-numeric: tabular-nums; }
.tly-ov-delta { display: inline-block; margin-left: var(--tly-space-1); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); font-variant-numeric: tabular-nums; }
.tly-ov-delta.is-up { color: var(--tly-good-ink); }
.tly-ov-delta.is-down { color: var(--tly-bad-ink); }
.tly-ov-delta.is-flat { color: var(--tly-muted); }
.tly-ov-spark { display: block; margin-top: var(--tly-space-1); color: var(--tly-clicks); line-height: 0; }
.tly-ov-site { min-width: 180px; }
.tly-ov-email .tly-badge { text-decoration: none; }
.tly-ov-load-error { margin-top: var(--tly-space-1); color: var(--tly-bad-ink); max-width: 220px; }
.tly-recipients-table th { white-space: nowrap; }
.tly-send-now-cell { text-align: right; white-space: nowrap; }
.tly-hidden-form { display: none; }

/* Overview: summary cards, "Action needed" and "Report e-mails" boxes, all-websites table. */
.tly-overview .tly-ov-summary { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: var(--tly-space-4) 0 var(--tly-space-4); }
.tly-ov-card-sub { color: var(--tly-muted); font-size: var(--tly-text-xs); }
.tly-ov-card-sub.is-warn { color: var(--tly-warn-ink); font-weight: var(--tly-weight-medium); }
.tly-ov-card-num .tly-ov-delta { font-size: var(--tly-text-sm); vertical-align: middle; }
.tly-ov-boxes { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--tly-space-4); align-items: start; margin-bottom: var(--tly-space-4); }
@media (max-width: 1100px) { .tly-ov-boxes { grid-template-columns: minmax(0, 1fr); } }
.tly-overview .tly-panel.tly-ov-box, .tly-overview .tly-panel.tly-ov-all { margin: 0 0 var(--tly-space-4); }
.tly-ov-box h2, .tly-ov-all h2 { margin-top: 0; }
.tly-ov-action-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--tly-space-2); }
.tly-ov-action { margin: 0; padding: var(--tly-space-3) var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); }
.tly-ov-action-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tly-space-3); margin-bottom: var(--tly-space-2); }
.tly-ov-action-site { font-weight: var(--tly-weight-semibold); font-size: var(--tly-text-base); color: var(--tly-ink); text-decoration: none; }
.tly-ov-action-site:hover { text-decoration: underline; }
.tly-ov-jump { font-size: var(--tly-text-xs); }
.tly-ov-action-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--tly-space-2); }
.tly-ov-action-items li { display: flex; align-items: baseline; gap: var(--tly-space-2); margin: 0; color: var(--tly-ink-2); }
.tly-ov-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tly-warn-ink); transform: translateY(-1px); }
.tly-ov-action-items li.is-bad .tly-ov-dot { background: var(--tly-bad-ink); }
.tly-ov-fix { flex: none; margin-left: auto; white-space: nowrap; font-weight: var(--tly-weight-medium); }
.tly-ov-all-good { margin: 0; padding: var(--tly-space-3) var(--tly-space-4); border-radius: var(--tly-radius); background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-ov-wins-title { margin: var(--tly-space-4) 0 var(--tly-space-2); font-size: var(--tly-text-sm); color: var(--tly-good-ink); }
.tly-ov-wins-list { margin: 0; padding-left: var(--tly-space-5); list-style: disc; color: var(--tly-ink-2); }
.tly-ov-wins-list li { margin: 2px 0; }
.tly-ov-emails-lead { margin-top: 0; font-size: var(--tly-text-base); color: var(--tly-ink); }
.tly-ov-email-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); padding: 0; list-style: none; }
.tly-ov-email-stats li { margin: 0; padding: var(--tly-space-3) var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); color: var(--tly-muted); font-size: var(--tly-text-xs); }
.tly-ov-stat-num { display: block; font-size: var(--tly-text-2xl); font-weight: var(--tly-weight-semibold); line-height: 32px; color: var(--tly-ink); font-variant-numeric: tabular-nums; }
.tly-ov-stat-num.is-good { color: var(--tly-good-ink); }
.tly-ov-stat-num.is-bad { color: var(--tly-bad-ink); }
.tly-ov-stat-num.is-warn { color: var(--tly-warn-ink); }
.tly-ov-next { margin: var(--tly-space-2) 0 0; font-weight: var(--tly-weight-medium); color: var(--tly-ink); }
.tly-ov-email-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); margin: var(--tly-space-4) 0 0; }
.tly-ov-all-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--tly-space-2) var(--tly-space-4); margin-bottom: var(--tly-space-3); }
.tly-ov-sort { display: flex; align-items: center; gap: var(--tly-space-2); }
.tly-ov-table tr.is-highlight td { background: var(--tly-warn-bg); transition: background var(--tly-dur); }
.tly-ov-email-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-1) var(--tly-space-2); margin-top: var(--tly-space-1); }
.tly-ov-send-now { font-size: var(--tly-text-xs); }
.tly-ov-table { width: 100%; }

/* Notes under list tables get the same breathing room everywhere. */
body.tly-shell .wrap .tly-table-note, body.tly-shell .wrap .tly-ov-note { margin: var(--tly-space-3) 0 0; }
.tly-pdf-link { font-weight: var(--tly-weight-medium); white-space: nowrap; }

/* Overview spacing: three cards per row until phone width; the grid gap is the only space between boxes. */
.tly-overview .tly-ov-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .tly-overview .tly-ov-summary { grid-template-columns: minmax(0, 1fr); } }
/* With the Advisor beside the page the content is narrower: let the cards wrap instead of squeezing three. */
@media (min-width: 1440px) { body.tly-ai-is-open .tly-overview .tly-ov-summary { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.tly-overview .tly-ov-boxes > .tly-panel.tly-ov-box { margin: 0; }
.tly-overview .tly-ov-boxes { margin-bottom: var(--tly-space-4); }
/* Settings: keep dates on one or two lines. */
.tly-recipients-table .tly-date { white-space: nowrap; }

.tly-block { display: block; }
.tly-row-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-2); margin-top: var(--tly-space-2); }
.tly-recipients-table th:nth-child(2), .tly-recipients-table td:nth-child(2) { white-space: nowrap; }
body.tly-shell .wrap .tly-recipients-table div.tly-sub, body.tly-shell .wrap .tly-recipients-table .tly-block { display: block; }
.tly-recipients-table th:first-child { min-width: 120px; }
.tly-run-now { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); margin: var(--tly-space-3) 0 var(--tly-space-2); }
.tly-run-now .description { margin: 0; }

/* "Who gets which report": how often, then day and time underneath, on a two-column grid. */
.tly-recipients-table .tly-col-when { width: 188px; min-width: 188px; }
/* A little less padding so the six columns fit on a laptop screen. */
body.tly-shell .wrap .tly-recipients-table th, body.tly-shell .wrap .tly-recipients-table td { padding-left: var(--tly-space-3); padding-right: var(--tly-space-3); }
body.tly-shell .wrap .tly-recipients-table th:first-child, body.tly-shell .wrap .tly-recipients-table td:first-child { padding-left: var(--tly-space-4); }
.tly-recipients-table .tly-send-to { min-width: 220px; }
.tly-when-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--tly-space-2); }
.tly-when-grid > select:first-of-type { grid-column: 1 / -1; }
.tly-when { display: contents; }
body.tly-shell .wrap .tly-when-grid select { width: 100%; min-width: 0; max-width: none; padding-left: var(--tly-space-3); padding-right: var(--tly-space-6); background-position: right 8px center; }
.tly-when-grid select[hidden] { display: none; }
/* Settings → Sender: the new-site schedule on one line. */
.tly-new-site-schedule { display: grid; grid-template-columns: 170px 120px 120px; gap: var(--tly-space-2); }
.tly-new-site-schedule > select:first-of-type { grid-column: auto; }
@media (max-width: 600px) { .tly-new-site-schedule { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tly-new-site-schedule > select:first-of-type { grid-column: 1 / -1; } }
.tly-recipients-table .tly-row-links .button { white-space: nowrap; }
.tly-recipients-table .tly-send-to input[type="text"] { width: 100%; max-width: 100%; box-sizing: border-box; }
.tly-recipients-table th:nth-child(5), .tly-recipients-table td:nth-child(5) { min-width: 92px; }

/* Client Monitor: clients that need attention */
.tly-overview .tly-panel.tly-attn { margin: 0 0 var(--tly-space-4); }
.tly-attn-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--tly-space-1) var(--tly-space-4); }
.tly-attn-head h2 { margin: 0; display: flex; align-items: center; gap: var(--tly-space-2); }
.tly-attn-count { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tly-badge-h); height: var(--tly-badge-h); padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-bad-bg); color: var(--tly-bad-ink); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); }
.tly-attn-meta { margin: 0; }
.tly-attn-checking { color: var(--tly-ink-2); }
.tly-attn-intro { margin: var(--tly-space-1) 0 var(--tly-space-3); }
.tly-attn-tabs { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-3); }
.tly-attn-tabs[hidden] { display: none; }
.tly-attn-tab { display: inline-flex; align-items: center; gap: var(--tly-space-2); height: var(--tly-ctl-sm); padding: 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-2); font: inherit; font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); cursor: pointer; }
.tly-attn-tab:hover { border-color: var(--tly-ink-2); color: var(--tly-ink); }
.tly-attn-tab[aria-pressed="true"] { background: var(--tly-primary); border-color: var(--tly-primary); color: var(--tly-on-primary); }
.tly-attn-tab-n { font-variant-numeric: tabular-nums; opacity: .8; }
.tly-attn-tab:focus-visible, .tly-attn-view:focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-attn-notice { margin: 0 0 var(--tly-space-3); padding: var(--tly-space-3) var(--tly-space-4); border-radius: var(--tly-radius); background: var(--tly-subtle); border: 1px solid var(--tly-line); color: var(--tly-ink); }
.tly-attn-notice[hidden] { display: none; }
.tly-attn-empty { margin: 0; padding: var(--tly-space-3) var(--tly-space-4); border-radius: var(--tly-radius); background: var(--tly-subtle); color: var(--tly-ink-2); }
.tly-attn-empty.is-good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
/* Client groups are sections of the card, not cards inside it. */
.tly-attn-client { margin: 0 0 var(--tly-space-8); }
.tly-attn-client:last-of-type { margin-bottom: 0; }
.tly-attn-client-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tly-space-3); padding: 0 0 var(--tly-space-2); border-bottom: 1px solid var(--tly-line-strong); }
.tly-attn-client-name { font-weight: var(--tly-weight-semibold); font-size: var(--tly-text-base); color: var(--tly-ink); text-decoration: none; }
.tly-attn-client-name:hover { text-decoration: underline; }
.tly-attn-items { margin: 0; padding: 0; list-style: none; }
.tly-attn-item { margin: 0; border-top: 1px solid var(--tly-line); }
.tly-attn-item:first-child { border-top: 0; }
.tly-attn-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); padding: var(--tly-space-3) 0; }
.tly-attn-sev { 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); background: var(--tly-warn-bg); color: var(--tly-warn-ink); }
.tly-attn-sev.is-high { background: var(--tly-bad-bg); color: var(--tly-bad-ink); }
.tly-attn-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tly-attn-title { color: var(--tly-ink); font-size: var(--tly-text-base); overflow-wrap: anywhere; }
.tly-attn-summary { color: var(--tly-ink-2); font-size: var(--tly-text-sm); }
.tly-attn-when { display: flex; align-items: center; gap: var(--tly-space-2); white-space: nowrap; }
.tly-attn-detail { padding: var(--tly-space-4) 0 var(--tly-space-5); border-top: 1px solid var(--tly-line); }
.tly-attn-detail h4 { margin: 0 0 var(--tly-space-2); font-size: var(--tly-text-sm); color: var(--tly-ink); }
.tly-attn-detail p { margin: 0 0 var(--tly-space-2); color: var(--tly-ink-2); max-width: var(--tly-measure); line-height: var(--tly-leading); }
.tly-attn-issue-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-2); }
.tly-attn-kind { display: inline-flex; align-items: center; gap: var(--tly-space-2); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-semibold); color: var(--tly-warn-ink); }
.tly-attn-kind.is-high { color: var(--tly-bad-ink); }
.tly-attn-kind svg { flex: none; }
.tly-attn-headline { margin: var(--tly-space-2) 0 2px; font-size: var(--tly-text-xl); line-height: var(--tly-leading-tight); color: var(--tly-ink); overflow-wrap: anywhere; }
.tly-attn-url { display: inline-block; color: var(--tly-ink-2); font-size: var(--tly-text-sm); overflow-wrap: anywhere; }
a.tly-attn-url:hover { color: var(--tly-accent-hover); }
.tly-attn-status { margin-top: var(--tly-space-3) !important; padding: var(--tly-space-2) var(--tly-space-3); border-radius: var(--tly-radius); background: var(--tly-warn-bg); color: var(--tly-warn-ink) !important; }
.tly-attn-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--tly-space-2); max-width: 820px; margin: var(--tly-space-4) 0 var(--tly-space-1); }
.tly-attn-metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--tly-space-3) var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); }
.tly-attn-metric-label { color: var(--tly-muted); font-size: var(--tly-text-xs); }
.tly-attn-metric-value { color: var(--tly-ink); font-size: var(--tly-text-xl); font-weight: var(--tly-weight-semibold); line-height: 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tly-attn-metric-change { font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); color: var(--tly-ink-2); }
.tly-attn-metric-change.is-bad { color: var(--tly-bad-ink); }
.tly-attn-metric-change.is-good { color: var(--tly-good-ink); }
.tly-attn-box { margin-top: var(--tly-space-4); max-width: 820px; padding: var(--tly-space-4) var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); }
.tly-attn-box h4 { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-3) !important; font-size: var(--tly-text-sm); }
.tly-attn-box h4::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tly-faint); }
.tly-attn-box p:last-child { margin-bottom: 0; }
.tly-attn-box.is-insight { background: var(--tly-accent-bg); border-color: color-mix(in srgb, var(--tly-accent-mark) 25%, transparent); }
.tly-attn-box.is-insight h4 { color: var(--tly-accent-ink); }
.tly-attn-box.is-insight h4::before { background: var(--tly-accent-mark); }
.tly-attn-box.is-insight p { color: var(--tly-ink); }
.tly-attn-box.is-checks { background: var(--tly-subtle); }
.tly-attn-box.is-checks h4::before { background: var(--tly-good); }
.tly-attn-box .tly-attn-confidence { margin: var(--tly-space-3) 0 0 !important; }
.tly-attn-confidence { margin-top: var(--tly-space-3) !important; padding-left: var(--tly-space-3); border-left: 3px solid var(--tly-line-strong); font-size: var(--tly-text-xs); color: var(--tly-muted) !important; }
.tly-attn-confidence.is-early { border-left-color: var(--tly-warn); color: var(--tly-warn-ink) !important; }
.tly-attn-more { margin-top: var(--tly-space-4); max-width: 820px; border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); }
.tly-attn-more > summary { padding: var(--tly-space-2) var(--tly-space-3); cursor: pointer; font-weight: var(--tly-weight-medium); color: var(--tly-ink); list-style-position: inside; }
.tly-attn-more > summary:focus-visible { outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius); }
.tly-attn-more[open] > summary { border-bottom: 1px solid var(--tly-line); }
.tly-attn-more-body { padding: 0 var(--tly-space-3) var(--tly-space-3); }
.tly-attn-more-body .tly-attn-evidence h4 { margin: var(--tly-space-4) 0 0; }
.tly-attn-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-3); margin-top: var(--tly-space-4); }
.tly-attn-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); background: var(--tly-subtle); color: var(--tly-ink-2); }
.tly-attn-chip.is-good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
.tly-attn-setup { font-size: var(--tly-text-xs); }
@media (max-width: 600px) {
	.tly-attn-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tly-attn-metric-value { font-size: var(--tly-text-md); line-height: 24px; }
}
.tly-attn-facts, .tly-attn-table { width: 100%; max-width: 820px; margin-top: var(--tly-space-3); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tly-attn-facts th, .tly-attn-facts td, .tly-attn-table th, .tly-attn-table td { padding: var(--tly-space-2) var(--tly-space-3); border-bottom: 1px solid var(--tly-line); text-align: right; font-size: var(--tly-text-sm); color: var(--tly-ink-2); font-weight: var(--tly-weight); }
.tly-attn-facts thead th, .tly-attn-table thead th { color: var(--tly-muted); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); background: var(--tly-subtle); }
.tly-attn-facts th:first-child, .tly-attn-table th:first-child { text-align: left; }
.tly-attn-facts tbody th { color: var(--tly-ink); font-weight: var(--tly-weight-medium); }
.tly-attn-key { color: var(--tly-ink) !important; overflow-wrap: anywhere; }
.tly-attn-change.is-bad, .tly-attn-table .is-bad { color: var(--tly-bad-ink); font-weight: var(--tly-weight-medium); }
.tly-attn-change.is-good, .tly-attn-table .is-good { color: var(--tly-good-ink); font-weight: var(--tly-weight-medium); }
.tly-attn-evidence h4 { margin-bottom: 0; }
.tly-attn-checks { margin: 0; padding: 0; list-style: none; counter-reset: tly-check; color: var(--tly-ink); }
.tly-attn-checks li { position: relative; margin: 0 0 var(--tly-space-2); padding: var(--tly-space-3) var(--tly-space-3) var(--tly-space-3) 44px; border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); line-height: var(--tly-leading); counter-increment: tly-check; }
.tly-attn-checks li:last-child { margin-bottom: 0; }
.tly-attn-checks li::before { content: counter(tly-check); position: absolute; left: 12px; top: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tly-primary); color: var(--tly-on-primary); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-semibold); line-height: var(--tly-leading-none); }
.tly-attn-basis { margin-top: var(--tly-space-3) !important; color: var(--tly-muted) !important; font-size: var(--tly-text-xs); }
.tly-attn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2); margin-top: var(--tly-space-3); }
.tly-attn-open { margin-left: var(--tly-space-1); font-weight: var(--tly-weight-medium); }
.tly-attn-compose { margin-top: var(--tly-space-3); padding: var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); max-width: 640px; }
.tly-attn-compose label { display: block; margin-bottom: var(--tly-space-1); font-weight: var(--tly-weight-medium); color: var(--tly-ink); }
.tly-attn-compose textarea { width: 100%; }
.tly-attn-compose p { margin: var(--tly-space-2) 0 var(--tly-space-2) !important; }
.tly-attn-compose-actions { display: flex; align-items: center; gap: var(--tly-space-3); }
.tly-attn-feedback { margin: var(--tly-space-2) 0 0 !important; font-weight: var(--tly-weight-medium); }
.tly-attn-feedback:empty { display: none; }
.tly-attn-feedback.is-good { color: var(--tly-good-ink) !important; }
.tly-attn-feedback.is-bad { color: var(--tly-bad-ink) !important; }
.tly-attn-errors { margin-top: var(--tly-space-3); padding: var(--tly-space-3) var(--tly-space-4); border: 1px solid var(--tly-warn-line); border-radius: var(--tly-radius); background: var(--tly-warn-bg); }
.tly-attn-errors p { margin: 0 0 var(--tly-space-1); color: var(--tly-warn-ink); }
.tly-attn-errors ul { margin: 0; padding-left: var(--tly-space-5); list-style: disc; color: var(--tly-ink-2); }
body.tly-shell .wrap .tly-slack-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-3); }
@media (max-width: 782px) {
	.tly-attn-row { grid-template-columns: auto minmax(0, 1fr); }
	.tly-attn-when { grid-column: 2; }
	.tly-attn-view { grid-column: 1 / -1; justify-self: start; }
}

/* Settings → AI Advisor */
.tly-ai-limits { display: flex; flex-wrap: wrap; gap: var(--tly-space-2) var(--tly-space-5); }
.tly-ai-limits label { display: inline-flex; align-items: center; gap: var(--tly-space-2); }
.tly-ai-limits input[type="number"] { width: 96px; }
.tly-ai-log-box > summary { cursor: pointer; color: var(--tly-accent); font-weight: var(--tly-weight-medium); }
.tly-ai-log-table { margin-top: var(--tly-space-2); }
.tly-ai-log-table th, .tly-ai-log-table td { font-size: var(--tly-text-xs); white-space: nowrap; }

/* What matters first */
/* One header style for every panel that has a title plus controls or a status line. */
body.tly-shell .wrap .tly-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tly-space-2) var(--tly-space-4); margin: 0 calc(-1 * var(--tly-space-5)) var(--tly-space-4); padding: var(--tly-space-4) var(--tly-space-5); border-bottom: 1px solid var(--tly-line); }
body.tly-shell .wrap .tly-panel-head h2 { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0; padding: 0; font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); line-height: 24px; }
body.tly-shell .wrap .tly-panel-head .tly-attn-meta { margin: 0; }
.tly-overview .tly-attn-intro { margin: calc(-1 * var(--tly-space-2)) 0 var(--tly-space-4); }

/* Summary cards: three short facts, the attention signal is a link to the list. */
.tly-overview .tly-ov-summary { gap: var(--tly-space-3); margin: 0 0 var(--tly-space-5); }
.tly-overview .tly-ov-card { gap: var(--tly-space-1); padding: var(--tly-space-4) var(--tly-space-5); box-shadow: var(--tly-shadow-xs); }
.tly-overview .tly-ov-card-num { font-size: var(--tly-text-2xl); }
body.tly-shell .wrap a.tly-ov-flag, .tly-ov-flag { display: inline-flex; align-self: flex-start; align-items: center; gap: var(--tly-space-2); min-height: 24px; margin-top: 2px; padding: 2px var(--tly-space-3); border-radius: var(--tly-radius-sm); background: var(--tly-flat-bg); color: var(--tly-ink-2); font-weight: var(--tly-weight-medium); text-decoration: none; }
.tly-ov-flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
body.tly-shell .wrap a.tly-ov-flag.is-warn, .tly-ov-flag.is-warn { background: var(--tly-warn-bg); color: var(--tly-warn-ink); }
body.tly-shell .wrap a.tly-ov-flag.is-good, .tly-ov-flag.is-good { background: var(--tly-good-bg); color: var(--tly-good-ink); }
a.tly-ov-flag:hover { text-decoration: underline; }
a.tly-ov-flag:focus-visible { outline: none; box-shadow: var(--tly-focus); }

/* Going well · Connections and e-mails · Report e-mails: one row of equal cards. */
.tly-overview .tly-ov-boxes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; gap: var(--tly-space-4); margin-bottom: var(--tly-space-5); }
@media (max-width: 1100px) { .tly-overview .tly-ov-boxes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.tly-overview .tly-ov-boxes > .tly-panel.tly-ov-box { display: flex; flex-direction: column; padding-bottom: var(--tly-space-5); }
.tly-overview .tly-ov-boxes > .tly-panel.tly-ov-box[hidden] { display: none; }
.tly-ov-wins .tly-ov-wins-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--tly-space-2); }
.tly-ov-wins .tly-ov-wins-list li { position: relative; margin: 0; padding-left: var(--tly-space-4); color: var(--tly-ink-2); line-height: var(--tly-leading); }
.tly-ov-wins .tly-ov-wins-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--tly-good); }
.tly-ov-wins .tly-ov-wins-list a { font-weight: var(--tly-weight-semibold); text-decoration: none; }
.tly-ov-wins .tly-ov-wins-list a:hover { text-decoration: underline; }
.tly-overview .tly-ov-all-good { padding: var(--tly-space-3) var(--tly-space-3); line-height: var(--tly-leading); }
.tly-overview .tly-ov-emails-lead { margin: 0 0 var(--tly-space-3); }
.tly-overview .tly-ov-email-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); }
.tly-overview .tly-ov-email-stats li { padding: var(--tly-space-2) var(--tly-space-3); }
.tly-overview .tly-ov-stat-num { font-size: var(--tly-text-xl); line-height: 28px; }
.tly-overview .tly-ov-email-links { margin-top: var(--tly-space-3); }

/* All websites: a table on wide screens, one card per website when the panel is narrow. */
.tly-overview .tly-ov-all { container-type: inline-size; }
.tly-overview .tly-ov-all-head .tly-ov-sort select { width: auto; min-width: 200px; }
.tly-overview .tly-ov-table td, .tly-overview .tly-ov-table th { padding-top: var(--tly-space-3); padding-bottom: var(--tly-space-3); }
.tly-overview .tly-ov-table .tly-ov-site .row-title { font-size: var(--tly-text-base); }
@container (max-width: 760px) {
	body.tly-shell .wrap.tly-overview .tly-table-scroll { overflow: visible; }
	body.tly-shell .wrap.tly-overview .tly-ov-table { border: 0; box-shadow: none; }
	body.tly-shell .wrap.tly-overview .tly-ov-table thead { display: none; }
	body.tly-shell .wrap.tly-overview .tly-ov-table, body.tly-shell .wrap.tly-overview .tly-ov-table tbody { display: block; width: 100%; }
	body.tly-shell .wrap.tly-overview .tly-ov-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tly-space-3) var(--tly-space-4); margin: 0 0 var(--tly-space-3); padding: var(--tly-space-4) var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); }
	body.tly-shell .wrap.tly-overview .tly-ov-table tr:last-child { margin-bottom: 0; }
	body.tly-shell .wrap.tly-overview .tly-ov-table tr.is-flagged td:first-child { box-shadow: none; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td { display: block; min-width: 0; padding: 0; border: 0; background: none; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-site { grid-column: 1 / -1; min-width: 0; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-status { grid-column: 1; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-email { grid-column: 2 / -1; }
	/* Core's phone table puts a label in an absolutely positioned ::before; the card shows its own label instead. */
	body.tly-shell .wrap.tly-overview .tly-ov-table td::before { content: none; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td[data-label]::before { content: attr(data-label); position: static; width: auto; overflow: visible; white-space: normal; display: block; margin-bottom: var(--tly-space-1); color: var(--tly-muted); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); }
	body.tly-shell .wrap.tly-overview .tly-ov-spark svg { max-width: 100%; }
	/* The cell's label already names the conversions. */
	body.tly-shell .wrap.tly-overview .tly-ov-table td[data-kpi="leads"] > .tly-sub { display: none; }
}
@container (max-width: 420px) {
	body.tly-shell .wrap.tly-overview .tly-ov-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	body.tly-shell .wrap.tly-overview .tly-ov-table td[data-kpi="position"] { grid-column: auto; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-status { grid-column: auto; }
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-email { grid-column: 1 / -1; }
}

/* Phones: summary cards become short rows, the label and note on the left, the number on the right. */
@media (max-width: 640px) {
	.tly-overview .tly-ov-summary { gap: var(--tly-space-2); }
	.tly-overview .tly-ov-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label num" "sub num"; align-items: center; gap: 2px var(--tly-space-3); padding: var(--tly-space-3) var(--tly-space-4); }
	.tly-overview .tly-ov-card-label { grid-area: label; }
	.tly-overview .tly-ov-card-num { grid-area: num; font-size: var(--tly-text-2xl); text-align: right; white-space: nowrap; }
	.tly-overview .tly-ov-card-sub { grid-area: sub; justify-self: start; }
	.tly-overview .tly-ov-all-head .tly-ov-sort { width: 100%; }
	.tly-overview .tly-ov-all-head .tly-ov-sort select { flex: 1; min-width: 0; }
}

/* Deliveries: filters read left to right on phones too; names don't break into three lines on tablets. */
body.tly-shell .wrap .tly-filters-links { float: none; text-align: left; }
body.tly-shell .wrap .tly-delivery-table .column-primary { min-width: 180px; }
/* Jumping to the attention list from the summary card clears the sticky bars. */
.tly-overview #tly-attention, .tly-overview #tly-ov-actions-title { scroll-margin-top: 72px; }

/* Client Monitor: what to do about each issue */
.tly-attn-next { display: block; margin-top: var(--tly-space-1); color: var(--tly-ink-2); font-size: var(--tly-text-sm); line-height: var(--tly-leading); }
.tly-attn-next b { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); }
.tly-attn-more-issues { padding: var(--tly-space-2) var(--tly-space-4) var(--tly-space-3) var(--tly-space-4); border-top: 1px solid var(--tly-line); background: var(--tly-subtle); }
body.tly-shell .wrap .tly-attn-more-issues .button-link { font-size: var(--tly-text-sm); font-weight: var(--tly-weight-medium); text-decoration: none; }
body.tly-shell .wrap .tly-attn-more-issues .button-link:hover { text-decoration: underline; }

/* Going well: one line per client. */
.tly-ov-wins .tly-ov-wins-list li { display: flex; flex-direction: column; gap: 2px; }
.tly-ov-win-text { color: var(--tly-ink-2); }
.tly-ov-wins-note { margin: var(--tly-space-3) 0 0 !important; }

/* Connections and Report e-mails: short status cards. */
body.tly-shell .wrap.tly-overview .tly-ov-boxes .tly-panel > h2:first-child { margin-bottom: var(--tly-space-3); padding-top: var(--tly-space-4); padding-bottom: var(--tly-space-4); font-size: var(--tly-text-md); }
.tly-overview .tly-ov-boxes > .tly-panel.tly-ov-box { padding-bottom: var(--tly-space-4); }
.tly-overview .tly-ov-all-good { display: flex; align-items: flex-start; gap: var(--tly-space-2); padding: var(--tly-space-2) var(--tly-space-3); font-size: var(--tly-text-sm); }
.tly-overview .tly-ov-all-good::before { content: "\2713"; flex: none; font-weight: var(--tly-weight-bold); }
.tly-ov-mailstate { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-2); margin: 0 0 var(--tly-space-3); color: var(--tly-ink-2); font-size: var(--tly-text-sm); }
.tly-overview .tly-ov-email-stats { display: flex; flex-wrap: wrap; gap: var(--tly-space-1) var(--tly-space-4); margin: 0 0 var(--tly-space-2); }
.tly-overview .tly-ov-email-stats li { padding: 0; border: 0; font-size: var(--tly-text-sm); color: var(--tly-ink-2); }
.tly-overview .tly-ov-email-stats .tly-ov-stat-num { display: inline; font-size: var(--tly-text-md); }
.tly-ov-email-meta { margin: 0 0 var(--tly-space-3); }
.tly-ov-email-k { margin: var(--tly-space-2) 0 var(--tly-space-1); color: var(--tly-muted); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-semibold); }
.tly-overview .tly-ov-email-links { margin: 0; }
/* Issue rows: severity in a fixed column so titles line up; on phones it sits above the title. */
.tly-attn-row { grid-template-columns: 74px minmax(0, 1fr) auto auto; }
.tly-attn-row > .tly-attn-sev { align-self: start; justify-self: start; margin-top: 1px; }
@media (max-width: 782px) {
	.tly-attn-row { grid-template-columns: minmax(0, 1fr); gap: var(--tly-space-2); }
	.tly-attn-row > .tly-attn-sev, .tly-attn-when, .tly-attn-view { grid-column: 1; }
	.tly-attn-row > .tly-attn-when { justify-self: start; }
}
/* Three short cards fit side by side down to tablet width. */
.tly-overview .tly-ov-boxes { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
body.tly-shell .wrap.tly-overview .tly-ov-email-links .button { max-width: 100%; height: auto; min-height: var(--tly-ctl-sm); padding-top: var(--tly-space-1); padding-bottom: var(--tly-space-1); line-height: var(--tly-leading-snug); white-space: normal; text-align: center; }

/* Goals & priorities (Edit site) */
body.tly-shell .wrap .tly-panel.tly-goals { padding-bottom: 0; }
body.tly-shell .wrap .tly-panel.tly-goals[open] { padding-bottom: var(--tly-space-5); }
.tly-goals > summary { display: flex; align-items: center; gap: var(--tly-space-3); margin: 0 calc(-1 * var(--tly-space-5)); padding: var(--tly-space-4) var(--tly-space-5); list-style: none; cursor: pointer; border-radius: var(--tly-radius); }
.tly-goals > summary::-webkit-details-marker { display: none; }
.tly-goals > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--tly-muted); border-bottom: 2px solid var(--tly-muted); transform: rotate(45deg); transition: transform var(--tly-dur) var(--tly-ease); }
.tly-goals[open] > summary { border-bottom: 1px solid var(--tly-line); border-radius: var(--tly-radius) var(--tly-radius) 0 0; margin-bottom: var(--tly-space-4); }
.tly-goals[open] > summary::after { transform: rotate(-135deg); }
.tly-goals > summary:focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-goals-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tly-goals-title { display: flex; align-items: center; gap: var(--tly-space-2); font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); line-height: 24px; color: var(--tly-ink); }
.tly-goals-sub { font-size: var(--tly-text-sm); color: var(--tly-muted); }
.tly-goals-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.5fr) minmax(220px, 1fr); gap: var(--tly-space-3); align-items: start; }
body.tly-shell .wrap .tly-goals-card { display: flex; flex-direction: column; gap: var(--tly-space-2); min-width: 0; margin: 0; padding: var(--tly-space-4) var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-surface); }
.tly-goals-card legend { float: left; width: 100%; margin: 0; padding: 0; font-size: var(--tly-text-base); font-weight: var(--tly-weight-semibold); color: var(--tly-ink); }
.tly-goals-card legend + * { clear: both; }
.tly-goals-hint { margin: 0 0 var(--tly-space-1); font-size: var(--tly-text-xs); color: var(--tly-muted); }
.tly-goals-hint:empty { display: none; }
.tly-goals-card .tly-check { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0; padding: var(--tly-space-1) 0; overflow-wrap: anywhere; }
.tly-goals-card .tly-check input { flex: none; margin: 0; }
.tly-goals-custom { width: 100%; max-width: none; margin-top: var(--tly-space-1); }
.tly-goal-pages { display: flex; flex-direction: column; gap: var(--tly-space-2); margin: 0; padding: 0; list-style: none; }
.tly-goal-pages:empty { display: none; }
.tly-goal-page { display: flex; align-items: center; gap: var(--tly-space-2); min-height: 36px; margin: 0; padding: var(--tly-space-1) var(--tly-space-2) var(--tly-space-1) var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); }
.tly-goal-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--tly-text-sm); color: var(--tly-ink); }
.tly-goal-page .tly-badge { flex: none; }
.tly-goal-remove { flex: none; width: 28px; height: 28px; border-radius: var(--tly-radius-sm); color: var(--tly-muted) !important; font-size: var(--tly-text-xl); line-height: var(--tly-leading-none); text-decoration: none !important; }
.tly-goal-remove:hover { background: var(--tly-hover); color: var(--tly-bad-ink) !important; }
.tly-goal-add { display: flex; gap: var(--tly-space-2); margin-top: 2px; }
.tly-goal-add input { flex: 1; min-width: 0; width: auto; max-width: none; }
.tly-goal-add .button { flex: none; }
.tly-goal-events { display: flex; flex-direction: column; }
.tly-goal-events .tly-check span { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .tly-goals-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tly-goals-card:nth-child(2) { grid-column: 1 / -1; grid-row: 1; } }
@media (max-width: 782px) { .tly-goals-grid { grid-template-columns: minmax(0, 1fr); } .tly-goals-card:nth-child(2) { grid-row: auto; } .tly-goal-add { flex-wrap: wrap; } .tly-goal-add input { flex-basis: 100%; } }

/* Priorities in the Client Monitor */
.tly-attn-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-1) var(--tly-space-2); min-width: 0; }
.tly-attn-prio { display: inline-flex; align-items: center; gap: var(--tly-space-1); height: 20px; padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); font-size: var(--tly-text-xs); font-weight: var(--tly-weight-medium); line-height: var(--tly-leading-none); white-space: nowrap; background: var(--tly-subtle); border: 1px solid var(--tly-line); color: var(--tly-ink-2); }
.tly-attn-prio::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tly-attn-prio.is-key { background: var(--tly-accent-bg); border-color: transparent; color: var(--tly-accent-ink); }

/* All websites: search, filter and top issue */
.tly-overview .tly-ov-all-head { justify-content: space-between; }
.tly-ov-search { display: flex; flex: 0 1 300px; min-width: 0; }
body.tly-shell .wrap .tly-ov-search input[type="search"] { width: 100%; min-height: var(--tly-ctl); padding: 0 var(--tly-space-3) 0 36px; color: var(--tly-ink); }
.tly-ov-search { position: relative; }
.tly-ov-search::before { content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--tly-muted); pointer-events: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%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 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.tly-ov-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tly-space-2) var(--tly-space-4); margin: 0 0 var(--tly-space-3); }
.tly-ov-filter { display: flex; flex-wrap: wrap; gap: var(--tly-space-2); }
.tly-overview .tly-ov-tools .tly-ov-sort select { width: auto; min-width: 200px; }
.tly-ov-table td.tly-ov-issue { min-width: 190px; max-width: 280px; }
.tly-ov-issue-head { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: center; gap: var(--tly-space-1) var(--tly-space-2); color: var(--tly-ink); }
.tly-ov-issue-head > :nth-child(n+3) { grid-column: 2; justify-self: start; }
.tly-ov-issue > .tly-sub, .tly-ov-issue > .tly-ov-issue-more { margin-left: var(--tly-space-4); }
.tly-ov-table td[data-kpi="leads"] > .tly-sub { max-width: 16ch; font-size: var(--tly-text-xs); line-height: var(--tly-leading-snug); }
.tly-ov-issue-head strong { font-weight: var(--tly-weight-semibold); overflow-wrap: anywhere; }
.tly-ov-issue .tly-sub { display: block; margin-top: 2px; line-height: var(--tly-leading-snug); }
.tly-ov-issue .tly-ov-dot.is-bad { background: var(--tly-bad-ink); }
.tly-ov-issue .tly-ov-dot.is-warn { background: var(--tly-warn-ink); }
.tly-ov-issue-more { display: inline-block; margin-top: 2px; font-size: var(--tly-text-xs); }
.tly-ov-nomatch { margin: var(--tly-space-3) 0 0; padding: var(--tly-space-3) var(--tly-space-4); border-radius: var(--tly-radius); background: var(--tly-subtle); }
.tly-ov-nomatch[hidden] { display: none; }
@container (max-width: 760px) {
	body.tly-shell .wrap.tly-overview .tly-ov-table td.tly-ov-issue { grid-column: 1 / -1; max-width: none; min-width: 0; }
}
@media (max-width: 782px) {
	.tly-ov-search { flex: 1 1 100%; }
	.tly-ov-tools { align-items: stretch; }
	.tly-overview .tly-ov-tools .tly-ov-sort { width: 100%; }
	.tly-overview .tly-ov-tools .tly-ov-sort select { flex: 1; min-width: 0; }
}

/* Founder weekly brief (Settings → Client Monitor) */
.tly-brief-when { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-2); margin: var(--tly-space-2) 0 var(--tly-space-3); }
.tly-panel .form-table .tly-brief-when select { min-width: 0; width: auto; }

/* AI Advisor: provider, key and model */
.tly-ai-model-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2); }
.tly-panel .form-table .tly-ai-model-row select { min-width: 240px; }
.tly-ai-keystate[hidden], .tly-check.tly-ai-remove[hidden] { display: none !important; }
body.tly-shell .wrap .tly-ai-keystate .tly-ai-keyhelp,
body.tly-shell .wrap .tly-slack-remove + .description { margin: var(--tly-space-3) 0 0; }
.tly-check.tly-ai-remove, .tly-check.tly-slack-remove { display: flex !important; width: max-content; margin-top: var(--tly-space-2); }
#tly-ai-key + .tly-ai-remove { margin-top: var(--tly-space-2); }

/* Edit site sections fold away (all but Data sources) */
body.tly-shell .wrap .tly-panel.tly-sec > h2.tly-sec-head:first-child { padding: 0; }
.tly-sec-toggle { display: flex; align-items: center; gap: var(--tly-space-3); width: 100%; margin: 0; padding: var(--tly-space-4) var(--tly-space-5); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--tly-radius); }
.tly-sec-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--tly-muted); border-bottom: 2px solid var(--tly-muted); transform: rotate(-135deg); transition: transform var(--tly-dur) var(--tly-ease); }
.tly-sec.is-collapsed .tly-sec-toggle::after { transform: rotate(45deg); }
.tly-sec-toggle:hover .tly-sec-title { color: var(--tly-primary); }
.tly-sec-toggle:focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-sec-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tly-sec-title { font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); line-height: 24px; color: var(--tly-ink); }
.tly-sec-sub { font-size: var(--tly-text-sm); font-weight: var(--tly-weight); line-height: var(--tly-leading-snug); color: var(--tly-muted); }
.tly-sec:not(.is-collapsed) .tly-sec-sub { display: none; }
body.tly-shell .wrap .tly-panel.tly-sec.is-collapsed { padding-bottom: 0; }
body.tly-shell .wrap .tly-panel.tly-sec.is-collapsed > h2.tly-sec-head:first-child { margin-bottom: 0; border-bottom: 0; }
.tly-sec.is-collapsed > :not(.tly-sec-head) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .tly-sec-toggle::after { transition: none; } }

/* Segments: the name and the words or paths get room instead of "Com" and "buy, price, pr". */
@media (min-width: 783px) {
	.tly-segment { grid-template-columns: minmax(130px, 1.2fr) minmax(130px, .9fr) minmax(155px, 1fr) minmax(160px, 1.8fr) auto; }
}
.tly-panel .form-table .tly-segment select, .tly-panel .form-table .tly-segment input { min-width: 0; width: 100%; max-width: none; }

/* Report schedules that are off, time zones next to times, Delete kept apart. */
.tly-th-note { margin-left: var(--tly-space-1); color: var(--tly-muted); font-weight: var(--tly-weight); font-size: var(--tly-text-xs); text-transform: none; letter-spacing: 0; }
.tly-sched-row.is-off .tly-col-when, .tly-sched-row.is-off .tly-send-to { opacity: .5; }
.tly-sched-row.is-off .tly-col-when:focus-within, .tly-sched-row.is-off .tly-send-to:focus-within { opacity: 1; }
body.tly-shell .wrap select:disabled, body.tly-shell .wrap input:disabled, body.tly-shell .wrap textarea:disabled { background: var(--tly-subtle); color: var(--tly-muted); border-color: var(--tly-line); cursor: not-allowed; opacity: .7; }
body.tly-shell .wrap .row-actions .trash { margin-left: var(--tly-space-3); padding-left: var(--tly-space-3); border-left: 1px solid var(--tly-line); }
.tly-brief-tz { color: var(--tly-muted); font-size: var(--tly-text-xs); }
.tly-brief-when.is-off > select, .tly-brief-when.is-off > .tly-brief-tz { opacity: .5; }
.tly-brief-when.is-off > select:focus { opacity: 1; }
.tly-when-sum { display: block; grid-column: 1 / -1; margin-top: var(--tly-space-1); color: var(--tly-muted); font-size: var(--tly-text-xs); line-height: var(--tly-leading-snug); }
/* Connections: Google sign-in first, the service-account key folded away as the advanced path; checklist grouped by state. */
.tly-methods.is-stacked { grid-template-columns: minmax(0, 1fr); }
body.tly-shell .wrap .tly-method-main { border-color: var(--tly-line); }
.tly-method-main h3 .tly-badge { margin-left: var(--tly-space-2); vertical-align: 2px; }
body.tly-shell .wrap .tly-method-adv { padding-top: 0; padding-bottom: 0; }
.tly-method-adv > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--tly-space-1) var(--tly-space-2); padding: var(--tly-space-4) var(--tly-space-8) var(--tly-space-4) 0; cursor: pointer; position: relative; list-style: none; }
.tly-method-adv > summary::-webkit-details-marker { display: none; }
.tly-method-adv > summary::after { content: ""; position: absolute; right: 4px; top: 22px; width: 8px; height: 8px; border-right: 2px solid var(--tly-muted); border-bottom: 2px solid var(--tly-muted); transform: rotate(45deg); }
.tly-method-adv[open] > summary::after { transform: rotate(-135deg); top: 26px; }
.tly-method-adv > summary:focus-visible { outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius); }
.tly-method-adv-title { color: var(--tly-ink); font-weight: var(--tly-weight-semibold); font-size: var(--tly-text-md); }
.tly-method-adv[open] { padding-bottom: var(--tly-space-5); }
.tly-method-adv[open] > summary { border-bottom: 1px solid var(--tly-line); margin-bottom: var(--tly-space-3); }
body.tly-shell .wrap .tly-checklist-h { display: flex; align-items: center; gap: var(--tly-space-2); margin: var(--tly-space-4) 0 0; font-size: var(--tly-text-sm); font-weight: var(--tly-weight-semibold); color: var(--tly-muted); }
body.tly-shell .wrap .tly-checklist-h.is-bad { color: var(--tly-bad-ink); }
body.tly-shell .wrap .tly-checklist-h.is-done { color: var(--tly-good-ink); }
.tly-checklist-n { padding: 0 var(--tly-space-2); border-radius: var(--tly-radius-sm); background: var(--tly-flat-bg); color: var(--tly-ink-2); font-size: var(--tly-text-xs); letter-spacing: 0; line-height: var(--tly-badge-h); }
.tly-checklist-h + .tly-checklist { margin-top: var(--tly-space-2); }
.tly-sched-off-tag { display: none; margin-top: var(--tly-space-2); }
.tly-sched-row.is-off .tly-sched-off-tag { display: inline-flex; }
.tly-sched-row.is-off .tly-sched-next { opacity: .5; text-decoration: line-through; }
/* Setup guide: the three required steps first, the two connection methods as alternatives, optional parts and troubleshooting folded away. */
.tly-badge.is-accent { background: var(--tly-accent-bg); color: var(--tly-accent-ink); }
body.tly-shell .wrap .tly-guide-ai { padding-top: var(--tly-space-4); padding-bottom: var(--tly-space-4); }
body.tly-shell .wrap .tly-guide-ai > h2.tly-guide-ai-title:first-child { display: flex; align-items: center; gap: var(--tly-space-2); margin: 0 0 var(--tly-space-2); padding: 0; border: 0; font-size: var(--tly-text-base); }
.tly-guide-ai-title svg { flex: none; color: var(--tly-accent); }
.tly-guide-ai > p { margin: 0 0 var(--tly-space-3); color: var(--tly-ink-2); }
.tly-guide-ai-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tly-space-2); }
body.tly-shell .wrap .tly-guide-ai-actions .button { justify-content: center; width: 100%; min-height: var(--tly-ctl-lg); text-align: center; }
.tly-guide-ai > p.tly-guide-ai-note { margin: var(--tly-space-3) 0 0; color: var(--tly-muted); font-size: var(--tly-text-xs); }
@media (max-width: 600px) { .tly-guide-ai-actions { grid-template-columns: minmax(0, 1fr); } }
body.tly-shell .wrap .tly-guide-path { padding-top: var(--tly-space-4); padding-bottom: var(--tly-space-4); }
.tly-guide-path ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tly-space-3); margin: 0; padding: 0; list-style: none; }
.tly-guide-path li { margin: 0; }
.tly-guide-path li a { display: flex; align-items: flex-start; gap: var(--tly-space-2); height: 100%; box-sizing: border-box; padding: var(--tly-space-3); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); background: var(--tly-subtle); color: var(--tly-ink); text-decoration: none; }
.tly-guide-path li a:hover { border-color: var(--tly-accent); }
.tly-guide-path li a:focus-visible { outline: none; box-shadow: var(--tly-focus); }
.tly-guide-path-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tly-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--tly-accent); color: var(--tly-on-accent); font-size: var(--tly-text-sm); font-weight: var(--tly-weight-semibold); line-height: var(--tly-leading-none); }
.tly-guide-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2) var(--tly-space-2); margin: var(--tly-space-3) 0 0; color: var(--tly-muted); font-size: var(--tly-text-sm); }
body.tly-shell .wrap .tly-guide-step > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-2); }
.tly-guide-lead { margin-top: 0; }
.tly-guide-compare { margin: 0 0 var(--tly-space-1); }
.tly-guide-compare table { margin-top: var(--tly-space-2); }
.tly-guide-method { margin: var(--tly-space-3) 0 0; padding: 0 var(--tly-space-4); border: 1px solid var(--tly-line); border-radius: var(--tly-radius); }
.tly-guide-method[open] { padding-bottom: var(--tly-space-2); }
.tly-guide-method > summary, .tly-guide-fold > summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--tly-space-1) var(--tly-space-2); padding: var(--tly-space-4) var(--tly-space-8) var(--tly-space-4) 0; cursor: pointer; list-style: none; }
.tly-guide-method > summary::-webkit-details-marker, .tly-guide-fold > summary::-webkit-details-marker { display: none; }
.tly-guide-method > summary::after, .tly-guide-fold > summary::after { content: ""; position: absolute; right: 4px; top: calc(50% - 6px); width: 8px; height: 8px; border-right: 2px solid var(--tly-muted); border-bottom: 2px solid var(--tly-muted); transform: rotate(45deg); }
.tly-guide-method[open] > summary::after, .tly-guide-fold[open] > summary::after { top: calc(50% - 2px); transform: rotate(-135deg); }
.tly-guide-method > summary:focus-visible, .tly-guide-fold > summary:focus-visible { outline: none; box-shadow: var(--tly-focus); border-radius: var(--tly-radius); }
.tly-guide-method[open] > summary, .tly-guide-fold[open] > summary { margin-bottom: var(--tly-space-1); border-bottom: 1px solid var(--tly-line); }
.tly-guide-method-title { color: var(--tly-ink); font-size: var(--tly-text-md); font-weight: var(--tly-weight-semibold); }
body.tly-shell .wrap .tly-guide-fold { padding-top: 0; padding-bottom: 0; }
body.tly-shell .wrap .tly-guide-fold[open] { padding-bottom: var(--tly-space-4); }
.tly-guide-h { margin-bottom: var(--tly-space-3); }
.tly-guide-done { margin: var(--tly-space-4) 0 var(--tly-space-2); padding: var(--tly-space-3) var(--tly-space-3); border-radius: var(--tly-radius); background: var(--tly-good-bg); color: var(--tly-good-ink); }
body.tly-shell .wrap .tly-guide-done a { color: inherit; }
@media (max-width: 782px) { .tly-guide-path ol { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 782px) { .tly-guide-more > span[aria-hidden] { display: none; } .tly-guide-more { gap: var(--tly-space-2) var(--tly-space-3); } }
