/* kep7 look: calm and quiet, like a well-kept notebook. Dark-grey text on white, a light grey sidebar, thin soft
   borders, grey hover highlights. The logo's colours (owner, 3 Nov 2026): navy for actions and headings, green as a
   sparing highlight (success, "live"), never for body text. */
:root {
    --k-text: #37352f;
    --k-muted: rgba(55, 53, 47, 0.72);
    --k-faint: rgba(55, 53, 47, 0.5);
    --k-bg: #ffffff;
    --k-sidebar: #f7f7f5;
    --k-hover: rgba(55, 53, 47, 0.06);
    --k-active: rgba(55, 53, 47, 0.1);
    --k-border: rgba(55, 53, 47, 0.16);
    --k-border-soft: rgba(55, 53, 47, 0.09);
    --k-navy: #00114d;          /* the logo's navy: 17.7:1 on white */
    --k-green: #10850b;         /* the logo's green: 4.6:1 on white, for highlights and large text only */
    --k-accent: var(--k-navy);
    --k-accent-dark: #1a2f7a;   /* hover: a touch lighter, since navy is already near black */
    --k-accent-soft: rgba(0, 17, 77, 0.08);
    --k-red: #d44c47;
    --k-red-soft: #fdebec;
    --k-yellow-soft: #fbf3db;
    --k-green-soft: #e8f4e7;
    --k-blue-soft: #e7f3f8;
    --k-radius: 6px;

    --bs-body-color: var(--k-text);
    --bs-body-bg: var(--k-bg);
    --bs-border-color: var(--k-border);
    --bs-secondary-color: var(--k-muted);
    --bs-link-color: var(--k-text);
    --bs-link-color-rgb: 55, 53, 47;
    --bs-link-hover-color: var(--k-text);
    --bs-body-font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
}

html, body {
    font-family: var(--bs-body-font-family);
    color: var(--k-text);
    background: var(--k-bg);
    -webkit-font-smoothing: antialiased;
}

body { font-size: 16px; line-height: 1.5; }

h1, .h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 0.5rem; color: var(--k-navy); }
h2, .h2, h3, .h3, .h4, .h5 { color: var(--k-navy); }
h2, .h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2rem; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; }
.h4 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; }
.h5 { font-size: 1.05rem; font-weight: 600; }
.h6 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-faint); }
@media (max-width: 767.98px) { h1, .h1 { font-size: 1.9rem; } }
h1:focus, h1:focus-visible, [tabindex="-1"]:focus { outline: none !important; }

