/* ============================================================
   Nexbase — Style system (2026 redesign)
   Built from Main_Template / Dashboard / On-Going / In-coming mockups.
   Rail #CC4700 · Accent #FF5900 · Page #232323
   Sizes follow ClickUp's density: fixed pixel sizes, 1rem = 10px.
   ============================================================ */

/* ── Fonts (unchanged from current Nexbase) ── */
@font-face {
    font-family: 'D-DIN Condensed';
    src: url('../fonts/D-DINCondensed.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DIN Next LT Pro';
    src: url('../fonts/DINNextLTPro-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Fixed density, sized against ClickUp (1rem = 10px). */
html { font-size: 10px; }

/* ── Tokens (dark — the mockups) ── */
body {
    --rail: #cc4700;
    --rail-active: rgba(255, 255, 255, 0.28);
    --accent: #ff5900;
    --accent-press: #e65000;
    --accent-soft: rgba(255, 89, 0, 0.19);
    --accent-text: #ff6a1a;

    --bg: #232323;
    --surface: #393939;
    --frame: #2a2a2a;
    --panel: #353535;
    --track: #474747;
    --chip: rgba(210, 210, 210, 0.19);
    --chip-hover: rgba(210, 210, 210, 0.28);
    --well: #161616;
    --line: #ffffff;
    --hair: rgba(255, 255, 255, 0.12);
    --grey-btn: #878787;

    --ink: #ffffff;
    --ink-2: #c8c8c8;
    --ink-3: #8e8e8e;
    --on-rail-active: #141414;

    --success: #22c55e;
    --warning: #f5a524;
    --danger: #ff4d4d;
    --info: #4b8bff;
    --purple: #9b7bff;

    --r-xl: 3rem;
    --r-lg: 2.4rem;
    --r-md: 1.2rem;
    --r-sm: 0.8rem;

    --font-heading: 'D-DIN Condensed', 'DIN Next LT Pro', sans-serif;
    --font-body: 'DIN Next LT Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Aliases kept for Docs / Updates / Chat / Brainstorm / Gantt modules */
    --orange: var(--accent);
    --orange-hover: var(--accent-press);
    --orange-light: var(--accent-soft);
    --orange-glow: rgba(255, 89, 0, 0.25);
    --dark: #1c1c1c;
    --dark-card: var(--surface);
    --dark-surface: #333333;
    --dark-border: var(--hair);
    --dark-hover: #444444;
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--ink-3);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --topnav-height: 0px;
    --panel-w: 25rem;
    --ease-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
    --t-snap: 0.2s;

    /* Layers — measured from Side_Rail / Selector / Selections / Panel SVGs.
       Edges are ONE even 1px ring (inset 0 0 0 1px), never 1px lines shifted to a side (Aaron, 29 Oct 2026):
       on round corners a shifted line becomes a crescent, thick mid-corner. Depth comes from the soft --lift
       shadows below; a surface never has both a border and an edge ring (that draws two outlines). */
    --rail-bg: linear-gradient(90deg, #cc4f0c 0%, #d95c19 50%, #e76a28 100%);
    --rail-edge: inset 0 0 0 1px rgba(255, 150, 90, 0.35);
    --rail-edge-c: rgba(255, 150, 90, 0.35);
    --selector-bg: linear-gradient(to bottom left, rgba(255, 255, 255, 0.45), rgba(240, 240, 240, 0.45) 45%, rgba(170, 170, 170, 0.45));
    --accent-edge: inset 0 0 0 1px rgba(255, 150, 90, 0.45);
    --accent-edge-c: rgba(255, 150, 90, 0.45);
    --panel-bg: linear-gradient(90deg, #424242 0%, #474747 50%, #4e4e4e 100%);
    --panel-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
    --panel-edge-c: rgba(255, 255, 255, 0.07);     /* each edge's colour, for the squircle layer */
    --frame-bg: linear-gradient(90deg, #282828 0%, #2c2c2c 50%, #303030 100%);
    --column-bg: linear-gradient(90deg, #333333 0%, #363636 50%, #3a3a3a 100%);
    --grey-btn-bg: linear-gradient(90deg, #4c4c4c 0%, #545454 100%);
    --dd-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8c8c8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    --grey-btn-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    --grey-btn-edge-c: rgba(255, 255, 255, 0.09);
    --pressed: inset 0 1px 2px rgba(0, 0, 0, 0.65), inset 0 -1px 0 rgba(255, 255, 255, 0.05);     /* wells: kept as designed (sets where the To-do / Calendar circles look centred) */
    --lift: 0 0 0.6rem rgba(0, 0, 0, 0.3), 0 0 1.4rem rgba(0, 0, 0, 0.24);          /* shadows even on all four sides: no y offset */
    --lift-sm: 0 0 2px rgba(0, 0, 0, 0.35), 0 0 0.6rem rgba(0, 0, 0, 0.2);
    --float: 0 0 1rem rgba(0, 0, 0, 0.35), 0 0 4rem rgba(0, 0, 0, 0.45);
}

/* ── Tokens (light) ── */
body.light {
    --rail-active: rgba(255, 255, 255, 0.32);
    --accent-text: #d24a00;
    --bg: #e6e6e6;
    --surface: #ffffff;
    --frame: #f7f7f7;
    --panel: #ffffff;
    --track: #d9d9d9;
    --chip: rgba(0, 0, 0, 0.07);
    --chip-hover: rgba(0, 0, 0, 0.12);
    --well: #f1f1f1;
    --line: #2b2b2b;
    --hair: rgba(0, 0, 0, 0.12);
    --grey-btn: #c2c2c2;
    --ink: #161616;
    --ink-2: #474747;
    --ink-3: #7a7a7a;
    --dark: #f1f1f1;
    --dark-surface: #f6f6f6;
    --dark-hover: #ececec;

    --panel-bg: linear-gradient(90deg, #f5f5f5 0%, #fafafa 50%, #ffffff 100%);
    --panel-edge: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    --panel-edge-c: rgba(0, 0, 0, 0.05);
    --frame-bg: linear-gradient(90deg, #e9e9e9 0%, #ededed 50%, #f1f1f1 100%);
    --column-bg: linear-gradient(90deg, #e3e3e3 0%, #e7e7e7 50%, #ebebeb 100%);
    --grey-btn-bg: linear-gradient(90deg, #f1f1f1 0%, #fafafa 100%);
    --dd-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23474747' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    --grey-btn-edge: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
    --grey-btn-edge-c: rgba(0, 0, 0, 0.07);
    --pressed: inset 0 1px 2px rgba(0, 0, 0, 0.14), inset 0 -1px 0 #ffffff;
    --lift: 0 0 0.5rem rgba(0, 0, 0, 0.07), 0 0 1.4rem rgba(0, 0, 0, 0.07);
    --lift-sm: 0 0 2px rgba(0, 0, 0, 0.08), 0 0 0.6rem rgba(0, 0, 0, 0.06);
    --float: 0 0 1rem rgba(0, 0, 0, 0.08), 0 0 4rem rgba(0, 0, 0, 0.16);
}

/* ── Base ── */
/* Corner multiplier: 1 everywhere; 1.18 where corner-shape exists (see SQUIRCLE CORNERS at the end). */
:root { --sq: 1; }
/* Page frames (Aaron, 29 Oct): 3.3rem; what sits inside follows the concentric rule
   (inner radius = outer radius - the gap between them), like a Kanban column (2.9rem) around its cards (2.1rem + 0.8rem). */
:root { --frame-r: 3.3rem; --frame-gap: 0.6rem; --rail-sel-r: 1.6rem; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.4;
    background: var(--bg);
    color: var(--ink);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hair); border-radius: calc(8px * var(--sq)); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ════════════════════════════════════════════
   SHELL + RAIL
   ════════════════════════════════════════════ */
.shell { display: flex; gap: 0.8rem; height: 100vh; padding: 0.8rem; }

/* Rail: icons only at 5.2rem; on hover it widens over the page to show the labels (Aaron, 29 Oct).
   .rail-wrap floats beside the page and carries the shadow (the squircle mask would cut a box-shadow off);
   it widens with the rail so the shadow is never cropped. The shell's left padding keeps its 5.2rem free. */
.shell { position: relative; padding-left: calc(0.8rem + 5.2rem + 0.8rem); }
.rail-wrap {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    width: 5.2rem;
    max-height: calc(100% - 1.6rem);
    display: flex;
    filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.16));
    transition: width 0.22s var(--ease-snap), filter 0.22s ease;
}
.rail-wrap:has(> .rail:hover:not(.shut)), .rail-wrap:has(:focus-visible):not(:has(> .rail.shut)) { width: 13.2rem; filter: drop-shadow(0 0 1.6rem rgba(0, 0, 0, 0.4)); }   /* just wide enough for "In-coming" and "Analytics" */
.rail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0.4rem;
    gap: 0.2rem;
    overflow: hidden;
}
.rail-item {
    flex: 0 1 4.4rem;                                   /* 4.4rem each; shrinks on a short window */
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border: 0;
    background: none;
    color: #ffffff;
    padding: 0 1.2rem;
    overflow: hidden;
    transition: background 0.15s;
}
.rail-item svg { width: 2rem; height: 2rem; flex: none; }
.rail-item span {
    font-size: 1.35rem;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}
.rail:hover:not(.shut) .rail-item span, .rail:has(:focus-visible):not(.shut) .rail-item span { opacity: 1; }
.rail-item:hover { background: rgba(255, 255, 255, 0.16); }
.rail-item.active { background: var(--rail-active); color: var(--on-rail-active); }
.rail-item:focus-visible { outline-color: #ffffff; outline-offset: -3px; }

.rail-div { flex: none; height: 1px; margin: 1rem 0.6rem 0; background: rgba(255, 255, 255, 0.55); position: relative; z-index: 1; }
.rail-me {
    flex: none;
    position: relative; z-index: 1;
    width: 3.2rem;
    height: 3.2rem;
    margin: 1rem auto 0.6rem 0.6rem;                    /* + the rail's 0.4rem padding = 1rem beside and below, (5.2 - 3.2) / 2 */
    border-radius: 50%; corner-shape: round;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    background: none;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
}
.rail-me:hover { background: rgba(255, 255, 255, 0.15); }

/* Squircle rail (superellipse n = 3, option C): corners ease into the sides. Safari has no corner-shape, so the shape is a mask
   (one superellipse at each corner + two bands) and the 1px edge is drawn along the same curve.
   Concentric: rail 2.6rem, selection 2.6 - 0.4 padding = 2.2rem. */
.rail, .rail-item, .rail-ink {
    --sq-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50.0 0.0L60.6 0.2L66.8 0.6L71.9 1.4L76.4 2.6L80.3 4.0L83.8 5.8L86.9 7.9L89.7 10.3L92.1 13.1L94.2 16.2L96.0 19.7L97.4 23.6L98.6 28.1L99.4 33.2L99.8 39.4L100.0 50.0L99.8 60.6L99.4 66.8L98.6 71.9L97.4 76.4L96.0 80.3L94.2 83.8L92.1 86.9L89.7 89.7L86.9 92.1L83.8 94.2L80.3 96.0L76.4 97.4L71.9 98.6L66.8 99.4L60.6 99.8L50.0 100.0L39.4 99.8L33.2 99.4L28.1 98.6L23.6 97.4L19.7 96.0L16.2 94.2L13.1 92.1L10.3 89.7L7.9 86.9L5.8 83.8L4.0 80.3L2.6 76.4L1.4 71.9L0.6 66.8L0.2 60.6L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") top left / calc(2 * var(--sq-r)) calc(2 * var(--sq-r)) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50.0 0.0L60.6 0.2L66.8 0.6L71.9 1.4L76.4 2.6L80.3 4.0L83.8 5.8L86.9 7.9L89.7 10.3L92.1 13.1L94.2 16.2L96.0 19.7L97.4 23.6L98.6 28.1L99.4 33.2L99.8 39.4L100.0 50.0L99.8 60.6L99.4 66.8L98.6 71.9L97.4 76.4L96.0 80.3L94.2 83.8L92.1 86.9L89.7 89.7L86.9 92.1L83.8 94.2L80.3 96.0L76.4 97.4L71.9 98.6L66.8 99.4L60.6 99.8L50.0 100.0L39.4 99.8L33.2 99.4L28.1 98.6L23.6 97.4L19.7 96.0L16.2 94.2L13.1 92.1L10.3 89.7L7.9 86.9L5.8 83.8L4.0 80.3L2.6 76.4L1.4 71.9L0.6 66.8L0.2 60.6L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") top right / calc(2 * var(--sq-r)) calc(2 * var(--sq-r)) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50.0 0.0L60.6 0.2L66.8 0.6L71.9 1.4L76.4 2.6L80.3 4.0L83.8 5.8L86.9 7.9L89.7 10.3L92.1 13.1L94.2 16.2L96.0 19.7L97.4 23.6L98.6 28.1L99.4 33.2L99.8 39.4L100.0 50.0L99.8 60.6L99.4 66.8L98.6 71.9L97.4 76.4L96.0 80.3L94.2 83.8L92.1 86.9L89.7 89.7L86.9 92.1L83.8 94.2L80.3 96.0L76.4 97.4L71.9 98.6L66.8 99.4L60.6 99.8L50.0 100.0L39.4 99.8L33.2 99.4L28.1 98.6L23.6 97.4L19.7 96.0L16.2 94.2L13.1 92.1L10.3 89.7L7.9 86.9L5.8 83.8L4.0 80.3L2.6 76.4L1.4 71.9L0.6 66.8L0.2 60.6L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") bottom left / calc(2 * var(--sq-r)) calc(2 * var(--sq-r)) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50.0 0.0L60.6 0.2L66.8 0.6L71.9 1.4L76.4 2.6L80.3 4.0L83.8 5.8L86.9 7.9L89.7 10.3L92.1 13.1L94.2 16.2L96.0 19.7L97.4 23.6L98.6 28.1L99.4 33.2L99.8 39.4L100.0 50.0L99.8 60.6L99.4 66.8L98.6 71.9L97.4 76.4L96.0 80.3L94.2 83.8L92.1 86.9L89.7 89.7L86.9 92.1L83.8 94.2L80.3 96.0L76.4 97.4L71.9 98.6L66.8 99.4L60.6 99.8L50.0 100.0L39.4 99.8L33.2 99.4L28.1 98.6L23.6 97.4L19.7 96.0L16.2 94.2L13.1 92.1L10.3 89.7L7.9 86.9L5.8 83.8L4.0 80.3L2.6 76.4L1.4 71.9L0.6 66.8L0.2 60.6L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") bottom right / calc(2 * var(--sq-r)) calc(2 * var(--sq-r)) no-repeat, linear-gradient(#000, #000) center / calc(100% - 2 * var(--sq-r)) 100% no-repeat, linear-gradient(#000, #000) center / 100% calc(100% - 2 * var(--sq-r)) no-repeat;
    --sq-ring-rail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0 100.0L0.3 78.7L1.3 66.4L2.9 56.2L5.1 47.3L8.0 39.4L11.6 32.4L15.8 26.2L20.6 20.6L26.2 15.8L32.4 11.6L39.4 8.0L47.3 5.1L56.2 2.9L66.4 1.3L78.7 0.3L100.0 0.0' fill='none' stroke='rgba%28255,150,90,0.35%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") top left / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0 0.0L21.3 0.3L33.6 1.3L43.8 2.9L52.7 5.1L60.6 8.0L67.6 11.6L73.8 15.8L79.4 20.6L84.2 26.2L88.4 32.4L92.0 39.4L94.9 47.3L97.1 56.2L98.7 66.4L99.7 78.7L100.0 100.0' fill='none' stroke='rgba%28255,150,90,0.35%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") top right / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 0.0L99.7 21.3L98.7 33.6L97.1 43.8L94.9 52.7L92.0 60.6L88.4 67.6L84.2 73.8L79.4 79.4L73.8 84.2L67.6 88.4L60.6 92.0L52.7 94.9L43.8 97.1L33.6 98.7L21.3 99.7L0.0 100.0' fill='none' stroke='rgba%28255,150,90,0.35%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom right / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 100.0L78.7 99.7L66.4 98.7L56.2 97.1L47.3 94.9L39.4 92.0L32.4 88.4L26.2 84.2L20.6 79.4L15.8 73.8L11.6 67.6L8.0 60.6L5.1 52.7L2.9 43.8L1.3 33.6L0.3 21.3L0.0 0.0' fill='none' stroke='rgba%28255,150,90,0.35%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom left / var(--sq-r) var(--sq-r) no-repeat, linear-gradient(rgba(255, 150, 90, 0.35), rgba(255, 150, 90, 0.35)) top / calc(100% - 2 * var(--sq-r)) 1px no-repeat, linear-gradient(rgba(255, 150, 90, 0.35), rgba(255, 150, 90, 0.35)) bottom / calc(100% - 2 * var(--sq-r)) 1px no-repeat, linear-gradient(rgba(255, 150, 90, 0.35), rgba(255, 150, 90, 0.35)) left / 1px calc(100% - 2 * var(--sq-r)) no-repeat, linear-gradient(rgba(255, 150, 90, 0.35), rgba(255, 150, 90, 0.35)) right / 1px calc(100% - 2 * var(--sq-r)) no-repeat;
    --sq-ring-sel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0 100.0L0.3 78.7L1.3 66.4L2.9 56.2L5.1 47.3L8.0 39.4L11.6 32.4L15.8 26.2L20.6 20.6L26.2 15.8L32.4 11.6L39.4 8.0L47.3 5.1L56.2 2.9L66.4 1.3L78.7 0.3L100.0 0.0' fill='none' stroke='rgba%28255,255,255,0.3%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") top left / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0.0 0.0L21.3 0.3L33.6 1.3L43.8 2.9L52.7 5.1L60.6 8.0L67.6 11.6L73.8 15.8L79.4 20.6L84.2 26.2L88.4 32.4L92.0 39.4L94.9 47.3L97.1 56.2L98.7 66.4L99.7 78.7L100.0 100.0' fill='none' stroke='rgba%28255,255,255,0.3%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") top right / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 0.0L99.7 21.3L98.7 33.6L97.1 43.8L94.9 52.7L92.0 60.6L88.4 67.6L84.2 73.8L79.4 79.4L73.8 84.2L67.6 88.4L60.6 92.0L52.7 94.9L43.8 97.1L33.6 98.7L21.3 99.7L0.0 100.0' fill='none' stroke='rgba%28255,255,255,0.3%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom right / var(--sq-r) var(--sq-r) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100.0 100.0L78.7 99.7L66.4 98.7L56.2 97.1L47.3 94.9L39.4 92.0L32.4 88.4L26.2 84.2L20.6 79.4L15.8 73.8L11.6 67.6L8.0 60.6L5.1 52.7L2.9 43.8L1.3 33.6L0.3 21.3L0.0 0.0' fill='none' stroke='rgba%28255,255,255,0.3%29' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") bottom left / var(--sq-r) var(--sq-r) no-repeat, linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) top / calc(100% - 2 * var(--sq-r)) 1px no-repeat, linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) bottom / calc(100% - 2 * var(--sq-r)) 1px no-repeat, linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) left / 1px calc(100% - 2 * var(--sq-r)) no-repeat, linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) right / 1px calc(100% - 2 * var(--sq-r)) no-repeat;
    -webkit-mask: var(--sq-mask); mask: var(--sq-mask);
}
.rail { --sq-r: 2.6rem; }
.rail-item, .rail-ink { --sq-r: 2.2rem; }


.main { flex: 1; min-width: 0; height: 100%; position: relative; }

/* ════════════════════════════════════════════
   PAGE VIEWS (Dashboard, In-coming, Calendar, Analytics, Users)
   ════════════════════════════════════════════ */
.page { height: 100%; overflow-y: auto; padding: 2.8rem 2.8rem 3.2rem 3.2rem; }
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}
.page-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: 0.005em;
}
.page-title.caps { text-transform: uppercase; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(1.6rem * var(--sq));
    padding: 1.8rem 2rem;
    min-width: 0;
}
.card-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1;
    margin-bottom: 1.2rem;
}
.card-sub { color: var(--ink-3); font-size: 1.3rem; }

.row-list { list-style: none; }
.row-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--hair);
    cursor: pointer;
}
.row-item:last-child { border-bottom: 0; }
.row-item:hover .row-title { color: var(--accent-text); }
.row-swatch { width: 0.4rem; align-self: stretch; min-height: 2.8rem; border-radius: calc(1rem * var(--sq)); flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 1.4rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 1.2rem; color: var(--ink-3); margin-top: 0.1rem; }
.row-empty { color: var(--ink-3); font-size: 1.35rem; padding: 1rem 0; }

.meter { height: 0.6rem; background: var(--hair); border-radius: calc(1rem * var(--sq)); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: calc(1rem * var(--sq)); }
.meter.full > span { background: var(--success); }
.flag { display: inline-flex; align-items: center; height: 1.8rem; padding: 0 0.7rem; border-radius: 2rem; corner-shape: round; font-size: 1.05rem; line-height: 1; margin-left: 0.6rem; vertical-align: middle; }
.flag-wait { background: rgba(245, 165, 36, 0.16); color: var(--warning); }
.flag-done { background: rgba(34, 197, 94, 0.16); color: var(--success); }

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn-primary, .btn-secondary, .btn-grey, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 3.2rem;
    padding: 0 1.4rem;
    border-radius: 2rem; corner-shape: round;          /* every button is a full capsule (Aaron, 17 Oct) */
    border: 1px solid transparent;
    font-size: 1.35rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-press); }
.btn-secondary { background: var(--chip); color: var(--ink); }
.btn-secondary:hover { background: var(--chip-hover); }
.btn-grey { background: var(--grey-btn); color: #111111; }
.btn-grey:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); color: #ffffff; }
.btn-primary svg, .btn-secondary svg { width: 1.4rem; height: 1.4rem; flex: none; }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.pill { border-radius: 4rem; corner-shape: round; }

.btn-sm-outline {
    display: inline-flex; align-items: center; height: 2.6rem; padding: 0 1rem;
    background: none; border: 1px solid var(--hair); border-radius: 2rem; corner-shape: round;
    color: var(--ink-2); font-size: 1.2rem; line-height: 1; text-decoration: none;
}
.btn-sm-outline:hover { border-color: var(--ink-3); color: var(--ink); }

.btn-icon-sm, .icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.6rem; height: 2.6rem; flex: none;
    background: none; border: 0; border-radius: calc(0.6rem * var(--sq));
    color: var(--ink-2); font-size: 1.7rem; line-height: 1;
}
.btn-icon-sm:hover, .icon-btn:hover { background: var(--chip); color: var(--ink); }
/* The close × on every window: twice the old size (Aaron, 29 Oct 2026) */
.btn-icon-sm { width: 4rem; height: 4rem; font-size: 3.4rem; border-radius: 50%; corner-shape: round; padding-bottom: 0.2rem; }
.icon-btn[aria-label^="Unlink"] svg { width: 2.4rem; height: 2.4rem; }
.icon-btn svg { width: 1.6rem; height: 1.6rem; }

.view-toggle { display: inline-flex; height: 3.2rem; background: var(--chip); border-radius: calc(0.8rem * var(--sq)); overflow: hidden; }
.view-toggle button { border: 0; background: none; padding: 0 1.3rem; font-size: 1.35rem; line-height: 1; color: var(--ink); }
.view-toggle button.active { background: var(--accent); color: #ffffff; }

.chip-select, .chip-toggle {
    height: 2.8rem;
    padding: 0 1rem;
    border-radius: 3rem; corner-shape: round;
    border: 1px solid transparent;
    background: var(--chip);
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1;
}
.chip-select { padding-right: 0.6rem; max-width: 24rem; }
.chip-select option { background: var(--surface); color: var(--ink); }
.chip-toggle { display: inline-flex; align-items: center; gap: 0.6rem; }
.chip-toggle input { accent-color: var(--accent); width: 1.3rem; height: 1.3rem; }

/* ════════════════════════════════════════════
   FORMS + MODALS
   ════════════════════════════════════════════ */
.form-group { margin-bottom: 1.4rem; }
.form-group label, .field-label { display: block; font-size: 1.25rem; color: var(--ink-2); margin-bottom: 0.6rem; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="date"], .form-group input[type="number"], .form-group textarea, .form-group select,
.field {
    width: 100%;
    min-height: 3.6rem;
    padding: 0.8rem 1.1rem;
    background: var(--well);
    border: 1px solid var(--hair);
    border-radius: calc(0.8rem * var(--sq));
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.3;
}
.form-group textarea, textarea.field { resize: vertical; min-height: 8rem; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus, .field:focus { outline: none; border-color: var(--accent); }
.form-group input[type="color"] { width: 100%; height: 3.6rem; padding: 0.3rem; background: var(--well); border: 1px solid var(--hair); border-radius: calc(0.8rem * var(--sq)); }
.form-row { display: flex; gap: 1.2rem; }
.form-row .form-group { flex: 1; min-width: 0; }

.error-msg {
    display: none;
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.35);
    color: var(--danger);
    font-size: 1.3rem;
    padding: 0.8rem 1.1rem;
    border-radius: calc(0.8rem * var(--sq));
    margin-bottom: 1.2rem;
}
.error-msg.visible { display: block; }

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; z-index: 1000;
    animation: nxFade 0.15s ease;
}
.modal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4rem; corner-shape: round;          /* concentric with its 3.2rem capsule buttons: 1.6rem + the 2.4rem padding */
    padding: 2.4rem;
    width: 52rem;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    animation: nxRise 0.18s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.modal-title { font-family: var(--font-heading); font-weight: 400; font-size: 2.2rem; line-height: 1.05; }
.modal-note { color: var(--ink-2); font-size: 1.35rem; margin-bottom: 1.4rem; }
@keyframes nxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nxRise { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.delete-confirm-input {
    width: 100%; min-height: 3.6rem; padding: 0.8rem 1.1rem; margin: 0.8rem 0 1.2rem;
    background: var(--well); border: 1px solid var(--danger); border-radius: calc(0.8rem * var(--sq));
    color: var(--ink); font-size: 1.35rem;
}

/* ── Popover menu (account) ── */
.menu-pop {
    position: fixed;
    left: 7rem;                                    /* 0.8rem shell padding + 5.2rem rail + 1rem */
    bottom: 1.2rem;
    min-width: 22rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(1.2rem * var(--sq));
    padding: 0.6rem;
    z-index: 1200;
    animation: nxRise 0.15s ease;
}
.menu-head { padding: 0.8rem 1rem 1rem; border-bottom: 1px solid var(--hair); margin-bottom: 0.4rem; }
.menu-name { font-size: 1.45rem; }
.menu-role { font-size: 1.2rem; color: var(--ink-3); }
.menu-item {
    display: flex; align-items: center; gap: 1rem; width: 100%;
    padding: 0.8rem 1rem; border: 0; background: none; border-radius: calc(0.6rem * var(--sq));
    font-size: 1.35rem; text-align: left; color: var(--ink);
}
.menu-item:hover { background: var(--chip); }
.menu-item svg { width: 1.6rem; height: 1.6rem; flex: none; }

/* ════════════════════════════════════════════
   WORKSPACE (On-going, Completed, Archived)
   ════════════════════════════════════════════ */
.workspace {                                    /* the page frame: same roundness as the side rail pill */
    height: 100%;
    display: flex;
    gap: var(--frame-gap);
    background: var(--frame);
    border: 1px solid var(--line);
    border-radius: var(--frame-r); corner-shape: round;
    padding: var(--frame-gap);
    overflow: visible;                          /* the panels' shadows spread past the 0.6rem gutter; cropping them showed hard edges */
}

.proj-panel {
    width: var(--panel-w);
    flex: none;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: calc(var(--frame-r) - var(--frame-gap)); corner-shape: round;     /* concentric: frame 3.3rem - 0.6rem gutter = 2.7rem */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.proj-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 1.4rem 1rem 1.2rem 1.6rem; }
.proj-panel-title { font-family: var(--font-heading); font-weight: 400; font-size: 1.9rem; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.proj-list { list-style: none; overflow-y: auto; flex: 1; padding: 0.4rem 0.6rem 1rem; margin-top: -0.4rem; }   /* the 0.4rem keeps the highlight's shadow in view */
.proj-group { padding: 1.2rem 1.2rem 0.4rem; font-size: 1.15rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; list-style: none; }   /* Archived: Completed / Archived groups */
.proj-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 3.2rem;
    padding: 0 0.8rem 0 1rem;
    margin-bottom: 0.2rem;
    border: 1px solid transparent;
    border-radius: calc(0.8rem * var(--sq));
    font-size: 1.4rem;
    line-height: 1.2;
    cursor: pointer;
    color: var(--ink);
}
.proj-item:hover { background: var(--chip); }
.proj-item.active { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent); }
.proj-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-wait { width: 0.7rem; height: 0.7rem; border-radius: 50%; corner-shape: round; background: var(--warning); flex: none; }
.proj-actions { display: none; gap: 0.1rem; flex: none; }
.proj-item:hover .proj-actions, .proj-item:focus-within .proj-actions { display: flex; }
.proj-actions .icon-btn { width: 2.2rem; height: 2.2rem; }
.proj-actions .icon-btn svg { width: 1.4rem; height: 1.4rem; }
.proj-actions .icon-btn.danger:hover { color: var(--danger); }
.proj-empty { color: var(--ink-3); font-size: 1.3rem; padding: 0.6rem 1rem; line-height: 1.5; }

.ws { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; padding: 1rem 1.2rem 0 1.8rem; }
.ws-bar { display: flex; align-items: center; gap: 1rem; flex: none; }
.workspace:not(.panel-collapsed) .ws-expand { opacity: 0; visibility: hidden; }
.tab-track {
    flex: 0 1 78rem;
    margin-left: auto;
    display: flex;
    height: 3.6rem;
    background: var(--track);
    border-radius: 2rem; corner-shape: round;
    overflow: hidden;
}
.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    border: 0;
    background: none;
    border-radius: 2rem; corner-shape: round;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    white-space: nowrap;
    padding: 0 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.tab-btn svg { width: 1.4rem; height: 1.4rem; flex: none; }
.tab-btn:not(.active):hover { background: rgba(255, 255, 255, 0.06); }
body.light .tab-btn:not(.active):hover { background: rgba(0, 0, 0, 0.05); }
.tab-btn.active { background: var(--accent); color: #ffffff; }
.tab-badge {
    position: absolute; top: 0.4rem; right: 0.8rem;
    min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem;
    background: #ffffff; color: var(--accent); border-radius: calc(1rem * var(--sq));
    font-size: 1rem; line-height: 1.6rem; text-align: center;
}
.ws-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.6rem 0 1.6rem; }
/* The scroll bar sits in the frame's right margin. Its 8px lane is always there (overflow-y: scroll; the track is transparent,
   so it's invisible until there's something to scroll), so the content keeps the same width in Safari and Chrome alike.
   (scrollbar-gutter: stable alone didn't hold in Safari: the cards widened under the scroll bar.) */
.ws-body:not(.fill) { margin-left: -1.4rem; padding-left: 1.4rem; margin-right: -1.6rem; padding-right: calc(1.6rem - 8px); overflow-y: scroll; }   /* room for the cards' shadows on both sides */

.content-loading, .empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.8rem; text-align: center; color: var(--ink-3); padding: 4.8rem 2rem; font-size: 1.35rem;
}
.empty-state h3 { font-family: var(--font-heading); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--ink); }
.empty-state svg { opacity: 0.35; }
.spinner { width: 2.6rem; height: 2.6rem; border-radius: 50%; corner-shape: round; border: 3px solid var(--hair); border-top-color: var(--accent); animation: nxSpin 0.7s linear infinite; }
@keyframes nxSpin { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Section header inside a project (Tasks, Gantt Chart…) ── */
.tasks-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.tasks-header h2 { font-family: var(--font-heading); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.tasks-header > div { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.status-note { display: inline-flex; align-items: center; height: 3.2rem; padding: 0 1.2rem; border-radius: calc(0.8rem * var(--sq)); background: rgba(245, 165, 36, 0.14); color: var(--warning); font-size: 1.35rem; line-height: 1; }
.filter-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }

/* ── Kanban ── */
.kanban-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.kanban-column { background: var(--panel); border: 1px solid var(--hair); border-radius: calc(1.6rem * var(--sq)); overflow: hidden; }
.kanban-column-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--hair); }
.col-title { font-size: 1.2rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.04em; }
.col-count { min-width: 2.2rem; height: 1.9rem; padding: 0 0.6rem; border-radius: 2rem; corner-shape: round; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; line-height: 1; }
.kanban-cards { padding: 0.8rem; display: flex; flex-direction: column; gap: 0.7rem; transition: background 0.15s; }
.kanban-cards.drag-over { background: var(--accent-soft); }
.kanban-card { background: var(--surface); border: 1px solid var(--hair); border-radius: calc(0.8rem * var(--sq)); padding: 1rem 1.1rem; cursor: grab; transition: border-color 0.15s; }
.kanban-card:hover { border-color: var(--accent); }
.kanban-card.dragging { opacity: 0.5; }
/* Board cards: the priority chip and the avatar (both 2.2rem) sit 1rem from the bottom corners, so the card's
   corner is concentric with them (1.1rem + 1rem); the column is concentric with the cards (+ its 0.8rem padding) */
