/* MyHRM v2 shell, Harbour (Sadie, 19 Oct 2026; the "B · Harbour" design canvas): a SharePoint team site.
   Suite bar, site header, quick launch on the left, web parts on a mist ground. Colours are names from
   tokens.css only; ink on a fill uses var(--on-accent) or var(--on-tile) so the dark set can swap them apart. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet-400); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ───────────────── Suite bar ───────────────── */
.suite {
  position: sticky; top: 0; z-index: 25;
  min-height: var(--suite-h); display: flex; align-items: center; gap: 12px 20px; padding: 0 16px;
  background: var(--suite); color: var(--on-suite);
}
.suite-brand { font-weight: 700; font-size: 16px; letter-spacing: .01em; color: var(--on-suite); }
.suite .search-wrap { position: relative; flex: 1 1 320px; max-width: 560px; margin: 0 auto; }
.search {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 16px;
  background: var(--white); border-radius: 999px; border: 1px solid transparent;
}
.search:focus-within { border-color: var(--violet-400); box-shadow: 0 0 0 3px var(--focus-ring); }
.search svg { width: 16px; height: 16px; color: var(--ink-500); flex: none; }
.search input { border: 0; outline: 0; background: none; font: inherit; font-size: 14px; width: 100%; color: var(--ink-900); }
.search input::placeholder { color: var(--ink-300); }
.search-results {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 300px;
  max-height: 70vh; overflow-y: auto; padding: 8px 0; color: var(--ink-900);
  background: var(--white); border-radius: var(--radius-sm); border: 1px solid var(--lavender-200); box-shadow: var(--shadow-lift);
}
.search-group { padding: 8px 16px; }
.search-group + .search-group { border-top: 1px solid var(--lavender-100); }
.search-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); }
.search-group ul { list-style: none; margin: 0; padding: 0; }
.search-group a { display: block; margin: 0 -8px; padding: 7px 8px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.35; }
.search-group a:hover, .search-group a:focus-visible { background: var(--lavender-100); color: var(--violet-700); }
.search-group a small { display: block; font-size: 12px; color: var(--ink-500); }
.search-group p { margin: 0; font-size: 13px; color: var(--ink-500); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--mist-grey); }
.avatar span { font-weight: 700; font-size: 12px; color: var(--suite); }
.menu-btn { display: none; }

/* ───────────────── Site header ───────────────── */
.site-header {
  display: flex; align-items: center; gap: 16px; padding: 18px 28px;
  background: var(--white); border-bottom: 1px solid var(--lavender-200);
}
.site-mark {
  flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--suite), var(--violet-600) 60%, var(--fresh)); color: var(--on-accent); font-weight: 700; font-size: 22px;
}
.greeting { flex: 1; min-width: 0; }
.greeting h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2.1vw, 26px); letter-spacing: -.025em; line-height: 1.25; }
.greeting h1 .name { color: var(--green-700); }
.greeting-sub { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-500); overflow-wrap: anywhere; }   /* profile role, employer */

/* ───────────────── Layout and quick launch ───────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); align-items: start; }
.sidebar {
  position: sticky; top: var(--suite-h); align-self: stretch; min-height: calc(100vh - var(--suite-h));
  padding: 18px 12px; background: var(--white); border-right: 1px solid var(--lavender-200); z-index: 5;
}
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--ink-700); transition: background .15s, color .15s;
}
.nav a:hover { background: var(--lavender-100); color: var(--ink-900); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .ext { margin-left: auto; width: 13px; height: 13px; opacity: .7; }
.nav a[aria-current="page"] { background: var(--green-50); color: var(--ink-900); font-weight: 700; box-shadow: inset 3px 0 0 var(--fresh); }
.nav-rule { height: 1px; margin: 14px 8px; background: var(--lavender-200); }

.main { min-width: 0; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; }

/* ───────────────── Web parts, cards and panels ───────────────── */
.card { background: var(--white); border-radius: var(--radius-sm); border: 1px solid var(--lavender-200); padding: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.part { background: var(--white); border: 1px solid var(--lavender-200); border-radius: var(--radius-lg); min-width: 0; overflow: hidden; }
.part-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--lavender-200); }
.part-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.part-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.part-empty { margin: 0; padding: 20px; font-size: 14.5px; color: var(--ink-500); }
.empty { margin: 0; padding: 22px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--lavender-200); color: var(--ink-500); font-size: 14.5px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; align-items: start; max-width: 1080px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--violet-600); }
.link-more svg { width: 14px; height: 14px; transition: transform .2s; }
.link-more:hover { color: var(--violet-700); text-decoration: underline; }
.link-more:hover svg { transform: translateX(2px); }

