/* Darwin Labs platform mockups: the customer area (/profile), the admin area and the sign-in page. Tokens come from style.css. */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px; background: var(--ink-2); border-right: 1px solid var(--line); }
.side .brand { padding: 0 10px 18px; }
.side-group { margin-top: 14px; padding: 0 10px 6px; color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.side-link { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.side-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side-link.is-on { background: rgba(74, 197, 120, .12); color: var(--green-2); }
.side-link .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); font: 600 11px/18px var(--mono); text-align: center; }
.side-link.is-on .count { background: rgba(74, 197, 120, .22); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--green-2); font-weight: 700; font-size: 13px; }
.side-foot div b { display: block; font-size: 13px; }
.side-foot div span { display: block; color: var(--muted); font-size: 12px; }
.side-foot a { margin-left: auto; color: var(--muted); }
.side-foot a:hover { color: var(--text); }
.admin-badge { display: inline-flex; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(143, 108, 245, .18); color: var(--purple-2); font: 600 10px/16px var(--mono); letter-spacing: .04em; vertical-align: 1px; }

.main { min-width: 0; padding: 30px 40px 60px; }
.view { display: none; max-width: 1080px; }
.view.is-on { display: block; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.head h1 { font-size: 28px; font-weight: 800; }
.head p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.mock-note { margin-bottom: 18px; padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--line-2); color: var(--muted); font: 500 12px/1.5 var(--mono); }

