/* SuperAppAnalytics — the web console (console.html) and invite page (join.html).
   Builds on site.css and borrows the sign-in pieces from connect.css. */

body.console { min-height: 100vh; min-height: 100dvh; }
.k-aura { position: fixed; height: 620px; opacity: calc(var(--aura) * .7); }

/* ---------- Top bar ---------- */

.k-top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  width: min(100% - 2 * var(--gutter), 1080px);
  margin: 0 auto;
  padding: 18px 0 12px;
}
.k-top::before {
  content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), .92) 55%, rgba(var(--bg-rgb), 0));
  pointer-events: none;
}
.k-top .brand { justify-self: start; }
.k-top-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.k-top .theme-toggle { width: 40px; height: 40px; }
.k-tabs { justify-self: center; }
.k-tabs .seg-btn { min-width: 84px; }
.k-tabs[hidden] { display: none; }
.k-who {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 220px; height: 40px; padding: 0 14px 0 6px;
  border: 0; border-radius: 999px;
  color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.k-who span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-who[hidden] { display: none; }

.k-avatar {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border-radius: 50%;
  background: var(--fill-2);
  border: 1px solid var(--hairline);
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; color: var(--text);
}
.k-avatar.lg { width: 36px; height: 36px; font-size: 14px; }

@media (max-width: 760px) {
  .k-top { grid-template-columns: 1fr auto; row-gap: 12px; padding-top: 14px; }
  .k-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); }
  .k-tabs .seg-btn { min-width: 0; }
  .k-who { width: 40px; padding: 0; justify-content: center; }
  .k-who span:last-child { display: none; }
  .k-top .brand span { display: none; }
}

/* ---------- Page ---------- */

.k-main {
  position: relative; z-index: 1;
  width: min(100% - 2 * var(--gutter), 880px);
  margin: 0 auto;
  padding: 26px 0 96px;
}
.k-loading { display: grid; place-items: center; min-height: 50vh; color: var(--text-2); font-size: 15px; }
.k-loading .c-spinner { display: block; width: 22px; height: 22px; margin: 0 auto 14px; color: var(--text-2); }

.k-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.k-head-text { min-width: 0; }
.k-title { margin: 0; font-family: var(--display); font-size: clamp(30px, 5vw, 40px); line-height: 1.06; font-weight: 700; letter-spacing: -.032em; overflow-wrap: anywhere; }
.k-sub { margin: 8px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--text-2); }
.k-sub code, .k-mono { font-family: var(--mono); font-size: .9em; letter-spacing: 0; }
.k-head-row { display: flex; align-items: center; gap: 14px; min-width: 0; }

.k-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 14px -8px; padding: 6px 10px 6px 6px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: color .2s ease, background-color .2s ease;
}
.k-back:hover { color: var(--text); background: var(--fill-2); }
.k-back .i { font-size: 16px; }

.k-stack { display: grid; gap: 16px; }
.k-view { animation: c-rise .5s var(--ease) both; }

/* ---------- Cards ---------- */

.k-card { padding: 22px; }
@media (min-width: 560px) { .k-card { padding: 26px 28px; } }
.k-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 6px; }
.k-card h2 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.018em; }
.k-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.k-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.k-card p + p { margin-top: 8px; }
.k-card p b, .k-card p strong { color: var(--text); font-weight: 600; }
.k-card .k-gap { height: 18px; }
.k-divider { height: 1px; margin: 22px 0; border: 0; background: var(--hairline); }

/* ---------- App list ---------- */

.k-list { padding: 6px; }
.k-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 14px 14px;
  border: 0; border-radius: 18px;
  background: none; text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s ease;
}
.k-row + .k-row { box-shadow: 0 -1px 0 var(--hairline); }
.k-row:hover { background: var(--fill); }
.k-row:hover + .k-row, .k-row:hover { box-shadow: none; }
.k-row-main { min-width: 0; }
.k-row-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -.015em; }
.k-row-title > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-row-meta { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--text-2); }
.k-row-meta .k-mono { font-size: 12.5px; }
.k-row-end { display: flex; align-items: center; gap: 12px; color: var(--text-3); }
.k-row-end .i { font-size: 18px; }
.k-row .k-status { margin-top: 6px; }
@media (min-width: 680px) {
  .k-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px) auto; }
  .k-row .k-status { margin-top: 0; justify-self: end; }
}