.kanban-card { border-radius: 2.1rem; corner-shape: round; padding: 1.2rem 1rem 1rem; }
/* Task colour: a dot beside the first line of the name; longer names wrap in line with the text, not under the dot */
.kanban-card[style*="--task-color"] .kanban-card-title { position: relative; padding-left: 2.5rem; }
.kanban-card[style*="--task-color"] .kanban-card-title::before {
    content: ''; position: absolute; left: 0.6rem; top: 0.22rem; width: 1rem; height: 1rem; border-radius: 50%; corner-shape: round;
    background: var(--task-color); box-shadow: 0 0 0 0.3rem color-mix(in srgb, var(--task-color) 20%, transparent);
}
.kanban-card .badge { --chip-h: 2.2rem; padding-inline: 0.9rem; }
/* The typeface sits high: these nudges put the capitals in the optical middle (measured, 17 Oct) */
.kanban-column .col-title { text-box: trim-both cap alphabetic; }
.kanban-card .kanban-card-title { padding: 0 0.4rem; }            /* title lines up with the chip's text (or sits after the dot) */
.kanban-column { border-radius: 2.9rem; corner-shape: round; }
/* Column header: a capsule 0.8rem in, like the cards, with the count chip 1rem inside it (same as the card chips) */
.kanban-column .kanban-column-header {
    height: 4.2rem; margin: 0.8rem 0.8rem 0; padding: 0 1rem 0 1.6rem; border: 0;
    border-radius: 2.1rem; corner-shape: round; background: var(--well); box-shadow: var(--pressed);
}
.kanban-column .col-count { min-width: 2.2rem; height: 2.2rem; padding: 0 0.7rem; background: var(--chip); color: var(--ink-2); }   /* the project board sets its own colours */
.kanban-card-title { font-size: 1.4rem; line-height: 1.3; margin-bottom: 0.8rem; }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.kanban-card-date { font-size: 1.15rem; color: var(--ink-3); }
.kanban-empty { text-align: center; padding: 1.8rem 1rem; color: var(--ink-3); font-size: 1.25rem; }

/* ── Badges, avatars, tables ── */
.badge { display: inline-flex; align-items: center; height: 1.9rem; padding: 0 0.7rem; border-radius: 2rem; corner-shape: round; font-size: 1.05rem; line-height: 1; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; flex: none; }
.badge-todo { background: rgba(160, 160, 160, 0.18); color: var(--ink-2); }
.badge-in-progress { background: rgba(75, 139, 255, 0.16); color: var(--info); }
.badge-done { background: rgba(34, 197, 94, 0.16); color: var(--success); }
.badge-low { background: rgba(160, 160, 160, 0.16); color: var(--ink-2); }
.badge-medium { background: rgba(245, 165, 36, 0.16); color: var(--warning); }
.badge-high { background: rgba(255, 77, 77, 0.15); color: var(--danger); }
.badge-urgent { background: rgba(255, 77, 77, 0.28); color: var(--danger); border: 1px solid rgba(255, 77, 77, 0.45); }
.badge-event { background: rgba(155, 123, 255, 0.16); color: var(--purple); }

.avatar { width: 3rem; height: 3rem; border-radius: 50%; corner-shape: round; flex: none; display: flex; align-items: center; justify-content: center; color: #ffffff; font-size: 1.1rem; line-height: 1; letter-spacing: 0.03em; }

.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: calc(1.2rem * var(--sq)); padding: 1.6rem; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.panel-title { font-family: var(--font-heading); font-weight: 400; font-size: 1.9rem; line-height: 1; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 0.9rem 1.1rem; font-size: 1.15rem; font-weight: 400; color: var(--ink-3); border-bottom: 1px solid var(--hair); white-space: nowrap; }
.data-table td { padding: 0.9rem 1.1rem; font-size: 1.35rem; color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.data-table td.strong { color: var(--ink); }

.user-card { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); }
.user-card:last-child { border-bottom: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 1.45rem; }
.user-email { font-size: 1.2rem; color: var(--ink-3); }
.user-role-badge { display: inline-flex; align-items: center; height: 2.2rem; padding: 0 0.9rem; border-radius: 2rem; corner-shape: round; font-size: 1.15rem; line-height: 1; border: 1px solid var(--hair); color: var(--ink-2); }
.user-role-badge.admin { border-color: var(--accent); color: var(--accent-text); }
.user-role-badge.project_manager { border-color: var(--info); color: var(--info); }
.role-select { height: 2.6rem; padding: 0 0.6rem; border-radius: calc(0.6rem * var(--sq)); background: var(--well); border: 1px solid var(--hair); font-size: 1.2rem; }

/* ════════════════════════════════════════════
   IN-COMING
   ════════════════════════════════════════════ */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; max-width: 96rem; }
.choice-card {
    height: 13rem;
    border-radius: calc(1.6rem * var(--sq));
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--ink);
    transition: transform 0.18s ease;
}
.choice-card:hover { transform: translateY(-0.2rem); }
.choice-card.glow {
    border-color: #ff8a4c;
    box-shadow: inset 0 0 1.8rem rgba(255, 89, 0, 0.55), 0 0 1.4rem rgba(255, 89, 0, 0.4);
    animation: nxGlow 3.6s ease-in-out infinite alternate;
}
@keyframes nxGlow {
    from { box-shadow: inset 0 0 1rem rgba(255, 89, 0, 0.35), 0 0 0.6rem rgba(255, 89, 0, 0.22); }
    to   { box-shadow: inset 0 0 2.4rem rgba(255, 89, 0, 0.7), 0 0 2rem rgba(255, 89, 0, 0.55); }
}
.howto { margin: 4.8rem 0 2rem 0.4rem; max-width: 76rem; font-size: 1.45rem; line-height: 1.6; }
.howto p + p { color: var(--ink-2); }
.copy-tile {
    width: 20rem;
    height: 13rem;
    border: 0;
    border-radius: calc(1.6rem * var(--sq));
    background: var(--rail);
    color: #ffffff;
    font-size: 2.2rem;
    line-height: 1.1;
    text-transform: uppercase;
    padding: 0 2rem;
}
.copy-tile:hover { filter: brightness(1.08); }

.form-card { max-width: 96rem; padding: 2.4rem 2.6rem; }
.form-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; }
.form-card-title { font-size: 1.9rem; line-height: 1; text-transform: uppercase; }
.form-card .field-label { font-size: 1.45rem; color: var(--ink); margin-bottom: 0.8rem; }
.form-card .field { min-height: 4rem; font-size: 1.45rem; border-color: rgba(0, 0, 0, 0.6); }
body.light .form-card .field { border-color: var(--hair); }
.form-card textarea.field { min-height: 14rem; }
.form-card .form-group { margin-bottom: 2rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 1.2rem; margin-top: 0.6rem; flex-wrap: wrap; }
.form-actions .btn-primary, .form-actions .btn-grey { height: 4rem; min-width: 18rem; border-radius: 4rem; corner-shape: round; font-size: 1.5rem; }
.import-preview { margin-top: 1.8rem; border-top: 1px solid var(--hair); padding-top: 1.6rem; }
.import-preview .row-item { cursor: default; }
.import-textarea { font-family: var(--font-mono); font-size: 1.3rem !important; line-height: 1.6; }

/* ════════════════════════════════════════════
   CALENDAR
   ════════════════════════════════════════════ */
.cal-toolbar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.cal-month { font-family: var(--font-heading); font-size: 2.4rem; line-height: 1; min-width: 16rem; margin-right: 0.4rem; }
.cal-spacer { flex: 1; }
.cal-card { background: var(--frame); border: 1px solid var(--line); border-radius: calc(1.6rem * var(--sq)); padding: 1.2rem 1.2rem 0.8rem; }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 0.8rem; }
.cal-head span { font-size: 1.1rem; color: var(--ink-3); padding-left: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cal-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 11.8rem; border-top: 1px solid var(--hair); }
.cal-day { position: relative; border-left: 1px solid var(--hair); padding: 0.6rem 0.7rem; min-width: 0; }
.cal-day:first-child { border-left: 0; }
.cal-day.weekend { background: rgba(255, 255, 255, 0.025); }
body.light .cal-day.weekend { background: rgba(0, 0, 0, 0.025); }
.cal-day.out .cal-num { color: var(--ink-3); opacity: 0.6; }
.cal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 0.5rem; border-radius: 2rem; corner-shape: round; font-size: 1.25rem; line-height: 1; }
.cal-day.today .cal-num { background: var(--accent); color: #ffffff; }
.cal-bar { position: absolute; height: 1.9rem; border: 0; border-radius: calc(0.5rem * var(--sq)); padding: 0 0.7rem; font-size: 1.15rem; line-height: 1.9rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.cal-bar:hover { filter: brightness(1.12); }
.cal-bar.event { background: transparent !important; border: 1.5px dashed currentColor; line-height: 1.6rem; }
.cal-bar.done { opacity: 0.45; text-decoration: line-through; }
.cal-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-more { position: absolute; z-index: 2; height: 1.7rem; padding: 0 0.5rem; border: 0; background: none; color: var(--ink-2); font-size: 1.1rem; line-height: 1.7rem; text-align: left; }
.cal-more:hover { color: var(--accent-text); }
.cal-legend { display: flex; gap: 1.8rem; padding: 1rem 0.6rem 0.2rem; font-size: 1.15rem; color: var(--ink-3); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.6rem; }
.cal-key { width: 2.2rem; height: 1rem; border-radius: calc(0.3rem * var(--sq)); background: var(--ink-3); }
.cal-key.event { background: none; border: 1.5px dashed var(--ink-3); }
.detail-list { display: grid; grid-template-columns: 11rem 1fr; gap: 0.8rem 1.2rem; font-size: 1.35rem; margin-bottom: 1.8rem; }
.detail-list dt { color: var(--ink-3); }
.link-box { display: flex; gap: 0.8rem; margin-bottom: 1.2rem; }
.link-box .field { font-family: var(--font-mono); font-size: 1.15rem; min-height: 3.2rem; }
.mcp-row { cursor: default; gap: 1.2rem; }
.mcp-new { padding: 1.4rem; margin-bottom: 0.4rem; background: var(--accent-soft); border-radius: calc(2.4rem * var(--sq)); }
.mcp-new .modal-note { margin-bottom: 0; }
.link-box.mcp-create .field { font-family: inherit; font-size: inherit; }
.steps { padding-left: 1.8rem; color: var(--ink-2); font-size: 1.35rem; line-height: 1.7; margin-bottom: 1.4rem; }
.check-list { max-height: 18rem; overflow-y: auto; border: 1px solid var(--hair); border-radius: calc(1rem * var(--sq)); padding: 0.4rem 1rem; margin-bottom: 1.2rem; }
.check-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; font-size: 1.35rem; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 1.5rem; height: 1.5rem; flex: none; }
.section-label { font-size: 1.25rem; color: var(--ink-3); margin: 1.8rem 0 0.8rem; }

/* ════════════════════════════════════════════
   ANALYTICS
   ════════════════════════════════════════════ */
.stack-row { display: flex; align-items: center; gap: 1.2rem; padding: 0.6rem 0; }
.stack-name { width: 13rem; font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-bar { flex: 1; height: 2rem; background: var(--well); border-radius: calc(0.6rem * var(--sq)); overflow: hidden; display: flex; }
.stack-total { width: 4rem; text-align: right; font-family: var(--font-heading); font-size: 1.9rem; line-height: 1; }
.legend { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--hair); font-size: 1.15rem; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend i { width: 1rem; height: 1rem; border-radius: calc(0.25rem * var(--sq)); display: inline-block; }
.num-cell { font-family: var(--font-heading); font-size: 1.8rem; line-height: 1; text-align: center; }

/* ════════════════════════════════════════════
   GANTT — Frappe overrides
   ════════════════════════════════════════════ */
.gantt-wrap { background: var(--panel); border: 1px solid var(--hair); border-radius: calc(1.2rem * var(--sq)); padding: 1rem; overflow-x: auto; }
.gantt-container { overflow-x: auto; overflow-y: hidden; background: transparent !important; }
.gantt, .gantt svg { background: transparent !important; }
.gantt .grid-header { fill: var(--surface) !important; stroke: var(--hair) !important; }
.gantt .grid-row { fill: var(--panel) !important; }
.gantt .grid-row:nth-child(even) { fill: var(--frame) !important; }
.gantt .row-line { stroke: var(--hair) !important; }
.gantt .tick { stroke: var(--hair) !important; stroke-dasharray: 4; }
.gantt .today-highlight { fill: rgba(255, 89, 0, 0.1) !important; }
.gantt .bar { fill: rgba(75, 139, 255, 0.25); stroke: rgba(75, 139, 255, 0.4); }
.gantt .bar-progress { fill: var(--info); }
.gantt .bar-label { fill: var(--ink) !important; font-family: var(--font-body); font-size: 12px; }
.gantt .bar-wrapper.active .bar { stroke: var(--accent) !important; stroke-width: 2; }
.gantt .handle { fill: rgba(255, 255, 255, 0.3); cursor: ew-resize; }
.gantt .upper-text, .gantt .lower-text { fill: var(--ink-3) !important; font-family: var(--font-body); font-size: 11px; }
.gantt .arrow { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.gantt .popup-wrapper { z-index: 100; }
.gantt .popup-wrapper .pointer, .gantt .popup-wrapper .title, .gantt .popup-wrapper .subtitle { display: none !important; }
.gantt-popup {
    background: var(--surface); border: 1px solid var(--line); border-radius: calc(1.2rem * var(--sq));
    padding: 1.2rem 1.4rem; min-width: 22rem; box-shadow: 0 0 2.4rem rgba(0, 0, 0, 0.4);
    font-family: var(--font-body); color: var(--ink);
}
.gantt-popup h4 { font-family: var(--font-heading); font-weight: 400; font-size: 1.8rem; line-height: 1.1; margin-bottom: 1rem; }
.gantt-popup-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-size: 1.25rem; color: var(--ink-2); }
.gantt-popup-row span:first-child { color: var(--ink-3); }
.gantt-popup-desc { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--hair); font-size: 1.25rem; color: var(--ink-3); }

/* ════════════════════════════════════════════
   QUILL (Updates + Docs)
   ════════════════════════════════════════════ */
.ql-toolbar.ql-snow { background: var(--well) !important; border-color: var(--hair) !important; border-radius: calc(1rem * var(--sq)) calc(1rem * var(--sq)) 0 0 !important; }
.ql-container.ql-snow { background: var(--well) !important; border-color: var(--hair) !important; border-radius: 0 0 calc(1rem * var(--sq)) calc(1rem * var(--sq)) !important; color: var(--ink) !important; font-family: var(--font-body) !important; font-size: 15px !important; }
.ql-editor { color: var(--ink) !important; min-height: 50px; }
.ql-editor.ql-blank::before { color: var(--ink-3) !important; font-style: normal !important; }
.ql-snow .ql-stroke { stroke: var(--ink-3) !important; }
.ql-snow .ql-fill { fill: var(--ink-3) !important; }
.ql-snow .ql-picker-label { color: var(--ink-3) !important; }
.ql-snow .ql-picker-options { background: var(--surface) !important; border-color: var(--hair) !important; }
.ql-snow .ql-picker-item { color: var(--ink-2) !important; }
.ql-snow button:hover .ql-stroke, .ql-snow button.ql-active .ql-stroke { stroke: var(--accent) !important; }
.ql-snow button:hover .ql-fill, .ql-snow button.ql-active .ql-fill { fill: var(--accent) !important; }
.ql-snow .ql-tooltip { background: var(--surface) !important; border-color: var(--hair) !important; color: var(--ink) !important; box-shadow: 0 0 16px rgba(0, 0, 0, 0.35) !important; }
.ql-snow .ql-tooltip input { background: var(--well) !important; border-color: var(--hair) !important; color: var(--ink) !important; }

.update-card { margin-bottom: 1.4rem; }
.update-content { font-size: 15px; }
.update-content p { margin-bottom: 6px; }
.update-content ul, .update-content ol { margin-left: 18px; margin-bottom: 6px; }
.update-content a { color: var(--accent-text); }
.update-content strong { color: var(--ink); }

/* ════════════════════════════════════════════
   DOCS (wiki)
   ════════════════════════════════════════════ */
.docs-layout { display: flex; height: 100%; min-height: 40rem; border: 1px solid var(--hair); border-radius: calc(1rem * var(--sq)); overflow: hidden; background: var(--frame); }
.docs-sidebar { width: 24rem; background: var(--panel); border-right: 1px solid var(--hair); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.docs-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; border-bottom: 1px solid var(--hair); }
.docs-tree { padding: 6px 0; flex: 1; overflow-y: auto; }
.docs-main { flex: 1; overflow-y: auto; padding: 24px 32px; }
.docs-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); gap: 8px; }
.docs-empty-state svg { opacity: 0.3; }
.docs-empty-state h3 { font-family: var(--font-heading); font-weight: 400; color: var(--ink-2); font-size: 22px; }
.docs-empty-state p { font-size: 13px; }
.tree-item { display: flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; position: relative; }
.tree-item:hover { background: var(--chip); color: var(--ink); }
.tree-item.active { background: var(--accent-soft); color: var(--accent-text); }
.tree-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.tree-actions { display: none; gap: 2px; align-items: center; }
.tree-item:hover .tree-actions { display: flex; }
.tree-chevron { flex-shrink: 0; transition: transform 0.15s; }
.tree-folder:not(.collapsed) .tree-chevron { transform: rotate(90deg); }
.tree-folder.collapsed .tree-children { display: none; }
.tree-children { padding-left: 16px; }
.tree-dots { opacity: 0; transition: opacity 0.15s; }
.tree-item:hover .tree-dots { opacity: 1; }
.doc-editor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.doc-title-input { flex: 1; font-family: var(--font-heading); font-size: 28px; color: var(--ink); background: none; border: none; border-bottom: 2px solid transparent; padding: 4px 0; }
.doc-title-input:focus { outline: none; border-bottom-color: var(--accent); }
.doc-attachment-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--well); border: 1px solid var(--hair); border-radius: calc(8px * var(--sq)); }
.doc-attachment-row:hover { border-color: var(--ink-3); }
.doc-att-badge { font-size: 10px; font-family: var(--font-mono); padding: 3px 8px; border-radius: calc(4px * var(--sq)); text-transform: uppercase; flex-shrink: 0; }
.tree-context-menu { position: fixed; z-index: 1300; background: var(--surface); border: 1px solid var(--line); border-radius: calc(12px * var(--sq)); padding: 6px; min-width: 170px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.35); }
.tcm-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: calc(8px * var(--sq)); font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tcm-item:hover { background: var(--chip); color: var(--ink); }
.tcm-item.tcm-danger { color: var(--danger); }
.move-pick-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: calc(8px * var(--sq)); font-size: 14px; color: var(--ink-2); cursor: pointer; }
.move-pick-item:hover { background: var(--chip); color: var(--ink); }
.move-pick-project { color: var(--ink); border-bottom: 1px solid var(--hair); border-radius: 0; margin-bottom: 2px; }
.move-project-group { margin-bottom: 8px; }

/* ════════════════════════════════════════════
   GROUP CHAT
   ════════════════════════════════════════════ */