a { color: var(--k-text); text-decoration: underline; text-decoration-color: var(--k-border); text-underline-offset: 3px; }
a:hover { color: var(--k-text); text-decoration-color: var(--k-text); }
.text-muted { color: var(--k-muted) !important; }
hr { border-color: var(--k-border-soft); opacity: 1; }
code { color: #eb5757; background: rgba(135, 131, 120, 0.15); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.85em; }

/* Buttons */
.btn { border-radius: var(--k-radius); font-weight: 500; font-size: 0.95rem; padding: 0.4rem 0.85rem; box-shadow: none !important; }
.btn-lg { font-size: 1.05rem; padding: 0.6rem 1rem; }
.btn-sm { font-size: 0.85rem; padding: 0.2rem 0.55rem; }
.btn-primary { background: var(--k-accent); border-color: var(--k-accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--k-accent-dark) !important; border-color: var(--k-accent-dark) !important; color: #fff !important; }
.btn-outline-primary, .btn-outline-secondary { background: #fff; border-color: var(--k-border); color: var(--k-text); }
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-primary:active, .btn-outline-secondary:active { background: var(--k-hover) !important; border-color: var(--k-border) !important; color: var(--k-text) !important; }
.btn-outline-danger { background: #fff; border-color: var(--k-border); color: var(--k-red); }
.btn-outline-danger:hover, .btn-outline-danger:active { background: var(--k-red-soft) !important; border-color: var(--k-red) !important; color: var(--k-red) !important; }
.btn-danger { background: var(--k-red); border-color: var(--k-red); }
.btn-link { color: var(--k-text); }
.btn:disabled { opacity: 0.45; }
:focus-visible { outline: 2px solid var(--k-accent) !important; outline-offset: 2px; }

/* Inputs */
.form-control, .form-select { border-color: var(--k-border); border-radius: var(--k-radius); color: var(--k-text); background-color: #fff; }
.form-control::placeholder { color: var(--k-faint); }
.form-control:focus, .form-select:focus { border-color: var(--k-accent); box-shadow: 0 0 0 3px var(--k-accent-soft); }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--k-muted); margin-bottom: 0.3rem; }
.form-text, .small { color: var(--k-muted); }
.form-check-input { border-color: var(--k-border); }
.form-check-input:checked { background-color: var(--k-accent); border-color: var(--k-accent); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--k-accent-soft); }
.input-group-text { background: var(--k-sidebar); border-color: var(--k-border); color: var(--k-muted); }
.form-floating > label { color: var(--k-faint); }
.darker-border-checkbox.form-check-input { border-color: var(--k-border); }
.form-floating > .form-control::placeholder { color: transparent; }
.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { border-color: var(--k-red) !important; }
.validation-message, .text-danger { color: var(--k-red) !important; }

/* Callouts instead of loud alerts */
.alert { border: 0; border-radius: var(--k-radius); color: var(--k-text); padding: 0.75rem 1rem; }
.alert-success { background: var(--k-green-soft); box-shadow: inset 3px 0 0 var(--k-green); }
.alert-danger { background: var(--k-red-soft); }
.alert-warning { background: var(--k-yellow-soft); }
.alert-info { background: var(--k-blue-soft); }

/* Cards and badges */
.card { border: 1px solid var(--k-border-soft); border-radius: 8px; box-shadow: none; }
.card-body { padding: 1.25rem; }
.badge { font-weight: 500; border-radius: 4px; padding: 0.25em 0.5em; }
.text-bg-light { background: rgba(227, 226, 224, 0.6) !important; color: var(--k-text) !important; }
.text-bg-primary { background: var(--k-accent-soft) !important; color: var(--k-accent-dark) !important; }
.text-bg-warning { background: var(--k-yellow-soft) !important; color: #956400 !important; }
.nav-pills .nav-link { color: var(--k-muted); border-radius: var(--k-radius); padding: 0.35rem 0.75rem; font-size: 0.95rem; }
.nav-pills .nav-link:hover { background: var(--k-hover); color: var(--k-text); }
.nav-pills .nav-link.active { background: var(--k-active); color: var(--k-text); }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ---------- Lists of projects, workflows, forms: quiet rows that highlight on hover ---------- */
.k-list { display: flex; flex-direction: column; gap: 2px; margin: 0.5rem 0 1rem; }
.k-tile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 10px; border-radius: var(--k-radius);
          text-decoration: none; color: var(--k-text); }
.k-tile::before { content: "📄"; font-size: 0.95rem; }
.k-tile:hover { background: var(--k-hover); color: var(--k-text); }
.k-tile strong { font-weight: 500; }
.k-tile .text-muted { font-size: 0.9rem; flex-basis: 100%; padding-left: 1.6rem; }
.k-tile .badge { margin-left: auto; }

/* ---------- A workflow's form buttons: big enough to tap, quiet to look at ---------- */
.k-menu { display: grid; gap: 10px; }
@media (min-width: 576px) { .k-menu { grid-template-columns: 1fr 1fr; } }
.k-menu-btn { display: flex; align-items: center; min-height: 64px; padding: 12px 16px; border: 1px solid var(--k-border); border-radius: 10px;
              font-size: 1.05rem; font-weight: 500; text-decoration: none; color: var(--k-text); background: #fff;
              transition: background 0.1s; }
.k-menu-btn::after { content: "→"; margin-left: auto; color: var(--k-faint); }
.k-menu-btn:hover, .k-menu-btn:focus-visible { background: var(--k-hover); color: var(--k-text); }

/* ---------- Filling in a form ---------- */
.k-form { margin-top: 1.5rem; }
.k-q { margin-bottom: 28px; }
.k-q-label { font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; }
.k-q-error .k-q-label { color: var(--k-red); }
.k-choices { display: grid; gap: 8px; }
.k-choice { min-height: 52px; padding: 6px 10px; border: 1px solid var(--k-border); border-radius: 8px; background: #fff; font-weight: 500;
            color: var(--k-text); transition: background 0.1s, border-color 0.1s; }
.k-choice:hover { background: var(--k-hover); }
.k-choice.on { background: var(--k-accent-soft); border-color: var(--k-accent); color: var(--k-accent-dark); font-weight: 600; }
.k-slider-value { display: block; text-align: center; font-size: 2rem; font-weight: 700; }
.k-slider .form-range { height: 2.2rem; }
.k-slider .form-range::-webkit-slider-thumb { background: var(--k-accent); }
.k-slider .form-range::-moz-range-thumb { background: var(--k-accent); }
.k-slider-ends { display: flex; justify-content: space-between; color: var(--k-muted); font-size: 0.9rem; }
.k-counter { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: center; text-align: center; }
.k-counter output { font-size: 2rem; font-weight: 700; }
.k-duration { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.k-save { min-height: 52px; margin-top: 8px; }

/* ---------- Entries ---------- */
.k-entries { margin: 0; }
.k-entries li { padding: 10px 10px; border-bottom: 1px solid var(--k-border-soft); }
.k-entries li.k-late { background: var(--k-yellow-soft); border-radius: var(--k-radius); }
.k-answer { display: inline-block; margin-right: 14px; color: var(--k-muted); font-size: 0.93rem; }
.k-answer strong { color: var(--k-text); font-weight: 500; }

/* ---------- Designer screens ---------- */
.k-editor { padding-bottom: 24px; }
.k-editor .card { margin-bottom: 1rem; }
.k-editor .border.rounded { border-color: var(--k-border-soft) !important; border-radius: 8px !important; }
.k-editor .border-primary { border-color: var(--k-accent) !important; box-shadow: 0 0 0 3px var(--k-accent-soft); }
.k-editor-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0;
                background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(4px); border-top: 1px solid var(--k-border-soft); z-index: 10; }

/* ---------- The form canvas: everything sized in em / container units so it scales with the screen ---------- */
.k-fill.k-wide { max-width: 1280px; margin: 0 auto; }
.kc-wrap { container-type: inline-size; width: 100%; margin: 0 auto; }
.kc-canvas { position: relative; width: 100%; line-height: 1.35; }
.kc-canvas:focus, .kc-canvas:focus-visible { outline: none !important; }
.kc-item { position: absolute; box-sizing: border-box; }
.kc-el-question, .kc-el-heading, .kc-el-text, .kc-el-save { z-index: 1; }
.kc-box { position: absolute; inset: 0; border: 1px solid var(--k-border); border-radius: 0.5em; }
.kc-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 0.125em solid var(--k-border); }
.kc-el-heading { font-size: 1.5em; }
.kc-heading { font-weight: 700; line-height: 1.2; white-space: pre-wrap; }
.kc-text { white-space: pre-wrap; }
.kc-q-label { font-weight: 600; font-size: 1.05em; margin-bottom: 0.6em; }
.kc-req { color: var(--k-red); margin-left: 0.15em; }
.kc-help { color: var(--k-muted); font-size: 0.9em; margin: -0.4em 0 0.6em; }
.kc-error { color: var(--k-red); font-size: 0.9em; margin-top: 0.35em; }
.kc-choices { display: grid; gap: 0.5em; }
.kc-when { grid-template-columns: repeat(3, 1fr); }
.kc-choice { min-height: 3.25em; padding: 0.35em 0.6em; border: 1px solid var(--k-border); border-radius: 0.5em; background: #fff;
             font: inherit; font-weight: 500; color: var(--k-text); transition: background 0.1s, border-color 0.1s; }
.kc-choice:hover { background: var(--k-hover); }
.kc-choice.on { background: var(--k-accent-soft); border-color: var(--k-accent); color: var(--k-accent-dark); font-weight: 600; }
.kc-input { display: block; width: 100%; min-height: 2.9em; padding: 0.45em 0.75em; border: 1px solid var(--k-border); border-radius: 0.4em;
            font: inherit; color: var(--k-text); background: #fff; margin-top: 0.5em; }
.kc-row .kc-input, .kc-q-label + .kc-input, .kc-help + .kc-input { margin-top: 0; }
.kc-input:focus { outline: none; border-color: var(--k-accent); box-shadow: 0 0 0 0.2em var(--k-accent-soft); }
.kc-note { min-height: 6em; resize: vertical; }
.kc-row { display: flex; align-items: center; gap: 0.5em; }
.kc-unit { color: var(--k-muted); }
.kc-slider output, .kc-counter output { display: block; text-align: center; font-size: 2em; font-weight: 700; line-height: 1.2; }
.kc-slider input[type=range] { width: 100%; height: 2.2em; accent-color: var(--k-accent); }
.kc-ends { display: flex; justify-content: space-between; color: var(--k-muted); font-size: 0.9em; }
.kc-counter { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5em; align-items: center; }
.kc-duration { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; }
/* A start and end (20 Nov 2026): each label on one line, the two boxes the same width, then how long it lasted. */
.kc-range { display: grid; grid-template-columns: max-content 1fr; gap: 0.5em 0.75em; align-items: center; }
.kc-range > .kc-row { display: contents; }
.kc-range .kc-unit { white-space: nowrap; }
.kc-range > .kc-help { grid-column: 1 / -1; }
/* Repeating items (20 Nov 2026): each item in its own box with its number and Remove, then "Add another". */
.kc-repeat { display: grid; gap: 0.75em; }
.kc-repeat-item { border: 1px solid var(--k-border); border-radius: 0.75em; padding: 0.5em 0.9em 0.9em; margin: 0; }
.kc-repeat-hd { display: flex; align-items: center; justify-content: space-between; width: 100%; float: none; font-size: 0.95em; font-weight: 600; margin-bottom: 0.25em; padding: 0; }
.kc-repeat-remove { border: 0; background: none; color: var(--k-danger, #b42318); font-size: 0.85em; padding: 0.25em 0.4em; }
.kc-repeat-q { margin-top: 0.6em; }
.kc-repeat-q .kc-q-label { font-size: 0.95em; }
.kc-repeat-add { width: 100%; }
/* Photos added while answering (20 Nov 2026). */
.kc-photos { display: flex; flex-wrap: wrap; gap: 0.5em; margin-bottom: 0.5em; }
.kc-photos:empty { display: none; }
.kc-photo { position: relative; }
.kc-photos img { width: 6em; height: 6em; object-fit: cover; border-radius: 0.5em; border: 1px solid var(--k-border); display: block; }
.kc-photo .kc-repeat-remove { position: absolute; top: 0.15em; right: 0.15em; background: #fff; border-radius: 999px; line-height: 1; }
.kc-photo-add { width: 100%; cursor: pointer; text-align: center; }
.kc-photo-add.busy { opacity: 0.6; cursor: progress; }
/* A picked record (20 Nov 2026). */
.kc-record-picked { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; border: 1px solid var(--k-border); border-radius: 0.75em; padding: 0.6em 0.9em; font-weight: 600; }
/* The review's later controls (20 Nov 2026). */
.kc-rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4em; }
.kc-rank-item { display: flex; align-items: center; gap: 0.5em; border: 1px solid var(--k-border); border-radius: 0.5em; padding: 0.3em 0.4em 0.3em 0.7em; background: #fff; }
.kc-rank-n { font-weight: 700; min-width: 1.4em; }
.kc-rank-w { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kc-rank-move { border: 1px solid var(--k-border); background: #fff; border-radius: 0.4em; width: 2.4em; height: 2.4em; font-size: 1em; }
.kc-rank-move:disabled { opacity: 0.35; }
.kc-rank-pick { display: grid; gap: 0.4em; margin-top: 0.5em; }
.kc-rank-add { border: 1px dashed var(--k-border); background: #fff; border-radius: 0.5em; padding: 0.45em 0.8em; min-height: 2.4em; overflow-wrap: anywhere; text-align: left; }
.kc-rank-add:disabled { opacity: 0.6; }
.kc-rank-pick + .kc-help, .kc-rank + .kc-help { margin-top: 0.4em; }
.kc-alloc { display: grid; gap: 0.4em; }
.kc-alloc-row { display: flex; align-items: center; gap: 0.6em; }
.kc-alloc-w { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kc-alloc-in { width: 6em; flex: none; text-align: right; }
.kc-matrix { display: grid; gap: 0.75em; }
.kc-matrix-w { margin-bottom: 0.3em; }
.kc-matrix-cs { display: grid; gap: 0.35em; }
.kc-matrix-c { min-height: 2.75em; font-size: 0.9em; overflow-wrap: anywhere; }
.kc-location-get { width: 100%; }
.kc-lnk { border: 0; background: none; padding: 0.25em 0; color: #1d4ed8; text-decoration: underline; font-size: 0.95em; }
.kc-draw { position: relative; aspect-ratio: 5 / 2; border: 1px solid var(--k-border); border-radius: 0.5em; background: #fff; color: #1d2433; }
.kc-draw-lines, .kc-draw-pad { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-draw-lines path { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.kc-draw-pad { touch-action: none; cursor: crosshair; }
.kc-mark-pic { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.kc-mark-pic img { max-width: 100%; max-height: 28em; border-radius: 0.5em; border: 1px solid var(--k-border); user-select: none; -webkit-user-select: none; }
.kc-mark-pic.live img { cursor: crosshair; }
.kc-mark-dot { position: absolute; transform: translate(-50%, -50%); width: 1.9em; height: 1.9em; border-radius: 50%; border: 2px solid #fff;
               background: #c2410c; color: #fff; font-weight: 700; font-size: 0.85em; line-height: 1; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.kc-barcode .kc-input { flex: 1; min-width: 0; }
.kc-barcode-scan { flex: none; cursor: pointer; display: inline-flex; align-items: center; }
.kc-no-barcode .kc-barcode-scan { display: none; }
.kc-barcode-found { flex: none; font-weight: 600; color: var(--bs-success-text-emphasis, #146c43); max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.kc-mark-kinds { flex-wrap: wrap; gap: .25rem; }
.kc-save-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; }
.kc-save { width: 100%; flex: 1; min-height: 2.8em; border: 0; border-radius: 0.5em; background: var(--k-accent); color: #fff;
           font: inherit; font-weight: 600; }
.kc-save:hover { background: var(--k-accent-dark); }
.kc-save:disabled { opacity: 0.5; }
.kc-problem { position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 0.4em; }

/* ---------- Designer ---------- */
.k-designer { max-width: none; }
.k-dbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -40px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--k-border-soft); }
@media (max-width: 767.98px) { .k-dbar { margin-top: 0; } }
.k-dbar-back { text-decoration: none; font-size: 1.2rem; padding: 2px 8px; border-radius: var(--k-radius); }
.k-dbar-back:hover { background: var(--k-hover); }
.k-dbar-name { font-size: 1.4rem; font-weight: 700; border: 0; border-radius: var(--k-radius); padding: 2px 6px; color: var(--k-text); min-width: 8rem; max-width: 22rem; }
.k-dbar-name:hover { background: var(--k-hover); }
.k-dbar-name:focus { outline: none; background: var(--k-hover); }
.k-dbar-status { color: var(--k-muted); font-size: 0.85rem; }
.k-dgrid { display: grid; grid-template-columns: 190px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .k-dgrid { grid-template-columns: 170px minmax(0, 1fr); } .k-props { grid-column: 1 / -1; } }
@media (max-width: 700px) { .k-dgrid { grid-template-columns: 1fr; } }
.k-toolbox, .k-props { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.k-tool-group { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-faint); margin: 10px 0 4px; }
.k-tool { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: var(--k-radius); background: none;
          color: var(--k-text); font-size: 0.9rem; text-align: left; cursor: grab; }
.k-tool:hover { background: var(--k-hover); }
.k-tool-ico { display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 24px; border: 1px solid var(--k-border);
              border-radius: 5px; font-size: 0.7rem; font-weight: 600; color: var(--k-muted); background: #fff; flex-shrink: 0; }
.k-stage { min-width: 0; }
.kc-design { background: #fff; box-shadow: 0 0 0 1px var(--k-border-soft), 0 4px 18px rgba(15, 15, 15, 0.06); border-radius: 8px; }
.kc-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
           background-image: radial-gradient(circle, rgba(55, 53, 47, 0.18) 1px, transparent 1.2px); }
.kc-design .kc-item { cursor: move; }
.kc-design .kc-item * { pointer-events: none; }
.kc-design .kc-item:hover { outline: 1px dashed rgba(0, 17, 77, 0.45); outline-offset: 2px; }
.kc-design .kc-selected { outline: 2px solid var(--k-accent) !important; outline-offset: 2px; z-index: 5; }
.kc-design .kc-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 1.5px solid var(--k-accent); border-radius: 2px;
             pointer-events: auto; z-index: 6; }
.kc-h-nw { left: -7px; top: -7px; cursor: nwse-resize; } .kc-h-n { left: calc(50% - 5px); top: -7px; cursor: ns-resize; }
.kc-h-ne { right: -7px; top: -7px; cursor: nesw-resize; } .kc-h-e { right: -7px; top: calc(50% - 5px); cursor: ew-resize; }
.kc-h-se { right: -7px; bottom: -7px; cursor: nwse-resize; } .kc-h-s { left: calc(50% - 5px); bottom: -7px; cursor: ns-resize; }
.kc-h-sw { left: -7px; bottom: -7px; cursor: nesw-resize; } .kc-h-w { left: -7px; top: calc(50% - 5px); cursor: ew-resize; }
.kc-guide { position: absolute; z-index: 7; pointer-events: none; background: #e03e9a; }
.kc-guide-v { top: 0; bottom: 0; width: 1px; }
.kc-guide-h { left: 0; right: 0; height: 1px; }
.k-props { font-size: 0.9rem; }
.k-props .form-label { font-size: 0.78rem; margin-bottom: 2px; margin-top: 6px; }
.k-prop-section { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-faint);
                  margin: 16px 0 6px; padding-top: 10px; border-top: 1px solid var(--k-border-soft); }
.k-prop-card { border: 1px solid var(--k-border-soft); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.k-xywh { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.k-xywh label { font-size: 0.75rem; color: var(--k-muted); }
.k-seg { display: inline-flex; border: 1px solid var(--k-border); border-radius: var(--k-radius); overflow: hidden; background: #fff; }
.k-seg > button, .k-seg > label > span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 8px;
                  border: 0; border-right: 1px solid var(--k-border-soft); background: none; color: var(--k-muted); cursor: pointer; }
.k-seg > :last-child, .k-seg > label:last-child > span { border-right: 0; }
.k-seg > button:hover, .k-seg > label > span:hover { background: var(--k-hover); color: var(--k-text); }
.k-seg > button.on, .k-shape-pick input:checked + span { background: var(--k-active); color: var(--k-text); }
.k-shape-pick { margin: 0; }
.k-shape-pick input { position: absolute; opacity: 0; pointer-events: none; }
.k-shape-pick input:focus-visible + span { outline: 2px solid var(--k-accent); }
.k-shapes > button, .k-shapes .k-shape-pick > span { min-width: 42px; height: 34px; }
.k-seg-btn { min-width: 30px; height: 30px; border: 1px solid var(--k-border); border-radius: var(--k-radius); background: #fff; color: var(--k-muted); }
.k-seg-btn.on { background: var(--k-active); color: var(--k-text); }
.k-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.k-swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--k-border); padding: 0; }
.k-swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--k-accent); }
.k-order { padding-left: 1.2rem; margin: 0 0 8px; }
.k-order li { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.k-order-name { flex: 1; text-align: left; border: 0; background: none; padding: 2px 4px; border-radius: 4px; color: var(--k-text);
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-order-name:hover { background: var(--k-hover); }

.k-stage-scroll { overflow-x: auto; padding: 4px; }

/* Menu element: buttons that open the workflow's other forms */
.kc-menu { display: grid; gap: 0.6em; }
.kc-menu-btn { display: flex; align-items: center; min-height: 3.6em; padding: 0.5em 0.9em; border: 1px solid var(--k-border); border-radius: 0.6em;
               background: #fff; color: var(--k-text); font-weight: 500; text-decoration: none; }
.kc-menu-btn::after { content: "→"; margin-left: auto; color: var(--k-faint); }
.kc-menu-btn:hover { background: var(--k-hover); color: var(--k-text); }
/* Buttons never change the menu's equal widths (owner, 8 Nov 2026: "it should never distort the rules about button
   width"): columns are minmax(0, 1fr), and long words or a progress count wrap or shrink inside the button. */
.kc-menu-btn, .kc-choice { min-width: 0; }
.kc-menu-btn .kc-opt-text { min-width: 0; overflow-wrap: anywhere; }
/* Menu groups (owner, 4 Nov 2026): a group button opens its own buttons in place, below it, across the menu. */
.kc-menu-btn.kc-menu-group { font: inherit; text-align: left; width: 100%; }
.kc-menu-btn.kc-menu-group::after { content: "▾"; }
.kc-menu-btn.kc-menu-group.open::after { content: "▴"; }
.kc-menu-sub { grid-column: 1 / -1; padding: 0.5em 0 0.5em 1em; border-left: 0.2em solid var(--k-border); }
.kc-menu-btn .kc-ico svg { width: 1.6em; height: 1.6em; margin-right: 0.5em; }
.kc-menu-btn .kc-pic { margin-right: 0.5em; }
.kc-menu-empty { color: var(--k-muted); border: 1px dashed var(--k-border); border-radius: 0.6em; padding: 1em 1.25em; grid-column: 1 / -1; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 3.6em; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.k-autosave { color: var(--k-muted); font-size: 0.85rem; margin: 0 0 0.5rem; }

/* ---------- Sidebar tree (projects and the Designer's library) ---------- */
.k-tree-head { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--k-faint);
               padding: 14px 10px 4px; }
.k-tree { margin: 0; }
.k-tree > summary { list-style: none; display: flex; align-items: center; border-radius: 6px; cursor: pointer; }
.k-tree > summary::-webkit-details-marker { display: none; }
.k-tree > summary::before { content: "›"; display: inline-flex; justify-content: center; width: 18px; flex-shrink: 0; margin-left: 4px;
                            color: var(--k-faint); font-size: 1rem; transition: transform 0.12s; }
.k-tree[open] > summary::before { transform: rotate(90deg); }
.k-tree > summary:hover { background: var(--k-hover); }
.k-tree .k-tree { margin-left: 14px; }
.k-tree-link { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 8px 3px 2px; border-radius: 6px; flex: 1; min-width: 0;
               color: var(--k-muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.k-tree-link:hover { background: var(--k-hover); color: var(--k-text); }
.k-tree-link.active { background: var(--k-active); color: var(--k-text); }
.k-tree-link.k-drop-over { background: var(--k-active); outline: 2px dashed var(--k-accent); outline-offset: -2px; }
.k-tree-leaf { margin-left: 22px; }
.k-tree-ico { font-size: 0.85rem; width: 18px; text-align: center; flex-shrink: 0; }
.k-tree-empty { display: block; margin-left: 28px; padding: 3px 0; color: var(--k-faint); font-size: 13px; }

/* Reminder: like the j-app "Weigh in today", it stands out until done today */
.kc-reminder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
               padding: 0.4em 0.8em; border: 1px solid var(--k-border); border-radius: 0.7em; background: #fff; color: var(--k-text);
               font-weight: 600; font-size: 1.1em; text-align: center; text-decoration: none; }
.kc-reminder small { font-weight: 400; font-size: 0.8em; color: var(--k-muted); }
.kc-reminder:hover { background: var(--k-hover); color: var(--k-text); }
.kc-reminder.due { background: var(--k-accent); border-color: var(--k-accent); color: #fff; }
.kc-reminder.due:hover { background: var(--k-accent-dark); color: #fff; }
/* "Recorded as No ... tap to change it" on a button that still needs doing: readable on the dark fill. */
.kc-reminder.due small { color: #fff; opacity: 0.9; }
/* The way back under a form opened from another (owner, 8 Nov 2026): a menu-style button, arrow on the left. */
.kc-back-btn { width: 100%; font: inherit; font-weight: 500; justify-content: center; text-align: center; cursor: pointer; }
.kc-back-btn::after { content: none; }
/* Buttons by day (dashboard): a day per row, a button per column. */
.k-buttons-scroll { overflow-x: auto; }
.k-buttons-by-day { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 0.9rem; }
.k-buttons-by-day th { font-weight: 600; text-align: left; padding: 0.3rem 0.5rem; white-space: nowrap; }
.k-buttons-by-day thead th small { display: block; font-weight: 400; color: var(--k-muted); }
.k-buttons-by-day td { padding: 0.3rem 0.5rem; border-radius: 0.35rem; white-space: nowrap; }
.k-buttons-by-day .k-cell-done { background: #edf3ec; color: #2f5d44; }
.k-buttons-by-day .k-cell-late { background: #fbf3db; color: #6d4f16; }
.k-buttons-by-day .k-cell-notdone { background: #fdebec; color: #8f2f2b; }
.k-buttons-by-day .k-cell-missed { background: #fdebec; color: #8f2f2b; font-style: italic; }
.k-buttons-by-day .k-cell-todo { color: var(--k-muted); }
.k-buttons-by-day tfoot td, .k-buttons-by-day tfoot th { font-weight: 600; border-top: 1px solid var(--k-border); }
/* Several projects at once (owner, 8 Nov 2026). */
.k-projswitch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em; margin: 0 0 0.6em; }
.k-projswitch-label { font-size: 0.85em; color: var(--k-muted); margin-right: 0.2em; }
.k-projswitch-item { padding: 0.3em 0.8em; border: 1px solid var(--k-border); border-radius: 999px; color: var(--k-text); text-decoration: none; font-size: 0.9em; background: #fff; }
.k-projswitch-item:hover { background: var(--k-hover); }
.k-projswitch-item.on { background: var(--k-accent); border-color: var(--k-accent); color: #fff; font-weight: 600; }
/* Intervals and prompt → behaviour (owner, 8 Nov 2026). */
.kc-int-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; padding: 0.5em 0.9em; border-radius: 0.6em; background: #ba423e; color: #fff; }
.kc-int-head .kc-tap-meta { color: #fff; }
.kc-int-stop { border: 1px solid #fff; border-radius: 0.4em; background: transparent; color: #fff; font: inherit; font-weight: 600; padding: 0.2em 0.9em; cursor: pointer; }
.kc-int-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5em; padding: 0.5em 0.7em; border: 1px solid var(--k-border); border-radius: 0.6em; }
.kc-int-ask.open { border-color: #ba423e; box-shadow: 0 0 0 2px rgba(186, 66, 62, 0.18); font-weight: 600; }
.kc-int-answers { display: flex; gap: 0.5em; }
.kc-int-yes, .kc-int-no { min-width: 4.5em; min-height: 2.6em; border: 1px solid var(--k-border); border-radius: 0.5em; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.kc-int-yes.on, .kc-int-no.on { background: var(--k-accent); border-color: var(--k-accent); color: #fff; }
.kc-int-tally { color: var(--k-muted); }
.kc-tap-check { display: inline-flex; align-items: center; gap: 0.3em; }
/* Tap to record (owner, 8 Nov 2026). */
.kc-tap { display: flex; flex-direction: column; gap: 0.35em; }
.kc-tap-btn { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; width: 100%; min-height: 3.2em; padding: 0.5em 0.9em;
              border: 1px solid var(--k-border); border-radius: 0.6em; background: #fff; color: var(--k-text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.kc-tap-btn:hover { background: var(--k-hover); }
.kc-tap-meta { font-weight: 500; color: var(--k-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kc-tap.running .kc-tap-btn { background: #ba423e; border-color: #ba423e; color: #fff; }
.kc-tap.running .kc-tap-meta { color: #fff; }
.kc-tap-links { display: flex; flex-wrap: wrap; gap: 0.2em 1em; font-size: 0.85em; }
.kc-tap-link { border: 0; background: none; padding: 0; color: var(--k-accent); text-decoration: underline; font: inherit; cursor: pointer; }
.kc-tap-undo { font-weight: 700; }
.kc-tap-problem { color: #ba423e; font-size: 0.85em; }
.kc-tap-form { display: flex; flex-wrap: wrap; gap: 0.4em 0.8em; align-items: center; font-size: 0.85em; padding: 0.5em; border: 1px solid var(--k-border); border-radius: 0.5em; }
.kc-tap-form input[type=number] { width: 4.2em; }
.kc-tap-actions { display: flex; gap: 0.8em; align-items: center; }
.kc-tap-save { border: 0; border-radius: 0.4em; background: var(--k-accent); color: #fff; padding: 0.25em 0.9em; font: inherit; font-weight: 600; cursor: pointer; }
.kc-tap-list { list-style: none; margin: 0; padding: 0; font-size: 0.85em; }
.kc-tap-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3em 1em; padding: 0.25em 0; border-bottom: 1px solid var(--k-border); }
.kc-tap-item-links { display: flex; gap: 0.8em; }
.kc-tap-note { font-size: 0.75em; color: var(--k-muted); margin: 0; }
/* Late reminder (owner, 8 Nov 2026): not done by its "due by" time. */
.kc-reminder.due.late { background: #ba423e; border-color: #ba423e; }
.kc-reminder.due.late:hover { background: #a33a36; }
/* A menu button's progress for a page of reminder buttons ("2 of 4"; "4 of 4 ✓" and green once all are done). Quiet
   (owner, 8 Nov 2026: "can this be more subtle"). */
/* The count sits at the bottom centre, behind the button's words, and takes no room (owner, 9 Nov 2026: "moved to the
   bottom center of the button, always transparent in behind the button text"), so it never squeezes the words. */
.kc-menu-btn:has(.kc-menu-progress) { position: relative; }
.kc-menu-progress { position: absolute; left: 50%; bottom: 0.2em; transform: translateX(-50%); z-index: 0; pointer-events: none;
                    background: transparent; font-size: 0.72em; font-weight: 400; color: var(--k-faint); white-space: nowrap; line-height: 1; }
.kc-menu-btn:has(.kc-menu-progress) > :not(.kc-menu-progress) { position: relative; z-index: 1; }
.kc-menu-btn.kc-menu-done { background: #edf3ec; border-color: #3e7859; }
.kc-menu-btn.kc-menu-done .kc-menu-progress { color: #3e7859; }
/* Back beside Save: Save two thirds, Back a third on the right (owner, 8 Nov 2026). */
.kc-save-wrap.kc-save-row { flex-direction: row; gap: 0.6em; }
.kc-save-row .kc-back-inline { flex: 1; min-height: 2.8em; border: 1px solid var(--k-border); border-radius: 0.5em; background: #fff;
                               color: var(--k-text); font: inherit; font-weight: 600; cursor: pointer; }
.kc-save-row .kc-back-inline:hover { background: var(--k-hover); }
.kc-save-row .kc-save { flex: 2; width: auto; }

/* No white space between objects when filling in: questions are as tall as their content (with a little room
   inside for their own bottom edge), and the script packs them. Spacers only show in the designer. */
.kc-wrap:not(.kc-design) .kc-el-question { min-height: 0 !important; }
.kc-el-question { padding-bottom: 0.9em; }
.kc-spacer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
             background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0, 17, 77, 0.06) 6px 12px);
             border: 1px dashed rgba(0, 17, 77, 0.3); border-radius: 4px; }
.kc-spacer span { font-size: 0.7em; color: var(--k-accent-dark); background: #fff; padding: 0 0.4em; border-radius: 3px; }

/* Designer preview */
.k-preview { max-width: 100%; }
.k-preview-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between;
                  padding: 8px 12px; margin-bottom: 10px; border-radius: var(--k-radius); background: var(--k-blue-soft); font-size: 0.9rem; }
.k-preview .kc-wrap { box-shadow: 0 0 0 1px var(--k-border-soft); border-radius: 8px; padding: 16px; background: #fff; }

/* Conditions: combinations */
.k-conds-or, .k-conds-and { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--k-faint); margin: 4px 0; }
.k-conds-or { text-align: center; }

/* ---------- Dashboards ---------- */
.k-dash { --s0: #2a78d6; --s1: #eb6834; --s2: #1baf7a; --s3: #eda100; --s4: #e87ba4; --s5: #008300; --s6: #6250d6; --s7: #e34948; }
.k-dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.k-dash-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.k-dash-range .k-seg > a { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; color: var(--k-muted); text-decoration: none;
                           border-right: 1px solid var(--k-border-soft); }
.k-dash-range .k-seg > a:last-child { border-right: 0; }
.k-dash-range .k-seg > a.on { background: var(--k-active); color: var(--k-text); }
.k-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 767.98px) { .k-dash-grid { grid-template-columns: minmax(0, 1fr); } }
.k-block { border: 1px solid var(--k-border-soft); border-radius: 10px; padding: 14px 16px; background: #fff; min-width: 0; }
.k-block-full { grid-column: 1 / -1; }
.k-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.k-block-title { font-size: 0.95rem; font-weight: 600; margin: 0; }
.k-block-csv { font-size: 0.75rem; color: var(--k-faint); text-decoration: none; }
.k-block-csv:hover { color: var(--k-text); }
.k-number { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.k-number-sub { color: var(--k-muted); font-size: 0.85rem; }
.k-chart { display: block; width: 100%; height: auto; overflow: visible; }
.k-chart .k-grid { stroke: var(--k-border-soft); stroke-width: 1; }
.k-chart .k-axis { fill: var(--k-muted); font-size: 11px; }
.k-chart .k-day { font-size: 11px; font-weight: 600; fill: var(--k-text); }
.k-chart .k-line { fill: none; stroke: var(--s0); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.k-chart .k-point { fill: var(--s0); stroke: #fff; stroke-width: 2; }
.k-chart .k-point:hover, .k-chart .k-dot-mark:hover { stroke: var(--k-text); }
.k-chart .k-track { stroke: var(--k-border); stroke-width: 1; }
.k-chart .k-dot-mark { stroke: #fff; stroke-width: 2; }
.k-trend-read { font-size: 0.85rem; color: var(--k-muted); margin-bottom: 4px; }
.k-trend-read strong { color: var(--k-text); }
.k-s0 { fill: var(--s0); background: var(--s0); } .k-s1 { fill: var(--s1); background: var(--s1); }
.k-s2 { fill: var(--s2); background: var(--s2); } .k-s3 { fill: var(--s3); background: var(--s3); }
.k-s4 { fill: var(--s4); background: var(--s4); } .k-s5 { fill: var(--s5); background: var(--s5); }
.k-s6 { fill: var(--s6); background: var(--s6); } .k-s7 { fill: var(--s7); background: var(--s7); }
.k-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: var(--k-muted); margin-bottom: 4px; }
.k-legend span { display: inline-flex; align-items: center; gap: 5px; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-band-key { width: 16px; height: 5px; border-radius: 2px; display: inline-block; }
.k-bars { display: flex; flex-direction: column; gap: 6px; }
.k-bar-row { display: grid; grid-template-columns: minmax(6rem, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 0.88rem; }
.k-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-bar-track { height: 12px; }
.k-bar { display: block; height: 12px; background: var(--s0); border-radius: 0 4px 4px 0; }
.k-bar-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-table-view { margin-top: 6px; font-size: 0.85rem; }
.k-table-view summary { color: var(--k-muted); cursor: pointer; }
.k-dash-entries li { padding: 6px 0; border-bottom: 1px solid var(--k-border-soft); font-size: 0.9rem; }
.k-dash-when { color: var(--k-muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.k-dash-by { color: var(--k-faint); margin-left: 6px; font-size: 0.8rem; }
/* Taps block (owner, 8 Nov 2026). */
.k-tap-tally { width: 100%; font-size: 0.88rem; margin-bottom: 8px; border-collapse: collapse; }
.k-tap-tally th, .k-tap-tally td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--k-border-soft); text-align: left; font-variant-numeric: tabular-nums; }
.k-tap-tally thead th { color: var(--k-muted); font-weight: 500; font-size: 0.8rem; }
.k-tap-tally .k-dot { margin-right: 6px; }
.k-tap-sub { font-size: 0.8rem; font-weight: 600; color: var(--k-muted); margin: 10px 0 2px; }
.k-chart .k-tap-bar { stroke: none; }
.k-chart .k-tap-dot { stroke: #fff; stroke-width: 2; }
.k-chart .k-tap-dot:hover { stroke: var(--k-text); }
/* Incidents block (owner, 8 Nov 2026). */
.k-incidents { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.k-incidents li { padding: 6px 0; border-bottom: 1px solid var(--k-border-soft); }
.k-incident-when { font-variant-numeric: tabular-nums; }
.k-incident-len { font-weight: 600; margin-left: 6px; }
.k-incident-seq { color: var(--k-muted); }
.k-incident-seq .k-dot { width: 8px; height: 8px; margin: 0 3px 0 0; }
/* Phase lines and goal lines (owner, 8 Nov 2026). */
.k-chart .k-phase { stroke: var(--k-text); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: 0.7; }
.k-chart .k-phase-label { fill: var(--k-text); font-size: 11px; font-weight: 600; }
.k-chart .k-goal { stroke: var(--k-muted); stroke-width: 1.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.k-chart .k-goal-label { fill: var(--k-muted); font-size: 11px; }
.k-phase-note { font-size: 0.8rem; color: var(--k-muted); margin-bottom: 2px; }
.k-tile-dash::before { content: "📊"; }
.k-dash-edit .k-block { cursor: grab; }
.k-dash-edit .k-drop { outline: 2px dashed var(--k-accent); outline-offset: 2px; }

/* Each person's answers on a dashboard */
.k-people { margin: 0; display: grid; gap: 4px; }
.k-people > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--k-border); padding: 2px 0; }
.k-people dt { font-weight: 400; color: var(--k-muted); }
.k-people dd { margin: 0; font-size: 1.25rem; font-weight: 600; }
.k-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }

/* Knob: a slider shown as a round dial */
.kc-knob { display: flex; flex-direction: column; align-items: center; position: relative; }
.kc-knob-dial { width: 100%; max-width: 15em; touch-action: none; cursor: grab; display: block; }
.kc-knob-track, .kc-knob-fill { fill: none; stroke-width: 7; stroke-linecap: round; }
.kc-knob-track { stroke: var(--k-border); }
.kc-knob-fill { stroke: var(--k-accent); }
.kc-knob-thumb { fill: #fff; stroke: var(--k-accent); stroke-width: 3; }
.kc-knob-value { font-size: 22px; font-weight: 700; fill: var(--k-text); }
.kc-knob-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kc-knob:has(.kc-knob-input:focus-visible) .kc-knob-dial { outline: 2px solid var(--k-accent); outline-offset: 2px; border-radius: 50%; }
.kc-knob-row { display: flex; align-items: center; gap: 0.5em; width: 100%; max-width: 15em; margin-top: -0.6em; }
.kc-knob-ends { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 0.4em; font-size: 0.75em; color: var(--k-muted); }
.kc-knob-step { width: 2.2em; height: 2.2em; border-radius: 50%; border: 1px solid var(--k-border); background: #fff; font-size: 1.1em; line-height: 1; }
.kc-knob-step:disabled { opacity: 0.4; }

/* Sidebar tree: right-click menu and its small dialogs (js/tree.js). */
.k-ctx { position: fixed; z-index: 2000; min-width: 180px; padding: 4px; background: var(--k-bg); color: var(--k-text);
  border: 1px solid var(--k-border); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.k-ctx button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; color: inherit;
  border-radius: 5px; font-size: 0.92rem; }
.k-ctx button:hover, .k-ctx button:focus { background: var(--k-hover); outline: none; }
.k-ctx button.danger { color: #b42318; }
.k-ctx-sep { height: 1px; margin: 4px 6px; background: var(--k-border); }
.k-dlg { border: 1px solid var(--k-border); border-radius: 10px; padding: 18px; width: min(420px, calc(100vw - 32px));
  background: var(--k-bg); color: var(--k-text); }
.k-dlg::backdrop { background: rgba(0,0,0,.35); }
.k-dlg h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; }
.k-dlg label { display: block; font-size: 0.9rem; margin-bottom: 10px; }
.k-dlg label .form-control { margin-top: 4px; }
.k-dlg-err { color: #b42318; font-size: 0.9rem; min-height: 1em; margin: 0 0 8px; }
.k-dlg-bar { display: flex; justify-content: flex-end; gap: 8px; }

/* Assessments: the latest people's answers per group, under the question. */
.kc-assess { margin-top: 0.5em; display: flex; flex-direction: column; gap: 0.25em; font-size: 0.85em; }
.kc-assess-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3em 0.8em; }
.kc-assess-g { font-weight: 600; color: var(--k-muted); min-width: 7em; }
.kc-assess-p small { color: var(--k-muted); }
.kc-assess-older, .kc-assess-outofdate { opacity: 0.45; }

/* Entry history: saved versions and every change while filling in. */
.k-history { padding-left: 1.2rem; }
.k-history li { margin-bottom: 10px; }
.k-hist-changed { background: var(--k-warn-bg, #fff4d6); border-radius: 4px; padding: 0 4px; }
.k-trail { border-left: 3px solid var(--k-border, #d0d7de); padding: 4px 0 4px 12px; margin-bottom: 12px; }
.k-trail-q { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-top: 4px; }
.k-trail-steps { overflow-wrap: anywhere; }
.k-trail-step small { color: var(--k-muted); }
.kc-assess-note { color: var(--k-text); font-weight: 500; }
.k-number-note { font-size: 0.85rem; margin-top: 4px; }
.k-qr { display: inline-block; padding: 16px; background: #fff; border: 1px solid var(--bs-border-color); border-radius: var(--k-radius); text-align: center; }
.k-qr code { color: #000; }
.k-sample-done { padding: 8px 4px; }

/* Coloured buttons and icons (owner, 3 Nov 2026). --kc-b is the colour itself (the mock's bright palette, 11 Nov 2026),
   --kc-f its pale tint, --kc-c a darker shade for text. A coloured button is a pale tint with a light border in its
   colour; picked, it gets the full-colour border and dark coloured text, like the mock. Text stays readable. */
.kc-choice.kc-col, .kc-menu-btn.kc-col, .kc-reminder.kc-col { background: var(--kc-f); border-color: color-mix(in srgb, var(--kc-b, var(--kc-c)) 45%, #fff); color: var(--k-text); }
.kc-choice.kc-col:hover, .kc-menu-btn.kc-col:hover, .kc-reminder.kc-col:hover { background: var(--kc-f); color: var(--k-text); filter: brightness(0.97); }
.kc-choice.kc-col.on { background: var(--kc-f); border-color: var(--kc-b, var(--kc-c)); color: var(--kc-c); box-shadow: inset 0 0 0 0.09em var(--kc-b, var(--kc-c)); font-weight: 650; }
.kc-reminder.kc-col.due, .kc-save.kc-col { background: var(--kc-c); border-color: var(--kc-c); color: #fff; }
.kc-save.kc-col:hover, .kc-reminder.kc-col.due:hover { background: var(--kc-c); color: #fff; filter: brightness(0.92); }
/* The reminder button an entry was recorded through ("Morning meds"). */
.k-via-btn { display: inline-block; font-size: 0.8em; padding: 0 0.5em; margin: 0 0.4em; border-radius: 0.6em; background: #e7f3f8; color: #2e739b; vertical-align: 0.1em; }

/* A reminder's own "once done" colour (workflow links): filled, like a due button, so it reads as captured. */
.kc-reminder.kc-col.kc-done-col { background: var(--kc-c); border-color: var(--kc-c); color: #fff; }
.kc-reminder.kc-col.kc-done-col small { color: #fff; opacity: 0.9; }
.kc-reminder.kc-col.kc-done-col:hover { background: var(--kc-c); color: #fff; filter: brightness(0.92); }
/* An answer filled in by the reminder the form was opened from: shown, not changeable. */
.kc-fixed-value { display: inline-block; padding: 0.35em 0.8em; border: 1px solid var(--k-border); border-radius: 0.5em; background: var(--k-hover); font-weight: 600; }
.kc-menu-btn.kc-col::after { color: var(--kc-c); }
.kc-menu-btn.kc-col .kc-ico, .kc-choice.kc-col .kc-ico { color: var(--kc-b, var(--kc-c)); }
.kc-choice.kc-has-ico { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2em; padding-top: 0.5em; padding-bottom: 0.45em; }
.kc-ico { display: block; line-height: 0; }
.kc-ico svg { width: 1.7em; height: 1.7em; }
.kc-ico-inline { display: inline-block; vertical-align: -0.2em; margin-right: 0.4em; line-height: 0; }
.kc-ico-inline svg { width: 1.25em; height: 1.25em; }
.k-iconpick > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.85rem; padding: 2px 6px; border: 1px solid var(--k-border); border-radius: 6px; }
.k-iconpick-cur svg { width: 18px; height: 18px; display: block; }
.k-iconpick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 6px; }
.k-iconpick-btn { aspect-ratio: 1; display: grid; place-items: center; padding: 4px; border: 1px solid var(--k-border); border-radius: 6px; background: #fff; color: var(--k-text); }
.k-iconpick-btn svg { width: 20px; height: 20px; }
.k-iconpick-btn.on { border-color: var(--k-accent); background: var(--k-accent-soft); }
.k-optlook { border-top: 1px solid var(--k-border); padding: 6px 0; }
.k-optlook-name { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; overflow-wrap: anywhere; }
/* Pictures (owner, 3 Nov 2026) */
.kc-pic { display: block; max-width: 100%; object-fit: contain; border-radius: 0.3em; }
.kc-image { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.kc-image img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0.4em; }
.kc-image-empty { color: var(--k-muted); border: 1px dashed var(--k-border); border-radius: 0.4em; width: 100%; height: 100%; display: grid; place-items: center; }

.k-imgpick > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.85rem; padding: 2px 6px; border: 1px solid var(--k-border); border-radius: 6px; }
.k-imgpick-cur { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.k-imgpick-body { margin-top: 6px; }
.k-imgpick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-height: 220px; overflow-y: auto; }
.k-imgpick-btn { aspect-ratio: 1; padding: 2px; border: 1px solid var(--k-border); border-radius: 6px; background: #fff; }
.k-imgpick-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.k-imgpick-btn.on { border-color: var(--k-accent); box-shadow: 0 0 0 2px var(--k-accent-soft); }
.k-crop { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; touch-action: none; user-select: none; overflow: hidden; }
.k-crop img { display: block; max-width: 100%; max-height: 320px; }
.k-crop-sel { position: absolute; border: 2px solid var(--k-accent); background: rgba(255,255,255,0.25); box-shadow: 0 0 0 9999px rgba(0,0,0,0.35); pointer-events: none; }
.k-pic-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--k-border); }

/* Slider colours and icons (owner, 3 Nov 2026) */
.kc-range-col { -webkit-appearance: none; appearance: none; background: transparent; }
.kc-range-col::-webkit-slider-runnable-track { height: 0.6em; border-radius: 0.3em; background: var(--kc-track); }
.kc-range-col::-moz-range-track { height: 0.6em; border-radius: 0.3em; background: var(--kc-track); }
.kc-range-col::-webkit-slider-thumb { -webkit-appearance: none; width: 1.6em; height: 1.6em; margin-top: -0.5em; border-radius: 50%; background: #fff; border: 0.3em solid var(--kc-thumb); }
.kc-range-col::-moz-range-thumb { width: 1em; height: 1em; border-radius: 50%; background: #fff; border: 0.3em solid var(--kc-thumb); }
.kc-slider output .kc-slider-ico, .kc-knob > .kc-slider-ico { display: block; line-height: 0; }
.kc-slider-ico svg { width: 2.4em; height: 2.4em; }
.kc-slider output .kc-slider-ico svg { width: 1.3em; height: 1.3em; }
.kc-end-ico { display: inline-block; vertical-align: -0.25em; margin: 0 0.3em; line-height: 0; }
.kc-end-ico svg { width: 1.4em; height: 1.4em; }
.kc-steps { display: flex; gap: 0.35em; }
.kc-step { flex: 1; min-height: 3em; display: grid; place-items: center; border: 1px solid var(--k-border); border-radius: 0.5em; background: #fff;
           color: var(--kc-c, var(--k-text)); font: inherit; font-weight: 600; padding: 0.3em 0; }
.kc-step .kc-ico svg { width: 1.8em; height: 1.8em; }
.kc-step.on { background: var(--kc-c, var(--k-accent)); border-color: var(--kc-c, var(--k-accent)); color: #fff; }
.k-range-row { display: grid; grid-template-columns: 4em 4em 1fr auto auto; gap: 4px; align-items: start; margin-bottom: 4px; }
.k-list-line { border: 1px solid var(--k-border); border-radius: 8px; padding: 8px; margin-bottom: 6px; background: #fff; }

/* Logo wordmark in the sidebar (owner's logo, 3 Nov 2026) */
.k-wordmark { height: 26px; width: auto; display: block; }
/* "Live" badges in green, like the logo's 7 */
.text-bg-success { background: var(--k-green) !important; color: #fff !important; }

/* A colour of the Designer's own (owner, 3 Nov 2026) */
.k-custom-col { display: inline-flex; align-items: center; gap: 4px; }
.k-custom-col-wheel { width: 26px; height: 26px; padding: 0; border: 1px solid var(--k-border); border-radius: 50%; background: none; cursor: pointer; }
.k-custom-col-wheel.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--k-accent); }
.k-custom-col-wheel::-webkit-color-swatch-wrapper { padding: 2px; }
.k-custom-col-wheel::-webkit-color-swatch { border: 0; border-radius: 50%; }
.k-custom-col-wheel::-moz-color-swatch { border: 0; border-radius: 50%; }
.k-custom-col-hex { width: 6.2em; }
.k-col-warn { color: #8e6520; }
.kc-knob-value.kc-knob-words { font-size: 12px; }
.kc-slider-words { font-size: 0.8em; }
.kc-slider-pic { height: 2.4em; margin: 0 auto; }

/* The designer's Menu panel (owner, 4 Nov 2026): each button's form, text and look; a group's buttons indented. */
.k-menu-line { border: 1px solid var(--k-border); border-radius: 0.5em; padding: 0.45em; margin-bottom: 0.45em; background: #fff; }
.k-menu-line-group { background: var(--k-hover); }
.k-pass-ed summary { cursor: pointer; color: var(--k-muted, #555); }
.k-pass-line { border-left: 3px solid var(--k-border); padding: 0.3em 0 0.3em 0.5em; margin: 0.35em 0; }
.k-menu-sub-lines { margin: 0.45em 0 0 0.9em; }

/* The workflow editor (owner, 5 Nov 2026): the workflow's forms | the shown form, as people see it | its button. */
.k-wfgrid { display: grid; grid-template-columns: 16rem minmax(0, 1fr) 17rem; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .k-wfgrid { grid-template-columns: 1fr; } }
.k-wf-item { display: flex; align-items: center; gap: 0.15rem; border-radius: 0.4rem; }
.k-wf-item.on { background: var(--k-hover); }
.k-wf-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0.35rem 0.5rem; font: inherit; color: var(--k-text); }
.k-wf-star { color: var(--k-green); margin-right: 0.3rem; }
.k-wf-crumbs { margin-bottom: 0.5rem; }
.k-wf-stage .k-preview { max-width: 520px; }

/* Linked lists' grid (owner, 5 Nov 2026): rows are this list's lines, columns the linked list's; tick and ★ usual. */
.k-matrix-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--k-border); border-radius: 0.5em; margin-bottom: 0.5rem; }
.k-matrix { border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.k-matrix th, .k-matrix td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--k-border); text-align: center; white-space: nowrap; }
.k-matrix thead th { position: sticky; top: 0; background: #fff; font-weight: 600; vertical-align: bottom; }
.k-matrix tbody th { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 600; z-index: 1; }
.k-matrix td.on { background: var(--k-hover); }
.k-matrix-fill { display: block; font-weight: 400; font-size: 0.75rem; color: var(--k-muted); }
.k-star { border: 0; background: none; padding: 0 0 0 0.25rem; color: var(--k-border); font-size: 1rem; line-height: 1; }
.k-star.on { color: #c98a00; }

/* The workflow Map (owner, 5 Nov 2026). */
.k-wfmap { position: relative; margin: 0.5rem 0 1rem; min-height: 200px; border-radius: 0.6rem; }
.k-wfmap.k-drop-here { outline: 2px dashed var(--k-accent); outline-offset: 4px; background: rgba(0, 0, 0, 0.02); }
.k-wfmap-empty { padding: 3rem 1rem; text-align: center; border: 2px dashed var(--k-border); border-radius: 0.6rem; }
.k-wf-add-inline select { max-width: 22rem; }
.k-wf-stage { min-width: 0; }
.k-wfmap-scroll { overflow-x: auto; overflow-y: hidden; }
/* On the map, the map gets the forms list's space (the list is on the click-through view). */
.k-wfgrid.k-wfgrid-map { grid-template-columns: minmax(0, 1fr) 17rem; }
@media (max-width: 1100px) { .k-wfgrid.k-wfgrid-map { grid-template-columns: 1fr; } }
.k-wfmap-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
.k-wfmap-lines > path { fill: none; stroke: var(--k-muted); stroke-width: 1.5; }
.k-wfmap-lines marker path { fill: var(--k-muted); stroke: none; }
/* Linked questions: strings (owner, 7 Nov 2026), with a soft shadow and a knot at each end. */
.k-wfmap-lines .k-varlinks path { fill: none; stroke-linecap: round; }
.k-wfmap-lines .k-string { stroke-width: 2.5; }
.k-wfmap-lines .k-string-shadow { stroke: rgba(0, 0, 0, 0.12); stroke-width: 5; transform: translateY(2px); }
.k-wfmap-lines .k-string-temp { fill: none; stroke: var(--k-accent); stroke-width: 2.5; stroke-dasharray: 6 4; stroke-linecap: round; }
.k-wfmap.k-stringing .k-port:not(.k-port-rem) { transform: scale(1.15); }
.k-port.k-target { transform: scale(1.5) !important; box-shadow: 0 0 0 4px var(--k-accent); }
.k-port:not(.k-port-rem) { touch-action: none; cursor: crosshair; }
.k-wfmap-col { display: contents; }
/* A form on the map: its name, and a small mockup of it (owner, 7 Nov 2026). */
.k-wfmap-card { position: absolute; visibility: hidden; isolation: isolate; width: 250px; border: 1px solid var(--k-border); border-radius: 0.6rem; background: #fff; }
.k-wfmap-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; width: 100%; padding: 0.4rem 0.6rem; border: 0; border-bottom: 1px solid var(--k-border);
                border-radius: 0.6rem 0.6rem 0 0; background: none; text-align: left; font: inherit; }
.k-wfmap-head:hover { background: var(--k-hover); }
.k-wfmap-head { cursor: grab; touch-action: none; }
.k-wfmap-card.k-dragging { z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.k-wfmap-card.k-dragging .k-wfmap-head { cursor: grabbing; }
.k-wfmap-head strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.k-wfmap-head small { color: var(--k-muted); font-size: 0.75rem; }
.k-wfmap-mock { padding: 6px 10px 8px; pointer-events: none; user-select: none; }
.k-wfmap-mock .kc-wrap { max-width: none !important; }
.k-wfmap-card.entry { border-color: var(--k-green); box-shadow: 0 0 0 2px rgba(16, 133, 11, 0.15); }
.k-wfmap-card.unreached { border-style: dashed; background: #fffaf0; }
.k-wfmap-card.followed { background: #fbfbfd; }
.k-wfmap-card.on { outline: 2px solid var(--k-accent); }
/* A question's dot (click to link) and a reminder's ⏰, on the card's right edge, level with it. */
.k-port { position: absolute; right: -9px; top: 0; z-index: 3; width: 18px; height: 18px; margin-top: -9px; padding: 0; border: 2px solid var(--k-muted); border-radius: 50%;
          background: #fff; cursor: pointer; }
.k-port:hover, .k-port:focus-visible { transform: scale(1.25); }
.k-port.linked { border-color: var(--c); background: var(--c); }
.k-port.sel { box-shadow: 0 0 0 4px var(--k-accent); border-color: var(--k-accent); }
.k-port.same { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15); }
.k-port.off { opacity: 0.25; }
.k-port-rem { width: 24px; height: 24px; margin-top: -12px; right: -12px; font-size: 13px; line-height: 1; border-color: var(--k-border); }
.k-port-rem.set { border-color: var(--k-green); background: #eaf6ea; }

/* Gauge (owner's illustration, 3 Nov 2026): coloured, named bands, a needle and the value in the middle. */
.kc-gauge .kc-gauge-dial { max-width: 22em; }
.kc-gauge-band { stroke: #fff; stroke-width: 1.5; }
.kc-gauge-words { fill: #fff; font-size: 9px; font-weight: 700; pointer-events: none; }
.kc-gauge-tick { fill: var(--k-muted); font-size: 8px; }
.kc-gauge-needle { stroke: var(--k-text); stroke-width: 4; stroke-linecap: round; }
.kc-gauge-hub { fill: var(--k-text); }
.kc-gauge-value { fill: var(--k-text); font-size: 22px; font-weight: 800; }

.k-tree-head-link { color: inherit; text-decoration: none; }
.k-tree-head-link:hover { text-decoration: underline; }

/* Live settings: in the designer an element switched off shows faintly, marked "Off"; on a form, one just switched on
   is briefly highlighted so it's noticed. */
.kc-design .kc-item.kc-off { opacity: .45; }
.kc-design .kc-item.kc-off::after { content: "Off"; position: absolute; top: 2px; right: 2px; font-size: 11px; line-height: 1; padding: 2px 6px; border-radius: 8px; background: var(--k-text, #333); color: var(--k-bg, #fff); }
.kc-item.kc-fresh { animation: kc-fresh 2.5s ease-out; border-radius: 6px; }
@keyframes kc-fresh { 0%, 40% { box-shadow: 0 0 0 3px #f5b70088; background: #f5b70022; } 100% { box-shadow: 0 0 0 3px transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { .kc-item.kc-fresh { animation: none; outline: 2px solid #f5b700; } }
.k-live-who { max-height: 14rem; overflow: auto; }

/* Reordering the sidebar: a line shows where the dragged one will go. */
.k-order-before:not(details), details.k-order-before > summary { box-shadow: inset 0 2px 0 var(--k-accent); }
.k-order-after:not(details), details.k-order-after { box-shadow: inset 0 -2px 0 var(--k-accent); }

/* Links the page follows itself (no web address: "there is double displays", 7 Nov 2026) look and act like links. */
.k-back-link { color: var(--bs-link-color); text-decoration: underline; cursor: pointer; }
.k-back-link:hover { color: var(--bs-link-hover-color); }
.kc-menu-btn[role=link], .kc-reminder[role=link] { cursor: pointer; }

/* Sidebar sections (owner, 8 Nov 2026: every section works the same): each heading opens and closes like a folder. */
.k-tree-root > summary { padding: 14px 0 4px; }
.k-tree-root > summary .k-tree-head { padding: 0 6px; flex: 1; }
.k-tree-bin { margin-top: 6px; }
.k-bin-count { margin-left: auto; color: var(--k-faint); font-size: 12px; font-weight: 400; }
/* The picture opened from the sidebar. */
.k-pic-here { outline: 2px solid var(--k-accent); outline-offset: -2px; }
/* A workflow's Fill-ins tab (owner, 8 Nov 2026: one place for fill-ins): the whole width. */
.k-wfgrid.k-wfgrid-fills { grid-template-columns: minmax(0, 1fr); }
.k-fillins { max-width: 48rem; }

/* Where you are (owner, 8 Nov 2026: levels of data): the buttons tapped to get here; each earlier one goes back there. */
.k-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15em 0.4em; list-style: none; margin: 0; padding: 0; font-size: 0.95em; }
.k-crumbs li + li::before { content: "›"; color: var(--k-faint); margin-right: 0.4em; }
.k-crumbs a { cursor: pointer; }
.k-crumbs [aria-current] { color: var(--k-muted); }

/* Buttons tapped, by level (levels of data). */
.k-path-level { list-style: none; margin: 0; padding-left: 0; }
.k-path-level .k-path-level { padding-left: 1.1em; border-left: 2px solid var(--k-border); margin-left: 0.3em; }
.k-path-level li { padding: 0.15em 0; }
.k-path-level summary { cursor: pointer; }
.k-path-count { display: inline-block; min-width: 1.8em; padding: 0 0.4em; border-radius: 0.8em; background: var(--k-hover); color: var(--k-text); font-size: 0.85em; text-align: center; }

/* ---------- Designer layout (owner, 10 Nov 2026: the controls concept's layout, in kep7's colours) ----------
   Row 1: back, the name (with its folder above it) and a status tag, then More / Save draft / Publish.
   Row 2: underlined tabs, a short hint, and how the form is shown. Then a slim piece column, the form on a dotted
   canvas, and the settings panel. */
.k-dbar { gap: 12px; margin-bottom: 0; padding-bottom: 12px; flex-wrap: nowrap; }
.k-dbar-title { flex: 1; min-width: 0; }
.k-dbar-crumb { font-size: 12px; color: var(--k-faint); padding: 0 6px; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-dbar-line { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.k-dbar-name { font-size: 1.3rem; flex: 0 1 auto; field-sizing: content; min-width: 6ch; max-width: 100%; }
.k-dbar-status { font-size: 12px; border: 1px solid var(--k-border); border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.k-dbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.k-more { position: relative; }
.k-more > summary { list-style: none; }
.k-more > summary::-webkit-details-marker { display: none; }
.k-more > summary::after { content: " ▾"; font-size: 0.75em; }
.k-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 180px; background: #fff; border: 1px solid var(--k-border);
               border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 15, 15, 0.12); padding: 4px; }
.k-more-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 5px; color: var(--k-text); }
.k-more-menu button:hover:not(:disabled) { background: var(--k-hover); }
.k-more-menu button:disabled { color: var(--k-faint); }
.k-more-menu .k-more-danger { color: var(--k-red); }
.k-dbar2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 46px; margin: 0 0 16px; border-bottom: 1px solid var(--k-border-soft); }
.k-tabs { display: flex; gap: 22px; align-self: stretch; margin-right: auto; }
.k-tabs > button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 0 2px; color: var(--k-muted); font-weight: 500; min-height: 44px; }
.k-tabs > button:hover { color: var(--k-text); }
.k-tabs > button.on { color: var(--k-accent); border-bottom-color: var(--k-accent); font-weight: 600; }
.k-dbar2-hint { font-size: 12px; color: var(--k-faint); }
.k-dbar2 .k-seg { margin: 6px 0; }
.k-dgrid { grid-template-columns: 170px minmax(0, 1fr) 310px; gap: 0; border: 1px solid var(--k-border-soft); border-radius: 10px; overflow: hidden; }
@media (max-width: 1100px) { .k-dgrid { grid-template-columns: 150px minmax(0, 1fr); } }
@media (max-width: 700px) { .k-dgrid { grid-template-columns: 1fr; } }
.k-toolbox { padding: 4px 8px 12px; border-right: 1px solid var(--k-border-soft); background: var(--k-sidebar); top: 0; }
.k-toolbox .k-tool { font-size: 13px; padding: 4px 6px; gap: 7px; }
.k-toolbox .k-tool-ico { width: 24px; height: 22px; font-size: 0.65rem; }
.k-toolbox-note { font-size: 12px; color: var(--k-faint); margin: 10px 2px 0; }
.k-stage { background: #f1f1ef; background-image: radial-gradient(rgba(55, 53, 47, 0.16) 0.7px, transparent 0.7px); background-size: 16px 16px;
           padding: 24px 24px 20px; align-self: stretch; }
.k-stage-note { text-align: center; font-size: 12px; color: var(--k-faint); margin: 16px 0 0; }
.k-props { padding: 0 18px 20px; border-left: 1px solid var(--k-border-soft); background: #fff; top: 0; align-self: stretch; max-height: none; }
@media (max-width: 1100px) { .k-props { border-left: 0; border-top: 1px solid var(--k-border-soft); } }
.k-props-head { display: flex; align-items: flex-start; gap: 8px; margin: 0 -18px 6px; padding: 16px 18px 14px; border-bottom: 1px solid var(--k-border-soft); }
.k-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--k-faint); margin-bottom: 4px; }
.k-props-title { font-size: 1.05rem; }
.k-props-delete { display: block; margin-top: 22px; border: 0; background: none; padding: 6px 0; color: var(--k-red); font-size: 0.88rem; }
.k-props-delete:hover { text-decoration: underline; }
.kc-design .kc-selected { box-shadow: 0 0 0 5px var(--k-accent-soft); }
/* Workflow editor: the same frame. */
.k-wfgrid { border: 1px solid var(--k-border-soft); border-radius: 10px; padding: 16px; gap: 1.25rem; }
.k-wf-forms { background: var(--k-sidebar); border-radius: 8px; padding: 4px 12px 14px; }
@media (max-width: 767.98px) { .k-dbar { flex-wrap: wrap; } .k-dbar2-hint { display: none; } }

/* ---------- Every page (owner, 10 Nov 2026: the same rules everywhere) ----------
   1. A header: a small path line, the page's name, a status tag, a line saying what it's for; actions on the right.
   2. Views are underlined tabs (.k-tabs, above).
   3. Content sits in light framed panels, each section with a small grey heading.
   4. Remove / Delete / Turn off are quiet red links, not boxed buttons. */
.k-phead { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--k-border-soft); }
.k-phead-title { flex: 1; min-width: 0; }
.k-phead-crumb { font-size: 12px; color: var(--k-faint); margin-bottom: 2px; }
.k-phead-crumb a { color: inherit; text-decoration: none; }
.k-phead-crumb a:hover { color: var(--k-text); text-decoration: underline; }
.k-phead-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.k-phead-line h1 { margin: 0; font-size: 1.6rem; }
.k-phead-tag { font-size: 12px; color: var(--k-muted); border: 1px solid var(--k-border); border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.k-phead-lead { color: var(--k-muted); font-size: 0.92rem; margin-top: 6px; max-width: 46rem; }
.k-phead-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding-top: 4px; }
@media (max-width: 600px) { .k-phead { flex-wrap: wrap; } }
.k-dbar.k-dbar-plain { margin-top: -40px; margin-bottom: 18px; }
@media (max-width: 767.98px) { .k-dbar.k-dbar-plain { margin-top: 0; } }
/* Panels: cards and tiles get the same soft frame. */
.card { border: 1px solid var(--k-border-soft); border-radius: 10px; box-shadow: none; }
.card-body > h2.h5:first-child, .card-body > h2.h6:first-child, .card-body > h2.h4:first-child {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--k-faint);
    margin: -2px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--k-border-soft); }
/* Section headings on plain pages: small grey headings over a rule. */
main h2.h4, main h2.h5, main h2.h6 {
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--k-faint);
    padding-bottom: 8px; border-bottom: 1px solid var(--k-border-soft); margin-top: 1.6rem; }
/* Rule 4. */
.btn-outline-danger { border-color: transparent; background: none; color: var(--k-red); }
.btn-outline-danger:hover, .btn-outline-danger:focus-visible { border-color: transparent; background: var(--k-red-soft); color: var(--k-red); }
.k-list { border: 1px solid var(--k-border-soft); border-radius: 10px; padding: 4px; background: #fff; }
.k-list:empty { display: none; }
.list-group { border-radius: 10px; }
.list-group-item { border-color: var(--k-border-soft); }

/* Legal documents (owner, 10 Nov 2026). */
.k-legal { max-width: 46rem; line-height: 1.6; }
.k-legal h2 { font-size: 1.1rem; font-weight: 650; color: var(--k-navy); margin: 1.8rem 0 0.5rem; text-transform: none; letter-spacing: 0;
              padding: 0; border: 0; }
.k-legal-intro { background: var(--k-yellow-soft); border-radius: 8px; padding: 10px 14px; font-size: 0.9rem; }
.k-tbc { background: var(--k-yellow-soft); color: #7a5b00; border: 1px dashed #d9b44a; border-radius: 4px; padding: 0 4px; font-size: 0.88em; }
.k-support-email { margin-top: 1rem; color: var(--k-muted); }  /* "Need help?" on the account pages */
.k-legal-links { margin-top: 2rem; padding-top: 12px; border-top: 1px solid var(--k-border-soft); font-size: 0.9rem; color: var(--k-faint); }
.k-nav-foot { flex-wrap: wrap; }

/* =====================================================================================================================
   Step 1 of the full mock (owner, 10 Nov 2026: "the mockup provided looks so much better, run with this").
   The mock's controls, panels, lists and header, applied to kep7's own classes. Later rules win over earlier ones.
   ===================================================================================================================== */
:root { --k-shadow: 0 1px 2px rgba(15,15,15,.04), 0 6px 24px rgba(15,15,15,.05); --k-navy-mid: rgba(0,17,77,.16); }
body { font-size: 14px; line-height: 1.5; }
/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 14px;
       border-radius: 7px; font-weight: 550; font-size: 14px; white-space: nowrap; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-lg { min-height: 44px; padding: 9px 18px; font-size: 15px; }
.btn-link { padding-left: 0; padding-right: 0; min-height: 0; color: var(--k-navy); font-weight: 550; text-decoration: none; }
.btn-link:hover { text-decoration: underline; color: var(--k-navy); }
/* Fields */
.form-control, .form-select { border-radius: 7px; min-height: 38px; padding: 8px 11px; font-size: 14px; }
.form-control-sm, .form-select-sm { min-height: 32px; padding: 4px 9px; font-size: 13px; }
/* List boxes keep room on the right for their arrow, so a short choice ("1", "5") never sits under it (owner, 12 Nov 2026). */
.form-select { padding-right: 34px; background-position: right 11px center; }
.form-select-sm { padding-right: 28px; background-position: right 8px center; }
.form-control:focus, .form-select:focus { border-color: var(--k-navy); box-shadow: 0 0 0 2px var(--k-navy-mid); }
.form-label { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.form-check-input:checked { background-color: var(--k-navy); border-color: var(--k-navy); }
.form-text { font-size: 12.5px; color: var(--k-faint); }
/* Alerts */
.alert { border-radius: 9px; padding: 11px 14px; font-size: 13.5px; box-shadow: none; }
.alert-success { background: var(--k-green-soft); color: #245c22; box-shadow: none; }
.alert-info { background: var(--k-blue-soft); color: #1d4f68; }
.alert-warning { background: var(--k-yellow-soft); color: #6b5000; }
.alert-danger { background: var(--k-red-soft); color: #8f2b27; }
/* Page header */
.k-phead { padding-bottom: 16px; margin-bottom: 20px; }
.k-phead-line h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; color: var(--k-navy); }
.k-phead-lead { color: var(--k-muted); font-size: 14px; max-width: 44rem; }
.k-phead-tag { font-size: 12px; border-radius: 6px; padding: 1px 8px; font-weight: 500; }
.k-phead-actions { padding-top: 6px; }
/* Panels: cards with a header line */
.card { border-radius: 12px; border-color: var(--k-border-soft); background: #fff; }
.card-body { padding: 16px 18px; }
.card-body > h2.h5:first-child, .card-body > h2.h6:first-child, .card-body > h2.h4:first-child {
    font-size: 14px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--k-text);
    margin: -16px -18px 14px; padding: 14px 18px; border-bottom: 1px solid var(--k-border-soft); }
/* Lists of things: rows with an icon tile, inside a panel */
.k-list { border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 0; gap: 0; background: #fff; overflow: hidden; }
.k-tile { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 0;
          padding: 11px 18px; border-radius: 0; border-top: 1px solid var(--k-border-soft); color: var(--k-text); }
.k-tile:first-child { border-top: 0; }
.k-tile::before { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 9px; background: var(--k-navy-soft, rgba(0,17,77,.07));
                  display: grid; place-items: center; font-size: 15px; }
.k-tile:hover { background: #fafaf9; }
.k-tile strong { font-weight: 600; grid-column: 2; }
.k-tile .text-muted { grid-column: 2; padding-left: 0; font-size: 12.5px; color: var(--k-faint) !important; flex-basis: auto;
                      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tables */
.table { font-size: 13.5px; --bs-table-border-color: var(--k-border-soft); }
.table > thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--k-faint); font-weight: 650;
                    background: #fbfbfa; padding: 10px 14px; }
.table > tbody td { padding: 11px 14px; vertical-align: middle; }
.list-group-item { padding: 11px 18px; }
/* Sidebar: the current page's row is a small white card, as in the mock */
.k-tree-link.active { background: #fff; color: var(--k-navy); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); outline: 1px solid var(--k-border-soft); }
/* Tags anywhere */
.k-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; border: 1px solid var(--k-border); border-radius: 6px;
         padding: 1px 8px; color: var(--k-muted); white-space: nowrap; font-weight: 500; }
.k-tag-live { border-color: #b6dcb4; background: var(--k-green-soft); color: #2b6b28; }
.k-tag-draft { background: var(--k-yellow-soft); border-color: #ecd9a0; color: #7a5b00; }
.k-tag-navy { background: rgba(0,17,77,.07); border-color: var(--k-navy-mid); color: var(--k-navy); }

/* ---------- Step 2 of the full mock: recording pages ---------- */
body .k-page:has(.k-proj) { max-width: 1080px; }
.k-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .k-split { grid-template-columns: 1fr; } }
.k-side-col { position: sticky; top: 16px; }
.k-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.k-cards .k-tile { border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 14px 16px; background: #fff; transition: .12s; }
.k-cards .k-tile:hover { border-color: var(--k-border); box-shadow: var(--k-shadow); background: #fff; }
.k-cards .k-tile .text-muted { white-space: normal; }
.k-panel { background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.k-panel-hd { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--k-border-soft); }
.k-panel-hd h2 { font-size: 14px !important; font-weight: 650; margin: 0; padding: 0; border: 0; text-transform: none !important; letter-spacing: 0 !important; color: var(--k-text) !important; }
.k-panel-sub { color: var(--k-faint); font-size: 12.5px; }
.k-panel-r { margin-left: auto; font-size: 13px; }
.k-panel-r a { color: var(--k-navy); text-decoration: none; font-weight: 550; }
.k-panel-r a:hover { text-decoration: underline; }
.k-panel-bd { padding: 14px 18px; }
.k-list-flat { border: 0; border-radius: 0; }
.k-empty { color: var(--k-faint); text-align: center; padding: 24px 16px; margin: 0; }
.k-day { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--k-faint); font-weight: 650; margin: 0;
         padding: 10px 18px 6px; background: #fbfbfa; border-bottom: 1px solid var(--k-border-soft); }
.k-entries { margin: 0; }
.k-entries li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--k-border-soft); }
.k-entries li:last-child { border-bottom: 0; }
.k-entries li.k-late { background: var(--k-yellow-soft); border-radius: 0; }
.k-ent-when { font-size: 12.5px; color: var(--k-faint); padding-top: 1px; font-variant-numeric: tabular-nums; }
.k-ent-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.k-ent-top .badge { font-size: 12px; }
.k-ent-ans { margin-top: 2px; }
.k-answer { font-size: 13.5px; }
.k-ent-lk { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; }
.k-ent-lk a { color: var(--k-navy); text-decoration: none; font-weight: 550; }
.k-ent-lk a:hover { text-decoration: underline; }
.k-code { display: block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; background: var(--k-hover);
          border-radius: 6px; padding: 8px 10px; color: var(--k-text); text-decoration: none; word-break: break-all; }
.k-eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--k-faint); }
.k-tile .badge { grid-column: 2; justify-self: start !important; margin: 8px 0 0 !important; }
/* The form people fill in (mock's phone screens): rounder, clearer buttons. Sizes stay in em so the designer's text
   sizes still scale them. Designer-chosen colours (kc-col) still win. */
.kc-choice { border-width: 1.5px; border-radius: 0.75em; font-weight: 550; }
.kc-choice.on { background: rgba(0,17,77,.07); }
.kc-menu-btn { border-radius: 0.8em; color: var(--k-navy); font-weight: 600; }
.kc-menu-btn:hover { color: var(--k-navy); background: #fafaf9; border-color: var(--k-border); }
.kc-reminder { border-radius: 0.8em; }
.kc-save { border-radius: 0.8em; font-weight: 700; }
.kc-q-label { font-weight: 650; }
/* Entry history: each saved version and each filling-in session as a framed list (mock). */
.k-history { list-style: none; padding: 0; margin: 0 0 18px; background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; overflow: hidden; }
.k-history > li { padding: 12px 18px; border-top: 1px solid var(--k-border-soft); }
.k-history > li:first-child { border-top: 0; }
[data-answers-now] ul { background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 4px 0; }
[data-answers-now] li { padding: 8px 18px; margin: 0 !important; border-top: 1px solid var(--k-border-soft); }
[data-answers-now] li:first-child { border-top: 0; }
.k-trail { background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 12px 18px; margin-bottom: 12px; }
/* Dashboards: each block a panel. */
.k-block { background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 14px 16px; }
.k-block-title { font-size: 14px !important; font-weight: 650 !important; text-transform: none !important; letter-spacing: 0 !important;
                 color: var(--k-text) !important; border: 0 !important; padding: 0 !important; margin: 0 0 10px !important; }

/* ---------- Step 3 of the full mock: design pages ---------- */
/* Project settings: a section menu on the left, the sections on the right. */
body .k-page:has(.k-setnav) { max-width: 1080px; }
.k-editor:has(> .k-setnav) { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 28px; align-items: start; }
.k-editor > .k-setnav { grid-column: 1; grid-row: 1 / span 60; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 1px; }
.k-editor:has(> .k-setnav) > :not(.k-setnav) { grid-column: 2; }
.k-setnav a { padding: 7px 10px; border-radius: 7px; color: var(--k-muted); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.k-setnav a:hover { background: var(--k-hover); color: var(--k-text); }
@media (max-width: 860px) { .k-editor:has(> .k-setnav) { display: block; } .k-setnav { display: none !important; } }
.k-editor .card { scroll-margin-top: 16px; }
body .k-page:has(.k-design-home) { max-width: 1080px; }
.k-design-home .k-side-col { position: sticky; top: 16px; }

/* ---------- Step 4 of the full mock: account, people, operator and the rest ---------- */
body .k-page:has(.k-account) { max-width: 1080px; }
.k-account-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .k-account-grid { grid-template-columns: 1fr; } }
.k-account-nav { position: sticky; top: 16px; }
.k-account-nav .nav-pills { gap: 1px; }
.k-account-nav .nav-link { padding: 7px 10px; border-radius: 7px; color: var(--k-muted); font-weight: 500; font-size: 13.5px; }
.k-account-nav .nav-link:hover { background: var(--k-hover); color: var(--k-text); }
.k-account-nav .nav-link.active { background: #fff; color: var(--k-navy); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); outline: 1px solid var(--k-border-soft); }
.k-account-body { background: #fff; border: 1px solid var(--k-border-soft); border-radius: 12px; padding: 18px 22px 22px; min-width: 0; }
.k-account-body h3, .k-account-body h2 { font-size: 15px; font-weight: 650; color: var(--k-text); margin-bottom: 12px; }
/* Sign in, create account, forgot/reset password: one centred card (mock). */
.k-auth { max-width: 440px; margin: 24px auto; background: #fff; border: 1px solid var(--k-border-soft); border-radius: 16px; padding: 28px;
          box-shadow: var(--k-shadow); }
.k-auth h1 { font-size: 24px; color: var(--k-navy); margin-bottom: 14px; }
.k-auth .row { margin: 0; }
.k-auth .row > [class*="col-"] { width: 100%; flex: 0 0 100%; max-width: 100%; padding: 0; }
.k-auth .btn-primary.w-100, .k-auth button[type=submit].btn-primary { min-height: 44px; }
.k-auth hr { border-color: var(--k-border-soft); opacity: 1; }
/* Extras from the full mock (owner, 10 Nov 2026). */
.k-filter { display: inline-block; margin-right: 12px; }
.k-filter .form-select { width: auto; min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.k-panel-r { display: flex; align-items: center; }
.k-day-n { text-transform: none; letter-spacing: 0; font-weight: 500; }
.k-panel-ft { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--k-border-soft); background: #fcfcfb; }
.k-card-chip { grid-column: 2; justify-self: start; margin-top: 6px; }
.k-sec-hd { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--k-border-soft); margin: 1.6rem 0 12px; }
.k-sec-hd h2 { border: 0 !important; padding: 0 !important; margin: 0 !important; }
.k-more-menu a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--k-text); text-decoration: none; }
.k-more-menu a:hover { background: var(--k-hover); }
.k-panel { scroll-margin-top: 16px; }

/* Menu settings as a list (owner, 10 Nov 2026): one row per button; its settings open under it when clicked. */
.k-mlist { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.5rem; }
.k-props .k-menu-line { padding: 0; margin: 0; border: 1px solid var(--k-border); border-radius: 8px; background: #fff; overflow: hidden; }
.k-props .k-menu-line.is-open { border-color: var(--k-navy-mid); box-shadow: 0 0 0 3px var(--k-accent-soft); }
.k-props .k-menu-line-group { background: #fff; }
.k-mrow { display: flex; align-items: center; gap: 2px; padding: 3px 4px 3px 3px; }
.k-mrow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55rem; background: none; border: 0; padding: 0.3rem 0.35rem; border-radius: 6px; text-align: left; font: inherit; color: var(--k-text); cursor: pointer; }
.k-mrow-main:hover { background: var(--k-hover); }
.k-mrow-main:focus-visible { outline: 2px solid var(--k-navy); outline-offset: 1px; }
.k-mrow-sw { flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--k-border); background: #fff; display: grid; place-items: center; font-size: 12px; color: var(--k-muted); }
.k-mrow-sw svg { width: 15px; height: 15px; }
.k-mrow-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.k-mrow-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-mrow-kind { font-size: 11.5px; color: var(--k-muted); }
.k-mrow-chev { margin-left: auto; color: var(--k-faint); font-size: 11px; }
.k-mrow-btn { flex: none; width: 26px; height: 26px; border: 0; background: none; border-radius: 6px; color: var(--k-muted); font-size: 13px; line-height: 1; }
.k-mrow-btn:hover:not(:disabled) { background: var(--k-hover); color: var(--k-text); }
.k-mrow-btn:disabled { opacity: 0.3; }
.k-mrow-del:hover:not(:disabled) { background: var(--k-red-soft); color: var(--k-red); }
.k-mdetail { border-top: 1px solid var(--k-border-soft); padding: 0.6rem 0.7rem 0.75rem; background: #fbfbfa; }
.k-mdetail .form-label { font-size: 12px; font-weight: 600; color: var(--k-muted); margin-bottom: 0.2rem; }
.k-props .k-menu-sub-lines { margin: 0 0.45rem 0.45rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.k-madd { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.k-menu-sub-lines .k-madd .btn-link { padding: 0.1rem 0.25rem; font-size: 12.5px; color: var(--k-muted); text-decoration: none; }
.k-menu-sub-lines .k-madd .btn-link:hover { color: var(--k-text); }

/* The Overview card under a project's starting form (owner, 10 Nov 2026, option C). */
.k-form-foot { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--k-border-soft); max-width: 520px; }
.k-foot-card { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--k-border); border-radius: 10px; padding: 0.65rem 0.8rem; background: #fff; color: var(--k-text); text-decoration: none; }
.k-foot-card:hover { background: var(--k-hover); color: var(--k-text); }
.k-foot-card strong { font-size: 14px; }
.k-foot-card span { font-size: 12.5px; color: var(--k-muted); }

/* ---- Question settings, laid out like the owner's full mock (11 Nov 2026) ---- */
.k-props-ico { display: inline-flex; min-width: 1.6em; margin-right: 6px; color: var(--k-navy); font-size: 0.9em; }
.k-props-title { display: flex; align-items: center; font-size: 17px; }
.k-props-sub { font-size: 12.5px; color: var(--k-muted); margin: 4px 0 0; }
.k-props .k-fld { margin-bottom: 16px; }
.k-props .k-fld:first-of-type { margin-top: 12px; }
.k-props .k-f { display: block; font-size: 12.5px; font-weight: 600; margin: 0 0 6px; color: var(--k-text); }
.k-props .k-opt { color: var(--k-faint); font-weight: 400; }
.k-props .k-in { width: 100%; border: 1px solid var(--k-border); border-radius: 7px; padding: 8px 11px; min-height: 38px; background: #fff; color: var(--k-text); font-size: 0.9rem; }
.k-props .k-in:focus { outline: 2px solid rgba(0, 17, 77, 0.16); border-color: var(--k-navy); }
/* Help on settings outside the question panel too (HelpTip, every settings screen). */
.k-help { font-size: 13px; color: var(--k-muted); }
.k-props .k-help { font-size: 12.5px; color: var(--k-faint); margin-top: 5px; }
.k-props .k-lnk { border: 0; background: none; padding: 4px 0; color: var(--k-navy); font-weight: 550; font-size: 0.88rem; }
.k-props .k-lnk:hover { text-decoration: underline; }
.k-props .k-dot { color: var(--k-faint); margin: 0 6px; }
.k-props .k-addrow { display: flex; align-items: center; flex-wrap: wrap; }
.k-props .k-x { border: 0; background: none; color: var(--k-red); padding: 0 4px; line-height: 1; font-size: 0.95rem; }
.k-props .k-x:hover { color: #a5302c; }
.k-optrow { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--k-border-soft); border-radius: 8px; margin-bottom: 6px; background: #fff; cursor: pointer; }
.k-optrow.on { border-color: var(--k-navy); box-shadow: 0 0 0 1px var(--k-navy); }
.k-optrow .k-grip { color: var(--k-faint); cursor: grab; user-select: none; }
.k-optrow input { border: 0; flex: 1; min-width: 0; padding: 2px; background: transparent; color: var(--k-text); }
.k-optrow input:focus { outline: none; }
.k-optrow-ico { display: inline-flex; width: 20px; justify-content: center; }
.k-optrow-ico:empty { display: none; }
.k-optrow-ico svg, .k-optrow-ico img { width: 18px; height: 18px; object-fit: contain; }
.k-optrow-c { width: 18px; height: 18px; border-radius: 50%; background: var(--c); flex: none; }
.k-optrow-new { border-style: dashed; cursor: text; }
.k-usebox { margin-top: 8px; padding: 10px; border: 1px solid var(--k-border-soft); border-radius: 8px; background: #fcfcfb; }
.k-togrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.k-togrow > span { font-weight: 600; font-size: 12.5px; }
.k-fold .k-togrow > span { font-weight: 400; font-size: 0.88rem; }
.k-tog { flex: none; border: 0; background: none; padding: 0; display: inline-flex; cursor: pointer; }
.k-tog i { width: 34px; height: 20px; border-radius: 10px; background: var(--k-border); position: relative; transition: background 0.15s; }
.k-tog i::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.k-tog.on i { background: var(--k-navy); }
.k-tog.on i::after { left: 16px; }
.k-tog:focus-visible { outline: 2px solid var(--k-navy); outline-offset: 2px; border-radius: 10px; }
details.k-fold { border-top: 1px solid var(--k-border-soft); margin-top: 14px; padding-top: 12px; }
details.k-fold > summary { cursor: pointer; font-weight: 650; font-size: 13px; list-style: none; display: flex; justify-content: space-between; color: var(--k-text); }
details.k-fold > summary::-webkit-details-marker { display: none; }
details.k-fold > summary::after { content: "+"; color: var(--k-faint); }
details.k-fold[open] > summary::after { content: "−"; }
details.k-fold[open] > summary { margin-bottom: 10px; }
.k-props .k-seg { border: 0; background: var(--k-hover); border-radius: 8px; padding: 3px; gap: 2px; overflow: visible; }
.k-props .k-seg > button { border: 0 !important; border-radius: 6px; min-height: 28px; height: auto; padding: 0 11px; color: var(--k-muted); font-size: 13px; font-weight: 500; background: transparent; }
.k-props .k-seg > button.on { background: #fff; color: var(--k-navy); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); font-weight: 600; }
.k-props .form-switch .form-check-input:checked { background-color: var(--k-navy); border-color: var(--k-navy); }
.k-props .k-optlook { border-top: 0; padding: 0; }
.k-props-delete { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.k-props .k-optlook .k-iconpick, .k-props .k-optlook .k-imgpick { flex: 1 1 100%; }
.k-props .k-optlook .k-iconpick > summary, .k-props .k-optlook .k-imgpick > summary { display: flex; justify-content: center; min-height: 34px; padding: 6px 10px; border-radius: 7px; font-weight: 500; font-size: 0.88rem; background: #fff; }
.k-props .k-optlook .k-iconpick > summary:hover, .k-props .k-optlook .k-imgpick > summary:hover { background: var(--k-hover); }

/* ---- Pills everywhere, like the mock (11 Nov 2026) ---- */
.k-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k-tag-red { background: var(--k-red-soft); border-color: #f2c5c3; color: #a8322e; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; line-height: 1.5; border: 1px solid var(--k-border);
         border-radius: 6px; padding: 1px 8px; white-space: nowrap; background: #fff; color: var(--k-muted); }
.badge.text-bg-primary, .badge.text-bg-info { background: rgba(0, 17, 77, 0.07) !important; border-color: rgba(0, 17, 77, 0.16); color: var(--k-navy) !important; }
.badge.text-bg-success { background: var(--k-green-soft) !important; border-color: #b6dcb4; color: #2b6b28 !important; }
.badge.text-bg-warning { background: var(--k-yellow-soft) !important; border-color: #ecd9a0; color: #7a5b00 !important; }
.badge.text-bg-danger { background: var(--k-red-soft) !important; border-color: #f2c5c3; color: #a8322e !important; }
.badge.text-bg-secondary, .badge.text-bg-light { background: #fff !important; color: var(--k-muted) !important; }

/* ---- Switches for on/off settings, like the mock (11 Nov 2026): a real tick box drawn as a switch, on the right ---- */
label.k-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 0; cursor: pointer; }
label.k-switch > input[type=checkbox] { order: 2; flex: none; appearance: none; -webkit-appearance: none; width: 34px; height: 20px; margin: 0; border: 0;
    border-radius: 10px; background: var(--k-border); position: relative; cursor: pointer; transition: background 0.15s; }
label.k-switch > input[type=checkbox]::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px;
    transition: left 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
label.k-switch > input[type=checkbox]:checked { background: var(--k-navy); }
label.k-switch > input[type=checkbox]:checked::after { left: 16px; }
label.k-switch > input[type=checkbox]:focus-visible { outline: 2px solid var(--k-navy); outline-offset: 2px; }

/* ---- The recording pages, like the mock (11 Nov 2026) ---- */
.k-form-title { margin-bottom: 0.1rem; }
.k-form-sub { color: var(--k-faint); font-size: 0.85rem; margin-bottom: 0.9rem; }
@media (max-width: 600px) { .k-form-title { font-size: 1.6rem; } }
/* Reminders: a compact row with its icon, its words, and Done / Due / Late on the right. */
.kc-canvas .kc-reminder.kc-rem { position: relative; inset: auto; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.65em;
    min-height: 3.2em; padding: 0.6em 0.75em; border: 1px solid var(--k-border); border-radius: 0.75em; background: #fff; color: var(--k-text);
    text-align: left; font-weight: 500; text-decoration: none; filter: none; }
.kc-design .kc-reminder.kc-rem { height: 100%; }
.kc-canvas .kc-reminder.kc-rem:hover { background: var(--k-hover); color: var(--k-text); }
.kc-canvas .kc-reminder.kc-rem.due { background: #fffcf2; border-color: #ecd9a0; color: var(--k-text); }
.kc-canvas .kc-reminder.kc-rem.due.late { background: #fdf0ef; border-color: #f2c5c3; color: var(--k-text); }
.kc-canvas .kc-reminder.kc-rem.done { background: #f6faf5; border-color: #cfe6cd; }
.kc-canvas .kc-reminder.kc-rem.kc-col { background: var(--kc-f); border-color: color-mix(in srgb, var(--kc-b, var(--kc-c)) 55%, #fff); color: var(--k-text); }
.kc-canvas .kc-reminder.kc-rem.kc-col .kc-rem-ico { color: var(--kc-b, var(--kc-c)); background: rgba(255, 255, 255, 0.6); }
.kc-rem-ico { flex: none; display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 0.5em; background: rgba(0, 17, 77, 0.07); color: var(--k-navy); }
.kc-rem-ico[data-g]::before { content: attr(data-g); }
.kc-rem.done .kc-rem-ico { background: #e8f4e7; color: #2b6b28; }
.kc-rem-ico svg { width: 1.2em; height: 1.2em; }
.kc-rem-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.kc-rem-name { overflow-wrap: anywhere; }
.kc-canvas .kc-reminder.kc-rem small { color: var(--k-faint); font-size: 0.78em; font-weight: 400; opacity: 1; }
.kc-rem-st { flex: none; font-size: 0.75em; font-weight: 500; border: 1px solid var(--k-border); border-radius: 6px; padding: 0.05em 0.6em; background: #fff; color: var(--k-muted); }
.kc-rem-st.due { background: var(--k-yellow-soft); border-color: #ecd9a0; color: #7a5b00; }
.kc-rem-st.late { background: var(--k-red-soft); border-color: #f2c5c3; color: #a8322e; }
.kc-rem-st.done { background: var(--k-green-soft); border-color: #b6dcb4; color: #2b6b28; }
/* Menu buttons: the icon in a small tile, the words bold, no arrow. */
.kc-canvas .kc-menu-btn { min-height: 3.5em; gap: 0.6em; border-radius: 0.75em; color: var(--k-navy); font-weight: 600; }
.kc-canvas .kc-menu-btn:not(.kc-menu-group)::after { content: none; }
.kc-canvas .kc-menu-btn.kc-menu-group::after { margin-left: auto; color: var(--k-faint); }
.kc-canvas .kc-menu-btn .kc-ico { flex: none; display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 0.5em; background: rgba(0, 17, 77, 0.07); }
.kc-canvas .kc-menu-btn .kc-ico svg { width: 1.2em; height: 1.2em; margin: 0; }
.kc-canvas .kc-menu-btn.kc-col .kc-ico { background: rgba(255, 255, 255, 0.6); }

/* Project page entries as one short line (owner's mock, 11 Nov 2026): "Water · 250 mL · Cup". */
.k-ent-ans .k-answer { display: inline; margin: 0; color: var(--k-text); }
.k-ent-ans .k-answer + .k-answer::before { content: " · "; color: var(--k-faint); }

/* A group's figure under a group or individual question (owner, 11 Nov 2026). */
.kc-assess-fig { display: inline-block; margin-right: 10px; padding: 1px 8px; border-radius: 999px; background: var(--k-navy-soft, #eef2f8); }
.kc-assess-fig small { color: var(--k-muted); }

/* Dashboard entries: a space after the form's name (11 Nov 2026). */
.k-dash-entries strong { margin-right: .35em; }

/* A block that averages an ordered scale (owner's spec, 11 Nov 2026): a small marker with the explanation. */
.k-kind-note { margin-left: auto; margin-right: 8px; color: var(--k-warn, #9a6700); cursor: help; font-size: 12px; }
.k-seg-wrap { flex-wrap: wrap; }

/* "Not applicable" / "Prefer not to answer" (owner's spec, 11 Nov 2026): quieter than the answers. */
.kc-missing { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kc-choice.kc-choice-missing { min-height: 34px; font-size: 13px; border-style: dashed; background: transparent; }

/* Comparing groups (owner's specs, 11 Nov 2026). */
.k-compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.k-compare-main { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.k-compare-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }
.k-compare-facts dt { font-weight: 500; color: var(--k-muted); } .k-compare-facts dd { margin: 0; }
.k-compare-total { border-style: dashed; }

/* Input devices (owner, 12 Nov 2026): the switch to designing shows only on touch devices; its words say what it does. */
.k-device-toggle { display: none !important; }
html[data-touch] .k-device-toggle { display: flex !important; }
html[data-input] .k-dt-input, html:not([data-input]) .k-dt-design { display: none; }

/* A menu button not usable here (13 Nov 2026): not wired in this workflow (Designer only), or another workflow the person
   cannot use, shown greyed when the Designer chose it. */
.kc-menu-off { opacity: 0.45; cursor: not-allowed; border-style: dashed; }
.kc-menu-off::after { content: none; }
.kc-menu .kc-reminder.kc-rem { min-height: 3.6em; }
/* A menu button without text of its own: the name of what it opens, greyed (14 Nov 2026). */
.k-mrow-name.k-mrow-default { color: var(--k-muted); font-weight: 400; font-style: italic; }

/* The people-and-groups grid (14 Nov 2026): the names stay in view when scrolling across many groups. */
.k-people-grid th[scope=row], .k-people-grid thead th:first-child { position: sticky; left: 0; background: var(--bs-body-bg); z-index: 1; min-width: 12rem; }
.k-people-grid thead th:first-child { z-index: 3; }

/* Group and individual questions: pick a look (14 Nov 2026). */
.k-looks { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.k-looks-cards { flex: 999 1 26rem; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; }
/* OPNsense-style help: a short line, "More" for the detail, then a link to the help page. */
.k-help-more > summary { display: inline-block; cursor: pointer; font-size: .8rem; color: var(--k-text); text-decoration: underline; text-decoration-color: var(--k-border); text-underline-offset: 3px; list-style: none; }
.k-help-more > summary::-webkit-details-marker { display: none; }
.k-help-more > summary::after { content: "▸"; text-decoration: none; display: inline-block; margin-left: .2rem; }
.k-help-more[open] > summary::after { content: "▾"; }
.k-help-more > summary:hover { text-decoration-color: var(--k-text); }
.k-help-more { margin-bottom: .35rem; }
.k-help-more[open] { border-left: 2px solid var(--k-border); padding-left: .6rem; margin: .25rem 0 .25rem; }
.k-help-more[open] > summary { display: block; margin-bottom: .25rem; }
.k-help-link { font-size: .8rem; }
.k-look { display: flex; flex-direction: column; gap: .2rem; text-align: left; padding: .6rem .75rem; border: 2px solid var(--bs-border-color); border-radius: .6rem; background: var(--bs-body-bg); color: inherit; min-height: 4.5rem; }
.k-look:hover { border-color: var(--bs-secondary-color); }
.k-look.on { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .18); }
.k-look-name { font-weight: 600; font-size: .9rem; }
.k-look-desc { font-size: .78rem; color: var(--bs-secondary-color); line-height: 1.35; }
.k-look-preview { flex: 1 1 17rem; min-width: 0; border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .75rem .9rem; background: var(--bs-tertiary-bg); }
.k-look-preview-hd { font-size: .78rem; font-weight: 600; margin-bottom: .35rem; }
.k-look-preview-hd span { font-weight: 400; color: var(--bs-secondary-color); }
.k-look-q { font-weight: 600; margin-bottom: .35rem; padding-bottom: .35rem; border-bottom: 1px solid var(--bs-border-color); }
.k-look-line { font-size: .85rem; }
.k-look-line span { color: var(--bs-secondary-color); font-size: .75rem; margin-left: .4rem; }
.k-look-group { font-weight: 600; margin-top: .25rem; }
.k-look-person { padding-left: .75rem; }
.k-look-dim { padding-left: .75rem; opacity: .5; }
.k-look-figure { font-weight: 600; }
.k-look-note { color: var(--bs-secondary-color); }
.k-look-flag { color: #9a3412; font-weight: 600; }
.k-fine-tune > summary { cursor: pointer; font-weight: 600; }

/* A website form inside another site (14 Nov 2026): just the form, and a tiny "made with kep7" line. */
.k-embed { padding: 12px 16px 4px; }
.k-embed h1 { font-size: 1.5rem; }
.k-made-with { font-size: 11px; text-align: right; margin: 4px 16px 8px; }
.k-made-with a { color: var(--bs-secondary-color, #6c757d); text-decoration: none; }
.k-made-with a:hover { text-decoration: underline; }

/* Messages from a form's rules (14 Nov 2026). */
.k-rule-messages { max-width: 760px; }

/* The blocks editor (14 Nov 2026). */
.k-rules { height: calc(100vh - 220px); min-height: 480px; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 8px; overflow: hidden; }

/* Help centre (owner, 16 Nov 2026): the user manual as pages, Contact support, and the small "?" beside screen names. */
.k-help-q { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px;
            border-radius: 50%; border: 1px solid var(--k-border); color: var(--k-muted); font-size: 12px; font-weight: 650;
            text-decoration: none; line-height: 1; flex: none; vertical-align: middle; }
.k-help-q:hover, .k-help-q:focus-visible { background: var(--k-accent-soft); color: var(--k-navy); border-color: var(--k-navy-mid); }
.k-help-search { max-width: 40rem; }
.k-help-h { font-size: 1rem; font-weight: 650; color: var(--k-navy); margin: 1.6rem 0 0.6rem; text-transform: none; letter-spacing: 0; padding: 0; border: 0; }
.k-help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 12px; max-width: 48rem; margin: 0.5rem 0 1rem; }
.k-help-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--k-border-soft);
               border-radius: 10px; text-decoration: none; color: var(--k-text); background: var(--k-bg); }
.k-help-card:hover { border-color: var(--k-navy-mid); background: var(--k-hover); }
.k-help-card strong { color: var(--k-navy); }
.k-help-card span { font-size: 0.9rem; color: var(--k-muted); }
.k-help-chapters { padding-left: 1.6rem; margin: 0; line-height: 1.9; }
.k-help-results { list-style: none; padding: 0; max-width: 46rem; }
.k-help-results li { padding: 8px 0; border-bottom: 1px solid var(--k-border-soft); }
.k-help-where { margin-left: 8px; font-size: 0.85rem; color: var(--k-faint); }
.k-help-snippet { font-size: 0.9rem; color: var(--k-muted); }
.k-help-layout { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: 32px; align-items: start; }
.k-help-toc { position: sticky; top: 16px; font-size: 0.88rem; }
.k-help-toc-h { font-weight: 650; color: var(--k-navy); margin-bottom: 6px; }
.k-help-toc ul { list-style: none; padding: 0; margin: 0; }
.k-help-toc li { padding: 3px 0 3px 10px; border-left: 3px solid transparent; }
.k-help-toc a { color: var(--k-muted); text-decoration: none; }
.k-help-toc a:hover { color: var(--k-navy); text-decoration: underline; }
.k-help-toc a.on { color: var(--k-navy); font-weight: 650; }  /* the section being read (js/helptoc.js) */
.k-help-toc li:has(a.on) { border-left-color: var(--k-accent); }
.k-help-body { line-height: 1.6; }
.k-help-body h2 { font-size: 1.2rem; font-weight: 650; color: var(--k-navy); margin: 2rem 0 0.6rem; text-transform: none; letter-spacing: 0; padding: 0; border: 0; scroll-margin-top: 16px; }
.k-help-body h3 { font-size: 1rem; font-weight: 650; color: var(--k-text); margin: 1.4rem 0 0.4rem; scroll-margin-top: 16px; }
.k-help-body h4 { font-size: .95rem; font-weight: 600; color: var(--k-text); margin: 1.1rem 0 0.3rem; scroll-margin-top: 16px; }
.k-help-body h2:target, .k-help-body h3:target, .k-help-body h4:target { background: var(--k-yellow-soft); border-radius: 4px; }
.k-help-body li { margin: 3px 0; }
.k-help-table { font-size: 0.92rem; }
.k-help-table th { background: var(--k-green-soft); }
.k-help-box { border-left: 4px solid var(--k-border); background: var(--k-blue-soft); padding: 10px 14px; border-radius: 6px; margin: 0.8rem 0; }
.k-help-tip { border-left-color: var(--k-green); background: var(--k-green-soft); }
.k-help-important { border-left-color: #b5551d; background: #fdf0e6; }
.k-help-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 2.5rem; padding-top: 12px; border-top: 1px solid var(--k-border-soft); }
.k-support-msg { border: 1px solid var(--k-border-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; max-width: 48rem; }
.k-support-head { font-size: 0.92rem; margin-bottom: 6px; }
.k-support-text { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 860px) {
    .k-help-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .k-help-toc { position: static; }
}

/* A Designer's Home (owner, 16 Nov 2026): project cards like NotebookLM's notebooks (js/projects.js). */
.k-home-h { font-size: 1.05rem; font-weight: 650; color: var(--k-navy); margin: 1.25rem 0 .6rem; }
.k-home-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 1.5rem 0 .75rem; }
.k-home-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-home-tools .form-select, .k-home-tools .form-control { width: auto; min-width: 140px; }
.k-home-tools .k-seg .btn { min-width: 34px; }
.k-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 1rem; }
.k-pcard { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 168px; padding: 14px 16px; border: 1px solid var(--k-border); border-radius: 14px; background: var(--k-surface, #fff); transition: box-shadow .15s, border-color .15s; }
.k-pcard:hover { border-color: var(--k-accent); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.k-pcard-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.k-pcard-link:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
.k-pcard-top { display: flex; justify-content: space-between; align-items: center; }
.k-pcard-ico { font-size: 1.5rem; }
.k-pcard-star { position: relative; z-index: 2; margin: 0; }
.k-pcard-star button { border: 0; background: none; font-size: 1.25rem; line-height: 1; color: var(--k-muted); padding: 2px 4px; border-radius: 6px; }
.k-pcard-star button[aria-pressed="true"] { color: #c98a00; }
.k-pcard-star button:hover { background: var(--k-hover); }
.k-pcard-name { font-size: 1rem; color: var(--k-navy); margin-top: 6px; overflow-wrap: anywhere; }
.k-pcard-in { font-size: .8rem; color: var(--k-muted); }
.k-pcard-what { font-size: .85rem; color: var(--k-muted); }
.k-pcard-dates { margin-top: auto; display: flex; flex-direction: column; font-size: .78rem; color: var(--k-faint); }
.k-pcard-new { align-items: center; justify-content: center; border-style: dashed; }
.k-pcard-newbtn { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--k-navy); font-weight: 600; width: 100%; height: 100%; justify-content: center; }
.k-pcard-plus { font-size: 2rem; line-height: 1; }
.k-plist { grid-template-columns: 1fr; gap: 6px; }
.k-plist .k-pcard { min-height: 0; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px 14px; padding: 10px 14px; }
.k-plist .k-pcard > * { white-space: nowrap; }
.k-plist .k-pcard-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.k-plist .k-pcard-what, .k-plist .k-pcard-in { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 860px) { .k-plist .k-pcard { flex-wrap: wrap; } .k-plist .k-pcard > * { white-space: normal; } }
.k-plist .k-pcard-top { order: 9; margin-left: auto; }
.k-plist .k-pcard-ico { display: none; }
.k-plist .k-pcard-name { margin-top: 0; }
.k-plist .k-pcard-dates { margin-top: 0; flex-direction: row; gap: 12px; }
.k-plist .k-pcard-new { flex-direction: row; }
.k-plist .k-pcard-newbtn { flex-direction: row; }
.k-plist .k-pcard-plus { font-size: 1.2rem; }
@media (max-width: 600px) { .k-home-tools { width: 100%; } .k-home-tools .form-control { flex: 1; } }

/* The top bar and account menu (owner, 16 Nov 2026: "like google does, an icon in the top right hand corner"). */
.k-top { position: sticky; top: 0; z-index: 60; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--k-bg); border-bottom: 1px solid var(--k-border-soft); }
.k-top-brand { display: inline-flex; align-items: center; padding: 4px 6px; border-radius: 6px; }
.k-top-brand:hover { background: var(--k-hover); }
.k-top-brand .k-wordmark { height: 26px; width: auto; }
.k-top-menu { display: inline-flex; padding: 6px; border-radius: 6px; color: var(--k-muted); cursor: pointer; }
.k-top-menu:hover { background: var(--k-hover); }
.k-top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.k-top-help { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--k-border); color: var(--k-muted); text-decoration: none; font-weight: 600; }
.k-top-help:hover { background: var(--k-hover); color: var(--k-text); }
.k-acct { position: relative; }
.k-acct > summary { list-style: none; }
.k-acct > summary::-webkit-details-marker { display: none; }
.k-acct-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--k-navy); color: #fff; font-weight: 650; font-size: .85rem; cursor: pointer; user-select: none; }
.k-acct-btn:hover, .k-acct[open] .k-acct-btn { box-shadow: 0 0 0 3px var(--k-accent-soft); }
.k-acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; max-width: calc(100vw - 32px); z-index: 70; }
.k-acct-who { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--k-border-soft); margin-bottom: 4px; }
.k-acct-who strong { color: var(--k-navy); overflow-wrap: anywhere; }
.k-acct-who span { font-size: .82rem; color: var(--k-muted); overflow-wrap: anywhere; }
.k-acct-menu form { margin: 0; }
.k-acct-foot { border-top: 1px solid var(--k-border-soft); margin-top: 4px; padding: 8px 12px 4px; font-size: .75rem; color: var(--k-faint); }
.k-acct-foot a { color: var(--k-faint); display: inline !important; padding: 0 !important; }
.k-acct-foot a:hover { color: var(--k-text); }
/* Inside a project's sidebar (ProjectNav). */
.k-pnav-name { padding: 10px 10px 4px; font-weight: 650; color: var(--k-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-pnav-h { padding: 12px 10px 4px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--k-faint); }
.k-pnav-ico { width: 18px; text-align: center; flex-shrink: 0; }
/* What's made in a project (owner, 17 Nov 2026), under headings that open and close. */
.k-pnav-kind > summary { list-style: none; cursor: pointer; }
.k-pnav-kind > summary::-webkit-details-marker { display: none; }
.k-pnav-kind > summary::after { content: "▸"; margin-left: auto; color: var(--k-faint); font-size: .75rem; }
.k-pnav-kind[open] > summary::after { content: "▾"; }
.k-pnav-res { padding-left: 38px; font-size: .9rem; }
.k-pnav-new { margin: 0; }
.k-pnav-new button { width: 100%; background: none; border: 0; text-align: left; color: var(--k-faint); }
.k-pnav-new button:hover { color: var(--k-navy); }
@media (min-width: 768px) { html:not([data-input]) .k-top-menu { display: none; } } /* the sidebar is always open here */

/* A linked project's things, under a branch named for it (owner, 19 Nov 2026: "tree view too"). */
.k-set-branch { margin: .25rem 0 .5rem; }
.k-set-branch > summary { cursor: pointer; font-weight: 600; padding: .15rem 0; }
.k-set-branch > :not(summary) { margin-left: 1.25rem; }

/* A linked project in a project's sidebar is a tree: its kinds sit one step in, their items two (owner, 19 Nov 2026). */
.k-pnav-sub { padding-left: 14px; }
.k-nav .k-pnav-sub .k-pnav-kind .k-pnav-res { padding-left: 46px; }
.k-change-serious { color: var(--bs-danger-text-emphasis, #842029); }
/* Ready-made rules (20 Nov 2026) */
.k-ready-rules { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem; padding: .5rem .75rem; background: var(--bs-body-bg, #fff); }
.k-ready-rules > summary { cursor: pointer; }
.k-ready-body { margin-top: .5rem; max-width: 60rem; }
.k-ready-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.k-ready-inline { width: auto; max-width: 18rem; display: inline-block; }
.k-ready-value { width: 6rem; }
.k-ready-words { flex: 1 1 16rem; min-width: 12rem; }
.k-ready-ticks { width: 100%; }
/* Start collecting (20 Nov 2026) */
.k-start { max-width: 52rem; }
.k-start-q { border-bottom: 1px solid var(--bs-border-color, #dee2e6); padding: .5rem 0; }
.k-start-num { width: 1.5rem; font-weight: 600; color: var(--bs-secondary-color, #6c757d); }
.k-start-text { flex: 1 1 18rem; min-width: 12rem; }
.k-start-type { width: auto; }
.k-start-answers { margin-left: 2rem; width: calc(100% - 2rem); }
a.k-pcard-start { text-decoration: none; color: inherit; }
.k-number-of { font-size: .5em; color: var(--bs-secondary-color, #6c757d); font-weight: 500; }