/* ───────────────── Fields ───────────────── */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-700); }
.control {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--lavender-200); background: var(--white); color: var(--ink-900);
  font: inherit; font-size: 14px; outline: 0; transition: border-color .2s;
}
.control:hover { border-color: var(--ink-300); }
select.control { appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5B6B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.control:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--focus-ring); }

/* Two- or three-way choice (theme) */
.toggle { display: flex; gap: 0; margin: 0; padding: 0; border: 0; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle label { flex: 1; display: grid; place-items: center; height: 36px; padding: 0 10px; border: 1px solid var(--lavender-200); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-700); white-space: nowrap; transition: background .2s, color .2s; }
.toggle label + input + label { border-left: 0; }
.toggle label:first-of-type { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.toggle label:last-of-type { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.toggle input:checked + label { background: var(--violet-600); border-color: var(--violet-600); color: var(--on-accent); }
.toggle input:focus-visible + label { outline: 3px solid var(--violet-400); outline-offset: 2px; }

/* ───────────────── Buttons ───────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--lavender-200); background: var(--white);
  font-size: 14px; font-weight: 600; color: var(--ink-900); cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 16px; height: 16px; color: var(--violet-600); }
.btn:hover { background: var(--lavender-100); }
.btn-primary { background: var(--violet-600); border-color: var(--violet-600); color: var(--on-accent); }
.btn-primary svg { color: var(--on-accent); }
.btn-primary:hover { background: var(--violet-700); border-color: var(--violet-700); color: var(--on-accent); }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--lavender-200); background: var(--white); color: var(--ink-900); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--lavender-100); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 15px; height: 15px; }

.notices { display: flex; flex-direction: column; gap: 10px; }
.notice { margin: 0; padding: 12px 16px; border-radius: var(--radius-md); background: var(--lavender-100); border: 1px solid var(--lavender-200);
  font-size: 14px; line-height: 1.5; color: var(--ink-900); }
.notice a { color: var(--violet-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.notice--profile { background: var(--amber-50); border-color: color-mix(in srgb, var(--amber-500) 40%, transparent); }
.notice--profile a { color: var(--ink-900); }

/* ═════════════════ Dashboard ═════════════════ */
.wsx { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wsx > .part-head, .news > .part-head { padding: 0; border: 0; }
.tile-status { font-size: 13.5px; color: var(--green-700); }
.tile-status:not(:empty) { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--green-50); }

/* Workspace tiles: solid fills; the first is drawn largest. Small tiles show their line, and their tasks on hover. */
.wtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(196px, auto); gap: 12px; }
.wtile--mycoach    { --tone: var(--tile-mycoach); }
.wtile--diagnostic { --tone: var(--tile-diagnostic); }
.wtile--er         { --tone: var(--tile-er); }
.wtile--hs         { --tone: var(--tile-hs-dash); --on-tile-soft: var(--on-tile); }   /* #4F6A73, all its text white */
.wtile--hs .wtile-points b, .wtile--hs .wtile-blurb, .wtile--hs .wtile-intro { font-weight: 700; color: var(--on-tile); }
.wtile--wb         { --tone: var(--tile-wb); --on-tile-soft: var(--on-tile); }   /* #9FB1B8 with white words and icons (Sadie, 19 Oct night) */
.wtile--wb .wtile-points b, .wtile--wb .wtile-blurb, .wtile--wb .wtile-intro { font-weight: 700; color: var(--on-tile); }
.wtile--wb h3, .wtile--wb .wtile-points { text-shadow: 0 1px 2px rgba(13, 46, 51, .25); }
.wtile {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0; border-radius: 18px;
  display: flex; flex-direction: column; padding: 22px;
  background: var(--tone); color: var(--on-tile);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wtile:hover, .wtile:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.wtile-link { position: absolute; inset: 0; z-index: 1; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; }
.wtile-link:focus-visible { outline: 3px solid var(--focus-on-tile); outline-offset: -4px; border-radius: 18px; }
/* The diagonal arrow (after the Canopy option): top right of every tile, nudging out on hover */
.wtile::after { content: ""; position: absolute; top: 20px; right: 20px; width: 24px; height: 24px; opacity: .75; background: currentColor; transition: transform .25s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 19 19 5M8 5h11v11'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 19 19 5M8 5h11v11'/%3E%3C/svg%3E") center / contain no-repeat; }
.wtile:hover::after, .wtile:focus-within::after { transform: translate(3px, -3px); }
.wtile:not(.wtile--main) .wtile-head { padding-right: 30px; }
.wtile-mark { display: none; }
.wtile-head { display: flex; align-items: center; gap: 12px; }
.wtile-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-tile) 16%, transparent); }
.wtile-icon svg { width: 22px; height: 22px; }
.wtile h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.25; }
.wtile-blurb { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--on-tile-soft); transition: opacity .2s, transform .2s; }
/* Points: a small tile lists the lead words only; the largest tile gives each point in full */
.wtile-points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.wtile-points li { display: flex; align-items: baseline; gap: 8px; }
.wtile-points li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; transform: translateY(-2px); }
.wtile-points b { font-weight: 600; color: var(--on-tile); }
.wtile-points span { display: none; }
.wtile-intro { display: none; }
.wtile--main .wtile-intro { display: block; margin: 12px 0 0; max-width: 620px; font-size: 16px; line-height: 1.5; color: var(--on-tile-soft); }
.wtile-cta { display: none; }
.wtile--main { grid-column: span 2; grid-row: span 2; padding: 28px; justify-content: flex-end; }
.wtile--main { background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 82%, var(--fresh)), var(--tone) 55%, color-mix(in srgb, var(--tone) 80%, #000)); }
.wtile--main .wtile-mark { display: block; position: absolute; z-index: -1; right: -48px; top: -40px; width: 280px; height: 280px; color: var(--on-tile); opacity: .12; }
.wtile--main .wtile-head { flex-direction: column; align-items: flex-start; gap: 16px; }
.wtile--main .wtile-icon { width: 52px; height: 52px; }
.wtile--main .wtile-icon svg { width: 28px; height: 28px; }
.wtile--main h3 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; }
.wtile--main .wtile-blurb { margin-top: 10px; max-width: 620px; font-size: 16px; }
.wtile--main .wtile-points { gap: 9px; margin-top: 16px; font-size: 15px; line-height: 1.45; }
.wtile--main .wtile-points li { display: block; padding-left: 16px; position: relative; }
.wtile--main .wtile-points li::before { position: absolute; left: 0; top: .6em; transform: none; }
.wtile--main .wtile-points span { display: inline; }
.wtile--main .wtile-cta {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; margin-top: 22px; height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--fresh); color: #FFFFFF; font-weight: 700; font-size: 15px; transition: background .2s, box-shadow .2s;   /* white words and arrow (Sadie, 19 Oct night) */
}
.wtile--main:hover .wtile-cta { box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--fresh) 80%, transparent); }
.wtile--main .wtile-cta svg { width: 16px; height: 16px; transition: transform .2s; }
.wtile--main:hover .wtile-cta svg { transform: translateX(3px); }

