/* Kinetic One · Kinetic Form tokens and the four product families (approved Nov 12 2026).
   Only applies while Kinetic One is on (body.kone, set by shared/kone.js), on top of the new look (body.kf).
   Contrast: every text color below was checked against the surface it sits on (WCAG 2.2 AA, 4.5:1 for text). */
body.cv.kf.kone{
  --k-ink:#171B29;--k-canvas:#F6F1E9;--k-canvas-2:#F2EEE7;--k-surface:#FFFFFF;--k-muted:#5D6270;--k-line:#DED6C6;--k-line-strong:#8F887A;--k-selected:#E9E0CC;
  --k-success:#2F6B4A;--k-warning:#8A5A00;--k-error:#A23B2A;--k-ai:#5B4F99;--k-focus:#171B29;
  --c-ink:var(--k-ink);--c-muted:var(--k-muted);--c-bad:var(--k-error);
}
body.cv.kf.kone.night{--k-ink:#F2EEE7;--k-muted:#A8ACB8;--k-line-strong:#5E6474;--k-success:#7FC29B;--k-warning:#E2B45A;--k-error:#F08A78;--k-ai:#B3A8F0;--k-focus:#D5B784;--c-ink:#F2EEE7;--c-muted:#A8ACB8}
/* Family identities: an accent for stripes and marks, and a darker shade wherever the accent is text or a button. */
body.kone[data-family="one"]{--k-acc:#D5B784;--k-acc-text:#7D5C1B}
body.kone[data-family="studio"]{--k-acc:#9C793E;--k-acc-text:#806230}
body.kone[data-family="flow"]{--k-acc:#A9BCA9;--k-acc-text:#2F4637}
body.kone[data-family="hub"]{--k-acc:#D5B784;--k-acc-text:#7D5C1B}
body.cv.kf.kone[data-family]:not(.night){--c-accent:var(--k-acc-text);--c-accent2:var(--k-acc-text)}
body.cv.kf.kone[data-family="studio"]:not(.night){--c-bg:var(--k-canvas-2)}
body.kone :focus-visible{outline:2px solid var(--k-focus);outline-offset:2px}
body.kone .cside :focus-visible,body.kone .k1-rail :focus-visible{outline-color:#D5B784}

/* ---- family stripe and label on each page's header ---- */
body.kone .st-hero{border-top:4px solid var(--k-acc)}
body.kone[data-family="one"] .st-hero .st-eyebrow::before{content:"Kinetic One · "}
body.kone[data-family="studio"] .st-hero .st-eyebrow::before{content:"Kinetic Studio · "}
body.kone[data-family="flow"] .st-hero .st-eyebrow::before{content:"Kinetic Flow · "}
body.kone[data-family="hub"] .st-hero .st-eyebrow::before{content:"Kinetic Hub · "}

/* ---- desktop: rail of families + panel of areas ---- */
@media (min-width:981px){
  body.kf.kone #root{grid-template-columns:292px minmax(0,1fr)}
  body.kf.kone .cside{flex-direction:row;padding:0}
  body.kone .k1-famsw-slot,body.kone .k1-areas-slot,body.kone .k1-bar-slot{display:none}
}
body.kone .k1-rail{flex:none;width:72px;display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0;background:color-mix(in srgb,var(--st-side,#171B29) 80%,#000);position:relative;z-index:1}
body.kone .k1-mark{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-weight:700;color:#171B29;background:#D5B784;margin-bottom:12px}
body.kone .k1-fam{width:60px;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:10px;background:transparent;color:color-mix(in srgb,var(--st-side-ink,#fff) 72%,transparent);font:500 .7rem/1 var(--body);cursor:pointer;position:relative}
body.kone .k1-fam:hover{background:color-mix(in srgb,var(--st-side-ink,#fff) 8%,transparent);color:var(--st-side-ink,#fff)}
body.kone .k1-fam[aria-current]{background:color-mix(in srgb,var(--st-side-ink,#fff) 13%,transparent);color:var(--st-side-ink,#fff);font-weight:600}
body.kone .k1-fam[aria-current]::before{content:"";position:absolute;left:-6px;top:12px;bottom:12px;width:3px;border-radius:2px;background:var(--k-acc,#D5B784)}
body.kone .k1-panel{flex:1;min-width:0;display:flex;flex-direction:column;padding:22px 12px 18px;overflow-y:auto;position:relative;z-index:1}
body.kone .k1-panel .st-brand{padding:2px 10px 18px}
body.kone .k1-famhead{display:flex;flex-direction:column;gap:2px;padding:0 12px 12px}
body.kone .k1-famhead b{font-size:1.02rem;font-weight:600;color:var(--st-side-ink,#fff)}
body.kone .k1-famhead span{font:500 .68rem/1.2 var(--mono,monospace);letter-spacing:.12em;text-transform:uppercase;color:var(--k-acc,#D5B784)}

/* ---- top bar: Create (desktop) and the family switcher (phones) ---- */
body.kone .k1-create{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border-radius:10px;border:1px solid transparent;background:var(--k-ink);color:#F6F1E9;font:600 .9rem var(--body);cursor:pointer}
body.kone.night .k1-create{background:#D5B784;color:#171B29}
body.kone .k1-famsw{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 8px;border:0;background:transparent;color:inherit;font:600 1rem var(--body);cursor:pointer}

/* ---- phones and tablets: area tabs under the header, families along the bottom ---- */
@media (max-width:980px){
  body.kone .k1-rail{display:none}
  body.kone .k1-create{display:none}
  body.kf.kone .ctop .cb>.k1-famsw-slot{display:flex;min-width:0}
  body.kone .k1-famsw span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
  body.kone .ctop .kf-cmdbtn{font-size:0;min-width:44px;min-height:44px;padding:0 10px}
  body.kone .ctop .kf-cmdbtn .kf-key,body.kone .ctop .kf-cmdbtn .kf-cmdtxt{display:none}
  body.kone .ctop .kf-cmdbtn::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center/contain no-repeat}
  body.kone .ctop .st-ib{display:none}   /* alerts live on Today in One; files are in One and Studio */
  body.kone .ctop .mode{font-size:0;min-width:44px;height:44px;padding:0;justify-content:center}
  body.kone .ctop .cuser{margin-left:auto;flex:0 0 auto;gap:8px}   /* search, night and you always fit; the app name shortens instead */
  body.kone .ctop .cb{flex:1 1 auto;min-width:0;overflow:hidden}
  body.kone .k1-areas-slot{position:sticky;top:var(--top-h,56px);z-index:20;background:var(--c-bg)}
  body.kone .k1-areas{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;padding:6px 12px;border-bottom:1px solid var(--k-line)}
  body.kone .k1-areas::-webkit-scrollbar{display:none}
  body.kone .k1-areas button{flex:none;min-height:44px;padding:0 12px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--k-muted);font:500 .92rem var(--body);cursor:pointer;white-space:nowrap}
  body.kone .k1-areas button[aria-current]{color:var(--k-ink);font-weight:600;border-bottom-color:var(--k-acc)}
  body.kone .k1-bar{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;justify-content:space-around;padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:var(--c-surface,#fff);border-top:1px solid var(--k-line)}
  body.kone .k1-bar button{flex:1;min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;border-radius:10px;background:transparent;color:var(--k-muted);font:500 .72rem var(--body);cursor:pointer}
  body.kone .k1-bar button[aria-current]{color:var(--k-ink);font-weight:600}
  body.kone .k1-bar button[aria-current] svg{background:color-mix(in srgb,var(--k-acc) 45%,transparent);border-radius:999px;padding:2px 12px;box-sizing:content-box}
  body.kone #root{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  body.kone .kbadge{display:none}
  body.kone:has(input:focus,textarea:focus,select:focus,[contenteditable="true"]:focus) .k1-bar,body.kone:has(#wsov) .k1-bar{display:none}
}

/* ---- switcher and Create sheet ---- */
.k1-sheet{position:fixed;inset:0;z-index:200}
.k1-sheet *,.k1-sheet-box{box-sizing:border-box}
.k1-scrim{position:absolute;inset:0;background:rgba(23,27,41,.45)}
.k1-sheet-box{position:absolute;left:0;right:0;bottom:0;max-height:85vh;overflow:auto;background:var(--c-surface,#fff);color:var(--c-text,#2A2F38);border-radius:16px 16px 0 0;padding:18px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(23,27,41,.2)}
@media (min-width:981px){.k1-sheet-box{left:50%;top:14vh;bottom:auto;width:440px;transform:translateX(-50%);border-radius:14px}}
.k1-sheet-box h2{margin:0 0 10px;font-size:1.1rem;color:var(--c-ink,#171B29)}
.k1-list{display:flex;flex-direction:column;gap:4px}
.k1-list button{display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:center;text-align:left;min-height:52px;padding:8px 12px;border:1px solid transparent;border-radius:10px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.k1-list button:not(:has(svg)){grid-template-columns:1fr}
.k1-list button svg{grid-row:span 2}
.k1-list button:hover,.k1-list button[aria-current]{background:var(--k-selected,#E9E0CC);color:#171B29}
.k1-list b{font-weight:600}.k1-list span{font-size:.85rem;color:var(--c-muted,#5D6270)}
.k1-list button:hover span,.k1-list button[aria-current] span{color:#3A3F4B}
.k1-sheet-x{margin-top:10px;width:100%;min-height:44px;border:1px solid var(--k-line-strong,#8F887A);border-radius:10px;background:transparent;color:inherit;font:600 .95rem var(--body,inherit);cursor:pointer}

/* ---- Flow: My work ---- */
.k1-ul{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column}
.k1-row{display:flex;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--c-line)}
.k1-row:last-child{border-bottom:0}
.k1-row span{display:flex;flex-direction:column;gap:2px;min-width:0}
.k1-row b{font-weight:600;color:var(--c-ink);overflow-wrap:anywhere}
.k1-row small{color:var(--c-muted);font-size:.84rem}
.k1-grp+.k1-grp{margin-top:10px}
.k1-lab{display:inline-block;font:600 .72rem/1 var(--mono,monospace);letter-spacing:.08em;text-transform:uppercase;color:var(--c-muted);margin:0 0 4px}
.k1-lab.bad,.k1-bad{color:var(--c-bad,#A23B2A)}
.k1-lab.bad::before{content:"! "}
/* "Operations" is the longest family name in the 60px rail (Nov 28 2026) */
.k1-fam span{max-width:58px;white-space:nowrap;letter-spacing:-.01em}