.k-appicon {
  display: grid; place-items: center;
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background: var(--fill-2);
  border: 1px solid var(--hairline);
  font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--text);
}
.k-appicon.lg { width: 60px; height: 60px; border-radius: 15px; font-size: 25px; }

/* Status line: blue dot when events arrive, gray while waiting, red on a failure. */
.k-status { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--text-2); }
.k-status > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-status b { color: var(--text); font-weight: 600; }
.k-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-3); }
.k-dot.on { background: rgb(var(--primary)); box-shadow: 0 0 6px rgba(var(--primary), .9); animation: live-dot 2.2s ease-in-out infinite; }
.k-dot.bad { background: rgb(var(--negative)); }
.k-statusbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.k-statusbar .k-status { font-size: 15px; }
.k-statusbar .k-status > span:last-child { white-space: normal; }

/* ---------- Badges ---------- */

.k-badge {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--text-2);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  white-space: nowrap;
}
.k-badge.blue { background: rgba(var(--primary), .14); color: rgb(var(--glow)); }
[data-theme="light"] .k-badge.blue { background: rgba(var(--deep), .09); color: rgb(var(--deep)); }
.k-badge.red { background: rgba(var(--negative), .12); color: rgb(var(--negative)); }

/* ---------- Key / value rows ---------- */

.k-kv { display: grid; gap: 6px; margin: 0; }
.k-kv + .k-kv { margin-top: 16px; }
.k-kv dt { font-size: 13px; font-weight: 600; color: var(--text-2); }
.k-kv dd { margin: 0; }
.k-field {
  display: flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 4px 5px 4px 16px;
  border-radius: 14px;
  background: var(--fill);
  border: 1px solid var(--hairline-2);
}
.k-field code { flex: 1; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.45; color: var(--text); letter-spacing: 0; }
.k-field .copy-btn { height: 40px; align-self: center; }
.k-field.is-secret { border-color: rgba(var(--primary), .45); box-shadow: 0 0 0 4px rgba(var(--primary), .08); }

.k-snippet { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--fill); border: 1px solid var(--hairline-2); overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--text); white-space: pre; }
.k-snippet .k-cm { color: var(--text-2); }

.k-reveal { margin-top: 16px; display: grid; gap: 10px; animation: c-rise .45s var(--ease) both; }
.k-reveal-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.k-reveal-note .i { flex: none; margin-top: 2px; font-size: 15px; color: rgb(var(--primary)); }

/* Numbered how-to */
.k-steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: k-step; display: grid; gap: 12px; }
.k-steps > li { position: relative; padding-left: 36px; font-size: 15px; line-height: 1.5; color: var(--text-2); counter-increment: k-step; }
.k-steps > li b { color: var(--text); font-weight: 600; }
.k-steps > li::before {
  content: counter(k-step);
  position: absolute; left: 0; top: -1px;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-2);
  font-size: 12px; font-weight: 700; color: var(--text);
}
.k-steps .cmd, .k-steps .k-field { margin-top: 10px; }
.k-steps .cmd { display: flex; width: 100%; height: 50px; font-size: 13px; padding-left: 16px; justify-content: space-between; }
.k-steps .cmd .copy-btn { height: 38px; }
/* The command sits right after the prompt; only Copy goes to the far end. */
.k-steps .cmd code, .k-empty .cmd code { flex: 1; text-align: left; }

/* Disclosure */
.k-more { padding: 0; }
.k-more > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px;
  list-style: none; cursor: pointer;
  border-radius: var(--radius-card);
}
@media (min-width: 560px) { .k-more > summary { padding: 24px 28px; } }
.k-more > summary::-webkit-details-marker { display: none; }
.k-more > summary h2 { margin: 0; }
.k-more > summary p { margin: 4px 0 0; }
.k-more > summary .i { flex: none; font-size: 20px; color: var(--text-2); transition: transform .35s var(--ease-out); }
.k-more[open] > summary .i { transform: rotate(180deg); }
.k-more-body { padding: 0 22px 24px; }
@media (min-width: 560px) { .k-more-body { padding: 0 28px 28px; } }