/* Arrange tiles */
.arrange { padding: 16px 20px; background: var(--white); border: 1px solid var(--lavender-200); border-radius: var(--radius-lg); }
.arrange p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-700); }
.arrange-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.arrange-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--lavender-100); border-radius: var(--radius-sm); }
.arrange-swatch { flex: none; width: 16px; height: 16px; border-radius: 3px; background: var(--tone); }
.arrange-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; }
.arrange-badge { font-size: 12px; font-weight: 700; color: var(--violet-700); background: var(--lavender-100); padding: 3px 8px; border-radius: 999px; }

/* My Work and the daily pulse, side by side and the same height */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 20px; align-items: stretch; }
.part.work { display: flex; flex-direction: column; }
.work-start { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px 16px; border-top: 1px solid var(--lavender-100); background: var(--lavender-50); }
.work-start > span { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.work-new { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--lavender-200); border-left: 3px solid var(--tone); font-size: 13.5px; font-weight: 600; color: var(--ink-900); transition: box-shadow .15s; }
.work-new:hover { box-shadow: var(--shadow-lift); }
.work-new svg { width: 16px; height: 16px; color: var(--tone); }
.work-new--coach { --tone: var(--tile-diagnostic); }
.work-new--er    { --tone: var(--tile-er); }
.work-new--hs    { --tone: var(--tile-hs); }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-row { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 20px; transition: background .15s; }
.work-row + .work-row { border-top: 1px solid var(--lavender-100); }
.work-row:hover { background: var(--lavender-50); }
.work-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--lavender-100); color: var(--violet-600); }
.work-icon svg { width: 18px; height: 18px; }
.work-text { min-width: 0; }
.work-title { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-title::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens the project */
.work-title:focus-visible { outline: 0; }
.work-row:has(.work-title:focus-visible) { outline: 3px solid var(--violet-400); outline-offset: -3px; }
.work-kind { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-500); }
.work-date { font-size: 13px; color: var(--ink-500); white-space: nowrap; }
.btn-open { font-size: 14px; font-weight: 600; color: var(--violet-600); }
.work-row:hover .btn-open { text-decoration: underline; }

