/* ==========================================================================
   RWT Portal Kit  (s1-kit.css), ported from the approved round-2 prototype for S1 surfaces.
   Global resets, the prototype rail/top-bar shell and the bare tone-* class names were dropped or prefixed
   (k-tone-*) so nothing here can touch the legacy portal. Documentation: top of s1-kit.js.
   Built on S1 tokens (css/s1-*.css). Color carries meaning only:
   red = late/blocked, amber = due soon, blue = waiting on someone, green = brief "done".
   Ink = actions and "you are here". Maroon = logo only. Projects and people are never hue-coded.
   ========================================================================== */
:root {
  --k-font-ui: "RWT S1 Inter", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-font-display: "RWT S1 Inter Tight", "RWT S1 Inter", Inter, system-ui, sans-serif;
  --k-page-max: 1440px;
  --k-gutter: clamp(14px, 2.2vw, 32px);
  --k-rail: 232px;
  --k-rail-mini: 68px;
  --k-top: 56px;
  --k-ease: cubic-bezier(.2, .7, .2, 1);
  --k-dur: 180ms;
  --k-shadow-pop: 0 18px 48px rgb(17 19 24 / .22), 0 2px 8px rgb(17 19 24 / .08);
  --k-shadow-card: 0 1px 2px rgb(17 19 24 / .06);
  --k-tint: 9%;
}

.k-num { font-variant-numeric: tabular-nums; }
.k-mute { color: var(--s1-mute); }
.k-ink2 { color: var(--s1-ink-2); }
.k-b { font-weight: 700; }
.k-sm { font-size: 13px; }
.k-xs { font-size: 12px; }
.k-grow { flex: 1 1 auto; min-width: 0; }
.k-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.k-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-flex { display: flex; align-items: center; gap: 10px; }
.k-wrap { flex-wrap: wrap; }
.k-gap4 { gap: 4px; } .k-gap6 { gap: 6px; } .k-gap8 { gap: 8px; } .k-gap14 { gap: 14px; }
.k-spacer { flex: 1 1 auto; }
.k-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.k-stack-sm { display: grid; gap: 8px; min-width: 0; }
.k-icon { display: inline-block; flex: none; width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; overflow: visible; pointer-events: none; }
.k-icon--12 { width: 12px; height: 12px; stroke-width: 2.6; vertical-align: -1px; }
.k-icon--14 { width: 14px; height: 14px; stroke-width: 2.4; vertical-align: -2px; }
.k-icon--18 { width: 18px; height: 18px; stroke-width: 2.1; vertical-align: -4px; }
.k-icon--20 { width: 20px; height: 20px; stroke-width: 2; vertical-align: -5px; }
.k-icon--24 { width: 24px; height: 24px; stroke-width: 1.9; vertical-align: -6px; }
.k-tone-late { --tone: var(--s1-late); } .k-tone-soon { --tone: var(--s1-soon); } .k-tone-wait { --tone: var(--s1-wait); } .k-tone-ok { --tone: var(--s1-ok); } .k-tone-ink { --tone: var(--s1-ink); } .k-tone-mute { --tone: var(--s1-mute); }