/* Tokens */
.k-tokens { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.k-tokens li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--text-2); }
.k-tokens li:last-child { border-bottom: 1px solid var(--hairline); }
.k-tokens li > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-weight: 600; }
.k-tokens .k-mono { color: var(--text-2); font-weight: 500; }

/* ---------- Members ---------- */

.k-members { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.k-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--hairline); }
.k-member:last-child { border-bottom: 1px solid var(--hairline); }
.k-member-main { min-width: 0; }
.k-member-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.k-member-name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-member-meta { margin-top: 1px; font-size: 13px; color: var(--text-2); }
.k-member-actions { display: flex; align-items: center; gap: 6px; }
@media (max-width: 520px) {
  .k-member { grid-template-columns: auto minmax(0, 1fr); }
  .k-member-actions { grid-column: 2; justify-content: flex-start; margin-top: 4px; }
}

/* ---------- Controls ---------- */

.k-btn { height: 40px; padding: 0 16px; font-size: 14.5px; }
.k-btn .i { font-size: 16px; }
.k-btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: none; color: var(--text-2);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.k-btn-quiet:hover { color: var(--text); background: var(--fill-2); }
.k-btn-quiet.danger:hover { color: rgb(var(--negative)); background: rgba(var(--negative), .08); }
.k-btn-quiet:disabled { opacity: .5; cursor: default; }
.btn-danger { background: rgb(var(--negative)); color: #fff; }
.btn-danger:hover { box-shadow: 0 0 0 4px rgba(var(--negative), .14); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn[aria-busy="true"] .c-spinner { display: block; }
.btn .c-spinner { width: 15px; height: 15px; }

.k-select {
  height: 36px; padding: 0 30px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.k-select.lg { height: 52px; padding: 0 40px 0 16px; border-radius: 14px; font-size: 16px; font-weight: 500; background-position: right 16px center; }
.k-select:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 4px rgba(var(--glow), .13); }

.k-inline { display: flex; gap: 10px; align-items: stretch; }
.k-inline .c-input { flex: 1; min-width: 0; }
.k-inline .btn { height: 52px; flex: none; }
@media (max-width: 520px) { .k-inline { flex-direction: column; } .k-inline .btn { width: 100%; } }
.k-form-note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.k-inline-error { margin: 10px 0 0; font-size: 14px; color: rgb(var(--negative)); }
.k-inline-error:empty { display: none; }

.k-rename { display: flex; align-items: center; gap: 8px; width: min(100%, 520px); }
.k-rename .c-input { height: 50px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Empty states ---------- */

.k-empty { padding: 34px 24px; text-align: center; }
@media (min-width: 560px) { .k-empty { padding: 48px 48px 44px; } }
.k-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px; background: var(--fill-2); border: 1px solid var(--hairline); color: var(--text); }
.k-empty-icon .i { font-size: 26px; }
.k-empty h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.022em; }
.k-empty > p { max-width: 460px; margin: 0 auto; }
.k-empty .cmd { display: flex; justify-content: space-between; width: min(100%, 470px); height: 52px; margin: 22px auto 10px; padding-left: 18px; font-size: 13.5px; }
.k-empty .cmd .copy-btn { height: 40px; }
.k-empty .k-ask { margin: 0 auto; font-size: 14px; color: var(--text-2); }
.k-empty .k-ask b { color: var(--text); }
.k-empty .k-or { margin: 22px 0 0; }

/* ---------- Account ---------- */

.k-account { display: flex; align-items: center; gap: 14px; }
.k-account-main { min-width: 0; flex: 1; }
.k-account-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; color: var(--text); }
.k-account-main span { font-size: 14px; color: var(--text-2); }
.k-getapp { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.k-getapp img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 .5px var(--hairline-2), 0 8px 28px rgba(var(--primary), .22); }
.k-getapp .brand-icon { width: 64px; height: 64px; border-radius: 15px; }
.k-getapp-text { flex: 1; min-width: 200px; }

/* ---------- Dialog ---------- */