/* Daily pulse (templates/v2/_checkin.html): four pillars as battery cells, in the pulse accent */
.wellbeing { display: flex; flex-direction: column; }
.wellbeing .part-head .private { margin: 0; }
.private { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.private svg { width: 13px; height: 13px; }
.pulse { padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pulse-intro { margin: 0; font-size: 14px; color: var(--ink-700); }
.pillar { margin: 0; padding: 0; border: 0; min-width: 0; }
.pillar legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 7px; width: 100%; }
.pillar-icon { flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--pulse-soft); color: var(--pulse-ink); }
.pillar-icon svg { width: 17px; height: 17px; }
.pillar-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.pillar-name { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.pillar-q { font-size: 13px; color: var(--ink-500); }
.cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cell { position: relative; height: 26px; border-radius: 7px; cursor: pointer; background: var(--lavender-100); border: 1px solid var(--lavender-200); transition: background .15s, border-color .15s, transform .15s; }
.cell input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.cell:hover { border-color: var(--pulse); }
.cell:has(input:focus-visible) { outline: 2px solid var(--violet-600); outline-offset: 2px; }
.cells[data-value="1"] .cell:nth-child(-n+1), .cells[data-value="2"] .cell:nth-child(-n+2), .cells[data-value="3"] .cell:nth-child(-n+3),
.cells[data-value="4"] .cell:nth-child(-n+4), .cells[data-value="5"] .cell { background: var(--pulse); border-color: var(--pulse); }
.cell:has(input:checked) { transform: scaleY(1.12); }
.cell-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 11.5px; color: var(--ink-500); }
.cell-ends span:last-child { text-align: right; }
.pulse-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 4px; }
.pulse-hint { font-size: 12.5px; color: var(--ink-500); }
.btn-log {
  height: 38px; padding: 0 22px; border: 1px solid var(--violet-600); border-radius: var(--radius-sm); cursor: pointer;
  background: var(--violet-600); color: var(--on-accent); font-weight: 600; font-size: 14px;
  transition: background .2s, opacity .2s;
}
.btn-log:hover { background: var(--violet-700); }
.btn-log:disabled { opacity: .45; cursor: not-allowed; }

