/* URSY Dashboard: the site design standard (theme ursy-analytics variables; Cobalt fallbacks). Light only. */
.ud {
	--ud-bg: var(--bg, #f4f7fc); --ud-surface: var(--surface, #fff); --ud-ink: var(--ink, #0d1526); --ud-muted: var(--muted, #4a5466);
	--ud-line: var(--line, #dfe5ef); --ud-line2: var(--line-strong, #bcc6d6); --ud-accent: var(--accent, #0b4fd1); --ud-accent2: var(--accent-2, #7c3aed);
	--ud-link: var(--accent-ink, #0a3fa8); --ud-tint: var(--tint, #e6eeff); --ud-shadow: var(--shadow, 0 1px 2px rgba(12,20,40,.06), 0 14px 34px -20px rgba(12,20,40,.22));
	--ud-green: var(--c-green, #006b2d); --ud-tgreen: var(--t-green, #dcf7e1); --ud-coral: var(--c-coral, #b42318); --ud-tcoral: var(--t-coral, #ffe5df);
	background: var(--ud-bg); color: var(--ud-ink); font-family: var(--f-body, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
	padding: 24px 0 64px;
}
.ud-wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--c-pad, 24px); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }

/* Left rail (Under the Hood's layout idea, the site's look) */
.ud-rail { position: sticky; top: 16px; background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 16px; padding: 18px 12px; box-shadow: var(--ud-shadow); }
.ud-brand { margin: 0 8px 10px; font-weight: 800; font-size: 18px; }
.ud-brand span { color: var(--ud-muted); font-weight: 600; }
.ud-group { margin: 16px 10px 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ud-muted); }
.ud-rail ul { list-style: none; margin: 0; padding: 0; }
.ud-rail a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ud-ink); text-decoration: none; font-weight: 600; }
.ud-rail a:hover { background: var(--ud-tint); }
.ud-rail a[aria-current="page"] { background: var(--ud-tint); color: var(--ud-link); box-shadow: inset 3px 0 0 var(--ud-accent); }
.ud-soon { font-size: 11px; font-weight: 700; color: var(--ud-muted); background: var(--ud-bg); border: 1px solid var(--ud-line); border-radius: 99px; padding: 1px 8px; }