.chat-layout { display: flex; flex-direction: column; height: 100%; min-height: 40rem; border: 1px solid var(--hair); border-radius: calc(1rem * var(--sq)); overflow: hidden; background: var(--panel); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.chat-msg { display: flex; gap: 8px; max-width: 70%; animation: fadeUp 0.2s ease; }
.chat-msg-me { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-other { align-self: flex-start; }
.chat-msg .avatar { width: 30px; height: 30px; font-size: 11px; }
.chat-bubble { padding: 10px 14px; border-radius: calc(16px * var(--sq)); max-width: 100%; word-wrap: break-word; }
.chat-bubble-me { background: var(--accent); color: #ffffff; border-bottom-right-radius: 4px; }
.chat-bubble-other { background: var(--surface); border: 1px solid var(--hair); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-sender { font-size: 11px; color: var(--ink-3); margin-bottom: 3px; }
.chat-text { font-size: 14px; line-height: 1.5; }
.chat-bubble-me .chat-text a { color: #ffffff; text-decoration: underline; }
.chat-time { font-size: 10px; opacity: 0.65; margin-top: 4px; text-align: right; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hair); background: var(--frame); }
.chat-text-input { flex: 1; padding: 12px 18px; background: var(--well); border: 1px solid var(--hair); border-radius: 24px; corner-shape: round; color: var(--ink); font-size: 14px; }
.chat-text-input:focus { outline: none; border-color: var(--accent); }
.chat-attach-btn, .chat-send-btn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; corner-shape: round; border: none; cursor: pointer; flex-shrink: 0; }
.chat-attach-btn { background: none; color: var(--ink-3); }
.chat-send-btn { background: var(--accent); color: #ffffff; }

/* ════════════════════════════════════════════
   BRAINSTORM
   ════════════════════════════════════════════ */
.bs-layout { display: flex; flex-direction: column; height: 100%; min-height: 40rem; border: 1px solid var(--hair); border-radius: calc(1rem * var(--sq)); overflow: hidden; }
.bs-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--hair); flex-shrink: 0; flex-wrap: wrap; }
.bs-tool-btn { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; border-radius: calc(8px * var(--sq)); background: none; border: 1px solid transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; padding: 0 6px; }
.bs-tool-btn:hover { background: var(--chip); color: var(--ink); }
.bs-tool-btn.active { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.bs-tool-sep { width: 1px; height: 24px; background: var(--hair); margin: 0 4px; }
.bs-canvas-wrap { flex: 1; overflow: hidden; position: relative; }
.bs-canvas-wrap canvas { display: block; }
.canvas-container { width: 100% !important; height: 100% !important; }

/* Full-height modules fill the workspace body */
.ws-body > .docs-layout, .ws-body > .chat-layout, .ws-body > .bs-layout { height: 100%; }
/* Full-size panels (Docs, Chat, Brainstorm, Inbox thread) sit on the frame's 0.6rem gutter, like the project list */
.ws-body.fill { overflow: visible; padding-bottom: 0; margin: 0 -1.2rem 0 -1.8rem; }   /* its panels scroll inside themselves; visible so their shadows show */

/* ════════════════════════════════════════════
   LAYERS — depth from the component SVGs
   Base page  →  frame (recessed)  →  panels / cards (raised)  →  pop-ups (floating)
   ════════════════════════════════════════════ */

/* Side rail + selector */
.rail { background: var(--sq-ring-rail), #d95c19; }      /* flat, no gradient (Aaron, 29 Oct): the gradient's middle colour; edge drawn along the squircle */
.rail-item.active { background: var(--sq-ring-sel), var(--selector-bg); }

/* Tab bar: flat track, raised orange tab */
.tab-btn.active, .view-toggle button.active { background: var(--rail-bg); box-shadow: var(--rail-edge); }
.tab-btn.active:hover, .view-toggle button.active:hover { background: linear-gradient(90deg, #d6560f 0%, #e3631e 50%, #ef7330 100%); }

/* Raised panels: project sidebar, dashboard widgets, cards */
.card, .proj-panel, .panel, .choice-card, .kanban-card {
    background: var(--panel-bg);
    border: 0;
    box-shadow: var(--panel-edge), var(--lift);
}
.kanban-card { box-shadow: var(--panel-edge), var(--lift-sm); }
.kanban-card:hover { box-shadow: var(--panel-edge), var(--lift), 0 0 0 1px var(--accent); }

/* Recessed frame the panels sit on */
.workspace, .cal-card {
    background: var(--frame-bg);
    border: 0;
    box-shadow: var(--panel-edge), var(--lift);
}
.kanban-column, .gantt-wrap {
    background: var(--column-bg);
    border: 0;
    box-shadow: var(--panel-edge), var(--lift-sm);
}
.kanban-column-header { border-bottom-color: rgba(0, 0, 0, 0.25); }
body.light .kanban-column-header { border-bottom-color: rgba(0, 0, 0, 0.08); }

/* Buttons: orange = raised accent, grey = raised grey, pressed = pushed in */
/* Orange buttons follow the side rail: same gradient and edges */
.btn-primary, .chat-send-btn { background: var(--rail-bg); box-shadow: var(--rail-edge), var(--lift-sm); }
.btn-primary:hover, .chat-send-btn:hover { background: linear-gradient(90deg, #d6560f 0%, #e3631e 50%, #ef7330 100%); }
.btn-secondary, .btn-grey, .chip-select, .chip-toggle {
    background: var(--grey-btn-bg);
    box-shadow: var(--grey-btn-edge), var(--lift-sm);
}
.btn-secondary:hover, .chip-select:hover, .chip-toggle:hover { filter: brightness(1.1); }
body.light .btn-secondary:hover, body.light .chip-select:hover, body.light .chip-toggle:hover { filter: brightness(0.97); }
/* Chips: the arrow sits in its own round button, and checkboxes are round, both concentric with the capsule (0.4rem in from its edge) */
.chip-select {
    -webkit-appearance: none; appearance: none; padding-right: 3.4rem;
    background: var(--dd-arrow) no-repeat right 0.7rem center / 1.4rem 1.4rem,
                radial-gradient(circle at calc(100% - 1.4rem) 50%, var(--track) 1rem, transparent calc(1rem + 0.5px)),
                var(--grey-btn-bg);
    background-origin: border-box;
}
.chip-select:focus, .chip-select:focus-visible { outline: none; }   /* browsers ring a dropdown after every click (Aaron: not needed) */
.chip-toggle { padding-left: 0.4rem; padding-right: 1.2rem; gap: 0.7rem; }
.chip-toggle input {
    -webkit-appearance: none; appearance: none; margin: 0; flex: none; width: 2rem; height: 2rem; border-radius: 50%; corner-shape: round;
    background: var(--track); box-shadow: var(--pressed); cursor: pointer; transition: background 0.15s ease;
}
.chip-toggle input:checked {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 1.2rem 1.2rem, var(--rail-bg);
    box-shadow: var(--rail-edge);
}
.chip-toggle input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-grey { background: linear-gradient(90deg, #808080, #8e8e8e); color: #111111; }
.btn-danger { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), var(--lift-sm); }
.btn-primary:active, .btn-secondary:active, .btn-grey:active, .btn-danger:active,
.chip-select:active, .tab-btn:active, .view-toggle button:active, .rail-item:active {
    box-shadow: var(--pressed);
    filter: none;
}
/* Page-header buttons and view switchers: 3.6rem tall like the project tab bar */
.tasks-header .btn-primary, .tasks-header .btn-secondary, .tasks-header .view-toggle { height: 3.6rem; }
.tasks-header .btn-primary, .tasks-header .btn-secondary { padding: 0 1.6rem; }
.view-toggle { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--track); border-radius: 2rem; corner-shape: round; }   /* options share one width */
.view-toggle button { position: relative; z-index: 1; border-radius: 2rem; corner-shape: round; padding: 0 1.6rem; transition: color 0.15s ease; }
.toggle-ink {
    position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; opacity: 0;
    border-radius: 2rem; corner-shape: round; background: var(--rail-bg); box-shadow: var(--rail-edge);
    transition: transform var(--t-snap) var(--ease-snap), width var(--t-snap) var(--ease-snap), opacity 0.12s ease;
}
.view-toggle.has-ink button.active, .view-toggle.has-ink button.active:hover { background: transparent; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .toggle-ink { transition: none; } }
@media (prefers-reduced-motion: reduce) { .nx-search-back, .nx-search-back > .nx-search { animation-duration: 0.01s !important; } }

/* Inputs: pushed into the surface */
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="date"], .form-group input[type="number"], .form-group textarea, .form-group select,
.field, .delete-confirm-input, .role-select, .chat-text-input {
    border-color: transparent;
    box-shadow: var(--pressed);
}
.delete-confirm-input { box-shadow: var(--pressed), 0 0 0 1px var(--danger); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus, .field:focus, .chat-text-input:focus {
    border-color: transparent;
    box-shadow: var(--pressed), 0 0 0 2px var(--accent);
}

/* Floating: pop-ups and menus */
.modal-card, .menu-pop, .tree-context-menu, .gantt-popup {
    background: var(--panel-bg);
    border: 0;
    box-shadow: var(--panel-edge), var(--float);
}

/* In-coming */
.copy-tile { background: var(--rail-bg); box-shadow: var(--rail-edge), var(--lift); }
.choice-card.glow { animation: nxGlowLayer 3.6s ease-in-out infinite alternate; }
@keyframes nxGlowLayer {
    from { box-shadow: var(--panel-edge), var(--lift), inset 0 0 1rem rgba(255, 89, 0, 0.35), 0 0 0.6rem rgba(255, 89, 0, 0.22), 0 0 0 1px rgba(255, 138, 76, 0.7); }
    to   { box-shadow: var(--panel-edge), var(--lift), inset 0 0 2.4rem rgba(255, 89, 0, 0.7), 0 0 2rem rgba(255, 89, 0, 0.55), 0 0 0 1px rgba(255, 138, 76, 0.9); }
}

/* Project list selection keeps its orange outline, lifted slightly */
.proj-item.active { box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); }
body.light .proj-item.active { box-shadow: 0 0 3px rgba(0, 0, 0, 0.08); }

/* Account button reads as part of the rail */
.rail-me { box-shadow: none; }      /* its own 1.5px white ring is the edge */


/* ── Centred pages: Dashboard + In-coming ── */
#pageArea[data-view="dashboard"] { max-width: 140rem; margin: 0 auto; }
#pageArea[data-view="incoming"]  { max-width: 96rem;  margin: 0 auto; }
#pageArea[data-view="incoming"] .howto { margin-left: 0; }

/* ── Tab bar centred in the workspace ── */
.ws-bar { display: grid; grid-template-columns: 1fr minmax(0, 78rem) 1fr; align-items: center; }
.ws-expand { grid-column: 1; justify-self: start; }
.tab-track { grid-column: 2; margin: 0; width: 100%; }

/* ── Slightly heavier body text (DIN Next LT Pro Light) ── */
body { -webkit-text-stroke-width: 0.3px; }
.page-title, .card-title, .modal-title, .proj-panel-title, .tasks-header h2, .stat-num, .meter-pct,
.num-cell, .cal-month, .empty-state h3, .panel-title, .gantt-popup h4, .docs-empty-state h3,
.doc-title-input, .stack-total { -webkit-text-stroke-width: 0; }


/* ── Theme picker: small panel beside the rail, project-sidebar width ── */
.theme-pop { width: 25rem; min-width: 0; bottom: auto; }
.theme-pop .menu-head { padding-bottom: 0.8rem; }
.theme-opt { align-items: flex-start; gap: 0.8rem; }
.theme-opt .theme-text { flex: 1; min-width: 0; }
.theme-opt .theme-name { display: block; font-size: 1.4rem; }
.theme-opt .theme-desc { display: block; font-size: 1.15rem; color: var(--ink-3); margin-top: 0.2rem; }
.theme-opt .theme-check { color: var(--accent-text); width: 1.6rem; flex: none; text-align: right; }
.theme-opt.on { background: var(--accent-soft); }
.theme-opt.on .theme-name { color: var(--accent-text); }


/* ── Calendar: Colour by switch ── */
.cal-colour-label { font-size: 1.2rem; color: var(--ink-3); margin-left: 0.4rem; }
.view-toggle.cal-colour { height: 2.8rem; }
.view-toggle.cal-colour button { font-size: 1.2rem; padding: 0 1rem; }
.cal-colour-key { flex-wrap: wrap; gap: 0.8rem 1.8rem; border-top: 1px solid var(--hair); margin-top: 0.4rem; }


/* ════════════════════════════════════════════
   MOTION — quick and snappy (≈0.2s)
   ════════════════════════════════════════════ */

/* Project sidebar slides closed / open */
.proj-panel {
    overflow: hidden;
    transition: width var(--t-snap) var(--ease-snap), margin-right var(--t-snap) var(--ease-snap),
                opacity 0.16s ease, box-shadow 0.2s ease;
}
.proj-panel > * { min-width: var(--panel-w); }
.workspace.panel-collapsed .proj-panel { width: 0; margin-right: -0.6rem; opacity: 0; box-shadow: none; pointer-events: none; }
.ws-expand { transition: opacity 0.16s ease, visibility 0.16s; }

/* Sliding highlights: rail, tab bar, project list */
.no-anim { transition: none !important; }
.rail, .tab-track, .proj-list { position: relative; }
.rail-ink, .tab-ink, .proj-ink {
    position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; opacity: 0;
    transition: transform var(--t-snap) var(--ease-snap), width var(--t-snap) var(--ease-snap),
                height var(--t-snap) var(--ease-snap), opacity 0.12s ease;
}
.rail-item, .tab-btn, .proj-item { position: relative; z-index: 1; }
.rail-item, .tab-btn, .proj-item { transition: background 0.15s ease, color 0.15s ease; }

.rail-ink { background: var(--sq-ring-sel), var(--selector-bg); }
.rail.has-ink .rail-item.active, .rail.has-ink .rail-item.active:hover { background: transparent; box-shadow: none; }

.tab-ink { bottom: 0; border-radius: 2rem; corner-shape: round; background: var(--rail-bg); box-shadow: var(--rail-edge); }
.tab-track.has-ink .tab-btn.active, .tab-track.has-ink .tab-btn.active:hover { background: transparent; box-shadow: none; }

.proj-ink { border-radius: calc(0.8rem * var(--sq)); background: var(--accent-soft); border: 1px solid var(--accent); box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); }
body.light .proj-ink { box-shadow: 0 0 3px rgba(0, 0, 0, 0.08); }
.proj-list.has-ink .proj-item.active, .proj-list.has-ink .proj-item.active:hover { background: transparent; border-color: transparent; box-shadow: none; }

/* ════════════════════════════════════════════
   SMART IMPORT — thinking orb build
   ════════════════════════════════════════════ */
.build-card { width: 48rem; text-align: center; padding: 3rem 2.8rem 2.4rem; }
.orb-wrap { display: flex; justify-content: center; margin: 0.2rem 0 1.8rem; }
.orb {
    position: relative;
    width: 8.8rem; height: 8.8rem; border-radius: 50%; corner-shape: round;
    background: radial-gradient(circle at 34% 30%, #ffd2ae 0%, #ff8a3d 22%, #ff5900 48%, #cc4700 72%, #6b2200 100%);
    box-shadow: 0 0 2.4rem rgba(255, 89, 0, 0.55), 0 0 6rem rgba(255, 89, 0, 0.22), inset 0 -0.8rem 1.6rem rgba(90, 30, 0, 0.6);
    animation: orbPulse 1.6s ease-in-out infinite;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.orb::before {   /* light arc circling the orb */
    content: ''; position: absolute; inset: -0.4rem; border-radius: 50%; corner-shape: round;
    background: conic-gradient(from 0deg, transparent 0 52%, rgba(255, 226, 196, 0.95) 68%, transparent 84%);
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%);
            mask: radial-gradient(circle, transparent 60%, #000 62%);
    animation: orbSpin 1.1s linear infinite;
    transition: opacity 0.3s ease;
}
.orb::after {    /* drifting inner highlight */
    content: ''; position: absolute; inset: 16%; border-radius: 50%; corner-shape: round;
    background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.55), transparent 62%);
    filter: blur(2px);
    animation: orbDrift 2.2s ease-in-out infinite alternate;
}
.orb-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #ffffff; opacity: 0; transform: scale(0.6); transition: opacity 0.25s ease, transform 0.25s var(--ease-snap); z-index: 1; }
.orb-mark svg { width: 3.6rem; height: 3.6rem; }
.orb.done, .orb.error { animation: none; }
.orb.done::before, .orb.error::before { opacity: 0; animation: none; }
.orb.done::after, .orb.error::after { animation: none; }
.orb.done { box-shadow: 0 0 1.8rem rgba(255, 89, 0, 0.45), inset 0 -0.8rem 1.6rem rgba(90, 30, 0, 0.5); }
.orb.done .orb-mark, .orb.error .orb-mark { opacity: 1; transform: none; }
.orb.error { background: radial-gradient(circle at 34% 30%, #ffc4c4 0%, #ff6b6b 40%, #c62828 75%, #5a0f0f 100%); box-shadow: 0 0 1.8rem rgba(255, 77, 77, 0.45); }
@keyframes orbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbDrift { from { transform: translate(-7%, -5%); } to { transform: translate(8%, 6%); } }

.build-status { font-size: 1.4rem; color: var(--ink-2); min-height: 1.9rem; }
.build-status.error { color: var(--danger); }
.build-title { font-family: var(--font-heading); font-size: 2.2rem; line-height: 1.1; margin: 0.6rem 0 1.4rem; min-height: 2.4rem; -webkit-text-stroke-width: 0; }
.build-list { list-style: none; text-align: left; max-height: 34vh; overflow-y: auto; margin: 0 -0.4rem; padding: 0 0.4rem; }
.build-item { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--hair); animation: buildIn 0.22s var(--ease-snap) both; }
.build-item:last-child { border-bottom: 0; }
.build-tick { width: 1.9rem; height: 1.9rem; border-radius: 50%; corner-shape: round; flex: none; display: flex; align-items: center; justify-content: center; color: #ffffff; }
.build-tick svg { width: 1.2rem; height: 1.2rem; }
.build-item.pending .build-tick { border: 2px solid var(--hair); border-top-color: var(--accent); animation: nxSpin 0.6s linear infinite; }
.build-item.ok .build-tick { background: var(--success); animation: tickPop 0.2s var(--ease-snap); }
@keyframes buildIn { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes tickPop { from { transform: scale(0.5); } to { transform: scale(1); } }
.build-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }


/* Thinking orb (dotted, thinking-orbs engine) — replaces the CSS orb when loaded */
.orb canvas { display: none; }
.orb.dotted, .orb.dotted.done, .orb.dotted.error { background: none; box-shadow: none; animation: none; }
.orb.dotted::before, .orb.dotted::after { display: none; }
.orb.dotted canvas { display: block; transition: opacity 0.3s ease; }
.orb.dotted .orb-mark {
    inset: 50% auto auto 50%; width: 4.8rem; height: 4.8rem; margin: -2.4rem 0 0 -2.4rem;
    border-radius: 50%; corner-shape: round; background: var(--rail-bg); box-shadow: var(--rail-edge), 0 0 1.6rem rgba(255, 89, 0, 0.45);
}
.orb.dotted.error .orb-mark { background: radial-gradient(circle at 34% 30%, #ff9a9a 0%, #e53935 60%, #8a1f1f 100%); box-shadow: 0 0 1.6rem rgba(255, 77, 77, 0.45); }
.orb.dotted .orb-mark svg { width: 2.6rem; height: 2.6rem; }

/* Nothing shows until we know whether the dotted orb loaded (no flash of the CSS orb) */
.orb.waiting { background: none; box-shadow: none; animation: none; }
.orb.waiting::before, .orb.waiting::after { display: none; }

/* Success: the orb shrinks into the orange circle and the tick draws itself */
.orb.dotted canvas { transition: opacity 0.3s ease, transform 0.38s var(--ease-snap); }
.orb.dotted.done canvas { opacity: 0; transform: scale(0.5); }
.orb.dotted.error canvas { opacity: 0.22; }
.orb.dotted .orb-mark { transform: scale(0.45); transition: opacity 0.22s ease 0.1s, transform 0.38s var(--ease-snap) 0.06s; }
.orb.dotted.done .orb-mark, .orb.dotted.error .orb-mark { transform: none; }
.orb.done .orb-mark polyline { stroke-dasharray: 24; stroke-dashoffset: 24; animation: tickDraw 0.3s ease 0.28s forwards; }
@keyframes tickDraw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    .proj-panel, .rail-ink, .tab-ink, .proj-ink, .rail-item, .tab-btn, .proj-item, .ws-expand { transition: none; }
    .orb, .orb::before, .orb::after, .build-item, .build-item.pending .build-tick, .build-item.ok .build-tick { animation: none; }
    .orb canvas, .orb-mark { transition: none !important; }
    .orb.done .orb-mark polyline { animation: none; stroke-dashoffset: 0; }
}


/* ════════════════════════════════════════════
   FRAMED PAGES: Calendar + Inbox use the same frame as a project
   ════════════════════════════════════════════ */
.page[data-view="calendar"], .page[data-view="inbox"], .page[data-view="todo"], .page[data-view="clients"] { padding: 0; overflow: visible; display: flex; flex-direction: column; }
.page[data-view="calendar"] > #pageArea, .page[data-view="inbox"] > #pageArea, .page[data-view="todo"] > #pageArea, .page[data-view="clients"] > #pageArea { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#pageArea > .workspace { flex: 1; min-height: 0; }

/* Calendar frame */
.cal-frame .cal-ws { padding: 1.4rem 1.6rem 1.2rem 1.8rem; }
.cal-top { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.2rem; flex: none; }
.cal-top .proj-panel-title { margin-right: 1.6rem; }
.cal-top .cal-month { font-size: 2.2rem; min-width: 15rem; }
.cal-frame .cal-toolbar { flex: none; margin-bottom: 1.2rem; }
.cal-frame .cal-card {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
    background: var(--column-bg); border-radius: calc(var(--frame-r) - var(--frame-gap)); corner-shape: round; box-shadow: var(--panel-edge), var(--lift-sm);
    margin: 0 -1.6rem -1.2rem -1.8rem;   /* out to the frame's 0.6rem gutter, so concentric with it */
}
.cal-weeks { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(6, minmax(6.4rem, 1fr)); }
.cal-weeks .cal-week { height: auto; min-height: 0; }
/* Wheel / trackpad paging: the new month slides in from below (next) or above (previous) */
.cal-weeks.cal-in-next { animation: calInNext 0.26s var(--ease-snap); } .cal-weeks.cal-in-prev { animation: calInPrev 0.26s var(--ease-snap); }
@keyframes calInNext { from { transform: translateY(2.4rem); opacity: 0.3; } }
@keyframes calInPrev { from { transform: translateY(-2.4rem); opacity: 0.3; } }

/* Rail badge (Inbox unread) */
.rail-item .rail-badge {
    position: absolute; top: 0.4rem; right: 0.9rem;
    min-width: 1.7rem; height: 1.7rem; padding: 0 0.45rem; border-radius: calc(1rem * var(--sq));
    background: #ffffff; color: #cc4700; font-size: 1rem; font-style: normal; line-height: 1.7rem; text-align: center;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3); -webkit-text-stroke-width: 0;
}
.rail-item .rail-badge[hidden] { display: none; }

/* ════════════════════════════════════════════
   INBOX
   ════════════════════════════════════════════ */
.inbox-tabs .tab-count, .inbox-unread {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.7rem; height: 1.7rem; padding: 0 0.45rem; margin-left: 0.4rem; border-radius: calc(1rem * var(--sq));
    background: #ffffff; color: #cc4700; font-size: 1rem; font-style: normal; line-height: 1; -webkit-text-stroke-width: 0;
}
.inbox-tabs .tab-count[hidden] { display: none; }
.inbox-tabs button:not(.active) .tab-count { background: var(--accent); color: #ffffff; }
.inbox-body { flex: 1; min-height: 46rem; display: flex; flex-direction: column; }
.inbox-frame {
    flex: 1; min-height: 0; display: flex; gap: 0.6rem; padding: 0.6rem;
    background: var(--frame-bg); border-radius: calc(1.6rem * var(--sq)); box-shadow: var(--panel-edge), var(--lift);
}
.inbox-list { width: 30rem; flex: none; overflow-y: auto; background: var(--panel-bg); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--panel-edge), var(--lift); padding: 0.6rem; }
.inbox-list ul { list-style: none; }
.inbox-item { padding: 1rem 1.1rem; border-radius: calc(0.8rem * var(--sq)); border: 1px solid transparent; cursor: pointer; margin-bottom: 0.2rem; }
.inbox-item:hover { background: var(--chip); }
.inbox-item.active { background: var(--accent-soft); border-color: var(--accent); }
.inbox-item-top, .inbox-item-bottom { display: flex; align-items: center; gap: 0.8rem; }
.inbox-item-name { flex: 1; min-width: 0; font-size: 1.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item.active .inbox-item-name { color: var(--accent-text); }
.inbox-item.unread .inbox-item-name { -webkit-text-stroke-width: 0.6px; }
.inbox-item-time { font-size: 1.1rem; color: var(--ink-3); flex: none; }
.inbox-item-preview { flex: 1; min-width: 0; font-size: 1.2rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.3rem; }
.inbox-item.unread .inbox-item-preview { color: var(--ink-2); }
.inbox-unread { background: var(--accent); color: #ffffff; margin-top: 0.3rem; }
.inbox-muted { font-style: italic; }
.inbox-thread { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--column-bg); border-radius: calc(1rem * var(--sq)); box-shadow: var(--panel-edge), var(--lift-sm); overflow: hidden; }
.inbox-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.6rem; border-bottom: 1px solid var(--hair); }
.inbox-thread-title { font-family: var(--font-heading); font-size: 2rem; line-height: 1.1; -webkit-text-stroke-width: 0; }
.inbox-thread .chat-messages { flex: 1; min-height: 0; }
.inbox-thread .chat-input-bar { background: transparent; }

.inbox-feed { width: 100%; max-width: 76rem; margin: 0 auto 3rem; }
.inbox-update { margin-bottom: 1.2rem; }
.inbox-update-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.inbox-update-img { display: block; max-width: 100%; border-radius: calc(1rem * var(--sq)); margin: 0.4rem 0 1rem; }
.inbox-update-foot { display: flex; gap: 0.8rem; padding-top: 1rem; border-top: 1px solid var(--hair); }
.inbox-comments { margin-top: 1rem; }
.inbox-comment { display: flex; gap: 0.8rem; padding: 0.6rem 0; }
.inbox-comment-name { font-size: 1.3rem; }
.inbox-comment-text { font-size: 1.35rem; color: var(--ink-2); margin-top: 0.2rem; }
@media (max-width: 960px) { .inbox-list { width: 22rem; } }


/* ════════════════════════════════════════════
   INBOX FRAME
   ════════════════════════════════════════════ */
.inbox-ws .ws-bar .inbox-track { width: 46rem; justify-self: center; }
.inbox-ws .tab-count { background: var(--accent); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; padding: 0 0.45rem; margin-left: 0.4rem; border-radius: 1rem; corner-shape: round; font-size: 1rem; font-style: normal; line-height: 1; -webkit-text-stroke-width: 0; }
.inbox-ws .tab-count[hidden] { display: none; }
.inbox-ws .tab-btn.active .tab-count { background: #ffffff; color: #cc4700; }
.proj-item.inbox-item { flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 0.8rem 1rem; min-height: 0; }
.proj-item .inbox-unread { margin-top: 0; margin-left: auto; flex: none; }
.inbox-ws .ws-body.fill { padding-bottom: 0; }
.inbox-ws .inbox-thread { height: 100%; }

/* ════════════════════════════════════════════
   CHAT — centred column, Slack-style composer
   ════════════════════════════════════════════ */
.chat-messages { padding: 2rem max(2rem, calc((100% - 92rem) / 2)) 1rem; gap: 0.8rem; }
.chat-msg { max-width: 76%; }
.chat-msg .avatar { width: 3rem; height: 3rem; font-size: 1.05rem; }
.chat-bubble { padding: 0.9rem 1.3rem; border-radius: calc(1.4rem * var(--sq)); }
.chat-bubble-me { background: var(--rail-bg); box-shadow: var(--rail-edge); }
.chat-bubble-other { background: var(--panel-bg); border: 0; box-shadow: var(--panel-edge), var(--lift-sm); }
.chat-sender { font-size: 1.15rem; }
.chat-text { font-size: 1.4rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-text code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.1rem 0.5rem; border-radius: calc(0.5rem * var(--sq)); background: rgba(0, 0, 0, 0.28); -webkit-text-stroke-width: 0; }
.chat-text pre { margin: 0.4rem 0; padding: 0.9rem 1.1rem; border-radius: calc(0.8rem * var(--sq)); background: rgba(0, 0, 0, 0.3); overflow-x: auto; }
.chat-text pre code { padding: 0; background: none; white-space: pre; }
body.light .chat-bubble-other .chat-text code, body.light .chat-bubble-other .chat-text pre { background: rgba(0, 0, 0, 0.06); }
.chat-text ul { margin: 0.2rem 0 0.2rem 1.8rem; }
.chat-text a { color: inherit; text-decoration: underline; }
.chat-bubble-other .chat-text a { color: var(--accent-text); }
.chat-text del { opacity: 0.75; }
.chat-time { font-size: 1rem; }
.chat-img img { display: block; max-width: 26rem; border-radius: calc(1rem * var(--sq)); margin-top: 0.6rem; }
.chat-file { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; padding: 0.6rem 1rem; border-radius: calc(0.8rem * var(--sq)); background: rgba(0, 0, 0, 0.18); color: inherit; font-size: 1.25rem; text-decoration: none; }
.chat-layout { background: var(--column-bg); border: 0; box-shadow: var(--panel-edge), var(--lift-sm); }
.chat-empty { margin: auto; }

.composer-wrap { flex: none; padding: 0.4rem max(2rem, calc((100% - 92rem) / 2)) 1.2rem; }
.composer {
    position: relative;
    background: var(--well);
    border-radius: calc(1.2rem * var(--sq));
    box-shadow: var(--pressed);
    transition: box-shadow 0.15s ease;
}
.composer:focus-within { box-shadow: var(--pressed), 0 0 0 2px var(--accent); }
.composer-input {
    display: block; width: 100%; border: 0; background: transparent; resize: none; outline: none;
    padding: 1.2rem 1.4rem 0.6rem; font-size: 1.45rem; line-height: 1.45; color: var(--ink);
    max-height: 18rem; overflow-y: auto;
}
.composer-input::placeholder { color: var(--ink-3); }
.composer-bar { display: flex; align-items: center; gap: 0.2rem; padding: 0.4rem 0.6rem 0.6rem; }
.composer-btn {
    width: 2.8rem; height: 2.8rem; flex: none; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: none; border-radius: calc(0.4rem * var(--sq)); color: var(--ink-3); cursor: pointer;   /* composer 1.2rem - 0.8rem gap */
}
.composer-btn:hover { background: var(--chip); color: var(--ink); }
.composer-btn svg { width: 1.6rem; height: 1.6rem; }
.composer-spacer { flex: 1; }
.composer-send {
    width: 3.2rem; height: 3.2rem; margin-left: 0.4rem; border: 0; border-radius: calc(0.6rem * var(--sq));
    display: inline-flex; align-items: center; justify-content: center; color: #ffffff;
    background: var(--rail-bg); box-shadow: var(--rail-edge), var(--lift-sm);
}
.composer-send svg { width: 1.6rem; height: 1.6rem; }
.composer-send:disabled { background: var(--chip); box-shadow: none; color: var(--ink-3); cursor: default; }
.composer-hint { font-size: 1.05rem; color: var(--ink-3); text-align: right; padding: 0.5rem 0.4rem 0; }
.composer-hint b { font-weight: 400; color: var(--ink-2); }
.emoji-pop {
    position: absolute; right: 4.4rem; bottom: calc(100% + 0.6rem); z-index: 30;
    width: 27rem; padding: 0.8rem; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.2rem;
    background: var(--panel-bg); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--panel-edge), var(--float);
}
.emoji-pop button { height: 3rem; border: 0; background: none; border-radius: calc(0.6rem * var(--sq)); font-size: 1.8rem; cursor: pointer; }
.emoji-pop button:hover { background: var(--chip); }


/* ════════════════════════════════════════════
   PO TIMELINE (project screen)
   ════════════════════════════════════════════ */
/* Two capsules, each as wide as its content: PO number + type, then the steps. Chips sit 0.6rem in (concentric). */
.po-timeline { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.po-cap {
    display: flex; align-items: center; gap: 0.6rem; flex: none; height: 4.6rem; padding: 0.6rem; white-space: nowrap;
    border-radius: 2.3rem; corner-shape: round; background: var(--column-bg); box-shadow: var(--panel-edge), var(--lift-sm);
}
.po-cap .po-chip { height: 3.4rem; }
.po-chip {
    display: inline-flex; align-items: center; gap: 0.6rem; height: 3rem; padding: 0 1.2rem; flex: none;
    border: 0; border-radius: 2rem; corner-shape: round; background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm);
    font-size: 1.3rem; line-height: 1; color: var(--ink-2);
}
.po-chip b { font-weight: 400; color: var(--ink); font-family: var(--font-mono); font-size: 1.2rem; -webkit-text-stroke-width: 0; }
.po-chip.empty { color: var(--accent-text); }
.po-chip.nopo { background: rgba(245, 165, 36, 0.22) !important; color: var(--warning) !important; }     /* No PO yet (e.g. a project set up from a quotation) */
.po-chip:disabled { cursor: default; }
.po-chip.po-type { padding: 0 0.8rem 0 1rem; gap: 0.4rem; color: var(--ink-2); }
.po-chip.po-type.trading { color: var(--accent-text); }
.po-chip.po-type svg { width: 1.4rem; height: 1.4rem; opacity: 0.7; }
span.po-chip.po-type { cursor: default; padding-right: 1rem; }
button.po-chip.po-type { padding-right: 0.4rem; gap: 0.6rem; }   /* arrow in a round button, concentric with the chip */
button.po-chip.po-type svg { width: 2.2rem; height: 2.2rem; padding: 0.45rem; border-radius: 50%; corner-shape: round; background: var(--track); opacity: 1; }
.po-type-menu { left: 0; top: 0; bottom: auto; min-width: 26rem; box-shadow: var(--float); }
.po-type-menu .menu-item { align-items: flex-start; }
.po-type-check { width: 1.6rem; height: 1.6rem; flex: none; color: var(--accent-text); margin-top: 0.1rem; }
.po-type-name { display: block; font-size: 1.35rem; }
.po-type-note { display: block; font-size: 1.15rem; color: var(--ink-3); margin-top: 0.1rem; }
.po-type-menu .menu-item.current .po-type-name { color: var(--accent-text); }
.po-steps { list-style: none; flex: 1 1 auto; min-width: 0; gap: 0.4rem; }      /* reaches the right edge; steps spread evenly */
.po-step { display: flex; align-items: center; flex: none; }   /* first tick snug in the capsule's curve */
.po-arrow { flex: 1 1 0; min-width: 2rem; display: flex; justify-content: center; }   /* every gap (including the one before the status) gets the same share */
.po-arrow.po-gap::before { content: none; }
.po-arrow::before {
    content: ''; width: 0.8rem; height: 0.8rem; margin-right: 0.3rem;
    border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); opacity: 0.6;
}
.po-arrow.done::before { border-color: var(--accent); opacity: 1; }
.po-step-btn { display: flex; align-items: center; gap: 0.8rem; height: 3.4rem; border: 0; background: none; padding: 0 1.2rem 0 0.6rem; border-radius: 1.7rem; corner-shape: round; text-align: left; color: var(--ink); }
.po-step-btn:not(:disabled):hover { background: var(--chip); }
.po-step-btn:disabled { cursor: default; }
.po-dot {
    width: 2.2rem; height: 2.2rem; border-radius: 50%; corner-shape: round; flex: none; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--ink-3); color: #ffffff;
}
.po-dot svg { width: 1.2rem; height: 1.2rem; }
.po-step.done .po-dot { border: 0; background: var(--rail-bg); box-shadow: var(--rail-edge); }
.po-text { display: flex; flex-direction: column; min-width: 0; }
.po-label { font-size: 1.3rem; white-space: nowrap; }
.po-date { font-size: 1.1rem; color: var(--ink-3); white-space: nowrap; }
.po-step:not(.done) .po-label { color: var(--ink-3); }
.po-modal-actions { display: flex; gap: 1rem; margin-top: 0.4rem; }

.proj-tag {
    display: inline-flex; align-items: center; height: 2.2rem; padding: 0 0.9rem; border-radius: 2rem; corner-shape: round; flex: none;
    font-size: 1.1rem; line-height: 1; white-space: nowrap; -webkit-text-stroke-width: 0;
}
.proj-tag.ready { background: rgba(245, 165, 36, 0.16); color: var(--warning); box-shadow: inset 0 0 0 1px rgba(245, 165, 36, 0.45); }
.proj-tag.inv { background: rgba(34, 197, 94, 0.14); color: var(--success); }
.proj-item .proj-tag { height: 1.9rem; padding: 0 0.7rem; font-size: 1rem; }
/* Job status: carved into the capsule like the To-do add field, concentric with it */
.po-status {
    flex: none; display: inline-flex; align-items: center; height: 3.4rem; padding: 0 1.6rem;
    border-radius: 1.7rem; corner-shape: round; background: var(--well); box-shadow: var(--pressed);
    font-size: 1.25rem; line-height: 1; white-space: nowrap; color: var(--ink-2);
}
.po-status.ready { color: var(--warning); }
.po-status.inv { color: var(--success); }
.flag-new { background: var(--accent-soft); color: var(--accent-text); }

/* ════════════════════════════════════════════
   IN-COMING (admin intake)
   ════════════════════════════════════════════ */
.page.framed { padding: 0; overflow: visible; display: flex; flex-direction: column; }
.page.framed > #pageArea { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* The admin In-coming page uses the full workspace width, like On-going (the narrow centred width is for the project manager page) */
.page.framed > #pageArea[data-view="incoming"] { max-width: none; margin: 0; }
.intake-ws .ws-bar .intake-track { width: 48rem; justify-self: center; }
.intake-ws .tab-count { background: var(--accent); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; padding: 0 0.45rem; margin-left: 0.4rem; border-radius: calc(1rem * var(--sq)); font-size: 1rem; font-style: normal; line-height: 1; -webkit-text-stroke-width: 0; }
.intake-ws .tab-count[hidden] { display: none; }
.intake-ws .tab-btn.active .tab-count { background: #ffffff; color: #cc4700; }
.intake-ws .proj-panel { width: 30rem; }
.intake-ws .proj-panel > * { min-width: 30rem; }
.intake-group { list-style: none; padding: 1.2rem 1rem 0.4rem; font-size: 1.1rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.intake-group span { color: var(--accent-text); }
.proj-item.intake-item { flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 0.8rem 1rem; min-height: 0; }
.intake-item-top { display: flex; align-items: center; gap: 0.7rem; }
.intake-reason { font-size: 1.15rem; color: var(--warning); margin-top: 0.2rem; }
.intake-reason.big { font-size: 1.35rem; margin: 1rem 0 0; padding: 0.8rem 1.1rem; border-radius: calc(0.8rem * var(--sq)); background: rgba(245, 165, 36, 0.1); }
.intake-done { font-size: 1.15rem; color: var(--success); margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intake-muted { font-size: 1.15rem; color: var(--ink-3); margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intake-foot { flex: none; padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--hair); font-size: 1.15rem; color: var(--ink-3); }
.intake-foot .intake-mailbox { font-family: var(--font-mono); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; -webkit-text-stroke-width: 0; }
.intake-warn { color: var(--warning); }
.intake-ok { color: var(--ink); margin-bottom: 0.2rem; }
#intakeRunBtn.spinning svg { animation: nxSpin 0.8s linear infinite; }

.type-dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; corner-shape: round; flex: none; background: var(--ink-3); }
.type-pill { display: inline-flex; align-items: center; height: 2.2rem; padding: 0 0.9rem; border-radius: 2rem; corner-shape: round; font-size: 1.15rem; line-height: 1; color: #ffffff; background: var(--ink-3); }
.t-po { background: var(--accent); }
.t-do { background: var(--info); }
.t-invoice { background: var(--purple); }
.t-service_report { background: var(--success); }

.intake-detail { display: grid; grid-template-columns: minmax(0, 38rem) minmax(0, 1fr); gap: 1.4rem; height: 100%; min-height: 48rem; }
.intake-card { background: var(--panel-bg); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--panel-edge), var(--lift); padding: 1.8rem 2rem; overflow-y: auto; }
.intake-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.intake-head .flag { margin-left: 0; }
.intake-subject { font-family: var(--font-heading); font-weight: 400; font-size: 2rem; line-height: 1.15; margin-bottom: 0.4rem; -webkit-text-stroke-width: 0; }
.intake-form { margin-top: 1.6rem; }
.intake-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }
.danger-text { color: var(--danger) !important; }
.intake-text { margin-top: 1.6rem; font-size: 1.25rem; color: var(--ink-3); }
.intake-text summary { cursor: pointer; }
.intake-text pre { margin-top: 0.8rem; padding: 1rem; border-radius: calc(0.8rem * var(--sq)); background: var(--well); box-shadow: var(--pressed); white-space: pre-wrap; font-family: var(--font-mono); font-size: 1.1rem; max-height: 24rem; overflow-y: auto; -webkit-text-stroke-width: 0; }
.intake-preview-wrap { position: relative; min-height: 0; background: var(--column-bg); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--panel-edge), var(--lift-sm); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.intake-preview { width: 100%; height: 100%; border: 0; display: block; background: #ffffff; }
.intake-preview.img { object-fit: contain; background: transparent; }
.intake-open { position: absolute; right: 1rem; bottom: 1rem; background: var(--surface); }
.intake-nofile { color: var(--ink-3); font-size: 1.35rem; padding: 2rem; text-align: center; }
.intake-banner { display: flex; align-items: center; gap: 1rem; margin: 0 auto 1.4rem; max-width: 96rem; padding: 1.2rem 1.6rem; border-radius: calc(1.2rem * var(--sq)); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.intake-banner > div { flex: 1; min-width: 0; }
.intake-setup { max-width: 76rem; margin: 2rem auto; }
.intake-setup code { font-family: var(--font-mono); font-size: 0.9em; padding: 0.1rem 0.4rem; border-radius: calc(0.4rem * var(--sq)); background: var(--well); -webkit-text-stroke-width: 0; }

.intake-banner.draft { box-shadow: inset 0 0 0 1px var(--accent); }
.intake-banner.draft + .card, .intake-banner + .intake-banner { margin-top: 0; }
@media (max-width: 1180px) { .intake-detail { grid-template-columns: 1fr; } .intake-preview-wrap { min-height: 50rem; } }

/* ════════════════════════════════════════════
   RESPONSIVE + MOTION
   ════════════════════════════════════════════ */
@media (max-width: 1180px) {
    .choice-grid { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .page { padding: 2rem 1.6rem 2.4rem; }
    body { --panel-w: 21rem; }
    .tab-btn span, .tab-btn { font-size: 1.2rem; }
    .tab-btn svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .choice-card.glow { animation: none; box-shadow: var(--panel-edge), var(--lift), inset 0 0 2rem rgba(255, 89, 0, 0.55), 0 0 1.4rem rgba(255, 89, 0, 0.4), 0 0 0 1px rgba(255, 138, 76, 0.8); }
    .modal-overlay, .modal-card, .menu-pop, .chat-msg { animation: none; }
    .choice-card { transition: none; }
}


/* ════════════════════════════════════════════
   TO-DO PAGE (project frame: lists on the left, the list on the right)
   ════════════════════════════════════════════ */
.todo-nav { gap: 0.9rem; }
.todo-nav-icon { width: 1.8rem; height: 1.8rem; flex: none; display: inline-flex; color: var(--info); }
.todo-nav-icon svg { width: 1.8rem; height: 1.8rem; }
.todo-nav-icon.myday { color: var(--ink-2); }
.todo-nav-icon.important { color: #f472b6; }
.todo-nav-icon.planned { color: #2dd4bf; }
.todo-nav-icon.assigned { color: var(--success); }
.todo-nav-icon.given { color: var(--purple); }
.todo-nav-icon.scheduled { color: var(--warning); }
.todo-nav-count { flex: none; font-size: 1.2rem; color: var(--ink-3); }
.proj-item.active .todo-nav-count { color: var(--accent-text); }
.todo-nav-sep { height: 1px; margin: 0.8rem 0.6rem; background: var(--hair); list-style: none; }
.todo-new-list { flex: none; padding: 0.6rem 0.6rem 0.8rem; border-top: 1px solid var(--hair); }
.todo-new-list button { display: flex; align-items: center; gap: 0.8rem; width: 100%; height: 3.2rem; padding: 0 1rem; border: 0; background: none;
    border-radius: calc(0.8rem * var(--sq)); color: var(--ink-2); font-size: 1.4rem; cursor: pointer; }
.todo-new-list button:hover { background: var(--chip); color: var(--ink); }
.todo-new-list svg { width: 1.6rem; height: 1.6rem; }
.todo-new-list input { width: 100%; height: 3.2rem; padding: 0 1rem; border: 0; outline: none; border-radius: calc(0.8rem * var(--sq));
    background: var(--well); box-shadow: var(--pressed), 0 0 0 2px var(--accent); color: var(--ink); font-size: 1.4rem; }
.todo-list-tools { display: inline-flex; gap: 0.2rem; margin-left: 1rem; vertical-align: middle; }
.tasks-header .btn-primary svg { width: 1.6rem; height: 1.6rem; }
.todo-quick {
    display: flex; align-items: center; gap: 1rem; height: 4.4rem; padding: 0 1.4rem; margin-bottom: 1.4rem;
    background: var(--well); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--pressed);
    transition: box-shadow 0.15s ease;
}
.todo-quick:focus-within { box-shadow: var(--pressed), inset 0 0 0 2px var(--accent); }   /* inside the box: the scrolling area clips anything outside it */
.todo-quick-icon { color: var(--ink-3); display: inline-flex; }
.todo-quick-icon svg { width: 1.8rem; height: 1.8rem; }
.todo-quick input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1.45rem; color: var(--ink); }
.todo-quick input::placeholder { color: var(--ink-3); }
.todo-group { margin-bottom: 1.6rem; }
.todo-group-title { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 0.8rem 0; font-family: var(--font-heading); font-weight: 400; font-size: 1.8rem; -webkit-text-stroke-width: 0; }
.todo-group-title.danger { color: var(--danger); }
.todo-count { min-width: 2.2rem; height: 1.9rem; padding: 0 0.6rem; border-radius: 2rem; corner-shape: round; display: inline-flex; align-items: center; justify-content: center;
    background: var(--chip); color: var(--ink-2); font-family: var(--font-body); font-size: 1.15rem; line-height: 1; -webkit-text-stroke-width: 0; }
.todo-row { gap: 1.2rem; }
.todo-check {
    width: 2.2rem; height: 2.2rem; flex: none; border-radius: 50%; corner-shape: round; border: 2px solid var(--ink-3);
    background: none; color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.todo-check svg { width: 1.3rem; height: 1.3rem; stroke-width: 2.6; }
.todo-check:hover { border-color: var(--accent); color: var(--accent-text); }
.todo-check.on { border-color: transparent; background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
.todo-row.is-done .row-title, .todo-item.is-done > .todo-item-head .row-title { color: var(--ink-3); text-decoration: line-through; }
.todo-star { flex: none; width: 2.8rem; height: 2.8rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
    border-radius: calc(0.6rem * var(--sq)); color: var(--ink-3); cursor: pointer; }
.todo-star svg { width: 1.7rem; height: 1.7rem; }
.todo-star:hover { color: #f472b6; background: var(--chip); }
.todo-star.on { color: #f472b6; }
.todo-star.on svg { fill: currentColor; }
.todo-star.static { width: auto; height: auto; }
.todo-star.static svg { width: 1.3rem; height: 1.3rem; }
.todo-check:disabled { cursor: default; opacity: 0.5; }

/* One card per item; it expands in place (List view) */
.todo-items { display: flex; flex-direction: column; gap: 0.8rem; }
.todo-item {
    background: var(--surface); border: 0; border-radius: 2.1rem; corner-shape: round;     /* same as the Board cards; edge ring only, no border */
    box-shadow: var(--panel-edge), var(--lift-sm); transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.todo-item:hover { box-shadow: var(--panel-edge), var(--lift); }
.todo-item.open { box-shadow: inset 0 0 0 1px var(--accent), var(--lift); }      /* the accent ring replaces the edge, never on top of a border */
.todo-item-head { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 1.4rem 1rem 1.4rem; cursor: pointer; border-radius: inherit; }
.todo-item-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.todo-item-head .row-main { min-width: 0; }
.todo-item-head .todo-sun, .todo-item-head .todo-star {
    width: 0; margin-left: -1.2rem; opacity: 0; overflow: hidden;   /* hidden ones take no room, so the chips sit at the edge */
    transition: width 0.22s var(--ease-snap), margin-left 0.22s var(--ease-snap), opacity 0.18s ease, color 0.12s ease, background 0.12s ease;
}
.todo-item:hover .todo-item-head .todo-sun, .todo-item:hover .todo-item-head .todo-star,
.todo-item.open .todo-item-head .todo-sun, .todo-item.open .todo-item-head .todo-star,
.todo-item-head .todo-sun.on, .todo-item-head .todo-star.on,
.todo-item-head .todo-sun:focus-visible, .todo-item-head .todo-star:focus-visible { width: 2.8rem; margin-left: -0.6rem; opacity: 1; }
.todo-sun.static, .todo-star.static { opacity: 1; }
.todo-sun { flex: none; width: 2.8rem; height: 2.8rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
    border-radius: calc(0.6rem * var(--sq)); color: var(--ink-3); cursor: pointer; }
.todo-sun svg { width: 1.9rem; height: 1.9rem; }
.todo-sun:hover { color: var(--warning); background: var(--chip); }
.todo-sun.on { color: var(--warning); }
.todo-sun.on svg { fill: currentColor; }
.todo-sun.static { width: auto; height: auto; }
.todo-sun.static svg { width: 1.3rem; height: 1.3rem; }
@media (hover: none) { .todo-item-head .todo-sun, .todo-item-head .todo-star { width: 2.8rem; margin-left: -0.6rem; opacity: 1; } }

/* Closed card: first steps */
.todo-steps-mini { list-style: none; padding: 0 1.4rem 1rem 5rem; margin-top: -0.4rem; }
.todo-steps-mini li { display: flex; align-items: center; gap: 0.8rem; min-height: 2.4rem; font-size: 1.3rem; color: var(--ink-2); }
.todo-steps-mini li.done span { color: var(--ink-3); text-decoration: line-through; }
.todo-steps-more { color: var(--ink-3); cursor: pointer; padding-left: 2.6rem; }
.todo-step-tick { width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; corner-shape: round; border: 1.5px solid var(--ink-3); background: none;
    color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.todo-step-tick svg { width: 1rem; height: 1rem; stroke-width: 3; }
.todo-step-tick:hover { border-color: var(--accent); }
.todo-step-tick.on { border-color: transparent; background: var(--accent); color: #ffffff; }
.todo-step-tick:disabled { cursor: default; opacity: 0.6; }

/* Expanded card */
.todo-exp { overflow: hidden; transition: height 0.28s var(--ease-snap), opacity 0.2s ease; }
.todo-detail { padding: 0.2rem 1.6rem 1.4rem 5rem; border-top: 1px solid var(--hair); }
.todo-item .todo-detail > .todo-d-label:first-child { margin-top: 1rem; }
.todo-d-title { display: block; width: 100%; margin: 1.2rem 0 0.4rem; padding: 0.4rem 0.6rem; margin-left: -0.6rem; border: 1px solid transparent; background: none;
    border-radius: calc(0.6rem * var(--sq)); font-family: var(--font-heading); font-size: 2rem; line-height: 1.2; color: var(--ink); -webkit-text-stroke-width: 0; }
input.todo-d-title:hover { border-color: var(--hair); }
input.todo-d-title:focus { outline: none; border-color: var(--accent); background: var(--well); }
.todo-d-note { font-size: 1.25rem; color: var(--ink-3); margin: 0.2rem 0 0.4rem; }
.todo-head-title { display: block; width: 100%; padding: 0.3rem 0.6rem; margin: -0.3rem 0 0 -0.6rem; border: 1px solid transparent; border-radius: calc(0.6rem * var(--sq)); background: none; font-size: 1.4rem; line-height: 1.3; color: var(--ink); }
.todo-head-title:hover { border-color: var(--hair); }
.todo-head-title:focus { outline: none; border-color: var(--accent); background: var(--well); }
.todo-item-head .row-title { display: flex; align-items: center; gap: 0.4rem; }
.todo-title-edit { flex: none; width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
    border-radius: calc(0.6rem * var(--sq)); color: var(--ink-3); cursor: pointer; }
.todo-title-edit svg { width: 1.4rem; height: 1.4rem; }
.todo-title-edit:hover { color: var(--accent-text); background: var(--chip); }
.todo-item .todo-detail > .todo-d-note:first-child { margin-top: 1rem; }
.todo-d-label { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); margin: 1.2rem 0 0.4rem; }
.todo-d-empty { color: var(--ink-3); font-size: 1.3rem; }
.todo-steps { list-style: none; }
.todo-steps li { display: flex; align-items: center; gap: 0.8rem; min-height: 3rem; border-bottom: 1px solid var(--hair); }
.todo-steps li:last-child { border-bottom: 0; }
.todo-step-text { flex: 1; min-width: 0; border: 0; background: none; padding: 0.4rem 0; font-size: 1.35rem; color: var(--ink); }
input.todo-step-text:focus { outline: none; background: var(--well); border-radius: calc(0.4rem * var(--sq)); padding-left: 0.4rem; }
.todo-steps li.done .todo-step-text { color: var(--ink-3); text-decoration: line-through; }
.todo-step-del { flex: none; width: 3.2rem; height: 3.2rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
    border-radius: calc(0.4rem * var(--sq)); color: var(--ink-3); cursor: pointer; opacity: 0; }
.todo-step-del svg { width: 2.4rem; height: 2.4rem; }     /* × doubled (Aaron, 29 Oct 2026) */
.todo-steps li:hover .todo-step-del, .todo-step-del:focus-visible { opacity: 1; }
.todo-step-del:hover { color: var(--danger); background: var(--chip); }
.todo-step-add { display: flex; align-items: center; gap: 0.8rem; min-height: 3.2rem; color: var(--ink-3); }
.todo-step-add svg { width: 1.6rem; height: 1.6rem; flex: none; }
.todo-step-add input { flex: 1; border: 0; background: none; font-size: 1.35rem; color: var(--ink); padding: 0.4rem 0; }
.todo-step-add input:focus { outline: none; }
.todo-d-notes { display: block; width: 100%; min-height: 4rem; resize: none; padding: 0.8rem 1rem; border: 0; border-radius: calc(0.8rem * var(--sq));
    background: var(--well); box-shadow: var(--pressed); font-size: 1.35rem; line-height: 1.45; color: var(--ink); overflow: hidden; }
.todo-d-notes:focus { outline: none; box-shadow: var(--pressed), 0 0 0 2px var(--accent); }
.todo-d-notes.ro { background: none; box-shadow: none; padding: 0; min-height: 0; color: var(--ink-2); }
.todo-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.todo-chip { display: inline-flex; align-items: center; gap: 0.6rem; height: 3rem; padding: 0 0.8rem 0 1rem; border: 0; border-radius: 2rem; corner-shape: round;
    background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); font-size: 1.25rem; line-height: 1; color: var(--ink-2); cursor: pointer; }
.todo-chip > svg:first-child { width: 1.5rem; height: 1.5rem; }
.todo-chip > svg:last-child { width: 1.3rem; height: 1.3rem; opacity: 0.6; }
.todo-chip:hover { color: var(--ink); }
.todo-chip.ro { background: var(--chip); box-shadow: none; cursor: default; padding-right: 1rem; }
.todo-detail .todo-actions { margin-top: 1.4rem; align-items: center; }
.todo-detail .todo-actions .btn-secondary svg { width: 1.4rem; height: 1.4rem; }
.todo-d-project { font-size: 1.25rem; color: var(--ink-3); }
.todo-pick { position: fixed; z-index: 1300; min-width: 20rem; max-height: 32rem; overflow-y: auto; padding: 0.6rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--float); animation: nxRise 0.12s ease; }
.todo-pick-opt { display: flex; align-items: center; gap: 0.8rem; width: 100%; min-height: 3.2rem; padding: 0 1rem; border: 0; background: none; text-align: left;
    border-radius: calc(0.6rem * var(--sq)); font-size: 1.35rem; color: var(--ink); cursor: pointer; }
.todo-pick-opt svg, .todo-pick-opt i { width: 1.4rem; height: 1.4rem; flex: none; color: var(--accent-text); }
.todo-pick-opt:hover, .todo-pick-opt:focus { background: var(--chip); outline: none; }
.todo-pick-opt.on { color: var(--accent-text); }
.todo-pick-date { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem 1rem; font-size: 1.15rem; color: var(--ink-3); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0.4rem 0; }
.todo-pick-date input { height: 3rem; padding: 0 0.6rem; border: 0; border-radius: calc(0.6rem * var(--sq)); background: var(--well); box-shadow: var(--pressed); color: var(--ink); font-size: 1.3rem; }
.todo-modal { width: 56rem; }
.todo-modal .modal-header { gap: 1rem; }
.todo-modal .modal-title { flex: 1; font-size: 1.4rem; color: var(--ink-3); }
.todo-modal .todo-detail { padding: 0; border-top: 0; }
.todo-modal .todo-d-title { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .todo-exp, .todo-item { transition: none; } }
.todo-repeat { display: inline-flex; align-items: center; gap: 0.3rem; }
.todo-repeat svg { width: 1.2rem; height: 1.2rem; }
.todo-src { flex: none; max-width: 24rem; height: 2.2rem; padding: 0 0.9rem; border-radius: 2rem; corner-shape: round; display: inline-flex; align-items: center;
    font-size: 1.15rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--chip); color: var(--ink-2); }
.todo-src.from { background: rgba(75, 139, 255, 0.16); color: var(--info); }
.todo-src.for { background: rgba(155, 123, 255, 0.18); color: var(--purple); }
.todo-src.project { width: 22rem; max-width: 22rem; justify-content: flex-start; padding: 0 0.9rem; }
.todo-src-clip { display: flex; align-items: center; height: 100%; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.todo-src-run { display: inline-block; white-space: nowrap; will-change: transform; text-box: trim-both cap alphabetic; }   /* capitals in the chip's middle */
.todo-src.project.overflows .todo-src-clip { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.todo-src.project.sliding .todo-src-clip { -webkit-mask-image: none; mask-image: none; }
@media (max-width: 1100px) { .todo-src.project { width: 16rem; max-width: 16rem; } }
.todo-card .kanban-card-meta .todo-src { max-width: 14rem; }
.todo-card .kanban-card-meta .todo-src.project { width: 14rem; }
.todo-done-toggle { display: flex; align-items: center; gap: 0.8rem; width: 100%; border: 0; background: none; padding: 0 0 0.6rem; cursor: pointer;
    font-family: var(--font-heading); font-size: 1.8rem; color: var(--ink-2); text-align: left; -webkit-text-stroke-width: 0; }
.todo-done-toggle svg { width: 1.6rem; height: 1.6rem; margin-left: auto; color: var(--ink-3); }
.todo-empty { padding: 4rem 0; }
.todo-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.6rem; }
.todo-actions .btn-primary { flex: 1; }
.todo-delete { color: var(--danger) !important; }
.todo-repeat-note { margin-top: -0.4rem; }

/* ════════════════════════════════════════════
   @MENTIONS
   ════════════════════════════════════════════ */
.mention { padding: 0 0.3rem; border-radius: calc(0.4rem * var(--sq)); background: var(--accent-soft); color: var(--accent-text); font-weight: inherit; white-space: nowrap; }
.mention.me { background: var(--accent); color: #ffffff; }
.mention.all { background: var(--chip); color: var(--ink); }
.chat-bubble-me .mention, .chat-bubble-me .mention.me, .chat-bubble-me .mention.all { background: rgba(255, 255, 255, 0.28); color: #ffffff; }
.mention-pop {
    position: fixed; z-index: 1300; width: 30rem; padding: 0.6rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--float);
    animation: nxRise 0.12s ease;
}
.mention-item { display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; padding: 0.4rem 0.8rem; border-radius: calc(0.6rem * var(--sq)); font-size: 1.4rem; cursor: pointer; }
.mention-item:hover { background: var(--chip); }
.mention-item.active { background: var(--accent-soft); color: var(--accent-text); }
.mention-item .avatar { width: 2.4rem; height: 2.4rem; font-size: 0.95rem; flex: none; }
.mention-item small { display: block; font-size: 1.15rem; color: var(--ink-3); }
.mention-item .mention-all-ic { background: var(--chip); color: var(--ink); font-size: 1.3rem; }
.mention-list { list-style: none; }
.mention-row { display: flex; align-items: flex-start; gap: 1.2rem; padding: 1.2rem 1.4rem; margin-bottom: 0.6rem; cursor: pointer;
    background: var(--surface); border: 1px solid var(--hair); border-radius: calc(1.2rem * var(--sq)); box-shadow: var(--lift-sm); }
.mention-row:hover { border-color: var(--accent); }
.mention-row.unread { border-color: var(--accent); background: var(--accent-soft); }
.mention-row .avatar { width: 3.2rem; height: 3.2rem; font-size: 1.2rem; flex: none; }
.mention-row-head { font-size: 1.35rem; line-height: 1.35; }
.mention-row-head .row-meta { margin-left: 0.8rem; }
.mention-row-text { margin-top: 0.3rem; font-size: 1.35rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mention-dot { flex: none; width: 1rem; height: 1rem; margin-top: 0.6rem; border-radius: 50%; corner-shape: round; background: var(--accent); }

/* ════════════════════════════════════════════
   SQUIRCLE CORNERS (Apple continuous corners)
   iOS cornerCurve .continuous ≈ Figma corner smoothing 60%. In CSS that is the same nominal radius
   scaled ×1.18 with corner-shape: superellipse(1.3) (fitted to within 0.1px for 6–32px radii).
   Chrome/Edge 139+ draw it; Safari and Firefox ignore corner-shape and keep ordinary rounded corners.
   Pills and circles stay round (declared next to their border-radius, or listed below).
   Concentric rule still applies to the nominal radii: inner = outer - gap.
   ════════════════════════════════════════════ */
@supports (corner-shape: superellipse(2)) {
    :root { --sq: 1.18; }
    *, *::before, *::after { corner-shape: superellipse(1.3); }
    .meter, .meter span, .rail-badge, .row-swatch, .tab-count, .inbox-unread, .proj-wait, .po-dot { corner-shape: round; }
}

/* ════════════════════════════════════════════
   HOME (customisable widgets, assets/js/home.js)
   12-column grid packed like a masonry wall: each widget spans as many 4px rows as it is tall.
   Cards 2.4rem corners; rows and chips inside are capsules 1rem in.
   ════════════════════════════════════════════ */
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.hm-sub { color: var(--ink-3); font-size: 1.4rem; margin-top: 0.6rem; }
.hm-sub b { font-weight: 400; color: var(--ink); }
.hm-sub b.red { color: var(--danger); }
.hm-actions { display: flex; gap: 0.8rem; }
.hm-actions .btn-primary, .hm-actions .btn-secondary { height: 3.6rem; padding: 0 1.6rem; }
.hm-actions .btn-sm-outline { height: 3.6rem; padding: 0 1.4rem; font-size: 1.3rem; }
.hm-actions svg { width: 1.6rem; height: 1.6rem; }
.hm-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.2rem; grid-auto-rows: 1px; grid-auto-flow: row dense; align-items: start; }   /* 1.2rem gaps both ways (home.js) */
.hm-w { grid-column: span 12; min-width: 0; }
.hm-w.size-s { grid-column: span 4; }
.hm-w.size-m { grid-column: span 6; }
.hm-w.size-l { grid-column: span 8; }
@media (max-width: 1100px) { .hm-w.size-s, .hm-w.size-m { grid-column: span 6; } .hm-w.size-l { grid-column: span 12; } }
@media (max-width: 800px) { .hm-w.size-s, .hm-w.size-m { grid-column: span 12; } }
.hm-card {
    position: relative; container-type: inline-size; padding: 1rem; display: flex; flex-direction: column;   /* pieces in the corners: 1.4rem radius (2.4 - 1) */
    background: var(--panel-bg); box-shadow: var(--panel-edge), var(--lift); border-radius: 2.4rem; corner-shape: round;
}
.hm-title { display: flex; align-items: center; gap: 0.8rem; min-height: 2.8rem; margin: 0 0 0.8rem 0.8rem; font-family: var(--font-heading); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.hm-sp { flex: 1; }
.hm-count { min-width: 2.2rem; height: 2.2rem; padding: 0 0.7rem; border-radius: 1.1rem; corner-shape: round; display: inline-flex; align-items: center; justify-content: center;
    background: var(--chip); color: var(--ink-2); font-family: var(--font-body); font-size: 1.15rem; }
.hm-count.red { background: rgba(255, 77, 77, 0.15); color: var(--danger); }
.hm-switch { height: 2.8rem; }
.hm-switch button { font-size: 1.25rem; padding: 0 1.2rem; }
.hm-empty { color: var(--ink-3); font-size: 1.35rem; padding: 0.6rem 0.8rem 0.4rem; }
.hm-loading { height: 12rem; border-radius: 1.4rem; corner-shape: round; background: linear-gradient(90deg, var(--chip) 25%, var(--well) 50%, var(--chip) 75%); background-size: 200% 100%; animation: hmShimmer 1.2s linear infinite; }
@keyframes hmShimmer { to { background-position: -200% 0; } }

/* Icons beside ONE line of text sit on the middle of the capitals (Aaron, 26 Oct 2026: option B, like Apple's symbols).
   Flex centring puts an icon on the middle of the text's line box, which for DIN Next is the middle of the lowercase
   letters (and Chrome and Safari round it differently), so the icon looked low. Raise it by 0.1em of the text size here,
   in one place: never nudge single icons. A new control with an icon and a label: add its class to this list (or give it
   .ic-text). Icons alone (round buttons, rail, tab bar) and icons beside two lines (to-do ticks, PO dots) are not listed.
   Fonts can't be fixed instead: Safari ignores ascent-override. Test: dev/tests/align_test.py (Chrome and Safari). */
:is(.btn-primary, .btn-secondary, .btn-grey, .btn-danger, .tab-btn, .menu-item, .todo-new-list button, .nx-search-bar, .ph-pull-bar, .ic-text) > svg,
.todo-nav-icon { translate: 0 -0.1em; }
.chip-toggle > input[type=checkbox] { translate: 0 -0.18em; }       /* the browser's own checkbox box sits lower than an icon */

/* ════════════════════════════════════════════
   CLIENTS (clients.js): side list, All clients, a client page with a year Schedule grid like Aaron's Excel
   ════════════════════════════════════════════ */
/* Client tabs: on desktop the plain underline tabs Aaron likes; a phone shows the same buttons as the project's sliding switch at the bottom */
@media (min-width: 701px) {
    .cl-track { display: flex; gap: 0.4rem; height: auto; width: 100%; margin: 0 0 1.6rem; background: none; border-radius: 0; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; box-shadow: none; }
    .cl-track::-webkit-scrollbar { display: none; }
    .cl-track .tab-ink { display: none; }
    .cl-track .tab-btn, .cl-track .tab-btn:hover, .cl-track .tab-btn.active, .cl-track .tab-btn.active:hover { flex: none; height: auto; background: none !important; box-shadow: none !important; border-radius: 0;
        color: var(--ink-3); font-size: 1.4rem; padding: 0.9rem 1.4rem; border-bottom: 0.2rem solid transparent; margin-bottom: -1px; }
    .cl-track .tab-btn.active, .cl-track .tab-btn.active:hover { color: var(--ink); border-bottom-color: var(--accent); }
    .cl-track .tab-btn:not(.active):hover { color: var(--ink-2); }
    .cl-track .tab-btn svg { display: none; }
}
/* Sites: a client with several sites opens out to them in the side list */
.cl-caret { display: inline-flex; margin-left: 0.4rem; color: var(--ink-3); transition: transform 0.2s var(--ease-snap); }
.cl-caret svg { width: 1.4rem; height: 1.4rem; } .cl-caret.open { transform: rotate(180deg); }
.cl-sites { list-style: none; } .cl-sites ul { list-style: none; margin: 0.2rem 0 0.6rem 1.4rem; padding-left: 1rem; border-left: 1px solid var(--hair); }
.cl-site { padding: 0.7rem 1rem; border-radius: 1.2rem; corner-shape: round; font-size: 1.35rem; color: var(--ink-2); cursor: pointer; }
.cl-site:hover { background: var(--chip); } .cl-site.on { color: var(--accent-text); background: var(--accent-soft); }
.cl-search { display: flex; min-width: calc(var(--panel-w) - 2.4rem); align-items: center; gap: 0.8rem; margin: 0 1.2rem 1rem; height: 3.6rem; padding: 0 1.2rem; border-radius: 2rem; corner-shape: round; background: var(--well, var(--chip)); color: var(--ink-3); }
.cl-search svg { width: 1.5rem; height: 1.5rem; flex: none; }
.cl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 1.35rem; }
.cl-badge { flex: none; min-width: 2rem; height: 1.8rem; padding: 0 0.5rem; border-radius: 1rem; corner-shape: round; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; margin-left: 0.4rem; }
.cl-badge.late { background: rgba(255, 77, 77, 0.18); color: var(--danger); } .cl-badge.quote { background: rgba(245, 165, 36, 0.18); color: var(--warning); }
.proj-item.cl-archived .proj-name { color: var(--ink-3); }
.cl { padding-bottom: 4rem; overflow: auto; }        /* same insets as To-do and the project pages */
.cl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 1.6rem; }
.cl-title { font-family: var(--font-heading); font-weight: 400; font-size: 3rem; line-height: 1.05; }
.cl-sub { color: var(--ink-3); font-size: 1.3rem; margin-top: 0.5rem; }
.cl-actions { display: flex; gap: 0.8rem; flex: none; }
.cl-bar { display: flex; align-items: center; gap: 1.6rem 2rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.cl-year { display: flex; align-items: center; gap: 0.8rem; font-size: 1.5rem; }
.cl-year button { display: flex; align-items: center; justify-content: center; border: 0; background: var(--chip); color: var(--ink); width: 2.8rem; height: 2.8rem; border-radius: 50%; cursor: pointer; }
.cl-year svg { width: 1.4rem; height: 1.4rem; }
.cl-legend { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-3); font-size: 1.2rem; margin-left: auto; flex-wrap: wrap; }
.cl-legend .cl-dot { min-width: 2.2rem; margin-left: 1rem; pointer-events: none; }
.cl-grid-wrap, .cl-table-wrap { border-radius: 1.6rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); overflow-x: auto; }
.cl-grid { width: 100%; border-collapse: collapse; font-size: 1.3rem; }
.cl-grid th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 1.15rem; padding: 0.9rem 0.8rem; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.cl-grid td { padding: 0.35rem 0.8rem; white-space: nowrap; color: var(--ink-2); }
.cl-grid tr.cl-first td { border-top: 1px solid var(--hair); padding-top: 0.8rem; }
.cl-grid tbody tr:first-child td { border-top: 0; }
.cl-no { color: var(--ink-3); width: 2.4rem; } .cl-loc { color: var(--ink-3) !important; }
.cl-m, th.cl-m { text-align: center; min-width: 6.4rem; scroll-snap-align: start; }
/* Two years of months scroll sideways a month at a time; # / Equipment / Location / Service stay put (lefts set by clGridLayout) */
.cl-grid-wrap { scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.cl-grid .cl-stk { position: sticky; z-index: 2; background: var(--panel); }
.cl-grid .cl-no { left: var(--l0, 0); } .cl-grid .cl-eq { left: var(--l1, 0); } .cl-grid .cl-loc { left: var(--l2, 0); }
.cl-grid .cl-svc { left: var(--l3, 0); box-shadow: 1px 0 0 var(--hair); }      /* the edge the months slide under */
.cl-grid .cl-y2 { border-left: 1px solid var(--hair); }                                              /* where the second year starts */
/* The headings stay at the top while the rows scroll (on a phone the grid fills the screen and scrolls inside) */
.cl-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--panel); }
.cl-grid thead tr:last-child th { top: var(--hy, 0); }
.cl-grid thead th.cl-stk { z-index: 4; }
.cl-grid tr.cl-years th { padding: 0.9rem 0.8rem 0; border-bottom: 0; color: var(--ink); font-size: 1.3rem; }
.cl-grid .cl-yr span { position: sticky; left: calc(var(--l4, 0px) + 0.8rem); }                        /* the year label rides along while its months scroll by */
.cl-m.now { background: color-mix(in srgb, var(--accent) 7%, transparent); } th.cl-m.now { color: var(--accent-text); }
.cl-link { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.cl-link.soft { color: var(--ink-2); } .cl-link:hover { color: var(--accent-text); }
.cl-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 3.4rem; height: 2.2rem; padding: 0 0.6rem; margin: 0.1rem; border: 0; border-radius: 1.2rem; corner-shape: round; font: inherit; font-size: 1.2rem; cursor: pointer; }
.cl-dot.done { background: var(--chip); color: var(--ink-3); } .cl-dot.plan, .cl-dot.none { background: rgba(34, 197, 94, 0.18); color: var(--success); }
.cl-dot.quote { background: rgba(245, 165, 36, 0.22); color: var(--warning); } .cl-dot.late { background: rgba(255, 77, 77, 0.2); color: var(--danger); }
.cl-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.cl-stat { padding: 1.6rem 1.8rem; border-radius: 1.8rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); color: var(--ink-3); font-size: 1.3rem; }
.cl-stat b { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 3.2rem; line-height: 1; color: var(--ink); margin-bottom: 0.6rem; }
.cl-stat.late b { color: var(--danger); } .cl-stat.quote b { color: var(--warning); }
/* ── Tables: one shared system (Aaron, 28 Oct). Rows split by a hairline only, no vertical lines.
   One main column takes the spare width and may wrap; every other column fits its content on one line (t-fit),
   so rows keep one height and columns line up. Numbers and dates right-aligned with even-width digits. ── */
.nx-table { width: 100%; border-collapse: collapse; font-size: 1.35rem; }
.nx-table thead th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 1.15rem; padding: 1.1rem 1.6rem; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.nx-table td { padding: 1.2rem 1.6rem; border-bottom: 1px solid var(--hair); color: var(--ink-2); vertical-align: middle; }
.nx-table tbody:last-child tr:last-child td { border-bottom: 0; }
.nx-table tbody tr:not(.t-group) { cursor: pointer; }
.nx-table tbody tr:not(.t-group):hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.nx-table .t-fit { width: 1%; white-space: nowrap; }
.nx-table .t-main { color: var(--ink); }
.nx-table .t-sub { display: block; margin-top: 0.3rem; font-size: 1.25rem; color: var(--ink-3); }
.nx-table .t-clip { max-width: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* takes the spare width; too long = … (full text on hover) */
.nx-table .t-group th { text-align: left; font-weight: 400; font-size: 1.4rem; color: var(--ink); padding: 1.6rem 1.6rem 0.8rem; border-bottom: 1px solid var(--hair); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.nx-table .t-group th span { margin-left: 0.8rem; color: var(--ink-3); font-size: 1.2rem; }
.nx-table .t-num { text-align: right; font-variant-numeric: tabular-nums; }
.nx-table .t-end { text-align: right; }
.nx-table .cl-small { height: 2.4rem; vertical-align: middle; }     /* same height as the pills, so every row is one height */
.cl-list { width: 100%; border-collapse: collapse; font-size: 1.35rem; }
.cl-list th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 1.15rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.cl-list td { padding: 1rem 1.4rem; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.cl-list tbody tr:last-child td { border-bottom: 0; }
.cl-list tbody tr, .cl-items tbody tr { cursor: pointer; } .cl-list tbody tr:hover td, .cl-items tbody tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.cl-strong { color: var(--ink) !important; } .cl-muted { color: var(--ink-3); } .cl-step { color: var(--ink-3); white-space: nowrap; }
.cl-pill { display: inline-block; height: 2.4rem; padding: 0 1rem; border-radius: 2rem; corner-shape: round; font-size: 1.2rem; white-space: nowrap; line-height: 2.4rem; vertical-align: middle; }
.cl-pill.late { background: rgba(255, 77, 77, 0.2); color: var(--danger); } .cl-pill.quote, .cl-pill.sent, .cl-pill.po { background: rgba(245, 165, 36, 0.22); color: var(--warning); }
.cl-pill.plan { background: rgba(34, 197, 94, 0.18); color: var(--success); } .cl-pill.none { background: var(--chip); color: var(--ink-3); }
.cl-small { height: 3rem; padding: 0 1.4rem; font-size: 1.25rem; }
.cl-hpo { flex: none; height: 2.4rem; padding: 0 1rem; border-radius: 1.2rem; corner-shape: round; display: inline-flex; align-items: center; background: var(--chip); color: var(--ink-2); font-size: 1.2rem; }
/* No PO (Aaron, 29 Oct 2026): a job done without a PO, or a project with none yet: orange, like a quotation to do */
.cl-nopo { flex: none; height: 2.4rem; padding: 0 1rem; border: 0; border-radius: 1.2rem; corner-shape: round; display: inline-flex; align-items: center; vertical-align: middle;
    background: rgba(245, 165, 36, 0.22); color: var(--warning); font: inherit; font-size: 1.2rem; white-space: nowrap; }
button.cl-nopo { cursor: pointer; } button.cl-nopo:hover { background: rgba(245, 165, 36, 0.32); }
.cl-pcard-t .cl-nopo { display: inline-flex; margin: 0; color: var(--warning); height: 2rem; padding: 0 0.8rem; font-size: 1.15rem; }
.cl-nopo-list { margin: 0.4rem 0 1rem 1.8rem; color: var(--ink); font-size: 1.4rem; line-height: 1.7; }
.cl-nopo-todo { margin: 0.6rem 0 1.4rem; } .cl-nopo-proj { font-size: 1.4rem; color: var(--ink-2); margin: 0 0 1.4rem; }
.cl-nopo-pick { display: flex; flex-direction: column; gap: 0.5rem; font-size: 1.2rem; color: var(--ink-3); margin-bottom: 1.4rem; } .cl-nopo-pick .cl-select { width: 100%; }
.cl-nopo-acts { display: flex; justify-content: flex-end; gap: 0.8rem; flex-wrap: wrap; }
/* The automatic quotation to-do: a small chip, like the To-do source chips; it opens the to-do */
.cl-todo-chip { display: inline-flex; flex: none; align-items: center; gap: 0.4rem; height: 2.4rem; padding: 0 1rem 0 0.8rem; border: 0; border-radius: 2rem; corner-shape: round;
    font: inherit; font-size: 1.2rem; line-height: 1; white-space: nowrap; vertical-align: middle; background: var(--accent-soft); color: var(--accent-text); }
.cl-todo-chip svg { width: 1.3rem; height: 1.3rem; flex: none; }
.cl-cycle summary .cl-todo-chip { margin-left: auto; }      /* the Quotation row: chip on the right edge */
.cl-cycle summary .cl-todo-chip svg { width: 1.3rem; height: 1.3rem; }
button.cl-todo-chip { cursor: pointer; } button.cl-todo-chip:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.cl-card { padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; border-radius: 1.8rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); }
.cl-card.cl-dim { opacity: 0.6; }
.cl-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.6rem; margin-bottom: 1rem; }
.cl-card-title { font-size: 1.6rem; color: var(--ink); }
.cl-items { width: 100%; border-collapse: collapse; font-size: 1.3rem; table-layout: fixed; }      /* same columns in every equipment card */
.cl-items .c-every { width: 11rem; } .cl-items .c-date { width: 15rem; } .cl-items .c-due { width: 15rem; } .cl-items .c-step { width: 24rem; }
.cl-items .t-num { text-align: right; font-variant-numeric: tabular-nums; } .cl-items th.t-num + th:not(.t-num), .cl-items td.t-num + td:not(.t-num) { padding-left: 2.4rem; }
.cl-items td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cl-items td.cl-strong { white-space: normal; }
.cl-items th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 1.15rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--hair); }
.cl-items td { padding: 0.7rem 0.8rem; color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.cl-items tbody tr:last-child td { border-bottom: 0; }
.cl-step-chip { display: inline-block; margin-right: 0.4rem; padding: 0 0.7rem; height: 2rem; line-height: 2rem; border-radius: 1rem; font-size: 1.1rem; background: var(--chip); color: var(--ink-3); }
.cl-step-chip.on { background: var(--accent-soft); color: var(--accent-text); }
.cl-select { height: 3.6rem; padding: 0 1.2rem; border-radius: 1.8rem; border: 1px solid var(--hair); background: var(--panel); color: var(--ink); font: inherit; font-size: 1.35rem; max-width: 100%; }
.cl-people { list-style: none; } .cl-people li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--hair); }
.cl-people li:first-child { border-top: 0; } .cl-people a { color: inherit; }
.cl-notes { color: var(--ink-2); font-size: 1.35rem; white-space: pre-wrap; }
.cl-item-card { width: 52rem; }
.cl-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem 1.6rem; font-size: 1.35rem; margin: 0.4rem 0 1.6rem; }
.cl-facts dt { color: var(--ink-3); white-space: nowrap; } .cl-facts dd { color: var(--ink); text-align: right; }     /* values on the right edge, in line with Edit service and the To-do chip */
.cl-cycle details { border-top: 1px solid var(--hair); padding: 1rem 0; }
.cl-cycle summary { display: flex; align-items: center; gap: 0.8rem; cursor: pointer; font-size: 1.4rem; color: var(--ink); list-style: none; }
.cl-cycle summary::-webkit-details-marker { display: none; }
.cl-cycle summary svg { width: 1.6rem; height: 1.6rem; color: var(--accent-text); }
.cl-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin: 1rem 0 0.8rem; }
.cl-form-row label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 1.2rem; color: var(--ink-3); }
.cl-form-row input, .cl-form-row select { height: 3.4rem; padding: 0 1rem; border-radius: 1rem; border: 1px solid var(--hair); background: var(--well, var(--chip)); color: var(--ink); font: inherit; font-size: 1.35rem; }
.cl-hint { color: var(--ink-3); font-size: 1.2rem; }
.cl-hist { list-style: none; font-size: 1.3rem; color: var(--ink-2); } .cl-hist li { padding: 0.4rem 0; } .cl-hist b { font-weight: 400; color: var(--ink); margin-right: 1rem; }
.cl-form-card { width: 56rem; }
.cl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.6rem; margin-bottom: 1.6rem; }
.cl-form-grid .form-group { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; font-size: 1.25rem; color: var(--ink-3); }
.cl-form-grid .form-group.wide { grid-column: 1 / -1; }
.cl-form-grid input, .cl-form-grid select, .cl-form-grid textarea { width: 100%; min-height: 3.8rem; padding: 0.6rem 1.2rem; border-radius: 1.2rem; border: 1px solid var(--hair); background: var(--well, var(--chip)); color: var(--ink); font: inherit; font-size: 1.4rem; }
.cl-form-grid .cl-check { flex-direction: row; align-items: center; gap: 1rem; } .cl-form-grid .cl-check input { width: auto; min-height: 0; }
.cl-del { margin-right: auto; color: var(--danger); }
@media (max-width: 699px) {
    .cl { padding: 1.4rem 1.4rem 12rem; }
    .cl-head { flex-direction: column; gap: 1rem; } .cl-title { font-size: 2.6rem; }
    .cl-stats { grid-template-columns: 1fr 1fr; }
    .cl-stats .cl-stat:last-child { grid-column: span 2; }
    .cl-legend { margin-left: 0; }
    .cl-form-grid { grid-template-columns: 1fr; }
    .cl-legend { gap: 0.4rem; } .cl-legend .cl-dot { margin-left: 0.6rem; }
    /* the grid: service names stay pinned on the left while the months scroll sideways */
    .cl-grid .cl-no, .cl-grid .cl-eq, .cl-grid .cl-loc { display: none; }
    .cl-grid th.cl-svc, .cl-grid td.cl-svc { min-width: 15rem; max-width: 17rem; white-space: normal; }
    .cl-grid .cl-ph-eq { display: block; margin-bottom: 0.3rem; color: var(--ink); }
    /* All clients: each row becomes a small card (due + date, service, client, equipment, next step) */
    /* All clients on a phone: a board, one client per screen (swipe sideways, like the project Board), a card per service due */
    .cl-stats { gap: 0.8rem; margin-bottom: 1.4rem; } .cl-stat { padding: 1.2rem 1.4rem; font-size: 1.25rem; } .cl-stat b { font-size: 2.6rem; margin-bottom: 0.3rem; }
    .cl-dots { display: flex; justify-content: center; gap: 0.6rem; margin: 0 0 1rem; }
    .cl-dots button { width: 0.7rem; height: 0.7rem; padding: 0; border: 0; border-radius: 1rem; corner-shape: round; background: var(--ink-3); opacity: 0.4; transition: width 0.2s var(--ease-snap), opacity 0.2s; }
    .cl-dots button.on { width: 2rem; opacity: 1; background: var(--accent); }
    .cl-board { display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y;
        margin: 0 calc(var(--ph-gap) * -1); padding: 0 var(--ph-gap) 0.6rem; scroll-padding: 0 var(--ph-gap); align-items: flex-start; }
    .cl-board::-webkit-scrollbar { display: none; }
    .cl-col { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; padding: 0.8rem; border-radius: 2.9rem; corner-shape: round;
        background: var(--column-bg); box-shadow: var(--panel-edge), var(--lift-sm); }      /* 2.9rem around 2.1rem cards, 0.8rem in: concentric */
    .cl-col-head { display: flex; align-items: center; gap: 0.8rem; width: 100%; height: 4.4rem; padding: 0 1.2rem 0 1.6rem; border: 0; border-radius: 2.1rem; corner-shape: round;
        background: var(--well); box-shadow: var(--pressed); color: var(--ink); font: inherit; font-size: 1.6rem; text-align: left; }
    .cl-col-head span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cl-col-head .col-count { min-width: 2.2rem; height: 2.2rem; padding: 0 0.7rem; background: var(--chip); color: var(--ink-2); }
    .cl-col-head svg { width: 1.6rem; height: 1.6rem; flex: none; color: var(--ink-3); }
    .cl-col-cards { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.8rem; }
    .cl-col > .row-empty { padding: 2rem 1rem 1.4rem; text-align: center; }
    .cl-tcard { padding: 1.3rem 1.4rem 1.2rem; border-radius: 2.1rem; corner-shape: round; background: var(--surface); box-shadow: var(--panel-edge), var(--lift-sm); cursor: pointer; }
    .cl-tcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
    .cl-tcard-title { font-size: 1.6rem; color: var(--ink); line-height: 1.3; }
    .cl-tcard-sub { margin-top: 0.4rem; font-size: 1.3rem; color: var(--ink-3); }
    .cl-tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; min-height: 2.4rem; }
    .cl-tcard-date { font-size: 1.3rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
    /* A client's page: room for the sliding tab switch at the bottom */
    #clBody[data-tab] { padding-bottom: calc(var(--ph-bottom) + var(--ph-switch) + 2rem) !important; }
    .cl-ws .cl-track { margin: 0; }
    #clBody[data-tab="schedule"] .cl-grid-wrap { overflow: auto; }
    .cl-grid-wrap::-webkit-scrollbar-corner { background: transparent; }
    /* Compact client header, so the schedule gets the screen (like Calendar) */
    #clBody[data-tab] .cl-head { flex-direction: row; align-items: center; gap: 1rem; margin-bottom: 1rem; }
    #clBody[data-tab] .cl-head > div:first-child { min-width: 0; flex: 1; }
    #clBody[data-tab] .cl-title { font-size: 2.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #clBody[data-tab] .cl-head .cl-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.25rem; }     /* only the header's line, not addresses below */
    .cl-people li > div:first-child { min-width: 0; flex: 1; } .cl-people .cl-sub { overflow-wrap: anywhere; }
    #clBody[data-tab] .cl-actions .btn-secondary { font-size: 0; gap: 0; width: 4rem; height: 4rem; padding: 0; justify-content: center; border-radius: 50%; }
    #clBody[data-tab] .cl-actions .btn-secondary svg { width: 1.8rem; height: 1.8rem; }
    #clBody[data-tab="schedule"] .cl-bar { gap: 0.8rem 1rem; margin-bottom: 1rem; }
    #clBody[data-tab="schedule"] .cl-bar .view-toggle button { font-size: 1.35rem; padding: 0 1.2rem; }
    #clBody[data-tab="schedule"] .cl-year { margin-left: auto; font-size: 1.35rem; } #clBody[data-tab="schedule"] .cl-year button { width: 3rem; height: 3rem; }
    #clBody[data-tab="schedule"] .cl-legend { font-size: 1.15rem; gap: 0.3rem; } #clBody[data-tab="schedule"] .cl-legend .cl-dot { min-width: 1.6rem; height: 1.6rem; margin-left: 0.5rem; }
    /* Equipment (pick B): equipment card 2.1rem; service cards sit 0.8rem in, so 1.3rem corners (concentric) */
    .cl-eqm { padding: 0.8rem; margin-bottom: 1.2rem; border-radius: 2.1rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); }
    .cl-eqm-head { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.6rem 0.6rem 0; }
    .cl-eqm-t { flex: 1; min-width: 0; } .cl-eqm-n { font-size: 1.7rem; color: var(--ink); } .cl-eqm-m { margin-top: 0.2rem; font-size: 1.3rem; color: var(--ink-3); }
    .cl-ib { flex: none; width: 3.6rem; height: 3.6rem; padding: 0; border: 0; border-radius: 50%; corner-shape: round; display: inline-flex; align-items: center; justify-content: center;
        background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); color: var(--ink); }
    .cl-ib svg { width: 1.7rem; height: 1.7rem; }
    .cl-eqm-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 0.6rem 0.2rem; }
    .cl-eqm-chips span { height: 2.4rem; padding: 0 1rem; border-radius: 1.2rem; corner-shape: round; display: inline-flex; align-items: center; background: var(--chip); color: var(--ink-2); font-size: 1.2rem; }
    .cl-svcc { margin-top: 0.8rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: 1.3rem; corner-shape: round; background: var(--surface); box-shadow: var(--panel-edge); cursor: pointer; }
    .cl-svcc-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; } .cl-svcc-top b { font-weight: 400; font-size: 1.5rem; color: var(--ink); }
    .cl-svcc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.2rem; margin-top: 0.8rem; }
    .cl-svcc-facts span { display: block; font-size: 1.15rem; color: var(--ink-3); } .cl-svcc-facts i { font-style: normal; font-size: 1.35rem; color: var(--ink-2); }
    .cl-eqm > .row-empty { padding: 1rem 0.6rem 0.6rem; }
    /* Projects (pick A): card 2.1rem; the step pills sit 0.8rem in from the sides and bottom, 1.3rem round ends (concentric), centred */
    .cl-pcard { padding: 1.3rem 1.4rem 0.8rem; margin-bottom: 1rem; border-radius: 2.1rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); cursor: pointer; }
    .cl-pcard-head { display: flex; align-items: flex-start; gap: 0.8rem; }
    .cl-pcard-t { flex: 1; min-width: 0; } .cl-pcard-t b { display: block; font-weight: 400; font-size: 1.6rem; color: var(--ink); } .cl-pcard-t span { display: block; margin-top: 0.3rem; font-size: 1.25rem; color: var(--ink-3); overflow-wrap: anywhere; }
    .cl-psteps { display: flex; justify-content: center; gap: 0.6rem; margin: 1.2rem -0.6rem 0; }
    .cl-psteps span { flex: 1; height: 2.6rem; border-radius: 1.3rem; corner-shape: round; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--chip); color: var(--ink-3); }
    .cl-psteps span.on { background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
    /* History (pick A): a date heading, then one line per service done that day */
    .cl-hday { margin: 1.6rem 0.6rem 0.6rem; font-size: 1.2rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; } .cl-hday:first-child { margin-top: 0.4rem; }
    .cl-hlist { border-radius: 2.1rem; corner-shape: round; background: var(--panel); box-shadow: var(--panel-edge), var(--lift-sm); overflow: hidden; }
    .cl-hrow { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; cursor: pointer; } .cl-hrow + .cl-hrow { border-top: 1px solid var(--hair); }
    .cl-hrow-t { flex: 1; min-width: 0; } .cl-hrow-t b { display: block; font-weight: 400; font-size: 1.5rem; color: var(--ink); } .cl-hrow-t span { display: block; margin-top: 0.2rem; font-size: 1.2rem; color: var(--ink-3); }
    .cl-due thead { display: none; }
    .cl-due tr:not(.t-group) { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "due date" "svc step" "eq eq"; gap: 0.4rem 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--hair); }
    .cl-due tbody:last-child tr:last-child { border-bottom: 0; }
    .cl-due td { display: block; width: auto !important; max-width: none; padding: 0; border: 0 !important; text-align: left; white-space: normal; }
    .cl-due td:nth-child(1) { grid-area: due; } .cl-due td:nth-child(2) { grid-area: eq; font-size: 1.3rem; color: var(--ink-3); }
    .cl-due td:nth-child(3) { grid-area: svc; color: var(--ink); font-size: 1.5rem; } .cl-due td:nth-child(4) { grid-area: date; align-self: center; color: var(--ink-3); }
    .cl-due td:nth-child(5) { grid-area: step; align-self: center; text-align: right; }     /* the To-do chip sits beside the service name */
    .cl-due .t-group th { display: block; padding: 1.6rem 1.4rem 0.8rem; }
    .cl-due td:empty { display: none; }
    .cl-due td.t-clip { max-width: none; width: auto; white-space: normal; overflow: visible; }
}
.cl-ph-eq { display: none; }