/* The reading: a battery in its zone colour, the four pillars, the day's tip */
.battery { position: relative; display: inline-block; width: 64px; height: 30px; border: 2px solid var(--ink-700); border-radius: 5px; padding: 3px; flex: none; }
.battery::after { content: ""; position: absolute; right: -6px; top: 50%; width: 4px; height: 12px; transform: translateY(-50%); border-radius: 0 2px 2px 0; background: var(--ink-700); }
.battery-fill { display: block; height: 100%; border-radius: 2px; background: var(--zone, var(--pulse)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.battery--lg { width: 92px; height: 44px; border-width: 3px; border-radius: 7px; padding: 4px; }
.battery--lg::after { right: -8px; width: 5px; height: 16px; }
.battery--xl { width: 200px; height: 92px; border-width: 4px; border-radius: 12px; padding: 7px; }
.battery--xl::after { right: -12px; width: 8px; height: 34px; }
[data-zone="green"] { --zone: var(--zone-green); }
[data-zone="amber"] { --zone: var(--zone-amber); }
[data-zone="red"]   { --zone: var(--zone-red); }
[data-zone="green"] .battery-fill { box-shadow: 0 0 12px color-mix(in srgb, var(--zone-green) 55%, transparent); }
[data-zone="red"] .battery-fill { animation: drained 2.4s ease-in-out infinite; }
@keyframes drained { 50% { opacity: .55; } }
.pulse-result { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.pr-top { display: flex; align-items: center; gap: 22px; }
.pr-percent { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--ink-900); }
.pr-zone { margin-left: 10px; font-size: 14px; font-weight: 700; color: var(--zone); vertical-align: middle; }
.pr-when { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-500); }
.pr-pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-pillars li { display: grid; grid-template-columns: 18px minmax(0, 1fr) 110px; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-700); }
.pr-pillars svg { width: 16px; height: 16px; color: var(--pulse-ink); }
.pr-cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.pr-cells i { height: 8px; border-radius: 2px; background: var(--lavender-100); }
.pr-cells[data-value="1"] i:nth-child(-n+1), .pr-cells[data-value="2"] i:nth-child(-n+2), .pr-cells[data-value="3"] i:nth-child(-n+3),
.pr-cells[data-value="4"] i:nth-child(-n+4), .pr-cells[data-value="5"] i { background: var(--pulse); }
.pr-tip { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--pulse-soft); font-size: 14px; line-height: 1.5; color: var(--ink-900); border-left: 3px solid var(--zone, var(--pulse)); }
.pr-tip svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--pulse-ink); }
.pr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-link { border: 0; background: none; padding: 0 4px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--violet-600); text-decoration: underline; text-underline-offset: 2px; }

.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 20px; padding: 0 7px; border-radius: 3px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.tag svg { width: 10px; height: 10px; }
.tag--ask    { background: var(--lavender-100); color: var(--violet-700); }
.tag--read   { background: var(--sky-50);       color: var(--sky-700); }
.tag--watch  { background: var(--rose-50);      color: var(--rose-700); }
.tag--join   { background: var(--green-50);     color: var(--green-700); }
.tag--remind { background: var(--amber-50);     color: var(--amber-700); }

/* News and articles: a SharePoint news web part, then the sections as quick-link tiles */
.news { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.band--mycoach    { background: var(--tile-mycoach); }
.band--diagnostic { background: var(--tile-diagnostic); }
.band--er         { background: var(--tile-er); }
.band--hs         { background: var(--tile-hs); }
.band--wb         { background: var(--tile-wb); --on-tile: var(--on-tile-light); }
.news-featured { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px; }
.article { display: flex; min-width: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--lavender-200); color: inherit; transition: border-color .15s, box-shadow .15s; }
.article:hover { border-color: var(--violet-600); box-shadow: var(--shadow-lift); }
.article:hover .article-title { text-decoration: underline; text-underline-offset: 3px; }
.article-band { flex: none; display: grid; place-items: center; width: 108px; color: var(--on-tile); }
.article-band svg { width: 34px; height: 34px; opacity: .9; }
.article-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px; }
.article-section { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--green-700); }
.article-title { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; line-height: 1.3; color: var(--ink-900); }
.article-line { font-size: 13.5px; line-height: 1.5; color: var(--ink-700); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--ink-500); }
.article--lead { grid-row: span 2; flex-direction: column; }
.article--lead .article-band { width: auto; height: 200px; }
.article--lead .article-band svg { width: 72px; height: 72px; }
.article--lead .article-body { padding: 20px 24px 22px; gap: 8px; }
.article--lead .article-title { font-size: clamp(20px, 2vw, 26px); letter-spacing: -.01em; }
.article--lead .article-line { font-size: 15.5px; -webkit-line-clamp: 4; }
.news-sections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.section-tile {
  height: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 14px; row-gap: 4px;
  padding: 16px; background: var(--white); border: 1px solid var(--lavender-200); border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .15s;
}
.section-tile:hover { border-color: var(--violet-600); box-shadow: var(--shadow-lift); }
.section-icon { grid-row: 1 / span 3; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--on-tile); }
.section-icon svg { width: 24px; height: 24px; }
.section-name { font-weight: 700; font-size: 15px; color: var(--ink-900); }
.section-line { font-size: 13px; line-height: 1.45; color: var(--ink-700); }
.section-status { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }

/* ───────────────── MyCoach panel ───────────────── */
.coach-scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .25s; }
.coach-panel {
  --accent: var(--accent-mycoach);
  position: fixed; z-index: 31; top: 0; right: 0; height: 100%; width: min(720px, 100%);
  display: flex; flex-direction: column;
  background: var(--white); box-shadow: -20px 0 50px -20px rgba(16, 28, 40, .45);
  font-family: var(--font-body); font-weight: 400; font-synthesis: none; color: var(--coach-ink);
  transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s .3s;
}
body.coaching { overflow: hidden; }
body.coaching .coach-scrim { opacity: 1; pointer-events: auto; }
body.coaching .coach-panel { transform: none; visibility: visible; transition: transform .3s ease; }
.coach-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 24px 16px; background: var(--tile-mycoach); color: var(--on-tile); }
.coach-head .tile-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--on-tile) 16%, transparent); color: var(--on-tile); }
.coach-head .tile-icon svg { width: 22px; height: 22px; }
.coach-head h2 { flex: 1; margin: 0; font: inherit; font-weight: 700; font-size: 18px; color: var(--on-tile); }
.coach-panel .coach-head .icon-btn { border-color: color-mix(in srgb, var(--on-tile) 50%, transparent); background: transparent; color: var(--on-tile); }
.coach-panel .coach-head .icon-btn:hover { background: color-mix(in srgb, var(--on-tile) 16%, transparent); }
.coach-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.coach-open { padding: 4px 0 0; }
.coach-open p { margin: 0 0 8px; font-size: 22px; line-height: 1.4; }
.coach-open p.nudge { font-size: 19px; }
.turn { max-width: 88%; padding: 12px 16px; border-radius: 8px; font-size: 18px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.you { align-self: flex-end; background: var(--lavender-100); border-bottom-right-radius: 2px; }
.turn.coach { align-self: flex-start; background: var(--white); border: 1px solid var(--lavender-200); border-left: 3px solid var(--accent-mycoach); border-bottom-left-radius: 2px; }
.turn.coach .basis { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-700); white-space: normal; }
.coach-foot { flex: none; padding: 14px 24px 18px; border-top: 1px solid var(--lavender-200); }
/* Topics and their questions, above the box (hidden once the exchange begins) */
.coach-prompts { margin-bottom: 12px; }
.coach-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-topic { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--lavender-200); background: var(--white); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-700); transition: background .15s, border-color .15s, color .15s; }
.coach-topic:hover { border-color: var(--accent-mycoach); color: var(--ink-900); }
.coach-topic[aria-pressed="true"] { background: var(--accent-mycoach); border-color: var(--accent-mycoach); color: var(--on-accent); }
.coach-sugg { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; animation: rise .2s ease; }
.coach-sugg button { width: 100%; text-align: left; padding: 9px 14px; border-radius: 14px 14px 14px 3px; border: 1px solid var(--accent-mycoach-soft); background: var(--accent-mycoach-soft); cursor: pointer; font: inherit; font-size: 14.5px; line-height: 1.4; color: var(--coach-ink); transition: border-color .15s; }
.coach-sugg button:hover { border-color: var(--accent-mycoach); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.coach-ask { display: flex; gap: 10px; align-items: flex-end; }
.coach-ask textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 140px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--lavender-200); border-radius: var(--radius-sm); background: var(--white); outline: 0;
  font: inherit; font-size: 17px; line-height: 1.45; color: var(--coach-ink);
}
.coach-ask textarea:focus { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--focus-ring); }
.coach-ask textarea::placeholder { color: var(--ink-300); }
.btn-send { height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--fresh); color: var(--on-fresh); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-send:hover { background: color-mix(in srgb, var(--fresh) 85%, #000); }
.btn-send:disabled { opacity: .45; cursor: not-allowed; }
.coach-keep { display: flex; align-items: center; justify-content: flex-end; margin-top: 10px; }
.coach-keep button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 600; color: var(--violet-700); }
.coach-keep button svg { width: 13px; height: 13px; }
.coach-keep button:disabled { opacity: .45; cursor: default; }
.coach-between { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-500); }
.coach-between svg { width: 13px; height: 13px; }
@media (max-width: 560px) {
  .coach-head, .coach-body { padding-left: 16px; padding-right: 16px; }
  .coach-foot { padding: 12px 16px 14px; }
}