/* Top bar */
.ud-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.ud-top h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.ud-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ud-site { display: flex; align-items: center; gap: 8px; }
.ud-site label { font-weight: 700; color: var(--ud-muted); }
.ud-site select { min-height: 44px; border: 2px solid var(--ud-line2); border-radius: 12px; padding: 0 12px; font: inherit; background: var(--ud-surface); color: var(--ud-ink); }
.ud-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 99px; background: var(--ud-surface); border: 1px solid var(--ud-line); font-weight: 700; }
.ud-range { display: inline-flex; background: var(--ud-surface); border: 1px solid var(--ud-line2); border-radius: 12px; overflow: hidden; }
.ud-range a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ud-ink); text-decoration: none; font-weight: 700; }
.ud-range a + a { border-left: 1px solid var(--ud-line); }
.ud-range a[aria-current="true"] { background: var(--ud-accent); color: var(--on-accent, #fff); }
.ud-btn-s { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ud-line2); border-radius: 12px; background: var(--ud-surface); color: var(--ud-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.ud-btn-s:hover { border-color: var(--ud-accent); color: var(--ud-link); }

/* Number cards */
.ud-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ud-card { background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--ud-shadow); }
.ud-label { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ud-muted); }
.ud-big { margin: 0; font-size: clamp(30px, 3vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ud-delta { margin: 8px 0 0; font-weight: 700; font-size: 14px; }
.ud-delta.ud-good { color: var(--ud-green); } .ud-delta.ud-bad { color: var(--ud-coral); } .ud-delta.ud-flat { color: var(--ud-muted); }
.ud-vs { font-weight: 500; color: var(--ud-muted); }
.ud-good, .ud-card .ud-good { margin: 2px 0 0; font-size: 13px; color: var(--ud-muted); }
.ud-spark { display: block; width: 100%; height: 40px; margin-top: 10px; }
.ud-spark polyline { fill: none; stroke: var(--ud-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* "i" hover */
.ud-i { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; padding: 0; border: 1px solid var(--ud-line2); border-radius: 50%; background: var(--ud-surface); color: var(--ud-link); font: 700 12px/1 Georgia, serif; text-transform: none; letter-spacing: 0; cursor: help; vertical-align: middle; }
.ud-i:hover::after, .ud-i:focus-visible::after, .ud-i[aria-expanded="true"]::after { content: attr(data-tip); position: absolute; z-index: 20; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; padding: 10px 12px; border-radius: 10px; background: var(--ud-surface); color: var(--ud-ink); border: 1px solid var(--ud-line2); box-shadow: var(--shadow-lg, 0 20px 40px -20px rgba(10,30,90,.34)); font: 500 14px/1.45 var(--f-body, system-ui, sans-serif); text-align: left; white-space: normal; }

/* Chart */
.ud-chart { margin: 0 0 20px; background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--ud-shadow); }
.ud-chart figcaption { font-weight: 800; margin-bottom: 8px; }
.ud-chart svg { display: block; width: 100%; height: auto; }
.ud-chart polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ud-chart .ud-l0 { stroke: var(--ud-accent); } .ud-chart .ud-l1 { stroke: var(--ud-accent2); stroke-dasharray: 6 4; }
.ud-chart text { fill: var(--ud-muted); font-size: 13px; }
.ud-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.ud-key span::before { content: ''; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--ud-accent); }
.ud-key .ud-k1::before { background: var(--ud-accent2); }
.ud-key .ud-note { font-weight: 500; color: var(--ud-muted); } .ud-key .ud-note::before { display: none; }

/* Tables */
.ud-tablewrap { overflow-x: auto; background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 16px; box-shadow: var(--ud-shadow); }
.ud-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ud-table th { background: var(--ud-tint); text-align: left; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--ud-line); }
.ud-table td { padding: 10px 12px; border-bottom: 1px solid var(--ud-line); }
.ud-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--ud-bg) 60%, var(--ud-surface)); }
.ud-table .ud-n { text-align: right; font-variant-numeric: tabular-nums; }
.ud-table td a { color: var(--ud-link); font-weight: 700; }
.ud-table td:first-child { min-width: 180px; }
.ud-score { display: inline-flex; min-width: 36px; justify-content: center; padding: 2px 8px; border-radius: 99px; font-weight: 800; }
.ud-score.ud-green { background: var(--ud-tgreen); color: var(--ud-green); }
.ud-score.ud-amber { background: var(--t-amber, #fff0c7); color: var(--c-amber, #8a5600); }
.ud-score.ud-coral { background: var(--ud-tcoral); color: var(--ud-coral); }
.ud-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--ud-ink); cursor: pointer; }
.ud-sort span { font-size: 10px; color: var(--ud-muted); }
.ud-source { margin: 8px 2px 0; font-size: 13px; color: var(--ud-muted); }
.ud-intro { color: var(--ud-muted); max-width: var(--read, 760px); margin: 0 0 14px; }