.k-iconbtn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--s1-line); background: #fff; border-radius: 10px; color: var(--s1-ink); cursor: pointer; flex: none; text-decoration: none; transition: background var(--k-dur), border-color var(--k-dur); }
.k-iconbtn:hover { background: var(--s1-panel-head); border-color: #b9bec9; }
.k-iconbtn .k-dot { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--s1-late); color: #fff; font: 700 10px/16px var(--k-font-ui); text-align: center; padding: 0 4px; box-shadow: 0 0 0 2px #fff; }

/* ---------- Page shell: full width, centered, never a narrow left column ----------
   .k-page is the outermost wrapper of an S1 screen. It owns the side gutters and centers at --k-page-max. */
.k-page { width: 100%; max-width: calc(var(--k-page-max) + 2 * var(--k-gutter)); margin: 0 auto; padding: 22px var(--k-gutter) 64px; display: grid; gap: 20px; min-width: 0; align-content: start; box-sizing: border-box; }
.k-page.is-entering { animation: k-page-in 220ms var(--k-ease); }
@keyframes k-page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.k-modal-root :focus-visible, .k-page :focus-visible, .k-menu :focus-visible { outline: 2px solid var(--s1-ink); outline-offset: 2px; }
.k-modal-root [hidden], .k-page [hidden] { display: none !important; }
.k-modal-root, .k-modal-root *, .k-page, .k-page *, .k-menu, .k-menu *, .k-toasts, .k-toasts * { box-sizing: border-box; }

/* ---------- Page header ---------- */
.k-head { display: grid; gap: 12px; }
.k-head-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.k-kicker { display: flex; align-items: center; gap: 7px; font: 700 11.5px var(--k-font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--s1-mute); }
.k-title { margin: 2px 0 0; font: 800 28px/1.12 var(--k-font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.k-sub { margin: 6px 0 0; color: var(--s1-ink-2); font-size: 14.5px; max-width: 78ch; }
.k-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.k-facts { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }

/* ---------- Layout helpers (full width, never a narrow left column) ---------- */
.k-grid { display: grid; gap: 16px; min-width: 0; }
.k-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.k-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.k-cols-main-side { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); align-items: start; }
.k-cols-side-main { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); align-items: start; }
.k-cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.k-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.k-auto-sm { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
@media (max-width: 1180px) { .k-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .k-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .k-cols-main-side, .k-cols-side-main, .k-cols-2-1, .k-cols-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .k-cols-4, .k-cols-3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Panel ---------- */
.k-panel { background: var(--s1-panel); border: 1px solid var(--s1-line); border-radius: var(--s1-radius-panel); min-width: 0; box-shadow: var(--k-shadow-card); }
.k-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 11px 16px; border-bottom: 1px solid var(--s1-line-soft); background: var(--s1-panel-head); border-radius: 12px 12px 0 0; min-height: 48px; }
.k-panel-title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 700 15.5px/1.2 var(--k-font-display); min-width: 0; }
.k-panel-title .k-icon { color: var(--s1-ink-2); }
.k-panel-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.k-panel-body { padding: 14px 16px; }
.k-panel-body--flush { padding: 0; }
.k-panel-foot { padding: 10px 16px; border-top: 1px solid var(--s1-line-soft); background: var(--s1-panel-head); border-radius: 0 0 12px 12px; font-size: 13px; color: var(--s1-mute); display: flex; align-items: center; gap: 10px; }
.k-count { display: inline-block; min-width: 22px; padding: 0 7px; border: 1px solid var(--s1-line); border-radius: 999px; background: #fff; color: var(--s1-ink-2); font: 650 11.5px/19px var(--k-font-ui); text-align: center; font-variant-numeric: tabular-nums; }
.k-count--late { color: var(--s1-late); border-color: color-mix(in srgb, var(--s1-late) 45%, #fff); background: color-mix(in srgb, var(--s1-late) 7%, #fff); }
.k-count--wait { color: var(--s1-wait); border-color: color-mix(in srgb, var(--s1-wait) 45%, #fff); background: color-mix(in srgb, var(--s1-wait) 7%, #fff); }

/* ---------- Buttons (S1 .s1-btn is the base; these are kit additions) ---------- */
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; background: var(--s1-ink); color: #fff; font: 650 13.5px/1.3 var(--k-font-ui); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background var(--k-dur), transform 120ms var(--k-ease), box-shadow var(--k-dur); }
.k-btn:hover { background: var(--s1-ink-hover); }
.k-btn:active { transform: translateY(1px); }
.k-btn--ghost { background: #fff; color: var(--s1-ink); border-color: var(--s1-line); font-weight: 600; }
.k-btn--ghost:hover { background: var(--s1-panel-head); border-color: #b9bec9; }
.k-btn--sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.k-btn--late { color: var(--s1-late); border-color: color-mix(in srgb, var(--s1-late) 40%, #fff); }
.k-btn--link { background: none; border: 0; padding: 2px 4px; color: var(--s1-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--s1-line); }
.k-btn--link:hover { background: none; text-decoration-color: var(--s1-ink); }
.k-btn[disabled] { opacity: .45; cursor: default; }
.k-btn--icon { padding: 7px; }

/* ---------- Avatars and chips ---------- */
.k-av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--s1-avatar); color: var(--s1-ink-2); font: 700 11px/1 var(--k-font-ui); letter-spacing: .01em; text-decoration: none; position: relative; transition: transform 140ms var(--k-ease), box-shadow 140ms; }
a.k-av:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--s1-ink); }
.k-av--xs { width: 20px; height: 20px; font-size: 8.5px; }
.k-av--sm { width: 24px; height: 24px; font-size: 9.5px; }
.k-av--md { width: 34px; height: 34px; font-size: 12.5px; }
.k-av--lg { width: 48px; height: 48px; font-size: 16px; }
.k-av--xl { width: 72px; height: 72px; font-size: 24px; }
.k-av--c1, .s1-avatar.k-av--c1, .s1h-av.k-av--c1 { background: color-mix(in srgb, var(--s1-ok) 15%, #fff); color: color-mix(in srgb, var(--s1-ok) 80%, #000); }
.s1h-av.k-av--c1 { color: color-mix(in srgb, var(--s1-ok) 80%, #000) !important; }
.k-av--c2, .s1-avatar.k-av--c2, .s1h-av.k-av--c2 { background: color-mix(in srgb, var(--s1-wait) 15%, #fff); color: color-mix(in srgb, var(--s1-wait) 80%, #000); }
.s1h-av.k-av--c2 { color: color-mix(in srgb, var(--s1-wait) 80%, #000) !important; }
.k-av--c3, .s1-avatar.k-av--c3, .s1h-av.k-av--c3 { background: color-mix(in srgb, var(--s1-soon) 15%, #fff); color: color-mix(in srgb, var(--s1-soon) 80%, #000); }
.s1h-av.k-av--c3 { color: color-mix(in srgb, var(--s1-soon) 80%, #000) !important; }
.k-av--c4, .s1-avatar.k-av--c4, .s1h-av.k-av--c4 { background: color-mix(in srgb, var(--s1-late) 15%, #fff); color: color-mix(in srgb, var(--s1-late) 80%, #000); }
.s1h-av.k-av--c4 { color: color-mix(in srgb, var(--s1-late) 80%, #000) !important; }
.k-av--c5, .s1-avatar.k-av--c5, .s1h-av.k-av--c5 { background: color-mix(in srgb, var(--s1-ink) 15%, #fff); color: color-mix(in srgb, var(--s1-ink) 80%, #000); }
.s1h-av.k-av--c5 { color: color-mix(in srgb, var(--s1-ink) 80%, #000) !important; }
.k-av--c6, .s1-avatar.k-av--c6, .s1h-av.k-av--c6 { background: color-mix(in srgb, color-mix(in srgb, var(--s1-ok) 50%, var(--s1-wait)) 15%, #fff); color: color-mix(in srgb, color-mix(in srgb, var(--s1-ok) 50%, var(--s1-wait)) 80%, #000); }
.s1h-av.k-av--c6 { color: color-mix(in srgb, color-mix(in srgb, var(--s1-ok) 50%, var(--s1-wait)) 80%, #000) !important; }
.k-av--c7, .s1-avatar.k-av--c7, .s1h-av.k-av--c7 { background: color-mix(in srgb, color-mix(in srgb, var(--s1-wait) 55%, var(--s1-late)) 15%, #fff); color: color-mix(in srgb, color-mix(in srgb, var(--s1-wait) 55%, var(--s1-late)) 80%, #000); }
.s1h-av.k-av--c7 { color: color-mix(in srgb, color-mix(in srgb, var(--s1-wait) 55%, var(--s1-late)) 80%, #000) !important; }
.k-av--c8, .s1-avatar.k-av--c8, .s1h-av.k-av--c8 { background: color-mix(in srgb, color-mix(in srgb, var(--s1-soon) 55%, var(--s1-late)) 15%, #fff); color: color-mix(in srgb, color-mix(in srgb, var(--s1-soon) 55%, var(--s1-late)) 80%, #000); }
.s1h-av.k-av--c8 { color: color-mix(in srgb, color-mix(in srgb, var(--s1-soon) 55%, var(--s1-late)) 80%, #000) !important; }
.k-av > .k-av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; background: #fff; }
.k-av--photo { overflow: hidden; }
[data-kav] { position: relative; }
[data-kav].k-av--photo { overflow: hidden; }
[data-kav] > .k-av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.k-av--you { background: var(--s1-ink); color: #fff; }
.k-av--pi { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--s1-ink); }
a.k-av--pi:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--s1-ink), 0 2px 6px rgb(0 0 0 / .2); }
.k-avs { display: inline-flex; align-items: center; }
.k-avs > * + * { margin-left: -5px; }
.k-avs > .k-av { box-shadow: 0 0 0 2px #fff; }
.k-avs > .k-av--pi { box-shadow: 0 0 0 2px #fff; border: 1.5px solid var(--s1-ink); }
.k-pms { gap: 3px; } .k-pms > * + * { margin-left: 0; } .k-pms > a { box-shadow: none; }
.k-avs-more { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: #fff; border: 1px solid var(--s1-line); color: var(--s1-ink-2); font: 700 10.5px var(--k-font-ui); margin-left: -5px; box-shadow: 0 0 0 2px #fff; }
.k-pchip, .k-uchip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; padding: 2px 10px 2px 3px; border: 1px solid var(--s1-line); border-radius: 999px; background: #fff; color: var(--s1-ink); text-decoration: none; font: 600 12.5px/1.3 var(--k-font-ui); transition: border-color var(--k-dur), background var(--k-dur), box-shadow var(--k-dur); }
.k-pchip:hover, .k-uchip:hover { border-color: var(--s1-ink); background: var(--s1-panel-head); }
.k-pchip .k-pn, .k-uchip .k-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Project mark: ink disc with white letters. Hue-free by design (S1 rule: no monogram covers, no decorative color). */
.k-pm { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--s1-ink); color: #fff; font: 800 9px/1 var(--k-font-display); letter-spacing: .02em; }
.k-pm--sm { width: 18px; height: 18px; font-size: 7.5px; }
.k-pm--md { width: 30px; height: 30px; font-size: 11px; }
.k-pm--lg { width: 44px; height: 44px; font-size: 15px; }
.k-pm--xl { width: 64px; height: 64px; font-size: 21px; }
a.k-pm { text-decoration: none; }
a.k-pm:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--s1-ink); }
.k-pchip--bare { padding: 0; border: 0; background: none; }
.k-uchip .k-av { width: 22px; height: 22px; font-size: 9px; }
.k-uchip small { color: var(--s1-mute); font-weight: 500; }

/* ---------- Pills, tags ---------- */
.k-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tone, var(--s1-ink-2)) 38%, #fff); background: color-mix(in srgb, var(--tone, var(--s1-ink-2)) var(--k-tint), #fff); color: var(--tone, var(--s1-ink-2)); font: 650 12px/1.45 var(--k-font-ui); white-space: nowrap; }
.k-pill--solid { background: var(--tone, var(--s1-ink)); border-color: var(--tone, var(--s1-ink)); color: #fff; }
.k-pill--plain { --tone: var(--s1-ink-2); background: #fff; border-color: var(--s1-line); }
.k-pill--ink { --tone: var(--s1-ink); background: var(--s1-ink); color: #fff; border-color: var(--s1-ink); }
.k-pill .k-icon { width: 13px; height: 13px; vertical-align: -2px; stroke-width: 2.4; }
.k-pill .k-sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
a.k-pill { text-decoration: none; } a.k-pill:hover { filter: brightness(.94); }
.k-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: var(--s1-column); border: 1px solid var(--s1-line-soft); color: var(--s1-ink-2); font: 600 11.5px/1.5 var(--k-font-ui); white-space: nowrap; }

/* ---------- Structured list rows ---------- */
.k-list { display: grid; margin: 0; padding: 0; list-style: none; container-type: inline-size; }
.k-row { --edge: transparent; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; padding: 11px 16px 11px 18px; border-top: 1px solid var(--s1-line-soft); background: #fff; transition: background var(--k-dur); }
.k-row:first-child { border-top: 0; }
.k-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--edge); }
.k-row:hover { background: #fafbfc; }
.k-row--late { --edge: var(--s1-late); } .k-row--wait { --edge: var(--s1-wait); } .k-row--soon { --edge: var(--s1-soon); } .k-row--new { --edge: var(--s1-ink); }
.k-row.is-new-entry { animation: k-row-in 320ms var(--k-ease); }
@keyframes k-row-in { from { opacity: 0; transform: translateY(-8px); background: color-mix(in srgb, var(--s1-ink) 6%, #fff); } to { opacity: 1; transform: none; } }
.k-row.is-leaving { animation: k-row-out 220ms var(--k-ease) forwards; }
@keyframes k-row-out { to { opacity: 0; transform: translateX(14px); max-height: 0; padding-block: 0; } }
.k-row-lead { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--s1-column); color: var(--s1-ink-2); border: 1px solid var(--s1-line-soft); }
.k-row--late .k-row-lead { color: var(--s1-late); background: color-mix(in srgb, var(--s1-late) 8%, #fff); border-color: color-mix(in srgb, var(--s1-late) 30%, #fff); }
.k-row--wait .k-row-lead { color: var(--s1-wait); background: color-mix(in srgb, var(--s1-wait) 8%, #fff); border-color: color-mix(in srgb, var(--s1-wait) 30%, #fff); }
.k-row--soon .k-row-lead { color: var(--s1-soon); background: color-mix(in srgb, var(--s1-soon) 9%, #fff); border-color: color-mix(in srgb, var(--s1-soon) 32%, #fff); }
.k-row-lead .k-icon { width: 17px; height: 17px; vertical-align: 0; }
.k-check { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.75px solid var(--s1-checkbox); border-radius: 6px; background: #fff; cursor: pointer; display: inline-grid; place-items: center; transition: background var(--k-dur), border-color var(--k-dur), transform 140ms var(--k-ease); flex: none; }
.k-check:hover { border-color: var(--s1-ink); }
.k-check:checked { background: var(--s1-ink); border-color: var(--s1-ink); animation: k-pop 220ms var(--k-ease); }
.k-check:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.k-check[type="radio"] { border-radius: 50%; }
.k-check[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.k-check:focus-visible { outline: 2px solid var(--s1-ink); outline-offset: 2px; }
@keyframes k-pop { 50% { transform: scale(1.18); } }
.k-row-main { min-width: 0; display: grid; gap: 5px; }
.k-row-title { display: block; color: var(--s1-ink); font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-row-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; font-size: 12.5px; color: var(--s1-mute); }
.k-row-meta .k-sep { width: 3px; height: 3px; border-radius: 50%; background: #c5c9d2; }
.k-row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.k-row-side { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.k-row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.k-row.is-done .k-row-title { color: var(--s1-mute); text-decoration: line-through; text-decoration-color: #c5c9d2; }
.k-row.is-done .k-row-lead { opacity: .7; }
@container (max-width: 600px) {
  .k-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 12px 12px 16px; }
  .k-row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .k-row-side:empty, .k-row-actions:empty { display: none; }
  .k-row-side, .k-row-actions { grid-column: 2; justify-content: flex-start; }
}

/* ---------- Stat tiles, meters ---------- */
.k-stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--s1-line); border-radius: 12px; text-decoration: none; color: inherit; box-shadow: var(--k-shadow-card); transition: border-color var(--k-dur), transform var(--k-dur) var(--k-ease), box-shadow var(--k-dur); min-width: 0; overflow: hidden; }
a.k-stat:hover { border-color: var(--s1-ink); transform: translateY(-1px); box-shadow: 0 6px 18px rgb(17 19 24 / .08); }
.k-stat-label { display: flex; align-items: center; gap: 7px; font: 650 12.5px var(--k-font-ui); color: var(--s1-mute); }
.k-stat-label .k-icon { color: var(--s1-ink-2); }
.k-stat-value { font: 800 30px/1.1 var(--k-font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.k-stat-value small { font: 600 13px var(--k-font-ui); color: var(--s1-mute); letter-spacing: 0; }
.k-stat-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--s1-mute); min-height: 22px; }
.k-stat--late .k-stat-value { color: var(--s1-late); } .k-stat--soon .k-stat-value { color: var(--s1-soon); } .k-stat--wait .k-stat-value { color: var(--s1-wait); }
.k-stat--late { box-shadow: inset 0 3px 0 var(--s1-late), var(--k-shadow-card); } .k-stat--soon { box-shadow: inset 0 3px 0 var(--s1-soon), var(--k-shadow-card); } .k-stat--wait { box-shadow: inset 0 3px 0 var(--s1-wait), var(--k-shadow-card); }
.k-spark { display: block; width: 100%; height: 34px; margin-top: 2px; }
.k-spark path.l { fill: none; stroke: var(--s1-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.k-spark path.a { fill: var(--s1-ink); opacity: .07; }
.k-spark circle { fill: var(--s1-ink); }
.k-segbar { display: flex; gap: 3px; width: 100%; }
.k-segbar i { flex: 1; height: 6px; border-radius: 3px; background: var(--s1-track); transition: background var(--k-dur); }
.k-segbar i.on { background: var(--s1-ink); }
.k-segbar--late i.on { background: var(--s1-late); } .k-segbar--soon i.on { background: var(--s1-soon); }
.k-bar { position: relative; height: 8px; border-radius: 4px; background: var(--s1-track); overflow: hidden; }
.k-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--tone, var(--s1-ink)); border-radius: 4px; transition: width 500ms var(--k-ease); }
.k-bar--sm { height: 6px; }
.k-ring { --p: 0; --tone: var(--s1-ink); position: relative; display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--tone) calc(var(--p) * 1%), var(--s1-track) 0); font: 800 13px var(--k-font-display); flex: none; }
.k-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.k-ring > span { position: relative; }
.k-meter { display: grid; gap: 5px; }
.k-meter-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--s1-mute); }
.k-meter-top b { color: var(--tone, var(--s1-ink)); font-weight: 700; }

/* ---------- Tabs, view switch ---------- */
.k-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--s1-line); margin: 0 0 -4px; }
.k-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--s1-mute); font: 650 14px var(--k-font-ui); cursor: pointer; text-decoration: none; transition: color var(--k-dur), border-color var(--k-dur); }
.k-tab:hover { color: var(--s1-ink); }
.k-tab[aria-selected="true"], .k-tab.is-on { color: var(--s1-ink); border-bottom-color: var(--s1-ink); }
.k-seg { display: inline-flex; border: 1px solid var(--s1-line); border-radius: 10px; background: #fff; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.k-seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 12px; border-radius: 7px; font: 650 13px var(--k-font-ui); color: var(--s1-mute); cursor: pointer; white-space: nowrap; transition: background var(--k-dur), color var(--k-dur); }
.k-seg button:hover { color: var(--s1-ink); background: var(--s1-column); }
.k-seg button[aria-pressed="true"] { background: var(--s1-ink); color: #fff; }
.k-seg--sm button { padding: 4px 10px; font-size: 12.5px; }
.k-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.k-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--s1-line); background: #fff; color: var(--s1-ink-2); font: 600 12.5px var(--k-font-ui); cursor: pointer; transition: all var(--k-dur); }
.k-fchip:hover { border-color: var(--s1-ink); }
.k-fchip[aria-pressed="true"] { background: var(--s1-ink); border-color: var(--s1-ink); color: #fff; }
.k-fchip .k-count { background: transparent; border: 0; min-width: 0; padding: 0; color: inherit; opacity: .7; }

/* ---------- Menus, toasts ---------- */
.k-menu { position: fixed; z-index: 400; min-width: 220px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; padding: 5px; background: #fff; border: 1px solid var(--s1-line); border-radius: 12px; box-shadow: var(--k-shadow-pop); animation: k-menu-in 140ms var(--k-ease); transform-origin: top right; }
@keyframes k-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.k-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; background: none; border-radius: 8px; font: 600 13.5px var(--k-font-ui); color: var(--s1-ink); text-align: left; cursor: pointer; text-decoration: none; }
.k-menu-item:hover, .k-menu-item:focus-visible { background: var(--s1-column); outline: none; }
.k-menu-item small { display: block; font-weight: 500; font-size: 12px; color: var(--s1-mute); }
.k-menu-item .k-icon { color: var(--s1-ink-2); }
.k-menu-item--late { color: var(--s1-late); } .k-menu-item--late .k-icon { color: var(--s1-late); }
.k-menu-sep { height: 1px; background: var(--s1-line-soft); margin: 4px 2px; }
.k-menu-label { padding: 8px 11px 4px; font: 700 10.5px var(--k-font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--s1-mute); }
.k-toasts { position: fixed; z-index: 600; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.k-toast { display: flex; align-items: center; gap: 10px; background: var(--s1-ink); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--k-shadow-pop); font: 600 13.5px var(--k-font-ui); animation: k-toast-in 260ms var(--k-ease); pointer-events: auto; }
.k-toast.is-out { animation: k-toast-out 200ms ease forwards; }
.k-toast .k-icon { color: #7ee2ad; }
.k-toast--late .k-icon { color: #ff9b92; }
@keyframes k-toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes k-toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal: always centered ---------- */
.k-modal-root { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px; }
.k-backdrop { position: absolute; inset: 0; background: rgb(17 19 24 / .52); backdrop-filter: blur(2px); animation: k-fade 180ms ease; }
.k-modal { position: relative; display: flex; flex-direction: column; width: min(var(--w, 640px), 100%); max-height: min(100%, 880px); background: #fff; border-radius: 16px; box-shadow: var(--k-shadow-pop); border: 1px solid var(--s1-line); animation: k-modal-in 240ms var(--k-ease); overflow: hidden; }
.k-modal--sm { --w: 460px; } .k-modal--md { --w: 640px; } .k-modal--lg { --w: 880px; } .k-modal--xl { --w: 1120px; }
.k-modal-root.is-closing .k-backdrop { animation: k-fade-out 160ms ease forwards; }
.k-modal-root.is-closing .k-modal { animation: k-modal-out 160ms ease forwards; }
@keyframes k-fade { from { opacity: 0; } } @keyframes k-fade-out { to { opacity: 0; } }
@keyframes k-modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes k-modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.k-modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--s1-line-soft); }
.k-modal-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--s1-ink); color: #fff; flex: none; }
.k-modal-icon .k-icon { width: 20px; height: 20px; vertical-align: 0; }
.k-modal-title { margin: 0; font: 800 20px/1.2 var(--k-font-display); letter-spacing: -.01em; }
.k-modal-kicker { font: 700 11px var(--k-font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--s1-mute); margin-bottom: 2px; }
.k-modal-desc { margin: 4px 0 0; color: var(--s1-mute); font-size: 13.5px; }
.k-modal-x { margin-left: auto; }
.k-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 22px; display: grid; gap: 16px; align-content: start; background: #fff; }
.k-modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 22px; border-top: 1px solid var(--s1-line-soft); background: var(--s1-panel-head); }
.k-modal-foot .k-foot-note { margin-right: auto; font-size: 12.5px; color: var(--s1-mute); display: flex; align-items: center; gap: 6px; min-width: 0; }
body.k-modal-open { overflow: hidden; }
@media (max-width: 640px) { .k-modal-root { padding: 8px; } .k-modal { border-radius: 14px; max-height: 100%; } .k-modal-head, .k-modal-body, .k-modal-foot { padding-left: 16px; padding-right: 16px; } }

/* ---------- Kanban ---------- */
.k-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(228px, 1fr); gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; align-items: start; }
.k-kcol { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--s1-column); border: 1px solid var(--s1-line-soft); border-radius: 12px; min-height: 160px; transition: background var(--k-dur), border-color var(--k-dur), box-shadow var(--k-dur); }
.k-kcol.is-over { background: #eceef3; border-color: var(--s1-ink); box-shadow: inset 0 0 0 1px var(--s1-ink); }
.k-kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font: 700 13px var(--k-font-ui); color: var(--s1-ink); }
.k-kcol-head .k-icon { color: var(--s1-ink-2); }
.k-kcol-head small { font-weight: 500; color: var(--s1-mute); }
.k-kcol-body { display: grid; gap: 8px; align-content: start; min-height: 40px; }
.k-kempty { border: 1.5px dashed var(--s1-line); border-radius: 10px; padding: 14px 10px; text-align: center; color: var(--s1-mute); font-size: 12.5px; }
.k-kcard { --edge: transparent; position: relative; display: grid; gap: 9px; padding: 12px 12px 12px 14px; background: #fff; border: 1px solid var(--s1-line); border-radius: 11px; box-shadow: var(--k-shadow-card); cursor: grab; transition: box-shadow var(--k-dur), transform var(--k-dur) var(--k-ease), border-color var(--k-dur); }
.k-kcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--edge); }
.k-kcard--late { --edge: var(--s1-late); } .k-kcard--soon { --edge: var(--s1-soon); } .k-kcard--wait { --edge: var(--s1-wait); }
.k-kcard:hover { border-color: #b9bec9; box-shadow: 0 6px 16px rgb(17 19 24 / .09); }
.k-kcard.is-dragging { opacity: .45; transform: rotate(1.2deg); cursor: grabbing; }
.k-kcard.is-landed { animation: k-land 360ms var(--k-ease); }
@keyframes k-land { 0% { transform: scale(1.04); box-shadow: 0 10px 24px rgb(17 19 24 / .18); } 100% { transform: none; } }
.k-kcard-top { display: flex; align-items: flex-start; gap: 8px; }
.k-kcard-title { flex: 1; min-width: 0; font: 650 14px/1.35 var(--k-font-ui); color: var(--s1-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-kcard-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-kcard-mv { opacity: 0; transition: opacity var(--k-dur); }
.k-kcard:hover .k-kcard-mv, .k-kcard:focus-within .k-kcard-mv { opacity: 1; }
.k-kcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (hover: none) { .k-kcard-mv { opacity: 1; } }

/* ---------- Data table ---------- */
.k-tablewrap { overflow-x: auto; }
.k-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.k-table th { position: sticky; top: 0; text-align: left; padding: 10px 14px; background: var(--s1-panel-head); border-bottom: 1px solid var(--s1-line); font: 700 11.5px var(--k-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--s1-mute); white-space: nowrap; z-index: 1; }
.k-table th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-transform: inherit; letter-spacing: inherit; }
.k-table th button:hover { color: var(--s1-ink); }
.k-table th button:focus-visible { outline: 2px solid var(--s1-ink); outline-offset: 2px; border-radius: 4px; }
.k-table th[aria-sort] { color: var(--s1-ink); }
.k-table th .k-sorti { opacity: 0; transition: opacity var(--k-dur), transform var(--k-dur); } .k-table th[aria-sort] .k-sorti { opacity: 1; } .k-table th[aria-sort="descending"] .k-sorti { transform: rotate(180deg); }
.k-table td { padding: 10px 14px; border-bottom: 1px solid var(--s1-line-soft); vertical-align: middle; background: #fff; }
.k-table tr:last-child td { border-bottom: 0; }
.k-table tbody tr { transition: background var(--k-dur); } .k-table tbody tr:hover td { background: #fafbfc; }
.k-table td.num, .k-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.k-table td .k-cell-title { font-weight: 650; color: var(--s1-ink); text-decoration: none; display: block; max-width: 38ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-table td .k-cell-title:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .k-table thead { display: none; }
  .k-table, .k-table tbody, .k-table tr, .k-table td { display: block; width: 100%; }
  .k-table tr { padding: 10px 14px; border-bottom: 1px solid var(--s1-line-soft); }
  .k-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .k-table td::before { content: attr(data-label); font: 700 11px var(--k-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--s1-mute); text-align: left; }
  .k-table td.k-cell-first { display: block; text-align: left; } .k-table td.k-cell-first::before { content: none; }
  .k-table td .k-cell-title { max-width: none; white-space: normal; }
}

/* ---------- Timeline / Gantt ---------- */
.k-gantt { --lw: 300px; --rh: 38px; --dw: 6px; position: relative; overflow: auto; max-height: 900px; background: #fff; border-radius: 0 0 12px 12px; }
.k-g-inner { position: relative; }
.k-g-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--s1-panel-head); border-bottom: 1px solid var(--s1-line); }
.k-g-corner { position: sticky; left: 0; z-index: 7; flex: none; width: var(--lw); background: var(--s1-panel-head); border-right: 1px solid var(--s1-line); padding: 8px 14px; font: 700 11.5px var(--k-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--s1-mute); display: flex; align-items: flex-end; }
.k-g-scale { position: relative; flex: none; }
.k-g-months, .k-g-weeks { position: relative; height: 22px; }
.k-g-months span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 8px; font: 700 12px var(--k-font-ui); color: var(--s1-ink); border-left: 1px solid var(--s1-line); white-space: nowrap; }
.k-g-weeks span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 5px; font: 500 10.5px var(--k-font-ui); color: var(--s1-mute); border-left: 1px solid var(--s1-line-soft); white-space: nowrap; overflow: hidden; }
.k-g-lane { display: flex; align-items: stretch; }
.k-g-lane .k-g-label { position: sticky; left: 0; z-index: 4; flex: none; width: var(--lw); background: #fff; border-right: 1px solid var(--s1-line); padding: 0 12px 0 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.k-g-lane .k-g-track { position: relative; flex: none; }
.k-g-row { height: var(--rh); border-bottom: 1px solid var(--s1-line-soft); }
.k-g-row:hover .k-g-label, .k-g-row:hover .k-g-track { background-color: #fafbfc; }
.k-g-row.is-hl .k-g-label { background: #f2f4f8; }
.k-g-group { height: 30px; background: var(--s1-column); border-bottom: 1px solid var(--s1-line-soft); }
.k-g-group .k-g-label { background: var(--s1-column); font: 700 12px var(--k-font-ui); color: var(--s1-ink-2); letter-spacing: .02em; }
.k-g-label a:not(.k-av), .k-g-label button.t { all: unset; cursor: pointer; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; color: var(--s1-ink); }
.k-g-label a:not(.k-av):hover, .k-g-label button.t:hover { text-decoration: underline; text-underline-offset: 3px; }
.k-g-label button.t:focus-visible { outline: 2px solid var(--s1-ink); outline-offset: 2px; border-radius: 4px; }
.k-g-grid { position: absolute; inset: 0; pointer-events: none; }
.k-g-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--s1-line-soft); }
.k-g-grid i.m { background: var(--s1-line); }
.k-g-bar { --c: var(--s1-ink); position: absolute; top: 9px; height: calc(var(--rh) - 18px); padding: 0; border-radius: 7px; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); overflow: hidden; cursor: pointer; transition: box-shadow var(--k-dur), opacity var(--k-dur); }
.k-g-bar > .fill { position: absolute; inset: 0 auto 0 0; background: var(--c); transition: width 500ms var(--k-ease); }
.k-g-bar.is-done { --c: #8f95a3; background: #e4e7ec; } .k-g-bar.is-done .fill { opacity: .55; }
.k-g-bar.is-late { --c: var(--s1-late); } .k-g-bar.is-wait { --c: var(--s1-wait); }
.k-g-bar.is-todo { --c: #8f95a3; border-style: dashed; background: #fff; }
.k-g-after { position: absolute; top: 0; height: var(--rh); display: flex; align-items: center; gap: 7px; font: 600 11.5px var(--k-font-ui); color: var(--s1-mute); white-space: nowrap; pointer-events: none; }
.k-g-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--s1-line-soft); }
.k-g-bar:hover, .k-g-bar:focus-visible { box-shadow: 0 4px 12px rgb(17 19 24 / .2); z-index: 3; }
.k-g-bar-av { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: flex; }
.k-g-ms { position: absolute; top: calc(var(--rh) / 2 - 10px); width: 20px; height: 20px; margin-left: -10px; background: var(--s1-ink); transform: rotate(45deg) scale(.72); border-radius: 3px; cursor: pointer; border: 0; padding: 0; transition: box-shadow var(--k-dur); }
.k-g-ms.is-late { background: var(--s1-late); } .k-g-ms.is-done { background: #8f95a3; } .k-g-ms.is-wait { background: var(--s1-wait); }
.k-g-ms:hover, .k-g-ms:focus-visible { box-shadow: 0 0 0 4px rgb(17 19 24 / .15); }
.k-g-mslabel { position: absolute; top: calc(var(--rh) / 2 - 9px); font: 650 11.5px var(--k-font-ui); color: var(--s1-ink); white-space: nowrap; pointer-events: none; }
.k-g-phase { position: absolute; top: 7px; height: 24px; border-radius: 7px; display: flex; align-items: center; padding: 0 9px; font: 700 11.5px var(--k-font-ui); overflow: hidden; white-space: nowrap; background: var(--s1-track); color: var(--s1-ink-2); }
.k-g-phase.is-done { background: #c7ccd6; } .k-g-phase.is-current { background: var(--s1-ink); color: #fff; }
.k-g-phase.is-next { background: #fff; border: 1.5px dashed #8f95a3; }
.k-g-key { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--tone, var(--s1-soon)); pointer-events: none; z-index: 2; }
.k-g-keytag { position: absolute; top: 5px; transform: translateX(-1px); display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 0 6px 6px 0; background: var(--tone, var(--s1-soon)); color: #fff; font: 700 10.5px/17px var(--k-font-ui); white-space: nowrap; z-index: 3; cursor: default; }
.k-g-keytag.flip { transform: translateX(-100%); border-radius: 6px 0 0 6px; padding: 1px 5px 1px 7px; }
.k-g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--s1-ink); z-index: 5; pointer-events: none; }
.k-g-today-tag { position: absolute; top: 3px; margin-left: -22px; padding: 0 7px; border-radius: 6px; background: var(--s1-ink); color: #fff; font: 700 10.5px/17px var(--k-font-ui); z-index: 6; }
.k-g-deps { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
.k-g-deps path { fill: none; stroke: #8f95a3; stroke-width: 1.5; transition: stroke var(--k-dur), opacity var(--k-dur), stroke-width var(--k-dur); }
.k-g-deps path.is-hl { stroke: var(--s1-ink); stroke-width: 2.25; }
.k-g-deps path.is-blocked { stroke: var(--s1-late); stroke-dasharray: 4 3; }
.k-g-deps marker path { fill: #8f95a3; stroke: none; }
.k-gantt.has-hl .k-g-bar:not(.is-hl), .k-gantt.has-hl .k-g-ms:not(.is-hl) { opacity: .35; }
.k-gantt.has-hl .k-g-deps path:not(.is-hl) { opacity: .2; }
.k-g-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 9px 16px; border-top: 1px solid var(--s1-line-soft); font-size: 12px; color: var(--s1-mute); background: var(--s1-panel-head); border-radius: 0 0 12px 12px; }
.k-g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.k-g-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; border: 1.5px solid var(--s1-ink); background: #fff; }
.k-g-legend i.f { background: var(--s1-ink); } .k-g-legend i.l { border-color: var(--s1-late); background: var(--s1-late); } .k-g-legend i.w { border-color: var(--s1-wait); background: var(--s1-wait); } .k-g-legend i.d { border-color: #8f95a3; background: #d9dce2; } .k-g-legend i.t { border-style: dashed; border-color: #8f95a3; }
.k-g-legend i.m { width: 9px; height: 9px; transform: rotate(45deg); background: var(--s1-ink); border-radius: 2px; border: 0; }
.k-g-legend i.a { width: 22px; height: 0; border: 0; border-top: 1.5px solid #8f95a3; border-radius: 0; }
@media (max-width: 760px) { .k-gantt { --lw: 150px; } .k-g-label .k-avs { display: none; } .k-g-group .k-g-label .k-xs { display: none; } }

/* ---------- Stepper, pipeline ---------- */
.k-pipe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.k-pipe > li { position: relative; display: grid; align-content: start; justify-items: center; gap: 6px; text-align: center; padding: 0 6px; min-width: 0; }
.k-pipe > li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--s1-track); z-index: 0; transition: background 400ms var(--k-ease); }
.k-pipe > li:first-child::before { content: none; }
.k-pipe > li.is-done::before, .k-pipe > li.is-current::before { background: var(--s1-ink); }
.k-pipe-node { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--s1-track); color: var(--s1-mute); transition: all 300ms var(--k-ease); }
.k-pipe-node .k-icon { width: 17px; height: 17px; vertical-align: 0; }
.k-pipe > li.is-done .k-pipe-node { background: var(--s1-ink); border-color: var(--s1-ink); color: #fff; }
.k-pipe > li.is-current .k-pipe-node { border-color: var(--s1-ink); color: var(--s1-ink); box-shadow: 0 0 0 4px rgb(17 19 24 / .1); }
.k-pipe > li.is-changes .k-pipe-node { border-color: var(--s1-late); color: var(--s1-late); box-shadow: 0 0 0 4px rgb(194 38 29 / .12); }
.k-pipe > li.is-wait .k-pipe-node { border-color: var(--s1-wait); color: var(--s1-wait); box-shadow: 0 0 0 4px rgb(53 87 214 / .12); }
.k-pipe > li.is-live .k-pipe-node { background: var(--s1-ok); border-color: var(--s1-ok); color: #fff; }
.k-pipe-label { font: 700 13px var(--k-font-ui); color: var(--s1-ink); }
.k-pipe > li:not(.is-done):not(.is-current):not(.is-live):not(.is-changes):not(.is-wait) .k-pipe-label { color: var(--s1-mute); font-weight: 600; }
.k-pipe-who { font-size: 12px; color: var(--s1-mute); display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; }
.k-pipe-who a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; } .k-pipe-who a:hover { color: var(--s1-ink); text-decoration: underline; }
@media (max-width: 760px) {
  .k-pipe { grid-auto-flow: row; gap: 14px; }
  .k-pipe > li { grid-template-columns: 36px 1fr; justify-items: start; text-align: left; column-gap: 12px; align-items: center; padding: 0; }
  .k-pipe > li::before { top: -14px; left: 17px; width: 3px; height: 14px; }
  .k-pipe-node { grid-row: span 2; }
}

/* ---------- Checklist, expiry, feed, empty ---------- */
.k-checks { display: grid; margin: 0; padding: 0; list-style: none; }
.k-checks > li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--s1-line-soft); }
.k-checks > li:first-child { border-top: 0; }
.k-cmark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--s1-line); color: var(--s1-mute); background: #fff; }
.k-cmark .k-icon { width: 13px; height: 13px; vertical-align: 0; stroke-width: 3; }
.k-checks .is-done .k-cmark { background: var(--s1-ink); border-color: var(--s1-ink); color: #fff; }
.k-checks .is-missing .k-cmark { border-color: var(--s1-late); color: var(--s1-late); background: color-mix(in srgb, var(--s1-late) 8%, #fff); }
.k-checks .is-warn .k-cmark { border-color: var(--s1-soon); color: var(--s1-soon); background: color-mix(in srgb, var(--s1-soon) 9%, #fff); }
.k-checks .is-wait .k-cmark { border-color: var(--s1-wait); color: var(--s1-wait); background: color-mix(in srgb, var(--s1-wait) 8%, #fff); }
.k-ctitle { font-weight: 650; } .k-cdetail { font-size: 12.5px; color: var(--s1-mute); display: block; font-weight: 400; margin-top: 1px; }
.k-checks .is-done .k-ctitle { color: var(--s1-ink-2); font-weight: 600; }
.k-feed { display: grid; margin: 0; padding: 0; list-style: none; position: relative; }
.k-feed > li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 10px 16px; align-items: start; border-top: 1px solid var(--s1-line-soft); }
.k-feed > li:first-child { border-top: 0; }
.k-feed > li.is-new-entry { animation: k-row-in 380ms var(--k-ease); }
.k-feed-line { font-size: 13.5px; color: var(--s1-ink-2); }
.k-feed-line b { color: var(--s1-ink); font-weight: 650; }
.k-feed-line a { color: var(--s1-ink); font-weight: 650; text-underline-offset: 3px; }
.k-feed-time { font-size: 12px; color: var(--s1-mute); white-space: nowrap; padding-top: 2px; }
.k-empty { display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--s1-line); border-radius: 10px; padding: 14px 16px; color: var(--s1-ink-2); background: #fff; }
.k-empty .k-icon { color: var(--s1-mute); width: 20px; height: 20px; }
.k-callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--s1-line); border-left: 4px solid var(--tone, var(--s1-ink)); border-radius: 10px; background: #fff; }
.k-callout > .k-icon { color: var(--tone, var(--s1-ink)); width: 20px; height: 20px; margin-top: 1px; }
.k-callout b { display: block; } .k-callout span { color: var(--s1-ink-2); font-size: 13.5px; }

/* ---------- Forms ---------- */
.k-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.k-label { font: 650 13px var(--k-font-ui); color: var(--s1-ink-2); display: flex; align-items: center; gap: 6px; }
.k-label .req { color: var(--s1-late); }
.k-hint { font-size: 12.5px; color: var(--s1-mute); }
.k-err { font: 650 12.5px var(--k-font-ui); color: var(--s1-late); display: flex; align-items: center; gap: 5px; }
.k-input, .k-select, .k-textarea { width: 100%; min-width: 0; border: 1px solid var(--s1-line); border-radius: 9px; background: #fff; padding: 9px 12px; font: 14px/1.4 var(--k-font-ui); color: var(--s1-ink); transition: border-color var(--k-dur), box-shadow var(--k-dur); }
.k-input:hover, .k-select:hover, .k-textarea:hover { border-color: #b9bec9; }
.k-input:focus, .k-select:focus, .k-textarea:focus { outline: none; border-color: var(--s1-ink); box-shadow: 0 0 0 3px rgb(17 19 24 / .1); }
.k-input.is-invalid { border-color: var(--s1-late); box-shadow: 0 0 0 3px rgb(194 38 29 / .1); }
.k-textarea { resize: vertical; min-height: 84px; }
.k-select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%23111318' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.k-input--lg { font-size: 17px; font-weight: 650; padding: 11px 14px; font-family: var(--k-font-display); }
.k-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.k-form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .k-form-grid { grid-template-columns: minmax(0, 1fr); } }
.k-fsec { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--s1-line-soft); border-radius: 12px; background: #fff; }
.k-fsec-head { display: flex; align-items: center; gap: 9px; font: 700 14px var(--k-font-display); }
.k-fsec-head .k-icon { color: var(--s1-ink-2); }
.k-fsec-head small { font: 500 12.5px var(--k-font-ui); color: var(--s1-mute); margin-left: auto; }
.k-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; cursor: pointer; }
.k-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.k-switch .tr { grid-row: span 2; position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--s1-checkbox); transition: background var(--k-dur); }
.k-switch .tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform 200ms var(--k-ease); }
.k-switch input:checked + .tr { background: var(--s1-ink); } .k-switch input:checked + .tr::after { transform: translateX(16px); }
.k-switch input:focus-visible + .tr { outline: 2px solid var(--s1-ink); outline-offset: 2px; }
.k-switch .t { font-weight: 650; font-size: 14px; } .k-switch .d { font-size: 12.5px; color: var(--s1-mute); grid-column: 2; }
.k-switch.no-desc { align-items: center; } .k-switch.no-desc .tr { grid-row: auto; }
.k-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.k-opt { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--s1-line); border-radius: 10px; cursor: pointer; background: #fff; transition: border-color var(--k-dur), background var(--k-dur); }
.k-opt:hover { border-color: #8f95a3; }
.k-opt input { position: absolute; opacity: 0; }
.k-opt:has(input:checked) { border-color: var(--s1-ink); background: var(--s1-panel-head); box-shadow: inset 0 0 0 1px var(--s1-ink); }
.k-opt:has(input:focus-visible) { outline: 2px solid var(--s1-ink); outline-offset: 2px; }
.k-opt b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; } .k-opt span { font-size: 12.5px; color: var(--s1-mute); }
.k-picker { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; min-height: 44px; border: 1px solid var(--s1-line); border-radius: 9px; background: #fff; transition: border-color var(--k-dur), box-shadow var(--k-dur); }
.k-picker:focus-within { border-color: var(--s1-ink); box-shadow: 0 0 0 3px rgb(17 19 24 / .1); }
.k-pick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 3px; border: 1px solid var(--s1-line); border-radius: 999px; background: var(--s1-column); font: 600 12.5px var(--k-font-ui); animation: k-pop 220ms var(--k-ease); max-width: 100%; }
.k-pick-chip .x { all: unset; cursor: pointer; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--s1-mute); } .k-pick-chip .x:hover { background: var(--s1-line); color: var(--s1-ink); }
.k-pick-chip.is-owner { background: var(--s1-ink); color: #fff; border-color: var(--s1-ink); } .k-pick-chip.is-owner .x { color: #ccc; }
.k-pick-add { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #8f95a3; color: var(--s1-ink-2); font: 600 12.5px var(--k-font-ui); } .k-pick-add:hover { border-color: var(--s1-ink); color: var(--s1-ink); background: var(--s1-column); }
.k-pick-add
.k-pick-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: min(340px, 100%); min-width: 260px; background: #fff; border: 1px solid var(--s1-line); border-radius: 12px; box-shadow: var(--k-shadow-pop); padding: 6px; animation: k-menu-in 140ms var(--k-ease); }
.k-pick-pop input { width: 100%; border: 1px solid var(--s1-line); border-radius: 8px; padding: 8px 10px; font: 13.5px var(--k-font-ui); margin-bottom: 4px; } .k-pick-pop input:focus { outline: none; border-color: var(--s1-ink); }
.k-pick-list { max-height: 220px; overflow: auto; display: grid; }
.k-pick-opt { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; border: 0; background: none; text-align: left; cursor: pointer; font: 600 13px var(--k-font-ui); color: var(--s1-ink); }
.k-pick-opt:hover, .k-pick-opt:focus-visible, .k-pick-opt.is-active { background: var(--s1-column); outline: none; } .k-pick-opt small { display: block; color: var(--s1-mute); font-weight: 500; font-size: 12px; }
.k-pick-opt .k-icon.chk { margin-left: auto; opacity: 0; } .k-pick-opt[aria-selected="true"] .k-icon.chk { opacity: 1; }
.k-drop { display: grid; justify-items: center; gap: 4px; padding: 18px; border: 1.5px dashed #aab0bd; border-radius: 12px; text-align: center; color: var(--s1-ink-2); background: var(--s1-column); cursor: pointer; transition: all var(--k-dur); }
.k-drop:hover, .k-drop.is-over { border-color: var(--s1-ink); background: #eceef3; }
.k-link-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--s1-line); border-radius: 10px; background: #fff; animation: k-row-in 260ms var(--k-ease); }
.k-link-row a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k-link-row a:hover { text-decoration: underline; }
.k-link-row small { color: var(--s1-mute); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-two { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .k-two { grid-template-columns: minmax(0, 1fr); } }
.k-aside-sticky { position: sticky; top: 0; display: grid; gap: 14px; }

/* ---------- Publication, website preview ---------- */
.k-web { border: 1px solid var(--s1-line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--k-shadow-card); }
.k-web-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #eceef3; border-bottom: 1px solid var(--s1-line); font-size: 11.5px; color: var(--s1-mute); }
.k-web-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c5c9d2; }
.k-web-url { margin-left: 8px; flex: 1; background: #fff; border-radius: 6px; padding: 2px 10px; border: 1px solid var(--s1-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.k-web-body { padding: 20px 22px; display: grid; gap: 10px; font-family: Georgia, "Times New Roman", serif; }
.k-web-kicker { font: 700 11px var(--k-font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--s1-maroon); }
.k-web-title { margin: 0; font: 700 21px/1.25 Georgia, "Times New Roman", serif; color: #1b1b1f; }
.k-web-by { font: 500 13.5px var(--k-font-ui); color: #4a4f5c; }
.k-web-abs { margin: 0; font-size: 14.5px; line-height: 1.55; color: #2a2d36; }
.k-web-tags { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--k-font-ui); }
.k-web-tags span { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: #f1ece9; color: #6b2a3a; font-weight: 600; }
.k-web-cta { display: flex; gap: 8px; font-family: var(--k-font-ui); } .k-web-cta span { font: 650 12.5px var(--k-font-ui); padding: 5px 12px; border-radius: 6px; border: 1px solid #c8b8b2; color: #6b2a3a; }
.k-web.is-draft .k-web-body { opacity: .85; }
.k-web-state { position: absolute; top: 40px; right: 12px; }
.k-ready { display: grid; gap: 6px; }
.k-ready-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.k-ready-item .k-icon { width: 15px; height: 15px; }
.k-ready-item.ok .k-icon { color: var(--s1-ok); } .k-ready-item.no { color: var(--s1-ink); } .k-ready-item.no .k-icon { color: var(--s1-late); }

/* ---------- Settings patterns ---------- */
.k-set { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.k-set-nav { position: sticky; top: calc(var(--k-top) + 16px); display: grid; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--s1-line); border-radius: 12px; }
.k-set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--s1-ink-2); font-weight: 600; font-size: 14px; }
.k-set-nav a:hover { background: var(--s1-column); } .k-set-nav a[aria-current="true"] { background: var(--s1-ink); color: #fff; }
.k-set-nav .k-nav-label { color: var(--s1-mute); padding: 12px 12px 4px; }
.k-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--s1-line-soft); }
.k-setting:first-child { border-top: 0; }
.k-setting-t { font-weight: 650; } .k-setting-d { grid-column: 1; font-size: 13px; color: var(--s1-mute); max-width: 70ch; }
.k-setting > .ctl { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
@media (max-width: 1000px) { .k-set { grid-template-columns: minmax(0, 1fr); } .k-set-nav { position: static; display: flex; overflow-x: auto; } }
@media (max-width: 640px) { .k-setting { grid-template-columns: minmax(0, 1fr); } .k-setting > .ctl { grid-column: 1; grid-row: auto; justify-content: flex-start; } }

/* ---------- Palette ---------- */
.k-pal-input { width: 100%; border: 0; border-bottom: 1px solid var(--s1-line); padding: 16px 22px; font: 500 16px var(--k-font-ui); outline: none; }
.k-pal-list { max-height: 360px; overflow: auto; padding: 8px; display: grid; }
.k-pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; text-align: left; font: 600 14px var(--k-font-ui); color: var(--s1-ink); text-decoration: none; }
.k-pal-item.is-active, .k-pal-item:hover { background: var(--s1-column); }
.k-pal-item small { color: var(--s1-mute); font-weight: 500; margin-left: auto; font-size: 12px; }
.k-pal-group { padding: 8px 12px 4px; font: 700 10.5px var(--k-font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--s1-mute); }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.k-tag-in::-webkit-calendar-picker-indicator { display: none !important; }

.k-head-mark { flex: none; align-self: flex-start; margin-top: 4px; }
@media (max-width: 640px) { .k-head-mark { display: none; } }
.k-pms > .k-avs-more { margin-left: 0; }
.k-head-row > .k-grow { flex: 1 1 320px; min-width: 0; }

/* ---------- S1 dialog skin: RWTProjectDialogs and the other native S1 dialogs, centered at every width ----------
   The dialogs keep their own markup (form, fields, aside preview); this block gives them the kit modal look.
   Higher specificity than s1-project.css on purpose (.s1-dialog-shade prefix), loaded after it. */
.s1-dialog-shade.k-modal-root { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px; overflow: hidden; background: none; animation: none; }
.s1-dialog-shade > .s1-dialog.k-modal { position: relative; inset: auto; flex: none; width: min(var(--w, 640px), 100%); max-width: 100%; max-height: min(100%, 880px); margin: 0; padding: 0; background: #fff; border: 1px solid var(--s1-line); border-radius: 16px; box-shadow: var(--k-shadow-pop); animation: k-modal-in 200ms var(--k-ease) both; }
.s1-dialog-shade > .s1-dialog.k-modal.s1-dialog--wide { width: min(var(--w, 1120px), 100%); max-height: min(100%, 880px); box-shadow: var(--k-shadow-pop); animation: k-modal-in 200ms var(--k-ease) both; }
.s1-dialog-shade .k-modal-head.s1-dialog-head { flex: none; display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px 14px; background: #fff; border-bottom: 1px solid var(--s1-line-soft); }
.s1-dialog-shade .k-modal-head h2.s1-panel-head.k-modal-title { margin: 0; padding: 0; border: 0; background: none; font: 800 20px/1.2 var(--k-font-display); letter-spacing: -.01em; }
.s1-dialog-shade .k-modal-head .k-modal-desc { margin: 4px 0 0; font-size: 13.5px; font-weight: 400; color: var(--s1-mute); }
.s1-dialog-shade .k-modal-head .k-modal-kicker { display: block; margin-bottom: 2px; }
.s1-dialog-shade .s1-dialog-body.k-modal-body { padding: 18px 22px; gap: 14px; background: #fff; }
.s1-dialog-shade .s1-dialog-body--split.k-modal-body { background: var(--s1-canvas); gap: 18px; }
.s1-dialog-shade .s1-dialog-foot.k-modal-foot { padding: 12px 22px; background: var(--s1-panel-head); border-top: 1px solid var(--s1-line-soft); gap: 8px; align-items: center; }
.s1-dialog-shade .s1-project-dialog-error { padding: 10px 22px 0; }
.s1-dialog-shade .s1-dialog-aside { gap: 14px; }
.s1-dialog-shade .k-backdrop { z-index: 0; }
.s1-dialog-shade > .s1-dialog { z-index: 1; }
/* The native-<dialog> S1 dialogs (Command Center access) get the same shape when shown modally. */
dialog.s1-dialog:not(.k-modal) { border-radius: 16px; box-shadow: var(--k-shadow-pop); }
dialog.s1-dialog:not(.k-modal)::backdrop { background: rgb(17 19 24 / .52); backdrop-filter: blur(2px); }
@media (max-width: 640px) {
  .s1-dialog-shade.k-modal-root { padding: 8px; }
  .s1-dialog-shade > .s1-dialog.k-modal, .s1-dialog-shade > .s1-dialog.k-modal.s1-dialog--wide { width: 100%; border-radius: 14px; max-height: 100%; }
  .s1-dialog-shade .k-modal-head.s1-dialog-head { padding: 14px 16px 12px; }
  .s1-dialog-shade .s1-dialog-body.k-modal-body { padding: 14px 16px; }
  .s1-dialog-shade .s1-dialog-foot.k-modal-foot { padding: 10px 16px; }
  .s1-dialog-shade .k-modal-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) { .s1-dialog-shade > .s1-dialog.k-modal { animation: none; } }

/* ---------- Calendar (Kit.calendar, ui-v2/s1-kit-views.js) ----------
   Month grid with bordered day cells, spanning event bars, week columns and a day-grouped agenda. Color by kind is desaturated
   and never reuses the status hues; red is only ever overdue. Today is an ink ring and an ink date disc. */
.k-cal { --kc-num: 32px; --kc-lane: 25px; position: relative; display: grid; gap: 14px; min-width: 0; font-family: var(--k-font-ui); color: var(--s1-ink); }
.k-cal, .k-cal * { box-sizing: border-box; }
.k-cal :focus-visible { outline: 2px solid var(--s1-ink); outline-offset: 2px; }
.k-cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.k-cal-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
.k-cal-title { margin: 0; font: 800 26px/1.1 var(--k-font-display); letter-spacing: -.02em; min-width: 8.5ch; }
.k-cal-step { display: inline-flex; align-items: center; gap: 6px; }
.k-cal-btn.k-iconbtn { width: 34px; height: 34px; border-radius: 9px; }
.k-cal-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.k-cal-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.k-cal-stage { min-width: 0; }

.k-cal-k--key { --kc: #111318; } .k-cal-k--task { --kc: #5c6878; } .k-cal-k--meeting { --kc: #6a4fa3; }
.k-cal-k--irb { --kc: #12787f; } .k-cal-k--deadline { --kc: #2f3440; } .k-cal-k--conference { --kc: #8a6236; } .k-cal-k--other { --kc: #6b7180; }
.k-cal-k--deadline.k-cal-ev, .k-cal-k--deadline.k-cal-card { border-left-style: double; border-left-width: 4px; }
.is-late.k-cal-ev, .is-late.k-cal-card, .k-cal-dots i.is-late { --kc: var(--s1-late); }

.k-cal-grid { border: 1px solid var(--s1-line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--k-shadow-card); }
.k-cal-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--s1-panel-head); border-bottom: 1px solid var(--s1-line); }
.k-cal-dow span { padding: 9px 10px; font: 700 11.5px/1.2 var(--k-font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--s1-mute); border-right: 1px solid var(--s1-line-soft); }
.k-cal-dow span:last-child { border-right: 0; }
.k-cal-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 112px; }
.k-cal-week + .k-cal-week { border-top: 1px solid var(--s1-line); }
.k-cal-cell { position: relative; min-width: 0; padding: 5px 7px; background: #fff; border-right: 1px solid var(--s1-line); cursor: pointer; outline-offset: -3px; transition: background var(--k-dur); }
.k-cal-cell:nth-child(7) { border-right: 0; }
.k-cal-cell.is-wknd { background: #f9fafb; }
.k-cal-cell.is-out { background: var(--s1-column); color: var(--s1-mute); }
.k-cal-cell.is-out .k-cal-num { opacity: .6; }
.k-cal-cell:hover { background: var(--s1-panel-head); }
.k-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--s1-ink); z-index: 1; }
.k-cal-num { display: inline-flex; align-items: center; height: 26px; font: 650 13px/1 var(--k-font-ui); font-variant-numeric: tabular-nums; }
.k-cal-num time { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; }
.k-cal-cell.is-today .k-cal-num time { background: var(--s1-ink); color: #fff; font-weight: 750; }
.k-cal-plus { position: absolute; top: 4px; right: 5px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--s1-line); border-radius: 7px; background: #fff; color: var(--s1-ink); cursor: pointer; opacity: 0; transition: opacity var(--k-dur); }
.k-cal-cell:hover .k-cal-plus, .k-cal-cell:focus-within .k-cal-plus, .k-cal-plus:focus-visible { opacity: 1; }
@media (hover: none) { .k-cal-plus { display: none; } }
.k-cal-ev { z-index: 2; align-self: start; display: flex; align-items: center; gap: 5px; height: 22px; margin: 0 4px 3px; padding: 0 7px 0 6px; border: 0; border-left: 3px solid var(--kc); border-radius: 5px; background: color-mix(in srgb, var(--kc) 11%, #fff); color: var(--s1-ink); font: 600 12px/1 var(--k-font-ui); text-align: left; cursor: pointer; min-width: 0; overflow: hidden; transition: background var(--k-dur), box-shadow var(--k-dur); }
.k-cal-ev:hover { background: color-mix(in srgb, var(--kc) 20%, #fff); }
.k-cal-ev.is-cl { margin-left: 0; border-left-width: 0; border-radius: 0 5px 5px 0; padding-left: 8px; }
.k-cal-ev.is-cr { margin-right: 0; border-radius: 5px 0 0 5px; }
.k-cal-ev.is-cl.is-cr { border-radius: 0; }
.k-cal-ev-i { display: inline-grid; flex: none; color: var(--kc); }
.k-cal-ev-i svg { width: 12px; height: 12px; }
.k-cal-ev-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.k-cal-ev-t b { font-weight: 700; color: var(--s1-ink-2); }
.k-cal-ev.is-late { background: color-mix(in srgb, var(--s1-late) 11%, #fff); color: var(--s1-late); }
.k-cal-ev.is-done, .k-cal-card.is-done { opacity: .62; }
.k-cal-ev.is-done .k-cal-ev-t, .k-cal-card.is-done .k-cal-link { text-decoration: line-through; }
.k-cal-more { z-index: 2; align-self: start; justify-self: start; margin: 0 4px; padding: 3px 6px; border: 0; border-radius: 5px; background: none; color: var(--s1-ink-2); font: 650 11.5px/1.2 var(--k-font-ui); cursor: pointer; }
.k-cal-more:hover { background: var(--s1-column); color: var(--s1-ink); }
.k-cal-dots { position: absolute; left: 0; right: 0; bottom: 7px; display: flex; justify-content: center; gap: 3px; }
.k-cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--kc); }
.k-cal-grid.is-compact .k-cal-week { min-height: 56px; grid-template-rows: none !important; }
.k-cal-grid.is-compact .k-cal-cell { padding: 3px 2px; text-align: center; }
.k-cal-grid.is-compact .k-cal-dow span { padding: 7px 0; text-align: center; letter-spacing: 0; }

.k-cal-card { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border-left: 3px solid var(--kc); border-radius: 8px; background: color-mix(in srgb, var(--kc) 8%, #fff); min-width: 0; }
.k-cal-card-i { display: inline-grid; flex: none; margin-top: 1px; color: var(--kc); }
.k-cal-card-b { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 10px; }
.k-cal-card-b small { flex: 1 0 100%; order: 3; color: var(--s1-mute); font: 500 12px/1.4 var(--k-font-ui); }
.k-cal-card.is-late .k-cal-card-b small { color: var(--s1-late); font-weight: 650; }
.k-cal-link { padding: 0; border: 0; background: none; color: var(--s1-ink); font: 650 13.5px/1.35 var(--k-font-ui); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.k-cal-link:hover { text-decoration: underline; }
.k-cal-act { margin-left: auto; order: 2; display: inline-flex; gap: 8px; align-items: baseline; }
.k-cal-none { margin: 0; padding: 6px 2px; color: var(--s1-mute); font-size: 12.5px; }
.k-cal-todaytag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--s1-ink); color: #fff; font: 700 10.5px/1.6 var(--k-font-ui); letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }

.k-cal-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--s1-line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--k-shadow-card); }
.k-cal-wkday { display: flex; flex-direction: column; min-width: 0; min-height: 280px; border-right: 1px solid var(--s1-line); }
.k-cal-wkday:last-child { border-right: 0; }
.k-cal-wkday.is-wknd { background: #f9fafb; }
.k-cal-wkday > header { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 8px 6px; border-bottom: 1px solid var(--s1-line-soft); background: var(--s1-panel-head); }
.k-cal-wkhead { display: inline-flex; align-items: center; gap: 7px; padding: 2px 4px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: 700 11.5px/1 var(--k-font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--s1-mute); }
.k-cal-wkhead b { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; font: 750 15px/1 var(--k-font-ui); letter-spacing: 0; color: var(--s1-ink); }
.k-cal-wkday.is-today { box-shadow: inset 0 0 0 2px var(--s1-ink); }
.k-cal-wkday.is-today .k-cal-wkhead b { background: var(--s1-ink); color: #fff; }
.k-cal-wkadd.k-iconbtn { width: 28px; height: 28px; border-radius: 8px; }
.k-cal-wkbody { display: grid; gap: 8px; align-content: start; padding: 8px; }
.k-cal-wkbody .k-cal-none { text-align: center; padding: 14px 2px; }
.k-cal.is-narrow .k-cal-wk { grid-template-columns: minmax(0, 1fr); }
.k-cal.is-narrow .k-cal-wkday { min-height: 0; border-right: 0; border-bottom: 1px solid var(--s1-line); flex-direction: row; }
.k-cal.is-narrow .k-cal-wkday:last-child { border-bottom: 0; }
.k-cal.is-narrow .k-cal-wkday > header { flex: 0 0 96px; flex-direction: column; justify-content: flex-start; border-bottom: 0; border-right: 1px solid var(--s1-line-soft); padding: 10px 6px; }
.k-cal.is-narrow .k-cal-wkbody { flex: 1 1 auto; min-width: 0; }
.k-cal.is-narrow .k-cal-wkbody .k-cal-none { text-align: left; padding: 6px 2px; }

.k-cal-ag { display: grid; border: 1px solid var(--s1-line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--k-shadow-card); }
.k-cal-agday { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 4px 14px; padding: 12px 16px; border-top: 1px solid var(--s1-line-soft); }
.k-cal-agday:first-child { border-top: 0; }
.k-cal-agday > header { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 2px; }
.k-cal-agday .k-cal-todaytag { margin: 2px 0 0; }
.k-cal-agdow { font: 700 11.5px/1 var(--k-font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--s1-mute); }
.k-cal-agnum { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; font: 800 18px/1 var(--k-font-display); font-variant-numeric: tabular-nums; }
.k-cal-agday.is-today { background: var(--s1-panel-head); box-shadow: inset 3px 0 0 var(--s1-ink); }
.k-cal-agday.is-today .k-cal-agnum { background: var(--s1-ink); color: #fff; }
.k-cal-agbody { display: grid; gap: 8px; min-width: 0; }
.k-cal-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; border: 1px dashed var(--s1-line); border-radius: 12px; background: #fff; color: var(--s1-mute); text-align: center; }
.k-cal-empty p { margin: 0; }

.k-cal-pop { position: absolute; z-index: 30; display: flex; flex-direction: column; max-height: 420px; background: #fff; border: 1px solid var(--s1-line); border-radius: 12px; box-shadow: var(--k-shadow-pop); }
.k-cal-pop > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 8px 10px 14px; border-bottom: 1px solid var(--s1-line-soft); }
.k-cal-pop > header b { font: 750 14.5px/1.3 var(--k-font-display); }
.k-cal-pop > header small { display: block; margin-top: 2px; color: var(--s1-mute); font: 500 12px/1.3 var(--k-font-ui); }
.k-cal-x.k-iconbtn { width: 30px; height: 30px; border-radius: 8px; border-color: transparent; }
.k-cal-popbody { display: grid; gap: 8px; align-content: start; padding: 10px; overflow: auto; min-height: 0; }
.k-cal-pop > footer { padding: 10px 12px; border-top: 1px solid var(--s1-line-soft); }
.k-cal-pop.is-sheet { position: fixed; z-index: 450; left: 0; right: 0; bottom: 0; top: auto; width: auto !important; max-height: 72vh; border-radius: 16px 16px 0 0; border-bottom: 0; }

@media (max-width: 760px) { .k-cal-title { font-size: 22px; } }

/* ---------- editors that build their own forms inside a Kit dialog (app.js modal() in S1) ---------- */
.k-toast-undo { margin-left: 6px; border: 0; background: transparent; color: #fff; font: 700 13.5px var(--k-font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.k-toast-undo:hover { background: rgb(255 255 255 / .14); }
.k-toast-undo:disabled { opacity: .6; cursor: default; }
.k-toast--late { background: var(--s1-ink); }
.s1-legacy-form { display: grid; gap: 14px; min-width: 0; font: 14px/1.45 var(--k-font-ui); color: var(--s1-ink); }
.s1-legacy-form label { display: grid; gap: 6px; min-width: 0; font: 650 13px var(--k-font-ui); color: var(--s1-ink-2); }
.s1-legacy-form input:not([type=checkbox]):not([type=radio]), .s1-legacy-form select, .s1-legacy-form textarea { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--s1-line); border-radius: 9px; background: #fff; padding: 9px 12px; font: 14px/1.4 var(--k-font-ui); color: var(--s1-ink); }
.s1-legacy-form input:focus, .s1-legacy-form select:focus, .s1-legacy-form textarea:focus { outline: none; border-color: var(--s1-ink); box-shadow: 0 0 0 3px rgb(17 19 24 / .1); }
.s1-legacy-form input:disabled, .s1-legacy-form select:disabled { background: var(--s1-canvas); color: var(--s1-mute); }
.s1-legacy-form .s1lf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s1-legacy-form .s1lf-form-grid .s1lf-wide { grid-column: 1 / -1; }
.s1-legacy-form fieldset.s1lf-team-person-results { margin: 0; padding: 0; border: 0; min-width: 0; }
.s1-legacy-form fieldset.s1lf-team-person-results legend { padding: 0 0 6px; font: 650 13px var(--k-font-ui); color: var(--s1-ink-2); }
.s1-legacy-form #team-person-results { max-height: 240px; overflow-y: auto; border: 1px solid var(--s1-line); border-radius: 10px; }
.s1-legacy-form label.s1lf-team-person-choice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--s1-line-soft); cursor: pointer; font-weight: 400; }
.s1-legacy-form label.s1lf-team-person-choice:has(input:checked) { background: var(--s1-column); }
.s1-legacy-form .s1lf-team-person-choice span { min-width: 0; }
.s1-legacy-form .s1lf-team-person-choice strong, .s1-legacy-form .s1lf-team-person-choice small { display: block; overflow-wrap: anywhere; }
.s1-legacy-form .s1lf-team-person-choice small { margin-top: 3px; color: var(--s1-mute); font-weight: 400; }
.s1-legacy-form .s1lf-modal-note, .s1-legacy-form .s1lf-empty { margin: 0; padding: 10px 12px; border: 1px solid var(--s1-line); border-radius: 10px; background: var(--s1-canvas); color: var(--s1-ink-2); font-size: 13px; line-height: 1.5; }
.s1-legacy-form .s1lf-explainer-iframe { width: 100%; min-height: 60vh; border: 1px solid var(--s1-line); border-radius: 10px; background: #fff; }
.s1-legacy-form .s1lf-phase-editor-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 520px) { .s1-legacy-form .s1lf-phase-editor-row { grid-template-columns: minmax(0, 1fr) auto auto auto; } .s1-legacy-form .s1lf-phase-editor-row > select { grid-column: 1 / -1; grid-row: 2; } }
.s1-legacy-form .s1lf-phase-editor-row button { border: 1px solid var(--s1-line); background: #fff; border-radius: 9px; min-width: 36px; height: 36px; cursor: pointer; color: var(--s1-ink); }
.s1-legacy-form .s1lf-credit-fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--s1-line); border-radius: 12px; background: var(--s1-canvas); }
.s1-legacy-form .s1lf-credit-fieldset legend { padding: 0 4px; font: 700 14px var(--k-font-ui); color: var(--s1-ink); }
.s1-legacy-form .s1lf-credit-fieldset > p { margin: 0; color: var(--s1-mute); font-size: 13px; }
.s1-legacy-form .s1lf-credit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.s1-legacy-form label.s1lf-credit-choice { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--s1-line); border-radius: 10px; background: #fff; font-weight: 600; }
.s1-legacy-form .s1lf-contribution-editor, .s1-legacy-form .s1lf-meeting-detail { display: grid; gap: 14px; }
.s1-legacy-form .s1lf-meeting-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.s1-legacy-form .s1lf-meeting-date-large { font: 700 18px var(--k-font-display); }
.s1-legacy-form .s1lf-status-pill { display: inline-flex; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--s1-line); font-size: 12px; font-weight: 650; }
.s1-legacy-form .s1lf-kicker { margin: 0; font: 650 12px var(--k-font-ui); color: var(--s1-mute); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 520px) { .s1-legacy-form .s1lf-form-grid, .s1-legacy-form .s1lf-credit-grid { grid-template-columns: 1fr; } }

/* Phone: website preview and side-by-side columns never push past the viewport. */
.k-two > *, .k-stack > * { min-width: 0; }
.k-web { max-width: 100%; min-width: 0; }
.k-web-body { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .k-web-body { padding: 16px; }
  /* 16px stops iOS from zooming the page when a field is focused. */
  .k-input, .k-select, .k-textarea, .k-tag-in, .k-modal-root :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  .k-input, .k-select { min-height: 44px; }
  /* A grid stack sizes its implicit column to the widest child (a file input), pushing text past the card edge. */
  .k-stack, .k-stack-sm { grid-template-columns: minmax(0, 1fr); }
  .k-modal-body input[type=file] { max-width: 100%; }
}