.k-dialog {
  width: min(100% - 32px, 460px);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
[data-theme="light"] .k-dialog { box-shadow: 0 30px 80px rgba(0, 0, 0, .18); }
.k-dialog::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-theme="light"] .k-dialog::backdrop { background: rgba(0, 0, 0, .2); }
.k-dialog[open] { animation: k-pop .32s var(--ease-out) both; }
@keyframes k-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.k-dialog-body { padding: 26px 24px 22px; }
.k-dialog h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.k-dialog p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.k-dialog p b { color: var(--text); }
.k-dialog .c-field { margin: 16px 0 0; }
.k-dialog .c-field + .c-field { margin-top: 14px; }
.k-dialog .c-error { margin-top: 0; }
.k-dialog .c-error.is-visible { margin: 16px 0 0; }
.k-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.k-dialog-actions .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.k-optional { font-weight: 500; color: var(--text-3); }

/* ---------- Toast ---------- */

.k-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 600;
  transform: translate(-50%, 20px); opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .4s var(--ease-out);
}
.k-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.k-toast .i { font-size: 16px; color: rgb(var(--primary)); }
.k-toast.is-error .i { color: rgb(var(--negative)); }

/* ---------- Signed-out ---------- */

.k-auth { display: grid; justify-items: center; padding-top: clamp(10px, 5vh, 56px); }
.k-auth-col { width: min(100%, 440px); }
.k-auth .c-title { text-align: left; }
.k-auth .c-lede { margin-bottom: 26px; }
.k-auth .c-footer { margin-top: 22px; }

/* ---------- Invite page ---------- */

.j-main { display: grid; justify-items: center; padding-top: clamp(16px, 7vh, 80px); }
.j-col { width: min(100%, 460px); }
.j-invite { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 16px 18px; }
.j-invite .k-avatar { width: 44px; height: 44px; font-size: 17px; }
.j-invite-text { min-width: 0; font-size: 15px; line-height: 1.4; color: var(--text-2); }
.j-invite-text b { color: var(--text); overflow-wrap: anywhere; }
.j-signed { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 14px; border-radius: 16px; background: var(--fill); border: 1px solid var(--hairline); font-size: 14px; color: var(--text-2); }
.j-signed b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.j-signed .k-btn-quiet { margin-left: auto; flex: none; }
.j-actions { display: grid; gap: 10px; margin-top: 22px; }
.j-actions .btn { width: 100%; }

/* ---------- 404 ---------- */