/* Conversation page (templates/v2/conversation.html): a kept MyCoach or Classic thread */
.convo { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.convo-head { display: flex; align-items: center; gap: 12px; }
.convo-head .tile-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; background: var(--tile-mycoach); color: var(--on-tile); }
.convo-head .tile-icon svg { width: 20px; height: 20px; }
.convo-head h2 { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.convo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.convo-turn { max-width: 88%; padding: 12px 16px; border-radius: 8px; font-size: 15px; line-height: 1.6; }
.convo-turn--you { align-self: flex-end; background: var(--lavender-100); border-bottom-right-radius: 2px; }
.convo-turn--reply { align-self: flex-start; border: 1px solid var(--lavender-200); border-left: 3px solid var(--accent-mycoach); border-bottom-left-radius: 2px; }
.convo-turn .who { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.convo-turn .who time { font-weight: 400; }
.convo-turn .text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-900); }
.convo-turn .basis { display: block; margin-top: 10px; font-size: 13px; color: var(--ink-700); }
.convo-ask { display: flex; gap: 10px; align-items: flex-end; }
.convo-ask textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 200px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--lavender-200); border-radius: var(--radius-sm); background: var(--white); outline: 0;
  font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink-900);
}
.convo-ask textarea:focus { border-color: var(--violet-500); }
@media (max-width: 560px) { .convo { padding: 16px; } .convo-turn { max-width: 100%; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink-900); color: var(--white); padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; box-shadow: var(--shadow-lift); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 40;   /* above the MyCoach panel */
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────────────── Density ───────────────── */
[data-density="compact"] .main { padding: 20px; gap: 20px; }
[data-density="compact"] .card { padding: 16px; }
[data-density="compact"] .nav a { height: 34px; }
[data-density="compact"] .wtiles { grid-auto-rows: minmax(168px, auto); }

/* ───────────────── Responsive ───────────────── */
@media (max-width: 1180px) {
  .wtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wtile--main { grid-row: span 1; min-height: 300px; }
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .news-featured { grid-template-columns: minmax(0, 1fr); }
  .article--lead { grid-row: auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--suite-h); bottom: 0; left: 0; width: var(--sidebar-w); min-height: 0; overflow-y: auto; z-index: 26;
    transform: translateX(-100%); transition: transform .3s ease;
  }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax var(--scrim); }
  .menu-btn {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-left: -8px;
    border-radius: var(--radius-sm); border: 0; cursor: pointer; background: transparent; color: var(--on-suite);
  }
  .menu-btn:hover { background: color-mix(in srgb, var(--on-suite) 14%, transparent); }
  .menu-btn svg { width: 20px; height: 20px; }
  .suite { flex-wrap: wrap; padding: 8px 16px; }
  .suite .search-wrap { order: 5; flex-basis: 100%; max-width: none; }
  .suite .avatar { margin-left: auto; }
  .site-header { padding: 16px; }
  .site-mark { width: 40px; height: 40px; font-size: 18px; }
  .main { padding: 20px 16px 32px; gap: 22px; }
}
@media (max-width: 600px) {
  .wtiles { grid-template-columns: minmax(0, 1fr); }
  .wtile--main { grid-column: auto; min-height: 280px; padding: 22px; }
  .work-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 12px 16px; }
  .work-date { grid-column: 2; grid-row: 2; }
  .btn-open { grid-column: 3; grid-row: 1 / span 2; }
  .article:not(.article--lead) .article-band { width: 72px; }
  .search-results { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