/* Empty states, panels, welcome */
.ud-empty, .ud-panel, .ud-hello { background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 16px; padding: 24px; box-shadow: var(--ud-shadow); margin-bottom: 16px; }
.ud-empty { background: linear-gradient(var(--ud-tint), var(--ud-surface)); }
.ud-empty h2, .ud-panel h2, .ud-hello h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.ud-empty p, .ud-hello p { margin: 0 0 12px; color: var(--ud-muted); max-width: 640px; }
.ud-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.ud-steps li { display: flex; align-items: center; gap: 14px; background: var(--ud-surface); border: 1px solid var(--ud-line); border-radius: 14px; padding: 12px 16px; font-weight: 700; }
.ud-steps li > span:nth-child(2) { flex: 1; }
.ud-tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ud-line2); color: var(--ud-green); font-weight: 800; }
.ud-done .ud-tick { background: var(--ud-tgreen); border-color: var(--ud-green); }
.ud-steps em { font-style: normal; color: var(--ud-green); }
.ud-list, .ud-conn { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.ud-conn li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ud-ok { color: var(--ud-green); background: var(--ud-tgreen); border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 14px; }
.ud-muted { color: var(--ud-muted); font-size: 14px; }
.ud code { font-family: var(--f-mono, ui-monospace, monospace); font-size: .9em; }

/* Focus */
.ud a:focus-visible, .ud button:focus-visible, .ud select:focus-visible { outline: 3px solid var(--ud-accent); outline-offset: 2px; }

/* Phone */
@media (max-width: 900px) {
	.ud-wrap { grid-template-columns: 1fr; }
	.ud-rail { position: static; padding: 10px; }
	.ud-rail .ud-group { display: none; }
	.ud-rail ul { display: contents; }
	.ud-rail { display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; }
	.ud-rail .ud-brand { display: none; }
	.ud-rail a { min-height: 44px; }
}

/* PDF (browser print) */
@media print {
	header, footer, .site-header, .site-footer, .ud-rail, .ud-range, .ud-btn-s, .ud-site, .ud-i { display: none !important; }
	.ud { padding: 0; background: #fff; }
	.ud-wrap { display: block; }
	.ud-card, .ud-chart, .ud-tablewrap { box-shadow: none; break-inside: avoid; }
}

/* 1.1.0: demo, sample label, sign-up box, bars, alerts, forms */
.ud-badge { font-style: normal; font-size: 12px; font-weight: 800; color: var(--on-accent, #fff); background: var(--ud-accent); border-radius: 99px; padding: 2px 8px; vertical-align: middle; }
.ud-demobar { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--ud-tint); border: 1px solid var(--ud-line); }
.ud-demobar a { color: var(--ud-link); font-weight: 700; }
.ud-sample { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--t-amber, #fff0c7); color: var(--ud-ink); border: 1px solid color-mix(in srgb, var(--c-amber, #8a5600) 35%, transparent); }
.ud-sample strong { color: var(--c-amber, #8a5600); margin-right: 6px; }
.ud-signup { margin-top: 24px; padding: 24px; border-radius: 16px; background: linear-gradient(135deg, var(--ud-tint), var(--tint-2, #efe7ff)); border: 1px solid var(--ud-line); }
.ud-signup h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.ud-signup p { margin: 0 0 12px; color: var(--ud-muted); }
.ud-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ud-split .ud-panel { margin: 0; }
.ud-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ud-bars li { display: grid; grid-template-columns: 100px 1fr 44px; align-items: center; gap: 10px; font-weight: 600; }
.ud-bar { height: 10px; border-radius: 99px; background: var(--ud-bg); overflow: hidden; }
.ud-bar i { display: block; height: 100%; background: var(--ud-accent); border-radius: 99px; }
.ud-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.ud-check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; }
.ud-check input { width: 22px; height: 22px; accent-color: var(--ud-accent); }
.ud-form { display: flex; flex-wrap: wrap; gap: 10px; }
.ud-form input[type=text] { flex: 1 1 240px; min-height: 52px; padding: 0 14px; border: 2px solid var(--ud-line2); border-radius: 12px; font: inherit; }
.ud-form input:focus { outline: none; border-color: var(--ud-accent); box-shadow: 0 0 0 3px var(--ud-tint); }
.ud-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ud-btn-s[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) { .ud-bars li { grid-template-columns: 80px 1fr 40px; } }

/* 1.2.0: morning story, URSY Score, records */
.ud-story { margin: 0 0 18px; padding: 18px 22px; border-radius: 16px; background: var(--ud-surface); border: 1px solid var(--ud-line); border-left: 6px solid var(--ud-accent); box-shadow: var(--ud-shadow); }
.ud-story ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 18px; font-weight: 600; }
.ud-scorecard .ud-big .ud-score { font-size: 36px; padding: 2px 14px; }
.ud-scorecard small { font-size: 16px; color: var(--ud-muted); }
.ud-h2 { font-size: 22px; font-weight: 800; margin: 24px 0 10px; }
.ud-records { margin-top: 16px; }
@media (max-width: 600px) { .ud-story ul { font-size: 17px; } .ud-cards { grid-template-columns: 1fr; } }