/* Phone To-do thumb dial (thumbdial.js): a dark shape out of the right edge, curving into it at both ends */
.td-dial { position: fixed; right: 0; bottom: calc(var(--ph-gap, 2.1rem) + var(--ph-bar, 5.9rem) + 14.9rem); z-index: 75;   /* one pill higher than just above the + button (Aaron, 28 Oct); grows upwards */ touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.td-dial[hidden] { display: none; }
.td-dial::after { content: ''; position: absolute; inset: -1rem 0 -1rem -1.8rem; }      /* a 44px-wide touch area around the slim bar */
.td-shape { --bar: 3rem; position: relative; width: var(--bar); display: flex; align-items: center; justify-content: center; overflow: visible;
            padding: 0.4rem 0; transition: padding 0.3s var(--ease-snap); }
/* the outline is one smooth path (thumbdial.js outline()), reaching above and below the box for the soft joins */
.td-bg { position: absolute; right: 0; top: -2.4rem; width: 100%; pointer-events: none; overflow: visible; }
.td-bg path { fill: #121212; }
.td-bg { opacity: 0; transition: opacity 0.22s ease; }           /* at rest only the orange pill shows; the black bar appears while dragging */
.td-dial.active .td-bg { opacity: 1; }
.td-col { position: relative; display: flex; flex-direction: column; align-items: center; }
/* neighbours: folded away at rest, they slide open while dragging, so the bar grows smoothly */
.td-near { display: flex; width: 2.2rem; height: 2.2rem; max-height: 0; margin: 0; opacity: 0; overflow: hidden; align-items: center; justify-content: center;
           color: rgba(255, 255, 255, 0.45); transition: max-height 0.3s var(--ease-snap), margin 0.3s var(--ease-snap), opacity 0.2s ease; }
.td-near svg { width: 1.5rem; height: 1.5rem; flex: none; }
/* the orange pill: the bar's width, always showing the list's icon, name and count (same size at rest and dragging) */
.td-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; width: var(--bar); padding: 1.2rem 0;
           border-radius: 2rem; background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
.td-ico { display: flex; } .td-ico svg { width: 1.6rem; height: 1.6rem; }
.td-name { writing-mode: vertical-rl; rotate: 180deg; white-space: nowrap; font-size: 1.35rem; line-height: 1; max-height: 16rem; overflow: hidden; text-overflow: ellipsis; }
.td-name b { font-weight: 400; opacity: 0.75; margin-top: 0.6rem; }
/* dragging: the bar stretches to show the neighbouring lists above and below */
.td-dial.active .td-shape { padding: 1.6rem 0; }
.td-dial.active .td-near { max-height: 2.2rem; margin: 0.5rem 0; opacity: 1; }
.td-dial.active .td-near.none { opacity: 0; }
body.ph-typing .td-dial { display: none; }
@media (prefers-reduced-motion: reduce) { .td-shape, .td-near { transition: none; } }

/* ⌘K search (keys.js) */
.nx-search-back { position: fixed; inset: 0; z-index: 450; background: rgba(0, 0, 0, 0.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; animation: nxSearchBackIn 0.26s ease backwards; }
/* Search fades in from a blur, and back out through one when closed (Aaron, 30 Oct). Opening fills backwards only:
   a filter left on the window afterwards (even blur(0)) stops its own frosted-glass blur in Safari. */
.nx-search-back > .nx-search { animation: nxSearchIn 0.26s var(--ease-snap) backwards; }
.nx-search-back.closing { animation: nxSearchBackOut 0.22s ease both; pointer-events: none; }
.nx-search-back.closing > .nx-search { animation: nxSearchOut 0.22s ease both; }
@keyframes nxSearchBackIn { from { background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } }
@keyframes nxSearchBackOut { to { background: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } }
@keyframes nxSearchIn { from { opacity: 0; filter: blur(16px); transform: scale(0.96); } }
@keyframes nxSearchOut { to { opacity: 0; filter: blur(16px); transform: scale(0.96); } }
.nx-search { width: min(62rem, calc(100vw - 3.2rem)); max-height: 62vh; display: flex; flex-direction: column; border-radius: 2.4rem; corner-shape: round; overflow: hidden;
             background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
             box-shadow: var(--lift), 0 0 0 1px var(--hair); animation: nxRise 0.18s var(--ease-snap); }
.nx-search-bar { display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem 1.8rem; border-bottom: 1px solid var(--hair); }
.nx-search-bar svg { width: 1.8rem; height: 1.8rem; flex: none; color: var(--ink-3); }
.nx-search-bar { font-size: 1.7rem; }              /* the icon's raise is 0.1em of this, the input's size */
.nx-search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; }
.nx-search-list { list-style: none; overflow-y: auto; padding: 0.6rem; }
.nx-res-group { padding: 1rem 1.2rem 0.4rem; font-size: 1.15rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.nx-res { display: flex; align-items: baseline; gap: 1.2rem; padding: 0.9rem 1.2rem; border-radius: 1.4rem; corner-shape: round; cursor: pointer; font-size: 1.45rem; }
.nx-res.on { background: var(--accent-soft); }
.nx-res-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.nx-res-m { margin-left: auto; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 1.25rem; }
.nx-res-empty { padding: 2rem 1.2rem; color: var(--ink-3); }
kbd { display: inline-block; min-width: 2.2rem; padding: 0.2rem 0.6rem; border-radius: 0.6rem; border: 1px solid var(--hair); background: var(--well, var(--chip)); color: var(--ink-2);
      font: inherit; font-size: 1.15rem; line-height: 1.4; text-align: center; }
.nx-search-bar kbd { flex: none; }
.nx-keys { display: grid; grid-template-columns: 14rem 1fr; gap: 0.8rem 1.6rem; align-items: center; margin-bottom: 0.6rem; font-size: 1.35rem; }
.nx-keys dd { color: var(--ink-2); }
/* To-do list: the to-do chosen with the arrow keys */
.todo-item.kb-sel { box-shadow: 0 0 0 0.2rem var(--accent); }

/* Complete project window: what completion still needs */
.complete-check { list-style: none; margin: 0 0 1.6rem; }
.complete-check li { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--hair); font-size: 1.4rem; color: var(--ink); }
.complete-check li:first-child { border-top: 0; }
.complete-check small { margin-left: auto; color: var(--ink-3); font-size: 1.25rem; }
.complete-mark { display: flex; width: 2.4rem; height: 2.4rem; border-radius: 50%; align-items: center; justify-content: center; flex: none; }
.complete-mark svg { width: 1.4rem; height: 1.4rem; }
.complete-check .ok .complete-mark { background: rgba(34, 197, 94, 0.18); color: var(--success); }
.complete-check .no .complete-mark { background: rgba(255, 77, 77, 0.18); color: var(--danger); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* Undo bar (sound.js nxToast): bottom middle, above the phone's tab bar */
.nx-toast { position: fixed; left: 50%; bottom: 2.4rem; z-index: 400; display: flex; align-items: center; gap: 1.6rem; max-width: min(56rem, calc(100vw - 3.2rem));
            padding: 0.8rem 0.8rem 0.8rem 2rem; border-radius: 3rem; corner-shape: round; background: color-mix(in srgb, var(--panel) 88%, transparent);
            -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: var(--lift-sm), 0 0 0 1px var(--hair);
            color: var(--ink); font-size: 1.35rem; transform: translateX(-50%); animation: nxToastIn 0.32s var(--ease-snap); }
.nx-toast.out { opacity: 0; transform: translate(-50%, 0.8rem); transition: opacity 0.2s ease, transform 0.2s ease; }
.nx-toast-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-toast-act kbd { margin-left: 0.4rem; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 1.15rem; opacity: 0.75; }
.nx-toast-act { flex: none; height: 3.4rem; padding: 0 1.6rem; border: 0; border-radius: 2rem; corner-shape: round; background: var(--accent); color: #ffffff; font: inherit; cursor: pointer; }
@keyframes nxToastIn { from { opacity: 0; transform: translate(-50%, 1rem); } }
@media (max-width: 699px) { .nx-toast { bottom: calc(var(--ph-gap, 2.1rem) + var(--ph-bar, 5.9rem) + 1.2rem); } }

/* Chips that hold capitals or numbers (badges, counts): the text is trimmed to its capitals and padded to the chip's height,
   so the capitals sit exactly in the middle in every browser, without wrapping the text in .cap. Height: --chip-h. */
.badge, .todo-count { display: inline-block; height: auto; padding-block: calc((var(--chip-h, 1.9rem) - 1cap) / 2);
                      text-box: trim-both cap alphabetic; text-align: center; vertical-align: middle; }

/* Text trimmed to its capital height, so flex centring puts it in the optical middle in every browser */
.cap { display: block; text-box: trim-both cap alphabetic; }
.nx-slide.cap { padding-block: 0.3em; margin-block: -0.3em; }      /* room for descenders inside the clip */
@supports not (text-box: trim-both cap alphabetic) {                /* older browsers: nudge instead */
    .hm-count, .kanban-column .col-count { padding-top: 0.3rem; }
    .kanban-card .badge { padding-top: 0.35rem; }
    .po-status { padding-top: 0.2rem; }
    .hm-chip, .hm-prow .po-status { padding-top: 0.25rem; }
    .kanban-column .col-title { position: relative; top: 0.1rem; }
}
/* Text that fades at the end and slides while its row is hovered (home.js) */
.nx-slide { display: block; min-width: 0; overflow: hidden; white-space: nowrap; }
.nx-run { display: inline-block; white-space: nowrap; will-change: transform; }
.nx-slide.overflows { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.nx-slide.sliding { -webkit-mask-image: none; mask-image: none; }

/* Rows: My work, Starred, Agenda, Unread chats */
.hm-group { font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin: 0.8rem 0.8rem 0.4rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--hair); transition: border-color 0.12s ease; }
.hm-group:has(+ .hm-row:hover) { border-bottom-color: transparent; }   /* the hovered row's capsule takes over */
.hm-group.red { color: var(--danger); }
.hm-row { display: flex; align-items: center; gap: 1.1rem; min-height: 4.2rem; padding: 0.4rem 0.8rem; border-radius: 1.4rem; corner-shape: round; cursor: pointer; transition: background 0.12s ease, opacity 0.3s ease; }
.hm-row:hover { background: var(--chip); }
.hm-row.ticked { opacity: 0.4; }
.hm-row.ticked .hm-t { text-decoration: line-through; }
.hm-t { flex: 1; min-width: 0; font-size: 1.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-chip { flex: none; max-width: 20rem; height: 2.4rem; padding: 0 1rem; border-radius: 1.2rem; corner-shape: round; display: inline-flex; align-items: center;
    background: var(--chip); color: var(--ink-2); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-d { flex: none; font-size: 1.2rem; color: var(--ink-3); white-space: nowrap; min-width: 4.4rem; text-align: right; }
.hm-d.red { color: var(--danger); }
.hm-dot { flex: none; width: 1rem; height: 1rem; margin: 0 0.6rem; border-radius: 50%; corner-shape: round; background: var(--c); box-shadow: 0 0 0 0.3rem color-mix(in srgb, var(--c) 20%, transparent); }
.hm-row .todo-check svg { width: 1.2rem; height: 1.2rem; }
.hm-chip.project { width: 20rem; max-width: none; }            /* project chips are all one width, after any other chips */
@container (max-width: 64rem) { .hm-chip.project { width: 15rem; } }
@container (max-width: 44rem) { .hm-row .hm-chip { display: none; } }
.hm-body { flex: 1; display: flex; flex-direction: column; }
.hm-foot { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; padding-top: 0.6rem; margin-top: auto; }   /* sits at the bottom of a stretched card */
.hm-more { font-size: 1.25rem; color: var(--ink-3); }
.hm-link { border: 0; background: none; font-size: 1.3rem; color: var(--accent-text); height: 2.8rem; padding: 0 1.2rem; border-radius: 1.4rem; corner-shape: round; cursor: pointer; }
.hm-link:hover { background: var(--chip); }

/* Activity rows: Needs you, Recent updates */
.hm-act { display: flex; align-items: center; gap: 1.1rem; padding: 0.8rem; border-radius: 1.4rem; corner-shape: round; cursor: pointer; }   /* avatar in the middle of its lines */
.hm-act:hover { background: var(--chip); }
.hm-act .avatar, .hm-ic { width: 3rem; height: 3rem; font-size: 1.05rem; flex: none; }
.hm-ic { border-radius: 50%; corner-shape: round; display: flex; align-items: center; justify-content: center; background: var(--well); box-shadow: var(--pressed); color: var(--ink-2); }
.hm-ic svg { width: 1.5rem; height: 1.5rem; }
.hm-w1 { flex: 1; min-width: 0; }
.hm-l1 { display: flex; gap: 0.35em; min-width: 0; font-size: 1.3rem; color: var(--ink-2); white-space: nowrap; }
.hm-l1 > b { flex: none; }
.hm-l1 > .nx-slide { flex: 1; }
.hm-l1 b { font-weight: 400; color: var(--ink); }
.hm-l2 { font-size: 1.35rem; margin-top: 0.3rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-tm { flex: none; align-self: flex-start; font-size: 1.1rem; color: var(--ink-3); white-space: nowrap; padding-top: 0.2rem; }
.hm-approve { width: 100%; height: 2.8rem; font-size: 1.25rem; margin: 0.2rem 0 0.6rem; }   /* full width: in the card's corner it's concentric (1.4rem + 1rem) */
.hm-approve:last-child { margin-bottom: 0; }

/* Office: carved tiles */
.hm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.hm-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; padding: 1.2rem 1.4rem; border: 0; text-align: left; cursor: pointer;
    border-radius: 1.4rem; corner-shape: round; background: var(--well); box-shadow: var(--pressed); color: var(--ink); }
.hm-tile:hover { box-shadow: var(--pressed), inset 0 0 0 1px var(--hair); }
.hm-tile.open { box-shadow: var(--pressed), inset 0 0 0 2px var(--accent); }
.hm-n { font-family: var(--font-heading); font-size: 3rem; line-height: 1; }
.hm-n.amber { color: var(--warning); }
.hm-n.red { color: var(--danger); }
.hm-k { font-size: 1.25rem; color: var(--ink-2); }
.hm-office-list { margin-top: 0.8rem; }
.hm-orow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3.8rem; padding: 0 0.8rem; border: 0; background: none; color: var(--ink);
    font-size: 1.35rem; text-align: left; border-radius: 1.4rem; corner-shape: round; cursor: pointer; }
.hm-orow:hover { background: var(--chip); }

/* Projects */
.hm-prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, 13.6rem) minmax(8rem, 26rem) 15rem; align-items: center; gap: 2rem; min-height: 5.2rem; padding: 0.4rem 0.8rem;
    border-radius: 1.4rem; corner-shape: round; cursor: pointer; }
.hm-prow:hover { background: var(--chip); }
.hm-pname { font-size: 1.4rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pname small { display: block; font-size: 1.15rem; color: var(--ink-3); margin-top: 0.2rem; }
/* Steps: dots, lines and gaps all scale with the column's width, so in a tight row they get smaller, never squeezed */
.hm-steps { container-type: inline-size; display: flex; align-items: center; justify-content: flex-end; min-width: 0; }   /* right-aligned: 3 or 4 steps end at the same place */
.hm-steps i, .hm-steps em { --d: min(1.6rem, 100cqi / 8.2); flex: none; }
.hm-steps i { width: var(--d); height: var(--d); margin-left: calc(var(--d) / 4); border-radius: 50%; corner-shape: round; border: max(1.5px, calc(var(--d) / 8)) solid var(--ink-3); opacity: 0.7; }
.hm-steps i:first-child { margin-left: 0; }
.hm-steps i.on { border: 0; background: var(--rail-bg); opacity: 1; }
.hm-steps em { width: calc(var(--d) * 0.875); height: 2px; margin-left: calc(var(--d) / 4); background: var(--hair); }
.hm-steps em.on { background: var(--accent); }
.hm-meter { display: flex; align-items: center; gap: 1rem; font-size: 1.25rem; color: var(--ink-2); }
.hm-meter .meter { flex: 1; }
.hm-meter > span { flex: none; width: 3.8rem; text-align: right; }   /* fixed, so every bar is the same length */
.hm-prow .po-status { justify-self: stretch; justify-content: center; height: 3rem; padding: 0 1rem; font-size: 1.15rem; }   /* same width whatever the words */
@container (max-width: 76rem) { .hm-prow { grid-template-columns: minmax(0, 1fr) minmax(6rem, 13.6rem) 14rem; } .hm-prow .hm-meter { display: none; } }
@container (max-width: 44rem) { .hm-prow { grid-template-columns: minmax(0, 1fr) 14rem; } .hm-prow .hm-steps { display: none; } }

/* Charts */
.hm-funnel, .hm-bars-h { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.4rem 0.8rem; margin-block: auto; }   /* charts sit in the middle of a stretched card */
.hm-frow { display: grid; grid-template-columns: 13rem minmax(0, 1fr) 4rem; align-items: center; gap: 1rem; }
.hm-flabel, .hm-bname { font-size: 1.25rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-fbar { height: 1.8rem; border-radius: 0.9rem; corner-shape: round; background: var(--well); box-shadow: var(--pressed); overflow: hidden; }
.hm-fbar span { display: block; height: 100%; min-width: 0.4rem; border-radius: 0.9rem; corner-shape: round; background: var(--rail-bg); transition: width 0.4s var(--ease-snap); }
.hm-fn { font-size: 1.3rem; text-align: right; white-space: nowrap; }
.hm-fn i { font-style: normal; color: var(--danger); font-size: 1.15rem; }
.hm-brow { display: grid; grid-template-columns: 2.6rem 10rem minmax(0, 1fr) 8rem; align-items: center; gap: 1rem; }
.hm-brow .avatar { width: 2.6rem; height: 2.6rem; font-size: 0.95rem; }
.hm-bbar { display: flex; height: 1.8rem; min-width: 0.6rem; border-radius: 0.9rem; corner-shape: round; overflow: hidden; }
.hm-bbar span { background: var(--rail-bg); }
.hm-bbar span.late { background: var(--danger); }
.hm-cols { display: flex; align-items: stretch; gap: 0.8rem; height: 16rem; padding: 0.4rem 0.8rem 0; margin-block: auto; }
.hm-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.5rem; min-width: 0; }
.hm-cbar { width: 70%; max-width: 3.6rem; border-radius: 0.8rem 0.8rem 0.4rem 0.4rem; background: var(--track); transition: height 0.4s var(--ease-snap); }
.hm-col.now .hm-cbar { background: var(--rail-bg); }
.hm-cn { font-size: 1.2rem; color: var(--ink-2); }
.hm-cl { font-size: 1.05rem; color: var(--ink-3); white-space: nowrap; }
.hm-donut { display: flex; align-items: center; justify-content: center; gap: 2.4rem; padding: 0.4rem 0.8rem; margin-block: auto; }
.hm-donut svg { width: 13rem; height: 13rem; flex: none; }
.hm-donut circle { transition: stroke-dasharray 0.4s var(--ease-snap); }
.hm-donut-n { font-family: var(--font-heading); font-size: 2.6rem; fill: var(--ink); }
.hm-legend { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; font-size: 1.3rem; color: var(--ink-2); }
.hm-legend li { display: flex; align-items: center; gap: 0.8rem; }
.hm-legend span { width: 1rem; height: 1rem; border-radius: 50%; corner-shape: round; }
.hm-legend b { font-weight: 400; color: var(--ink); margin-left: auto; padding-left: 1.2rem; }

/* Customise mode */
.hm-tools { display: none; }
.hm-grid.editing .hm-tools { position: absolute; top: 1rem; right: 1rem; z-index: 2; display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem;
    border-radius: 2.2rem; corner-shape: round; background: var(--panel-bg); box-shadow: var(--panel-edge), var(--lift); }
.hm-grid.editing .hm-card { cursor: grab; box-shadow: var(--panel-edge), var(--lift), inset 0 0 0 2px var(--hair); }
.hm-grid.editing .hm-body { pointer-events: none; opacity: 0.5; filter: saturate(0.6); }
.hm-w.dragging { opacity: 0.35; }
.hm-grip { display: flex; color: var(--ink-3); padding: 0 0.2rem; }
.hm-grip svg { width: 1.6rem; height: 1.6rem; }
.hm-size { height: 3.2rem; }
.hm-size button { font-size: 1.2rem; padding: 0 1rem; }
.hm-remove { width: 3.2rem; height: 3.2rem; border: 0; border-radius: 50%; corner-shape: round; display: flex; align-items: center; justify-content: center;
    background: var(--well); box-shadow: var(--pressed); color: var(--ink-2); cursor: pointer; }
.hm-remove:hover { color: var(--danger); }
.hm-remove svg { width: 1.4rem; height: 1.4rem; }
.hm-add { grid-column: span 4; grid-row-end: span 132; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; border: 0; cursor: pointer;
    border-radius: 2.4rem; corner-shape: round; background: var(--well); box-shadow: var(--pressed); color: var(--ink-2); font-size: 1.4rem; }
.hm-add svg { width: 2.4rem; height: 2.4rem; }
.hm-add:hover { color: var(--accent-text); }
.hm-gallery { width: 56rem; }
.hm-gallery-list { display: flex; flex-direction: column; gap: 0.6rem; }
.hm-gallery-item { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem; grid-template-rows: auto auto; column-gap: 1.2rem; align-items: center; text-align: left;
    padding: 1rem 1rem 1rem 1.6rem; border: 0; border-radius: 2.6rem; corner-shape: round; background: var(--chip); color: var(--ink); cursor: pointer; }
.hm-gallery-item:hover { filter: brightness(1.05); }
.hm-gallery-t { font-size: 1.45rem; }
.hm-gallery-n { grid-row: 2; font-size: 1.2rem; color: var(--ink-3); margin-top: 0.2rem; }
.hm-gallery-add { grid-column: 2; grid-row: 1 / 3; width: 3.2rem; height: 3.2rem; border-radius: 50%; corner-shape: round; display: flex; align-items: center; justify-content: center;
    background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
.hm-gallery-add svg { width: 1.6rem; height: 1.6rem; }
@keyframes phPopIn { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes phPopOut { to { opacity: 0; transform: scale(0.4); } }
@keyframes phRise { from { opacity: 0; transform: translateY(0.8rem); } }
@keyframes phBounce { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes nxGlide { 0%, 18% { transform: translateX(0); } 50%, 68% { transform: translateX(var(--glide, 0)); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .ph-tab, .ph-sel, .ph-more .ph-tb, .ph-plus-menu, .ph-plus-menu button, .ph-tb svg { transition: none !important; animation: none !important; } .todo-src-run { animation: none !important; } .hm-loading { animation: none; } .hm-fbar span, .hm-cbar, .hm-donut circle { transition: none; } }

/* ════════════════════════════════════════════
   PHONE (below 700px; assets/js/phone.js)
   Layout from Aaron's mobile design; look from desktop. Tab bar and its More row follow the mobile design:
   a floating capsule 2.1rem from the sides and bottom, with a round + beside it.
   ════════════════════════════════════════════ */
.ph-head, .ph-tab, .ph-plus, .ph-scrim, .ph-plus-menu, .po-short, .ph-side-back, .ph-status { display: none; }
@media (max-width: 700px) {
    :root { --ph-top: max(env(safe-area-inset-top, 0px), 1.2rem); --ph-gap: 2.1rem; --ph-bar: 5.9rem; --ph-switch: 4.2rem;
            --ph-bottom: calc(var(--ph-gap) + var(--ph-bar) + 1rem); --ph-headh: 4.4rem; }
    html { touch-action: manipulation; overscroll-behavior: none; }
    body { height: auto; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: none; }
    #pageArea[data-view="dashboard"] { touch-action: pan-y; }        /* Home: up and down only */
    .tab-track, .kanban-board, .gantt-wrap, .bs-toolbar, .ph-dots { touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
    .shell { display: block; height: auto; padding: 0; }
    .rail-wrap { display: none; }
    .main { height: auto; }
    .page { height: auto; overflow: visible; padding: calc(var(--ph-top) + var(--ph-headh) + 1.2rem) 1.6rem calc(var(--ph-bottom) + 2rem); }

    /* Header: round buttons either side of the title */
    .ph-head { display: grid; grid-template-columns: var(--ph-headh) minmax(0, 1fr) var(--ph-headh); align-items: center; gap: 1rem;
        position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: var(--ph-top) var(--ph-gap) 1rem;
        background: linear-gradient(var(--bg) 75%, transparent); }
    .ph-round { width: var(--ph-headh); height: var(--ph-headh); border: 0; border-radius: 50%; corner-shape: round; display: flex; align-items: center; justify-content: center;
        background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); color: var(--ink); cursor: pointer; }
    .ph-round[hidden] { visibility: hidden; display: flex; }
    .ph-round svg { width: 2.2rem; height: 2.2rem; }
    .ph-me { width: 3.4rem; height: 3.4rem; border-radius: 50%; corner-shape: round; display: flex; align-items: center; justify-content: center; color: #ffffff; font-size: 1.15rem; }
    .ph-title { grid-column: 2; text-align: center; font-family: var(--font-heading); font-weight: 400; font-size: 2.6rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .page-title, .hm-head .page-title { display: none; }        /* the header shows the title */

    /* Tab bar (mobile design) */
    .ph-tab { display: flex; flex-direction: column; position: fixed; left: var(--ph-gap); bottom: var(--ph-gap); z-index: 70;
        width: calc(100% - var(--ph-gap) * 2 - 6rem - 0.8rem); padding: 0.4rem; border-radius: 2.95rem; corner-shape: round;
        background: color-mix(in srgb, var(--panel) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
        box-shadow: var(--panel-edge), var(--lift); }
    /* iOS-style tab bar: the More row grows out of the bar and folds back (grid rows 0fr <-> 1fr, springy) */
    .ph-tab { display: grid; grid-template-rows: 0fr auto; transition: grid-template-rows 0.42s cubic-bezier(0.32, 1.25, 0.5, 1), transform 0.25s var(--ease-snap), opacity 0.2s ease; }
    .ph-tab.open { grid-template-rows: 1fr auto; }
    .ph-main, .ph-more { display: grid; grid-template-columns: repeat(4, 1fr); }
    .ph-main { position: relative; }
    .ph-more { min-height: 0; overflow: hidden; }
    .ph-more .ph-tb { opacity: 0; transform: scale(0.6) translateY(1.2rem); transition: opacity 0.15s ease, transform 0.2s ease; }
    .ph-tab.open .ph-more .ph-tb { opacity: 1; transform: none; margin-bottom: 0.4rem;
        transition: opacity 0.25s ease calc(var(--i) * 35ms + 60ms), transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) calc(var(--i) * 35ms + 60ms), margin 0s; }
    /* the selection capsule glides between tabs */
    .ph-sel { position: absolute; left: 0; top: 0; height: 5.1rem; width: 0; border-radius: 2.55rem; corner-shape: round; background: var(--track); pointer-events: none;
        transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1), width 0.45s cubic-bezier(0.3, 1.3, 0.5, 1); }
    .ph-main .ph-tb { z-index: 1; }
    .ph-main .ph-tb.active { background: none; }
    /* press: icons give a little, then spring back */
    .ph-tb svg, .ph-plus svg { transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1), color 0.2s ease; }
    .ph-tb:active svg { transform: scale(0.8); transition-duration: 0.1s; }
    .ph-tb.active svg { animation: phBounce 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
    .ph-plus { transition: transform 0.25s var(--ease-snap), opacity 0.2s ease; }
    .ph-plus:active { transform: scale(0.9); }
    .ph-plus.open svg { transform: rotate(45deg); }
    .ph-tb { position: relative; height: 5.1rem; border: 0; background: none; color: var(--ink); border-radius: 2.55rem; corner-shape: round;
        display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
    .ph-tb svg { width: 2.4rem; height: 2.4rem; }
    .ph-tb[data-tab="todo"] svg { translate: 0 -0.15rem; }
    .ph-tb.active { background: var(--track); color: var(--accent); }
    .ph-dot { position: absolute; top: 1.1rem; right: calc(50% - 1.6rem); width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--accent); }
    .ph-plus { display: flex; align-items: center; justify-content: center; position: fixed; right: var(--ph-gap); bottom: var(--ph-gap); z-index: 70;
        width: var(--ph-bar); height: var(--ph-bar); border: 0; border-radius: 50%; corner-shape: round; color: var(--ink); cursor: pointer;
        background: color-mix(in srgb, var(--panel) 82%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
        box-shadow: var(--panel-edge), var(--lift); }
    .ph-plus svg { width: 2.6rem; height: 2.6rem; }
    .ph-plus-menu { display: flex; flex-direction: column; gap: 0.4rem; position: fixed; right: var(--ph-gap); bottom: calc(var(--ph-gap) + var(--ph-bar) + 1rem); z-index: 80;
        min-width: 22rem; padding: 0.6rem; border-radius: 2.4rem; corner-shape: round; background: var(--panel-bg); box-shadow: var(--panel-edge), var(--float); }
    .ph-plus-menu { transform-origin: calc(100% - 3rem) calc(100% + 4rem); animation: phPopIn 0.42s cubic-bezier(0.3, 1.35, 0.5, 1); }
    .ph-plus-menu.closing { animation: phPopOut 0.2s ease forwards; pointer-events: none; }
    .ph-plus-menu button { animation: phRise 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) backwards; }
    .ph-plus-menu button:nth-child(2) { animation-delay: 40ms; }
    .ph-plus-menu button:nth-child(3) { animation-delay: 80ms; }
    .ph-plus-menu button { display: flex; align-items: center; gap: 1.2rem; height: 4.8rem; padding: 0 1.6rem; border: 0; border-radius: 1.8rem; corner-shape: round;
        background: none; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
    .ph-plus-menu button:active { background: var(--chip); }
    .ph-plus-menu svg { width: 2rem; height: 2rem; color: var(--accent-text); }
    .ph-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; display: block; }
    body.ph-scrimmed .ph-scrim { opacity: 1; pointer-events: auto; }

    /* Framed pages (projects, To-do, Inbox): fill the screen between the header and the bottom bars */
    #workspaceView, #pageArea > .workspace { position: fixed; left: 0; right: 0; top: calc(var(--ph-top) + var(--ph-headh) + 1rem); bottom: 0; z-index: 1;
        display: block; height: auto; padding: 0 var(--ph-gap); background: none; box-shadow: none; border-radius: 0; overflow: visible; }
    #workspaceView .ws, #pageArea > .workspace .ws { height: 100%; padding: 0 0 calc(var(--ph-bottom) + var(--ph-switch) + 1rem); display: flex; flex-direction: column; }
    .ws-expand, .proj-panel-head .icon-btn { display: none !important; }
    .ws-body:not(.fill) { margin: 0 calc(var(--ph-gap) * -1); padding: 0 var(--ph-gap) 1rem; overflow-y: auto; scrollbar-gutter: auto; }
    .ws-body.fill { margin: 0; }

    /* Project side bar: the project list slides in from the left */
    #workspaceView .proj-panel, #pageArea > .todo-ws .proj-panel { position: fixed; left: 0; top: 0; bottom: 0; z-index: 75; width: min(80%, 32rem) !important;
        margin: 0 !important; opacity: 1 !important; pointer-events: auto !important; padding: var(--ph-top) 1.2rem 2rem; border-radius: 0 2.4rem 2.4rem 0;
        transform: translateX(-105%); transition: transform 0.3s var(--ease-snap); box-shadow: var(--panel-edge), var(--float); }
    #workspaceView.ph-side .proj-panel, #pageArea > .todo-ws.ph-side .proj-panel { transform: none; }
    #workspaceView.ph-side, #pageArea > .todo-ws.ph-side, #workspaceView.ph-dragging, #pageArea > .todo-ws.ph-dragging { z-index: 90; }     /* above the header and tab bar, like the design */
    .ph-dragging > .ph-ws-scrim { opacity: var(--ph-pull, 0) !important; pointer-events: none; transition: none !important; }
    .ph-ws-scrim { position: fixed; inset: 0; z-index: 74; background: rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
    .ph-side > .ph-ws-scrim { opacity: 1; pointer-events: auto; }
    .todo-ws .proj-panel-head { display: block; }
    .proj-panel-head { display: grid; grid-template-columns: var(--ph-headh) 1fr; align-items: center; gap: 1rem; padding: 0 0 1rem; }
    #workspaceView .proj-panel-title { display: none; }
    .ph-side-back { display: flex; }
    .ph-dots { display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 0; }
    .ph-pill { height: 4.4rem; padding: 0 2rem; display: inline-flex; align-items: center; border-radius: 2.2rem; corner-shape: round;
        background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); font-size: 1.5rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
    .ph-dot-btn { width: 4.4rem; height: 4.4rem; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
    .ph-dot-btn i { width: 1rem; height: 1rem; border-radius: 50%; background: var(--ink-3); }
    #projPanel .proj-item, .todo-ws .proj-item { min-height: 4.4rem; font-size: 1.7rem; padding-block: 0.8rem; }     /* Apple's 44pt rows, 17pt text */
    .todo-ws .proj-item svg { width: 2.2rem; height: 2.2rem; }
    .todo-new-list button { min-height: 4.4rem; font-size: 1.7rem; }

    /* Project tabs: a sliding switch above the tab bar (Tasks, Gantt Chart, Updates, Docs, Chat, Brainstorm) */
    #workspaceView .ws-bar, .inbox-ws .ws-bar, .intake-ws .ws-bar { display: contents; }
    .inbox-ws .ws-bar > span, .intake-ws .ws-bar > span { display: none; }
    .composer-hint, .chat-hint { display: none; }
    #workspaceView .tab-track, .inbox-ws .inbox-track, .intake-ws .intake-track, .cl-ws .cl-track, .todo-ws .ws-bar .view-toggle { scroll-behavior: auto; position: fixed; left: var(--ph-gap); right: var(--ph-gap); bottom: var(--ph-bottom); z-index: 40;
        width: auto !important; height: var(--ph-switch); margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        padding-inline: calc(50% - 7.5rem); box-shadow: var(--panel-edge), var(--lift-sm); }
    #workspaceView .tab-track::-webkit-scrollbar, .inbox-ws .inbox-track::-webkit-scrollbar, .intake-ws .intake-track::-webkit-scrollbar, .cl-ws .cl-track::-webkit-scrollbar { display: none; }
    .inbox-ws .ws-bar .inbox-track, .intake-ws .ws-bar .intake-track { justify-self: stretch; }      /* (desktop centres it, which would shrink it here) */
    .composer-input { min-height: calc(1.45em * 1.45 + 1.8rem); }   /* sized for one line even if it was drawn while hidden */
    #workspaceView .tab-btn, .inbox-ws .tab-btn, .intake-ws .tab-btn, .cl-ws .tab-btn { flex: 0 0 15rem; scroll-snap-align: center; font-size: 1.7rem; }
    #workspaceView .tab-btn svg, .inbox-ws .tab-btn svg, .intake-ws .tab-btn svg, .cl-ws .tab-btn svg { display: none; }
    /* Camera-style switch: the track is see-through over #phSwitchBg (the grey track plus a fixed orange capsule in the middle);
       the words slide under the capsule and the one that stops there is chosen (phone.js) */
    #workspaceView .tab-track, .inbox-ws .inbox-track, .intake-ws .intake-track, .cl-ws .cl-track { background: transparent !important; box-shadow: none !important; }
    .tab-track .tab-ink { display: none; }
    #workspaceView .tab-track, .inbox-ws .inbox-track, .intake-ws .intake-track, .cl-ws .cl-track { -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent); }
    #workspaceView .tab-btn, .inbox-ws .tab-btn, .intake-ws .tab-btn, .cl-ws .tab-btn { background: transparent !important; box-shadow: none !important; transition: color 0.2s ease; }
    #workspaceView .tab-btn.active, .inbox-ws .tab-btn.active, .intake-ws .tab-btn.active, .cl-ws .tab-btn.active { color: #ffffff; }
    .ph-switch-bg { position: fixed; left: var(--ph-gap); right: var(--ph-gap); bottom: var(--ph-bottom); z-index: 64;   /* in the page's layer, just under the words (65) and over the page */ height: var(--ph-switch); pointer-events: none;
        border-radius: 2.1rem; corner-shape: round; background: var(--track); box-shadow: var(--panel-edge), var(--lift-sm); display: block; }
    .ph-switch-bg[hidden] { display: none; }
    .ph-switch-bg span, .ph-cam::before { position: absolute; top: 0.3rem; bottom: 0.3rem; left: calc(50% - 7.5rem); width: 15rem; border-radius: 2rem; corner-shape: round;
        background: var(--rail-bg); box-shadow: var(--rail-edge); content: ''; }
    .todo-item.open .todo-item-head .todo-src { display: none; }      /* the open card names its project at the bottom */

    /* Project page: compact PO capsule (PO number + DO, SVR, INV; orange = done), task actions in Project Settings */
    #contentArea .tasks-header, #contentArea .filter-row { display: none; }
    /* Gantt toolbar: the pills scroll edge to edge, but at rest the first one lines up with the page's edge */
    #contentArea .tasks-header:has(#ganttViewToggle) { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--ph-gap) * -1) 1rem; padding: 0.2rem var(--ph-gap) 0.6rem; }
    #contentArea .tasks-header:has(#ganttViewToggle)::-webkit-scrollbar { display: none; }
    #contentArea .tasks-header:has(#ganttViewToggle) > div { flex: none; }
    /* Gantt on a phone: days run down the screen and scroll vertically, to the bottom edge */
    #contentArea:has(#ganttContainer.pg) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
    #contentArea .gantt-wrap:has(.pg) { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 calc(var(--ph-gap) * -1); padding: 0 var(--ph-gap) calc(var(--ph-bottom) + var(--ph-switch) + 2rem);
        border-radius: 0; box-shadow: none; background: none; }
    #workspaceView:has(#ganttContainer.pg) .ws { padding-bottom: 0 !important; }
    .pg-grid { position: relative; }
    .pg-row { display: flex; align-items: flex-start; border-top: 1px solid var(--hair); }
    .pg-row.weekend { background: rgba(127, 127, 127, 0.06); }
    .pg-row.month { border-top-color: var(--ink-3); }
    .pg-row.today { background: color-mix(in srgb, var(--accent) 12%, transparent); border-top-color: var(--accent); }
    .pg-date { width: 6.4rem; flex: none; padding: 0.5rem 0 0 0.2rem; font-size: 1.3rem; line-height: 1; color: var(--ink-3); white-space: nowrap; }
    .pg-row.today .pg-date { color: var(--accent-text); }
    .pg-cols { position: absolute; top: 0; bottom: 0; left: 6.4rem; right: 0; display: flex; gap: 0.6rem; overflow-x: auto; scrollbar-width: none; }
    .pg-col { position: relative; flex: 1 0 4.4rem; min-width: 4.4rem; max-width: 8rem; }
    .pg-bar { position: absolute; left: 0; right: 0; border: 0; padding: 0.6rem 0; cursor: pointer; border-radius: 1.2rem; corner-shape: round; overflow: hidden;
        background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); color: var(--ink); }
    .pg-bar::before { content: ''; position: absolute; left: 0.4rem; top: 0.6rem; bottom: 0.6rem; width: 0.4rem; border-radius: 0.2rem; background: var(--c); }
    .pg-bar.event { box-shadow: inset 0 0 0 1.5px var(--c); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, transparent) 0 0.6rem, transparent 0.6rem 1.2rem); }
    .pg-bar.done { background: color-mix(in srgb, var(--c) 45%, transparent); }
    .pg-label { display: block; writing-mode: vertical-rl; margin: 0 auto; max-height: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.3rem; line-height: 1.2; }
    #contentArea .tasks-header:has(#ganttViewToggle) h2 { display: none; }
    #contentArea .tasks-header:has(#ganttViewToggle) > div { flex-wrap: nowrap; }
    #contentArea .gantt-wrap { overflow-x: auto; }
    .po-timeline { flex-wrap: nowrap; gap: 0.5rem; padding: 0.5rem; margin-bottom: 1rem; border-radius: 2.2rem; corner-shape: round; background: var(--column-bg); box-shadow: var(--panel-edge), var(--lift-sm); }
    .po-cap { height: auto; padding: 0; gap: 0.5rem; background: none; box-shadow: none; }
    .po-cap.po-id { flex: 1; min-width: 0; }
    .po-cap.po-id .po-chip:not(.po-type) { flex: 1; justify-content: center; height: 3.4rem; font-size: 1.5rem; }
    .po-cap .po-type, .po-step[data-flip="po"], .po-arrow, .po-timeline .po-status, .po-dot, .po-text { display: none !important; }
    .po-steps { flex: none !important; }
    .po-step-btn { height: 3.4rem; padding: 0 1.2rem; border-radius: 1.7rem; background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); }
    .po-step.done .po-step-btn { background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
    .po-short { display: block; font-size: 1.4rem; letter-spacing: 0.02em; }

    /* Kanban: one column per screen, swipe sideways, the next column peeks in */
    .kanban-board { display: flex; gap: 0.8rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0; padding: 0 var(--ph-gap); scrollbar-width: none; align-items: stretch; }   /* the next and previous columns peek in */
    .kanban-board::-webkit-scrollbar { display: none; }
    .kanban-column { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; height: 100%; }
    /* 6: the PO capsule and the columns stay put; only the cards scroll, down to the switch */
    #contentArea:has(#tasksContainer) { display: flex; flex-direction: column; overflow: hidden; padding: 0; margin-inline: calc(var(--ph-gap) * -1); }
    #contentArea:has(#tasksContainer) > .po-timeline { margin-inline: var(--ph-gap); }
    #tasksContainer:not(:has(.kanban-board)) { padding-inline: var(--ph-gap); }
    #tasksContainer { flex: 1; min-height: 0; overflow-y: auto; }
    #tasksContainer:has(.kanban-board) { overflow: hidden; }
    #tasksContainer .kanban-board { height: 100%; }
    .kanban-column .kanban-cards { flex: 1; min-height: 0; overflow-y: auto; }
    /* To-do's Board like the project board: columns screen-wide (no double inset), full height, only the cards scroll */
    #todoBody:has(> .kanban-board) { display: flex; flex-direction: column; overflow: hidden; }
    #todoBody > .kanban-board { flex: 1; min-height: 0; margin-inline: calc(var(--ph-gap) * -1); }
    /* Shadows: a strip that scrolls sideways also clips above and below, so it gets room there (padding + equal negative margin) */
    .kanban-board, .cl-board { padding-block: 0.6rem; margin-block: -0.6rem; }
    #contentArea .tasks-header:has(#ganttViewToggle) { padding-top: 0.6rem; margin-top: -0.4rem; }
    #contentArea:has(#tasksContainer) { padding-top: 0.6rem; margin-top: -0.6rem; }
    #contentArea:not(:has(#tasksContainer)) { padding-top: 1.4rem; margin-top: -1.4rem; }

    /* Notifications: all chats first; tap one to enter it */
    .inbox-ws .proj-panel { width: auto !important; flex: 1; }
    .inbox-ws .ws { position: absolute; inset: 0; pointer-events: none; }            /* list showing: keep the switch, hide the page */
    .inbox-ws .ws > .ws-body { visibility: hidden; }
    .inbox-ws .tab-track { pointer-events: auto; }
    .inbox-ws.picked .proj-panel, .inbox-ws.ph-feed .proj-panel { display: none; }
    .inbox-ws.picked .ws, .inbox-ws.ph-feed .ws { position: static; pointer-events: auto; }
    .inbox-ws.picked .ws > .ws-body, .inbox-ws.ph-feed .ws > .ws-body { visibility: visible; }
    .inbox-ws .proj-panel-head, .inbox-thread-head { display: none; }

    /* In-coming: the queue list first (Queue tab), tap a document to open it; Create project / Smart import fill the page */
    .intake-ws .proj-panel { width: auto !important; flex: 1; background: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
    #pageArea > .intake-ws { padding: 0; }
    .intake-ws #intakeList .proj-item { border-radius: 0; padding: 1.2rem var(--ph-gap); border-bottom: 1px solid var(--hair); min-height: 6.4rem; }
    .intake-ws #intakeList .intake-group { padding: 2rem var(--ph-gap) 0.6rem; border-bottom: 1px solid var(--hair); font-size: 1.3rem; }
    .intake-ws #intakeList .proj-empty { padding: 1.2rem var(--ph-gap); font-size: 1.5rem; }
    .intake-ws .proj-panel-head { position: absolute; top: 0.8rem; right: var(--ph-gap); z-index: 2; }
    .intake-ws .intake-foot, .intake-ws .proj-panel-head, .intake-ws #intakeList > .proj-empty, .intake-ws .intake-group { padding-inline: var(--ph-gap); }
    .intake-ws .ws-body { margin: 0 !important; padding: 0 var(--ph-gap) 1rem !important; }
    .intake-ws.ph-feed .ws-body:has(.form-card) { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 0 !important; }
    .intake-ws .ws-body > .form-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .intake-ws .form-card .form-group:has(.import-textarea) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .intake-ws .form-card textarea.import-textarea { flex: 1; height: auto !important; min-height: 8rem; overflow-y: auto; }       /* sections line up with the header and switch */
    .intake-ws .ws-body > *, .intake-ws .intake-setup, .intake-ws .form-card { max-width: none; margin-inline: 0; }
    /* Create project and Smart import: the form sits on the page, no card */
    .intake-ws .form-card, .ph-create .form-card { background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; }
    .intake-ws .form-card-head { padding: 0.4rem 0 1.2rem; }
    /* iPhone zooms in on any text box under 16px: keep them all at 17pt */
    input, textarea, select, [contenteditable="true"], .ql-editor { font-size: 1.7rem !important; }
    textarea.import-textarea { font-size: 1.6rem !important; line-height: 1.5; resize: none;      /* 16px: as small as iPhone allows without zooming */
        height: calc(100dvh - var(--ph-top) - var(--ph-headh) - var(--ph-bottom) - var(--ph-switch) - 19rem); min-height: 16rem; }
    .intake-ws .form-actions, .ph-create .form-actions { flex-wrap: nowrap; justify-content: stretch; }
    .intake-ws .form-actions > button, .ph-create .form-actions > button { flex: 1 1 0; min-width: 0; height: 4.4rem; font-size: 1.7rem; }
    .intake-ws .proj-panel, .inbox-ws .proj-panel { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
        padding-bottom: calc(var(--ph-bottom) + var(--ph-switch) + 2rem) !important; }   /* a fixed-height list that scrolls; the last rows clear the switch */
    #workspaceView .tab-track, .inbox-ws .inbox-track, .intake-ws .intake-track, .cl-ws .cl-track { z-index: 65 !important; }   /* always in front of the page */
    .intake-ws .proj-panel > * { min-width: 0; }
    .intake-ws .ws { position: absolute; inset: 0; pointer-events: none; }
    .intake-ws .ws > .ws-body { visibility: hidden; }
    .intake-ws .tab-track { pointer-events: auto; }
    .intake-ws.picked .proj-panel, .intake-ws.ph-feed .proj-panel { display: none; }
    .intake-ws.picked .ws, .intake-ws.ph-feed .ws { position: static; pointer-events: auto; }
    .intake-ws.picked .ws > .ws-body, .intake-ws.ph-feed .ws > .ws-body { visibility: visible; }
    .intake-ws .proj-panel-head { display: flex; justify-content: flex-end; padding: 0; }
    .intake-ws .proj-panel-title { display: none; }
    .intake-ws .proj-panel-head .icon-btn { display: flex !important; }
    .intake-detail { grid-template-columns: 1fr !important; }
    .intake-preview-wrap { min-height: 40rem; }

    /* To-do: an open card's details use the full width */
    .todo-detail { padding: 0.2rem 1.4rem 1.4rem; }

    /* Brainstorm: tools in one row that scrolls sideways */
    .bs-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .bs-toolbar::-webkit-scrollbar { display: none; }
    .bs-toolbar > * { flex: none; }
    .bs-layout { border-radius: 2.4rem; corner-shape: round; }

    /* Home: project rows stack the name over its dots and status */
    .hm-prow { grid-template-columns: minmax(0, 1fr) auto !important; grid-template-areas: "name name" "steps status"; row-gap: 0.6rem; padding: 0.8rem; }
    .hm-prow .hm-pname { grid-area: name; }
    .hm-prow .hm-steps { grid-area: steps; display: flex !important; justify-content: flex-start; width: 13.6rem; }
    .hm-prow .hm-meter { display: none; }
    .hm-prow .po-status { grid-area: status; width: 15rem; }

    /* Chats: full screen like WhatsApp; the message box is a capsule the size of the switch */
    #pageArea > .inbox-ws { padding: 0; }
    .inbox-ws .proj-panel { background: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
    .inbox-ws #inboxList { padding: 0; }
    .inbox-update-head { flex-wrap: wrap; row-gap: 0.8rem; }
    .inbox-update-head .row-main { flex: 1 1 calc(100% - 5rem); }
    .inbox-update-head .badge { margin-left: 4.2rem; }
    .inbox-update-head .btn-sm-outline { margin-left: auto; }
    .inbox-ws.ph-feed .ws-body { margin: 0 !important; padding: 0 var(--ph-gap) calc(var(--ph-bottom) + var(--ph-switch) + 2rem) !important; overflow-y: auto; }   /* Updates and Mentions: same margins as the rest */
    .inbox-ws:not(.picked) #inboxList .active, .inbox-ws:not(.picked) #inboxList .proj-item.active { background: none; box-shadow: none; color: inherit; border-color: var(--hair); }
    .inbox-ws:not(.picked) .proj-ink { display: none; }
    .inbox-ws:not(.picked) #inboxList .active { border: 0; border-bottom: 1px solid var(--hair); }
    .inbox-ws:not(.picked) #inboxList .active * { color: inherit; }
    .inbox-ws:not(.picked) #inboxList .active .row-meta, .inbox-ws:not(.picked) #inboxList .active .inbox-time { color: var(--ink-3); }
    .inbox-ws #inboxList > li, .inbox-ws #inboxList .proj-item { border-radius: 0; padding: 1.2rem var(--ph-gap); border-bottom: 1px solid var(--hair); min-height: 6.4rem; }
    .inbox-thread, .chat-layout { background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }
    .chat-messages { padding: 1rem var(--ph-gap); }
    #workspaceView:has(.chat-layout) { padding: 0; }
    .composer-wrap { padding: 0.6rem var(--ph-gap) 0; }
    #pageArea > .inbox-ws .ws, #workspaceView:has(.chat-layout) .ws { padding-bottom: calc(var(--ph-bottom) + var(--ph-switch) + 1rem) !important; }
    .composer { border-radius: 2.1rem; corner-shape: round; }
    .composer-input { font-size: 1.7rem; }
    .composer-bar .composer-btn { width: 3.6rem; height: 3.6rem; }

    /* Pop-ups rise from the bottom */
    .modal-overlay { align-items: flex-end; padding: 0 var(--ph-gap) var(--ph-gap); }
    .modal-card { width: 100% !important; max-height: 88dvh; }
    .ph-sheet-body { display: flex; flex-direction: column; gap: 1rem; }
    .ph-sheet-body .view-toggle { height: 4.4rem; }
    .ph-sheet-body .btn-primary, .ph-sheet-body .btn-secondary { height: 4.4rem; font-size: 1.5rem; }
    .ph-sheet-foot { display: flex; justify-content: flex-end; margin-top: 2.4rem; }
    .ph-sheet-foot .btn-primary { height: 4.4rem; min-width: 13rem; font-size: 1.5rem; }
    .ph-create .form-card { box-shadow: none; padding: 0; background: none; }
    .ph-create .form-card-head { display: none; }

    /* To-do on a phone: title gets the room; project chips narrower; sun / star only when on; + makes new to-dos */
    .todo-item-head .row-main { flex: 1; min-width: 8rem; }
    .todo-item-head .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .todo-item-head .badge { display: none; }      /* priority shows when the card opens */
    .todo-src.project { width: 11rem !important; max-width: 11rem !important; }
    .todo-item:not(.open) .todo-item-head .todo-sun:not(.on), .todo-item:not(.open) .todo-item-head .todo-star:not(.on) { display: none; }
    .todo-ws .tasks-header .btn-primary { display: none; }
    .todo-ws .tasks-header { position: sticky; top: 0; z-index: 4; height: 5.2rem; margin: 0; background: var(--bg); }
    .todo-ws .todo-quick { position: sticky; top: 5.2rem; z-index: 4; margin-bottom: 1rem; box-shadow: var(--pressed), 0 0.8rem 0.8rem var(--bg); }

    /* Apple text sizes on the phone: body 17pt, secondary 15pt, small 13pt; every chip 13pt */
    .row-title, .kanban-card-title, .todo-item-head .row-title, .hm-t, .chat-text, .msg-text, #inboxList .proj-item, .intake-ws .proj-item { font-size: 1.7rem; }
    .row-meta, .hm-l1, .hm-l2, .hm-pname small { font-size: 1.5rem; }
    .badge, .hm-chip, .todo-src, .po-short, .po-chip, .col-count, .hm-count, .kanban-card-date, .hm-d { font-size: 1.3rem !important; line-height: 1 !important; }
    .po-short { text-box: trim-both cap alphabetic; }

    /* ── To-do on a phone ── */
    /* side bar: a large title in the header's row (so the lists stay where they were), counts as big as the labels */
    .todo-ws .proj-panel-head { height: var(--ph-headh); display: flex; align-items: center; padding: 0 0 1rem 1.2rem; }
    .todo-ws .proj-panel-title { font-size: 3rem; letter-spacing: 0; text-transform: none; line-height: 1; }
    .todo-ws .proj-item.todo-nav { display: flex; align-items: center; gap: 1.2rem; }
    .todo-ws .todo-nav-icon { display: flex; align-items: center; }
    .todo-ws .todo-nav .proj-name { flex: 1; min-width: 0; line-height: 1.2; }
    .todo-ws .todo-nav-count { font-size: 1.7rem; line-height: 1.2; }
    /* the list runs to the bottom edge, scrolling behind the tab bar */
    .todo-ws .ws { padding-bottom: 0 !important; }
    .todo-ws .ws-body { padding-bottom: calc(var(--ph-bottom) + 2rem) !important; }
    /* chips: one size, text centred, long names glide on their own */
    .todo-ws .todo-src { width: 11rem !important; max-width: 11rem !important; height: 2.6rem; padding: 0 0.9rem; justify-content: flex-start; }
    .todo-ws .todo-src-clip { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; height: 100%; }
    .todo-ws .todo-src-run { display: inline-block; text-box: trim-both cap alphabetic; }
    .todo-ws .todo-src.overflows .todo-src-run { animation: nxGlide var(--glide-time, 6s) ease-in-out infinite; }
    .todo-ws .todo-src.overflows .todo-src-clip { -webkit-mask-image: linear-gradient(to right, transparent, #000 0.6rem, #000 calc(100% - 1.2rem), transparent); mask-image: linear-gradient(to right, transparent, #000 0.6rem, #000 calc(100% - 1.2rem), transparent); }
    /* steps: bigger ticks with more room */
    .todo-step-tick { width: 2.2rem; height: 2.2rem; }
    .todo-step-tick svg { width: 1.3rem; height: 1.3rem; }
    .todo-steps li { min-height: 4.4rem; gap: 1.2rem; }
    .todo-steps-mini li { min-height: 3.2rem; gap: 1.2rem; font-size: 1.5rem; }
    /* while typing, the tab bar and + step aside (they'd otherwise ride up on the keyboard) */
    body.ph-typing .ph-tab, body.ph-typing .ph-plus, body.ph-typing #phSwitchBg,
    body.ph-typing #workspaceView .tab-track, body.ph-typing .inbox-ws .inbox-track, body.ph-typing .intake-ws .intake-track, body.ph-typing .cl-ws .cl-track { transform: translateY(calc(100% + 4rem)); opacity: 0; pointer-events: none; }
    #workspaceView .tab-track, .inbox-ws .inbox-track, .intake-ws .intake-track, .cl-ws .cl-track, .ph-switch-bg { transition: transform 0.25s var(--ease-snap), opacity 0.2s ease; }
    /* with the bars away, a chat's message box drops to just above the keyboard */
    body.ph-typing #pageArea > .inbox-ws .ws, body.ph-typing #workspaceView:has(.chat-layout) .ws { padding-bottom: 1.6rem !important; }
    .ph-plus { transition: transform 0.25s var(--ease-snap), opacity 0.2s ease; }   /* (.ph-tab sets its own, with the grow-and-shrink) */

    /* ── Calendar on a phone: like the iPhone Calendar's month view ── */
    /* the page holds still (title, pills, grid); only the day's task list scrolls, down behind the tab bar */
    .page[data-view="calendar"] { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; padding: calc(var(--ph-top) + var(--ph-headh) + 0.4rem) var(--ph-gap) 0; }
    .page[data-view="calendar"] > #pageArea { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .cal-phone { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .cal-phone > * { flex: none; }
    .cal-phone > .cal-ph-day { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding-bottom: calc(var(--ph-bottom) + 2rem);
        margin-inline: calc(var(--ph-gap) * -1); padding-inline: var(--ph-gap); }
    .cal-ph-dayhead { position: sticky; top: 0; z-index: 1; background: var(--bg); }
    .cal-pills { margin-inline: calc(var(--ph-gap) * -1) !important; padding-inline: var(--ph-gap) !important; }
    .cpg { touch-action: pan-y; }
    .cal-ph-title { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 1rem; }
    .cal-ph-month { font-family: var(--font-heading); font-size: 3.4rem; line-height: 1; color: var(--accent-text); }
    .cal-ph-year { font-size: 1.7rem; color: var(--ink-3); }
    .cal-pills { display: flex; gap: 0.8rem; overflow-x: auto; scrollbar-width: none; margin: -0.4rem -1.6rem 1.2rem; padding: 0.6rem 1.6rem 0.6rem; }   /* room above for the pills' shadows */
    .cal-pills::-webkit-scrollbar { display: none; }
    .cal-pill { flex: none; height: 3.6rem; padding: 0 1.6rem; display: inline-flex; align-items: center; gap: 0.6rem; border: 0; border-radius: 1.8rem; corner-shape: round;
        background: var(--grey-btn-bg); box-shadow: var(--grey-btn-edge), var(--lift-sm); color: var(--ink); font-size: 1.5rem; white-space: nowrap; cursor: pointer; }
    .cal-pill.round { width: 3.6rem; padding: 0; justify-content: center; }
    .cal-pill svg { width: 1.8rem; height: 1.8rem; }
    .cal-pill.on { background: var(--rail-bg); box-shadow: var(--rail-edge); color: #ffffff; }
    .cal-pill.select { padding: 0; }
    .cal-pill.select select { -webkit-appearance: none; appearance: none; height: 100%; border: 0; background: var(--dd-arrow) no-repeat right 1.2rem center / 1.4rem 1.4rem, transparent;
        padding: 0 3.6rem 0 1.6rem; font-size: 1.5rem !important; color: inherit; max-width: 22rem; }
    .cph, .cpw { display: grid; grid-template-columns: repeat(7, 1fr); }
    .cph span { text-align: center; font-size: 1.3rem; color: var(--ink-3); padding-bottom: 0.6rem; }
    .cph span.wkend, .cpd.wkend .cpd-n { color: var(--ink-3); }
    .cpw { border-top: 1px solid var(--hair); }
    .cpd { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; height: 5.6rem; padding-top: 0.5rem; border: 0; background: none; color: var(--ink); cursor: pointer; }
    .cpd-n { width: 3.2rem; height: 3.2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; corner-shape: round; font-size: 1.9rem; line-height: 1; }
    .cpd.out { opacity: 0.35; }
    .cpd.sel .cpd-n { background: var(--ink); color: var(--bg); }
    .cpd.today .cpd-n { color: var(--accent-text); }
    .cpd.today.sel .cpd-n { background: var(--rail-bg); color: #ffffff; }
    .cpd-dots { display: flex; gap: 0.3rem; height: 0.6rem; }
    .cpd-dots i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c); }
    .cpd-dots i.ev { background: none; box-shadow: inset 0 0 0 1.5px var(--c); }
    .cal-ph-day { margin-top: 0.4rem; padding-bottom: 2rem; }
    .cpg { border-bottom: 1px solid var(--hair); }
    .cal-ph-dayhead { font-size: 1.5rem; color: var(--ink-3); padding: 1.4rem 0 0.6rem; }
    .cal-ph-item { display: flex; align-items: center; gap: 1.2rem; width: 100%; min-height: 5.6rem; padding: 0.8rem 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); text-align: left; cursor: pointer; }
    .cal-ph-bar { flex: none; width: 0.4rem; align-self: stretch; border-radius: 0.2rem; background: var(--c); }
    .cal-ph-item.ev .cal-ph-bar { background: repeating-linear-gradient(var(--c) 0 0.4rem, transparent 0.4rem 0.7rem); }
    .cal-ph-item.done .cal-ph-t { text-decoration: line-through; color: var(--ink-3); }
    .cal-ph-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
    .cal-ph-t { font-size: 1.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cal-ph-m { font-size: 1.5rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cal-ph-when { flex: none; font-size: 1.3rem; color: var(--ink-3); text-align: right; line-height: 1.3; }
    .cal-ph-none { color: var(--ink-3); font-size: 1.5rem; padding: 1.2rem 0; }
    .cal-menu { position: fixed !important; top: calc(var(--ph-top) + var(--ph-headh) + 0.8rem) !important; right: var(--ph-gap) !important; left: auto !important; bottom: auto !important;
        width: 26rem; padding: 0.6rem; z-index: 1200; }
    .cal-menu .menu-item { font-size: 1.7rem; min-height: 4.4rem; }
    .cal-menu-label { font-size: 1.3rem; color: var(--ink-3); padding: 0.8rem 1rem 0.6rem; }
    .cal-menu .view-toggle { width: 100%; height: 3.6rem; }
    .cal-menu .view-toggle button { font-size: 1.5rem; }
    .menu-sep { height: 1px; background: var(--hair); margin: 0.4rem 0; }

    /* Home on a phone: widgets one per row, no Customise */
    .hm-head { margin-bottom: 0.8rem; }
    .hm-actions { display: none; }
    .menu-pop { max-width: calc(100vw - 3.2rem); }
    #profileMenu, #themeMenu { position: fixed !important; left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important;
        transform: translate(-50%, -50%); width: min(32rem, calc(100vw - 4.2rem)); z-index: 1200; box-shadow: var(--panel-edge), var(--float), 0 0 0 100vmax rgba(0, 0, 0, 0.3); }
}

/* Phone: the search window sits near the top; no Esc key, so tap outside to close */
@media (max-width: 700px) {
    .nx-search-back { padding-top: calc(var(--ph-top) + 1.2rem); }
    .nx-search-bar kbd { display: none; }                 /* no Esc key on a phone: tap outside to close */
    .nx-search-bar { padding: 1.8rem 2rem; gap: 1.4rem; }  /* a bigger search bar on the phone (Aaron, 29 Oct) */
    .nx-search-bar svg { width: 2.2rem; height: 2.2rem; }
    .nx-search-bar { font-size: 2rem; }
}

/* ==== SQUIRCLE LAYER (generated by dev/squircle_gen.py; do not edit by hand) ==== */
:where(*) { --rail-edge: inset 0 0 0 1px var(--rail-edge-c); --accent-edge: inset 0 0 0 1px var(--accent-edge-c); --panel-edge: inset 0 0 0 1px var(--panel-edge-c); --grey-btn-edge: inset 0 0 0 1px var(--grey-btn-edge-c); }
:where(.card, .row-swatch, .meter, .meter > span, .flag, .btn-primary, .btn-secondary, .btn-grey, .btn-danger, .pill, .btn-sm-outline, .btn-icon-sm, .icon-btn, .view-toggle, .chip-toggle, .error-msg, .menu-pop, .menu-item, .workspace, .proj-panel, .proj-item, .tab-track, .tab-btn, .tab-badge, .status-note, .kanban-column, .col-count, .kanban-card, .kanban-column .kanban-column-header, .badge, .panel, .user-role-badge, .choice-card, .copy-tile, .form-actions .btn-primary, .form-actions .btn-grey, .cal-card, .cal-num, .cal-bar, .cal-key, .mcp-new, .stack-bar, .legend i, .gantt-popup, .docs-layout, .doc-attachment-row, .doc-att-badge, .tree-context-menu, .tcm-item, .move-pick-item, .chat-layout, .chat-bubble, .bs-layout, .bs-tool-btn, .view-toggle button, .toggle-ink, .tab-ink, .proj-ink, .cal-frame .cal-card, .inbox-tabs .tab-count, .inbox-unread, .inbox-frame, .inbox-item, .inbox-thread, .inbox-ws .tab-count, .chat-text code, .chat-file, .composer, .composer-btn, .composer-send, .emoji-pop, .emoji-pop button, .po-cap, .po-chip, .po-step-btn, .proj-tag, .po-status, .intake-ws .tab-count, .intake-reason.big, .type-pill, .intake-preview-wrap, .intake-banner, .intake-setup code, .todo-new-list button, .todo-quick, .todo-count, .todo-star, .todo-item, .todo-sun, .todo-d-title, .todo-head-title, .todo-title-edit, .todo-step-del, .todo-d-notes, .todo-chip, .todo-pick-opt, .todo-src, .mention, .mention-pop, .mention-item, .mention-row, .hm-card, .hm-count, .hm-loading, .cl-site, .cl-search, .cl-badge, .cl-dot, .cl-stat, .cl-pill, .cl-hpo, .cl-nopo, .cl-todo-chip, .cl-card, .cl-step-chip, .cl-dots button, .cl-col, .cl-col-head, .cl-tcard, .cl-eqm, .cl-eqm-chips span, .cl-svcc, .cl-pcard, .cl-psteps span, .cl-hlist, .td-pill, .nx-res, kbd, .nx-toast-act, .hm-row, .hm-chip, .hm-link, .hm-act, .hm-tile, .hm-orow, .hm-prow, .hm-fbar, .hm-fbar span, .hm-bbar, .hm-grid.editing .hm-tools, .hm-add, .hm-gallery-item, .ph-sel, .ph-tb, .ph-plus-menu, .ph-plus-menu button, .ph-pill, .ph-switch-bg, .ph-switch-bg span, .po-timeline, .cal-pill, .cal-ph-bar) { position: relative; --sq-edge: transparent; --sq-r: 9999px; }   /* own values only, never the parent's */
.card, .row-swatch, .meter, .meter > span, .flag, .btn-primary, .btn-secondary, .btn-grey, .btn-danger, .pill, .btn-sm-outline, .btn-icon-sm, .icon-btn, .view-toggle, .chip-toggle, .error-msg, .menu-pop, .menu-item, .workspace, .proj-panel, .proj-item, .tab-track, .tab-btn, .tab-badge, .status-note, .kanban-column, .col-count, .kanban-card, .kanban-column .kanban-column-header, .badge, .panel, .user-role-badge, .choice-card, .copy-tile, .form-actions .btn-primary, .form-actions .btn-grey, .cal-card, .cal-num, .cal-bar, .cal-key, .mcp-new, .stack-bar, .legend i, .gantt-popup, .docs-layout, .doc-attachment-row, .doc-att-badge, .tree-context-menu, .tcm-item, .move-pick-item, .chat-layout, .chat-bubble, .bs-layout, .bs-tool-btn, .view-toggle button, .toggle-ink, .tab-ink, .proj-ink, .cal-frame .cal-card, .inbox-tabs .tab-count, .inbox-unread, .inbox-frame, .inbox-item, .inbox-thread, .inbox-ws .tab-count, .chat-text code, .chat-file, .composer, .composer-btn, .composer-send, .emoji-pop, .emoji-pop button, .po-cap, .po-chip, .po-step-btn, .proj-tag, .po-status, .intake-ws .tab-count, .intake-reason.big, .type-pill, .intake-preview-wrap, .intake-banner, .intake-setup code, .todo-new-list button, .todo-quick, .todo-count, .todo-star, .todo-item, .todo-sun, .todo-d-title, .todo-head-title, .todo-title-edit, .todo-step-del, .todo-d-notes, .todo-chip, .todo-pick-opt, .todo-src, .mention, .mention-pop, .mention-item, .mention-row, .hm-card, .hm-count, .hm-loading, .cl-site, .cl-search, .cl-badge, .cl-dot, .cl-stat, .cl-pill, .cl-hpo, .cl-nopo, .cl-todo-chip, .cl-card, .cl-step-chip, .cl-dots button, .cl-col, .cl-col-head, .cl-tcard, .cl-eqm, .cl-eqm-chips span, .cl-svcc, .cl-pcard, .cl-psteps span, .cl-hlist, .td-pill, .nx-res, kbd, .nx-toast-act, .hm-row, .hm-chip, .hm-link, .hm-act, .hm-tile, .hm-orow, .hm-prow, .hm-fbar, .hm-fbar span, .hm-bbar, .hm-grid.editing .hm-tools, .hm-add, .hm-gallery-item, .ph-sel, .ph-tb, .ph-plus-menu, .ph-plus-menu button, .ph-pill, .ph-switch-bg, .ph-switch-bg span, .po-timeline, .cal-pill, .cal-ph-bar {
    isolation: isolate; -webkit-background-clip: text; background-clip: text;
    --rail-edge: 0 0 transparent; --accent-edge: 0 0 transparent; --panel-edge: 0 0 transparent; --grey-btn-edge: 0 0 transparent;
}
.card::before, .row-swatch::before, .meter::before, .meter > span::before, .flag::before, .btn-primary::before, .btn-secondary::before, .btn-grey::before, .btn-danger::before, .pill::before, .btn-sm-outline::before, .btn-icon-sm::before, .icon-btn::before, .view-toggle::before, .chip-toggle::before, .error-msg::before, .menu-pop::before, .menu-item::before, .workspace::before, .proj-panel::before, .proj-item::before, .tab-track::before, .tab-btn::before, .tab-badge::before, .status-note::before, .kanban-column::before, .col-count::before, .kanban-card::before, .kanban-column .kanban-column-header::before, .badge::before, .panel::before, .user-role-badge::before, .choice-card::before, .copy-tile::before, .form-actions .btn-primary::before, .form-actions .btn-grey::before, .cal-card::before, .cal-num::before, .cal-bar::before, .cal-key::before, .mcp-new::before, .stack-bar::before, .legend i::before, .gantt-popup::before, .docs-layout::before, .doc-attachment-row::before, .doc-att-badge::before, .tree-context-menu::before, .tcm-item::before, .move-pick-item::before, .chat-layout::before, .chat-bubble::before, .bs-layout::before, .bs-tool-btn::before, .view-toggle button::before, .toggle-ink::before, .tab-ink::before, .proj-ink::before, .cal-frame .cal-card::before, .inbox-tabs .tab-count::before, .inbox-unread::before, .inbox-frame::before, .inbox-item::before, .inbox-thread::before, .inbox-ws .tab-count::before, .chat-text code::before, .chat-file::before, .composer::before, .composer-btn::before, .composer-send::before, .emoji-pop::before, .emoji-pop button::before, .po-cap::before, .po-chip::before, .po-step-btn::before, .proj-tag::before, .po-status::before, .intake-ws .tab-count::before, .intake-reason.big::before, .type-pill::before, .intake-preview-wrap::before, .intake-banner::before, .intake-setup code::before, .todo-new-list button::before, .todo-quick::before, .todo-count::before, .todo-star::before, .todo-item::before, .todo-sun::before, .todo-d-title::before, .todo-head-title::before, .todo-title-edit::before, .todo-step-del::before, .todo-d-notes::before, .todo-chip::before, .todo-pick-opt::before, .todo-src::before, .mention::before, .mention-pop::before, .mention-item::before, .mention-row::before, .hm-card::before, .hm-count::before, .hm-loading::before, .cl-site::before, .cl-search::before, .cl-badge::before, .cl-dot::before, .cl-stat::before, .cl-pill::before, .cl-hpo::before, .cl-nopo::before, .cl-todo-chip::before, .cl-card::before, .cl-step-chip::before, .cl-dots button::before, .cl-col::before, .cl-col-head::before, .cl-tcard::before, .cl-eqm::before, .cl-eqm-chips span::before, .cl-svcc::before, .cl-pcard::before, .cl-psteps span::before, .cl-hlist::before, .td-pill::before, .nx-res::before, kbd::before, .nx-toast-act::before, .hm-row::before, .hm-chip::before, .hm-link::before, .hm-act::before, .hm-tile::before, .hm-orow::before, .hm-prow::before, .hm-fbar::before, .hm-fbar span::before, .hm-bbar::before, .hm-grid.editing .hm-tools::before, .hm-add::before, .hm-gallery-item::before, .ph-sel::before, .ph-tb::before, .ph-plus-menu::before, .ph-plus-menu button::before, .ph-pill::before, .ph-switch-bg::before, .ph-switch-bg span::before, .po-timeline::before, .cal-pill::before, .cal-ph-bar::before, .card::after, .row-swatch::after, .meter::after, .meter > span::after, .flag::after, .btn-primary::after, .btn-secondary::after, .btn-grey::after, .btn-danger::after, .pill::after, .btn-sm-outline::after, .btn-icon-sm::after, .icon-btn::after, .view-toggle::after, .chip-toggle::after, .error-msg::after, .menu-pop::after, .menu-item::after, .workspace::after, .proj-panel::after, .proj-item::after, .tab-track::after, .tab-btn::after, .tab-badge::after, .status-note::after, .kanban-column::after, .col-count::after, .kanban-card::after, .kanban-column .kanban-column-header::after, .badge::after, .panel::after, .user-role-badge::after, .choice-card::after, .copy-tile::after, .form-actions .btn-primary::after, .form-actions .btn-grey::after, .cal-card::after, .cal-num::after, .cal-bar::after, .cal-key::after, .mcp-new::after, .stack-bar::after, .legend i::after, .gantt-popup::after, .docs-layout::after, .doc-attachment-row::after, .doc-att-badge::after, .tree-context-menu::after, .tcm-item::after, .move-pick-item::after, .chat-layout::after, .chat-bubble::after, .bs-layout::after, .bs-tool-btn::after, .view-toggle button::after, .toggle-ink::after, .tab-ink::after, .proj-ink::after, .cal-frame .cal-card::after, .inbox-tabs .tab-count::after, .inbox-unread::after, .inbox-frame::after, .inbox-item::after, .inbox-thread::after, .inbox-ws .tab-count::after, .chat-text code::after, .chat-file::after, .composer::after, .composer-btn::after, .composer-send::after, .emoji-pop::after, .emoji-pop button::after, .po-cap::after, .po-chip::after, .po-step-btn::after, .proj-tag::after, .po-status::after, .intake-ws .tab-count::after, .intake-reason.big::after, .type-pill::after, .intake-preview-wrap::after, .intake-banner::after, .intake-setup code::after, .todo-new-list button::after, .todo-quick::after, .todo-count::after, .todo-star::after, .todo-item::after, .todo-sun::after, .todo-d-title::after, .todo-head-title::after, .todo-title-edit::after, .todo-step-del::after, .todo-d-notes::after, .todo-chip::after, .todo-pick-opt::after, .todo-src::after, .mention::after, .mention-pop::after, .mention-item::after, .mention-row::after, .hm-card::after, .hm-count::after, .hm-loading::after, .cl-site::after, .cl-search::after, .cl-badge::after, .cl-dot::after, .cl-stat::after, .cl-pill::after, .cl-hpo::after, .cl-nopo::after, .cl-todo-chip::after, .cl-card::after, .cl-step-chip::after, .cl-dots button::after, .cl-col::after, .cl-col-head::after, .cl-tcard::after, .cl-eqm::after, .cl-eqm-chips span::after, .cl-svcc::after, .cl-pcard::after, .cl-psteps span::after, .cl-hlist::after, .td-pill::after, .nx-res::after, kbd::after, .nx-toast-act::after, .hm-row::after, .hm-chip::after, .hm-link::after, .hm-act::after, .hm-tile::after, .hm-orow::after, .hm-prow::after, .hm-fbar::after, .hm-fbar span::after, .hm-bbar::after, .hm-grid.editing .hm-tools::after, .hm-add::after, .hm-gallery-item::after, .ph-sel::after, .ph-tb::after, .ph-plus-menu::after, .ph-plus-menu button::after, .ph-pill::after, .ph-switch-bg::after, .ph-switch-bg span::after, .po-timeline::after, .cal-pill::after, .cal-ph-bar::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: 0;
    -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' viewBox='0 0 101 101'%3E%3Cpath d='M51.0 0.0L61.6 0.2L67.8 0.6L72.9 1.4L77.4 2.6L81.3 4.0L84.8 5.8L87.9 7.9L90.7 10.3L93.1 13.1L95.2 16.2L97.0 19.7L98.4 23.6L99.6 28.1L100.4 33.2L100.8 39.4L101.0 50.0L101.0 51.0L100.8 61.6L100.4 67.8L99.6 72.9L98.4 77.4L97.0 81.3L95.2 84.8L93.1 87.9L90.7 90.7L87.9 93.1L84.8 95.2L81.3 97.0L77.4 98.4L72.9 99.6L67.8 100.4L61.6 100.8L51.0 101.0L50.0 101.0L39.4 100.8L33.2 100.4L28.1 99.6L23.6 98.4L19.7 97.0L16.2 95.2L13.1 93.1L10.3 90.7L7.9 87.9L5.8 84.8L4.0 81.3L2.6 77.4L1.4 72.9L0.6 67.8L0.2 61.6L0.0 51.0L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") 50 fill / var(--sq-r) stretch; mask-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' viewBox='0 0 101 101'%3E%3Cpath d='M51.0 0.0L61.6 0.2L67.8 0.6L72.9 1.4L77.4 2.6L81.3 4.0L84.8 5.8L87.9 7.9L90.7 10.3L93.1 13.1L95.2 16.2L97.0 19.7L98.4 23.6L99.6 28.1L100.4 33.2L100.8 39.4L101.0 50.0L101.0 51.0L100.8 61.6L100.4 67.8L99.6 72.9L98.4 77.4L97.0 81.3L95.2 84.8L93.1 87.9L90.7 90.7L87.9 93.1L84.8 95.2L81.3 97.0L77.4 98.4L72.9 99.6L67.8 100.4L61.6 100.8L51.0 101.0L50.0 101.0L39.4 100.8L33.2 100.4L28.1 99.6L23.6 98.4L19.7 97.0L16.2 95.2L13.1 93.1L10.3 90.7L7.9 87.9L5.8 84.8L4.0 81.3L2.6 77.4L1.4 72.9L0.6 67.8L0.2 61.6L0.0 51.0L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") 50 fill / var(--sq-r) stretch;
}
.card::before, .row-swatch::before, .meter::before, .meter > span::before, .flag::before, .btn-primary::before, .btn-secondary::before, .btn-grey::before, .btn-danger::before, .pill::before, .btn-sm-outline::before, .btn-icon-sm::before, .icon-btn::before, .view-toggle::before, .chip-toggle::before, .error-msg::before, .menu-pop::before, .menu-item::before, .workspace::before, .proj-panel::before, .proj-item::before, .tab-track::before, .tab-btn::before, .tab-badge::before, .status-note::before, .kanban-column::before, .col-count::before, .kanban-card::before, .kanban-column .kanban-column-header::before, .badge::before, .panel::before, .user-role-badge::before, .choice-card::before, .copy-tile::before, .form-actions .btn-primary::before, .form-actions .btn-grey::before, .cal-card::before, .cal-num::before, .cal-bar::before, .cal-key::before, .mcp-new::before, .stack-bar::before, .legend i::before, .gantt-popup::before, .docs-layout::before, .doc-attachment-row::before, .doc-att-badge::before, .tree-context-menu::before, .tcm-item::before, .move-pick-item::before, .chat-layout::before, .chat-bubble::before, .bs-layout::before, .bs-tool-btn::before, .view-toggle button::before, .toggle-ink::before, .tab-ink::before, .proj-ink::before, .cal-frame .cal-card::before, .inbox-tabs .tab-count::before, .inbox-unread::before, .inbox-frame::before, .inbox-item::before, .inbox-thread::before, .inbox-ws .tab-count::before, .chat-text code::before, .chat-file::before, .composer::before, .composer-btn::before, .composer-send::before, .emoji-pop::before, .emoji-pop button::before, .po-cap::before, .po-chip::before, .po-step-btn::before, .proj-tag::before, .po-status::before, .intake-ws .tab-count::before, .intake-reason.big::before, .type-pill::before, .intake-preview-wrap::before, .intake-banner::before, .intake-setup code::before, .todo-new-list button::before, .todo-quick::before, .todo-count::before, .todo-star::before, .todo-item::before, .todo-sun::before, .todo-d-title::before, .todo-head-title::before, .todo-title-edit::before, .todo-step-del::before, .todo-d-notes::before, .todo-chip::before, .todo-pick-opt::before, .todo-src::before, .mention::before, .mention-pop::before, .mention-item::before, .mention-row::before, .hm-card::before, .hm-count::before, .hm-loading::before, .cl-site::before, .cl-search::before, .cl-badge::before, .cl-dot::before, .cl-stat::before, .cl-pill::before, .cl-hpo::before, .cl-nopo::before, .cl-todo-chip::before, .cl-card::before, .cl-step-chip::before, .cl-dots button::before, .cl-col::before, .cl-col-head::before, .cl-tcard::before, .cl-eqm::before, .cl-eqm-chips span::before, .cl-svcc::before, .cl-pcard::before, .cl-psteps span::before, .cl-hlist::before, .td-pill::before, .nx-res::before, kbd::before, .nx-toast-act::before, .hm-row::before, .hm-chip::before, .hm-link::before, .hm-act::before, .hm-tile::before, .hm-orow::before, .hm-prow::before, .hm-fbar::before, .hm-fbar span::before, .hm-bbar::before, .hm-grid.editing .hm-tools::before, .hm-add::before, .hm-gallery-item::before, .ph-sel::before, .ph-tb::before, .ph-plus-menu::before, .ph-plus-menu button::before, .ph-pill::before, .ph-switch-bg::before, .ph-switch-bg span::before, .po-timeline::before, .cal-pill::before, .cal-ph-bar::before { background: var(--sq-edge, transparent); }
.card::after, .row-swatch::after, .meter::after, .meter > span::after, .flag::after, .btn-primary::after, .btn-secondary::after, .btn-grey::after, .btn-danger::after, .pill::after, .btn-sm-outline::after, .btn-icon-sm::after, .icon-btn::after, .view-toggle::after, .chip-toggle::after, .error-msg::after, .menu-pop::after, .menu-item::after, .workspace::after, .proj-panel::after, .proj-item::after, .tab-track::after, .tab-btn::after, .tab-badge::after, .status-note::after, .kanban-column::after, .col-count::after, .kanban-card::after, .kanban-column .kanban-column-header::after, .badge::after, .panel::after, .user-role-badge::after, .choice-card::after, .copy-tile::after, .form-actions .btn-primary::after, .form-actions .btn-grey::after, .cal-card::after, .cal-num::after, .cal-bar::after, .cal-key::after, .mcp-new::after, .stack-bar::after, .legend i::after, .gantt-popup::after, .docs-layout::after, .doc-attachment-row::after, .doc-att-badge::after, .tree-context-menu::after, .tcm-item::after, .move-pick-item::after, .chat-layout::after, .chat-bubble::after, .bs-layout::after, .bs-tool-btn::after, .view-toggle button::after, .toggle-ink::after, .tab-ink::after, .proj-ink::after, .cal-frame .cal-card::after, .inbox-tabs .tab-count::after, .inbox-unread::after, .inbox-frame::after, .inbox-item::after, .inbox-thread::after, .inbox-ws .tab-count::after, .chat-text code::after, .chat-file::after, .composer::after, .composer-btn::after, .composer-send::after, .emoji-pop::after, .emoji-pop button::after, .po-cap::after, .po-chip::after, .po-step-btn::after, .proj-tag::after, .po-status::after, .intake-ws .tab-count::after, .intake-reason.big::after, .type-pill::after, .intake-preview-wrap::after, .intake-banner::after, .intake-setup code::after, .todo-new-list button::after, .todo-quick::after, .todo-count::after, .todo-star::after, .todo-item::after, .todo-sun::after, .todo-d-title::after, .todo-head-title::after, .todo-title-edit::after, .todo-step-del::after, .todo-d-notes::after, .todo-chip::after, .todo-pick-opt::after, .todo-src::after, .mention::after, .mention-pop::after, .mention-item::after, .mention-row::after, .hm-card::after, .hm-count::after, .hm-loading::after, .cl-site::after, .cl-search::after, .cl-badge::after, .cl-dot::after, .cl-stat::after, .cl-pill::after, .cl-hpo::after, .cl-nopo::after, .cl-todo-chip::after, .cl-card::after, .cl-step-chip::after, .cl-dots button::after, .cl-col::after, .cl-col-head::after, .cl-tcard::after, .cl-eqm::after, .cl-eqm-chips span::after, .cl-svcc::after, .cl-pcard::after, .cl-psteps span::after, .cl-hlist::after, .td-pill::after, .nx-res::after, kbd::after, .nx-toast-act::after, .hm-row::after, .hm-chip::after, .hm-link::after, .hm-act::after, .hm-tile::after, .hm-orow::after, .hm-prow::after, .hm-fbar::after, .hm-fbar span::after, .hm-bbar::after, .hm-grid.editing .hm-tools::after, .hm-add::after, .hm-gallery-item::after, .ph-sel::after, .ph-tb::after, .ph-plus-menu::after, .ph-plus-menu button::after, .ph-pill::after, .ph-switch-bg::after, .ph-switch-bg span::after, .po-timeline::after, .cal-pill::after, .cal-ph-bar::after {
    inset: 1px; background: inherit; -webkit-background-clip: border-box; background-clip: border-box;
    box-shadow: inherit; border-radius: inherit;      /* inset shading (wells) follows the shape, then the mask trims it */
    -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' viewBox='0 0 101 101'%3E%3Cpath d='M51.0 0.0L61.6 0.2L67.8 0.6L72.9 1.4L77.4 2.6L81.3 4.0L84.8 5.8L87.9 7.9L90.7 10.3L93.1 13.1L95.2 16.2L97.0 19.7L98.4 23.6L99.6 28.1L100.4 33.2L100.8 39.4L101.0 50.0L101.0 51.0L100.8 61.6L100.4 67.8L99.6 72.9L98.4 77.4L97.0 81.3L95.2 84.8L93.1 87.9L90.7 90.7L87.9 93.1L84.8 95.2L81.3 97.0L77.4 98.4L72.9 99.6L67.8 100.4L61.6 100.8L51.0 101.0L50.0 101.0L39.4 100.8L33.2 100.4L28.1 99.6L23.6 98.4L19.7 97.0L16.2 95.2L13.1 93.1L10.3 90.7L7.9 87.9L5.8 84.8L4.0 81.3L2.6 77.4L1.4 72.9L0.6 67.8L0.2 61.6L0.0 51.0L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") 50 fill / calc(var(--sq-r) - 1px) stretch; mask-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' viewBox='0 0 101 101'%3E%3Cpath d='M51.0 0.0L61.6 0.2L67.8 0.6L72.9 1.4L77.4 2.6L81.3 4.0L84.8 5.8L87.9 7.9L90.7 10.3L93.1 13.1L95.2 16.2L97.0 19.7L98.4 23.6L99.6 28.1L100.4 33.2L100.8 39.4L101.0 50.0L101.0 51.0L100.8 61.6L100.4 67.8L99.6 72.9L98.4 77.4L97.0 81.3L95.2 84.8L93.1 87.9L90.7 90.7L87.9 93.1L84.8 95.2L81.3 97.0L77.4 98.4L72.9 99.6L67.8 100.4L61.6 100.8L51.0 101.0L50.0 101.0L39.4 100.8L33.2 100.4L28.1 99.6L23.6 98.4L19.7 97.0L16.2 95.2L13.1 93.1L10.3 90.7L7.9 87.9L5.8 84.8L4.0 81.3L2.6 77.4L1.4 72.9L0.6 67.8L0.2 61.6L0.0 51.0L0.0 50.0L0.2 39.4L0.6 33.2L1.4 28.1L2.6 23.6L4.0 19.7L5.8 16.2L7.9 13.1L10.3 10.3L13.1 7.9L16.2 5.8L19.7 4.0L23.6 2.6L28.1 1.4L33.2 0.6L39.4 0.2L50.0 0.0Z'/%3E%3C/svg%3E") 50 fill / calc(var(--sq-r) - 1px) stretch;
}
/* Capsules keep round ends that ease into the flat sides; shapes too short for that (icon buttons) stay plain circles.
   assets/js/squircle.js sorts them (.sq-cap / .sq-round) by comparing radius and height. */
.sq-cap::before, .sq-cap::after { -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='301' height='201' viewBox='0 0 301 201'%3E%3Cpath d='M0.0 100.0L0.1 96.7L0.2 93.5L0.5 90.2L0.9 86.9L1.3 83.7L1.9 80.5L2.6 77.3L3.4 74.1L4.3 71.0L5.4 67.9L6.5 64.8L7.7 61.7L9.1 58.7L10.5 55.8L12.1 52.9L13.7 50.0L15.5 47.2L17.4 44.4L19.4 41.8L21.5 39.1L23.7 36.6L26.0 34.1L28.4 31.6L30.9 29.3L33.6 27.0L36.4 24.8L39.3 22.7L42.3 20.7L45.4 18.7L48.6 16.9L52.0 15.1L55.5 13.4L59.1 11.8L62.9 10.3L66.9 8.9L70.9 7.6L75.2 6.4L79.6 5.3L84.2 4.3L89.1 3.4L94.2 2.6L99.5 1.9L105.3 1.3L111.4 0.9L118.1 0.5L125.7 0.2L134.7 0.1L150.0 0.0L151.0 0.0L166.3 0.1L175.3 0.2L182.9 0.5L189.6 0.9L195.7 1.3L201.5 1.9L206.8 2.6L211.9 3.4L216.8 4.3L221.4 5.3L225.8 6.4L230.1 7.6L234.1 8.9L238.1 10.3L241.9 11.8L245.5 13.4L249.0 15.1L252.4 16.9L255.6 18.7L258.7 20.7L261.7 22.7L264.6 24.8L267.4 27.0L270.1 29.3L272.6 31.6L275.0 34.1L277.3 36.6L279.5 39.1L281.6 41.8L283.6 44.4L285.5 47.2L287.3 50.0L288.9 52.9L290.5 55.8L291.9 58.7L293.3 61.7L294.5 64.8L295.6 67.9L296.7 71.0L297.6 74.1L298.4 77.3L299.1 80.5L299.7 83.7L300.1 86.9L300.5 90.2L300.8 93.5L300.9 96.7L301.0 100.0L301.0 101.0L300.9 104.3L300.8 107.5L300.5 110.8L300.1 114.1L299.7 117.3L299.1 120.5L298.4 123.7L297.6 126.9L296.7 130.0L295.6 133.1L294.5 136.2L293.3 139.3L291.9 142.3L290.5 145.2L288.9 148.1L287.3 151.0L285.5 153.8L283.6 156.6L281.6 159.2L279.5 161.9L277.3 164.4L275.0 166.9L272.6 169.4L270.1 171.7L267.4 174.0L264.6 176.2L261.7 178.3L258.7 180.3L255.6 182.3L252.4 184.1L249.0 185.9L245.5 187.6L241.9 189.2L238.1 190.7L234.1 192.1L230.1 193.4L225.8 194.6L221.4 195.7L216.8 196.7L211.9 197.6L206.8 198.4L201.5 199.1L195.7 199.7L189.6 200.1L182.9 200.5L175.3 200.8L166.3 200.9L151.0 201.0L150.0 201.0L134.7 200.9L125.7 200.8L118.1 200.5L111.4 200.1L105.3 199.7L99.5 199.1L94.2 198.4L89.1 197.6L84.2 196.7L79.6 195.7L75.2 194.6L70.9 193.4L66.9 192.1L62.9 190.7L59.1 189.2L55.5 187.6L52.0 185.9L48.6 184.1L45.4 182.3L42.3 180.3L39.3 178.3L36.4 176.2L33.6 174.0L30.9 171.7L28.4 169.4L26.0 166.9L23.7 164.4L21.5 161.9L19.4 159.2L17.4 156.6L15.5 153.8L13.7 151.0L12.1 148.1L10.5 145.2L9.1 142.3L7.7 139.3L6.5 136.2L5.4 133.1L4.3 130.0L3.4 126.9L2.6 123.7L1.9 120.5L1.3 117.3L0.9 114.1L0.5 110.8L0.2 107.5L0.1 104.3L0.0 101.0Z'/%3E%3C/svg%3E") 100 150 fill / 9999px 14998px stretch !important; mask-border: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='301' height='201' viewBox='0 0 301 201'%3E%3Cpath d='M0.0 100.0L0.1 96.7L0.2 93.5L0.5 90.2L0.9 86.9L1.3 83.7L1.9 80.5L2.6 77.3L3.4 74.1L4.3 71.0L5.4 67.9L6.5 64.8L7.7 61.7L9.1 58.7L10.5 55.8L12.1 52.9L13.7 50.0L15.5 47.2L17.4 44.4L19.4 41.8L21.5 39.1L23.7 36.6L26.0 34.1L28.4 31.6L30.9 29.3L33.6 27.0L36.4 24.8L39.3 22.7L42.3 20.7L45.4 18.7L48.6 16.9L52.0 15.1L55.5 13.4L59.1 11.8L62.9 10.3L66.9 8.9L70.9 7.6L75.2 6.4L79.6 5.3L84.2 4.3L89.1 3.4L94.2 2.6L99.5 1.9L105.3 1.3L111.4 0.9L118.1 0.5L125.7 0.2L134.7 0.1L150.0 0.0L151.0 0.0L166.3 0.1L175.3 0.2L182.9 0.5L189.6 0.9L195.7 1.3L201.5 1.9L206.8 2.6L211.9 3.4L216.8 4.3L221.4 5.3L225.8 6.4L230.1 7.6L234.1 8.9L238.1 10.3L241.9 11.8L245.5 13.4L249.0 15.1L252.4 16.9L255.6 18.7L258.7 20.7L261.7 22.7L264.6 24.8L267.4 27.0L270.1 29.3L272.6 31.6L275.0 34.1L277.3 36.6L279.5 39.1L281.6 41.8L283.6 44.4L285.5 47.2L287.3 50.0L288.9 52.9L290.5 55.8L291.9 58.7L293.3 61.7L294.5 64.8L295.6 67.9L296.7 71.0L297.6 74.1L298.4 77.3L299.1 80.5L299.7 83.7L300.1 86.9L300.5 90.2L300.8 93.5L300.9 96.7L301.0 100.0L301.0 101.0L300.9 104.3L300.8 107.5L300.5 110.8L300.1 114.1L299.7 117.3L299.1 120.5L298.4 123.7L297.6 126.9L296.7 130.0L295.6 133.1L294.5 136.2L293.3 139.3L291.9 142.3L290.5 145.2L288.9 148.1L287.3 151.0L285.5 153.8L283.6 156.6L281.6 159.2L279.5 161.9L277.3 164.4L275.0 166.9L272.6 169.4L270.1 171.7L267.4 174.0L264.6 176.2L261.7 178.3L258.7 180.3L255.6 182.3L252.4 184.1L249.0 185.9L245.5 187.6L241.9 189.2L238.1 190.7L234.1 192.1L230.1 193.4L225.8 194.6L221.4 195.7L216.8 196.7L211.9 197.6L206.8 198.4L201.5 199.1L195.7 199.7L189.6 200.1L182.9 200.5L175.3 200.8L166.3 200.9L151.0 201.0L150.0 201.0L134.7 200.9L125.7 200.8L118.1 200.5L111.4 200.1L105.3 199.7L99.5 199.1L94.2 198.4L89.1 197.6L84.2 196.7L79.6 195.7L75.2 194.6L70.9 193.4L66.9 192.1L62.9 190.7L59.1 189.2L55.5 187.6L52.0 185.9L48.6 184.1L45.4 182.3L42.3 180.3L39.3 178.3L36.4 176.2L33.6 174.0L30.9 171.7L28.4 169.4L26.0 166.9L23.7 164.4L21.5 161.9L19.4 159.2L17.4 156.6L15.5 153.8L13.7 151.0L12.1 148.1L10.5 145.2L9.1 142.3L7.7 139.3L6.5 136.2L5.4 133.1L4.3 130.0L3.4 126.9L2.6 123.7L1.9 120.5L1.3 117.3L0.9 114.1L0.5 110.8L0.2 107.5L0.1 104.3L0.0 101.0Z'/%3E%3C/svg%3E") 100 150 fill / 9999px 14998px stretch !important; }
.sq-round { -webkit-background-clip: border-box !important; background-clip: border-box !important;
    --rail-edge: inset 0 0 0 1px var(--rail-edge-c) !important; --accent-edge: inset 0 0 0 1px var(--accent-edge-c) !important; --panel-edge: inset 0 0 0 1px var(--panel-edge-c) !important; --grey-btn-edge: inset 0 0 0 1px var(--grey-btn-edge-c) !important; }
.sq-round::before, .sq-round::after { display: none !important; }
.card { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); }
.row-swatch { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.meter { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.meter > span { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.flag { --sq-r: calc((2rem) * 1.3); }
.btn-primary, .btn-secondary, .btn-grey, .btn-danger { --sq-r: calc((2rem) * 1.3); }
.pill { --sq-r: calc((4rem) * 1.3); }
.btn-sm-outline { --sq-r: calc((2rem) * 1.3); }
.btn-icon-sm, .icon-btn { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.view-toggle { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.chip-toggle { --sq-r: calc((3rem) * 1.3); }
.error-msg { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.menu-pop { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); }
.menu-item { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.workspace { --sq-r: calc((var(--frame-r)) * 1.3); }
.proj-panel { --sq-r: calc((calc(var(--frame-r) - var(--frame-gap))) * 1.3); }
.proj-item { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.tab-track { --sq-r: calc((2rem) * 1.3); }
.tab-btn { --sq-r: calc((2rem) * 1.3); }
.tab-badge { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.status-note { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.kanban-column { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); }
.col-count { --sq-r: calc((2rem) * 1.3); }
.kanban-card { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.kanban-card { --sq-r: calc((2.1rem) * 1.3); }
.kanban-column { --sq-r: calc((2.9rem) * 1.3); }
.kanban-column .kanban-column-header { --sq-r: calc((2.1rem) * 1.3); --sq-edge: transparent; }
.badge { --sq-r: calc((2rem) * 1.3); }
.panel { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); }
.user-role-badge { --sq-r: calc((2rem) * 1.3); }
.choice-card { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); }
.choice-card.glow { --sq-edge: transparent; }
.copy-tile { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); }
.form-actions .btn-primary, .form-actions .btn-grey { --sq-r: calc((4rem) * 1.3); }
.cal-card { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); }
.cal-num { --sq-r: calc((2rem) * 1.3); }
.cal-bar { --sq-r: calc((calc(0.5rem * var(--sq))) * 1.3); }
.cal-key { --sq-r: calc((calc(0.3rem * var(--sq))) * 1.3); }
.mcp-new { --sq-r: calc((calc(2.4rem * var(--sq))) * 1.3); }
.stack-bar { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.legend i { --sq-r: calc((calc(0.25rem * var(--sq))) * 1.3); }
.gantt-popup { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.docs-layout { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.doc-attachment-row { --sq-r: calc((calc(8px * var(--sq))) * 1.3); }
.doc-att-badge { --sq-r: calc((calc(4px * var(--sq))) * 1.3); }
.tree-context-menu { --sq-r: calc((calc(12px * var(--sq))) * 1.3); --sq-edge: transparent; }
.tcm-item { --sq-r: calc((calc(8px * var(--sq))) * 1.3); }
.move-pick-item { --sq-r: calc((calc(8px * var(--sq))) * 1.3); }
.chat-layout { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.chat-bubble { --sq-r: calc((calc(16px * var(--sq))) * 1.3); }
.bs-layout { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.bs-tool-btn { --sq-r: calc((calc(8px * var(--sq))) * 1.3); }
.tab-btn.active, .view-toggle button.active { --sq-edge: var(--rail-edge-c); }
.card, .proj-panel, .panel, .choice-card, .kanban-card { --sq-edge: var(--panel-edge-c); }
.kanban-card { --sq-edge: var(--panel-edge-c); }
.kanban-card:hover { --sq-edge: var(--panel-edge-c); }
.workspace, .cal-card { --sq-edge: var(--panel-edge-c); }
.kanban-column { --sq-edge: var(--panel-edge-c); }
.btn-primary { --sq-edge: var(--rail-edge-c); }
.btn-secondary, .btn-grey, .chip-toggle { --sq-edge: var(--grey-btn-edge-c); }
.btn-danger { --sq-edge: transparent; }
.btn-primary:active, .btn-secondary:active, .btn-grey:active, .btn-danger:active, .tab-btn:active, .view-toggle button:active { --sq-edge: transparent; }
.view-toggle { --sq-r: calc((2rem) * 1.3); }
.view-toggle button { --sq-r: calc((2rem) * 1.3); }
.toggle-ink { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--rail-edge-c); }
.view-toggle.has-ink button.active, .view-toggle.has-ink button.active:hover { --sq-edge: transparent; }
.menu-pop, .tree-context-menu, .gantt-popup { --sq-edge: var(--panel-edge-c); }
.copy-tile { --sq-edge: var(--rail-edge-c); }
.proj-item.active { --sq-edge: transparent; }
body.light .proj-item.active { --sq-edge: transparent; }
.workspace.panel-collapsed .proj-panel { --sq-edge: transparent; }
.tab-ink { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--rail-edge-c); }
.tab-track.has-ink .tab-btn.active, .tab-track.has-ink .tab-btn.active:hover { --sq-edge: transparent; }
.proj-ink { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); --sq-edge: transparent; }
body.light .proj-ink { --sq-edge: transparent; }
.proj-list.has-ink .proj-item.active, .proj-list.has-ink .proj-item.active:hover { --sq-edge: transparent; }
.cal-frame .cal-card { --sq-r: calc((calc(var(--frame-r) - var(--frame-gap))) * 1.3); --sq-edge: var(--panel-edge-c); }
.inbox-tabs .tab-count, .inbox-unread { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.inbox-frame { --sq-r: calc((calc(1.6rem * var(--sq))) * 1.3); --sq-edge: var(--panel-edge-c); }
.inbox-item { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.inbox-thread { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); --sq-edge: var(--panel-edge-c); }
.inbox-ws .tab-count { --sq-r: calc((1rem) * 1.3); }
.chat-bubble { --sq-r: calc((calc(1.4rem * var(--sq))) * 1.3); }
.chat-text code { --sq-r: calc((calc(0.5rem * var(--sq))) * 1.3); }
.chat-file { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.chat-layout { --sq-edge: var(--panel-edge-c); }
.composer { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.composer:focus-within { --sq-edge: transparent; }
.composer-btn { --sq-r: calc((calc(0.4rem * var(--sq))) * 1.3); }
.composer-send { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); --sq-edge: var(--rail-edge-c); }
.composer-send:disabled { --sq-edge: transparent; }
.emoji-pop { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: var(--panel-edge-c); }
.emoji-pop button { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.po-cap { --sq-r: calc((2.3rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.po-chip { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--grey-btn-edge-c); }
.po-step-btn { --sq-r: calc((1.7rem) * 1.3); }
.proj-tag { --sq-r: calc((2rem) * 1.3); }
.proj-tag.ready { --sq-edge: transparent; }
.po-status { --sq-r: calc((1.7rem) * 1.3); --sq-edge: transparent; }
.intake-ws .tab-count { --sq-r: calc((calc(1rem * var(--sq))) * 1.3); }
.intake-reason.big { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.type-pill { --sq-r: calc((2rem) * 1.3); }
.intake-preview-wrap { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: var(--panel-edge-c); }
.intake-banner { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.intake-setup code { --sq-r: calc((calc(0.4rem * var(--sq))) * 1.3); }
.intake-banner.draft { --sq-edge: transparent; }
@media (prefers-reduced-motion: reduce) { .choice-card.glow { --sq-edge: var(--panel-edge-c); } }
.todo-new-list button { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); }
.todo-quick { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.todo-quick:focus-within { --sq-edge: transparent; }
.todo-count { --sq-r: calc((2rem) * 1.3); }
.todo-star { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-item { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.todo-item:hover { --sq-edge: var(--panel-edge-c); }
.todo-item.open { --sq-edge: transparent; }
.todo-sun { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-d-title { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-head-title { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-title-edit { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-step-del { --sq-r: calc((calc(0.4rem * var(--sq))) * 1.3); }
.todo-d-notes { --sq-r: calc((calc(0.8rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.todo-d-notes:focus { --sq-edge: transparent; }
.todo-d-notes.ro { --sq-edge: transparent; }
.todo-chip { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--grey-btn-edge-c); }
.todo-chip.ro { --sq-edge: transparent; }
.todo-pick-opt { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.todo-src { --sq-r: calc((2rem) * 1.3); }
.mention { --sq-r: calc((calc(0.4rem * var(--sq))) * 1.3); }
.mention-pop { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.mention-item { --sq-r: calc((calc(0.6rem * var(--sq))) * 1.3); }
.mention-row { --sq-r: calc((calc(1.2rem * var(--sq))) * 1.3); --sq-edge: transparent; }
.hm-card { --sq-r: calc((2.4rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.hm-count { --sq-r: calc((1.1rem) * 1.3); }
.hm-loading { --sq-r: calc((1.4rem) * 1.3); }
@media (min-width: 701px) { .cl-track .tab-btn, .cl-track .tab-btn:hover, .cl-track .tab-btn.active, .cl-track .tab-btn.active:hover { --sq-r: calc((0) * 1.3); --sq-edge: transparent; } }
.cl-site { --sq-r: calc((1.2rem) * 1.3); }
.cl-search { --sq-r: calc((2rem) * 1.3); }
.cl-badge { --sq-r: calc((1rem) * 1.3); }
.cl-dot { --sq-r: calc((1.2rem) * 1.3); }
.cl-stat { --sq-r: calc((1.8rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.cl-pill { --sq-r: calc((2rem) * 1.3); }
.cl-hpo { --sq-r: calc((1.2rem) * 1.3); }
.cl-nopo { --sq-r: calc((1.2rem) * 1.3); }
.cl-todo-chip { --sq-r: calc((2rem) * 1.3); }
.cl-card { --sq-r: calc((1.8rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.cl-step-chip { --sq-r: calc((1rem) * 1.3); }
@media (max-width: 699px) { .cl-dots button { --sq-r: calc((1rem) * 1.3); } }
@media (max-width: 699px) { .cl-col { --sq-r: calc((2.9rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 699px) { .cl-col-head { --sq-r: calc((2.1rem) * 1.3); --sq-edge: transparent; } }
@media (max-width: 699px) { .cl-tcard { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 699px) { .cl-eqm { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 699px) { .cl-eqm-chips span { --sq-r: calc((1.2rem) * 1.3); } }
@media (max-width: 699px) { .cl-svcc { --sq-r: calc((1.3rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 699px) { .cl-pcard { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 699px) { .cl-psteps span { --sq-r: calc((1.3rem) * 1.3); } }
@media (max-width: 699px) { .cl-psteps span.on { --sq-edge: var(--rail-edge-c); } }
@media (max-width: 699px) { .cl-hlist { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
.td-pill { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--rail-edge-c); }
.nx-res { --sq-r: calc((1.4rem) * 1.3); }
kbd { --sq-r: calc((0.6rem) * 1.3); }
.todo-item.kb-sel { --sq-edge: transparent; }
.nx-toast-act { --sq-r: calc((2rem) * 1.3); }
.hm-row { --sq-r: calc((1.4rem) * 1.3); }
.hm-chip { --sq-r: calc((1.2rem) * 1.3); }
.hm-link { --sq-r: calc((1.4rem) * 1.3); }
.hm-act { --sq-r: calc((1.4rem) * 1.3); }
.hm-tile { --sq-r: calc((1.4rem) * 1.3); --sq-edge: transparent; }
.hm-tile:hover { --sq-edge: transparent; }
.hm-tile.open { --sq-edge: transparent; }
.hm-orow { --sq-r: calc((1.4rem) * 1.3); }
.hm-prow { --sq-r: calc((1.4rem) * 1.3); }
.hm-fbar { --sq-r: calc((0.9rem) * 1.3); --sq-edge: transparent; }
.hm-fbar span { --sq-r: calc((0.9rem) * 1.3); }
.hm-bbar { --sq-r: calc((0.9rem) * 1.3); }
.hm-grid.editing .hm-tools { --sq-r: calc((2.2rem) * 1.3); --sq-edge: var(--panel-edge-c); }
.hm-grid.editing .hm-card { --sq-edge: var(--panel-edge-c); }
.hm-add { --sq-r: calc((2.4rem) * 1.3); --sq-edge: transparent; }
.hm-gallery-item { --sq-r: calc((2.6rem) * 1.3); }
@media (max-width: 700px) { .ph-sel { --sq-r: calc((2.55rem) * 1.3); } }
@media (max-width: 700px) { .ph-tb { --sq-r: calc((2.55rem) * 1.3); } }
@media (max-width: 700px) { .ph-plus-menu { --sq-r: calc((2.4rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 700px) { .ph-plus-menu button { --sq-r: calc((1.8rem) * 1.3); } }
@media (max-width: 700px) { #pageArea > .workspace { --sq-r: calc((0) * 1.3); --sq-edge: transparent; } }
@media (max-width: 700px) { #workspaceView .proj-panel, #pageArea > .todo-ws .proj-panel { --sq-r: calc((0 2.4rem 2.4rem 0) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 700px) { .ph-pill { --sq-r: calc((2.2rem) * 1.3); --sq-edge: var(--grey-btn-edge-c); } }
@media (max-width: 700px) { #workspaceView .tab-track, .todo-ws .ws-bar .view-toggle { --sq-edge: var(--panel-edge-c); } }
@media (max-width: 700px) { #workspaceView .tab-track { --sq-edge: transparent; } }
@media (max-width: 700px) { #workspaceView .tab-btn, .inbox-ws .tab-btn, .intake-ws .tab-btn, .cl-ws .tab-btn { --sq-edge: transparent; } }
@media (max-width: 700px) { .ph-switch-bg { --sq-r: calc((2.1rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 700px) { .ph-switch-bg span { --sq-r: calc((2rem) * 1.3); --sq-edge: var(--rail-edge-c); } }
@media (max-width: 700px) { .po-timeline { --sq-r: calc((2.2rem) * 1.3); --sq-edge: var(--panel-edge-c); } }
@media (max-width: 700px) { .po-cap { --sq-edge: transparent; } }
@media (max-width: 700px) { .po-step-btn { --sq-r: calc((1.7rem) * 1.3); --sq-edge: var(--grey-btn-edge-c); } }
@media (max-width: 700px) { .po-step.done .po-step-btn { --sq-edge: var(--rail-edge-c); } }
@media (max-width: 700px) { .intake-ws .proj-panel { --sq-r: calc((0) * 1.3); --sq-edge: transparent; } }
@media (max-width: 700px) { .intake-ws #intakeList .proj-item { --sq-r: calc((0) * 1.3); } }
@media (max-width: 700px) { .bs-layout { --sq-r: calc((2.4rem) * 1.3); } }
@media (max-width: 700px) { .inbox-ws .proj-panel { --sq-r: calc((0) * 1.3); --sq-edge: transparent; } }
@media (max-width: 700px) { .inbox-ws:not(.picked) #inboxList .proj-item.active { --sq-edge: transparent; } }
@media (max-width: 700px) { .inbox-ws #inboxList .proj-item { --sq-r: calc((0) * 1.3); } }
@media (max-width: 700px) { .inbox-thread, .chat-layout { --sq-r: calc((0) * 1.3); --sq-edge: transparent; } }
@media (max-width: 700px) { .composer { --sq-r: calc((2.1rem) * 1.3); } }
@media (max-width: 700px) { .todo-ws .todo-quick { --sq-edge: transparent; } }
@media (max-width: 700px) { .cal-pill { --sq-r: calc((1.8rem) * 1.3); --sq-edge: var(--grey-btn-edge-c); } }
@media (max-width: 700px) { .cal-pill.on { --sq-edge: var(--rail-edge-c); } }
@media (max-width: 700px) { .cpd-dots i.ev { --sq-edge: transparent; } }
@media (max-width: 700px) { .cal-ph-bar { --sq-r: calc((0.2rem) * 1.3); } }
/* ==== END SQUIRCLE LAYER ==== */

/* Squircle layer: hand-set values (kept by dev/squircle_gen.py) */
.workspace { --sq-r: 4.3rem; }                                       /* frame 3.3rem x 1.3 */
.proj-panel, .cal-frame .cal-card { --sq-r: 3.7rem; }                /* concentric: 4.3 - 0.6 gutter */
.kanban-column { --sq-r: 3.8rem; }
.kanban-card { --sq-r: 3rem; }                                       /* 3.8 - 0.8 */
.kanban-card:hover { --sq-edge: var(--accent); box-shadow: var(--panel-edge), var(--lift); }
.todo-quick { border-radius: 9999px; --sq-r: 9999px; }               /* the add field: a full capsule (Aaron, 29 Oct) */
.todo-quick:focus-within { --sq-edge: var(--accent); box-shadow: var(--pressed); }
@media (max-width: 700px) { #workspaceView { --sq-edge: transparent; --sq-r: 0px; } }   /* the phone has no page frame */