.nf-main { display: grid; place-items: center; min-height: calc(100vh - 90px); min-height: calc(100dvh - 90px); padding: 0 var(--gutter) 60px; text-align: center; }
.nf-code { margin: 0 0 10px; font-family: var(--display); font-size: clamp(90px, 20vw, 160px); line-height: .9; font-weight: 700; letter-spacing: -.05em; background: linear-gradient(180deg, var(--text), rgba(var(--text-rgb), .25)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-main h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.022em; }
.nf-main p { max-width: 380px; margin: 0 auto 26px; color: var(--text-2); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Access: every app in the team, or only some ---------- */
.k-invite { display: grid; gap: 18px; }
.k-invite .c-field { margin: 0; }
.k-invite > .btn { justify-self: start; height: 48px; }
.k-access { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.k-access legend { padding: 0; margin-bottom: 8px; }
.k-choice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: var(--radius-control);
  border: 1px solid var(--hairline-2); background: var(--fill);
  cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.k-choice:has(input:checked) { border-color: rgba(var(--text-rgb), .55); background: var(--fill-2); }
.k-choice:has(input:disabled) { opacity: .45; cursor: default; }
.k-choice input { margin: 3px 0 0; accent-color: var(--text); flex: none; }
.k-choice span { display: grid; gap: 2px; }
.k-choice b { font-weight: 600; font-size: 15px; }
.k-choice small { color: var(--text-2); font-size: 13px; }
.k-checks { display: grid; gap: 2px; margin: 2px 0 0 26px; }
.k-checks[hidden] { display: none; }
.k-check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; font-size: 15px; }
.k-check input { accent-color: var(--text); margin: 0; flex: none; }
.k-check .k-appicon { width: 26px; height: 26px; font-size: 12px; border-radius: 7px; }
.k-dialog .k-access { margin: 6px 0 4px; }

/* ---------- Usage: one figure, the plan meter, a bar per day ---------- */
.k-use .k-card-head { align-items: baseline; flex-wrap: wrap; row-gap: 2px; }
.k-use-when { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-use-hero { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin: 14px 0 0; }
.k-use-figure { font-family: var(--display); font-size: clamp(44px, 8vw, 58px); line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.k-use-unit { font-size: 16px; font-weight: 500; color: var(--text-2); }

.k-meter-row { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; }
.k-meter { position: relative; flex: 1; height: 6px; border-radius: 6px; background: var(--track); overflow: hidden; }
.k-meter > span { position: absolute; inset: 0 auto 0 0; width: var(--p); min-width: 6px; border-radius: inherit; background: linear-gradient(90deg, rgb(var(--deep)), rgb(var(--glow))); }
.k-meter.is-over > span { width: 100%; }
.k-meter-label { flex: none; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.k-meter-label b { color: var(--text); font-weight: 650; }
.k-card p.k-use-over { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--text); }

.k-chart { margin: 26px 0 0; }
.k-bars { display: flex; align-items: flex-end; gap: 3px; height: 112px; }
.k-bar { position: relative; flex: 1; min-width: 0; height: var(--h, 0%); border-radius: 3px 3px 1.5px 1.5px; background: rgba(var(--primary), .5); }
[data-theme="light"] .k-bar { background: rgba(var(--deep), .42); }
.k-bar.is-zero, .k-bar.is-future { height: 3px; border-radius: 2px; background: var(--track); }
.k-bar.is-zero { background: rgba(var(--primary), .22); }
.k-bar.is-today { background: linear-gradient(180deg, rgb(var(--glow)), rgb(var(--primary))); box-shadow: 0 0 14px rgba(var(--glow), .45); }
[data-theme="light"] .k-bar.is-today { background: linear-gradient(180deg, rgb(var(--primary)), rgb(var(--deep))); box-shadow: 0 0 12px rgba(var(--primary), .3); }
.k-bar.is-today.is-zero { height: 3px; }

/* Readout: the latest day until a bar is pointed at, then that day. */
.k-readout { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; row-gap: 2px; min-height: 26px; margin: 0 0 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-ro-when { font-size: 13px; font-weight: 500; color: var(--text-2); }
.k-ro-n { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.k-ro-unit { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.k-ro-cmp { font-size: 13px; font-weight: 600; color: var(--text-2); }
.k-ro-cmp.up { color: rgb(var(--glow)); }
[data-theme="light"] .k-ro-cmp.up { color: rgb(var(--primary)); }
.k-ro-cmp.down { color: rgb(var(--negative)); }

.k-bars[tabindex] { cursor: crosshair; touch-action: pan-y; -webkit-tap-highlight-color: transparent; outline: none; border-radius: 4px; }
.k-bars[tabindex]:focus-visible { box-shadow: 0 0 0 2px rgba(var(--glow), .5); }
.k-bar { transition: opacity var(--k-scrub-ms, 200ms) var(--k-scrub-ease, ease-out); }
.k-chart.is-scrubbing .k-bar:not(.is-future) { opacity: .4; }
.k-chart.is-scrubbing .k-bar.is-today:not(.is-active) { box-shadow: none; }
/* The day being read out takes today's lit look; today steps back with the rest. */
.k-chart.is-scrubbing .k-bar.is-active { opacity: 1; background: linear-gradient(180deg, rgb(var(--glow)), rgb(var(--primary))); box-shadow: 0 0 14px rgba(var(--glow), .45); }
[data-theme="light"] .k-chart.is-scrubbing .k-bar.is-active { background: linear-gradient(180deg, rgb(var(--primary)), rgb(var(--deep))); box-shadow: 0 0 12px rgba(var(--primary), .3); }
@media (prefers-reduced-motion: reduce) { .k-bar { transition: none; } }
@media (max-width: 520px) { .k-bars { gap: 2px; height: 96px; } }

.k-axis { position: relative; height: 18px; margin-top: 8px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-axis-label { position: absolute; top: 0; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.k-axis-label.is-start { left: 0; transform: none; }
.k-axis-label.is-end { left: auto; right: 0; transform: none; }
.k-axis-label.is-today { color: var(--text); font-weight: 600; }
.k-chart.near-start .k-axis-label.is-start, .k-chart.near-end .k-axis-label.is-end { visibility: hidden; }

.k-card p.k-use-people { margin: 10px 0 0; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-use-people b { font-weight: 600; color: var(--text); }
.k-ro-per { font-size: 13px; font-weight: 500; color: var(--text-2); }
/* Events · per person · share; the column header names the month, or the day the chart points at. */
.k-use { --use-cols: 96px 84px 48px; }
.k-use.no-per { --use-cols: 96px 48px; }
.k-use-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--use-cols); align-items: baseline; gap: 12px; padding: 0 0 4px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-use-cols span:not(:first-child) { text-align: right; }
.k-use-scope { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text); }
.k-use-apps { display: grid; margin: 0; padding: 0; list-style: none; }
.k-use-apps li { display: grid; grid-template-columns: auto minmax(0, 1fr) var(--use-cols); align-items: center; gap: 12px; padding: 9px 0; font-size: 15px; }
.k-use-apps li + li { border-top: 1px solid var(--hairline); }
.k-use-apps .k-appicon { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
.k-use-app-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.k-use-app-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.k-use-app-per { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.k-use-app-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.k-use-apps li { transition: opacity var(--k-scrub-ms, 200ms) var(--k-scrub-ease, ease-out); }
.k-use-apps li.is-none { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .k-use-apps li { transition: none; } }
/* A phone keeps events and events per person; the share goes. */
@media (max-width: 520px) {
  .k-use { --use-cols: 84px 64px; }
  .k-use.no-per { --use-cols: 84px 44px; }
  .k-use:not(.no-per) .k-use-app-pct, .k-use:not(.no-per) .k-use-col-pct { display: none; }
}
.k-card p.k-use-sandbox { margin: 12px 0 0; font-size: 13px; color: var(--text-3); }
.k-use-apps + p.k-use-sandbox { margin-top: 10px; }

/* ---------- Plan: name, price, renewal, and Change plan / Manage billing ---------- */
.k-team-use + .k-team-use { margin-top: 18px; }
.k-plan-hero { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; margin: 10px 0 0; }
.k-plan-name { font-family: var(--display); font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; }
.k-plan-price { font-size: 16px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-card p.k-plan-status { margin: 6px 0 0; font-size: 14.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-card p.k-plan-status.is-bad { color: rgb(var(--negative)); font-weight: 600; }
.k-plan-use { margin: 18px 0 0; }
.k-card .k-plan-use p { margin: 0 0 10px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.k-plan-x { color: var(--text); font-weight: 600; }
.k-card p.k-plan-lock { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--fill); border: 1px solid var(--hairline); font-size: 14.5px; line-height: 1.5; }
.k-plan-lock .i { flex: none; margin-top: 3px; font-size: 15px; color: var(--text); }
.k-plan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.k-card p.k-plan-note { margin: 18px 0 0; font-size: 14px; color: var(--text-2); }

/* The plan picker (a dialog): four paid plans as choices. */
.k-plans .c-field { margin: 16px 0 0; }
.k-plans .k-select.lg { width: 100%; }
.k-dialog .k-plan-opts { margin: 18px 0 14px; gap: 8px; }
.k-plan-opt { align-items: center; padding: 12px 14px; }
.k-plan-opt input { margin: 0; }
.k-choice .k-plan-opt-main { flex: 1; min-width: 0; }
.k-plan-opt-main b { display: flex; align-items: center; gap: 8px; }
.k-plan-opt .k-badge { display: inline-flex; height: 20px; padding: 0 8px; font-size: 11.5px; font-style: normal; }
.k-choice .k-plan-opt-price { display: flex; align-items: baseline; gap: 3px; flex: none; }
.k-plan-opt-price b { font-size: 17px; font-variant-numeric: tabular-nums; }
.k-plan-opt:has(input:disabled) { opacity: .55; }
.k-plans .k-form-note a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-3); }
