/* loomlock tasks portal. A dense internal tool dressed in the Locky Design System (Locky Design System/readme.md):
   a blue header and title plates tiled with the padlock mark, and surfaces made like chunky plastic, each one a hard
   keyline, a shade band along its bottom edge and a hard drop with no blur. Gold is the action colour.
   Colours live in custom properties; night mode (data-theme="dark", set by theme.js) swaps them. No uppercase
   transforms anywhere: the brand stays lowercase. */

:root {
  --navy: #05083C; --cobalt: #2B35C6; --gold: #FCCE21; --paper: #ECEDFF;
  --gold-shade: #FFA600; --gold-tint: #FFF171; --blue-500: #3F49CC; --blue-600: #121B95; --blue-700: #121C66;
  /* Chip faces from the design system's rarity triples: bright in both themes, always with navy text and a keyline. */
  --face-blue: #61BAF7; --face-sky: #9FD8FF; --face-green: #68EE8F; --face-coral: #FF7A61; --face-gold: #FCCE21;
  --face-sand: #FFE799; --face-lav: #DADCF8; --face-grey: #D5D6DC; --face-ink: #05083C;

  --bg: #ECEDFF; --surface: #FFFFFF; --sunk: #F0F1FF; --raised: #FFFFFF; --tray: #E2E4FB;
  --ink: #05083C; --muted: #4D5285; --faint: #6B70A0;
  --line: #DCDFF5; --line-strong: #B9BEE8;
  --accent: #2B35C6; --accent-hover: #2029A8; --accent-ink: #FFFFFF; --accent-soft: #E3E5FF;
  --focus: #2B35C6;
  --top-bg: #121B95; --top-ink: #ECEDFF; --top-muted: #C3C7F2; --top-line: rgba(236, 237, 255, .14); --top-field: rgba(236, 237, 255, .1);

  /* Plastic: a keyline round the edge, a shade band inside the bottom, a tint band inside the top, a hard drop. */
  --keyline: #05083C; --shade: #E3E5FF; --tint: rgba(255, 255, 255, 0); --attn: #FFFAE3;
  --slab: inset 0 -4px 0 var(--shade), inset 0 2px 0 var(--tint), 0 3px 0 var(--keyline);
  --slab-s: inset 0 -3px 0 var(--shade), 0 2px 0 var(--keyline);
  --ground: url("/img/padlock-paper.svg") 0 0 / 90px 78px, var(--bg);
  --stage: url("/img/padlock-ink.svg") 0 0 / 90px 78px, linear-gradient(165deg, #3F49CC 0%, #2B35C6 40%, #1D26A3 100%);
  --hud: url("/img/padlock-ink.svg") 0 0 / 90px 78px, linear-gradient(180deg, #121B95 0%, #0D1477 100%);

  --todo-bg: #E8EAF7; --todo-ink: #383D6B; --todo-dot: #7B80B3;
  --doing-bg: #DFE2FF; --doing-ink: #1D26A3; --doing-dot: #2B35C6;
  --blocked-bg: #FFE5DF; --blocked-ink: #9E2510; --blocked-dot: #D9452A;
  --done-bg: #DCF2E5; --done-ink: #13603A; --done-dot: #1F9257;
  --dropped-bg: #EDEEF3; --dropped-ink: #5D6178; --dropped-dot: #9A9DB3;
  --warn-bg: #FFF3C9; --warn-ink: #6E4C00;
  --high-bg: #FFE98A; --high-ink: #4A3400;
  --ok-ink: #13603A;
  --danger: #B42318; --danger-bg: #FFE9E6;

  --shadow: 0 2px 0 rgba(5, 8, 60, .08);
  --shadow-lift: 0 3px 0 var(--keyline), 0 14px 32px rgba(5, 8, 60, .2);
  --radius: 16px; --radius-s: 10px;
  --font: "Montserrat", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Brandbook (Jan 2026): Baloo Bhaina 2 is the display face, for headlines and warm moments only. */
  --display: "Baloo Bhaina 2", "Montserrat", system-ui, sans-serif;
  /* Brandbook main blues, for anything new that needs a brand blue beside the Locky Design System's own. */
  --brand-300: #878EE5; --brand-400: #5F68D7; --brand-500: #3F49CC; --brand-600: #1D29C2; --brand-800: #121B95;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Night mode: theme.js sets data-theme on <html> from the header's moon button, or from the computer's setting. */
:root[data-theme="dark"] {
  --bg: #070B45; --surface: #10165C; --sunk: #0B1050; --raised: #161D6B; --tray: #0A0F4C;
  --ink: #ECEDFF; --muted: #AEB2DD; --faint: #8F94C6;
  --line: #232B7A; --line-strong: #3A44A0;
  --accent: #A2A9FF; --accent-hover: #BEC3FF; --accent-ink: #05083C; --accent-soft: #1B2286;
  --focus: #FCCE21;
  --top-bg: #0D1477; --top-line: rgba(236, 237, 255, .1);
  --keyline: #000000; --shade: rgba(0, 0, 0, .28); --tint: rgba(255, 255, 255, .07); --attn: #1C2163;
  --ground: url("/img/padlock-night.svg") 0 0 / 90px 78px, var(--bg);

  --todo-bg: #1C2266; --todo-ink: #CDD0F5; --todo-dot: #8D92CC;
  --doing-bg: #2B35C6; --doing-ink: #FFFFFF; --doing-dot: #8C94FF;
  --blocked-bg: #4D1B19; --blocked-ink: #FFB8AA; --blocked-dot: #FF7A61;
  --done-bg: #0F3D2A; --done-ink: #93E3B6; --done-dot: #45C27F;
  --dropped-bg: #171C55; --dropped-ink: #A3A7CF; --dropped-dot: #6A6FA3;
  --warn-bg: #3B3108; --warn-ink: #FCD757;
  --high-bg: #FCCE21; --high-ink: #05083C;
  --ok-ink: #93E3B6;
  --danger: #FF9585; --danger-bg: #3E1515;

  --shadow: 0 2px 0 rgba(0, 0, 0, .35);
  --shadow-lift: 0 3px 0 #000000, 0 14px 32px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 500 14px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 800; }
h3 { font-size: 14px; font-weight: 700; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .92em; background: var(--sunk); padding: 1px 5px; border-radius: 4px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
blockquote { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
.view h1[tabindex="-1"]:focus { outline: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 50; background: var(--gold); color: var(--navy); padding: 8px 12px; border-radius: var(--radius-s); font-weight: 700; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.pad { padding: 4px 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.auto-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.tk-peek-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12.5px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.label { font-size: 12px; font-weight: 600; color: var(--muted); }
.note { background: var(--accent-soft); border-radius: var(--radius-s); padding: 8px 12px; margin-bottom: 12px; }
.warn-text { color: var(--blocked-ink); font-weight: 700; }
.linkish { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ext { font-size: .9em; }
.noscript { padding: 24px 16px; text-align: center; }

/* ---------- shell: header, sidebar, phone tab bar */

/* Wide screens (900px and up): a sidebar down the left, tiled blue (the HUD), with the official loomlock mark, a Jump to
   field, the menu in labelled sections that fold, and who's signed in at the foot. Phones: a slim bar on top, a tab bar
   along the bottom (My work, Tasks, Inbox, Projects, Menu), and the same menu sliding in from the left. */
.top { background: var(--hud); color: var(--top-ink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 0 2px 0 var(--keyline); position: relative; z-index: 20; }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 10px 16px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.top :focus-visible { outline-color: var(--gold); }

.brand {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; color: #FFFFFF; text-decoration: none;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em;
}
.brand:hover { color: #FFFFFF; }
.brand-mark { width: 20px; height: 29px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .45)); transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover .brand-mark { transform: rotate(-6deg); }
.brand-name { text-shadow: 0 2px 0 #000000; }
.brand-bot { color: var(--gold); font-weight: 800; }
/* The running version beside the logo, linking to What's new; the gold dot means notes this browser hasn't opened. */
.brand-wrap { display: inline-flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
.brand-version {
  position: relative; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--top-line); background: var(--top-field);
  color: var(--top-muted); font-size: 11.5px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.brand-version:hover { color: var(--top-ink); border-color: var(--gold); }
.version-new { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 1.5px #000000; }

/* Jump to: a slot pressed into the HUD that opens the Jump to box (js/shell/jump.js). */
.jump {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 8px 0 11px; cursor: pointer; text-align: left;
  border-radius: var(--radius-s); border: 2px solid #000000; background: rgba(5, 8, 60, .55); color: var(--top-muted);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .12); font-weight: 600; font-size: 13.5px;
}
.jump:hover { color: #FFFFFF; }
.jump-text { flex: 1 1 auto; }
.jump-key { flex: none; padding: 1px 6px; border-radius: 6px; background: var(--top-field); border: 1px solid var(--top-line); color: var(--top-muted); font: 700 11px/1.5 var(--font); }
.top-jump, .panel-close {
  flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; cursor: pointer; border-radius: 999px;
  border: 2px solid #000000; background: var(--top-field); color: #FFFFFF; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3);
}

/* The menu: sections that fold, each link an icon and a name. The page you're on is a gold plastic chip. */
.nav { display: grid; gap: 6px; }
.nav-sec { display: grid; }
.nav-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px 4px; cursor: pointer; list-style: none;
  color: var(--top-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; border-radius: 8px;
}
.nav-sec-head::-webkit-details-marker { display: none; }
.nav-sec-head::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.nav-sec:not([open]) > .nav-sec-head::after { transform: rotate(-45deg); }
.nav-sec-head:hover { color: #FFFFFF; }
.nav-sec-list { display: grid; gap: 2px; padding-bottom: 4px; }
.nav a, .nav-foot a {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 5px 10px; border-radius: var(--radius-s);
  color: var(--top-ink); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.nav a .icon, .nav-foot a .icon { color: var(--top-muted); }
.nav a:hover, .nav-foot a:hover { color: #FFFFFF; background: var(--top-field); }
.nav a:hover .icon { color: #FFFFFF; }
.nav-label { display: inline-flex; align-items: center; gap: 5px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav a[aria-current="page"], .nav-foot a[aria-current="page"] {
  color: var(--navy); background: var(--gold);
  box-shadow: 0 0 0 2px #000000, inset 0 -3px 0 var(--gold-shade), inset 0 2px 0 var(--gold-tint), 0 3px 0 #000000;
}
.nav a[aria-current="page"] .icon, .nav-foot a[aria-current="page"] .icon { color: var(--navy); }
.nav a[aria-current="page"] .badge { background: var(--navy); color: var(--gold); }
/* A folded section that holds the page you're on shows a gold dot by its name. */
.nav-sec.has-current:not([open]) > .nav-sec-head > span::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 999px; background: var(--gold); vertical-align: middle; }
/* Role-only sections keep their label and coloured edge (user, 6 Nov): sky for leads, coral for admins. */
.nav-section { --section-face: var(--face-sky); margin-top: 4px; padding: 6px 0 0 6px; border-top: 2px solid var(--top-line); box-shadow: inset 3px 0 0 var(--section-face); }
.nav-admin { --section-face: var(--face-coral); }
.nav-superadmin { --section-face: var(--face-gold); }
.nav-section > .nav-sec-head { color: var(--section-face); }
.nav-section > .nav-sec-head > span { display: inline-flex; align-items: center; gap: 6px; }
.nav-section > .nav-sec-head > span::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--section-face); box-shadow: 0 0 0 1.5px #000000; }
.nav-plus { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 999px; background: var(--face-sky); color: var(--face-ink); font-size: 11px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 1.5px #000000; }
.nav-key { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; padding: 8px 10px 0; border-top: 2px solid var(--top-line); color: var(--top-muted); font-size: 11.5px; font-weight: 700; }
.nav-own-note { margin: 0 10px 6px 37px; font-size: 11.5px; color: var(--top-muted); }
.badge { display: inline-flex; flex: none; min-width: 19px; height: 19px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800; box-shadow: 0 0 0 1.5px #000000, inset 0 -2px 0 var(--gold-shade); }
.badge[hidden] { display: none; }

/* The foot: Start here, What's new and Settings, then who's signed in. */
.nav-foot { display: grid; gap: 10px; padding-top: 10px; border-top: 2px solid var(--top-line); }
.nav-foot-links { display: grid; gap: 2px; }
.nav-foot a { min-height: 30px; padding-block: 3px; font-size: 13px; font-weight: 600; color: var(--top-muted); }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--top-muted); }
.me-avatar {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--face-sky); color: var(--navy);
  font-weight: 800; font-size: 12.5px; box-shadow: 0 0 0 2px #000000, inset 0 -3px 0 rgba(5, 8, 60, .18);
}
.me-who { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; justify-items: start; }
.me-name { color: #FFFFFF; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.me form { margin: 0; }
.me > .me-name { min-width: 0; }
@media (max-width: 560px) { body:not(.has-nav) .brand-version { display: none; } }
.btn-link { background: none; border: 0; padding: 4px 2px; white-space: nowrap; color: var(--top-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-weight: 600; }
.btn-link:hover { color: #FFFFFF; }
/* The moon: a dark slot when night mode is off, a gold plastic chip when it's on. */
.night-toggle {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; cursor: pointer;
  border-radius: 999px; border: 2px solid #000000; background: var(--top-field); color: var(--top-muted);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3);
}
.night-toggle:hover { color: #FFFFFF; }
.night-toggle[aria-pressed="true"] { background: var(--gold); color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold-shade), 0 2px 0 #000000; }
.night-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.top .chip { --keyline: #000000; }
.me .chip { font-size: 10.5px; padding: 0 6px; min-height: 18px; }
.chip-dev { background: var(--gold); color: var(--navy); }

.nav-panel-head { display: none; }
.scrim, .tabs { display: none; }

/* Wide: the sidebar. */
@media (min-width: 900px) {
  body.has-nav { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
  body.has-nav .top {
    position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--top-line) transparent;
    border-right: 2px solid var(--keyline); box-shadow: inset -4px 0 0 rgba(0, 0, 0, .22), 2px 0 0 var(--keyline);
  }
  body.has-nav .top-inner { display: flex; flex-direction: column; gap: 12px; min-height: 100%; max-width: none; padding: 16px 12px 14px; }
  body.has-nav .top-row { padding: 2px 4px 2px; }
  body.has-nav .brand-wrap { flex: 1 1 auto; flex-wrap: wrap; row-gap: 4px; }
  body.has-nav .top-jump { display: none; }
  body.has-nav .nav-panel { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
  body.has-nav .nav-foot { margin-top: auto; }
  body.has-nav main { min-width: 0; }
  /* Signed out, or setting up two-step: just the bar across the top. */
  body:not(.has-nav) .top-inner { display: flex; }
}
/* Tall enough: the foot (Start here, What's new, Settings, Sign out) stays in view and the menu above it scrolls. */
@media (min-width: 900px) and (min-height: 520px) {
  body.has-nav .top { overflow: hidden; }
  body.has-nav .top-inner { height: 100%; min-height: 0; }
  body.has-nav .nav-panel { min-height: 0; }
  body.has-nav .nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px 4px;
    scrollbar-width: thin; scrollbar-color: var(--top-line) transparent;
  }
  body.has-nav .nav-foot { flex: none; }
}

/* Phone and small tablet: a slim bar on top, a tab bar at the bottom, the menu slides in. */
@media (max-width: 899px) {
  body.has-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .top { position: sticky; top: 0; }
  .top-inner { padding: 8px 12px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 17px; height: 25px; }
  .brand-version { padding: 0 6px; font-size: 10.5px; }
  .nav-panel {
    position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); display: flex; flex-direction: column; gap: 12px;
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
    background: var(--hud); border-right: 2px solid #000000; box-shadow: 4px 0 0 #000000, 0 0 40px rgba(0, 0, 0, .4);
    transform: translateX(-105%); visibility: hidden; transition: transform .22s cubic-bezier(.2, .8, .3, 1), visibility 0s .22s;
  }
  body.menu-open .nav-panel { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2, .8, .3, 1); }
  .nav-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 0 6px; color: #FFFFFF; font-weight: 800; font-size: 17px; }
  .nav-foot { margin-top: auto; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5, 8, 60, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  body.has-nav .tabs {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--hud); border-top: 2px solid #000000; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08);
  }
  .tabs .tab {
    position: relative; display: grid; justify-items: center; gap: 2px; min-height: 50px; padding: 4px 2px 2px; border: 0; border-radius: 12px; background: none; cursor: pointer;
    color: var(--top-muted); text-decoration: none; font: 700 11px/1.2 var(--font);
  }
  .tabs .tab .nav-label { flex: none; justify-content: center; }
  .tabs .tab .nav-plus, .tabs .tab .sr-only + .badge { display: none; }
  .tabs .tab .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; }
  .tabs .tab:hover, .tabs .tab[aria-current="page"], .tabs .tab-menu.has-current, .tabs .tab-menu[aria-expanded="true"] { color: #FFFFFF; }
  .tabs .tab[aria-current="page"] .icon, .tabs .tab-menu.has-current .icon {
    width: 42px; height: 26px; padding: 3px 11px; border-radius: 999px; color: var(--navy); background: var(--gold); fill: none;
    box-shadow: 0 0 0 2px #000000, inset 0 -2px 0 var(--gold-shade);
  }
}
@media (prefers-reduced-motion: reduce) { .nav-panel, .scrim { transition: none !important; } }

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

main { display: block; }
.view { max-width: 1320px; margin: 0 auto; padding: 16px 16px 56px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 260px; }
.page-head h1 { overflow-wrap: anywhere; }
.sub { color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* Each page's title sits on a plate: the blue stage tiled with the padlock mark, in a keyline, with a hard drop.
   Its text, links and quiet buttons turn light; the plastic buttons and chips on it keep their own faces. */
.view > .page-head, .task-head {
  position: relative; margin-bottom: 16px; padding: 14px 20px 16px; border: 2px solid var(--keyline); border-radius: 18px;
  background: var(--stage); color: #FFFFFF;
  box-shadow: inset 0 -5px 0 rgba(5, 8, 60, .35), inset 0 3px 0 rgba(255, 255, 255, .16), 0 4px 0 var(--keyline);
}
.view > .page-head { align-items: center; min-height: 72px; }
.view > .page-head h1, .task-head h1 { font-family: var(--display); font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 3px 0 rgba(0, 0, 0, .55); padding-top: 4px; }
.view > .page-head .sub, .task-head .sub { color: #DADCF8; font-weight: 600; margin-top: 6px; }
:is(.view > .page-head, .task-head) :is(.muted, .hint, .label) { color: #C9CCF4; }
:is(.view > .page-head, .task-head) a:not(.btn) { color: var(--gold); }
:is(.view > .page-head, .task-head) .btn-ghost { color: #ECEDFF; }
:is(.view > .page-head, .task-head) .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
:is(.view > .page-head, .task-head) :focus-visible { outline-color: var(--gold); }
/* Locky stands on the plate's bottom edge on the top-level pages, one pose for what the page is about (app.js sets
   data-page from the menu). Detail pages start with breadcrumbs, so the pose never shows there. */
.view > .page-head:first-child::after {
  content: ""; flex: none; align-self: flex-end; width: 92px; height: 92px; margin: -40px -4px -16px 4px;
  background: var(--locky, none) center bottom / auto 92% no-repeat, radial-gradient(closest-side, rgba(252, 206, 33, .5), rgba(252, 206, 33, 0)) 50% 62% / 100% 84% no-repeat;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .3));
  display: var(--locky-shows, none);
}
.view[data-page="my"], .view[data-page="start"] { --locky: url("/img/locky-wave.png"); --locky-shows: block; }
.view[data-page="projects"], .view[data-page="workload"], .view[data-page="bounties"] { --locky: url("/img/locky-box.png"); --locky-shows: block; }
.view[data-page="lessons"] { --locky: url("/img/locky-study.png"); --locky-shows: block; }
.view[data-page="checkins"] { --locky: url("/img/locky-zen.png"); --locky-shows: block; }
.view[data-page="spaces"], .view[data-page="people"], .view[data-page="groups"] { --locky: url("/img/locky-friends.png"); --locky-shows: block; }
.view[data-page="inbox"] { --locky: url("/img/locky-read.png"); --locky-shows: block; }
.view[data-page="board"] { --locky: url("/img/locky-run.png"); --locky-shows: block; }
.view[data-page="meetings"], .view[data-page="requests"] { --locky: url("/img/locky-pencil.png"); --locky-shows: block; }
.view[data-page="events"] { --locky: url("/img/locky-balloon.png"); --locky-shows: block; }
.view[data-page="health"] { --locky: url("/img/locky-check.png"); --locky-shows: block; }
.view[data-page="sign-ins"] { --locky: url("/img/locky-shield.png"); --locky-shows: block; }
@media (max-width: 719px) {
  .view > .page-head, .task-head { padding: 16px 16px 18px; border-radius: var(--radius); }
  .view > .page-head { min-height: 0; }
  .view > .page-head h1, .task-head h1 { font-size: 25px; }
  .view > .page-head:first-child::after { display: none; }
}

.split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; align-content: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
  .split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 16px; }
}
.split.even { margin-bottom: 16px; }

/* My work as a dashboard: a row of counts, tighter panels, and a narrow side column. */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dash-tile {
  display: flex; align-items: baseline; gap: 8px; width: 100%; height: 100%; padding: 7px 12px 9px; text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); color: var(--ink); text-decoration: none; border: 2px solid var(--keyline); border-radius: var(--radius-s); box-shadow: var(--slab-s);
}
.dash-tile:hover { background: var(--sunk); color: var(--ink); }
.dash-tile:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--shade); }
.dash-num { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1; padding-top: 3px; font-variant-numeric: tabular-nums; }
.dash-label { font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.dash-tile.is-zero { box-shadow: none; border-color: var(--line-strong); background: transparent; }
.dash-tile.is-zero .dash-num { color: var(--faint); }
.dash-tile.is-attn { background: var(--attn); box-shadow: inset 0 3px 0 var(--gold), var(--slab-s); }
@media (max-width: 560px) {
  .dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .dash-tile { flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px 7px; }
  .dash-num { font-size: 20px; }
  .dash-label { font-size: 11.5px; overflow-wrap: anywhere; }
}
.split-dash > .stack { gap: 12px; }
.split-dash .panel { padding: 12px 14px 12px; }
.split-dash .panel-attn { padding-top: 16px; }
@media (min-width: 960px) { .split.split-dash { grid-template-columns: minmax(0, 1fr) minmax(220px, 264px); gap: 14px; } }
@media (min-width: 960px) { .split:not(.even) > * + * .row2 { grid-template-columns: minmax(0, 1fr); } }
.dash-group + .dash-group { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.dash-sub { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 13.5px; color: var(--muted); }
.dash-group-attn { margin: -4px -8px 0; padding: 8px 8px 4px; border-radius: var(--radius-s); background: var(--attn); box-shadow: inset 0 3px 0 var(--gold); }
.dash-group-attn .dash-sub { color: var(--ink); }
.dash-more { margin: 4px 0 0; }
/* The quick add is a button until it's opened; the form's own heading is the button's job. */
.quick-add > summary { list-style: none; width: 100%; justify-content: center; }
.quick-add > summary::-webkit-details-marker { display: none; }
.quick-add[open] > summary { margin-bottom: 10px; }
.quick-add .panel-head { display: none; }
/* On phones the task's owner, due date and project come before the long sections. */
@media (max-width: 959px) { .task-split > aside { order: -1; } }

.panel { background: var(--surface); border: 2px solid var(--keyline); border-radius: var(--radius); padding: 14px 16px 16px; box-shadow: var(--slab); min-width: 0; }
.panel + .panel { margin-top: 0; }
.view > .panel, .view > details.panel { margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: -.01em; }
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--face-lav); color: var(--face-ink); font-size: 11.5px; font-weight: 800; box-shadow: 0 0 0 1.5px var(--keyline), inset 0 -2px 0 rgba(5, 8, 60, .14);
}
.panel-note { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
/* Something waiting on you: a gold band across the top of the slab. */
.panel-attn { background: var(--attn); box-shadow: inset 0 6px 0 var(--gold), var(--slab); padding-top: 18px; }
.panel-muted { background: var(--sunk); border: 2px dashed var(--line-strong); box-shadow: none; }

details.disclosure > summary { cursor: pointer; font-weight: 800; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--gold); color: var(--navy); font-weight: 800;
  box-shadow: 0 0 0 1.5px var(--keyline), inset 0 -2px 0 var(--gold-shade), inset 0 2px 0 var(--gold-tint), 0 2px 0 var(--keyline);
}
details.disclosure[open] > summary::before { content: "−"; }
details.disclosure[open] > summary { margin-bottom: 12px; }

/* ---------- buttons */

/* Plastic buttons: a press drops the slab onto its shadow, flat and instant. Gold is the action. */
.btn {
  --btn-face: var(--raised); --btn-shade: var(--shade); --btn-tint: var(--tint); --btn-drop: 2px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 15px;
  border-radius: var(--radius-s); border: 2px solid var(--keyline); background: var(--btn-face); color: var(--ink);
  font-weight: 700; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 -3px 0 var(--btn-shade), inset 0 2px 0 var(--btn-tint), 0 var(--btn-drop) 0 var(--keyline);
  transition: transform 80ms cubic-bezier(.2, .8, .3, 1), box-shadow 80ms cubic-bezier(.2, .8, .3, 1);
}
.btn:hover { color: var(--ink); }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 -3px 0 var(--btn-shade), inset 0 2px 0 var(--btn-tint), 0 calc(var(--btn-drop) + 1px) 0 var(--keyline); }
.btn:active:not(:disabled) { transform: translateY(var(--btn-drop)); box-shadow: inset 0 -1px 0 var(--btn-shade), 0 0 0 var(--keyline); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-primary { --btn-face: var(--gold); --btn-shade: var(--gold-shade); --btn-tint: var(--gold-tint); color: var(--navy); }
.btn-primary:hover { color: var(--navy); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--sunk); border-color: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled), .btn-ghost:active:not(:disabled) { transform: none; box-shadow: none; }
.btn-danger { --btn-face: #D42A44; --btn-shade: #AC000E; --btn-tint: #FF6B7E; color: #FFFFFF; }
.btn-danger:hover { color: #FFFFFF; }
.btn-small { --btn-drop: 2px; min-height: 30px; padding: 3px 11px; font-size: 12.5px; border-width: 1.5px; border-radius: 9px; box-shadow: inset 0 -2px 0 var(--btn-shade), inset 0 2px 0 var(--btn-tint), 0 var(--btn-drop) 0 var(--keyline); }
.btn-small.btn-ghost { box-shadow: none; }

/* ---------- forms */

input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="date"], input:not([type]), select, textarea {
  width: 100%; min-height: 38px; padding: 6px 11px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--raised); color: var(--ink); min-width: 0; box-shadow: inset 0 2px 0 rgba(5, 8, 60, .05);
}
textarea { resize: vertical; line-height: 1.45; }
select { padding-right: 28px; }
input:hover:not(:disabled, :focus-visible), select:hover:not(:disabled, :focus-visible), textarea:hover:not(:disabled, :focus-visible) { border-color: var(--faint); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input:disabled, select:disabled, textarea:disabled { opacity: .7; }
input[readonly] { background: var(--sunk); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
::placeholder { color: var(--faint); opacity: 1; }

.form-body { display: grid; gap: 10px; min-width: 0; }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field > label, .field > .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field > p:not(.hint) { font-weight: 600; }
.field.check { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 36px; }
.field.check label { color: var(--ink); font-size: 13.5px; }
.row2 { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row3 { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row3 .span2 { grid-column: span 2; }
}
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.form-error { color: var(--danger); font-weight: 600; font-size: 13px; }
.form-error:empty { display: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 10px; }
.toolbar .field { flex: 1 1 150px; }
.toolbar .field.grow { flex: 3 1 220px; }
.toolbar .field.check { flex: 0 0 auto; }
.toolbar-inline { margin-bottom: 12px; }

.seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--keyline); border-radius: var(--radius-s); overflow: hidden; background: var(--raised); box-shadow: 0 2px 0 var(--keyline); }
.seg-btn { border: 0; border-right: 1.5px solid var(--line); background: transparent; padding: 6px 13px; min-height: 34px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.seg-btn[aria-pressed="true"] { --seg-face: var(--cobalt); --seg-shade: #1D26A3; background: var(--seg-face); color: #FFFFFF; box-shadow: inset 0 -3px 0 var(--seg-shade), inset 0 2px 0 rgba(255, 255, 255, .22); }
.seg-btn:disabled { cursor: not-allowed; }
.seg-btn:disabled[aria-pressed="false"] { opacity: .5; }
.seg-btn:focus-visible { outline-offset: -3px; }
.seg-btn.seg-blocked[aria-pressed="true"] { --seg-face: var(--face-coral); --seg-shade: #D9452A; color: var(--face-ink); }
.seg-btn.seg-done[aria-pressed="true"] { --seg-face: var(--face-green); --seg-shade: #1DB267; color: var(--face-ink); }
.seg-btn.seg-dropped[aria-pressed="true"] { --seg-face: var(--face-grey); --seg-shade: #A9AAB1; color: var(--face-ink); }
.seg-btn.seg-todo[aria-pressed="true"] { --seg-face: var(--face-lav); --seg-shade: #B3B6E4; color: var(--face-ink); }
.seg-btn.seg-doing[aria-pressed="true"] { --seg-face: var(--face-blue); --seg-shade: #1D77B2; color: var(--face-ink); }

/* ---------- chips and flags */

/* Chips are little badges from the design system: a bright face, navy text, a keyline and a shade band. Every tone
   keeps its words, so colour never carries the meaning alone. */
.chip {
  --chip-face: var(--face-lav);
  display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; border: 1.5px solid var(--keyline);
  background: var(--chip-face); color: var(--face-ink); box-shadow: inset 0 -2px 0 rgba(5, 8, 60, .16);
  font-size: 11.5px; font-weight: 800; line-height: 18px; white-space: nowrap; vertical-align: middle;
}
.chip-plain, .chip-s-todo, .chip-p-normal, .chip-state-quiet, .chip-kind-update_task, .chip-conf-medium { --chip-face: var(--face-lav); }
.chip-s-doing, .chip-kind-new_task { --chip-face: var(--face-blue); }
.chip-s-blocked, .chip-blocked { --chip-face: var(--face-coral); }
.chip-s-done, .chip-state-active, .chip-kind-decision, .chip-conf-high, .chip-ok { --chip-face: var(--face-green); }
.chip-s-dropped, .chip-state-done { --chip-face: var(--face-grey); }
.chip-s-dropped { text-decoration: line-through; }
.chip-p-high, .chip-role-admin, .chip-dev { --chip-face: var(--face-gold); }
.chip-p-low { --chip-face: #FFFFFF; }
.chip-state-paused, .chip-warn { --chip-face: var(--face-sand); }
.chip-state-idea, .chip-kind-project, .chip-role-lead { --chip-face: var(--face-sky); }
.chip-conf-low { --chip-face: #FFFFFF; border-style: dashed; }
.top .chip-role-lead { --chip-face: var(--face-lav); }

.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.flag-overdue { color: var(--blocked-ink); background: var(--blocked-bg); padding: 0 7px; border-radius: 999px; font-weight: 700; }
.flag-soon { color: var(--warn-ink); background: var(--warn-bg); padding: 0 7px; border-radius: 999px; font-weight: 700; }
.flag-stale { color: var(--muted); font-style: italic; }
.flag-pending { color: var(--warn-ink); }
.flag-declined { color: var(--blocked-ink); }
.flag-count { color: var(--faint); }
.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.key { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---------- task lists */

.task-list { display: grid; }
.task-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--line); border-radius: var(--radius-s); min-width: 0; transition: background .12s ease; }
.task-row:hover { background: var(--sunk); }
.task-row:first-child { border-top: 0; }
.task-row-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.task-link { display: flex; gap: 8px; align-items: baseline; color: var(--ink); text-decoration: none; min-width: 0; }
.task-link:hover .task-title { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-row.s-done .task-title, .task-row.s-dropped .task-title { color: var(--muted); }
.task-row-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: none; max-width: 45%; }
.waiting-on { font-size: 12.5px; color: var(--blocked-ink); overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.row-actions .muted { font-size: 12.5px; margin-right: auto; }
.declined-note { font-size: 12.5px; color: var(--blocked-ink); overflow-wrap: anywhere; }
.task-list.compact .task-row { padding: 7px 0; }

/* ---------- board */

.board-summary { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
/* position: relative keeps absolutely placed screen-reader text inside the scroller, or it widens the page on phones. */
.board {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.board-empty { grid-column: 1 / -1; }
/* Columns are trays pressed into the page; cards are small plastic slabs that lift when you reach for them. */
.col { background: var(--tray); border: 1.5px solid var(--line-strong); border-radius: 18px; padding: 10px; min-height: 240px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: inset 0 3px 0 rgba(5, 8, 60, .06); }
.col.over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.col-head h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1.5px solid var(--keyline); }
.dot-todo { background: var(--face-lav); } .dot-doing { background: var(--face-blue); } .dot-blocked { background: var(--face-coral); } .dot-done { background: var(--face-green); }
.col-note { font-size: 12px; color: var(--muted); padding: 0 4px; margin-top: -6px; }
.col-list { display: grid; gap: 10px; }
.col-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 24px 8px; border: 2px dashed var(--line-strong); border-radius: 12px; }
.card {
  position: relative; background: var(--surface); border: 1.5px solid var(--keyline); border-radius: 12px; padding: 10px 11px 11px; box-shadow: var(--slab-s);
  display: grid; gap: 5px; cursor: grab; min-width: 0; transition: box-shadow 80ms ease, transform 80ms ease;
}
.card:hover { transform: translateY(-1px); box-shadow: inset 0 -3px 0 var(--shade), 0 3px 0 var(--keyline); }
.card.dragging { opacity: .5; transform: rotate(1deg); }
.card-high { box-shadow: inset 0 4px 0 var(--gold), var(--slab-s); padding-top: 13px; }
.card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-top .key { text-decoration: none; }
.card-project { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.card-title { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; line-height: 1.35; }
.card-title:hover { color: var(--accent); text-decoration: underline; }
.card.s-done .card-title { color: var(--muted); }
.card-foot { display: flex; justify-content: flex-end; }
.card-move { width: auto; min-height: 28px; padding: 2px 26px 2px 8px; font-size: 12.5px; font-weight: 600; }

/* ---------- stat tiles and lists */

.stat { background: var(--sunk); border-radius: var(--radius-s); padding: 6px 9px 7px; min-width: 0; box-shadow: inset 0 -2px 0 var(--line); }
.stat dt { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat dd { margin: 0; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-blocked { background: var(--blocked-bg); } .stat-blocked dd, .stat-blocked dt { color: var(--blocked-ink); }
.stat-stale { background: var(--todo-bg); }
.stat-warn { background: var(--warn-bg); } .stat-warn dd, .stat-warn dt { color: var(--warn-ink); }

.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 5px; }
.timeline li { position: relative; padding: 0 0 12px 14px; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--keyline); }
.timeline time { font-size: 12px; font-weight: 700; color: var(--muted); }
.plain-list { display: grid; }
.plain-list li { padding: 7px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.plain-list li:first-child { border-top: 0; }
.activity { display: grid; }
.activity li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: 13px; }
.activity li:first-child { border-top: 0; }
.activity-meta { font-size: 12px; color: var(--muted); }

/* ---------- task page */

.task-head { display: grid; gap: 10px; }
.task-head .page-head { margin-bottom: 0; align-items: center; }
.task-head .page-head h1 { flex: 1 1 320px; min-width: 0; }
.task-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.key-chip { font-family: var(--mono); font-weight: 700; font-size: 13px; background: #FFFFFF; color: var(--navy); padding: 1px 8px; border-radius: 7px; border: 1.5px solid var(--keyline); box-shadow: 0 2px 0 var(--keyline); }
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.status-bar .hint { flex-basis: 100%; margin: 0; }
.status-bar .seg { max-width: 100%; }
.status-bar .seg-btn { flex: 1 0 auto; }
.task-head .seg { --keyline: #000000; }
.task-head .flag-stale, .task-head .flag-count, .task-head .flag { color: #DADCF8; }
.task-head :is(.flag-overdue, .flag-soon) { color: var(--face-ink); background: var(--face-sand); }
.task-head .flag-overdue { background: var(--face-coral); }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 11px 16px; border-radius: 14px; margin-bottom: 14px; border: 2px solid var(--keyline); box-shadow: inset 0 -3px 0 rgba(5, 8, 60, .1), 0 3px 0 var(--keyline); overflow-wrap: anywhere; }
.banner p { flex: 1 1 260px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner-attn { background: var(--high-bg); color: var(--high-ink); }
.banner-info { background: var(--accent-soft); color: var(--ink); }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner-blocked { background: var(--blocked-bg); color: var(--blocked-ink); }
.edit-task { margin-bottom: 16px; }

.facts { display: grid; gap: 4px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.fact dt { color: var(--muted); }
.fact dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.sources { display: grid; gap: 10px; }
.source-line { display: flex; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.evidence { border-left: 3px solid var(--line-strong); padding: 4px 10px; color: var(--muted); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; display: grid; gap: 2px; }
.evidence .label { font-size: 11.5px; }

.comments { display: grid; gap: 12px; margin-bottom: 12px; }
.comments li { display: grid; gap: 3px; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.comment-head time { font-size: 12px; }
.comment-form { display: grid; gap: 8px; }

.dropzone { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); transition: background .15s ease, border-color .15s ease; }
.dropzone.dropping { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.uploads { display: grid; gap: 6px; margin-top: 8px; }
.uploads:empty { display: none; }
.upload { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; align-items: center; gap: 10px; font-size: 13px; }
.upload .form-error { grid-column: 1 / -1; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload progress { width: 100%; accent-color: var(--accent); }
.files { display: grid; margin-top: 10px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.files li:first-child { border-top: 0; }
.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--sunk); flex: none; }
.thumb-file { display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); }
.file-main { flex: 1; min-width: 0; }
.file-main a { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- people */

.people { display: grid; gap: 12px; }
.person { background: var(--surface); border: 2px solid var(--keyline); border-radius: var(--radius); padding: 12px 16px 14px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); box-shadow: var(--slab); }
@media (min-width: 720px) { .person { grid-template-columns: minmax(0, 1fr) auto; } .person .manage { grid-column: 1 / -1; } }
.person-main { display: grid; gap: 4px; min-width: 0; }
.person-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.person-stats { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; font-weight: 600; }
@media (min-width: 720px) { .person-stats { align-items: flex-end; } }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags li { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); font-weight: 600; }
.manage > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent); width: max-content; }
.manage[open] > summary { margin-bottom: 10px; }
.manage .form-body { padding: 12px; background: var(--sunk); border-radius: var(--radius-s); }
.login-link { display: grid; gap: 4px; }
.login-link:empty { display: none; }
.copy-row { display: flex; gap: 8px; min-width: 0; }
.copy-row input { flex: 1; font-size: 12.5px; }

/* ---------- meetings */

.meeting-list { display: grid; padding: 4px 14px; }
.meeting-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.meeting-list li:first-child { border-top: 0; }
.meeting-date { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 1px; }
.meeting-main { display: grid; gap: 3px; min-width: 0; }
.meeting-title { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.meeting-title:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 600px) {
  .meeting-list li { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- inbox */

.drafts { display: grid; gap: 10px; }
.draft { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 10px; background: var(--raised); min-width: 0; }
.draft.conf-high { border-left: 3px solid var(--done-dot); }
.draft.conf-low { border-left: 3px dashed var(--blocked-dot); }
.draft-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.draft-target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.draft-done { background: var(--sunk); }
.draft-done .form-body, .draft-done .evidence { opacity: .6; }
.draft-result { font-weight: 700; color: var(--ok-ink); }
/* Questions people asked the bot (inbox-asks.js): the question and answer read as the message, not as a footnote. */
.ask-task { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 500; }
.ask .ask-question, .ask .ask-answer { color: var(--ink); font-size: 13.5px; }
.ask .ask-answer { border-left-color: var(--done-dot); }

/* ---------- health */

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
/* Number tiles: a slab whose top band says what kind of number it is. */
.tile { --tile-band: var(--face-lav); background: var(--surface); border: 2px solid var(--keyline); border-radius: 14px; box-shadow: inset 0 5px 0 var(--tile-band), var(--slab); min-width: 0; transition: transform 80ms ease, box-shadow 80ms ease; }
.tile > a, .tile { color: var(--ink); text-decoration: none; }
.tile > a, .tile:not(:has(a)) { display: grid; gap: 2px; padding: 14px 12px 12px; }
.tile:has(> a:hover) { transform: translateY(-1px); box-shadow: inset 0 5px 0 var(--tile-band), inset 0 -4px 0 var(--shade), 0 4px 0 var(--keyline); }
.tile-n { font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile-blocked { --tile-band: var(--face-coral); } .tile-blocked .tile-n { color: var(--blocked-ink); }
.tile-warn { --tile-band: var(--gold); } .tile-warn .tile-n { color: var(--warn-ink); }
.tile-stale .tile-n { color: var(--muted); }
.tile-ok { --tile-band: var(--face-green); } .tile-ok .tile-n { color: var(--ok-ink); }
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.table thead th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 700; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.weak-spots { display: grid; gap: 10px; }
.weak-spot { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 6px; overflow-wrap: anywhere; }
.weak-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.evidence-list { display: grid; gap: 3px; font-size: 12.5px; padding-left: 14px; list-style: disc; color: var(--muted); }

/* ---------- empty, loading, errors */

.empty { display: flex; align-items: center; gap: 16px; padding: 12px 4px; }
.empty .locky { width: 76px; height: auto; flex: none; filter: drop-shadow(0 3px 0 rgba(5, 8, 60, .12)); }
.empty-title { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.empty .btn { margin-top: 10px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; padding: 40px 16px; max-width: 1320px; margin: 0 auto; }
/* The loading mark is a little padlock whose shackle lifts and drops. */
.spinner { position: relative; flex: none; width: 18px; height: 14px; margin-top: 8px; border-radius: 4px; background: var(--gold); box-shadow: 0 0 0 1.5px var(--keyline), inset 0 -2px 0 var(--gold-shade); }
.spinner::before {
  content: ""; position: absolute; left: 3px; bottom: calc(100% + 1px); width: 12px; height: 9px; box-sizing: border-box;
  border: 2.5px solid var(--keyline); border-bottom: 0; border-radius: 7px 7px 0 0; animation: shackle .9s cubic-bezier(.34, 1.56, .64, 1) infinite alternate;
}
@keyframes shackle { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
.error-box { display: flex; align-items: center; gap: 16px; max-width: 640px; margin: 32px auto; padding: 18px 20px; background: var(--surface); border: 2px solid var(--keyline); border-radius: var(--radius); box-shadow: var(--slab); }
.error-box .locky { width: 72px; height: auto; flex: none; }
.error-box .btn { margin-top: 10px; }

/* ---------- sign in (and the two-step set-up that has to come first): a white slab on the blue stage */

main:has(> .view > .signin), main:has(> .view > .tf-required) { min-height: calc(100vh - 60px); background: var(--stage); }
.signin {
  max-width: 460px; margin: 48px auto; text-align: center; display: grid; justify-items: center; gap: 10px;
  background: var(--surface); border: 2px solid var(--keyline); border-radius: 24px; padding: 30px 24px 28px; box-shadow: inset 0 -6px 0 var(--shade), 0 5px 0 var(--keyline);
}
.signin .locky { width: 120px; height: auto; margin-top: -4px; }
.signin h1 { font-size: 24px; letter-spacing: -.02em; }
.signin-lead { font-size: 16px; font-weight: 600; }
.signin-google { display: grid; gap: 6px; justify-items: center; }
.signin-google .btn { font-size: 16px; padding: 12px 22px; }
.signin code { background: var(--gold); color: var(--navy); font-weight: 700; padding: 1px 6px; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--keyline); }
.dev-picker { width: 100%; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.dev-list { display: grid; gap: 6px; margin-top: 6px; }
.dev-person { width: 100%; justify-content: space-between; }

/* ---------- toasts and dialogs */

/* One column no wider than the screen, so a long message wraps instead of running off the right edge. */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; left: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: end; pointer-events: none; }
/* Phones: above the tab bar, not on top of it. */
@media (max-width: 899px) { body.has-nav .toasts { bottom: calc(64px + 12px + env(safe-area-inset-bottom)); } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: min(420px, 100%);
  --toast-band: var(--face-blue);
  padding: 11px 14px 13px; border-radius: 14px; background: var(--navy); color: var(--paper); border: 2px solid #000000;
  box-shadow: inset 0 -5px 0 var(--toast-band), 0 3px 0 #000000, 0 12px 28px rgba(5, 8, 60, .3);
  font-weight: 600; overflow-wrap: anywhere; animation: rise .32s cubic-bezier(.34, 1.56, .64, 1);
}
.toast-ok { --toast-band: var(--face-green); }
.toast-error { --toast-band: var(--face-coral); }
.toast p { flex: 1; }
.toast-close { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .8; }
.toast-action { flex: none; pointer-events: auto; }
@keyframes rise { from { transform: translateY(10px) scale(.96); opacity: 0; } }

.dialog { border: 2px solid var(--keyline); border-radius: 20px; padding: 20px; width: min(440px, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: inset 0 -5px 0 var(--shade), 0 4px 0 var(--keyline), 0 20px 48px rgba(5, 8, 60, .3); }
.dialog::backdrop { background: rgba(5, 8, 60, .55); }
.dialog form, .dialog { display: grid; gap: 10px; }
.dialog:not([open]) { display: none; }
.dialog h2 { font-size: 18px; letter-spacing: -.01em; }
.dialog label { font-size: 12px; font-weight: 600; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card.dragging { transform: none; }
}
/* The Ctrl K hint is for keyboards: phones and touch screens leave it out. */
@media (max-width: 899px), (pointer: coarse) { .jump-key { display: none; } }