.card { padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card + .card, .split > .card + .card { margin-top: 0; }
.grid-2 + .card, .kpis + .grid-2 { margin-top: 16px; }
.meta .link-arrow { font-size: 13px; }
.stack > * + * { margin-top: 16px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 16px; }
.stat { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat dt { color: var(--muted); font-size: 13px; }
.stat dd { margin: 6px 0 0; color: var(--text); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat dd small { margin-left: 6px; color: var(--green); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.stat dd small.warn { color: var(--amber); }

.keybox { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 11px; background: var(--ink); border: 1px solid var(--line-2); font: 500 15px var(--mono); }
.keybox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .04em; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .28); }
.icon-btn.danger:hover { color: #f87171; border-color: rgba(248, 113, 113, .5); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--text-2); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .ico { color: var(--muted); }

.meter { margin-top: 16px; }
.meter-top { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13px; }
.meter-bar { height: 7px; margin-top: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 11.5px/1 var(--mono); white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: rgba(74, 197, 120, .14); color: var(--green-2); }
.pill.alpha { background: rgba(143, 108, 245, .16); color: var(--purple-2); }
.pill.warn { background: rgba(233, 196, 106, .14); color: var(--amber); }
.pill.bad { background: rgba(248, 113, 113, .14); color: #fca5a5; }
.pill.plain::before { display: none; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 0 12px 10px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.table td { padding: 12px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.table td b { color: var(--text); font-weight: 600; }
.table td small { display: block; color: var(--muted); font-size: 12px; }
.table tr.is-unread td b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.table tbody tr { cursor: default; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .act { width: 1%; white-space: nowrap; text-align: right; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line-2); color: var(--muted); font-size: 14px; }
.chip { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 500 13px inherit; font-family: inherit; cursor: pointer; }
.chip.is-on { background: var(--surface-3); color: var(--text); border-color: transparent; }

.split { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.detail h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.detail dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 16px 0; font-size: 13px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; color: var(--text-2); }
.quote { padding: 12px 14px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; white-space: pre-line; }
.quote + .quote { margin-top: 8px; }
.quote-label { margin: 14px 0 6px; color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.input, .select, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 400 14px inherit; font-family: inherit; }
textarea.input { height: 96px; padding: 10px 12px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.switch { position: relative; display: inline-flex; flex-shrink: 0; width: 40px; height: 22px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); cursor: pointer; transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background-color .15s; }
.switch.is-on { background: var(--green); border-color: var(--green); }
.switch.is-on::after { transform: translateX(18px); background: var(--ink); }
.setting { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.card-head + .setting { border-top: 0; padding-top: 0; }
.setting div { flex: 1; }
.setting b { display: block; font-size: 14px; }
.setting span { color: var(--muted); font-size: 13px; }

.product { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.product + .product { margin-top: 10px; }
.product-ico { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; font-size: 21px; }
.product-ico.dai { background: rgba(143, 108, 245, .16); color: var(--purple-2); }
.product-ico.dsk { background: rgba(74, 197, 120, .14); }
.product-ico.dsk svg { width: 15px; height: 22px; fill: var(--green); }
.product-ico.srv { background: rgba(94, 234, 212, .12); color: var(--lv-inspector); }
.product div { flex: 1; min-width: 0; }
.product b { display: block; font-size: 15px; }
.product span { color: var(--muted); font-size: 13px; }
.product.soon { border-style: dashed; background: transparent; }

.feed li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed .dot { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--text-2); font-size: 15px; }
.feed .dot.g { background: rgba(74, 197, 120, .14); color: var(--green-2); }
.feed .dot.p { background: rgba(143, 108, 245, .16); color: var(--purple-2); }
.feed .dot.a { background: rgba(233, 196, 106, .14); color: var(--amber); }
.feed p { color: var(--text-2); }
.feed p b { color: var(--text); font-weight: 600; }
.feed small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.release { display: flex; align-items: center; gap: 14px; }
.release + .release { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.release div { flex: 1; }
.release b { font-size: 15px; }
.release span { display: block; color: var(--muted); font-size: 13px; }
.changes { margin-top: 12px; color: var(--text-2); font-size: 14px; }
.changes li { position: relative; padding-left: 16px; }
.changes li + li { margin-top: 4px; }
.changes li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* Sign in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(74, 197, 120, .08), transparent 70%), var(--ink); }
.signin-card { width: 100%; max-width: 420px; padding: 34px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.signin-card h1 { margin-top: 26px; font-size: 26px; font-weight: 800; }
.signin-card p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.signin-card .btn { width: 100%; justify-content: center; margin-top: 16px; }
.sent-ico { width: 52px; height: 52px; display: grid; place-items: center; margin-top: 26px; border-radius: 14px; background: rgba(74, 197, 120, .14); color: var(--green-2); font-size: 24px; }
.form-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.terms-changes { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink); }
.terms-changes .quote-label { margin: 0 0 6px; }
.signin-card .terms-changes p:not(.quote-label) { margin-top: 4px; font-size: 14px; }
.terms-accept { margin-top: 14px; padding-bottom: 2px; }
.signin-card .terms-accept p { flex: 1; margin-top: 0; font-size: 14px; }
.terms-accept a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.terms-accept a:hover { text-decoration-color: currentColor; }
.signin-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.signin-switch a { color: var(--text-2); font-weight: 600; }
.mock-tabs { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(24, 27, 29, .92); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.mock-tabs a { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--text-2); font: 500 12px var(--mono); }
.mock-tabs a.is-on { background: var(--surface-3); color: var(--text); }

@media (max-width: 1100px) { .split, .grid-2 { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
	.app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
	.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 4px; padding: 12px; }
	.keybox { font-size: 13px; }
	.side .brand { width: 100%; padding-bottom: 8px; }
	.side-group, .side-foot { display: none; }
	.side-link { height: 34px; }
	.main { padding: 22px 16px 80px; }
	.head { flex-direction: column; align-items: flex-start; }
	.table-wrap { overflow-x: auto; }
}

/* v2: one page per audience, products as cards, the rest in dialogs */
.top { position: sticky; top: 0; z-index: 30; background: rgba(15, 18, 20, .85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 20px; height: 64px; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.seg { display: flex; gap: 2px; margin-left: 12px; padding: 3px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.seg a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.seg a:hover { color: var(--text); }
.seg a.is-on { background: var(--surface-3); color: var(--text); }
.seg .count { min-width: 20px; padding: 0 6px; border-radius: 99px; background: rgba(74, 197, 120, .2); color: var(--green-2); font: 600 11px/18px var(--mono); text-align: center; }
.page { max-width: 1080px; margin: 0 auto; padding: 30px 24px 80px; }
.page .view { max-width: none; }

details.menu { position: relative; }
details.menu > summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 4px; border-radius: 99px; cursor: pointer; color: var(--text-2); }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover { background: rgba(255, 255, 255, .04); }
details.menu .avatar { width: 30px; height: 30px; font-size: 12px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .7); }
.menu-who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-who b { display: block; font-size: 14px; }
.menu-who span { color: var(--muted); font-size: 12.5px; }
.menu-list a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.menu-list a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }

.pcard { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.pcard + .pcard { margin-top: 16px; }
.pcard-head { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.pcard-head > div { flex: 1; min-width: 0; }
.pcard-head h2 { font-size: 18px; font-weight: 800; }
.pcard-head p { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.pcard-body { display: grid; grid-template-columns: 1fr 1.25fr; border-top: 1px solid var(--line); }
.pcard-body > section { padding: 20px 22px; }
.pcard-body > section + section { border-left: 1px solid var(--line); }
.pcard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--ink-2); color: var(--muted); font-size: 13px; }
.pcard-foot a { color: var(--text-2); font-weight: 600; cursor: pointer; }
.pcard-foot a:hover { color: var(--text); }
.pcard.soon { background: transparent; border-style: dashed; }
.sub { margin-bottom: 10px; color: var(--muted); font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.sites li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sites li:first-child { border-top: 0; padding-top: 0; }
.sites li > div { flex: 1; min-width: 0; }
.sites b { font-weight: 600; }
.sites small { display: block; color: var(--muted); font-size: 12px; }
.sites .icon-btn { width: 30px; height: 30px; }
.modules { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 20px; }
.modules span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.modules .ico { color: var(--green); }

dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8); }
dialog::backdrop { background: rgba(5, 7, 8, .66); backdrop-filter: blur(3px); }
dialog.wide { width: min(760px, calc(100vw - 32px)); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 17px; font-weight: 800; }
.dlg-body { padding: 4px 22px 22px; }
.dlg-body .setting:first-child { border-top: 0; }
.dlg-section + .dlg-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.table tbody tr[data-row] { cursor: pointer; }
.table tr.is-picked td { background: rgba(74, 197, 120, .06); }
.type { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.type .ico { color: var(--muted); }
@media (max-width: 820px) {
	.top-inner { flex-wrap: wrap; gap: 10px; height: auto; padding: 10px 16px; }
	.seg { order: 3; width: 100%; }
	.seg a { flex: 1; justify-content: center; }
	.top .brand span:not(.brand-mark):not(.admin-badge) { display: none; }
	.seg { margin-left: 0; }
	.split .detail { order: -1; }
	.seg a { padding: 0 9px; }
	.seg a .ico { display: none; }
	.pcard-body { grid-template-columns: 1fr; }
	.pcard-body > section + section { border-left: 0; border-top: 1px solid var(--line); }
	.page { padding: 22px 16px 80px; }
	.top-actions .btn-label { display: none; }
}

/* v3: tabs grouped by product; the admin picks a product, the customer sees one group per product they have */
.side-product { display: flex; align-items: center; gap: 9px; margin: 16px 0 2px; padding: 0 10px; color: var(--text); font-size: 13px; font-weight: 700; }
.side-product .mini { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-size: 13px; }
.side-product .mini.dai { background: rgba(143, 108, 245, .18); color: var(--purple-2); }
.side-product .mini.dsk { background: rgba(74, 197, 120, .14); }
.side-product .mini.dsk svg { width: 8px; height: 12px; fill: var(--green); }
.side-product .pill { margin-left: auto; height: 20px; font-size: 10px; }
.side-link.is-off { opacity: .45; pointer-events: none; }
.side-link.sub-link { padding-left: 22px; }

details.switcher { position: relative; margin: 6px 0 4px; }
details.switcher > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; }
details.switcher > summary::-webkit-details-marker { display: none; }
details.switcher > summary b { flex: 1; font-size: 14px; }
details.switcher > summary small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
details.switcher .menu-list { left: 0; right: 0; min-width: 0; }
.switcher .mini { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; font-size: 15px; }
.switcher .mini.dai { background: rgba(143, 108, 245, .18); color: var(--purple-2); }
.switcher .mini.dsk { background: rgba(74, 197, 120, .14); }
.switcher .mini.dsk svg { width: 10px; height: 15px; fill: var(--green); }
.menu-list a .pill { margin-left: auto; height: 20px; font-size: 10px; }

body[data-product="dsk"] [data-for="dai"], body[data-product="dai"] [data-for="dsk"] { display: none !important; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty .ico { display: block; margin: 0 auto 10px; width: 28px; height: 28px; color: var(--text-2); }
.modules-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.by-product { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.by-product .card + .card { margin-top: 0; }
@media (max-width: 820px) { .side-product { width: 100%; margin-top: 8px; } details.switcher { width: 100%; } .by-product { grid-template-columns: 1fr; } }
.by-product + .card { margin-top: 16px; }

/* v4: motion, skeletons, danger and confirmation, charts */
.side { position: relative; }
.side::before { content: ""; position: absolute; left: 0; top: 0; width: var(--ind-w, 0); height: var(--ind-h, 0); transform: translate(var(--ind-x, 0), var(--ind-y, 0)); border-radius: 9px; background: rgba(74, 197, 120, .12); box-shadow: inset 2px 0 0 var(--green); opacity: var(--ind-o, 0); transition: transform .32s cubic-bezier(.3, .8, .2, 1), height .32s cubic-bezier(.3, .8, .2, 1), width .32s cubic-bezier(.3, .8, .2, 1), opacity .2s; pointer-events: none; }
.side.no-anim::before { transition: none; }
.side > * { position: relative; }
.side-link { transition: color .2s; }
.side-link.is-on { background: transparent; }

.view.is-on { animation: view-in .34s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Loading: the structure we already know (cards, titles, labels, key box, table heads, buttons) is drawn at once; only the data (.ld and the data slots below) waits as pulsing placeholders. */

.grid-2, .by-product, .split, .charts { align-items: stretch; }
.card { display: flex; flex-direction: column; }
.card > .push { margin-top: auto; }
.card .dlg-actions.push { padding-top: 6px; }
.card-head { min-height: 44px; }

.btn-danger { background: #e5484d; color: #fff; }
.btn-danger:hover { background: #f2666a; }
.btn-danger:disabled { background: rgba(229, 72, 77, .28); color: rgba(255, 255, 255, .55); cursor: not-allowed; }
.btn-danger-ghost { border-color: rgba(229, 72, 77, .45); background: rgba(229, 72, 77, .06); color: #ff8f92; }
.btn-danger-ghost:hover { border-color: #e5484d; background: rgba(229, 72, 77, .14); color: #ffb3b5; }
.icon-btn.danger { color: #ff8f92; border-color: rgba(229, 72, 77, .35); }
.icon-btn.danger:hover { color: #ffb3b5; border-color: #e5484d; background: rgba(229, 72, 77, .1); }
.icon-btn, .chip { transition: color .15s, border-color .15s, background-color .15s; }
.danger-zone { border-color: rgba(229, 72, 77, .3); }
.danger-zone h2 { color: #ffb3b5; }
.confirm-ico { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 13px; background: rgba(229, 72, 77, .14); color: #ff8f92; font-size: 22px; }
.confirm-word { margin-top: 16px; }
.confirm-word code { padding: 1px 6px; border-radius: 5px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 600 12.5px var(--mono); }
dialog[open] { animation: dlg-in .22s cubic-bezier(.2, .7, .2, 1); }
dialog[open]::backdrop { animation: fade-in .22s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.inline-ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); }
.path { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-weight: 500; }

.product-section { margin-top: 34px; }
.product-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.product-section-head h2 { font-size: 20px; font-weight: 800; }
.product-section-head p { color: var(--muted); font-size: 13.5px; }
.product-section-head .link-arrow { margin-left: auto; font-size: 13.5px; }
.product-section.soon .product-section-head { border-bottom-style: dashed; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.charts .card + .card { margin-top: 0; }
.chart { position: relative; margin-top: 4px; min-height: 180px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.chart text { fill: var(--muted); font: 500 11px "Noto Sans", sans-serif; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .mark, .chart .mark.is-hot { filter: brightness(1.25); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7); color: var(--text); font-size: 12.5px; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 8px)); transition: opacity .12s; }
.chart-tip.is-on { opacity: 1; }
.chart-tip b { display: block; font-weight: 700; }
.chart-tip span { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.hbars { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.hbar { display: grid; grid-template-columns: 136px 1fr 34px; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.hbar-track { height: 14px; }
.hbar-fill { height: 100%; border-radius: 0 4px 4px 0; background: #3aa866; transform-origin: left; }
.hbar b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@keyframes grow-x { from { transform: scaleX(0); } }
.spark { margin-top: 10px; height: 34px; }
.spark svg { width: 100%; height: 34px; display: block; }
.ghost-chart { display: grid; place-items: center; min-height: 180px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.stat-sub { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.lists-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.lists-2 .card + .card { margin-top: 0; }
.sites li .pill { flex-shrink: 0; }
@media (max-width: 1100px) { .charts, .lists-2 { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
	.view.is-on, dialog[open], dialog[open]::backdrop, .hbar-fill { animation: none; }
	.side::before { transition: none; }
	.view.is-loading :is(.ld, .keybox code, .kpis dd, .stat-sub, .pill, tbody td, .sites li, .feed li, .chart, .spark, .changes li) { animation: none !important; }
}
.chart .grow { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes grow-y { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .chart .grow { animation: none; } }
.table th.num, .table td.num { font-family: inherit; }

/* v5: placeholders only where data goes, then the data arrives */
.view.is-loading :is(.ld, .keybox code, .kpis dd, .stat-sub, .meter-top span:last-child, .pill, .release b, .release > div > span, .changes li, .meta span, .hbar > span, .hbar b, .side-count) { color: transparent !important; background: var(--surface-3) !important; border-color: transparent !important; border-radius: 6px; animation: pulse 1.1s ease-in-out infinite; }
.view.is-loading :is(.ld, .meta span, .pill, .changes li, .kpis dd) * { visibility: hidden; }
.view.is-loading :is(.kpis dd, .stat-sub, p.ld, .release b, .release > div > span) { width: fit-content; min-width: 56px; }
.view.is-loading .keybox code { flex: 0 1 auto; }
.view.is-loading :is(.pill, .changes li)::before { opacity: 0; }
.view.is-loading :is(.meter-bar i, .hbar-fill) { opacity: 0; }
.view.is-loading :is(.chart, .spark) { border-radius: 10px; background: var(--surface-2); animation: pulse 1.1s ease-in-out infinite; }
.view.is-loading tbody td { color: transparent !important; background: linear-gradient(var(--surface-3), var(--surface-3)) 12px 50% / min(70%, 160px) 11px no-repeat; animation: pulse 1.1s ease-in-out infinite; }
.view.is-loading tbody td.act { background: none; }
.view.is-loading tbody td > *:not(.act *) { visibility: hidden; }
.view.is-loading tbody tr.is-picked td, .view.is-loading tbody tr.is-unread td b::before { background-color: transparent; }
.view.is-loading :is(.sites li, .feed li) { background: linear-gradient(var(--surface-3), var(--surface-3)) 0 calc(50% - 9px) / 52% 12px no-repeat, linear-gradient(var(--surface-3), var(--surface-3)) 0 calc(50% + 10px) / 30% 9px no-repeat; animation: pulse 1.1s ease-in-out infinite; }
.view.is-loading .feed li { background-position: 42px calc(50% - 9px), 42px calc(50% + 10px); }
.view.is-loading :is(.sites li, .feed li) > :not(button):not(.icon-btn) { visibility: hidden; }
.view.is-loading .feed li > span.dot:not(button) { visibility: visible; color: transparent; background: var(--surface-3); }
.view.is-loading .input { color: transparent; }
.view.is-loading .switch { opacity: .35; }
.view.is-loading .switch::after { opacity: 0; }
@keyframes pulse { 50% { opacity: .55; } }

.view.is-loaded :is(.ld, .keybox code, .kpis dd, .stat-sub, .meter-top span:last-child, .pill, .release b, .release > div > span, .changes li, .meta span, .hbar > span, .hbar b, .input, tbody td, .sites li > *, .feed li > *) { animation: data-in .42s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.view.is-loaded .switch { animation: data-in .42s ease both; }
.view.is-loaded :is(.meter-bar i, .hbar-fill) { animation: grow-x .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
.meter-bar i { transform-origin: left; }
@keyframes data-in { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

.side::before { box-shadow: inset 0 0 0 1px rgba(74, 197, 120, .24); }
.side-link { transition: color .25s .06s; }
@media (prefers-reduced-motion: reduce) {
	.view.is-loaded *, .view.is-loading * { animation: none !important; }
}
.pcard-foot a, .side-foot a, .fine a, .nav-links a, .menu-list a, .signin-switch a { transition: color .2s, background-color .2s; }
.link-arrow .ico, .pcard-foot a .ico { transition: transform .22s cubic-bezier(.3, .8, .2, 1); }
.link-arrow:hover .icon-tabler-arrow-right, .pcard-foot a:hover .icon-tabler-arrow-right { transform: translateX(4px); }

/* Platform: toasts and live search fields */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .8); color: var(--text); font-size: 14px; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(229, 72, 77, .5); color: #ffb3b5; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.search:focus-within { border-color: rgba(74, 197, 120, .5); }
.table td a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.table td a:hover { text-decoration-color: var(--green); }
.view.is-loading .empty { visibility: hidden; }
.btn:disabled { opacity: .6; cursor: progress; }
[hidden] { display: none !important; }

/* Password fields: a show/hide eye inside the field, and a quiet hint under it */
.pw { position: relative; display: block; }
.pw .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; width: 34px; height: 32px; display: grid; place-items: center; transform: translateY(-50%); border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.field-hint a { color: var(--text-2); font-weight: 600; transition: color .2s; }
.field-hint a:hover { color: var(--text); }
.signin-card .field-hint { margin-top: 10px; }

/* The page never scrolls: the sidebar stays put and only the main column scrolls, with a thin bar whose
   room is always kept, so content never shifts sideways when a view starts or stops needing it. */
@media (min-width: 821px) {
	html, body { height: 100%; overflow: hidden; }
	.app { height: 100vh; }
	.side { position: relative; height: 100vh; overflow: visible; }
	.main { height: 100vh; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
	.main::-webkit-scrollbar { width: 8px; }
	.main::-webkit-scrollbar-track { background: transparent; }
	.main::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255, 255, 255, .14); border: 2px solid var(--ink); }
	.main::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .26); }
}

/* Dropdowns: above everything around them, opaque, and they open with a short fall-in */
details.switcher[open], details.menu[open] { z-index: 40; }
details.switcher .menu-list, details.menu .menu-list { z-index: 41; background: var(--surface-2); transform-origin: top center; animation: drop-in .18s cubic-bezier(.2, .7, .2, 1); }
details.switcher > summary .icon-tabler-chevron-down, details.menu > summary .icon-tabler-chevron-down { transition: transform .2s; }
details.switcher[open] > summary .icon-tabler-chevron-down, details.menu[open] > summary .icon-tabler-chevron-down { transform: rotate(180deg); }
details.switcher[open] > summary { border-color: rgba(74, 197, 120, .4); }
.menu-list a { position: relative; }
.menu-list a .pill { flex-shrink: 0; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { details .menu-list { animation: none; } }
details.switcher .menu-list { right: auto; min-width: 100%; width: max-content; max-width: 320px; }
.menu-list a { white-space: nowrap; }
.menu-list a .pill { margin-left: auto; padding-left: 8px; }

/* Copy buttons confirm in place: green tick and a "Copied" label above, so it shows inside dialogs too */
[data-copy] { position: relative; }
[data-copy].is-copied { color: var(--green-2); border-color: rgba(74, 197, 120, .6); background: rgba(74, 197, 120, .12); animation: copy-pop .3s cubic-bezier(.3, .8, .2, 1); }
[data-copy].is-copied::after { content: "Copied"; position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 4px 8px; border-radius: 6px; background: var(--green); color: var(--ink); font: 600 11.5px/1 "Noto Sans", sans-serif; white-space: nowrap; transform: translateX(-50%); animation: copy-label 1.8s ease both; pointer-events: none; }
@keyframes copy-pop { 40% { transform: scale(.9); } }
@keyframes copy-label { 0% { opacity: 0; transform: translate(-50%, 4px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { [data-copy].is-copied, [data-copy].is-copied::after { animation: none; } }
[data-copy].is-copy-failed { color: #ff8f92; border-color: rgba(229, 72, 77, .6); background: rgba(229, 72, 77, .12); animation: copy-pop .3s cubic-bezier(.3, .8, .2, 1); }
[data-copy].is-copy-failed::after { content: "Press Ctrl+C"; position: absolute; left: 50%; bottom: calc(100% + 8px); padding: 4px 8px; border-radius: 6px; background: #e5484d; color: #fff; font: 600 11.5px/1 "Noto Sans", sans-serif; white-space: nowrap; transform: translateX(-50%); animation: copy-label 3.2s ease both; pointer-events: none; }

/* v6: custom dropdowns, compact inline fields, two-click confirm, busy buttons, sortable headers,
   combinable pills, dialogs for details, the settings menu, and split loading animations */

/* Custom dropdown: built from a native <select> (kept hidden for the value), anchored, animated */
.dd { position: relative; display: inline-flex; vertical-align: middle; }
.dd select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 13px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 500 14px "Noto Sans", sans-serif; cursor: pointer; white-space: nowrap; transition: border-color .15s, background-color .15s; }
.dd-btn:hover { border-color: rgba(255, 255, 255, .26); }
.dd.is-open .dd-btn, .dd-btn:focus-visible { border-color: rgba(74, 197, 120, .55); outline: 0; }
.dd-btn .ico { width: 15px; height: 15px; margin-left: 2px; color: var(--muted); transition: transform .2s; }
.dd.is-open .dd-btn .ico { transform: rotate(180deg); }
.dd-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; min-width: 100%; max-height: 280px; overflow-y: auto; padding: 5px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 18px 44px -10px rgba(0, 0, 0, .75); opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top left; visibility: hidden; transition: opacity .16s, transform .16s cubic-bezier(.2, .7, .2, 1), visibility 0s .16s; }
.dd.is-open .dd-menu { opacity: 1; transform: none; visibility: visible; transition: opacity .16s, transform .16s cubic-bezier(.2, .7, .2, 1); }
.dd.drop-up .dd-menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom left; }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 14px "Noto Sans", sans-serif; text-align: left; white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
.dd-opt:hover, .dd-opt.is-active { background: rgba(255, 255, 255, .05); color: var(--text); }
.dd-opt .ico { width: 15px; height: 15px; margin-left: auto; color: var(--green); opacity: 0; }
.dd-opt[aria-selected="true"] { color: var(--text); }
.dd-opt[aria-selected="true"] .ico { opacity: 1; }
dialog { overflow: visible; }

/* Compact inline fields: label and control on one line, as wide as the control needs */
.inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 14px; }
.inline-field { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.input.narrow { width: 88px; height: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* Two-click confirm: the label swaps up to "Confirm" in red; a second click acts */
[data-arm] { position: relative; overflow: hidden; }
[data-arm] .arm-label { display: inline-flex; align-items: center; gap: 8px; transition: transform .22s cubic-bezier(.3, .8, .2, 1), opacity .18s; }
[data-arm] .arm-confirm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; transform: translateY(100%); opacity: 0; transition: transform .22s cubic-bezier(.3, .8, .2, 1), opacity .18s; font-weight: 700; }
[data-arm].is-armed { background: #e5484d !important; border-color: #e5484d !important; color: #fff !important; }
[data-arm].is-armed .arm-label { transform: translateY(-100%); opacity: 0; }
[data-arm].is-armed .arm-confirm { transform: none; opacity: 1; }
.icon-btn[data-arm] { transition: width .22s cubic-bezier(.3, .8, .2, 1), color .15s, border-color .15s, background-color .15s; }
.icon-btn[data-arm].is-armed { width: 82px; }
.icon-btn[data-arm] .arm-confirm { font-size: 12.5px; }
.act-done { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; animation: data-fade .3s ease both; }

/* Busy buttons keep their width; a spinner takes the icon's place */
.btn { position: relative; }
/* Busy: the label and icons give way to one spinner in the middle, in the button's own text colour */
.btn { --busy: var(--text); }
.btn-primary { --busy: var(--ink); }
.btn-purple, .btn-danger { --busy: #fff; }
.btn-danger-ghost { --busy: #ff8f92; }
.btn.is-busy { pointer-events: none; color: transparent !important; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid var(--busy); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sortable headers */
.table th.sort { cursor: pointer; user-select: none; transition: color .15s; }
.table th.sort:hover { color: var(--text-2); }
.table th.sort .ico { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; opacity: .35; transition: transform .2s, opacity .15s; }
.table th.sort.is-asc .ico, .table th.sort.is-desc .ico { opacity: 1; color: var(--green); }
.table th.sort.is-asc .ico { transform: rotate(180deg); }

/* Combinable pills: none on = all */
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: rgba(74, 197, 120, .14); border-color: rgba(74, 197, 120, .45); color: var(--green-2); }
.chips-label { color: var(--muted); font-size: 12.5px; margin-left: 4px; }

/* Lists open details in a dialog */
.table tbody tr[data-open] { cursor: pointer; }
.table tbody tr[data-open] td:last-child .ico { color: var(--muted); transition: transform .2s, color .15s; }
.table tbody tr[data-open]:hover td:last-child .ico { transform: translateX(3px); color: var(--text); }
dialog.detail-dlg { width: min(720px, calc(100vw - 32px)); }
.detail-dlg .detail dl { margin-top: 12px; }
.dlg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.dlg-foot .btn-primary { margin-left: auto; }

/* Settings: a fixed menu, one scrolling column, a section per job */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-menu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.settings-menu::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--sm-h, 36px); transform: translateY(var(--sm-y, 4px)); border-radius: 8px; background: rgba(255, 255, 255, .05); box-shadow: inset 2px 0 0 var(--green); transition: transform .3s cubic-bezier(.3, .8, .2, 1), height .3s; pointer-events: none; }
.settings-menu a { position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: color .2s; }
.settings-menu a:hover, .settings-menu a.is-on { color: var(--text); }
.settings-menu a .ico { color: var(--muted); transition: color .2s; }
.settings-menu a.is-on .ico { color: var(--green); }
.settings-sections { display: flex; flex-direction: column; gap: 16px; }
.settings-sections .card + .card { margin-top: 0; }
.settings-sections .card { scroll-margin-top: 16px; transition: border-color .6s, box-shadow .6s; }
.settings-sections .card.is-reached { border-color: rgba(74, 197, 120, .45); box-shadow: 0 0 0 4px rgba(74, 197, 120, .07); }
.help { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font: 700 11px "Noto Sans", sans-serif; cursor: help; vertical-align: 1px; }
.help:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 70; width: 240px; padding: 8px 10px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); font: 400 12.5px/1.45 "Noto Sans", sans-serif; transform: translateX(-50%); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); }

/* Loading, split: the view (static) rises in; data only fades in place; histories land one by one */
.view.is-loaded :is(.ld, .keybox code, .kpis dd, .stat-sub, .meter-top span:last-child, .pill, .release b, .release > div > span, .changes li, .meta span, .hbar > span, .hbar b, .input, tbody td, .sites li > *) { animation: data-fade .4s ease both; animation-delay: calc(var(--i, 0) * 35ms); }
.view.is-loaded .feed li { animation: domino .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }
.view.is-loaded .feed li > * { animation: none; }
@keyframes data-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes domino { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.table td a { text-decoration: none; font-weight: 600; color: var(--text); transition: color .2s; }
.table td a:hover { color: var(--green-2); }
@media (max-width: 820px) {
	.settings-layout { grid-template-columns: minmax(0, 1fr); }
	.settings-menu { position: static; flex-direction: row; overflow-x: auto; }
	.settings-menu::before { display: none; }
	.settings-menu a.is-on { background: rgba(255, 255, 255, .05); }
}
@media (prefers-reduced-motion: reduce) {
	.dd-menu, [data-arm] .arm-label, [data-arm] .arm-confirm, .settings-menu::before { transition: none; }
	.view.is-loaded *, .btn.is-busy::before { animation: none !important; }
}
.settings-sections .table td, .settings-sections .table th { white-space: nowrap; }
.settings-sections .table td small { white-space: normal; }
[data-pills] { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* Platform extras on top of v6 */
.soon-card { border-style: dashed; background: transparent; }
a.chart-card { color: inherit; text-decoration: none; transition: border-color .2s; }
a.chart-card:hover { border-color: rgba(255, 255, 255, .16); }
a.chart-card .card-head > .ico { color: var(--muted); transition: transform .22s cubic-bezier(.3, .8, .2, 1), color .2s; }
a.chart-card:hover .card-head > .ico { transform: translateX(4px); color: var(--text); }
.kpis-2 { grid-template-columns: repeat(2, 1fr); }
.table .act-fixed { width: 130px; }
.chart-body { min-height: 180px; }
.chart-body .ghost-chart, .chart .ghost-chart { min-height: 172px; }
.view.is-loading .chart-body { border-radius: 10px; background: var(--surface-2); animation: pulse 1.1s ease-in-out infinite; }
.view.is-loading .chart-body > * { visibility: hidden; }
.view.is-loaded .chart-body > * { animation: data-fade .4s ease both; }
.view.is-loaded .hbar-fill, .view.is-loaded .meter-bar i { animation: grow-x .7s cubic-bezier(.2, .7, .2, 1) both; }

/* Dialogs load like views: the frame is there at once, the data fades into it */
dialog.is-loading :is(.ld, .keybox code, .quote, .sites li > *) { color: transparent !important; background: var(--surface-3) !important; border-color: transparent !important; border-radius: 6px; animation: pulse 1.1s ease-in-out infinite; }
dialog.is-loading .ld { display: inline-block; min-width: 140px; }
dialog.is-loading .ld * { visibility: hidden; }
dialog.is-loading .dd, dialog.is-loading .input, dialog.is-loading .dlg-foot .btn-primary { opacity: .4; pointer-events: none; }
dialog.is-loaded :is(.ld, .keybox code, .quote, .sites li > *, .dlg-section, .dd-value, .input) { animation: data-fade .4s ease both; }

/* A reload keeps what's shown, dimmed, under a thin running bar, until the new data lands */
.view.is-reloading { position: relative; }
.view.is-reloading :is(tbody, .sites, .feed, .kpis, .charts, .lists-2) { opacity: .5; transition: opacity .2s; pointer-events: none; }
.main { position: relative; }
.main::before { content: ""; position: sticky; top: 0; z-index: 20; display: block; height: 2px; margin: -2px 0 0; background: linear-gradient(90deg, transparent, var(--green), transparent) 0 0 / 40% 100% no-repeat; opacity: 0; transition: opacity .2s; }
.main.is-reloading::before { opacity: 1; animation: bar-run 1s linear infinite; }
@keyframes bar-run { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.table td a, .link-arrow { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { dialog.is-loaded *, dialog.is-loading *, .main.is-reloading::before { animation: none !important; } }
.view.is-loaded .switch { animation-name: data-fade; }
[data-filters] { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.table td.act .btn, .table td.act .icon-btn { vertical-align: middle; }
.table td.act > * + * { margin-left: 6px; }
[data-list="c-licences"] > .dlg-section, [data-list="c-licences"] + .dlg-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
dialog .empty { display: flex; align-items: center; gap: 10px; padding: 6px 0; text-align: left; }
dialog .empty .ico { display: inline-block; width: 18px; height: 18px; margin: 0; }
.dlg-body > .dlg-section:first-child { padding-top: 14px; }
@media (max-width: 820px) {
	.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
	.table-wrap > .table { min-width: 620px; }
	.settings-menu { gap: 4px; scrollbar-width: none; }
	.settings-menu a { flex-shrink: 0; white-space: nowrap; }
}

/* v7: items, plans and subscriptions; the admin / my account switch; billing and checkout */

/* The switch at the foot of the sidebar: admin side or your own account */
.side-foot { flex-wrap: wrap; row-gap: 12px; }
.mode-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding: 3px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line-2); }
.mode-switch::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 7px; background: var(--surface-3); box-shadow: inset 0 0 0 1px rgba(74, 197, 120, .35); transition: transform .28s cubic-bezier(.3, .8, .2, 1); }
.mode-switch[data-on="account"]::before { transform: translateX(100%); }
.mode-switch a { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 32px; margin: 0; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 600; transition: color .2s; }
.mode-switch a:hover { color: var(--text); }
.mode-switch a.is-on { color: var(--green-2); }
.mode-switch .ico { width: 15px; height: 15px; }

/* Sub-tabs inside a view */
.tabs { position: relative; display: inline-flex; gap: 2px; margin-bottom: 16px; padding: 3px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 14px "Noto Sans", sans-serif; white-space: nowrap; cursor: pointer; transition: color .2s, background-color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.tabs .count { min-width: 20px; padding: 0 6px; border-radius: 99px; background: rgba(74, 197, 120, .2); color: var(--green-2); font: 600 11px/18px var(--mono); text-align: center; }
[data-tab-panel]:not(.is-on) { display: none; }
[data-tab-panel].is-on { animation: data-fade .3s ease both; }

/* Items: products with their modules under them */
.item-name { display: flex; align-items: center; gap: 12px; }
.item-name .mini { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.item-name .mini.dai { background: rgba(143, 108, 245, .16); color: var(--purple-2); }
.item-name .mini.dsk { background: rgba(74, 197, 120, .14); }
.item-name .mini.dsk svg { width: 10px; height: 15px; fill: var(--green); }
.item-name .mini .ico { width: 16px; height: 16px; }
tr.is-module .item-name { position: relative; padding-left: 26px; }
tr.is-module .item-name::before { content: ""; position: absolute; left: 12px; top: -18px; bottom: 50%; width: 8px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-bottom-left-radius: 6px; }
.access { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.access .ico { width: 15px; height: 15px; color: var(--muted); }
.access.free .ico { color: var(--green); }

/* Plans as cards */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.plans .card + .card { margin-top: 0; }
.plan-card .card-head { align-items: flex-start; margin-bottom: 8px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 14px; }
.price b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.price span { color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.itag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.itag .ico { width: 14px; height: 14px; color: var(--muted); }
.itag.dai .ico { color: var(--purple-2); }
.itag.dsk .ico { color: var(--green); }
.plan-facts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.plan-facts span { display: flex; align-items: center; gap: 8px; }
.plan-facts .ico { width: 15px; height: 15px; color: var(--muted); }
.plan-card .push { padding-top: 16px; }
.plan-card.is-current { border-color: rgba(74, 197, 120, .5); box-shadow: 0 0 0 4px rgba(74, 197, 120, .06); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 700 11px/1 var(--mono); letter-spacing: .03em; white-space: nowrap; }
.badge.sale { background: var(--green); color: var(--ink); }
.badge.given { background: var(--surface-3); color: var(--text); }
.badge.paid { background: var(--purple); color: #fff; }
.badge.free { background: rgba(74, 197, 120, .18); color: var(--green-2); }
.badge.internal { gap: 5px; background: var(--surface-3); color: var(--text); }
.badge .ico { width: 12px; height: 12px; }
.built-in { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.45; text-align: left; }
.built-in .ico { flex: none; width: 14px; height: 14px; margin-top: 2px; }

/* Choice rows with a switch (what a plan includes) */
.choice { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.choice:first-child { border-top: 0; }
.choice > div { flex: 1; min-width: 0; }
.choice b { display: block; font-size: 14px; font-weight: 600; }
.choice small { display: block; color: var(--muted); font-size: 12.5px; }
.choice.is-off > div, .choice.is-off .switch { opacity: .45; }
.choice.is-off .switch { pointer-events: none; }

/* Subscription details */
.sub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact { padding: 12px 14px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.fact dt { color: var(--muted); font-size: 12px; }
.fact dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.unlocks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.history li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.history li:first-child { border-top: 0; }
.history li b { color: var(--text); font-weight: 600; }
.history small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.history .dot { width: 8px; height: 8px; margin-top: 6px; flex-shrink: 0; border-radius: 50%; background: var(--line-2); }
.history .dot.g { background: var(--green); }
.history .dot.r { background: #e5484d; }
.history .dot.p { background: var(--purple); }
.view.is-loaded .history li { animation: domino .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }

/* Downloads: unlocked, free, and locked items */
.dl { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.dl:first-child { border-top: 0; padding-top: 0; }
.dl > div { flex: 1; min-width: 0; }
.dl b { display: block; font-size: 15px; }
.dl small { display: block; color: var(--muted); font-size: 13px; }
.dl.is-locked .product-ico, .dl.is-locked b { opacity: .5; }
.dl .product-ico { width: 40px; height: 40px; }
.dl .product-ico .ico { width: 20px; height: 20px; }
.product-ico.mod { background: var(--surface-3); color: var(--text-2); }
.product-ico .ico { width: 22px; height: 22px; }

/* Billing and checkout */
.period { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); }
.period button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 500 13.5px "Noto Sans", sans-serif; cursor: pointer; transition: color .2s, background-color .2s; }
.period button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.period small { margin-left: 4px; color: var(--green); font-weight: 600; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.checkout .card + .card { margin-top: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.summary-row:first-child { border-top: 0; }
.summary-row b { color: var(--text); font-weight: 600; text-align: right; }
.summary-row.total { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 16px; }
.summary-row.total b { font-size: 20px; font-weight: 800; }
.card-field { position: relative; display: block; }
.card-field .input { padding-right: 40px; }
.card-field .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.secure { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.secure .ico { width: 15px; height: 15px; color: var(--green); }
.wire-note { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgba(233, 196, 106, .45); color: var(--amber); font-size: 13px; }
.wire-note .ico { width: 16px; height: 16px; flex-shrink: 0; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

@media (max-width: 1100px) { .checkout { grid-template-columns: minmax(0, 1fr); } .sub-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
	.side .side-foot { display: flex; width: 100%; margin-top: 6px; padding: 10px 0 0; }
	.side-foot > :not(.mode-switch) { display: none; }
	.tabs { display: flex; max-width: 100%; overflow-x: auto; }
	.history li { flex-wrap: wrap; }
	.history small { margin-left: 20px; width: 100%; }
	.table-wrap { overflow-x: auto; }
	.table-wrap > .table { min-width: 620px; }
}
@media (prefers-reduced-motion: reduce) { .mode-switch::before { transition: none; } .view.is-loaded .history li { animation: none; } }
.side-foot > div { flex: 1; min-width: 0; }
.side-foot > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-switch a { gap: 6px; font-size: 12.5px; }
.dl > .dl-notify { flex: none; display: flex; align-items: center; gap: 10px; }
.dlg-body > .dlg-section:first-child { padding-top: 14px; }
@media (max-width: 820px) { .keybox:has(.btn) { flex-wrap: wrap; } .keybox:has(.btn) code { flex-basis: 100%; } }

/* v7c: several keys per subscription, the chip multi-select, the catalogue preview */
.keys { display: flex; flex-direction: column; gap: 10px; }
.keys li { display: grid; grid-template-columns: minmax(0, 1fr) 190px 112px; align-items: center; gap: 14px; }
.keys .keybox { padding: 10px 12px; font-size: 14px; }
.keys .keybox .icon-btn { width: 30px; height: 30px; }
.key-meta b { display: block; font-size: 13.5px; font-weight: 600; }
.key-meta small { display: block; color: var(--muted); font-size: 12.5px; }
.keys li > .btn { justify-self: stretch; justify-content: center; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select .chip .ico { width: 15px; height: 15px; }
.json { margin: 0; padding: 14px 16px; max-height: 260px; overflow: auto; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); color: var(--text-2); font: 500 12.5px/1.55 var(--mono); white-space: pre; scrollbar-width: thin; }
.table .act .switch { vertical-align: middle; }
@media (max-width: 820px) { .keys li { grid-template-columns: minmax(0, 1fr) 112px; } .keys .keybox { grid-column: 1 / -1; } }

/* v7f: the admin / my account switch floats bottom right, like the mockups' page switch */
.mode-float { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 12px; background: rgba(24, 27, 29, .92); border: 1px solid var(--line-2); backdrop-filter: blur(8px); box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .8); }
.mode-float::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 8px; background: var(--surface-3); box-shadow: inset 0 0 0 1px rgba(74, 197, 120, .35); transition: transform .28s cubic-bezier(.3, .8, .2, 1); }
.mode-float[data-on="account"]::before { transform: translateX(100%); }
.mode-float a { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color .2s; }
.mode-float a:hover { color: var(--text); }
.mode-float a.is-on { color: var(--green-2); }
.mode-float .ico { width: 15px; height: 15px; }
.main { padding-bottom: 90px; }
.table td .chips { flex-wrap: wrap; }
.table td.num b { display: block; }
@media (max-width: 820px) { .mode-float { right: 12px; bottom: 12px; left: 12px; } }
@media (prefers-reduced-motion: reduce) { .mode-float::before { transition: none; } }
.card + .grid-2 { margin-top: 16px; }

/* v7h: releases from GitHub, signed by Darwin Labs */
dialog.wide.xl { width: min(940px, calc(100vw - 32px)); }
.pipe { padding: 14px 16px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); }
.pipe-head { display: flex; align-items: center; gap: 12px; }
.pipe-head > div { flex: 1; min-width: 0; }
.pipe-head b { display: block; font-size: 14px; }
.pipe-head small { display: block; color: var(--muted); font-size: 12.5px; }
.pipe-ico { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border-radius: 9px; background: var(--surface-3); color: var(--text); }
.sync { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; }
.sync > div { flex: 1; min-width: 0; }
.sync b { display: block; font-size: 13.5px; }
.sync span { color: var(--text-2); font-size: 13px; }
.sync.warn { background: rgba(233, 196, 106, .08); border: 1px solid rgba(233, 196, 106, .3); }
.sync.warn > .ico { color: var(--amber); }
.working { padding: 16px; border-radius: 12px; border: 1px solid rgba(74, 197, 120, .35); background: rgba(74, 197, 120, .04); }
.working-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.working-top b { display: block; font-size: 16px; }
.working-top small { display: block; color: var(--muted); font-size: 12.5px; }
.working-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: var(--text-2); font-size: 13px; }
.working-facts span { display: inline-flex; align-items: center; gap: 7px; }
.working-facts .ico { width: 15px; height: 15px; color: var(--muted); }
.working-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.working-actions .btn-primary { margin-left: auto; }
.table tr.is-muted td { opacity: .55; }
.table td .pill + small { margin-top: 4px; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.options:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--text-2); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s; }
.option .ico { width: 20px; height: 20px; margin-bottom: 4px; color: var(--muted); transition: color .2s; }
.option b { color: var(--text); font-size: 14px; }
.option small { font-size: 12.5px; color: var(--muted); }
.option:hover { border-color: rgba(255, 255, 255, .26); }
.option[aria-pressed="true"] { border-color: rgba(74, 197, 120, .6); background: rgba(74, 197, 120, .07); }
.option[aria-pressed="true"] .ico { color: var(--green); }
[data-when][hidden] { display: none !important; }
.dl > .btn + .btn { margin-left: -4px; }
@media (max-width: 820px) {
	.options, .options:has(> :nth-child(4):last-child) { grid-template-columns: minmax(0, 1fr); }
	.working-actions .btn-primary { margin-left: 0; }
	.pipe-head { flex-wrap: wrap; }
	.dl { flex-wrap: wrap; }
}
.json.log { white-space: pre-wrap; }
.confirm-ico.ok { background: rgba(74, 197, 120, .14); color: var(--green-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
#dlg-pull .sites .btn { min-width: 104px; justify-content: center; }
@media (max-width: 820px) {
	.sync { flex-wrap: wrap; }
	.pipe-head > .btn, .sync > .btn { flex-basis: 100%; justify-content: center; }
	.pipe-head > div, .sync > div { flex-basis: calc(100% - 50px); }
}
/* Tall dialogs scroll inside themselves, with a thin bar; open dropdowns scroll with them */
dialog { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
dialog::-webkit-scrollbar { width: 8px; }
dialog::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255, 255, 255, .14); border: 2px solid var(--surface); }

[data-list="key-cards"] > .card + .card, [data-list="key-cards"] + .card { margin-top: 16px; }
.keybox .key-note { flex-shrink: 0; color: var(--muted); font: 500 12.5px "Noto Sans", sans-serif; }

/* The release pipeline: a small spinner in pills, a link that waits for a passed build */
.pill .spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.pill:has(.spin)::before { display: none; }
a.btn.is-off { opacity: .45; pointer-events: none; }
.sync:not(.warn) { background: var(--ink-2); border: 1px solid var(--line); }
.sync:not(.warn) > .ico { color: var(--green); }
@media (prefers-reduced-motion: reduce) { .pill .spin { animation: none; } }
@media (max-width: 820px) {
	.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
	.tag-list li { flex-wrap: wrap; }
	.tag-list li > div { flex-basis: 100%; }
	.tag-list li .btn { margin-left: auto; }
}

/* Management (v8): a dialog is a fixed head, one scrolling body and a fixed footer with the actions */
dialog { overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
dialog > .dlg-head { flex: none; }
.dlg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.dlg-body::-webkit-scrollbar { width: 10px; }
.dlg-body::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(255, 255, 255, .14); border: 3px solid var(--surface); }
.dlg-frame { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
dialog .dlg-foot { flex: none; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); }
dialog .dlg-foot.end { justify-content: flex-end; }
.push-right { margin-left: auto; }
.push-right + .btn-primary { margin-left: 0; }
.foot-group { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dlg-tabbed { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dlg-tabs { flex: none; padding: 16px 22px 0; }
.dlg-tabs .tabs { margin-bottom: 4px; }
.dlg-tabbed > [data-tab-panel].is-on { flex: 1 1 auto; min-height: 0; }
.dlg-tabbed > .dlg-body, .dlg-tabbed > .dlg-frame > .dlg-body { padding-top: 14px; }
.dlg-tabbed > .dlg-body .log { margin: 0; }

/* The actions dialog: one row per intent, a "?" for the full description, the reason when it can't be chosen */
dialog.actions-dlg { width: min(600px, calc(100vw - 32px)); }
.actions-dlg .dlg-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 500; }
.actions-dlg .dlg-body { padding-bottom: 20px; }
.act-group { margin-top: 16px; }
.act-group .quote-label { margin: 0 0 6px; }
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.do-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font: 500 14px/1.4 "Noto Sans", sans-serif; text-align: left; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.do-row .ico { width: 18px; height: 18px; color: var(--muted); transition: color .18s; }
.do-row:hover { background: var(--ink-2); border-color: var(--line-2); }
.do-row:hover .ico { color: var(--green); }
.do-row:active { background: rgba(255, 255, 255, .07); }
.do-row .act-why { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.do-row.danger, .do-row.danger .ico { color: #ff8f92; }
.do-row.danger:hover { background: rgba(229, 72, 77, .08); border-color: rgba(229, 72, 77, .35); }
.do-row.danger:hover .ico { color: #ffb3b5; }
.do-row[disabled] { color: var(--muted); cursor: not-allowed; opacity: .62; }
.do-row[disabled]:hover { background: transparent; border-color: transparent; }
.do-row[disabled]:hover .ico { color: var(--muted); }
.do-row .help { margin-left: 0; }
dialog .help:hover::after { display: none; }
.tip-float { position: fixed; z-index: 90; width: max-content; max-width: 280px; padding: 8px 10px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); font: 400 12.5px/1.45 "Noto Sans", sans-serif; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); pointer-events: none; opacity: 0; transition: opacity .12s; }
.tip-float.is-on { opacity: 1; }

/* The delete flow: what goes, what stays */
.del-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.del-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.del-list li:first-child { border-top: 0; }
.del-list li .ico { width: 18px; height: 18px; color: #ff8f92; flex-shrink: 0; }
.del-list li small { display: block; color: var(--muted); font-size: 12.5px; }
.del-list li.kept .ico { color: var(--muted); }
.del-step[hidden] { display: none; }
.del-warn { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(233, 196, 106, .08); border: 1px solid rgba(233, 196, 106, .35); color: var(--text-2); font-size: 14px; }
.del-warn .ico { width: 20px; height: 20px; color: var(--amber); flex-shrink: 0; margin-top: 1px; }
.del-warn b { color: var(--text); }
.step-dots { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: 2px; }
.step-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color .2s; }
.step-dots i.is-on { background: #ff8f92; }

/* Record states */
.pill.paused { background: rgba(143, 108, 245, .14); color: var(--purple-2); }
.pill.off { background: var(--surface-3); color: var(--muted); }
tr.is-off td:not(.act), li.is-off > div { opacity: .55; }
.deleted-user { font-style: italic; }
.icon-btn.dots { width: 32px; height: 32px; }
.act-pair { display: inline-flex; align-items: center; gap: 6px; }

/* Activity */
.table .log-ico { width: 44px; }
.log-rec.gone { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.log-kind { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink-2); border: 1px solid var(--line); color: var(--muted); }
.log-kind .ico { width: 15px; height: 15px; }
.log-kind.r { color: #ff8f92; border-color: rgba(229, 72, 77, .3); }
.log-kind.p { color: var(--purple-2); border-color: rgba(143, 108, 245, .3); }
.log-kind.g { color: var(--green); border-color: rgba(74, 197, 120, .3); }
.log-who { display: inline-flex; align-items: center; gap: 8px; }
.log-who .avatar { width: 24px; height: 24px; font-size: 10px; }

/* Tables inside a card reach its edges, so a hovered row isn't cut short; the "..." never slides */
.card > .table-wrap { margin: 0 -22px; }
.card > .table-wrap .table th:first-child, .card > .table-wrap .table td:first-child { padding-left: 22px; }
.card > .table-wrap .table th:last-child, .card > .table-wrap .table td:last-child { padding-right: 22px; }
.card > .table-wrap:last-child { margin-bottom: -10px; }
.table tbody tr[data-open]:hover td:last-child .dots .ico { transform: none; }
.lists-2 + .card { margin-top: 16px; }
.keys li > .dots { justify-self: end; }

/* Modules under their product: one line from the product's icon down to each module's icon */
tr.is-module .item-name::before { content: none; }
tr.has-modules td:first-child, tr.is-module td:first-child { position: relative; }
tr.has-modules td:first-child::after { content: ""; position: absolute; left: 37px; top: calc(50% + 15px); bottom: 0; border-left: 1px solid var(--line-2); }
tr.is-module td:first-child::before { content: ""; position: absolute; left: 37px; top: 0; height: 50%; width: 12px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-bottom-left-radius: 8px; }
tr.is-module:not(.is-last) td:first-child::after { content: ""; position: absolute; left: 37px; top: 50%; bottom: 0; border-left: 1px solid var(--line-2); }

@media (max-width: 820px) {
	.do-row { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
	.history li { display: grid; grid-template-columns: 8px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
	.history li small { grid-column: 2; margin-left: 0; }
}

/* Account flows: the auth area scrolls on its own, its card swaps steps, password rules, optional details */
.signin { height: 100vh; overflow-y: auto; align-items: safe center; scrollbar-gutter: stable both-edges; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.auth-step { display: none; }
.auth-step.is-on { display: block; animation: step-in .32s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.signin-card .auth-step > .btn { width: 100%; justify-content: center; margin-top: 18px; }
.signin-card .auth-step > .btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.signin-card .auth-step > .btn-ghost:hover { border-color: rgba(255, 255, 255, .28); }
.signin-card p b { color: var(--text); font-weight: 600; }
.signin-card .fine-line { color: var(--muted); font-size: 13px; }
.sent-ico.warn { background: rgba(233, 196, 106, .14); color: var(--amber); }
.notice-act { margin-top: 18px; }
.notice-act .btn { width: 100%; justify-content: center; }

.pw-rules { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.pw-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.pw-rules .ico { width: 14px; height: 14px; }
.pw-rules .icon-tabler-circle-check { display: none; }
.pw-rules li.ok { color: var(--green-2); }
.pw-rules li.ok .icon-tabler-circle { display: none; }
.pw-rules li.ok .icon-tabler-circle-check { display: inline; }

.fold { margin-top: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--ink-2); }
.fold-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; color: var(--text); font: 600 14px inherit; font-family: inherit; text-align: left; cursor: pointer; }
.fold-btn small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.fold-btn .ico { color: var(--muted); transition: transform .28s cubic-bezier(.3, .8, .2, 1), color .2s; }
.fold-btn:hover .ico { color: var(--text); }
.fold.is-open .fold-btn .ico { transform: rotate(180deg); }
.fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.3, .8, .2, 1); }
.fold.is-open .fold-body { grid-template-rows: 1fr; }
.fold-inner { min-height: 0; overflow: hidden; padding: 0 14px; opacity: 0; transition: opacity .2s, padding-bottom .32s; }
.fold.is-open .fold-inner { padding-bottom: 14px; opacity: 1; transition: opacity .25s .08s, padding-bottom .32s; }
.fold.is-settled .fold-inner { overflow: visible; }
.fold-inner > :first-child, .fold-inner > .row:first-child .field { margin-top: 0; }
.fold .dd, .card .row .dd { display: block; }
.dd:has(option[value=""]:checked) .dd-value { color: var(--muted); font-weight: 500; }

.card-head + .row .field, .card-head + .field { margin-top: 0; }
.email-row { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 4px 0 12px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line-2); }
.email-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.email-row .btn { height: 32px; }
.pending { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(233, 196, 106, .08); border: 1px solid rgba(233, 196, 106, .28); font-size: 13px; animation: step-in .3s cubic-bezier(.2, .7, .2, 1) both; }
.pending > .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--amber); }
.pending b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.pending span { color: var(--text-2); }
.pending-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dlg-lead { margin: 16px 0 0; color: var(--text-2); font-size: 14px; }

@media (max-width: 560px) {
	.card .row, .fold .row { flex-direction: column; gap: 0; }
	.card-head + .row .field ~ .field, .fold-inner > .row:first-child .field ~ .field { margin-top: 14px; }
	.card-head { flex-wrap: wrap; }
	.card-head > .btn { margin-top: 2px; }
	.pending { grid-template-columns: minmax(0, 1fr); }
	.pending > .ico { display: none; }
	.pending-acts { grid-column: 1; }
}

/* A long dropdown's search field stays at the top of its list */
.dd-search-wrap { position: sticky; top: -5px; z-index: 1; display: block; margin: -5px -5px 5px; padding: 5px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dd-search { width: 100%; height: 34px; padding: 0 10px; border-radius: 7px; background: var(--ink); border: 1px solid var(--line-2); color: var(--text); font: 400 14px "Noto Sans", sans-serif; outline: 0; }
.dd-search:focus { border-color: rgba(74, 197, 120, .5); }
.dd-search::-webkit-search-cancel-button { display: none; }

/* What a person told us about themselves, in their admin dialog */
.about { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.about:empty { display: none; }
.about dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.about dd { margin: 2px 0 0; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }

/* A password manager's added element never takes a share of a row (platform.js takes back its gap) */
[data-lastpass-icon-root], [data-lastpass-root] { flex: none !important; }

.del-me-warn:has(+ :not([hidden])) { margin-bottom: 16px; }

/* Tables in a card run to its bottom edge; the last row's corners follow the card's */
.card > .table-wrap:last-child { margin-bottom: -22px; }
.card > .table-wrap:last-child tbody tr:last-child td:first-child { border-bottom-left-radius: 13px; }
.card > .table-wrap:last-child tbody tr:last-child td:last-child { border-bottom-right-radius: 13px; }

/* Customer pages: an empty list is one compact row (icon, line, link), and an empty table drops its headers */
[data-area="customer"] .empty { display: flex; align-items: center; gap: 12px; padding: 0; text-align: left; color: var(--text-2); font-size: 14px; }
[data-area="customer"] .empty > .ico { display: block; width: 34px; height: 34px; margin: 0; padding: 8px; flex-shrink: 0; border-radius: 9px; background: var(--surface-3); color: var(--muted); }
[data-area="customer"] .empty > span { flex: 1; min-width: 0; }
[data-area="customer"] .empty > span b { color: var(--text); font-weight: 600; }
[data-area="customer"] .empty > .link-arrow { flex-shrink: 0; font-size: 14px; }
[data-area="customer"] .table tr.is-empty td { padding: 4px 22px 22px; }
[data-area="customer"] .table tr.is-empty:hover td { background: transparent; }
[data-area="customer"] .table:has(tr.is-empty) thead { display: none; }
[data-area="customer"] .card > .table-wrap:has(tr.is-empty) { margin-bottom: -22px; }
[data-area="customer"] .feed li.is-empty { display: block; padding: 0; }
.grid-2:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
	[data-area="customer"] .empty { flex-wrap: wrap; }
	[data-area="customer"] .empty > span { flex: 1 1 200px; }
	[data-area="customer"] .empty > .link-arrow { margin-left: 46px; }
}

/* A card head with no description sits at the top, like the others; alone in its card it leaves no gap under it */
.card-head:not(:has(p)) { min-height: 0; }
.card-head:last-child { margin-bottom: 0; }
/* An empty table row never lights up */
.table tr.is-empty:hover td { background: transparent; }

/* Button icons match their bold label: a touch heavier, optically centred on the letters, closer to them */
.btn > .ico { stroke-width: 2.25; }
.btn-sm { gap: 6px; }

[data-area="customer"] .empty .link-arrow .ico { display: inline-block; width: 1.15em; height: 1.15em; margin: 0; padding: 0; background: none; }
.table tr.is-empty td { border-top: 0; }

[data-area="customer"] .table-wrap:has(tr.is-empty) > .table { min-width: 0; }

/* Optical centring: Noto Sans sits low in its line box and icons carry a left inset, so labels lift 1px and icon buttons shift 1px left */
.btn { padding-bottom: 2px; }
.btn:has(> .ico:first-child) { padding-left: 19px; padding-right: 21px; }
.btn-sm:has(> .ico:first-child) { padding-left: 15px; padding-right: 17px; }

/* A card ends 22px under its last line, whatever that line is */
.dl-list > .dl:last-child, .feed li:last-child, .sites li:last-child { padding-bottom: 0; }
.card-head:not(:has(~ :not([hidden]))) { margin-bottom: 0; }
/* Customer cards side by side hold different things: each keeps its own height */
[data-area="customer"] .grid-2 { align-items: start; }

.card > .setting:last-child { padding-bottom: 0; }
