@import url("/static/css/tokens.css");

/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V4
   Genre: studied-DNA light atmospheric workbench · tone: calm, modern, precise
   Anchor: cool periwinkle · structure: Workbench/N3 inset rail
   Knob delta: flat dense workspace → inset rail + ambient canvas */

/*
  DIRECTION: Performance AI — v3 "Light Linear Workspace" identity
    (2026-09-03). Keeps the same product-first discipline from the Linear
    reference — scarce lavender accent, compact controls, tight display
    tracking, screenshot-first product rhythm — but translates it into a
    light workspace with controlled glass on navigation and modal layers.
    This is a system-level palette and surface pivot, not a rewrite of
    the app structure.
  TYPE: Plus Jakarta Sans for display hierarchy, Inter for UI/body, IBM
    Plex Mono for numeric/status contexts. The goal is to keep the sober,
    technical feel while moving away from an all-Inter look.
  SCENE: a manager mid-workday moving quickly through reviews, goals, and
    check-ins — bright, legible, and calm rather than dramatic.
*/

:root {
  --paper: #f3f5fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef2f8;
  --surface-4: #e7edf6;
  --ink: #151926;
  --ink-muted: #5d677b;
  --ink-subtle: #7d8698;
  --ink-tertiary: #a1a8b7;
  --line: #dde4ef;
  --line-strong: #cbd4e4;
  --line-tertiary: #e8edf5;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --accent-ink: #4452b5;
  --accent-soft: rgba(94, 106, 210, 0.1);
  --accent-tint: #e2e4f7;
  --on-accent: #FFFFFF;
  --danger: #cf5364;
  --danger-soft: rgba(207, 83, 100, 0.12);
  --success: #278e47;
  --success-soft: rgba(39, 142, 71, 0.12);
  --warning: #b77b11;
  --warning-soft: rgba(183, 123, 17, 0.12);
  --info: #4f5fca;
  --info-soft: rgba(94, 106, 210, 0.1);
  --focus-ring: #5e69d1;

  --glass-surface: rgba(255, 255, 255, 0.72);
  --glass-surface-strong: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.78);

  --sidebar-ink: #617089;
  --sidebar-ink-active: #121723;
  --sidebar-active-bg: rgba(94, 106, 210, 0.08);
  --sidebar-border: #dbe2ee;
  --sidebar-width: 240px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --control-height: 40px;
  --shadow-sm: 0 18px 40px rgba(95, 108, 138, 0.1), 0 3px 10px rgba(95, 108, 138, 0.05);
  --shadow-md: 0 28px 72px rgba(95, 108, 138, 0.16), 0 8px 24px rgba(95, 108, 138, 0.08);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  box-sizing: border-box;
}

/* Several components (labels, flex/grid items) set their own `display`,
   which — being an author rule — beats the UA's `[hidden] { display: none }`
   regardless of selector specificity. Without this, any element toggled via
   the `hidden` attribute stays visible if its class also sets `display`
   (e.g. .checkin-rag-field, a <label>, rendered even while hidden). One
   global override instead of a per-component `.x[hidden]{display:none}`
   rule for every future component that needs it. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(94, 106, 210, 0.12), transparent 28rem),
    radial-gradient(circle at top right, rgba(122, 127, 173, 0.09), transparent 24rem),
    linear-gradient(180deg, #fbfcfe 0%, var(--paper) 55%, #edf2f8 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 18rem),
    radial-gradient(circle at 18% 12%, rgba(94, 106, 210, 0.06), transparent 16rem);
  opacity: 0.8;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-action);
  color: var(--color-action-ink);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: #eef2f8;
}
::-webkit-scrollbar-thumb {
  background: #c3ccdd;
  border-radius: 8px;
  border: 3px solid #eef2f8;
}
::-webkit-scrollbar-thumb:hover {
  background: #aab5cb;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  color: var(--accent-ink);
  text-decoration-color: rgba(214, 220, 255, 0.35);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.03em;
  color: var(--ink);
}
h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
h2 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
  letter-spacing: -0.04em;
}

p {
  max-width: 68ch;
  color: var(--ink-muted);
  font-size: 1rem;
}

.page-lede {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 0;
}

/* --- App shell: left sidebar navigation --- */

.app-shell {
  display: flex;
  align-items: flex-start;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  flex: none;
  width: var(--sidebar-width);
  height: 100dvh;
  overflow-y: auto;
  background: var(--glass-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 28px;
  padding: 0 0 0 12px;
}

.sidebar .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-ink-active);
  min-width: 0;
}

.sidebar-toggle {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--sidebar-ink);
  cursor: pointer;
  padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-ink-active);
  }
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
}
.sidebar-profile .avatar-initials {
  width: 32px;
  height: 32px;
  font-size: 0.6875rem;
  background: var(--sidebar-active-bg);
  border-color: var(--sidebar-border);
  color: var(--sidebar-ink-active);
}
.sidebar-profile-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-ink-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root.sidebar-collapsed .sidebar {
  width: 72px;
}
:root.sidebar-collapsed .sidebar-label {
  display: none;
}
:root.sidebar-collapsed .sidebar-top {
  justify-content: center;
  padding-left: 0;
}
:root.sidebar-collapsed .sidebar-top .wordmark {
  display: none;
}
:root.sidebar-collapsed .sidebar-nav a,
:root.sidebar-collapsed .sidebar-footer a,
:root.sidebar-collapsed .sidebar-footer .sidebar-logout button {
  justify-content: center;
  padding-left: 12px;
}
:root.sidebar-collapsed .sidebar-profile {
  justify-content: center;
  padding-left: 0;
}
:root.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 8px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sidebar-ink);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar-nav a svg {
  flex: none;
  opacity: 0.85;
}
@media (hover: hover) and (pointer: fine) {
  .sidebar-nav a:hover {
    background: rgba(94, 106, 210, 0.12);
    color: var(--sidebar-ink-active);
  }
}
.sidebar-nav a.active {
  background: rgba(94, 106, 210, 0.16);
  color: var(--sidebar-ink-active);
  font-weight: 600;
  border-left-color: var(--sidebar-ink-active);
}

/* Admin's sub-destinations (Reviews/Top Performers/Org Roster) — indented
   under the parent link so they read as nested, not three more top-level
   items. Reuses .sidebar-nav a for color/hover/active via the cascade;
   only the box model needs to differ. */
.sidebar-admin-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-admin-row a {
  flex: 1;
  min-width: 0;
}
.sidebar-subnav-toggle {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--sidebar-ink);
  cursor: pointer;
}
.sidebar-subnav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-ink-active);
}
.sidebar-subnav-toggle .chevron {
  transition: transform 150ms var(--ease-out);
}
.sidebar-subnav-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}
.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 4px 28px;
}
.sidebar-subnav[hidden] {
  display: none;
}
.sidebar-subnav a {
  padding: 8px 12px;
  font-size: 0.8125rem;
  border-left: none;
  opacity: 0.85;
}
.sidebar-subnav a.active {
  opacity: 1;
}

/* Signing out became a POST, so the control is a <button> in a form. It
   has to remain the same object visually, so it joins the footer-link rules
   above rather than duplicating them — this only strips the chrome a button
   brings of its own. */
.sidebar-logout { margin: 0; }
.sidebar-footer .sidebar-logout button {
  width: 100%;
  border: 0;
  background: none;
  box-shadow: none;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
}
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 12px;
  margin-top: 12px;
}
.sidebar-footer a,
.sidebar-footer .sidebar-logout button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-ink);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .sidebar-footer a:hover,
  .sidebar-footer .sidebar-logout button:hover {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-ink-active);
  }
}

.app-content {
  flex: 1;
  min-width: 0;
  position: relative;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 64px;
}

main.wide {
  max-width: 1320px;
}

@media (max-width: 780px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    overflow-x: auto;
  }
  .sidebar-top {
    margin-bottom: 0;
    margin-right: 12px;
    flex: none;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    flex: none;
  }
  .sidebar-nav a {
    white-space: nowrap;
  }
  .sidebar-footer {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    padding-left: 4px;
    margin-left: auto;
    flex: none;
    display: flex;
    align-items: center;
  }
  .sidebar-profile {
    display: none;
  }
  :root.sidebar-collapsed .sidebar {
    width: 100%;
  }
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.page-head--split {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-head__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.page-head__meta {
  width: min(100%, 25rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  height: auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  margin-bottom: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .back-link:hover {
    color: var(--ink);
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.dashboard-grid h2:first-child {
  margin-top: 0;
}

@media (max-width: 860px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-head--split {
    align-items: stretch;
  }
  .page-head__meta {
    width: 100%;
  }
}

/* --- Profile page identity row (avatar + name/department) --- */
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

/* --- Small stat-card row, e.g. profile "at a glance", admin trackers.
   auto-fit rather than a fixed count so 3-stat and 4-stat rows both work
   with one class. --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

/* --- Person row: avatar + name/meta + optional manager column + badge +
   optional action, used by the admin trackers' person lists. --- */
.person-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-tertiary);
}
.person-row:last-child {
  border-bottom: none;
}
.person-row__meta {
  min-width: 0;
  flex: 1;
}
.person-row__meta p {
  margin: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-row__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
.person-row__sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.person-row__manager {
  flex: none;
  width: 144px;
  font-size: 0.875rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .person-row__manager {
    display: none;
  }
}

/* --- Pill-shaped select, matching .filter-chip visually, e.g. the
   department dropdown next to a row of filter chips. --- */
.filter-select {
  border: none;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.875rem;
  height: auto;
  padding: 8px 16px;
}

/* --- Forms --- */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

/* A row of buttons inside a form (e.g. Save + Record voice note) — form's
   own flex-direction:column would otherwise stack them. */
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-actions button {
  width: auto;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea {
  font: inherit;
  font-size: 0.9375rem;
  height: var(--control-height);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 16, 17, 0.9);
  color: var(--ink);
}

textarea {
  height: auto;
}

textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}

#free-text-comment {
  min-height: 140px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

input::placeholder {
  color: var(--ink-muted);
  opacity: 0.7;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  height: 44px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition:
    background-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
  box-shadow: 0 12px 24px rgba(94, 106, 210, 0.18);
}
@media (hover: hover) and (pointer: fine) {
  button:hover {
    background: var(--accent-hover);
  }
}
button:active {
  background: var(--accent-hover);
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

button.secondary {
  background: rgba(15, 16, 17, 0.86);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
button.secondary:hover {
  background: rgba(24, 25, 26, 0.96);
  opacity: 1;
}

button.record {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
button.record:hover {
  background: var(--surface-2);
  opacity: 1;
}
button.record .icon-mic,
button.record .icon-stop {
  flex: none;
}
button.record .icon-mic[hidden],
button.record .icon-stop[hidden] {
  display: none;
}
button.record.recording {
  color: var(--danger);
  border-color: var(--danger);
}
button.record.recording .icon-stop {
  animation: pulse 1.1s var(--ease-in-out) infinite;
}
button.record .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
button.record.recording .dot {
  animation: pulse 1.1s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* One authored moment, reused everywhere AI actually fills something in:
   a field/rating briefly lights up in the accent, then settles — makes the
   "AI just wrote this" moment register instead of a silent instant change. */
@keyframes ai-fill {
  0% { background-color: var(--accent-soft); border-color: var(--accent); }
  100% { background-color: var(--surface); border-color: var(--line-strong); }
}
.ai-filled {
  animation: ai-fill 700ms var(--ease-out);
}

.ai-suggested-note {
  animation: note-in 200ms var(--ease-out);
}
@keyframes note-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-filled, .ai-suggested-note, button.record.recording .dot {
    animation: none;
  }
}
/* Goal assignment — focused two-stage manager workflow. */
.goal-assignment-page {
  max-width: 1320px !important;
  gap: 22px;
}

.goal-assignment-page .goal-page-head {
  margin-bottom: 0;
  padding-bottom: 18px;
}

.goal-assignment-page .goal-page-head h1 {
  text-wrap: balance;
}

.goal-creation-progress {
  padding: 0 2px;
}

.goal-creation-progress ol {
  position: relative;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-creation-progress ol::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 16px;
  left: 32px;
  width: calc(50% + 16px);
  height: 1px;
  background: var(--line-strong);
  transition: background-color 180ms var(--ease-out);
}

[data-goal-stage="preview"] .goal-creation-progress ol::before {
  background: var(--ink-tertiary);
}

.goal-creation-progress li {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink-subtle);
}

.goal-creation-progress li > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.goal-creation-progress strong {
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.goal-creation-progress small {
  overflow: hidden;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-creation-progress__number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 5px var(--paper);
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.goal-creation-progress li.is-current {
  color: var(--ink);
}

.goal-creation-progress li.is-complete {
  color: var(--ink-muted);
}

.goal-creation-progress li.is-complete .goal-creation-progress__number {
  border-color: var(--ink-tertiary);
  color: var(--ink);
}

.goal-creation-progress li.is-current .goal-creation-progress__number {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  transform: scale(1.04);
}

.goal-assignment-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.goal-assignment-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.goal-owner-panel,
.goal-composer-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(23, 25, 28, .07);
}

.goal-owner-panel {
  position: sticky;
  top: 20px;
}

.goal-panel-heading,
.goal-composer-header,
.goal-preview__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.goal-panel-heading {
  min-height: 76px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.goal-panel-heading h2,
.goal-composer-header h2,
.goal-preview__header h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -.025em;
  line-height: 1.25;
  text-wrap: balance;
}

.goal-panel-heading__eyebrow {
  margin: 0;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.goal-owner-count {
  max-width: 108px;
  color: var(--ink-subtle);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}

.goal-owner-selected {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.goal-owner-selected .avatar-initials,
.goal-owner-option .avatar-initials,
.goal-composer-context .avatar-initials,
.goal-preview__owner .avatar-initials {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.goal-owner-selected__copy,
.goal-owner-option__copy,
.goal-composer-context > span:last-child,
.goal-preview__owner > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.goal-owner-selected__copy strong,
.goal-owner-option__copy strong,
.goal-composer-context strong,
.goal-preview__owner strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-owner-selected__copy span,
.goal-owner-option__copy small,
.goal-composer-context small,
.goal-preview__owner small {
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-owner-selected__check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.goal-owner-picker {
  display: grid;
}

.goal-owner-picker__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px 8px;
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 600;
}

.goal-owner-search.search-field {
  width: auto;
  max-width: none;
  margin: 0 12px 10px;
}

.goal-owner-search input {
  min-height: 38px;
  height: 38px;
  font-size: 12px;
}

.goal-owner-list {
  max-height: 390px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
}

.goal-owner-list li {
  margin: 0;
  padding: 0;
}

.goal-owner-option {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.goal-owner-option.is-selected {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.goal-owner-option__status {
  max-width: none;
  white-space: nowrap;
}

.goal-owner-pagination {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
}

.goal-owner-picker .listing-empty {
  margin: 0;
  padding: 24px 18px;
  font-size: 12px;
}

.goal-composer-header {
  min-height: 92px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.goal-composer-header > div:first-child > p:last-child,
.goal-preview__header > div:first-child > p:last-child {
  margin: 5px 0 0;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.45;
}

.goal-composer-context,
.goal-preview__owner {
  min-width: 170px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.goal-assignment-page .goal-mode-tabs {
  width: fit-content;
  margin: 18px 24px 0;
}

.goal-assignment-page .goal-mode-tabs a {
  min-width: 104px;
}

.goal-assignment-page .goal-builder-form {
  width: 100%;
  max-width: none;
  display: block;
}

.goal-assignment-page [data-goal-fields] {
  display: grid;
}

.goal-assignment-page [data-goal-fields][hidden],
.goal-assignment-page .goal-preview[hidden] {
  display: none;
}

.goal-assignment-page .goal-editor-section {
  gap: 18px;
  padding: 24px;
  border: 0;
}

.goal-assignment-page .goal-editor-section + .goal-editor-section {
  border-top: 1px solid var(--line);
}

.goal-assignment-page .goal-editor-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.015em;
  line-height: 1.35;
}

.goal-assignment-page .goal-detail-grid,
.goal-assignment-page .goal-source-panel__grid {
  width: 100%;
  max-width: none;
  gap: 15px;
}

.goal-assignment-page label > span:first-child {
  display: inline-flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.goal-assignment-page label small {
  color: var(--ink-tertiary);
  font-size: 10px;
  font-weight: 500;
}

.goal-assignment-page #goal-description,
.goal-assignment-page #goal-outcome {
  min-height: 112px;
}

.goal-assignment-page #goal-notes {
  min-height: 132px;
}

.goal-assignment-page .goal-source-panel__footer {
  align-items: center;
  gap: 14px;
  margin-top: 0;
}

.goal-assignment-page .goal-template-list--simple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.goal-composer-actions,
.goal-preview__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.goal-composer-actions p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 11px;
  line-height: 1.4;
}

.goal-composer-actions button,
.goal-preview__actions button {
  width: auto;
  flex: none;
}

.goal-composer-actions button span {
  margin-left: 8px;
}

.goal-preview {
  display: grid;
  gap: 22px;
  padding: 24px;
  animation: goal-preview-enter 220ms var(--ease-out);
}

.goal-preview__header {
  align-items: center;
}

.goal-preview__document {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.goal-preview__title-block,
.goal-preview__outcome {
  padding: 22px 24px;
}

.goal-preview__title-block > span,
.goal-preview__outcome > span,
.goal-preview__facts dt {
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .07em;
  line-height: 1.4;
  text-transform: uppercase;
}

.goal-preview__title-block h3 {
  margin: 7px 0 6px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -.035em;
  line-height: 1.2;
  text-wrap: balance;
}

.goal-preview__title-block p,
.goal-preview__outcome p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.goal-preview__outcome {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.goal-preview__outcome p {
  margin-top: 7px;
  color: var(--ink);
  font-weight: 500;
}

.goal-preview__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.goal-preview__facts > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.goal-preview__facts > div:last-child {
  border-right: 0;
}

.goal-preview__facts dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-preview__actions {
  padding-top: 0;
  border-top: 0;
}

[data-goal-stage="preview"] .goal-composer-header,
[data-goal-stage="preview"] .goal-mode-tabs {
  display: none;
}

@keyframes goal-preview-enter {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) and (pointer: fine) {
  .goal-owner-option:hover {
    border-color: var(--line);
    background: var(--surface-2);
  }
}

@media (max-width: 1080px) {
  .goal-assignment-layout {
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  }

  .goal-owner-option {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .goal-owner-option__status {
    grid-column: 2;
    justify-self: start;
  }

  .goal-assignment-page .goal-template-list--simple {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .goal-assignment-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-owner-panel {
    position: static;
  }

  .goal-owner-list {
    max-height: 280px;
  }
}

@media (max-width: 600px) {
  .goal-creation-progress ol {
    gap: 18px;
  }

  .goal-creation-progress ol::before {
    width: calc(50% + 1px);
  }

  .goal-creation-progress small {
    display: none;
  }

  .goal-composer-header,
  .goal-preview__header {
    align-items: stretch;
    flex-direction: column;
  }

  .goal-composer-context,
  .goal-preview__owner {
    width: 100%;
  }

  .goal-assignment-page .goal-mode-tabs {
    width: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 14px 16px 0;
  }

  .goal-assignment-page .goal-mode-tabs a {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11px;
  }

  .goal-composer-header,
  .goal-assignment-page .goal-editor-section,
  .goal-preview {
    padding: 18px 16px;
  }

  .goal-assignment-page .goal-detail-grid,
  .goal-assignment-page .goal-source-panel__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-composer-actions,
  .goal-preview__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .goal-composer-actions button,
  .goal-preview__actions button {
    width: 100%;
  }

  .goal-preview__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-preview__facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .goal-preview__facts > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .goal-creation-progress__number {
    transform: none !important;
    transition-duration: 1ms;
  }

  .goal-preview {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
/* Goals filter panel: the panel is a sibling of
   the toolbar row (not nested inside the left flex group), shown as a
   full-width block below the whole row — search box, Filter button, and
   the Overdue/My-direct-reports pills — instead of squeezed into a
   narrow column next to them. */
.goal-toolbar-wrap {
  position: relative;
}
.goal-filter-panel {
  display: none;
  /* .goal-filter-panel is a <form>, and the bare `form` rule above (for
     the app's vanilla-CSS forms) sets flex-direction: column and
     max-width: 480px — overridden here, plus the flex-wrap/align/gap this
     panel needs now that it's no longer relying on Tailwind utilities for
     them. */
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  max-width: none;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
}
.goal-toolbar-wrap:has(.goal-filter-details[open]) .goal-filter-panel {
  /* inline-flex, not flex: a block-level flex container still stretches
     to the full width of .goal-toolbar-wrap, leaving a big empty strip of
     card background to the right of the three short selects. */
  display: inline-flex;
}


.filter-row label {
  min-width: 160px;
}



@media (hover: hover) and (pointer: fine) {
  .coworker-option:hover {
    background: var(--surface-2);
  }
}

.coworker-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent);
}






.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.mode-tabs a {
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.mode-tabs a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}


.template-option {
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.template-option strong {
  display: block;
  margin-bottom: 4px;
}

.template-option p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.template-option.active {
  border-color: var(--accent);
}

.draft-panel textarea::placeholder {
  font-style: italic;
  opacity: 0.65;
}

.review-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

#suggest-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}


.status-text {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  min-height: 1em;
}

.status-text.status-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
}
.status-text.status-warning::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: none;
  background-color: var(--danger);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.goal-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.goal-list .goal-title {
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 8px;
}
.goal-list .goal-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}


.question-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-block .question-text {
  font-size: 0.9375rem;
  font-weight: 500;
}

.question-block .question-category {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: capitalize;
}

.rating-slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rating-slider-track {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rating-slider-endpoint {
  font-size: 0.75rem;
  color: var(--ink-muted);
  flex: none;
  max-width: 110px;
}
.rating-slider-endpoint:last-child {
  text-align: right;
}

.rating-slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%));
  outline: none;
}
.rating-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.rating-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.rating-slider input[type="range"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.rating-slider-value {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}


/* --- Rating summary + review cards (pattern: average + distribution bars,
   then individual reviewer cards — the shape most real review UIs share) --- */


.rating-summary {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .rating-summary {
    flex-direction: row;
  }
}
.rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.rating-bar-row .bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.rating-bar-row .bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.review-frame {
  border-top: 1px solid var(--line-tertiary);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review-card {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  height: auto;
  padding: 8px;
  margin: -8px;
  border-radius: var(--radius);
}
.review-card:hover {
  background: var(--surface-2);
}
.feedback-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.feedback-detail-header__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.feedback-detail-header__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.feedback-detail-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.feedback-detail-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--line-tertiary);
  padding-bottom: 8px;
  color: var(--ink-muted);
}
.feedback-detail-question strong {
  flex: none;
  font-family: var(--font-mono);
  color: var(--ink);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.rating-summary .avg-block {
  min-width: 130px;
}

.rating-summary .avg-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.rating-summary .avg-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}


.rating-summary .avg-stars {
  margin: 8px 0;
}

.rating-summary .avg-count {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}



.rating-bar-row .star-label {
  width: 20px;
  flex: none;
  font-family: var(--font-mono);
}



.rating-bar-row .pct {
  width: 34px;
  text-align: right;
  flex: none;
  font-family: var(--font-mono);
}


.review-frame + h2 {
  margin-top: 2.75rem;
}




.draft-panel + form,
.empty-state + form,
.table-frame + form {
  margin-top: 16px;
}

.avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  flex: none;
}

.avatar-initials.lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.avatar-initials.accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

.page-lede strong {
  color: var(--ink);
  font-weight: 600;
}


.stat-stack .stat-card {
  width: 100%;
}

.review-card .review-body {
  flex: 1;
  min-width: 0;
}

.review-card .review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.review-card .review-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.review-card .reviewer-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.review-card .review-time {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.review-card .review-comment {
  color: var(--ink);
  font-size: 0.9375rem;
  margin: 0;
}


.ai-suggested-note {
  font-size: 0.75rem;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 999px;
  width: fit-content;
}


/* --- Auth screen --- */



.auth-card .wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.auth-card .wordmark svg {
  flex: none;
}

.auth-card h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}
.auth-card p.hint {
  color: var(--ink-muted);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.auth-card form {
  max-width: none;
}

/* --- Stat summary row --- */



.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-top: 8px;
}


/* --- Data table --- */
/* Framed like a product surface, not a loose HTML table: a defined edge
   (border + radius) around the whole grid, tracked-uppercase headers on a
   filled band, hairline row dividers, no zebra. */


table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  background: rgba(20, 21, 22, 0.94);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--accent-soft);
}

td.numeric, th.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* --- Badges & lists --- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(15, 16, 17, 0.86);
  color: var(--ink-muted);
  border: 1px solid var(--glass-border);
}

.badge strong {
  color: var(--ink);
  font-weight: 600;
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}


.people-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.people-list li:last-child {
  border-bottom: none;
}
@media (hover: hover) and (pointer: fine) {
  .people-list li:hover {
    background: var(--surface-2);
  }
}

.people-list .name {
  font-weight: 500;
}

.people-list .email {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.people-list.narrow {
  max-width: 480px;
}


.report-queue li:last-child .report-queue-row {
  border-bottom: none;
}
@media (hover: hover) and (pointer: fine) {
  .report-queue-row:hover {
    background: var(--surface-2);
  }
}
.report-queue-row.active {
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent);
}




.quick-actions .text-link-block {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.quick-actions .text-link-block:last-child {
  border-bottom: none;
}
.quick-actions .text-link-block:hover {
  background: var(--surface-2);
}

.quick-action-tile svg {
  flex: none;
  color: var(--ink-muted);
}
@media (hover: hover) and (pointer: fine) {
  .quick-action-tile:hover {
    background: var(--surface-2);
  }
}
.quick-action-tile .quick-action-arrow {
  margin-left: auto;
  color: var(--ink-muted);
  flex: none;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-card h2 {
  margin-top: 0;
}
.hero-card .people-list {
  border: none;
  box-shadow: none;
  margin-top: 12px;
}
.hero-card .people-list li {
  padding: 16px 0;
}

.person-row .name {
  display: block;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(94, 106, 210, 0.18);
  transition:
    background-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .button-link:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
    transform: translateY(-1px);
  }
}


@media (max-width: 640px) {
  .app-header {
    padding: 16px;
  }
  main {
    padding: 32px 16px 64px;
  }
  .rating-slider-track {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .rating-slider-endpoint {
    max-width: none;
    flex: 1 1 45%;
  }
  .rating-slider input[type="range"] {
    order: 3;
    flex: 1 1 100%;
  }
  table, thead, tbody, tr {
    display: block;
  }
  thead {
    display: none;
  }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 4px 0;
  }
  tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  tbody td:last-child {
    border-bottom: none;
  }
  tbody td::before {
    content: attr(data-label);
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

/* --- Goal preview (Home dashboard) --- */


/* --- Feedback response: sticky context panel + question list --- */

.feedback-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: start;
}

.feedback-side {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-main form {
  max-width: 760px;
}

@media (max-width: 860px) {
  .feedback-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feedback-side {
    position: static;
  }
}

/* --- Report view: cycle filter tabs --- */


.cycle-tab.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .cycle-tab:not(.active):hover {
    background: var(--surface-2);
  }
}

/* --- Feedback: collapsible category cards --- */

.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
  overflow: hidden;
}
.category-card:first-child {
  margin-top: 0;
}

.category-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  text-align: left;
}
.category-toggle[aria-expanded="true"] {
  background: var(--surface-2);
  border-bottom-color: var(--line);
}
@media (hover: hover) and (pointer: fine) {
  .category-toggle:hover {
    background: var(--surface-2);
  }
}
.category-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.category-toggle-icon {
  flex: none;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--ink);
}
.category-card.answered .category-toggle-icon {
  background: var(--success);
  border-color: var(--success);
  color: var(--on-accent);
}

.category-toggle-label {
  flex: 1;
}

.category-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}
.category-body[hidden] {
  display: none;
}

/* ==========================================================================
   Tailwind migration, Phase 1: semantic classes for _ui.html's shared
   macros and the dialog shell in base.html. Extends the .badge/.stat-card/
   .empty-state conventions that already existed here for the vanilla-CSS
   pages, rather than inventing a parallel system — these were previously
   two separate styling worlds (this file vs. Tailwind-generated utilities)
   converging into one.
   ========================================================================== */

/* --- Badge: "info" is new, everything else reuses the existing .badge
   variants above verbatim (accent/danger/warning/success). --- */
.badge.info {
  background: var(--info-soft);
  color: var(--info);
  border-color: transparent;
}

/* --- Buttons: primary reuses the bare `button{}`/`button.secondary`
   rules already defined above. Ghost and danger are new. --- */
button.ghost {
  background: transparent;
  color: var(--ink-muted);
  border: none;
}
button.ghost:hover {
  background: var(--surface-2);
  opacity: 1;
}
button.danger {
  background: transparent;
  color: var(--danger);
  border: none;
}
button.danger:hover {
  background: var(--danger-soft);
  opacity: 1;
}

/* --- Stat card: box styling was missing here before (only the inner
   .stat-value/.stat-label typography existed, above) — filled in now
   rather than duplicated, so vanilla pages and this macro share one
   definition. --- */
.stat-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(20, 21, 22, 0.82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
  padding: 24px;
}
.stat-card--success .stat-value {
  color: var(--success);
}
.stat-card--warning .stat-value {
  color: var(--warning);
}
.stat-card--error .stat-value {
  color: var(--danger);
}

/* --- Filter chip: pill-shaped toggle, e.g. Goals page quick filters. --- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-muted);
  text-decoration: none;
}
.filter-chip:hover {
  background: var(--line);
}
.filter-chip--active,
.filter-chip--active:hover {
  background: var(--accent);
  color: var(--on-accent);
}

/* --- Empty state: box + icon + title/description. .empty-state strong
   (above) predates this and may still be used by markup this migration
   hasn't reached yet — left untouched, these are additive. --- */
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(20, 21, 22, 0.74);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 32px 24px;
  text-align: center;
}
.empty-state--lg {
  padding: 48px 24px;
}
.empty-state svg {
  margin: 0 auto;
  color: var(--line-strong);
}
.empty-state__title {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.empty-state__description {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* --- Dialog shell: the check-in dialog and feedback-detail dialog in
   base.html/report_view.html. Glass effect via the same --glass-* tokens
   the sidebar uses. --- */
dialog.glass-dialog {
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-surface-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-md);
  padding: 0;
  width: 100%;
  max-width: 28rem;
}
dialog.glass-dialog::backdrop {
  background: rgba(1, 1, 2, 0.72);
}

dialog.glass-dialog:focus-visible {
  outline: none !important;
}
.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
}
.dialog__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.dialog__close {
  background: none;
  color: var(--ink-subtle);
  height: auto;
  width: auto;
  padding: 4px;
  border-radius: 999px;
}
.dialog__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.dialog__body {
  padding: 20px;
}

/* --- Alert banner: inline status/error/warning messages (login error,
   dashboard "reminder sent" banners, AI-not-configured notices, etc). --- */
.alert {
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: rgba(20, 21, 22, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: var(--ink);
  font-size: 0.875rem;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.alert--danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}
.alert--warning {
  background: var(--warning-soft);
  border-color: transparent;
  color: var(--warning);
}
.alert--success {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}

/* --- Auth screen shell: centers .auth-card (below) on its own page. --- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
}
.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.6;
  pointer-events: none;
}
.auth-shell::before {
  width: 15rem;
  height: 15rem;
  top: 14%;
  left: max(1rem, calc(50% - 28rem));
  background: rgba(94, 106, 210, 0.18);
}
.auth-shell::after {
  width: 12rem;
  height: 12rem;
  right: max(1rem, calc(50% - 26rem));
  bottom: 18%;
  background: rgba(255, 255, 255, 0.06);
}
.auth-card {
  width: 100%;
  max-width: 25rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-surface-strong);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-md);
  position: relative;
  z-index: 1;
}

/* --- Dashboard building blocks: card, card list, section label, quick
   action row. Used across dashboard_personal/dashboard_hr and reused by
   later pages as the migration continues. --- */
.glass-panel,
.card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(20, 21, 22, 0.82);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}
.card--padded {
  padding: 24px;
}

.link-accent {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.875rem;
}
.link-accent:hover {
  color: var(--accent-hover);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-subtle);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin: 0 0 12px;
}
.section-label + .section-label {
  margin-top: 32px;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-tertiary);
}
.card-list li:last-child {
  border-bottom: none;
}

.card-list--stacked li {
  align-items: flex-start;
}

.card-list--links li {
  padding: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions-grid {
  display: grid;
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 16, 17, 0.86);
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}
.quick-action:hover {
  border-color: rgba(130, 143, 255, 0.32);
  background: var(--surface-3);
  transform: translateY(-1px);
}
.quick-action svg {
  flex: none;
  color: var(--ink-muted);
}
.quick-action span.quick-action__label {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 600;
}
.quick-action .quick-action__arrow {
  color: var(--ink-subtle);
  flex: none;
}

.cycle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.cycle-progress {
  width: min(100%, 13rem);
  height: 0.5rem;
  border: none;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface-4);
  appearance: none;
}
.cycle-progress::-webkit-progress-bar {
  background: var(--surface-4);
  border-radius: var(--radius-pill);
}
.cycle-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: var(--radius-pill);
}
.cycle-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.dashboard-stat-row {
  margin-bottom: 24px;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-panel + .dashboard-panel {
  margin-top: 24px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.panel-meta {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.panel-action {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.list-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.list-identity__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-trailing {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mono-detail {
  min-width: 3ch;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: right;
}

.checkin-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkin-note p {
  margin: 0;
  max-width: none;
}

.checkin-note__body {
  font-size: 0.875rem;
  color: var(--ink);
}

.checkin-note__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: min(100%, 18rem);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(15, 16, 17, 0.86);
  color: var(--ink-subtle);
}

.search-field input,
.search-field select {
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--ink-subtle);
}

.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.toolbar-select {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: rgba(15, 16, 17, 0.86);
}

.listing-summary,
.listing-empty,
.pagination__summary {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pagination__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination__button {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(15, 16, 17, 0.86);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pagination__button:hover:not([disabled]) {
  background: var(--surface-3);
  border-color: rgba(130, 143, 255, 0.32);
}

.pagination__button.is-active {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}

.pagination__button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  color: var(--ink-subtle);
  font-size: 0.75rem;
}

.page-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  max-width: none;
  margin-bottom: 16px;
}

.filter-form button {
  width: auto;
}

.inline-form {
  margin: 0;
  max-width: none;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.table-shell {
  overflow: hidden;
}

.section-spacer {
  margin-top: 32px;
}

.lede-block {
  margin-bottom: 12px;
}

.lede-warning {
  color: var(--warning);
}

.cell-primary {
  color: var(--ink);
  font-weight: 600;
}

.cell-muted {
  color: var(--ink-muted);
}

.cell-subtle {
  color: var(--ink-subtle);
}

.cell-action {
  text-align: right;
}

.entity-link {
  font-size: inherit;
}

.inline-button-link {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  padding: 0;
}

.inline-button-link:hover {
  background: none;
  color: var(--accent-hover);
  transform: none;
}

.inline-button-link:active {
  background: none;
  transform: none;
}

.inline-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.note-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.rich-note {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.stacked-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-surface-muted {
  background: rgba(15, 16, 17, 0.72);
}

.section-heading {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}

.assignment-note {
  margin: 0 0 12px;
}

.field-note {
  font-weight: 400;
  color: var(--ink-subtle);
}

.textarea-sm {
  min-height: 80px;
}

.textarea-md {
  min-height: 90px;
}

.textarea-lg {
  min-height: 110px;
}

.score-chip {
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
}

.score-chip__value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.score-chip__suffix {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-subtle);
}

/* --- "My Team" row actions: badge-award mini-form + check-in link. --- */
.team-row-actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  row-gap: 8px;
}
.team-row-actions__form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  max-width: none;
}
.team-row-actions__form select {
  height: 32px;
  width: 152px;
  font-size: 0.75rem;
  padding: 0 28px 0 12px;
  border-radius: var(--radius-pill);
}
.team-row-actions__form button {
  height: 32px;
  font-size: 0.75rem;
  padding: 0 12px;
  border-radius: var(--radius-pill);
}
.team-row-actions__divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: none;
}
.team-row-actions__link {
  height: auto;
  padding: 0;
  font-size: 0.75rem;
  background: none;
  border: none;
  color: var(--accent-ink);
}

/* ==========================================================================
   Goals page: search/filter toolbar, goal rows, status pills, popovers.
   goal-search.js and goal-popover-position.js key off data-attributes and
   the native [popover] attribute, never class names, so all of this is
   free to be pure vanilla CSS with zero JS risk.
   ========================================================================== */

.goal-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-subtle);
}
.goal-search-field input {
  border: none;
  padding: 0;
  height: auto;
  width: 160px;
  color: var(--ink);
}
.goal-search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.filter-summary::-webkit-details-marker {
  display: none;
}
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.625rem;
  font-weight: 600;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  min-width: 150px;
}
.filter-field select {
  height: auto;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.goal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}
.goal-row--nested {
  padding: 12px 16px 12px 36px;
  background: var(--surface-2);
}
.goal-row__title-block {
  min-width: 0;
  flex: 1;
}
.goal-row__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.goal-row__title {
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-row--nested .goal-row__title {
  font-size: 0.875rem;
}
.goal-row__competency {
  font-size: 0.75rem;
  color: var(--ink-subtle);
  flex: none;
}
.goal-row__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 4px;
}
.goal-row__mismatch {
  color: var(--warning);
}
.goal-row__add-kr {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.goal-row__add-kr:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.goal-row__progress-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-row__progress-track {
  flex: none;
  width: 112px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
@media (max-width: 640px) {
  .goal-row__progress-track {
    display: none;
  }
}
.goal-row__progress-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 200ms var(--ease-out);
}
.goal-row__progress-fill--neutral { background: var(--line-strong); }
.goal-row__progress-fill--success { background: var(--success); }
.goal-row__progress-fill--danger { background: var(--danger); }
.goal-row__progress-fill--warning { background: var(--warning); }

.goal-row__percent {
  flex: none;
  width: 40px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  height: auto;
  padding: 0;
}
.goal-row__percent:hover {
  color: var(--accent);
}
.goal-row__percent--readonly {
  color: var(--ink-subtle);
  cursor: default;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  height: auto;
}
.status-pill--neutral { background: var(--surface-2); color: var(--ink-muted); }
.status-pill--success { background: var(--success-soft); color: var(--success); }
.status-pill--danger { background: var(--danger-soft); color: var(--danger); }
.status-pill--warning { background: var(--warning-soft); color: var(--warning); }
.status-pill--canceled { background: var(--surface-2); color: var(--ink-subtle); text-decoration: line-through; }

/* Native <dialog>-adjacent [popover] panels: progress editor, status
   picker, row menu. Positioned dynamically by goal-popover-position.js. */
[popover] {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 0;
  margin: 0;
}
.popover-menu {
  padding: 8px;
  width: 12rem;
}
.popover-menu form {
  margin: 0;
  max-width: none;
}
.popover-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink-muted);
  background: none;
  border: none;
  height: auto;
  text-decoration: none;
}
.popover-menu-item:hover {
  background: var(--surface-2);
}
.popover-menu-item--active {
  color: var(--ink);
  font-weight: 600;
}
.progress-popover {
  padding: 16px;
  width: 14rem;
}
.progress-popover form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  max-width: none;
}
.progress-popover label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.progress-popover input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--accent);
}

/* Larger empty state used only on the Goals page (icon-in-a-box + CTA +
   tip line — more elaborate than the shared empty_state() macro). */
.goal-empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 64px 24px;
  text-align: center;
}
.goal-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-subtle);
}
.goal-empty-state__title {
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.goal-empty-state__description {
  margin: 8px auto 0;
  max-width: 22rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.goal-empty-state__tip {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

/* Card-list rows that are themselves a link (e.g. "Your reports" picker
   on the new-goal page), rather than a row containing separate actions. */
.card-list__row-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
}
.card-list__row-link:hover {
  background: var(--surface-2);
}
.card-list__row-link--selected,
.card-list__row-link--selected:hover {
  background: var(--info-soft);
}

/* --- Peer combobox (feedback_request.html + peer-combobox.js) --- */
.combobox {
  position: relative;
  width: 100%;
}
.combobox-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.combobox-pills:empty {
  display: none;
  margin-bottom: 0;
}
.peer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 8px 4px 12px;
}
.peer-pill__remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  height: auto;
  line-height: 1;
}
.combobox-dropdown {
  position: absolute;
  z-index: 10;
  margin-top: 4px;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  width: 100%;
  list-style: none;
  padding: 0;
}
.peer-dropdown-item {
  padding: 8px 12px;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.peer-dropdown-item:hover {
  background: var(--surface-2);
}
.peer-dropdown-item__name {
  font-weight: 500;
  color: var(--ink);
}
.peer-dropdown-item__dept {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* --- Segmented control (e.g. Org Roster's Tree/List toggle) --- */
.segmented {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
}
.segmented a {
  padding: 8px 12px;
  color: var(--ink-muted);
  text-decoration: none;
}
.segmented a + a {
  border-left: 1px solid var(--line-strong);
}
.segmented a.active {
  background: var(--accent);
  color: var(--on-accent);
}

/* --- Org roster tree: recursive nested list of people. --- */
.user-tree,
.user-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.user-tree ul {
  padding-left: 24px;
  border-left: 1px solid var(--line-tertiary);
  margin-left: 16px;
}
.user-tree__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.user-tree__name-group {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.text-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-link:hover {
  color: var(--accent-hover);
}
.text-action {
  background: none;
  border: none;
  height: auto;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.text-action:hover {
  color: var(--danger);
  background: none;
}

/* --- Rank badge, e.g. Top Performers list --- */
.rank-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-label--spaced {
  margin-top: 32px;
}

.section-copy {
  margin: 0 0 12px;
}

.status-pill--static {
  cursor: default;
}

.button-inline-icon {
  gap: 8px;
}

.form-shell {
  max-width: 48rem;
}

.form-shell--compact {
  max-width: 32rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: none;
}

.field-span-full {
  grid-column: 1 / -1;
}

.support-text {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.feedback-header__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.reflection-panel {
  background: var(--info-soft);
  border-color: transparent;
}

.reflection-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reflection-line {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.reflection-key {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--info);
}

.goal-shell {
  max-width: 72rem;
}

.goal-toolbar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-toolbar-group {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-filter-clear {
  align-self: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.goal-filter-clear:hover {
  color: var(--ink);
}

.goal-stats {
  margin-bottom: 24px;
}

.goal-children-row {
  padding: 0;
}

.goal-children-list {
  border-top: 1px solid var(--line-tertiary);
}

.goal-empty-cta {
  margin-top: 20px;
}

.goal-summary-badge {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

.report-section {
  margin-bottom: 32px;
}

.chart-panel > div {
  width: 100%;
  min-height: 280px;
}

.badge-group {
  margin-bottom: 32px;
}

.report-comment-card {
  display: flex;
  gap: 12px;
}

.report-comment-body {
  min-width: 0;
}

.report-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-comment-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.report-comment-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.report-comment-text {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.score-breakdown {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 4px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.score-breakdown strong {
  color: var(--ink);
}

.score-breakdown__note {
  color: var(--ink-subtle);
}

.reflection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.reflection-card {
  text-align: left;
}

.reflection-card__label {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.reflection-card__body {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.summary-copy-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-copy-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-copy-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.summary-copy-body {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.feedback-detail-comment {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink);
}

/* ==========================================================================
   Product refinement pass — reduce generic "AI SaaS" signals, keep the app
   data-dense, and make the shell feel like a deliberate product UI.
   (This originally shipped as a dark re-skin with its own duplicate :root —
   that block unconditionally overrode the light tokens defined at the top
   of this file for every page, which is why the app kept rendering dark
   after the light-theme pivot. Removed; the rest of this pass is
   theme-neutral — it only sets spacing/radius/typography and reads colors
   through the shared custom properties, so it inherits the light palette
   from the top :root once the duplicate is gone.)
   ========================================================================== */

body {
  min-height: 100dvh;
  line-height: 1.5;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 2.8vw, 3rem);
  letter-spacing: -0.065em;
}

h2 {
  letter-spacing: -0.05em;
}

p {
  max-width: 62ch;
}

main {
  max-width: 1180px;
  padding: 40px 32px 72px;
}

main.wide {
  max-width: 1400px;
}

.page-head {
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-head--split {
  align-items: flex-start;
}

.page-kicker,
.section-label,
.summary-copy-label,
.reflection-card__label,
.rating-summary .avg-label,
.rating-slider-endpoint,
.goal-row__competency,
.feedback-detail-header__meta {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.page-kicker {
  color: var(--ink-subtle);
}

.dashboard-panel .page-kicker {
  display: none;
}

.section-label {
  margin: 0 0 8px;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--ink-subtle);
}

.page-lede,
.panel-meta,
.list-meta,
.note-meta,
.support-text,
.report-comment-meta,
.summary-copy-body,
.reflection-card__body,
.score-breakdown,
.feedback-detail-question {
  color: var(--ink-subtle);
}

.card,
.stat-card,
.empty-state,
.alert,
.goal-list li,
.category-card,
[popover],
.combobox-dropdown,
.goal-empty-state,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 5rem),
    var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.card::before,
.stat-card::before,
.empty-state::before,
.alert::before,
.goal-list li::before,
.category-card::before,
[popover]::before,
.combobox-dropdown::before,
.goal-empty-state::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.glass-panel {
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}

.sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar .wordmark {
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.sidebar-profile {
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-profile .avatar-initials {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a,
.sidebar-footer a {
  padding: 10px 12px;
  border-radius: 10px;
  border-left: none;
  font-weight: 500;
  transition:
    background-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.sidebar-nav a.active,
.sidebar-subnav a.active {
  background: rgba(94, 106, 210, 0.12);
  color: var(--sidebar-ink-active);
  box-shadow: inset 2px 0 0 var(--accent);
}

.sidebar-subnav {
  margin-left: 16px;
}

.sidebar-subnav a {
  border-radius: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea,
.search-field,
.toolbar-select,
.filter-select,
.goal-search-field,
.filter-summary,
.pagination__button,
.team-row-actions__form select,
.dialog__close,
.goal-empty-state__icon,
.rank-badge {
  border-radius: 12px;
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea {
  height: var(--control-height);
  border-color: var(--line-strong);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

button,
.button-link {
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 0.875rem;
  box-shadow: 0 12px 28px rgba(34, 43, 97, 0.28);
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

button:active,
.button-link:active {
  transform: translateY(0);
}

button.secondary {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}

button.secondary:hover {
  background: var(--surface-3);
}

button.ghost {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}

button.ghost:hover {
  background: var(--surface-3);
}

button.danger {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 90, 103, 0.18);
}

.button-link {
  border-radius: 12px;
}

.mode-tabs,
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.mode-tabs {
  margin-bottom: 0;
  flex-wrap: wrap;
}

.mode-tabs a,
.segmented a {
  border-radius: 10px;
  padding: 8px 12px;
  border-bottom: none;
  color: var(--ink-subtle);
}

.mode-tabs a.active,
.segmented a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.segmented a + a {
  border-left: none;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.filter-chip:hover {
  background: var(--surface-3);
}

.filter-chip--active,
.filter-chip--active:hover {
  border-color: rgba(130, 143, 255, 0.22);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.search-field,
.toolbar-select,
.filter-select,
.goal-search-field,
.filter-summary,
.pagination__button,
.team-row-actions__form select {
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.search-field {
  min-height: 42px;
}

.toolbar-select,
.pagination__button {
  min-height: 40px;
}

.badge {
  border-radius: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.accent {
  border-color: rgba(130, 143, 255, 0.22);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.badge.danger {
  border-color: rgba(239, 90, 103, 0.18);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.warning {
  border-color: rgba(242, 170, 55, 0.18);
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.success {
  border-color: rgba(39, 166, 68, 0.18);
  background: var(--success-soft);
  color: var(--success);
}

.badge.info {
  border-color: rgba(200, 208, 255, 0.18);
  background: var(--info-soft);
  color: var(--info);
}

.status-pill {
  border-radius: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill--neutral {
  background: var(--surface-2);
  color: var(--ink-muted);
}

.status-pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill--canceled {
  background: var(--surface-2);
  color: var(--ink-subtle);
}

.peer-pill {
  border-radius: 10px;
  background: var(--info-soft);
  color: var(--info);
}

.avatar-initials {
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-3));
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.avatar-initials.accent {
  background: var(--accent-soft);
  border-color: rgba(130, 143, 255, 0.22);
  color: var(--accent-ink);
}

.stat-row {
  gap: 12px;
}

.stat-card {
  padding: 20px;
}

.stat-card .stat-value {
  font-size: 1.9rem;
}

.stat-card .stat-label {
  margin-top: 10px;
  color: var(--ink-subtle);
}

.dashboard-stat-row {
  margin-bottom: 0;
}

.table-shell {
  border-color: var(--line);
}

.table-shell table {
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

thead th {
  top: 0;
  background: var(--surface-2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--ink-subtle);
}

tbody td {
  padding: 12px 14px;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}

.card-list li,
.person-row,
.user-tree__row {
  padding-top: 14px;
  padding-bottom: 14px;
}

.card-list li {
  padding-left: 0;
  padding-right: 0;
}

.quick-action {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
}

.quick-action svg {
  width: 36px;
  height: 36px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--accent-ink);
}

.quick-action .quick-action__arrow {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.panel-title-group {
  gap: 6px;
}

.panel-title {
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
}

.alert {
  margin-bottom: 24px;
}

.page-stack > .alert {
  margin-bottom: 0;
}

.dialog__header {
  padding: 16px 20px;
}

.dialog__close {
  border: 1px solid transparent;
  background: transparent;
}

.dialog__close:hover {
  background: var(--surface-2);
}

.auth-shell {
  min-height: 100dvh;
}

.auth-shell::before,
.auth-shell::after {
  display: none;
}

.auth-card {
  max-width: 27rem;
  padding: 28px;
}

.auth-card .wordmark {
  margin-bottom: 0;
}

.auth-card__brand,
.auth-card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-card__brand {
  margin-bottom: 24px;
}

.auth-card__tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.auth-card__footer {
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.dashboard-hero__lead,
.dashboard-hero__progress,
.dashboard-hero__side {
  display: flex;
  flex-direction: column;
}

.dashboard-hero__lead {
  gap: 16px;
}

.dashboard-hero__meta,
.dashboard-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.hero-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.dashboard-hero__side {
  justify-content: space-between;
  gap: 20px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.dashboard-hero__progress {
  gap: 12px;
}

.dashboard-hero__side-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.dashboard-hero__side-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.dashboard-layout__main,
.dashboard-layout__aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-layout__main .dashboard-panel + .dashboard-panel,
.dashboard-layout__aside .dashboard-panel + .dashboard-panel {
  margin-top: 0;
}

.report-page .back-link {
  margin-bottom: 0;
}

.report-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-hero__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.report-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-hero__scorecard {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.report-hero__score-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.report-hero__score-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.report-hero__score-meta {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

.report-hero__tabs {
  align-self: flex-start;
}

.report-hero__stats {
  margin-bottom: 0;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.report-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.report-layout__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.report-layout__main .report-section {
  margin-bottom: 0;
}

.report-layout__aside {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.report-layout__aside .report-side-panel + .report-side-panel {
  margin-top: 0;
}

.report-section__header {
  margin-bottom: 16px;
}

.report-section > form {
  margin-top: 16px;
}

.report-side-panel .badge-row {
  margin-bottom: 0;
}

.report-comment-card {
  align-items: flex-start;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.score-breakdown > span {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.score-breakdown__note {
  color: var(--ink-subtle);
}

.reflection-grid {
  gap: 16px;
  margin-bottom: 0;
}

.summary-copy-stack {
  gap: 20px;
}

.summary-copy-block + .summary-copy-block {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.chart-panel > div {
  min-height: 240px;
}

.panel-surface-muted,
.reflection-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0) 5rem),
    var(--surface-2);
  border-color: var(--line);
}

@media (max-width: 1024px) {
  .dashboard-hero,
  .dashboard-layout,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-hero__side {
    padding-left: 0;
    border-left: none;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .report-layout__aside {
    position: static;
  }
}

@media (max-width: 640px) {
  main {
    padding: 32px 16px 56px;
  }

  .page-head {
    padding-bottom: 16px;
  }

  .stat-card {
    padding: 18px;
  }

  .auth-card {
    padding: 24px;
  }
}

/* ==========================================================================
   SaaS workspace refinements: check-ins, feedback, goals, goal builder.
   ========================================================================== */

.page-head__meta--pills {
  width: auto;
  max-width: 34rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 8px;
}

.checkin-layout,
.feedback-layout,
.goal-builder-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.checkin-layout {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
}

.checkin-form,
.feedback-invite-form,
.goal-builder-form {
  max-width: none;
}

.checkin-form {
  gap: 20px;
}

.checkin-form__intro,
.feedback-subpanel,
.goal-page-toolbar__aside,
.goal-principle,
.goal-template-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 5rem),
    var(--surface-2);
}

.checkin-form__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.checkin-form__eyebrow,
.goal-cycle-panel__eyebrow,
.goal-detail-panel__eyebrow,
.goal-page-toolbar__eyebrow,
.goal-principle__label,
.goal-template-preview__eyebrow,
.feedback-metric-card__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-subtle);
}

.checkin-search-field {
  width: min(100%, 23rem);
  min-width: 15rem;
}

.checkin-form__grid {
  gap: 20px;
}

.checkin-rag-field {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.checkin-note-field textarea {
  min-height: 12rem;
}

.checkin-form__footer,
.goal-source-panel__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkin-form__footer .status-text,
.goal-source-panel__footer .status-text {
  margin: 0;
  max-width: none;
}

.checkin-form__footer .form-actions,
.goal-source-panel__footer .form-actions {
  flex-wrap: wrap;
}

.checkin-side-rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.guide-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.guide-list li:first-child {
  padding-top: 0;
  border-top: none;
}

.guide-list strong {
  color: var(--ink);
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.guide-list span {
  max-width: none;
  color: var(--ink-subtle);
  font-size: 0.875rem;
}

.guide-list--compact li {
  padding: 12px 0;
}

.feedback-layout {
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
}

.feedback-layout__main,
.feedback-layout__aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feedback-layout__aside {
  position: sticky;
  top: 32px;
  align-self: start;
}

.feedback-cycle-panel {
  gap: 20px;
}

.feedback-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feedback-metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.feedback-metric-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.feedback-metric-card__meta {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

.feedback-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.feedback-subpanel {
  gap: 16px;
  padding: 20px;
}

.feedback-invite-form {
  gap: 16px;
}

.feedback-invite-form button {
  align-self: flex-start;
}

.inline-empty-state {
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.inline-empty-state__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.inline-empty-state__body {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.goal-page-toolbar {
  align-items: stretch;
}

.goal-page-toolbar__aside {
  min-width: min(100%, 21rem);
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.goal-page-toolbar__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.goal-page-toolbar__meta {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.goal-page-toolbar__aside .button-link {
  align-self: flex-start;
}

.goal-shell__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.goal-command-panel {
  gap: 18px;
}

.goal-cycle-panel {
  gap: 18px;
}

.goal-cycle-panel__eyebrow,
.goal-detail-panel__eyebrow {
  color: var(--ink-subtle);
}

.goal-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 11rem) minmax(190px, auto);
  align-items: center;
  gap: 16px;
  padding: 0 20px 10px;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.goal-table-head__goal {
  grid-column: 1;
}

.goal-table-head__progress {
  grid-column: 2;
  justify-self: end;
}

.goal-table-head__status {
  grid-column: 3;
  justify-self: start;
}

.goal-cycle-panel__list {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 4rem),
    var(--surface);
}

.goal-search-empty {
  margin: 12px 0 0;
  text-align: center;
}

.goal-builder-layout {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.18fr);
}

.goal-builder-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.goal-builder-layout__sidebar,
.goal-builder-layout__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.goal-builder-form {
  gap: 24px;
}

.report-picker-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.report-picker-card__identity {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-picker-card__badges,
.assignee-panel__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-picker-card__badges {
  justify-content: flex-end;
}

.goal-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-principle {
  padding: 16px 18px;
}

.goal-principle__body {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.goal-source-panel__grid,
.goal-detail-grid {
  gap: 18px;
}

.goal-template-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.98fr);
  gap: 16px;
  align-items: start;
}

.goal-template-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-option {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
}

.template-option strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.template-option p {
  margin: 8px 0 0;
  max-width: none;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-subtle);
}

.template-option:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.template-option.active,
.template-option[aria-pressed="true"] {
  border-color: rgba(130, 143, 255, 0.24);
  background: var(--accent-soft);
}

.goal-template-preview {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.goal-template-preview.is-selected {
  border-color: rgba(130, 143, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.goal-template-preview__title {
  margin: 0;
  font-size: 1.0625rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.goal-template-preview__body {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.goal-template-preview__details {
  margin: 0;
  display: grid;
  gap: 12px;
}

.goal-template-preview__details div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.goal-template-preview__details dt {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-subtle);
}

.goal-template-preview__details dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink);
}

.goal-detail-panel__actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.goal-detail-panel__actions button {
  width: auto;
}

.goal-cycle-panel__list > .goal-row,
.goal-children-list > .goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 11rem) minmax(190px, auto);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.goal-cycle-panel__list > .goal-row:hover,
.goal-children-list > .goal-row:hover {
  background: rgba(255, 255, 255, 0.018);
}

.goal-cycle-panel__list > .goal-row:hover .goal-row__title,
.goal-children-list > .goal-row:hover .goal-row__title {
  color: var(--accent-ink);
}

.goal-cycle-panel__list > .goal-row .goal-row__title-block,
.goal-children-list > .goal-row .goal-row__title-block {
  min-width: 0;
}

.goal-cycle-panel__list > .goal-row .goal-row__progress-cell,
.goal-children-list > .goal-row .goal-row__progress-cell {
  width: 100%;
  max-width: 11rem;
  justify-self: end;
}

.goal-cycle-panel__list > .goal-row .goal-row__progress-track,
.goal-children-list > .goal-row .goal-row__progress-track {
  flex: 1 1 auto;
  width: auto;
}

.goal-cycle-panel__list > .goal-row .goal-row__percent,
.goal-children-list > .goal-row .goal-row__percent {
  flex: none;
  width: auto;
  min-width: 3.5rem;
}

.goal-cycle-panel__list > .goal-row .status-pill,
.goal-children-list > .goal-row .status-pill {
  justify-self: start;
  white-space: nowrap;
}

.goal-children-list {
  background: rgba(255, 255, 255, 0.012);
}

.goal-children-list > .goal-row {
  padding-left: 34px;
}

.goal-children-list > .goal-row .goal-row__title {
  font-size: 0.9rem;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.team-row__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.team-row-actions__form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.team-row-actions__form select {
  width: 12rem;
  height: 36px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0 28px 0 10px;
}

.team-row-actions__form button {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  box-shadow: none;
}

.team-row-actions__link {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: none;
}

.team-row-actions__link:hover {
  background: var(--surface-3);
}

.dialog__status {
  margin: 0;
  padding: 20px;
  max-width: none;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.dialog__status--error {
  color: var(--danger);
}

input[type="date"],
input[type="file"] {
  width: 100%;
  font: inherit;
  min-height: var(--control-height);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input[type="date"] {
  padding: 0 16px;
}

input[type="file"] {
  padding: 8px 10px;
}

input[type="date"]:focus-visible,
input[type="file"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .checkin-layout,
  .feedback-layout,
  .feedback-workspace,
  .goal-builder-layout,
  .goal-template-workbench {
    grid-template-columns: 1fr;
  }

  .feedback-layout__aside {
    position: static;
  }

  .page-head__meta--pills {
    max-width: none;
    justify-content: flex-start;
  }

  .goal-page-toolbar__aside {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .checkin-form__intro,
  .goal-shell__header,
  .page-head__meta--pills {
    align-items: stretch;
  }

  .checkin-form__intro,
  .goal-page-toolbar {
    flex-direction: column;
  }

  .feedback-metric-grid,
  .goal-principles {
    grid-template-columns: 1fr;
  }

  .report-picker-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-picker-card__badges {
    justify-content: flex-start;
  }

  .team-row {
    grid-template-columns: 1fr;
  }

  .team-row__actions {
    justify-content: flex-start;
  }

  .team-row-actions__form {
    width: 100%;
  }

  .team-row-actions__form select {
    flex: 1;
    width: auto;
  }

  .goal-table-head {
    display: none;
  }

  .goal-cycle-panel__list > .goal-row,
  .goal-children-list > .goal-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: start;
  }

  .goal-cycle-panel__list > .goal-row .goal-row__title-block,
  .goal-children-list > .goal-row .goal-row__title-block {
    grid-column: 1 / -1;
  }

  .goal-cycle-panel__list > .goal-row .goal-row__progress-cell,
  .goal-children-list > .goal-row .goal-row__progress-cell {
    justify-self: stretch;
    max-width: none;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .checkin-form__intro,
  .feedback-subpanel,
  .goal-page-toolbar__aside,
  .goal-principle,
  .goal-template-preview,
  .template-option {
    padding: 16px;
  }

  .checkin-search-field {
    min-width: 0;
    width: 100%;
  }

  .goal-detail-panel__actions button,
  .feedback-invite-form button {
    width: 100%;
  }

  .goal-cycle-panel__list > .goal-row,
  .goal-children-list > .goal-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
  }

  .goal-cycle-panel__list > .goal-row .goal-row__progress-track,
  .goal-children-list > .goal-row .goal-row__progress-track {
    display: none;
  }

  .goal-cycle-panel__list > .goal-row .goal-row__progress-cell,
  .goal-children-list > .goal-row .goal-row__progress-cell {
    grid-column: 1;
    justify-self: start;
  }

  .goal-cycle-panel__list > .goal-row .status-pill,
  .goal-children-list > .goal-row .status-pill {
    grid-column: 2;
    justify-self: end;
  }

  .goal-children-list > .goal-row {
    padding-left: 24px;
  }
}

/* Shared search-control fix:
   .search-field and .goal-search-field are labels, so they were inheriting
   the base label column layout and stacking the icon above the input. Keep
   them as true inline controls and let the search box claim the usable row
   width in toolbars. */
.search-field,
.goal-search-field {
  flex-direction: row;
  justify-content: flex-start;
}

.search-field {
  /* flex-basis is resolved along the flex CONTAINER's main axis, not
     always horizontal — inside a row toolbar this sizes width as
     intended, but the checkin/goal forms nest .search-field in a
     column-direction <label>, where the same `flex: 1 1 24rem` was
     resolving as a *height* of 24rem (a ~400px tall empty box). Setting
     `width` instead of `flex-basis` keeps the sizing horizontal-only in
     both contexts. */
  flex: 1 1 auto;
  width: 24rem;
  max-width: 38rem;
}

.search-field > svg,
.goal-search-field > svg {
  flex: none;
  align-self: center;
  color: var(--ink-subtle);
}

.search-field input,
.search-field select,
.goal-search-field input {
  flex: 1 1 auto;
}

.listing-toolbar {
  justify-content: flex-start;
}

.listing-toolbar .toolbar-select {
  margin-left: auto;
}

/* Goal setup simplification: one clear workflow instead of competing side
   panels. The page now reads as choose employee → choose mode → review
   and save, with lighter supporting context. */
.goal-setup-page {
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.goal-page-head {
  margin-bottom: 0;
}

.goal-page-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-step-panel,
.goal-editor-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.goal-step-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.goal-step-panel__eyebrow,
.goal-editor-panel__assignee-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-subtle);
}

.goal-target-panel__toolbar .search-field {
  max-width: none;
}

.goal-assignee-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 5rem),
    var(--surface-2);
}

.goal-assignee-summary__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-assignee-summary__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.report-picker-list--compact {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 4rem),
    var(--surface);
}

.report-picker-list--compact li {
  padding: 0;
}

.report-picker-list--compact .report-picker-card {
  padding: 14px 16px;
}

.goal-editor-panel__header {
  margin-bottom: 2px;
}

.goal-editor-panel__assignee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.goal-editor-panel__assignee strong {
  color: var(--ink);
  font-weight: 600;
}

.goal-builder-form--streamlined {
  gap: 0;
}

.goal-editor-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.goal-builder-form--streamlined > .goal-editor-section:first-child {
  padding-top: 0;
  border-top: none;
}

.goal-builder-form--streamlined > .goal-editor-section:last-child {
  padding-bottom: 0;
}

.goal-guidance-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
  color: var(--ink-subtle);
}

.goal-guidance-list li {
  max-width: 56rem;
}

.goal-guidance-list strong {
  color: var(--ink);
}

.goal-source-panel__grid--streamlined {
  gap: 16px;
}

.goal-template-stack {
  display: grid;
  gap: 16px;
}

.goal-template-list--simple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-template-list--simple .template-option {
  height: 100%;
}

.goal-template-preview--inline {
  min-height: 0;
  padding: 18px;
}

.goal-template-preview--inline .goal-template-preview__details {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.goal-editor-section--review {
  gap: 20px;
}

.goal-editor-section--review .goal-detail-panel__actions {
  margin-top: 4px;
}

/* My Team row simplification: surface the frequent action first, and tuck
   recognition into a lightweight disclosure instead of showing a cramped
   select + submit control on every row. */
.team-row {
  align-items: flex-start;
  gap: 16px 24px;
}

.team-row__actions {
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.team-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.team-row-action:hover {
  background: var(--surface-3);
}

.team-row-action:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.team-row-action--primary {
  background: var(--accent-soft);
  border-color: rgba(130, 143, 255, 0.24);
  color: var(--accent-ink);
}

.team-row-action--primary:hover {
  background: rgba(130, 143, 255, 0.18);
}

.team-row-recognition {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.team-row-recognition > summary {
  list-style: none;
}

.team-row-recognition > summary::-webkit-details-marker {
  display: none;
}

.team-row-recognition[open] > .team-row-action {
  background: var(--surface);
  border-color: var(--line-strong);
}

.team-row-recognition__panel {
  width: min(23rem, 100%);
  min-width: 19rem;
  margin-top: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 4rem),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.team-row-recognition__panel .page-kicker {
  margin: 0;
}

.team-row-recognition__title,
.team-row-recognition__body {
  margin: 0;
  max-width: none;
}

.team-row-recognition__title {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.team-row-recognition__body {
  margin-top: 4px;
  color: var(--ink-subtle);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.team-row-recognition__form {
  margin-top: 14px;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-row-recognition__form button {
  width: 100%;
}

.badge-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}

.badge-picker__option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 150ms var(--ease-out),
    background-color 150ms var(--ease-out),
    color 150ms var(--ease-out);
}

.badge-picker__option:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.badge-picker__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.badge-picker__option svg {
  flex: none;
  color: var(--ink-subtle);
  transition: color 150ms var(--ease-out);
}

.badge-picker__option:has(input:checked) {
  border-color: rgba(94, 106, 210, 0.32);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.badge-picker__option:has(input:checked) svg {
  color: var(--accent-ink);
}

.badge-picker__option:has(input:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .goal-template-list--simple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .goal-assignee-summary,
  .goal-step-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .goal-assignee-summary__facts {
    justify-content: flex-start;
  }

  .goal-template-list--simple {
    grid-template-columns: 1fr;
  }

  .team-row__actions {
    width: 100%;
  }

  .team-row-action,
  .team-row-recognition {
    width: 100%;
  }

  .team-row-recognition__panel {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .goal-page-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Check-in simplification: treat it as a focused utility flow instead of a
   dashboard-within-a-dashboard. */
.checkin-page {
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkin-page__head {
  margin-bottom: 0;
}

.checkin-composer--simple {
  display: flex;
  flex-direction: column;
  width: min(100%, 62rem);
  gap: 20px;
}

.checkin-form--streamlined {
  max-width: none;
  gap: 0;
}

.checkin-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.checkin-form--streamlined > .checkin-step:first-child {
  padding-top: 0;
  border-top: none;
}

.checkin-form__grid--simple {
  gap: 16px;
}

.checkin-form--streamlined .checkin-search-field {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.checkin-form--streamlined .checkin-rag-field {
  max-width: 26rem;
}

.checkin-note-field textarea {
  min-height: 14rem;
}

.checkin-note-tip {
  margin: 0;
  max-width: 42rem;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.checkin-form--streamlined .checkin-form__footer {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .checkin-composer--simple {
    width: 100%;
  }
}

/* Light Linear adaptation:
   The source brief is dark-only, but the user asked for a light workspace.
   This keeps the same discipline — one lavender accent, compact controls,
   restrained hierarchy, controlled glass — translated into inverse
   surfaces rather than the original near-black canvas. */
.sidebar,
.glass-panel,
dialog.glass-dialog {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 248, 252, 0.76)),
    var(--glass-surface);
  border-color: var(--glass-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 44px rgba(103, 118, 148, 0.12);
}

.sidebar {
  border-right: 1px solid var(--sidebar-border);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.62),
    18px 0 48px rgba(103, 118, 148, 0.08);
}

.sidebar-profile {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.sidebar-profile .avatar-initials {
  background: rgba(94, 106, 210, 0.1);
  border-color: rgba(94, 106, 210, 0.14);
  color: var(--accent-ink);
}

.sidebar-toggle:hover,
.sidebar-subnav-toggle:hover,
.sidebar-nav a:hover,
.sidebar-footer a:hover {
  background: rgba(94, 106, 210, 0.08);
  color: var(--sidebar-ink-active);
}

.sidebar-nav a.active,
.sidebar-subnav a.active {
  background: rgba(94, 106, 210, 0.1);
  color: var(--sidebar-ink-active);
  box-shadow:
    inset 0 0 0 1px rgba(94, 106, 210, 0.08),
    inset 2px 0 0 var(--accent);
}

.card,
.stat-card,
.empty-state,
.alert,
.goal-list li,
.category-card,
[popover],
.combobox-dropdown,
.goal-empty-state,
.auth-card {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.card::before,
.stat-card::before,
.empty-state::before,
.alert::before,
.goal-list li::before,
.category-card::before,
[popover]::before,
.combobox-dropdown::before,
.goal-empty-state::before,
.auth-card::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea,
.search-field,
.toolbar-select,
.filter-select,
.goal-search-field,
.filter-summary,
.pagination__button,
.team-row-actions__form select,
.dialog__close,
.goal-empty-state__icon,
.rank-badge,
input[type="date"],
input[type="file"] {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-subtle);
  opacity: 0.82;
}

button,
.button-link {
  box-shadow: 0 12px 28px rgba(94, 106, 210, 0.14);
}

button:hover,
.button-link:hover {
  box-shadow: 0 16px 30px rgba(94, 106, 210, 0.16);
}

button.secondary,
button.ghost,
.team-row-action,
.dialog__close {
  background: rgba(255, 255, 255, 0.82);
}

button.secondary:hover,
button.ghost:hover,
.team-row-action:hover,
.dialog__close:hover {
  background: var(--surface-2);
}

.mode-tabs,
.segmented,
.filter-chip,
.hero-meta-pill,
.quick-action,
.team-row-recognition__panel,
.goal-assignee-summary,
.report-picker-list--compact,
.goal-cycle-panel__list,
.goal-children-list,
.checkin-rag-field,
.goal-template-preview__details div {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.quick-action svg,
.goal-empty-state__icon,
.rank-badge {
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent-ink);
}

.badge,
.status-pill {
  border-color: var(--line);
}

.progress-value {
  min-height: 32px;
}

.peer-chip__remove {
  min-height: 28px;
}

.badge.accent,
.filter-chip--active,
.team-row-action--primary {
  border-color: rgba(94, 106, 210, 0.14);
}

thead th {
  background: rgba(247, 248, 252, 0.94);
}

tbody tr:hover td {
  background: rgba(94, 106, 210, 0.06);
}

tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}

dialog.glass-dialog::backdrop {
  background: rgba(119, 129, 154, 0.2);
}

.alert {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 253, 0.88)),
    var(--surface);
}

/* --------------------------------------------------------------------------
   Performance AI workspace — light, dense product system
   This final layer intentionally replaces the earlier visual experiments.
   It keeps existing component contracts while removing gradients, glow,
   glass cards, oversized radii, and decorative elevation.
   -------------------------------------------------------------------------- */

:root {
  --paper: #f6f7f7;
  --surface: #ffffff;
  --surface-2: #f5f6f6;
  --surface-3: #eef0f2;
  --surface-4: #e7e9ec;
  --ink: #17191c;
  --ink-muted: #4f555e;
  --ink-subtle: #6f757e;
  --ink-tertiary: #8a8f98;
  --line: #dfe2e6;
  --line-strong: #c9cdd3;
  --line-tertiary: #eceef0;
  --accent: #17191c;
  --accent-hover: #30343a;
  --accent-ink: #17191c;
  --accent-soft: #eceef1;
  --on-accent: #ffffff;
  --danger: #c73737;
  --danger-soft: #fff2f2;
  --success: #247c3f;
  --success-soft: #eef8f0;
  --warning: #9a6508;
  --warning-soft: #fff8e8;
  --info: #17191c;
  --info-soft: #f0f1f3;
  --focus-ring: #17191c;
  --sidebar-ink: #5d626a;
  --sidebar-ink-active: #17191c;
  --sidebar-active-bg: #f0f1f4;
  --sidebar-border: #e1e3e6;
  --sidebar-width: 232px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-pill: 9999px;
  --control-height: 44px;
  --shadow-sm: none;
  --shadow-md: none;
}

*, *::before, *::after {
  background-image: none !important;
  box-shadow: none !important;
}

html { color-scheme: light; }

body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

body::before,
.card::before,
.stat-card::before,
.empty-state::before,
.alert::before,
.goal-list li::before,
.category-card::before,
[popover]::before,
.combobox-dropdown::before,
.goal-empty-state::before,
.auth-card::before { display: none; }

p { font-size: 14px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h3 { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }

.tabular,
.mono-detail,
.stat-value,
.report-score,
.inline-stats strong,
.progress-value,
.data-table td,
.data-toolbar__count { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
}

.app-shell { align-items: stretch; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--sidebar-width);
  padding: 16px 12px;
  background: #fbfbfc;
  border-right: 1px solid var(--sidebar-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sidebar-top { height: 44px; margin: 0 0 12px; padding: 0 8px; }
.sidebar .wordmark { font-size: 14px; font-weight: 600; }
.sidebar-toggle { width: 36px; height: 36px; }
.sidebar-nav { gap: 2px; }
.sidebar-nav a,
.sidebar-footer a {
  min-height: 40px;
  padding: 8px 10px;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  color: var(--sidebar-ink);
  font-size: 13px;
}
.sidebar-nav a:hover,
.sidebar-footer a:hover,
.sidebar-toggle:hover,
.sidebar-subnav-toggle:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-nav a.active,
.sidebar-subnav a.active { background: var(--sidebar-active-bg); color: var(--ink); font-weight: 500; }
.sidebar-subnav { margin-left: 28px; gap: 0; border-left: 1px solid var(--line); }
.sidebar-subnav a { padding-left: 14px; background: transparent; }
.sidebar-profile { margin: 0 0 4px; padding: 8px; border: 0; background: transparent; }
.sidebar-footer { border-color: var(--line); }

.app-content {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 32px 36px 64px;
}
:root.sidebar-collapsed .app-content { width: calc(100% - 72px); margin-left: 72px; }

.wide,
.page-stack { width: min(100%, 1440px); max-width: 1440px; margin: 0 auto; }
.page-stack,
.home-page,
.feedback-page,
.goals-page,
.report-page,
.roster-page,
.goal-setup-page,
.checkin-page { display: grid; gap: 24px; }

.page-header,
.report-header {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-header h1,
.report-header h1 { margin: 2px 0 4px; }
.page-header__actions,
.report-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.page-kicker {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.page-lede { max-width: 64ch; margin: 0; color: var(--ink-muted); font-size: 14px; }
.breadcrumb-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.breadcrumb-link:hover { color: var(--ink); }

button,
.button-link,
.icon-text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 13px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
button:hover,
.button-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: none; }
button:active,
.button-link:active { transform: translateY(1px); }
button.secondary,
button.ghost,
.icon-text-button {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
button.secondary:hover,
button.ghost:hover,
.icon-text-button:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
button:disabled { cursor: not-allowed; opacity: .48; }

input[type="email"], input[type="password"], input[type="text"], input[type="search"], input[type="date"], input[type="file"], select, textarea {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 400 14px/1.4 var(--font-sans);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select { appearance: auto; padding-right: 10px; }
textarea { padding: 10px 12px; }
label { color: var(--ink-muted); font-size: 13px; font-weight: 500; }
.field-note { color: var(--ink-subtle); font-size: 12px; font-weight: 400; }
.support-text { color: var(--ink-subtle); font-size: 12px; }

.card,
.data-panel,
.side-section,
.report-charts,
.filter-bar,
.score-strip,
.ai-summary,
.empty-state,
.alert,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.card { background: var(--surface); }
.card--padded,
.data-panel,
.side-section,
.report-charts { padding: 20px; }
.dashboard-panel { gap: 16px; }
.panel-title,
.section-header h2 { margin: 0; font-size: 18px; }
.panel-meta,
.section-header p { margin: 2px 0 0; color: var(--ink-subtle); font-size: 13px; }
.section-header,
.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.section-header { margin-bottom: 16px; }
.subsection-heading { min-height: 36px; padding: 0 4px 8px; border-bottom: 1px solid var(--line); }
.subsection-heading > span { color: var(--ink-subtle); }
.inline-empty,
.side-empty { margin: 0; padding: 16px 4px; color: var(--ink-subtle); font-size: 13px; }

.data-toolbar,
.listing-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -20px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.search-field,
.goal-search-field {
  width: min(100%, 36rem);
  max-width: 36rem;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.search-field input,
.goal-search-field input { min-height: 34px; padding: 0; border: 0; background: transparent; }
.search-field:focus-within,
.goal-search-field:focus-within { border-color: var(--accent); outline: 2px solid #e4e7ff; }
.search-field input:focus,
.goal-search-field input:focus { outline: 0 !important; }
.toolbar-filter select { min-width: 176px; }
.data-toolbar__count { margin-left: auto; color: var(--ink-subtle); font-size: 12px; white-space: nowrap; }
.listing-summary { margin: 10px 0; color: var(--ink-subtle); font-size: 12px; }

.table-scroll { width: 100%; overflow-x: auto; }
.data-table,
.data-panel table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th,
.data-panel table th {
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.data-table td,
.data-panel table td {
  min-height: 52px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-tertiary);
  color: var(--ink-muted);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fafafa; }
.data-table strong,
.cell-primary { color: var(--ink); font-weight: 500; }
.data-table .cell-muted { color: var(--ink-subtle); }
.actions-cell { width: 52px; text-align: right !important; }
.select-cell { width: 44px; text-align: center !important; }
.select-cell input { width: 16px; height: 16px; accent-color: var(--accent); }

.person-cell { min-width: 0; display: flex; align-items: center; gap: 10px; }
.person-cell__copy,
.list-identity__copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.person-cell__copy > strong,
.person-cell__copy > a,
.list-identity__copy > strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.cell-secondary { overflow: hidden; color: var(--ink-subtle); font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.avatar-initials {
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
}
.avatar-initials.accent { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-muted); }

.status-pill,
.badge {
  min-height: 22px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: none;
}
.status-pill--success, .badge.success { background: var(--success-soft); border-color: #cfe8d5; color: var(--success); }
.status-pill--warning, .badge.warning { background: var(--warning-soft); border-color: #ecdcae; color: var(--warning); }
.status-pill--danger, .badge.danger { background: var(--danger-soft); border-color: #efd0d0; color: var(--danger); }
.badge.accent, .badge.info { background: var(--surface-2); border-color: var(--line); color: var(--ink-muted); }
.status-pill:not(.status-pill--static) { min-height: 32px; background: var(--surface); }

.row-actions-trigger {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--ink-subtle);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
}
.row-actions-trigger:hover { background: var(--surface-2); color: var(--ink); }
.row-actions__menu {
  width: 190px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.row-actions__menu a,
.row-actions__menu button {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}
.row-actions__menu a { display: flex; align-items: center; border-radius: 6px; }
.row-actions__menu a:hover,
.row-actions__menu button:hover { background: var(--surface-2); color: var(--ink); }
.row-actions__menu .row-actions__danger { color: var(--danger); }
.row-actions__meta { display: block; padding: 8px 10px; color: var(--ink-subtle); font-size: 11px; line-height: 1.4; }

.segmented,
.mode-tabs {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.segmented a,
.mode-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.segmented a.active,
.mode-tabs a.active { background: var(--surface); color: var(--ink); }

.pagination { min-height: 48px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.pagination__summary { font-size: 12px; }
.pagination__button { min-height: 36px; border-color: var(--line); background: var(--surface); color: var(--ink-muted); }
.pagination__button:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.pagination__button.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }
.pagination__page { color: var(--ink-subtle); font-size: 12px; }

/* Org roster */
.roster-panel { padding-bottom: 12px; }
.roster-panel .data-toolbar { margin-top: -20px; border-top: 0; border-radius: 8px 8px 0 0; }
.roster-table { margin: 0 -20px; width: calc(100% + 40px); }
.role-label { color: var(--ink-subtle); font-size: 12px; font-weight: 500; }
.org-tree,
.org-tree__branch { margin: 0; padding: 0; list-style: none; }
.org-tree { padding-top: 8px; }
.org-tree__item { position: relative; }
.org-tree__branch { position: relative; margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line); }
.org-tree__branch > .org-tree__item::before { content: ""; position: absolute; top: 25px; left: -16px; width: 14px; border-top: 1px solid var(--line); }
.org-tree__row {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, auto) 44px;
  align-items: center;
  gap: 16px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line-tertiary);
}
.org-tree__row:hover { background: #fafafa; }
.org-tree__meta { display: flex; align-items: center; justify-content: flex-end; gap: 16px; color: var(--ink-subtle); font-size: 12px; }
.bulk-bar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin: 0 -20px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.archive-panel > summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 500; list-style-position: inside; }

/* Feedback */
.feedback-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); gap: 24px; align-items: start; }
.feedback-layout__main,
.feedback-layout__aside { display: grid; gap: 16px; }
.feedback-layout__aside { position: static; }
.inline-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 10px; color: var(--ink-subtle); font-size: 12px; }
.inline-stats span { padding-right: 12px; margin-right: 12px; border-right: 1px solid var(--line); }
.inline-stats span:last-child { border: 0; }
.inline-stats strong { color: var(--ink); }
.invite-bar { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.3fr); align-items: start; gap: 24px; scroll-margin-top: 24px; }
.invite-bar__copy h2 { margin: 0; }
.invite-bar__copy p { margin: 4px 0 0; color: var(--ink-subtle); font-size: 13px; }
.feedback-invite-form { max-width: none; display: flex; align-items: flex-start; gap: 8px; }
.feedback-invite-form .combobox { flex: 1; }
.coverage-list { margin: 0; display: grid; }
.coverage-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-tertiary); }
.coverage-list div:last-child { border: 0; }
.coverage-list dt { color: var(--ink); font-weight: 500; }
.coverage-list dd { margin: 0; color: var(--ink-subtle); font-size: 12px; text-align: right; }
.compact-list { margin: 0; padding: 0; list-style: none; }
.compact-list > li { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-tertiary); }
.compact-list > li:last-child { border: 0; }
.compact-list--notes > li { justify-content: flex-start; align-items: flex-start; }
.checkin-list .person-cell { align-items: flex-start; }
.checkin-excerpt { margin-top: 4px; color: var(--ink-muted); font-size: 12px; white-space: normal; }
.text-link { color: var(--accent-ink); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }

/* Goals */
.goals-page .page-search { width: 240px; }
.filter-bar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; }
.filter-bar__form,
.filter-bar__quick { display: flex; align-items: center; gap: 8px; }
.filter-bar__form > label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.filter-bar select { min-width: 140px; min-height: 38px; }
.filter-chip { min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-muted); font-size: 12px; text-decoration: none; }
.filter-chip--active { border-color: var(--accent); color: var(--accent-ink); }
.more-filters { position: relative; }
.more-filters > summary { min-height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-muted); cursor: pointer; list-style: none; }
.more-filters__panel { position: absolute; z-index: 10; top: 42px; left: 0; width: 240px; display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.more-filters__panel label { display: grid; gap: 6px; }
.goal-cycle-panel { padding: 0; overflow: visible; }
.goal-cycle-panel .section-header { margin: 0; padding: 16px 20px; }
.goals-table th:first-child { width: 32%; }
.goals-table td { height: 58px; }
.goal-name-cell { display: flex; align-items: flex-start; gap: 8px; }
.goal-name-cell > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.goal-name-cell strong { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-tree-elbow { color: var(--ink-tertiary); }
.goal-row--nested td:first-child { padding-left: 28px; }
.progress-cell { min-width: 116px; display: flex; align-items: center; gap: 8px; }
.progress-track { width: 72px; height: 5px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.progress-fill { height: 100%; display: block; background: var(--ink-tertiary); }
.progress-fill--success { background: var(--success); }
.progress-fill--warning { background: var(--warning); }
.progress-fill--danger { background: var(--danger); }
.progress-value { min-width: 38px; min-height: 32px; padding: 0 4px; border-color: transparent; background: transparent; color: var(--ink-muted); font-size: 12px; }
.progress-value:hover { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
[popover] { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }

/* Dashboard */
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); gap: 24px; align-items: start; }
.dashboard-layout__main,
.dashboard-layout__aside { display: grid; gap: 16px; }
.dashboard-layout__aside { position: static; }
.action-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.note-body { margin: 0; color: var(--ink); }
.note-meta { margin: 3px 0 0; color: var(--ink-subtle); font-size: 12px; }
.cycle-progress-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.cycle-progress-row progress { width: 100%; height: 6px; accent-color: var(--accent); }
.cycle-panel > p { margin: 10px 0 0; color: var(--ink-subtle); font-size: 12px; }
.quick-links { display: grid; margin-top: 8px; }
.quick-links a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-tertiary); color: var(--ink); font-size: 13px; text-decoration: none; }
.quick-links a:last-child { border: 0; }
.quick-links a:hover { color: var(--accent-ink); }
.recognition-text ul,
.recognition-list { margin: 8px 0 0; padding: 0; list-style: none; }
.recognition-text li,
.recognition-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line-tertiary); font-size: 12px; }
.recognition-text li span,
.recognition-list li span { color: var(--ink-subtle); }

/* Goal setup and check-in */
.goal-setup-page,
.checkin-page { max-width: 1040px; }
.workflow-steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.workflow-steps li { position: relative; display: flex; align-items: center; gap: 8px; color: var(--ink-subtle); font-size: 12px; }
.workflow-steps li::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.workflow-steps li:last-child::after { display: none; }
.workflow-steps li span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); font-variant-numeric: tabular-nums; }
.workflow-steps .is-current { color: var(--ink); font-weight: 500; }
.workflow-steps .is-current span { border-color: var(--accent); color: var(--accent-ink); }
.workflow-steps .is-complete span { border-color: var(--ink-subtle); background: var(--ink); color: #fff; }
.context-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--ink-subtle); font-size: 12px; }
.context-badge strong { color: var(--ink); font-weight: 500; }
.goal-workflow-panel { display: grid; gap: 0; }
.goal-workflow-panel > .goal-mode-tabs { margin-bottom: 20px; justify-self: start; }
.goal-target-panel { display: grid; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.goal-target-panel .listing-toolbar { margin: 0; padding: 0; border: 0; background: transparent; }
.goal-assignee-summary { padding: 10px 12px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface); }
.report-picker-list--compact { border-radius: 6px; background: var(--surface); }
.report-picker-card { min-height: 52px; border-radius: 0; }
.report-picker-card::before { content: ""; width: 14px; height: 14px; flex: none; border: 1px solid var(--line-strong); border-radius: 50%; }
.card-list__row-link--selected::before { border: 4px solid var(--accent); }
.goal-editor-panel { display: grid; gap: 16px; padding-top: 20px; }
.goal-editor-panel__header { margin: 0; }
.goal-editor-panel__assignee { display: none; }
.goal-editor-section { padding: 20px 0; }
.goal-guidance-list { grid-template-columns: repeat(3, 1fr); gap: 16px; padding-left: 18px; font-size: 13px; }
.goal-template-list--simple { grid-template-columns: repeat(3, 1fr); }
.template-option { border-radius: 6px; background: var(--surface); }
.goal-detail-grid { max-width: 780px; }
.goal-detail-panel__actions { display: flex; justify-content: flex-end; }
.checkin-composer { max-width: 760px; padding: 24px; }
.checkin-form { max-width: none; display: grid; gap: 20px; }
.checkin-form__grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; }
.checkin-search-field { width: 100%; max-width: none; }
.checkin-note-field { display: grid; gap: 6px; }
.checkin-note-field textarea { min-height: 180px; }
.form-action-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
button.record .dot { width: 6px; height: 6px; background: var(--danger); }

/* Report */
.report-header__meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.report-score { display: inline-flex; align-items: baseline; gap: 2px; color: var(--ink); }
.report-score strong { font-size: 18px; }
.report-score span { color: var(--ink-subtle); font-size: 12px; }
.report-cycle-tabs { width: fit-content; }
.score-strip { display: flex; align-items: center; gap: 0; padding: 12px 16px; }
.score-strip span { padding: 0 16px; border-right: 1px solid var(--line); color: var(--ink-subtle); font-size: 12px; }
.score-strip span:first-child { padding-left: 0; }
.score-strip span:last-child { border: 0; }
.score-strip strong { color: var(--ink); }
.report-content { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.report-content__main { min-width: 0; display: grid; gap: 28px; }
.report-content__aside { display: grid; gap: 16px; }
.report-section { display: grid; gap: 12px; }
.report-section > .section-header { margin: 0; }
.rating-summary { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding-bottom: 16px; }
.rating-summary__average { display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.rating-summary__average strong { color: var(--ink); font-size: 28px; letter-spacing: -.02em; }
.rating-summary__average span { color: var(--ink-subtle); font-size: 12px; }
.rating-bars { display: grid; gap: 5px; }
.rating-bar-row { display: grid; grid-template-columns: 18px 1fr 40px; align-items: center; gap: 8px; color: var(--ink-subtle); font-size: 11px; }
.bar-track { height: 4px; overflow: hidden; border-radius: 2px; background: var(--surface-3); }
.bar-fill { height: 100%; background: var(--accent); }
.feedback-entry-list { border-top: 1px solid var(--line); }
.feedback-entry-list > div { border-bottom: 1px solid var(--line-tertiary); }
.feedback-entry {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.feedback-entry:hover { background: #fafafa; color: var(--ink); }
.feedback-entry__body { min-width: 0; display: grid; gap: 4px; }
.feedback-entry__header { display: flex; justify-content: space-between; gap: 16px; }
.feedback-entry__header > span { color: var(--ink-subtle); font-size: 11px; }
.feedback-entry__comment { overflow: hidden; color: var(--ink-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.report-quote { margin: 0; padding: 18px 20px; border-left: 2px solid var(--accent); background: var(--surface-2); }
.report-quote p { margin: 0; color: var(--ink); font-size: 14px; }
.report-quote footer { margin-top: 10px; color: var(--ink-subtle); font-size: 12px; }
.reflection-list,
.summary-list { margin: 0; border-top: 1px solid var(--line); }
.reflection-list div,
.summary-list div { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.reflection-list dt,
.summary-list dt { color: var(--ink); font-weight: 500; }
.reflection-list dd,
.summary-list dd { margin: 0; color: var(--ink-muted); white-space: pre-line; }
.ai-summary { padding: 0; overflow: hidden; }
.ai-summary > summary { min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; cursor: pointer; list-style: none; }
.ai-summary > summary span:first-child { display: flex; flex-direction: column; }
.ai-summary > summary small { color: var(--ink-subtle); font-size: 12px; font-weight: 400; }
.ai-summary[open] { padding-bottom: 18px; }
.ai-summary[open] > summary { border-bottom: 1px solid var(--line); }
.ai-summary > :not(summary) { margin-left: 18px; margin-right: 18px; }
.report-charts { margin-top: 8px; }
.chart-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.chart-tabs button { min-height: 40px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-subtle); }
.chart-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); }
.chart-tabs button:hover { background: transparent; color: var(--ink); }
.chart-panel { min-height: 300px; }

/* Login */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: clamp(40px, 10vh, 96px) clamp(24px, 8vw, 120px);
  background: var(--paper);
}
.auth-panel { width: min(100%, 380px); display: grid; gap: 24px; }
.auth-wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 600 14px/1 var(--font-display); }
.auth-panel__header h1 { max-width: 340px; margin: 0; }
.auth-panel__header p { margin: 6px 0 0; color: var(--ink-subtle); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; }
.auth-form button { width: 100%; }
.keyboard-hint { margin: -6px 0 0; color: var(--ink-tertiary); font-size: 11px; text-align: right; }
kbd { padding: 2px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--ink-muted); font: 500 10px/1 var(--font-sans); }
.auth-panel__footer { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }

dialog.glass-dialog {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
dialog.glass-dialog::backdrop { background: rgba(23,25,28,.28); }

@media (max-width: 1100px) {
  .feedback-layout,
  .dashboard-layout,
  .report-content { grid-template-columns: 1fr; }
  .feedback-layout__aside,
  .dashboard-layout__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-content__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .org-tree__row { grid-template-columns: minmax(220px, 1fr) 44px; }
  .org-tree__meta { grid-column: 1; grid-row: 2; justify-content: flex-start; }
}

@media (max-width: 800px) {
  .sidebar { position: static; width: 72px; }
  .sidebar-label, .sidebar-top .wordmark { display: none; }
  .app-content,
  :root.sidebar-collapsed .app-content { width: calc(100% - 72px); margin-left: 0; padding: 24px 18px 48px; }
  .page-header,
  .report-header { flex-direction: column; }
  .page-header__actions,
  .report-actions { width: 100%; justify-content: flex-start; }
  .feedback-layout__aside,
  .dashboard-layout__aside,
  .report-content__aside,
  .action-groups { grid-template-columns: 1fr; }
  .filter-bar__form { width: 100%; align-items: stretch; flex-direction: column; }
  .filter-bar__form > label { justify-content: space-between; }
  .filter-bar select { width: 60%; }
  .invite-bar { grid-template-columns: 1fr; }
  .feedback-invite-form { flex-direction: column; }
  .feedback-invite-form button { width: 100%; }
  .goal-guidance-list,
  .goal-template-list--simple { grid-template-columns: 1fr; }
  .goals-table { min-width: 820px; }
  .workflow-steps li { gap: 4px; }
}

@media (max-width: 560px) {
  .sidebar { display: none; }
  .app-content,
  :root.sidebar-collapsed .app-content { width: 100%; padding: 20px 12px 40px; }
  .card--padded,
  .data-panel,
  .side-section,
  .report-charts { padding: 16px; }
  .data-toolbar,
  .listing-toolbar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .page-header__actions .page-search { width: 100%; }
  .score-strip { align-items: flex-start; flex-direction: column; gap: 8px; }
  .score-strip span { padding: 0; border: 0; }
  .checkin-form__grid { grid-template-columns: 1fr; }
  .form-action-row { align-items: stretch; flex-direction: column-reverse; }
  .form-action-row button { width: 100%; }
  .rating-summary { grid-template-columns: 1fr; }
  .rating-summary__average { padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .reflection-list div,
  .summary-list div { grid-template-columns: 1fr; gap: 4px; }
}

@media print {
  .sidebar,
  .breadcrumb-link,
  .report-actions,
  .listing-toolbar,
  .pagination,
  dialog { display: none !important; }
  .app-content { width: 100%; margin: 0; padding: 0; }
  .report-page { max-width: none; }
  .report-content { grid-template-columns: 1fr; }
  .data-panel,
  .side-section,
  .report-charts,
  .ai-summary { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   v5 — canonical dark product theme
   Exact Linear-derived tokens from the product brief. This block is the
   authoritative theme layer for every authenticated and unauthenticated
   screen; older structural selectors remain only for compatibility.
   -------------------------------------------------------------------------- */

:root {
  --paper: #010102;
  --surface: #0f1011;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --surface-4: #18191a;
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;
  --line: #23252a;
  --line-strong: #34343a;
  --line-tertiary: #23252a;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --accent-ink: #828fff;
  --accent-soft: #141516;
  --on-accent: #ffffff;
  --success: #27a644;
  --success-soft: #141516;
  --warning: #f59e0b;
  --warning-soft: #141516;
  --danger: #ef4444;
  --danger-soft: #141516;
  --info: #5e6ad2;
  --info-soft: #141516;
  --focus-ring: #5e6ad2;
  --sidebar-ink: #8a8f98;
  --sidebar-ink-active: #f7f8f8;
  --sidebar-active-bg: #18191a;
  --sidebar-border: #23252a;
}

html { color-scheme: dark; }
body,
.auth-shell { background: var(--paper); color: var(--ink); }

::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-color: var(--paper); }
::selection { background: var(--accent); color: var(--on-accent); }

.sidebar {
  background: var(--surface-1);
  border-color: var(--hairline, var(--line));
}
.sidebar-nav a:hover,
.sidebar-footer a:hover,
.sidebar-toggle:hover,
.sidebar-subnav-toggle:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-nav a.active,
.sidebar-subnav a.active { background: var(--surface-3); color: var(--ink); }
.sidebar-profile { background: transparent; }
.sidebar-profile .avatar-initials { background: var(--surface-3); border-color: var(--line); color: var(--ink-muted); }

.card,
.data-panel,
.side-section,
.report-charts,
.filter-bar,
.score-strip,
.ai-summary,
.empty-state,
.alert,
.auth-card,
.goal-empty-state,
[popover],
.row-actions__menu,
.more-filters__panel { background: var(--surface-1); border-color: var(--line); color: var(--ink); }

.data-toolbar,
.listing-toolbar,
.bulk-bar,
.data-table th,
.data-panel table th,
.report-quote { background: var(--surface-2); }
.data-table tbody tr:hover td,
.org-tree__row:hover,
.feedback-entry:hover { background: var(--surface-2); color: var(--ink); }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="date"],
input[type="file"],
select,
textarea,
.search-field,
.goal-search-field { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
input::placeholder,
textarea::placeholder { color: var(--ink-tertiary); opacity: 1; }
.search-field:focus-within,
.goal-search-field:focus-within { border-color: var(--accent); outline-color: var(--accent); }

button.secondary,
button.ghost,
.icon-text-button,
.pagination__button,
.filter-chip { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-muted); }
button.secondary:hover,
button.ghost:hover,
.icon-text-button:hover,
.pagination__button:hover,
.filter-chip:hover { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink); }
.button-link,
.button-link:hover,
.segmented,
.mode-tabs { background: var(--surface-2); border-color: var(--line); }
.segmented a.active,
.mode-tabs a.active { background: var(--surface-3); color: var(--ink); }
.badge,
.status-pill { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-muted); }
.status-pill--success,
.badge.success { background: var(--surface-2); border-color: var(--success); color: var(--success); }
.status-pill--warning,
.badge.warning { background: var(--surface-2); border-color: var(--warning); color: var(--warning); }
.status-pill--danger,
.badge.danger { background: var(--surface-2); border-color: var(--danger); color: var(--danger); }
.avatar-initials,
.avatar-initials.accent { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-muted); }
.text-link,
a.link-accent { color: var(--accent-ink); }

/* Rating distribution: width is rendered server-side for guaranteed bars. */
.rating-bars { gap: 8px; }
.rating-bar-row { grid-template-columns: 28px minmax(12rem, 1fr) 44px; gap: 10px; font-size: 12px; }
.rating-bar-row__label { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rating-bar-row .bar-track,
.bar-track { width: 100%; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.rating-bar-row .bar-fill,
.bar-fill { display: block; min-height: 6px; border-radius: 3px; }
.bar-fill--manager { background: var(--accent); }
.bar-fill--peer { background: var(--ink-subtle); }
.chart-panel .apexcharts-legend-text,
.chart-panel .apexcharts-text { font-family: var(--font-sans) !important; }
.chart-panel .apexcharts-tooltip,
.chart-panel .apexcharts-xaxistooltip { background: var(--surface-3) !important; border-color: var(--line-strong) !important; color: var(--ink) !important; }

/* Peer picker: one aligned control row with a viewport-safe dropdown. */
.invite-bar { grid-template-columns: minmax(12rem, .62fr) minmax(28rem, 1.38fr); align-items: start; }
.feedback-invite-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.feedback-invite-form > button { align-self: start; min-width: 124px; }
.peer-combobox-stack { min-width: 0; display: grid; gap: 8px; }
.combobox { position: relative; min-width: 0; }
.combobox > input { width: 100%; }
.combobox-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 300px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .42) !important;
  list-style: none;
}
.peer-dropdown-select-all { position: sticky; top: -4px; z-index: 1; padding: 4px; border-bottom: 1px solid var(--line); background: var(--surface-3); }
.peer-dropdown-select-all label { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--ink-muted); cursor: pointer; }
.peer-dropdown-item { min-height: 48px; padding: 0; border-radius: 6px; }
.peer-dropdown-item:hover { background: var(--surface-2); }
.peer-dropdown-item__label { min-height: 48px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; align-items: center; gap: 10px; padding: 6px 8px; cursor: pointer; }
.peer-dropdown-item__copy { min-width: 0; display: flex; flex-direction: column; }
.peer-dropdown-item__copy strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.peer-dropdown-item__copy span { overflow: hidden; color: var(--ink-subtle); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.peer-dropdown-item input { position: absolute; opacity: 0; pointer-events: none; }
.peer-dropdown-item__check { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; color: transparent; font-size: 11px; }
.peer-dropdown-item[aria-selected="true"] .peer-dropdown-item__check { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.peer-dropdown-empty { padding: 18px 12px; color: var(--ink-subtle); font-size: 13px; }
.peer-selection-meta { min-height: 24px; display: flex; align-items: flex-start; gap: 8px; }
.peer-selected-count { flex: none; padding-top: 3px; color: var(--ink-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.combobox-pills { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.peer-pill { min-height: 24px; padding: 2px 4px 2px 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); color: var(--ink-muted); font-size: 12px; }
.peer-pill__remove { width: 20px; min-height: 20px; padding: 0; border: 0; background: transparent; color: var(--ink-subtle); }

/* Goal header and owner selection. */
.goals-page .filter-bar { min-height: 56px; padding: 8px 12px; }
.goals-page .filter-bar__form { flex: 1; }
.goals-page .filter-bar__form > label { font-size: 12px; }
.goals-page .filter-bar select { min-width: 132px; min-height: 32px; height: 32px; font-size: 12px; }
.goal-filter-search { width: min(18rem, 100%); min-height: 32px; height: 32px; margin-left: 4px; }
.goal-filter-search input { min-height: 30px; height: 30px; font-size: 12px; }
.more-filters > summary { min-height: 32px; height: 32px; }
.filter-bar__quick .filter-chip { min-height: 32px; }
.goal-target-panel { padding-top: 4px; }
.goal-assignee-summary { display: none; }
.report-picker-card::before { display: none; }
.report-picker-card { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.owner-radio { width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-2); }
.card-list__row-link--selected .owner-radio { border: 4px solid var(--accent); background: var(--surface-1); }
.report-picker-card__badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* Template selection separates inspection from committing field values. */
.template-option { background: var(--surface-2); border-color: var(--line); }
.template-option:hover { background: var(--surface-3); border-color: var(--line-strong); }
.template-option.active,
.template-option[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-3); }
.goal-template-preview { background: var(--surface-2); border-color: var(--line); }
.goal-template-preview__details div { background: var(--surface-1); border-color: var(--line); }
#use-template-button { margin-top: 16px; }

dialog.glass-dialog { background: rgba(20, 21, 22, .96); border-color: var(--line-strong); }
dialog.glass-dialog::backdrop { background: rgba(1, 1, 2, .72); }

@media (max-width: 900px) {
  .invite-bar { grid-template-columns: 1fr; }
  .goals-page .filter-bar__form { align-items: stretch; flex-direction: column; }
  .goals-page .filter-bar__form > label { justify-content: space-between; }
  .goal-filter-search { width: 100%; margin-left: 0; }
}

@media (max-width: 560px) {
  .feedback-invite-form { grid-template-columns: 1fr; }
  .feedback-invite-form > button { width: 100%; }
  .rating-bar-row { grid-template-columns: 24px minmax(7rem, 1fr) 40px; }
  .report-picker-card { grid-template-columns: 16px minmax(0, 1fr); }
  .report-picker-card__badges { grid-column: 2; justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   v6 — light workspace and focused sharing flow
   The product uses white working surfaces over a restrained cool gradient.
   Accent remains functional: primary actions, focus, and selected states only.
   -------------------------------------------------------------------------- */

:root {
  --paper: #f3f5fa;
  --surface: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef1f6;
  --surface-4: #e7eaf0;
  --ink: #17191c;
  --ink-muted: #4f555e;
  --ink-subtle: #6f757e;
  --ink-tertiary: #8a8f98;
  --line: #dfe2e7;
  --line-strong: #c9cdd4;
  --line-tertiary: #eceef2;
  --accent: #17191c;
  --accent-hover: #30343a;
  --accent-ink: #17191c;
  --accent-soft: #eceef1;
  --on-accent: #ffffff;
  --success: #247c3f;
  --success-soft: #eef8f0;
  --warning: #9a6508;
  --warning-soft: #fff8e8;
  --danger: #c73737;
  --danger-soft: #fff2f2;
  --info: #17191c;
  --info-soft: #f0f1f3;
  --focus-ring: #17191c;
  --sidebar-ink: #5d626a;
  --sidebar-ink-active: #17191c;
  --sidebar-active-bg: #f0f1f4;
  --sidebar-border: #e1e3e7;
}

html { color-scheme: light; }

body,
.auth-shell {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(23, 25, 28, .08), transparent 30rem),
    radial-gradient(circle at 94% 2%, rgba(79, 85, 94, .07), transparent 26rem),
    linear-gradient(180deg, #fcfdff 0%, #f5f7fb 48%, #eef2f7 100%) !important;
  background-attachment: fixed;
  color: var(--ink);
}

::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-color: var(--surface-2); }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

.sidebar {
  background: rgba(255, 255, 255, .92);
  border-color: var(--sidebar-border);
}
.sidebar-nav a:hover,
.sidebar-footer a:hover,
.sidebar-toggle:hover,
.sidebar-subnav-toggle:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-nav a.active,
.sidebar-subnav a.active { background: var(--sidebar-active-bg); color: var(--ink); }
.sidebar-profile { background: transparent; }
.sidebar-profile .avatar-initials { background: var(--surface-3); border-color: var(--line); color: var(--ink-muted); }

.card,
.data-panel,
.side-section,
.report-charts,
.filter-bar,
.score-strip,
.ai-summary,
.empty-state,
.alert,
.auth-card,
.goal-empty-state,
[popover],
.row-actions__menu,
.more-filters__panel {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.data-toolbar,
.listing-toolbar,
.bulk-bar,
.data-table th,
.data-panel table th,
.report-quote { background: var(--surface-2); }
.data-table tbody tr:hover td,
.org-tree__row:hover,
.feedback-entry:hover { background: var(--surface-2); color: var(--ink); }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="date"],
input[type="file"],
select,
textarea,
.search-field,
.goal-search-field {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
input::placeholder,
textarea::placeholder { color: var(--ink-tertiary); opacity: 1; }
.search-field:focus-within,
.goal-search-field:focus-within { border-color: var(--accent); outline-color: var(--accent); }

button.secondary,
button.ghost,
.icon-text-button,
.pagination__button,
.filter-chip {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-muted);
}
button.secondary:hover,
button.ghost:hover,
.icon-text-button:hover,
.pagination__button:hover,
.filter-chip:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.button-link,
.button-link:hover,
.segmented,
.mode-tabs { background: var(--surface-2); border-color: var(--line); }
.segmented a.active,
.mode-tabs a.active { background: var(--surface); color: var(--ink); }
.badge,
.status-pill { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-muted); }
.status-pill--success,
.badge.success { background: var(--success-soft); border-color: #bddfc6; color: var(--success); }
.status-pill--warning,
.badge.warning { background: var(--warning-soft); border-color: #ecd8aa; color: var(--warning); }
.status-pill--danger,
.badge.danger { background: var(--danger-soft); border-color: #edc6c6; color: var(--danger); }
.avatar-initials,
.avatar-initials.accent { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-muted); }
.text-link,
a.link-accent { color: var(--accent-ink); }

/* Goals: the four everyday controls remain one visual toolbar. */
.goals-page .filter-bar {
  min-height: 64px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end !important;
  gap: 12px;
  padding: 10px 12px;
  overflow: visible;
}
.goals-page .filter-bar__form {
  min-width: 0;
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(132px, .75fr) minmax(132px, .75fr) minmax(132px, .75fr) minmax(200px, 1.3fr) auto;
  align-items: end !important;
  gap: 8px;
}
.goals-page .filter-bar__form > label {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.goals-page .filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
}
.goals-page .goal-filter-search {
  align-self: end;
  width: 100%;
  min-height: 34px;
  height: 34px;
  margin: 0;
}
.goals-page .filter-bar__form > .goal-filter-search {
  display: flex !important;
  flex-direction: row;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  line-height: normal;
}
.goals-page .goal-filter-search svg { flex: none; }
.goals-page .goal-filter-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  line-height: 32px;
  box-shadow: none !important;
}
.goals-page .goal-filter-search input:focus-visible { outline: none !important; }
.goals-page .more-filters { align-self: end; }
.goals-page .more-filters > summary {
  min-width: 104px;
  min-height: 34px;
  height: 34px;
  justify-content: center;
  white-space: nowrap;
}
.goals-page .filter-bar__quick .filter-chip { min-height: 34px; height: 34px; }
.goals-page .filter-bar__quick { align-self: end; padding-bottom: 0; }

/* Feedback: a compact launcher opens a focused, social-style share dialog. */
.invite-bar {
  grid-template-columns: minmax(12rem, .7fr) minmax(19rem, 1.3fr);
  align-items: center;
  background: var(--surface);
}
.feedback-share-form { min-width: 0; }
.peer-share-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.peer-share-summary > div { min-width: 0; display: grid; gap: 3px; }
.peer-share-summary__label { color: var(--ink); font-size: 13px; font-weight: 600; }
.peer-selected-count { padding: 0; color: var(--ink-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.peer-share-summary button { flex: none; }

.peer-picker-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: min(720px, calc(100dvh - 40px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(38, 43, 58, .22), 0 6px 18px rgba(38, 43, 58, .10) !important;
}
.peer-picker-dialog::backdrop {
  background-color: rgba(29, 32, 42, .42);
  background-image: linear-gradient(rgba(29, 32, 42, .08), rgba(29, 32, 42, .08)) !important;
  backdrop-filter: blur(2px);
}
.peer-picker__header {
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line-tertiary);
}
.peer-picker__header h3 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.peer-picker__header p { margin: 3px 0 0; color: var(--ink-subtle); font-size: 13px; }
.peer-picker__close {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  margin: -8px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent !important;
  color: var(--ink-subtle) !important;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
.peer-picker__close:hover { background: var(--surface-2) !important; color: var(--ink) !important; }
.peer-picker__search {
  min-height: 44px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-subtle);
}
.peer-picker__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 25, 28, .12) !important; }
.peer-picker__search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none !important;
}
.peer-picker__search input:focus-visible { outline: none !important; }
.peer-picker__selected {
  display: flex;
  gap: 8px;
  margin: 0 16px 10px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.peer-chip {
  flex: none;
  max-width: 180px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 5px 3px 3px;
  border: 1px solid #d8dadd;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
}
.peer-chip__avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 9px;
  font-weight: 600;
}

.goals-page .filter-select select {
  font-size: 13px;
}

.goals-page .filter-field--status {
  min-width: 176px;
}
.peer-chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peer-chip__remove {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent !important;
  color: var(--ink-subtle) !important;
  font-size: 17px;
  line-height: 1;
}
.peer-chip__remove:hover { background: rgba(23, 25, 28, .08) !important; color: var(--ink) !important; }
.peer-picker__results {
  min-height: 230px;
  max-height: min(370px, calc(100dvh - 286px));
  overflow-y: auto;
  border-top: 1px solid var(--line-tertiary);
}
.peer-picker-list { margin: 0; padding: 0; list-style: none; }
.peer-picker-select-all {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line-tertiary);
  background: rgba(255, 255, 255, .96);
}
.peer-picker-select-all label {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  color: var(--ink-muted);
  font-size: 12px;
  cursor: pointer;
}
.peer-picker-item { min-height: 58px; border-bottom: 1px solid var(--line-tertiary); }
.peer-picker-item:last-child { border-bottom: 0; }
.peer-picker-item:hover,
.peer-picker-item[aria-selected="true"] { background: var(--surface-2); }
.peer-picker-item__label {
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  padding: 7px 20px;
  cursor: pointer;
}
.peer-picker-item__avatar { width: 36px; height: 36px; border-radius: 50%; }
.peer-picker-item__copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.peer-picker-item__copy strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.peer-picker-item__copy span { overflow: hidden; color: var(--ink-subtle); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.peer-picker-item input { position: absolute; opacity: 0; pointer-events: none; }
.peer-picker-item__check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  font-size: 12px;
  font-weight: 700;
}
.peer-picker-item[aria-selected="true"] .peer-picker-item__check { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.peer-picker-empty { min-height: 220px; display: grid; place-content: center; gap: 3px; padding: 24px; text-align: center; }
.peer-picker-empty strong { color: var(--ink); font-size: 13px; }
.peer-picker-empty span { color: var(--ink-subtle); font-size: 12px; }
.peer-picker__footer {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.peer-dialog-count { color: var(--ink-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.peer-picker__actions { display: flex; align-items: center; gap: 8px; }

/* Report controls are neutral rows; only selected state and actions use ink. */
.feedback-entry {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ink) !important;
}
.feedback-entry:hover {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}
.chart-tabs button {
  background: transparent !important;
  border-color: transparent !important;
  border-bottom-color: transparent !important;
  color: var(--ink-subtle) !important;
}
.chart-tabs button:hover { background: var(--surface-2) !important; color: var(--ink) !important; }
.chart-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent) !important;
  background: transparent !important;
  color: var(--ink) !important;
}

.bar-track { background: var(--surface-3); }
.bar-fill--manager { background: var(--accent); }
.bar-fill--peer { background: var(--ink-subtle); }
.chart-panel .apexcharts-tooltip,
.chart-panel .apexcharts-xaxistooltip { background: var(--surface) !important; border-color: var(--line-strong) !important; color: var(--ink) !important; }

dialog.glass-dialog { background: rgba(255, 255, 255, .97); border-color: var(--line-strong); }
dialog.glass-dialog::backdrop { background: rgba(29, 32, 42, .42); }

@media (max-width: 1050px) {
  .goals-page .filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }
  .goals-page .filter-bar__quick { justify-self: end; }
}

@media (max-width: 760px) {
  .goals-page .filter-bar__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .goals-page .more-filters { align-self: end; }
  .invite-bar { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .goals-page .filter-bar__form { grid-template-columns: minmax(0, 1fr); }
  .goals-page .filter-bar__quick { justify-self: stretch; }
  .peer-picker-dialog { width: 100vw; max-height: 88dvh; margin: auto 0 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 12px 12px 0 0; }
  .peer-picker__header { padding-left: 16px; }
  .peer-picker-item__label { padding-right: 16px; padding-left: 16px; }
  .peer-picker__footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* Compact operational empty state: the page header already owns the CTA. */
.goals-empty-state {
  min-height: 88px;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-style: solid;
  background: var(--surface);
  text-align: left;
  backdrop-filter: none;
}
.goals-empty-state__mark {
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: var(--ink);
}
.goals-empty-state__copy { min-width: 0; }
.goals-empty-state .empty-state__title { margin: 0; font-size: 14px; line-height: 1.35; }
.goals-empty-state .empty-state__description { max-width: 62ch; margin: 3px 0 0; font-size: 13px; }
.goals-empty-state__action { justify-self: end; }

/* Check-in employee combobox: compact rows and a bounded, anchored menu. */
#checkin-subject-combobox { position: relative; z-index: 2; }
.checkin-search-field {
  min-height: 44px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface);
}
.checkin-search-field:focus-within {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(23, 25, 28, .11) !important;
}
.checkin-search-field svg { flex: none; color: var(--ink-subtle); }
.checkin-search-field #checkin-subject-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none !important;
}
.checkin-search-field #checkin-subject-input:focus-visible { outline: none !important; }
.checkin-subject-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 248px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(23, 25, 28, .14), 0 3px 10px rgba(23, 25, 28, .08) !important;
  list-style: none;
}
.checkin-subject-option {
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
}
.checkin-subject-option:hover,
.checkin-subject-option:focus-visible,
.checkin-subject-option[aria-selected="true"] {
  outline: none !important;
  background: var(--surface-2);
}
.checkin-subject-option__avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 10px;
}
.checkin-subject-option__copy { min-width: 0; display: grid; gap: 1px; }
.checkin-subject-option__copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkin-subject-option__copy span {
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkin-subject-option__check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 11px;
  font-weight: 700;
}
.checkin-subject-option[aria-selected="true"] .checkin-subject-option__check {
  background: var(--ink);
  color: var(--surface);
}
.checkin-subject-empty {
  min-height: 104px;
  display: grid;
  place-content: center;
  gap: 3px;
  padding: 16px;
  text-align: center;
}
.checkin-subject-empty strong { color: var(--ink); font-size: 13px; }
.checkin-subject-empty span { color: var(--ink-subtle); font-size: 12px; }

@media (max-width: 560px) {
  .goals-empty-state { grid-template-columns: 3px minmax(0, 1fr); }
  .goals-empty-state__action { grid-column: 2; justify-self: start; }
  .checkin-subject-dropdown { max-height: 220px; }
}

/* Flat content sections: one boundary per region, no nested card treatment. */
.feedback-page .invite-bar {
  padding: 20px 4px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}
.feedback-page .peer-share-summary {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.feedback-page .peer-share-summary__label { font-size: 13px; line-height: 1.35; }
.feedback-page .peer-selected-count { font-size: 12px; line-height: 1.35; }
.feedback-page .peer-share-summary button { min-height: 36px; height: 36px; }

/* Goals table type and controls use the same compact UI scale. */
.goals-page .data-table th {
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
}
.goals-page .data-table td { color: var(--ink-muted); font-size: 13px; }
.goals-page .goal-name-cell strong,
.goals-page .person-cell__copy > strong { font-size: 13px; font-weight: 600; }
.goals-page .cell-secondary { font-size: 12px; }
.goals-page .progress-value { color: var(--ink-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.goals-page .status-pill {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.goals-page .status-pill--neutral { background: var(--surface-2); color: var(--ink-muted); }
.goals-page .status-pill--success { border-color: #cfe8d5; background: var(--success-soft); color: var(--success); }
.goals-page .status-pill--warning { border-color: #ecdcae; background: var(--warning-soft); color: var(--warning); }
.goals-page .status-pill--danger { border-color: #efd0d0; background: var(--danger-soft); color: var(--danger); }
.goals-page .status-pill--canceled { background: var(--surface-2); color: var(--ink-subtle); text-decoration: line-through; }
.goals-page [data-goal-card][aria-busy="true"] { opacity: .62; }

.goals-page .popover-menu {
  width: 174px;
  padding: 4px;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(23, 25, 28, .14), 0 2px 8px rgba(23, 25, 28, .08) !important;
}
.goals-page .popover-menu form { display: block; margin: 0; }
.goals-page .popover-menu-item {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border-radius: 5px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}
.goals-page .popover-menu-item:hover { background: var(--surface-2); color: var(--ink); }
.goals-page .popover-menu-item--active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.goals-page .popover-menu-item--active::after { content: "✓"; color: var(--ink); font-size: 11px; }

.goals-page .progress-popover {
  width: 210px;
  padding: 12px;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(23, 25, 28, .14), 0 2px 8px rgba(23, 25, 28, .08) !important;
}
.goals-page .progress-popover form { display: grid; gap: 10px; }
.progress-popover__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-popover__header span { color: var(--ink-muted); font-size: 12px; font-weight: 500; }
.progress-popover__header output { color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goals-page .progress-popover input[type="range"] { width: 100%; margin: 0; accent-color: var(--ink); }
@media (max-width: 760px) {
  .feedback-page .invite-bar { padding-right: 0; padding-left: 0; }
  .feedback-page .peer-share-summary { align-items: flex-start; }
}

/* Goal templates: readable selector plus an editable, flat draft workspace. */
.goal-setup-page .goal-template-list--simple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.goal-setup-page .template-option {
  min-height: 82px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line) !important;
  border-radius: 6px;
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  text-align: left;
}
.goal-setup-page .template-option:hover {
  border-color: var(--line-strong) !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}
.goal-setup-page .template-option.active,
.goal-setup-page .template-option[aria-pressed="true"] {
  border-color: var(--ink) !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}
.goal-setup-page .template-option strong {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.template-option__summary {
  max-width: 36ch;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .goal-setup-page .goal-template-list--simple { grid-template-columns: minmax(0, 1fr); }
}

/* Global transient notifications: accessible, theme-aligned, and outside flow. */
.app-toast-viewport {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.app-toast {
  --toast-tone: #5e6ad2;
  --toast-soft: #eef0ff;
  --toast-border: #d8dcfa;
  position: relative;
  min-height: 70px;
  overflow: hidden;
  border: 1px solid var(--toast-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 22px 55px rgba(23, 25, 28, .16), 0 4px 14px rgba(23, 25, 28, .08) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(100%) scale(.97);
  transform-origin: bottom right;
  will-change: transform, opacity;
  transition: opacity 400ms ease, transform 400ms ease;
}
.app-toast::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--toast-tone);
}
.app-toast--visible { opacity: 1; transform: translateY(0) scale(1); }
.app-toast--leaving { opacity: 0; transform: translateY(100%) scale(.97); }
.app-toast--success { --toast-tone: #237a3b; --toast-soft: #eaf7ee; --toast-border: #cae8d2; }
.app-toast--error { --toast-tone: #b42318; --toast-soft: #fff0ef; --toast-border: #f2cfcb; }
.app-toast--warning { --toast-tone: #a45f00; --toast-soft: #fff7e6; --toast-border: #efdcb4; }
.app-toast--info { --toast-tone: #3568d4; --toast-soft: #edf3ff; --toast-border: #d3dffc; }
.app-toast__main {
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 12px;
  padding: 14px 10px 13px 14px;
}
.app-toast__icon-wrap {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--toast-tone) 18%, transparent);
  border-radius: 10px;
  background: var(--toast-soft);
  color: var(--toast-tone);
}
.app-toast__icon {
  width: 17px;
  height: 17px;
}
.app-toast__spinner {
  animation: app-toast-spin 800ms linear infinite;
}
.app-toast__spinner circle {
  opacity: .22;
}
.app-toast__content {
  min-width: 0;
  align-self: center;
  display: grid;
  gap: 2px;
  padding-top: 1px;
}
.app-toast__title {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.app-toast__message {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
}
.app-toast__time {
  margin-top: 2px;
  color: var(--ink-tertiary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.app-toast__close {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  align-self: start;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 9px;
  background: transparent !important;
  color: var(--ink-tertiary) !important;
  box-shadow: none !important;
}
.app-toast__close svg { width: 15px; height: 15px; }
.app-toast__actions {
  display: flex;
  justify-content: flex-end;
  margin: -3px 12px 13px 60px;
}
.app-toast__action {
  width: auto;
  min-height: 32px !important;
  height: 32px;
  padding: 0 12px !important;
  border: 1px solid var(--toast-border) !important;
  border-radius: 8px !important;
  background: var(--toast-soft) !important;
  color: var(--toast-tone) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
.app-toast__action.is-complete { border-color: #9fd0aa !important; color: #237a3b !important; }
.app-toast__action:disabled { cursor: wait; opacity: .7; }
.app-toast__progress-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--toast-tone) 10%, transparent);
}
.app-toast__progress {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--toast-tone);
  transform: scaleX(1);
  transform-origin: left center;
}
.app-toast__close:focus-visible,
.app-toast__action:focus-visible {
  outline: 2px solid var(--toast-tone) !important;
  outline-offset: 2px;
}

@keyframes app-toast-spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .app-toast__close:hover { background: var(--surface-3) !important; color: var(--ink) !important; }
  .app-toast__action:hover { border-color: var(--toast-tone) !important; filter: saturate(1.08); }
}

@media (max-width: 560px) {
  .app-toast-viewport { right: 12px; bottom: 12px; left: 12px; width: auto; }
  .app-toast { transform-origin: bottom center; }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast,
  .app-toast--visible,
  .app-toast--leaving {
    transform: none;
    transition: opacity 160ms var(--ease-out);
  }

  .app-toast__spinner { animation: none; }
}

/* Keep accordion headers secondary to the submit action even against the
   app-wide primary-button selector declared in earlier theme layers. */
.feedback-response-page button.category-toggle,
.feedback-response-page button.category-toggle:hover,
.feedback-response-page button.category-toggle:active {
  border-color: transparent !important;
  background: var(--surface-2) !important;
  color: var(--ink-muted) !important;
}

.feedback-response-page button.category-toggle[aria-expanded="true"] {
  border-bottom-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

/* Feedback response workspace
   Questions get the primary column; guidance and drafting tools stay compact.
   Rating color is progressive and appears only after the reviewer interacts. */
.feedback-response-page {
  max-width: 1320px;
}

.feedback-response-page .page-head {
  margin-bottom: 0;
}

.feedback-response-page .feedback-header {
  align-items: flex-start;
}

.feedback-response-page .feedback-header__copy {
  gap: 6px;
}

.feedback-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-header__meta span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.feedback-response-page .page-lede {
  max-width: 68ch;
  margin-top: 2px;
}

.feedback-response-page .feedback-layout {
  grid-template-columns: minmax(280px, .68fr) minmax(560px, 1.32fr);
  gap: 24px;
}

.feedback-response-page .feedback-side {
  position: static;
  gap: 14px;
}

.feedback-response-page .feedback-side .card {
  padding: 18px;
  border-radius: 8px;
}

.feedback-notes-heading {
  display: grid;
  gap: 3px;
}

.feedback-notes-heading h2 {
  font-size: 15px;
}

.feedback-notes-heading p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.feedback-response-page #commentary-notes {
  min-height: 132px;
  line-height: 1.55;
}

.feedback-response-page .review-progress-track {
  margin-top: 4px;
  background: var(--surface-4);
}

.feedback-response-page .review-progress-fill {
  background: var(--success);
  transition: transform 200ms var(--ease-out);
}

.feedback-response-page .feedback-main,
.feedback-response-page .feedback-main form {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.feedback-response-page .feedback-main form {
  gap: 14px;
}

.feedback-response-page .category-card {
  margin-top: 0;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.feedback-response-page button.category-toggle,
.feedback-response-page button.category-toggle:hover,
.feedback-response-page button.category-toggle:active {
  min-height: 54px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: var(--surface-2);
  color: var(--ink-muted);
  box-shadow: none !important;
  transform: none;
}

.feedback-response-page button.category-toggle[aria-expanded="true"] {
  border-bottom-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.feedback-response-page .category-toggle-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--surface);
  font-size: 12px;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.feedback-response-page .category-card.answered .category-toggle-icon {
  background: var(--success);
  border-color: var(--success);
}

.feedback-response-page .category-toggle-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.category-toggle-progress {
  flex: none;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.feedback-response-page .category-card.answered .category-toggle-progress {
  color: var(--success);
  font-family: var(--font-sans);
  font-weight: 650;
}

.feedback-response-page .category-body {
  gap: 0;
  padding: 0;
}

.feedback-response-page .question-block {
  --rating-accent: var(--ink);
  position: relative;
  gap: 16px;
  padding: 20px 18px 18px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: var(--surface);
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out);
}

.feedback-response-page .question-block + .question-block {
  border-top: 1px solid var(--line);
}

.feedback-response-page .question-block[data-rating="1"] {
  --rating-accent: var(--danger);
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.feedback-response-page .question-block[data-rating="2"] {
  --rating-accent: #b55f16;
  border-left-color: #d98a43;
  background: #fff7ef;
}

.feedback-response-page .question-block[data-rating="3"] {
  --rating-accent: var(--warning);
  border-left-color: #d3a23c;
  background: var(--warning-soft);
}

.feedback-response-page .question-block[data-rating="4"] {
  --rating-accent: #3b7d4b;
  border-left-color: #83bd91;
  background: #f3faf4;
}

.feedback-response-page .question-block[data-rating="5"] {
  --rating-accent: var(--success);
  border-left-color: var(--success);
  background: #e6f5ea;
}

.question-block__header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.question-index {
  padding-top: 2px;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.feedback-response-page .question-block .question-text {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: pretty;
}

.feedback-response-page .question-text .badge {
  margin-left: 5px;
  vertical-align: 2px;
}

.feedback-response-page .rating-slider {
  gap: 10px;
  padding-left: 38px;
}

.feedback-response-page .rating-slider-track {
  display: grid;
  grid-template-columns: 108px minmax(120px, 1fr) 108px;
  gap: 12px;
}

.feedback-response-page .rating-slider-endpoint {
  max-width: none;
  color: var(--ink-subtle);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.rating-range-shell {
  position: relative;
  min-width: 0;
  height: 42px;
  touch-action: pan-y;
}

.rating-range-rail {
  position: absolute;
  top: 11px;
  right: 10px;
  left: 10px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-strong);
}

.rating-range-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--rating-accent);
  transform: scaleX(.5);
  transform-origin: left center;
  will-change: transform;
}

.rating-range-thumb {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transform: translate3d(50%, -50%, 0);
  will-change: transform;
}

.rating-range-thumb-core {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--rating-accent);
  box-shadow: 0 2px 8px rgba(22, 24, 27, .2);
  transition:
    background-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.rating-range-thumb-core::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--rating-accent);
  border-radius: inherit;
  opacity: 0;
  transform: scale(.9);
  transition:
    opacity 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.rating-range-shell.is-dragging .rating-range-thumb-core {
  box-shadow: 0 4px 14px rgba(22, 24, 27, .24);
  transform: scale(1.14);
}

.rating-range-shell.is-dragging .rating-range-thumb-core::after {
  opacity: .32;
  transform: scale(1);
}

.rating-range-shell.is-settling .rating-range-fill,
.rating-range-shell.is-settling .rating-range-thumb {
  transition: transform 180ms var(--ease-in-out);
}

.feedback-response-page .rating-range-shell input[type="range"] {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent !important;
  cursor: grab;
}

.feedback-response-page .rating-range-shell input[type="range"]:active {
  cursor: grabbing;
}

.feedback-response-page .rating-range-shell input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.feedback-response-page .rating-range-shell input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}

.feedback-response-page .rating-range-shell input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.feedback-response-page .rating-range-shell input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rating-range-shell:has(input:focus-visible) .rating-range-thumb-core {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rating-range-stops {
  position: absolute;
  top: 26px;
  right: 7px;
  left: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.question-block.rating-instant,
.question-block.rating-instant .rating-range-thumb-core,
.question-block.rating-instant .rating-range-thumb-core::after {
  transition-duration: 0ms !important;
}

.rating-slider__result {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.feedback-response-page .rating-slider-value {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rating-accent);
  border-radius: 50%;
  background: var(--surface);
  color: var(--rating-accent);
  font-size: 13px;
  font-weight: 700;
}

.rating-slider__result span {
  color: var(--rating-accent);
  font-size: 12px;
  font-weight: 600;
}

.feedback-response-page .ai-suggested-note {
  margin: 0 0 0 38px;
  padding: 8px 10px;
  border-left: 2px solid var(--rating-accent);
  background: rgba(255, 255, 255, .72);
  color: var(--ink-muted);
  font-size: 11px;
}

.feedback-comment-section {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.feedback-comment-section__heading {
  display: grid;
  gap: 3px;
}

.feedback-comment-section__heading h2 {
  font-size: 15px;
}

.feedback-comment-section__heading p,
.feedback-submit-row p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.feedback-comment-section #free-text-comment {
  min-height: 128px;
}

.feedback-comment-section #comment-word-count {
  min-height: 0;
  margin: -4px 0 0;
  text-align: right;
}

.feedback-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}

.feedback-submit-row button {
  width: auto;
  flex: none;
}

/* Explicit RAG colors in the check-in control and report status history. */
.checkin-rag-field[data-status="red"] select,
.status-stack .badge.danger {
  border-color: #edc6c6 !important;
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.checkin-rag-field[data-status="amber"] select,
.status-stack .badge.warning {
  border-color: #ecd8aa !important;
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

.checkin-rag-field[data-status="green"] select,
.status-stack .badge.success {
  border-color: #bddfc6 !important;
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.checkin-rag-field option[value="red"] { color: var(--danger); }
.checkin-rag-field option[value="amber"] { color: var(--warning); }
.checkin-rag-field option[value="green"] { color: var(--success); }

.status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .feedback-response-page button.category-toggle:hover {
    background: var(--surface-3);
  }
}

@media (max-width: 1080px) {
  .feedback-response-page .feedback-layout {
    grid-template-columns: minmax(240px, .6fr) minmax(480px, 1.4fr);
  }

  .feedback-response-page .rating-slider-track {
    grid-template-columns: 92px minmax(100px, 1fr) 92px;
  }
}

@media (max-width: 900px) {
  .feedback-response-page .feedback-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .feedback-response-page .rating-slider,
  .feedback-response-page .ai-suggested-note {
    margin-left: 0;
    padding-left: 0;
  }

  .feedback-response-page .rating-slider-track {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .feedback-response-page .rating-slider-endpoint:last-child {
    display: none;
  }

  .feedback-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-submit-row button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-response-page .question-block,
  .feedback-response-page .category-toggle-icon,
  .feedback-response-page .review-progress-fill,
  .rating-range-fill,
  .rating-range-thumb,
  .rating-range-thumb-core,
  .rating-range-thumb-core::after {
    transition-duration: 1ms;
  }

  .rating-range-shell.is-dragging .rating-range-thumb-core,
  .rating-range-shell.is-dragging .rating-range-thumb-core::after {
    transform: none;
  }
}

/* Goal assignment: one clear hierarchy, one full-width owner target. */
.goal-setup-page .goal-target-panel {
  gap: 10px;
  padding-top: 0;
  padding-bottom: 20px;
}
.goal-setup-page .goal-owner-header {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.goal-owner-count {
  color: var(--ink-subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.goal-setup-page .report-picker-list--compact,
.goal-setup-page .report-picker-list--compact > li,
.goal-setup-page .report-picker-card {
  width: 100%;
  box-sizing: border-box;
}
.goal-setup-page .report-picker-list--compact {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.goal-setup-page .report-picker-list--compact > li + li {
  border-top: 1px solid var(--line);
}
.goal-setup-page .report-picker-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
}
.goal-setup-page .report-picker-card:hover {
  background: var(--surface-2);
}
.goal-setup-page .report-picker-card.card-list__row-link--selected {
  background: var(--surface-3);
}
.goal-setup-page .report-picker-card__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.goal-setup-page .report-picker-card .list-identity__copy {
  min-width: 0;
}
.goal-setup-page .report-picker-card .list-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.goal-setup-page .report-picker-card .list-meta {
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-setup-page .report-picker-card__status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.goal-setup-page .owner-radio {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.goal-setup-page .card-list__row-link--selected .owner-radio {
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 0 4px var(--surface);
}
.goal-setup-page .goal-editor-panel {
  gap: 12px;
  padding-top: 20px;
}
.goal-setup-page .goal-editor-panel__header {
  min-height: 28px;
}
.goal-setup-page .goal-builder-form--streamlined > .goal-editor-section:first-child {
  padding-top: 4px;
}
.goal-setup-page .goal-editor-section--review {
  gap: 16px;
}

@media (max-width: 680px) {
  .goal-setup-page .goal-owner-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .goal-setup-page .report-picker-card {
    grid-template-columns: 16px minmax(0, 1fr);
  }
  .goal-setup-page .report-picker-card__status {
    grid-column: 2;
    justify-content: flex-start;
  }
  .goal-setup-page .report-picker-card .list-meta {
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   Shared alignment pass
   One page gutter, one header rhythm, and one compact filter geometry.
   -------------------------------------------------------------------------- */
.app-content {
  padding: 0 36px;
}
main:not(.auth-shell) {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
  padding: 32px 0 64px;
}
main.wide:not(.auth-shell) {
  width: min(100%, 1440px);
  max-width: 1440px;
}
.page-head {
  min-height: 72px;
  gap: 4px;
  margin: 0 0 24px;
  padding-bottom: 20px;
}
.page-head h1,
.page-header h1,
.report-header h1 {
  margin: 2px 0 4px;
}
.page-head__copy,
.page-header > div,
.report-header > div,
.section-header > div,
.panel-title-group {
  min-width: 0;
}
.page-head__copy { gap: 4px; }
.goal-page-head { margin-bottom: 0; }
.page-header__actions,
.report-actions,
.page-toolbar__actions,
.summary-row {
  align-items: center;
  gap: 8px;
}
.section-header {
  min-height: 36px;
  gap: 16px;
}
.section-header h2,
.panel-title {
  text-wrap: balance;
}
.section-header p,
.panel-meta,
.page-lede {
  text-wrap: pretty;
}
.data-toolbar,
.listing-toolbar {
  align-items: center;
  gap: 8px;
}
.search-field,
.goal-search-field,
.filter-form select,
.filter-form button {
  min-height: 44px;
}
.search-field,
.goal-search-field,
.filter-form select,
.filter-form button,
.filter-chip,
.filter-clear,
.more-filters > summary {
  transition:
    border-color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

/* Legacy admin filters now share the same baseline and spacing as data toolbars. */
.filter-form {
  align-items: end;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.filter-form .filter-field {
  min-width: 148px;
  display: grid;
  gap: 5px;
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.filter-form .filter-field select,
.filter-form > button {
  width: auto;
  height: 44px;
  margin: 0;
  font-size: 13px;
}
.summary-row { margin-bottom: 16px; }

/* Goals filters: quick state belongs with the controls; clearing stays secondary. */
.goals-page .filter-bar {
  min-height: 76px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end !important;
  gap: 16px;
  padding: 12px;
  overflow: visible;
}
.goals-page .filter-bar__controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.goals-page .filter-bar__form {
  min-width: 0;
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(132px, .72fr) minmax(132px, .72fr) minmax(132px, .72fr) minmax(200px, 1.25fr) auto;
  align-items: end !important;
  gap: 8px;
}
.goals-page .filter-bar__form > label {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.goals-page .filter-bar select,
.goals-page .goal-filter-search,
.goals-page .more-filters > summary,
.goals-page .filter-chip--quick,
.goals-page .filter-clear {
  min-height: 44px;
  height: 44px;
}
.goals-page .filter-bar select {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px;
}
.goals-page .filter-bar__form > .goal-filter-search {
  align-self: end;
  width: 100%;
  max-width: none;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 11px;
  line-height: normal;
}
.goals-page .goal-filter-search svg { flex: none; }
.goals-page .goal-filter-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  line-height: 42px;
  box-shadow: none !important;
}
.goals-page .goal-filter-search:focus-within {
  border-color: var(--ink);
  outline: 2px solid rgba(23, 25, 28, .12);
  outline-offset: 1px;
}
.goals-page .goal-filter-search input:focus-visible { outline: none !important; }
.goals-page .more-filters {
  position: relative;
  align-self: end;
}
.goals-page .more-filters > summary {
  min-width: 120px;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.goals-page .more-filters > summary::-webkit-details-marker { display: none; }
.goals-page .more-filters > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms var(--ease-out);
}
.goals-page .more-filters[open] > summary {
  border-color: var(--ink);
  background: var(--surface-2);
  color: var(--ink);
}
.goals-page .more-filters[open] > summary::after { transform: rotate(225deg); }
.goals-page .more-filters__panel {
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  width: 260px;
  gap: 12px;
  padding: 12px;
  transform: translateY(0) scale(1);
  transform-origin: top right;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  box-shadow: 0 14px 34px rgba(23, 25, 28, .12), 0 2px 8px rgba(23, 25, 28, .06) !important;
}
.goals-page .filter-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.goals-page .filter-chip--quick {
  align-self: end;
  justify-content: center;
  padding: 0 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.goals-page .filter-chip--quick.filter-chip--active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.goals-page .filter-clear {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.goals-page .filter-clear:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}
.goals-page .filter-clear:focus-visible,
.goals-page .filter-chip--quick:focus-visible,
.goals-page .more-filters > summary:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
}

@starting-style {
  .goals-page .more-filters[open] .more-filters__panel {
    opacity: 0;
    transform: translateY(-4px) scale(.98);
  }
}

@media (hover: hover) and (pointer: fine) {
  .goals-page .filter-bar select:hover,
  .goals-page .goal-filter-search:hover,
  .goals-page .more-filters > summary:hover,
  .goals-page .filter-chip--quick:hover {
    border-color: var(--ink-tertiary);
    background-color: var(--surface-2);
    color: var(--ink);
  }
  .goals-page .filter-chip--quick.filter-chip--active:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: var(--surface);
  }
}

@media (max-width: 1100px) {
  .goals-page .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .goals-page .filter-clear { justify-self: end; }
}

@media (max-width: 900px) {
  .app-content,
  :root.sidebar-collapsed .app-content { padding: 0 18px; }
  main:not(.auth-shell),
  main.wide:not(.auth-shell) { padding: 24px 0 48px; }
  .goals-page .filter-bar__controls { grid-template-columns: minmax(0, 1fr); }
  .goals-page .filter-bar__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goals-page .filter-chip--quick { justify-self: start; }
}

@media (max-width: 560px) {
  .app-content,
  :root.sidebar-collapsed .app-content { padding: 0 12px; }
  main:not(.auth-shell),
  main.wide:not(.auth-shell) { padding: 20px 0 40px; }
  .page-head,
  .page-header,
  .report-header { min-height: 0; padding-bottom: 16px; }
  .goals-page .filter-bar__form { grid-template-columns: minmax(0, 1fr); }
  .goals-page .more-filters,
  .goals-page .more-filters > summary,
  .goals-page .filter-chip--quick { width: 100%; }
  .goals-page .more-filters__panel { right: 0; left: 0; width: 100%; }
  .goals-page .filter-clear { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .goals-page .more-filters__panel,
  .goals-page .more-filters > summary::after {
    transform: none;
    transition: opacity 160ms var(--ease-out);
  }
}

@media print {
  .app-content,
  :root.sidebar-collapsed .app-content { width: 100%; margin: 0; padding: 0; }
  main:not(.auth-shell),
  main.wide:not(.auth-shell) { width: 100%; max-width: none; padding: 0; }
}

/* Employee profile
   One identity plane, one contextual performance surface, and one details
   rail. Inner groups use dividers instead of nested cards. */
.profile-page {
  --profile-control-height: 44px;
}

.profile-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--line);
}

.profile-hero__identity {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.profile-avatar {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid #252a36;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: 0 12px 28px rgba(34, 42, 61, 0.16) !important;
}

.profile-avatar__status {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--success);
}

.profile-hero__copy {
  min-width: 0;
}

.profile-hero__copy .page-kicker {
  margin: 0 0 3px;
}

.profile-hero__copy h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.profile-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 5px 0 10px;
  max-width: none;
  color: var(--ink-muted);
  font-size: 14px;
}

.profile-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-tags > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.profile-tags .profile-active-status {
  border-color: transparent;
  background: transparent;
  color: var(--success);
}

.profile-active-status i {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

.profile-hero__actions {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-action {
  min-height: var(--profile-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.profile-action--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.profile-action:active {
  transform: translateY(1px);
}

.profile-action:focus-visible,
.profile-quick-actions a:focus-visible,
.profile-metric-row a:focus-visible,
.profile-details a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .profile-action--quiet:hover {
    border-color: var(--ink-tertiary);
    background: var(--surface-2);
  }

  .profile-action--primary:hover {
    border-color: #2a3040;
    background: #2a3040;
  }
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.82fr);
  align-items: start;
  gap: 24px;
  margin-top: 24px;
}

.profile-performance {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(95, 108, 138, 0.09) !important;
}

.profile-section-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
}

.profile-section-header .page-kicker {
  margin: 0 0 2px;
}

.profile-section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.profile-cycle-label,
.profile-state {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.profile-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  border-top: 1px solid var(--line);
}

.profile-score {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 24px 22px;
  background-color: var(--surface-2);
}

.profile-metric-label {
  margin: 0 0 6px;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.profile-score__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}

.profile-score__value strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 58px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
}

.profile-score__value span {
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
}

.profile-score__context {
  margin: 9px 0 12px;
  max-width: none;
  color: var(--ink-muted);
  font-size: 13px;
}

.profile-trend {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.profile-trend--positive { color: var(--success); }
.profile-trend--negative { color: var(--danger); }

.profile-score__footnote {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.profile-score__empty {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-score__empty strong {
  font-size: 20px;
}

.profile-score__empty p {
  margin: 5px 0 0;
  max-width: 40ch;
  color: var(--ink-muted);
  font-size: 13px;
}

.profile-metric-stack {
  min-width: 0;
  border-left: 1px solid var(--line);
}

.profile-metric-row {
  padding: 20px 22px;
}

.profile-metric-row + .profile-metric-row {
  border-top: 1px solid var(--line);
}

.profile-metric-row__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-metric-value {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.profile-metric-value span {
  color: var(--ink-subtle);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-metric-percent {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.profile-metric-row progress {
  width: 100%;
  height: 5px;
  display: block;
  margin: 14px 0 9px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  appearance: none;
  background: var(--surface-3);
}

.profile-metric-row progress::-webkit-progress-bar {
  border-radius: inherit;
  background: var(--surface-3);
}

.profile-metric-row progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--success);
}

.profile-metric-row progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--success);
}

.profile-metric-row > p {
  margin: 8px 0 0;
  max-width: none;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-metric-row > a {
  display: inline-flex;
  gap: 6px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.profile-state {
  font-family: var(--font-sans);
}

.profile-state--complete {
  border-color: rgba(39, 142, 71, 0.32);
  background: var(--success-soft);
  color: var(--success);
}

.profile-section-header--compact a {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.profile-section-header--compact a:hover {
  color: var(--ink);
}

.profile-rail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.profile-rail__section {
  padding: 20px;
}

.profile-rail__section + .profile-rail__section {
  border-top: 1px solid var(--line);
}

.profile-rail__section > h2,
.profile-section-header--compact h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.profile-section-header--compact {
  min-height: 0;
  align-items: center;
  padding: 0;
}

.profile-section-header--compact h2 {
  margin: 0;
}

.profile-details {
  margin: 16px 0 0;
}

.profile-details > div {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line-tertiary);
}

.profile-details dt,
.profile-details dd {
  min-width: 0;
  margin: 0;
  font-size: 13px;
}

.profile-details dt {
  color: var(--ink-subtle);
}

.profile-details dd {
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

.profile-details a {
  color: inherit;
  text-decoration: none;
}

.profile-details a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-manager {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-manager > div {
  min-width: 0;
  display: grid;
}

.profile-manager strong,
.profile-manager span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-manager strong {
  color: var(--ink);
  font-size: 13px;
}

.profile-manager span {
  color: var(--ink-subtle);
  font-size: 12px;
}

.profile-rail__empty {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.profile-quick-actions {
  display: grid;
  margin: 0 -8px -8px;
}

.profile-quick-actions a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out);
}

.profile-quick-actions a span:last-child {
  color: var(--ink-subtle);
  transition: transform 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .profile-quick-actions a:hover {
    background: var(--surface-2);
  }

  .profile-quick-actions a:hover span:last-child {
    transform: translateX(2px);
  }
}

@media (max-width: 1040px) {
  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero__actions {
    justify-content: flex-start;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-rail__section + .profile-rail__section {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .profile-hero {
    gap: 22px;
    padding-bottom: 22px;
  }

  .profile-avatar {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
    font-size: 19px;
  }

  .profile-hero__copy h1 {
    font-size: 29px;
  }

  .profile-hero__actions {
    width: 100%;
  }

  .profile-action {
    flex: 1 1 auto;
  }

  .profile-metrics,
  .profile-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-metric-stack {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .profile-rail__section + .profile-rail__section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .profile-hero__identity {
    align-items: flex-start;
  }

  .profile-avatar {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    font-size: 16px;
  }

  .profile-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-section-header,
  .profile-score,
  .profile-metric-row,
  .profile-rail__section {
    padding-right: 16px;
    padding-left: 16px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .profile-action,
  .profile-quick-actions a,
  .profile-quick-actions a span:last-child {
    transition: none;
  }
}

/* Admin navigation
   The administration area is a distinct navigation group. Its connector
   communicates hierarchy without turning every child into another card. */
.sidebar-admin-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-profile__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.sidebar-profile__copy .sidebar-profile-name,
.sidebar-profile-role {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-role {
  color: var(--ink-tertiary);
  font-size: 10px;
  font-weight: 500;
}

.sidebar-section-label {
  margin: 0 10px 5px;
  color: var(--ink-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-admin-row {
  gap: 2px;
}

.sidebar-admin-row > a {
  min-height: 42px;
}

.sidebar-subnav-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out);
}

.sidebar-subnav-toggle .chevron {
  transition: transform 160ms var(--ease-out);
}

.sidebar-admin-group.is-current .sidebar-admin-row > a:not(.active) {
  color: var(--ink);
  font-weight: 500;
}

.sidebar-subnav {
  position: relative;
  gap: 1px;
  margin: 2px 0 4px 14px;
  padding: 3px 0 3px 14px;
  border-left: 0;
}

.sidebar-subnav::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: var(--line-strong);
}

.sidebar-subnav a {
  position: relative;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-subtle);
  font-size: 12px;
  font-weight: 500;
  opacity: 1;
  transition:
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out);
}

.sidebar-subnav a::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 2px);
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

.sidebar-subnav a.active {
  background: var(--surface-3);
  color: var(--ink);
  font-weight: 600;
}

.sidebar-subnav a.active::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 2px;
  border-radius: var(--radius-pill);
  background: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-subnav-toggle:hover {
    border-color: var(--line);
  }

  .sidebar-subnav a:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

:root.sidebar-collapsed .sidebar-admin-group {
  margin-top: 8px;
  padding-top: 8px;
}

:root.sidebar-collapsed .sidebar-admin-row > a {
  width: 100%;
  justify-content: center;
}

:root.sidebar-collapsed .sidebar-admin-group .sidebar-subnav {
  display: none !important;
}

@media (max-width: 800px) {
  .sidebar-admin-group {
    margin-top: 8px;
    padding-top: 8px;
  }

  .sidebar-admin-row > a {
    width: 100%;
    justify-content: center;
  }

  .sidebar-admin-group .sidebar-subnav {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-subnav-toggle,
  .sidebar-subnav-toggle .chevron,
  .sidebar-subnav a {
    transition: none;
  }
}

/* Self-reflection
   A single writing surface with adjacent context. Field guidance sits beside
   each answer so the form remains scannable without adding nested panels. */
.self-reflection-page {
  display: grid;
  gap: 24px;
}

.self-reflection-page > .breadcrumb-link {
  width: fit-content;
  margin: 0;
}

.self-reflection-header {
  min-height: 92px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.self-reflection-header > div {
  min-width: 0;
}

.self-reflection-header .page-kicker {
  margin: 0 0 3px;
}

.self-reflection-header h1 {
  margin: 0 0 5px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.self-reflection-header .page-lede {
  max-width: 68ch;
  font-size: 14px;
  text-wrap: pretty;
}

.self-reflection-status {
  flex: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.self-reflection-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-tertiary);
}

.self-reflection-status.is-complete {
  border-color: rgba(39, 142, 71, 0.32);
  color: var(--success);
}

.self-reflection-status.is-complete i {
  background: var(--success);
}

.self-reflection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.72fr);
  align-items: start;
  gap: 24px;
}

.self-reflection-editor {
  max-width: none;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.self-reflection-editor__header {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.self-reflection-editor__header .page-kicker {
  margin: 0 0 3px;
}

.self-reflection-editor__header h2 {
  margin: 0;
  font-size: 18px;
}

.self-reflection-editor__header > p {
  align-self: end;
  margin: 0;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 13px;
  text-wrap: pretty;
}

.reflection-field {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 22px 24px;
}

.reflection-field + .reflection-field {
  border-top: 1px solid var(--line-tertiary);
}

.reflection-field__label {
  min-width: 0;
}

.reflection-field__label label {
  display: block;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.reflection-field__label p {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.reflection-field textarea {
  width: 100%;
  min-height: 132px;
  margin: 0;
  padding: 12px 14px;
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.reflection-field textarea::placeholder {
  color: var(--ink-tertiary);
}

.reflection-field textarea:focus {
  border-color: var(--ink);
  background: var(--surface);
  outline: 2px solid rgba(23, 25, 28, 0.1);
  outline-offset: 1px;
}

.self-reflection-editor__actions {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.self-reflection-editor__actions > p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.self-reflection-editor__actions > div {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.self-reflection-editor__actions button,
.self-reflection-cancel {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.self-reflection-editor__actions button {
  width: auto;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.self-reflection-cancel {
  border: 1px solid transparent;
  color: var(--ink-muted);
  text-decoration: none;
}

.self-reflection-cancel:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.self-reflection-cancel:focus-visible,
.self-reflection-report-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .self-reflection-editor__actions button:hover {
    border-color: #2a3040;
    background: #2a3040;
  }
}

.self-reflection-context {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.self-reflection-context section {
  padding: 20px;
}

.self-reflection-context section + section {
  border-top: 1px solid var(--line);
}

.self-reflection-context .page-kicker {
  margin: 0 0 3px;
}

.self-reflection-context h2 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.self-reflection-context section:first-child h2 {
  font-size: 18px;
}

.self-reflection-context p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

.self-reflection-context dl {
  margin: 15px 0 0;
}

.self-reflection-context dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line-tertiary);
}

.self-reflection-context dt,
.self-reflection-context dd {
  margin: 0;
  font-size: 12px;
}

.self-reflection-context dt { color: var(--ink-subtle); }
.self-reflection-context dd { color: var(--ink); }

.self-reflection-context ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.self-reflection-context li {
  position: relative;
  padding-left: 13px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.self-reflection-context li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-tertiary);
}

.self-reflection-report-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.self-reflection-report-link:hover {
  background: var(--surface-2);
}

@media (max-width: 980px) {
  .self-reflection-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .self-reflection-context {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .self-reflection-context section + section {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .self-reflection-report-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .self-reflection-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .self-reflection-editor__header,
  .reflection-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .self-reflection-editor__actions {
    align-items: stretch;
    flex-direction: column;
    padding-right: 16px;
    padding-left: 16px;
  }

  .self-reflection-editor__actions > div {
    justify-content: flex-end;
  }

  .self-reflection-context {
    grid-template-columns: minmax(0, 1fr);
  }

  .self-reflection-context section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 440px) {
  .self-reflection-editor__actions > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .self-reflection-editor__actions button,
  .self-reflection-cancel {
    width: 100%;
  }
}

/* Admin operations: one health summary and one active work queue. */
.admin-dashboard-page {
  display: grid;
  gap: 20px;
}

.admin-dashboard-header {
  margin-bottom: 0;
}

.admin-config-alert {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(183, 123, 17, 0.34);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--warning);
}

.admin-config-alert > svg { margin-top: 2px; }
.admin-config-alert h2 { margin: 0; font-size: 13px; }
.admin-config-alert p { margin: 2px 0 0; max-width: none; color: #76591f; font-size: 12px; }
.admin-config-alert code { padding: 1px 4px; border: 1px solid #e6d3a3; border-radius: 4px; background: #fff; font: 500 11px/1.4 var(--font-mono); }
.admin-config-alert__detail { padding-top: 7px; }
.admin-config-alert__action {
  min-height: 36px;
  width: auto;
  padding: 0 10px;
  border: 1px solid #d9bd79 !important;
  background: transparent !important;
  color: #76591f !important;
  font-size: 12px;
}

.cycle-health {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
  align-items: center;
  gap: 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.cycle-health__copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.cycle-health__label { color: var(--ink-subtle); font: 500 11px/1.4 var(--font-mono); }
.cycle-health__copy strong { color: var(--ink); font: 600 16px/1.4 var(--font-display); font-variant-numeric: tabular-nums; }
.cycle-health__copy > span:last-child { color: var(--ink-muted); font-size: 13px; }
.cycle-health__progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cycle-health__progress progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: var(--surface-3); }
.cycle-health__progress progress::-webkit-progress-bar { background: var(--surface-3); }
.cycle-health__progress progress::-webkit-progress-value { background: var(--ink); }
.cycle-health__progress progress::-moz-progress-bar { background: var(--ink); }
.cycle-health__progress span { color: var(--ink-muted); font-size: 12px; }

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.admin-tabs button {
  min-height: 38px;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--ink-muted) !important;
  font-size: 12px;
  white-space: nowrap;
}
.admin-tabs button[aria-selected="true"] { background: var(--surface) !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(23,25,28,.08) !important; }
.admin-tabs button span { min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font: 600 10px/1 var(--font-mono); }

.admin-tab-panel {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.admin-panel-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.admin-panel-header h2 { margin: 0; font-size: 16px; }
.admin-panel-header p { margin: 2px 0 0; color: var(--ink-subtle); font-size: 12px; }
.admin-panel-header > a { color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.admin-panel-summary { flex: none; color: var(--ink-subtle); font-size: 12px; }
.admin-panel-summary strong { color: var(--ink); }
.admin-caught-up { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: #f5faf6; color: var(--success); font-size: 12px; }
.admin-caught-up span { color: #4c6552; }
.admin-caught-up strong { color: var(--success); }
.admin-table-form { max-width: none; display: block; }
.admin-table-toolbar { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.admin-table-toolbar .search-field { width: min(100%, 420px); min-height: 38px; height: 38px; }
.admin-table-toolbar .toolbar-filter select { min-height: 38px; height: 38px; min-width: 150px; }
.admin-table-scroll { overflow-x: auto; }
.admin-operation-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.admin-operation-table th { height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-subtle); font: 600 10px/1 var(--font-mono); letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.admin-operation-table td { height: 52px; padding: 6px 12px; border-bottom: 1px solid var(--line-tertiary); color: var(--ink-muted); font-size: 12px; vertical-align: middle; }
.admin-operation-table tr:last-child td { border-bottom: 0; }
.admin-operation-table tbody tr { transition: background-color 120ms ease; }
.admin-operation-table tbody tr:hover { background: var(--surface-2); }
.admin-operation-table .select-cell { width: 40px; padding-right: 4px; text-align: center; }
.admin-operation-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); }
.admin-operation-table input:disabled { opacity: .25; }
.admin-operation-table .person-cell { gap: 9px; }
.admin-operation-table .avatar-initials { width: 28px; height: 28px; font-size: 9px; }
.admin-operation-table .person-cell__copy strong { color: var(--ink); font-size: 12px; }
.admin-operation-table .person-cell__copy span { color: var(--ink-subtle); font-size: 10px; }
.admin-operation-table td > a { color: var(--ink-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.admin-operation-table td > a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.admin-status { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-2); color: var(--ink-muted); font: 500 10px/1 var(--font-mono); white-space: nowrap; }
.admin-status--submitted, .admin-status--generated { border-color: rgba(39,142,71,.3); background: var(--success-soft); color: var(--success); }
.admin-status--pending { border-color: rgba(183,123,17,.3); background: var(--warning-soft); color: var(--warning); }
.admin-status--overdue { border-color: rgba(207,83,100,.3); background: var(--danger-soft); color: var(--danger); }
.admin-table-empty { padding: 32px 16px; color: var(--ink-subtle); font-size: 13px; text-align: center; }
.data-warning { display: inline-flex; align-items: center; gap: 5px; color: var(--warning); font-size: 12px; font-weight: 500; white-space: nowrap; }
.admin-bulk-bar, .roster-bulk-bar {
  position: sticky;
  z-index: 4;
  bottom: 16px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 32px rgba(23,25,28,.12) !important;
}
.admin-bulk-bar strong, .roster-bulk-bar strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.admin-bulk-bar > div, .roster-bulk-bar > div { display: flex; align-items: center; gap: 7px; }
.admin-bulk-bar button, .roster-bulk-bar button { min-height: 36px; width: auto; padding: 0 11px; font-size: 12px; }

/* Org roster: dense list editing and an explicit reporting hierarchy. */
.roster-panel {
  overflow: visible;
  padding: 0;
}
.roster-panel .roster-toolbar {
  margin: 0;
  border-radius: 8px 8px 0 0;
}
.roster-list-form { max-width: none; display: block; }
.roster-table { width: 100%; min-width: 900px; margin: 0; }
.roster-table th { height: 36px; }
.roster-table td { height: 48px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.roster-table tbody tr:hover { background: var(--surface-2); }
.roster-table .avatar-initials { width: 28px; height: 28px; font-size: 9px; }
.roster-table .person-cell { gap: 9px; }
.roster-table .person-cell__copy strong, .roster-table .cell-primary { font-size: 12px; }
.roster-table .cell-secondary { font-size: 10px; }
.roster-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); }
.roster-role { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-2); color: var(--ink-muted); font-size: 10px; font-weight: 500; }
.roster-edit-link { color: var(--ink-muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.roster-edit-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.roster-inline-edit { min-width: 150px; }
.roster-inline-edit button { min-height: 30px; width: auto; justify-content: flex-start; padding: 0 7px; border: 1px solid transparent !important; background: transparent !important; color: var(--ink-muted) !important; font-size: 12px; font-weight: 500; }
.roster-inline-edit button:hover { border-color: var(--line) !important; background: var(--surface) !important; color: var(--ink) !important; }
.roster-inline-edit button.is-warning { color: var(--warning) !important; }
.roster-inline-edit select { width: 150px; min-height: 32px; height: 32px; padding: 0 7px; font-size: 12px; }
.roster-bulk-danger { border-color: rgba(207,83,100,.35) !important; background: var(--danger-soft) !important; color: var(--danger) !important; }

.roster-tree-scroll { max-height: calc(100dvh - 250px); min-height: 280px; overflow: auto; }
.org-tree__header, .org-tree__row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1.3fr) minmax(120px, .7fr) minmax(140px, .75fr) 82px 92px 40px;
  align-items: center;
  column-gap: 10px;
}
.org-tree__header {
  position: sticky;
  z-index: 3;
  top: 0;
  min-width: 900px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-subtle);
  font: 600 10px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.org-tree { min-width: 900px; margin: 0; padding: 0; list-style: none; }
.org-tree__item { position: relative; margin: 0; padding: 0; list-style: none; }
.org-tree__row { position: relative; min-height: 48px; padding: 4px 12px; border-bottom: 1px solid var(--line-tertiary); color: var(--ink-muted); font-size: 12px; transition: background-color 120ms ease; }
.org-tree__row:hover { background: var(--surface-2); }
.org-tree__row .avatar-initials { width: 28px; height: 28px; font-size: 9px; }
.org-tree__row .person-cell { gap: 9px; }
.org-tree__row .cell-primary { font-size: 12px; }
.org-tree__row .cell-secondary { font-size: 10px; }
.org-tree__toggle, .org-tree__toggle-spacer { width: 28px; height: 28px; }
.org-tree__toggle { display: grid; place-items: center; padding: 0; border: 1px solid transparent !important; border-radius: 5px; background: transparent !important; color: var(--ink-subtle) !important; }
.org-tree__toggle:hover { border-color: var(--line) !important; background: var(--surface) !important; color: var(--ink) !important; }
.org-tree__toggle svg { transition: transform 160ms var(--ease-out); }
.org-tree__toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.org-tree__manager { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-tree__reports { color: var(--ink-subtle); }
.org-tree__branch { position: relative; margin: 0 0 0 24px; padding: 0; border-left: 1px solid var(--line-strong); list-style: none; }
.org-tree__branch > .org-tree__item > .org-tree__row::before { content: ""; position: absolute; top: 23px; left: -24px; width: 24px; height: 1px; background: var(--line-strong); }
.org-tree__branch > .org-tree__item:last-child::after { content: ""; position: absolute; top: 24px; bottom: 0; left: -1px; width: 1px; background: var(--surface); }

.roster-bulk-dialog { width: min(92vw, 460px); padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(23,25,28,.2) !important; }
.roster-bulk-dialog::backdrop { background: rgba(23,25,28,.28); }
.roster-bulk-dialog form { max-width: none; display: block; }
.roster-bulk-dialog header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.roster-bulk-dialog header .page-kicker { margin: 0 0 2px; }
.roster-bulk-dialog h2 { margin: 0; font-size: 16px; }
.roster-bulk-dialog__body { min-height: 110px; padding: 18px 16px; }
.roster-bulk-dialog__body label { gap: 6px; }
.roster-bulk-dialog__body p { margin: 0; color: var(--ink-muted); font-size: 13px; }
.roster-bulk-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.roster-bulk-dialog footer button { min-height: 40px; width: auto; }
.roster-bulk-dialog footer .is-danger { border-color: var(--danger) !important; background: var(--danger) !important; color: #fff !important; }

@media (max-width: 820px) {
  .cycle-health { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .admin-panel-header { align-items: flex-start; }
  .admin-table-toolbar { align-items: stretch; flex-direction: column; }
  .admin-table-toolbar .search-field, .admin-table-toolbar .toolbar-filter select { width: 100%; max-width: none; }
  .admin-bulk-bar, .roster-bulk-bar { align-items: stretch; flex-direction: column; }
  .admin-bulk-bar > div, .roster-bulk-bar > div { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .admin-config-alert { grid-template-columns: 20px minmax(0, 1fr); }
  .admin-config-alert__action { grid-column: 2; justify-self: start; }
  .admin-tabs { margin-right: -12px; margin-left: -12px; border-right: 0; border-left: 0; border-radius: 0; }
  .admin-tab-panel { margin-right: -12px; margin-left: -12px; border-right: 0; border-left: 0; border-radius: 0; }
  .roster-bulk-bar > div { display: grid; grid-template-columns: minmax(0, 1fr); }
  .roster-bulk-bar button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-operation-table tbody tr,
  .org-tree__row,
  .org-tree__toggle svg {
    transition: none;
  }
}

/* The administration disclosure is navigation chrome, not a primary action. */
#admin-subnav-toggle.sidebar-subnav-toggle {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--ink-subtle) !important;
  box-shadow: none !important;
}

@media (hover: hover) and (pointer: fine) {
  #admin-subnav-toggle.sidebar-subnav-toggle:hover {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--ink) !important;
    box-shadow: none !important;
  }
}

#admin-subnav-toggle.sidebar-subnav-toggle:active {
  background: transparent !important;
  color: var(--ink) !important;
}

/* People forms: one structured surface, progressive disclosure only where useful. */
.admin-person-page {
  --person-form-width: 960px;
}

.admin-person-page > .breadcrumb-link,
.admin-person-header,
.admin-person-page > .alert,
.person-form {
  width: min(100%, var(--person-form-width));
}

.admin-person-page > .breadcrumb-link {
  margin-bottom: 10px;
}

.admin-person-header {
  min-height: auto;
  margin-bottom: 22px;
}

.person-form {
  max-width: none;
  display: block;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.person-form__section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 26px 28px 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.person-form__section-heading {
  display: block;
  max-width: 62ch;
}

.person-form__step {
  display: block;
  margin: 0 0 6px;
  color: var(--ink-tertiary);
  font: 600 10px/1.5 var(--font-mono);
  letter-spacing: 0.06em;
}

.person-form__section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.person-form__section-heading p:not(.person-form__step) {
  margin: 5px 0 0;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.person-form__fields {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.person-form__fields--single {
  grid-template-columns: minmax(0, 1fr);
}

.person-form__fields--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.form-field > input,
.form-field > select {
  width: 100%;
  margin: 0;
}

.form-field small {
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.person-form__footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 20px 15px 28px;
  background: var(--surface-2);
}

.person-form__footer > p {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 11px;
}

.person-form__footer > div {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.person-form__footer button,
.person-form__cancel {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.person-form__footer button {
  width: auto;
}

.person-form__cancel {
  border: 1px solid transparent;
  color: var(--ink-muted);
}

.person-form__cancel:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.manager-combobox {
  position: relative;
  min-width: 0;
}

.manager-combobox__control {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink-subtle);
}

.manager-combobox__control > svg:first-child {
  position: absolute;
  z-index: 1;
  left: 12px;
  pointer-events: none;
}

.manager-combobox__control input {
  width: 100%;
  padding-right: 38px;
  padding-left: 38px;
}

.manager-combobox__control:focus-within input {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
}

.manager-combobox__chevron {
  position: absolute;
  right: 12px;
  pointer-events: none;
  transition: transform 140ms var(--ease-out);
}

.manager-combobox:has([aria-expanded="true"]) .manager-combobox__chevron {
  transform: rotate(180deg);
}

.manager-combobox__list {
  position: absolute;
  z-index: 8;
  top: 50px;
  right: 0;
  left: 0;
  max-height: 300px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(23, 25, 28, 0.12) !important;
  list-style: none;
}

.manager-combobox__list li {
  margin: 0;
  padding: 0;
}

.manager-combobox__list [role="option"] {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border: 0 !important;
  border-radius: 5px;
  background: transparent !important;
  color: var(--ink) !important;
  text-align: left;
  box-shadow: none !important;
}

.manager-combobox__list [role="option"]:hover,
.manager-combobox__list [role="option"].is-active {
  background: var(--surface-2) !important;
}

.manager-combobox__list [role="option"] > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.manager-combobox__list [role="option"] strong,
.manager-combobox__list [role="option"] small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-combobox__list [role="option"] strong {
  font-size: 12px;
  font-weight: 600;
}

.manager-combobox__list [role="option"] small {
  color: var(--ink-subtle);
  font-size: 10px;
  font-weight: 400;
}

.manager-combobox__list [role="option"] > svg {
  opacity: 0;
  color: var(--ink);
}

.manager-combobox__list [role="option"][aria-selected="true"] > svg {
  opacity: 1;
}

.manager-combobox__empty-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-subtle);
  font-size: 12px;
}

.manager-combobox__empty {
  padding: 18px 12px !important;
  color: var(--ink-subtle);
  font-size: 12px;
  text-align: center;
}

.manager-combobox__status {
  min-height: 16px;
  margin: 5px 0 0;
  color: var(--ink-tertiary);
  font-size: 10px;
}

/* Tree-table alignment: hierarchy lives inside Name; every data column stays fixed. */
.org-tree__header,
.org-tree__row {
  grid-template-columns: minmax(330px, 1.4fr) minmax(120px, .7fr) minmax(150px, .75fr) 86px 92px 40px;
}

.org-tree__name-cell {
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.org-tree__name-cell .person-cell {
  min-width: 0;
  flex: 1;
}

.org-tree__guides {
  align-self: stretch;
  flex: none;
  display: grid;
  grid-template-columns: repeat(var(--tree-depth), 24px);
}

.org-tree__guide {
  position: relative;
  width: 24px;
}

.org-tree__guide--continues::before,
.org-tree__guide--current:not(.org-tree__guide--continues)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 11px;
  width: 1px;
  background: var(--line-strong);
}

.org-tree__guide--continues::before {
  bottom: 0;
}

.org-tree__guide--current:not(.org-tree__guide--continues)::before {
  height: 50%;
}

.org-tree__guide--current::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 12px;
  height: 1px;
  background: var(--line-strong);
}

.org-tree__branch {
  margin: 0;
  padding: 0;
  border-left: 0;
}

.org-tree__branch > .org-tree__item > .org-tree__row::before,
.org-tree__branch > .org-tree__item:last-child::after {
  content: none;
}

.org-tree__role,
.roster-role {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 500;
}

.empty-value {
  color: var(--ink-tertiary);
}

.org-tree__actions {
  opacity: 0;
  transition: opacity 120ms ease;
}

.org-tree__row:hover .org-tree__actions,
.org-tree__row:focus-within .org-tree__actions,
.org-tree__actions:has(+ [popover]:popover-open) {
  opacity: 1;
}

@media (hover: none) {
  .org-tree__actions {
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .person-form__section {
    padding: 22px 20px 24px;
  }
}

@media (max-width: 560px) {
  .person-form__fields--grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .person-form__footer {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  .person-form__footer > div {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manager-combobox__chevron,
  .org-tree__actions {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Shared component contract
   One geometry and interaction language for every product workflow. This is
   deliberately a final compatibility layer while older page CSS is retired.
   -------------------------------------------------------------------------- */

:root {
  --ui-control-height: 44px;
  --ui-control-radius: 6px;
  --ui-panel-radius: 8px;
  --ui-gap: 8px;
  --ui-field-gap: 6px;
}

/* Fields and labels */
.filter-field,
.toolbar-filter,
.form-field,
.field,
.form-grid > label,
.checkin-note-field,
.checkin-rag-field,
.more-filters__panel label {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea,
.search-field,
.goal-search-field,
.peer-picker__search,
.manager-combobox__control {
  border: 1px solid var(--line-strong);
  border-radius: var(--ui-control-radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition:
    border-color 140ms var(--ease-out),
    background-color 140ms var(--ease-out),
    color 140ms var(--ease-out),
    box-shadow 140ms var(--ease-out);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
select {
  min-height: var(--ui-control-height);
}

input:hover,
select:hover,
textarea:hover,
.search-field:hover,
.goal-search-field:hover,
.peer-picker__search:hover,
.manager-combobox__control:hover {
  border-color: var(--ink-tertiary);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.search-field:focus-within,
.goal-search-field:focus-within,
.peer-picker__search:focus-within,
.manager-combobox__control:focus-within {
  border-color: var(--focus-ring);
  outline: 2px solid rgba(23, 25, 28, .14) !important;
  outline-offset: 1px;
  box-shadow: none !important;
}

.search-field,
.goal-search-field,
.peer-picker__search {
  width: min(100%, 36rem);
  max-width: 36rem;
  min-height: var(--ui-control-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.search-field > svg,
.goal-search-field > svg,
.peer-picker__search > svg {
  flex: none;
  color: var(--ink-subtle);
}

.search-field input,
.goal-search-field input,
.peer-picker__search input,
.manager-combobox__control input {
  min-width: 0;
  width: 100%;
  min-height: calc(var(--ui-control-height) - 2px);
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0 !important;
  background: transparent;
  box-shadow: none !important;
}

.manager-combobox__control input {
  padding-right: 38px;
  padding-left: 38px;
}

.manager-combobox__control input:focus-visible {
  outline: 0 !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-tertiary);
  opacity: 1;
}

/* Buttons */
button,
.button-link,
.inline-button-link,
.pagination__button,
.filter-chip,
.filter-clear {
  min-height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition:
    border-color 140ms var(--ease-out),
    background-color 140ms var(--ease-out),
    color 140ms var(--ease-out),
    opacity 140ms var(--ease-out),
    transform 140ms var(--ease-out);
}

button:focus-visible,
.button-link:focus-visible,
.inline-button-link:focus-visible,
.pagination__button:focus-visible,
.filter-chip:focus-visible,
.filter-clear:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .48;
}

button.secondary:hover,
button.ghost:hover,
.pagination__button:hover,
.filter-chip:hover,
.filter-clear:hover {
  border-color: var(--ink-tertiary);
  background: var(--surface-2);
  color: var(--ink);
  transform: none;
}

/* Filters and search toolbars: flat when standalone, integrated when nested. */
.filter-toolbar,
.component-toolbar {
  display: flex;
  align-items: end;
  gap: var(--ui-gap);
}

.filter-toolbar {
  min-height: 70px;
  margin: 0 0 20px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.filter-toolbar .filter-field {
  min-width: 160px;
  display: grid;
  gap: var(--ui-field-gap);
}

.filter-toolbar .filter-field select {
  width: 100%;
  height: var(--ui-control-height);
  margin: 0;
  font-size: 14px;
}

.filter-toolbar .filter-clear {
  min-height: var(--ui-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}

.filter-toolbar[data-submitting="true"],
[data-filter-form][data-submitting="true"] {
  cursor: progress;
  opacity: .72;
}

.component-toolbar--embedded {
  min-height: 60px;
  margin: 0 -20px;
  padding: 8px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
}

.admin-table-toolbar.component-toolbar--embedded {
  margin: 0;
  padding: 8px 12px;
}

.component-toolbar .toolbar-filter,
.component-toolbar .toolbar-filter select {
  min-height: var(--ui-control-height);
}

.component-toolbar .toolbar-filter select {
  min-width: 176px;
  height: var(--ui-control-height);
}

/* Goals uses the same primitives, with its extra filters progressively tucked away. */
.goals-page .filter-bar.filter-toolbar {
  min-height: 70px;
  margin-bottom: 20px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.goals-page .filter-bar__form > label {
  gap: var(--ui-field-gap);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}

.goals-page .filter-bar select,
.goals-page .goal-filter-search,
.goals-page .more-filters > summary,
.goals-page .filter-chip--quick,
.goals-page .filter-clear {
  min-height: var(--ui-control-height);
  height: var(--ui-control-height);
}

.goals-page .filter-bar select,
.goals-page .goal-filter-search input {
  font-size: 14px;
}

.goals-page .goal-filter-search input {
  min-height: calc(var(--ui-control-height) - 2px);
  height: calc(var(--ui-control-height) - 2px);
  line-height: normal;
}

.goals-page .filter-clear {
  margin-left: 0;
}

/* Menus, popovers, and searchable option lists share one elevation level. */
[popover],
.row-actions__menu,
.more-filters__panel,
.combobox-dropdown,
.checkin-subject-dropdown,
.manager-combobox__list,
.peer-picker__results {
  border: 1px solid var(--line-strong);
  border-radius: var(--ui-panel-radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 25, 28, .12), 0 2px 7px rgba(23, 25, 28, .06) !important;
}

.popover-menu-item,
.row-actions__menu a,
.row-actions__menu button,
.checkin-subject-option,
.manager-combobox__list [role="option"],
.peer-picker-item {
  border-radius: var(--ui-control-radius);
  font-size: 13px;
}

.popover-menu-item:hover,
.popover-menu-item:focus-visible,
.row-actions__menu a:hover,
.row-actions__menu button:hover,
.checkin-subject-option:hover,
.checkin-subject-option:focus-visible,
.manager-combobox__list [role="option"]:hover,
.manager-combobox__list [role="option"].is-active,
.peer-picker-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* Tabs */
.segmented,
.mode-tabs {
  min-height: var(--ui-control-height);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--ui-panel-radius);
  background: var(--surface-2);
}

.segmented a,
.mode-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.segmented a:hover,
.mode-tabs a:hover {
  background: transparent;
  color: var(--ink);
}

.segmented a.active,
.mode-tabs a.active {
  background: var(--surface);
  color: var(--ink);
}

.chart-tabs button {
  min-height: 40px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
}

/* Dense data surfaces */
.data-table th,
.data-panel table th {
  height: 36px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.data-table td,
.data-panel table td {
  min-height: 48px;
  padding: 9px 12px;
  font-size: 13px;
}

.data-table tbody tr,
.data-panel table tbody tr,
.org-tree__row,
.feedback-entry {
  transition: background-color 120ms var(--ease-out);
}

.data-table tbody tr:hover td,
.data-panel table tbody tr:hover td,
.org-tree__row:hover,
.feedback-entry:hover {
  background: var(--surface-2);
}

.numeric,
.tabular,
.data-toolbar__count,
.pagination__summary,
.score-chip,
.progress-value {
  font-variant-numeric: tabular-nums;
}

.badge,
.status-pill {
  min-height: 22px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

/* Recording is always a secondary action until the microphone is active. */
button.record-control {
  min-width: 0;
  gap: 8px;
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-muted);
}

button.record-control:hover {
  border-color: var(--ink-tertiary);
  background: var(--surface-2);
  color: var(--ink);
}

button.record-control .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

button.record-control.recording,
button.record-control[aria-pressed="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

/* While a suggestion request is in flight (or recording is unavailable),
   this button visibly can't be re-entered — greyscale reads as "locked"
   more clearly than the app's default opacity-only disabled state. */
#record-button:disabled {
  filter: grayscale(1);
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .filter-toolbar,
  .component-toolbar {
    flex-wrap: wrap;
  }

  .filter-toolbar .filter-field {
    min-width: min(220px, calc(50% - 4px));
    flex: 1;
  }

  .component-toolbar .search-field {
    max-width: none;
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .filter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-toolbar .filter-field,
  .filter-toolbar .filter-clear,
  .filter-toolbar select,
  .component-toolbar .toolbar-filter,
  .component-toolbar .toolbar-filter select {
    width: 100%;
  }

  .filter-toolbar .filter-clear {
    justify-content: flex-start;
    margin-left: 0;
  }

  .component-toolbar--embedded {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  input,
  select,
  textarea,
  button,
  .button-link,
  .filter-chip,
  .filter-clear,
  .search-field,
  .goal-search-field,
  .peer-picker__search,
  .manager-combobox__control,
  .data-table tbody tr,
  .data-panel table tbody tr,
  .org-tree__row,
  .feedback-entry {
    transition: none;
  }
}

/* Final shared identity and dashboard refinements. */
.avatar-initials,
.profile-avatar {
  border-radius: 50%;
}

.profile-avatar__status {
  right: 1px;
  bottom: 1px;
}

/* Native progress styling varies across browsers, so define both the track
   and value explicitly. The neutral gradient stays within the black/white
   brand direction while remaining visible against the dashboard surface. */
.home-page .cycle-progress-row progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  appearance: none;
  background: var(--surface-3);
}

.home-page .cycle-progress-row progress::-webkit-progress-bar {
  border-radius: var(--radius-pill);
  background: var(--surface-3);
}

.home-page .cycle-progress-row progress::-webkit-progress-value {
  border-radius: var(--radius-pill);
  background-image: linear-gradient(90deg, var(--ink), var(--ink-muted)) !important;
}

.home-page .cycle-progress-row progress::-moz-progress-bar {
  border-radius: var(--radius-pill);
  background-image: linear-gradient(90deg, var(--ink), var(--ink-muted)) !important;
}

/* --------------------------------------------------------------------------
   Shared filter system
   Standalone filters use one purposeful surface. Toolbars nested in data
   panels stay flat while sharing the same controls and interaction states.
   -------------------------------------------------------------------------- */
:root {
  --filter-control-height: 46px;
  --filter-gap: 12px;
}

.filter-toolbar {
  min-height: 0;
  display: flex;
  align-items: end;
  gap: var(--filter-gap);
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 25, 28, .055) !important;
}

.filter-toolbar .filter-field,
.component-toolbar .toolbar-filter {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.filter-toolbar > .filter-field {
  flex: 0 1 230px;
}

.filter-select {
  min-width: 0;
  min-height: var(--filter-control-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-subtle);
  transition:
    border-color 140ms var(--ease-out),
    background-color 140ms var(--ease-out),
    color 140ms var(--ease-out);
}

.filter-select > svg {
  flex: none;
}

.filter-select:hover {
  border-color: var(--ink-tertiary);
  color: var(--ink);
}

.filter-select:focus-within {
  border-color: var(--focus-ring);
  outline: 2px solid rgba(23, 25, 28, .14);
  outline-offset: 1px;
  color: var(--ink);
}

.filter-select select,
.filter-toolbar .filter-field .filter-select select,
.component-toolbar .toolbar-filter .filter-select select {
  min-width: 0;
  width: 100%;
  min-height: calc(var(--filter-control-height) - 2px);
  height: calc(var(--filter-control-height) - 2px);
  margin: 0;
  padding: 0 18px 0 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0 !important;
  background-color: transparent;
  color: var(--ink);
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 500;
}

.filter-toolbar .filter-clear {
  min-height: var(--filter-control-height);
  align-self: end;
  margin-left: auto;
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-muted);
}

.filter-toolbar .filter-clear:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

/* Search/filter rows already live inside a data surface, so they use a
   divider instead of creating another card. */
.component-toolbar--embedded {
  min-height: 70px;
  gap: var(--filter-gap);
  padding-top: 11px;
  padding-bottom: 11px;
  background: var(--surface);
  box-shadow: none !important;
}

.component-toolbar--embedded .search-field {
  min-height: var(--filter-control-height);
  border-radius: 7px;
}

.component-toolbar .toolbar-filter .filter-select {
  min-width: 190px;
}

/* Goals combines primary controls, progressive disclosure, and one urgent
   shortcut while preserving the same filter component contract. */
.goals-page .filter-bar.filter-toolbar {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--filter-gap);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 25, 28, .055) !important;
}

.goals-page .filter-bar__controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.goals-page .filter-bar__form {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, .85fr)) minmax(190px, 1.15fr) auto;
  align-items: end;
  gap: 10px;
}

.goals-page .filter-bar__form > label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.goals-page .goal-filter-search,
.goals-page .more-filters > summary,
.goals-page .filter-chip--quick {
  min-height: var(--filter-control-height);
  height: var(--filter-control-height);
  border-radius: 7px;
}

.goals-page .goal-filter-search {
  width: 100%;
  max-width: none;
}

.goals-page .more-filters {
  min-width: 148px;
}

.goals-page .more-filters > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-inline: 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.goals-page .more-filters > summary::-webkit-details-marker {
  display: none;
}

.goals-page .more-filters > summary::after {
  content: none;
}

.goals-page .more-filters > summary:hover {
  border-color: var(--ink-tertiary);
  color: var(--ink);
}

.goals-page .more-filters .filter-chevron {
  margin-left: auto;
  transition: transform 140ms var(--ease-out);
}

.goals-page .more-filters[open] .filter-chevron {
  transform: rotate(180deg);
}

.goals-page .filter-count {
  min-width: 20px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.goals-page .filter-bar__quick {
  min-height: var(--filter-control-height);
  display: flex;
  align-items: center;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.goals-page .filter-chip--quick {
  gap: 9px;
  padding-inline: 14px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.goals-page .filter-chip--quick svg {
  color: var(--danger);
}

.goals-page .filter-chip--quick.filter-chip--active {
  border-color: #e6c7c7;
  background: var(--danger-soft);
  color: var(--danger);
}

.goals-page .more-filters__panel {
  top: calc(var(--filter-control-height) + 6px);
  width: 260px;
  padding: 14px;
}

@media (max-width: 1180px) {
  .goals-page .filter-bar.filter-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .goals-page .filter-bar__form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .goals-page .goal-filter-search {
    grid-column: span 2;
  }

  .goals-page .filter-bar > .filter-clear {
    justify-self: end;
  }
}

@media (max-width: 1000px) {
  .filter-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-toolbar > .filter-field,
  .filter-toolbar .filter-clear,
  .filter-toolbar .filter-select {
    width: 100%;
  }

  .filter-toolbar .filter-clear {
    justify-self: end;
  }

  .goals-page .filter-bar__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goals-page .goal-filter-search {
    grid-column: 1 / -1;
  }

  .goals-page .filter-bar__quick {
    padding-left: 12px;
  }
}

@media (max-width: 820px) {
  .component-toolbar {
    flex-wrap: wrap;
  }

  .component-toolbar .search-field {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .filter-toolbar,
  .goals-page .filter-bar.filter-toolbar {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .filter-toolbar .filter-clear,
  .goals-page .filter-bar > .filter-clear {
    width: 100%;
    justify-self: stretch;
  }

  .goals-page .filter-bar__controls,
  .goals-page .filter-bar__form {
    grid-template-columns: minmax(0, 1fr);
  }

  .goals-page .goal-filter-search {
    grid-column: auto;
  }

  .goals-page .filter-bar__quick {
    min-height: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .goals-page .filter-chip--quick {
    width: 100%;
    justify-content: center;
  }

  .goals-page .more-filters,
  .goals-page .more-filters > summary {
    width: 100%;
  }

  .goals-page .more-filters[open] .more-filters__panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .component-toolbar .toolbar-filter,
  .component-toolbar .toolbar-filter .filter-select {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-select,
  .goals-page .more-filters .filter-chevron {
    transition: none;
  }
}

/* Auth presentation: a charcoal-to-white frosted workspace. */
.auth-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  place-content: center;
  margin: 0;
  padding: 112px 24px 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.1), transparent 34rem),
    radial-gradient(circle at 90% 82%, rgba(255, 255, 255, 0.88), transparent 32rem),
    linear-gradient(118deg, var(--ink) 0%, var(--accent-ink) 30%, var(--accent-tint) 64%, var(--paper) 100%) !important;
}

.auth-masthead {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px clamp(24px, 4vw, 64px);
}

.auth-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth-masthead__note {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-panel {
  position: relative;
  width: 460px;
  max-width: calc(100vw - 48px);
  display: grid;
  gap: 24px;
  padding: 38px 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 28px 80px rgba(23, 25, 28, 0.18) !important;
  backdrop-filter: blur(28px) saturate(115%);
  -webkit-backdrop-filter: blur(28px) saturate(115%);
}

.auth-panel__header {
  display: grid;
  gap: 8px;
  text-align: center;
}

.auth-panel__header h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(26px, 3vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.auth-panel__header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  width: 100%;
  padding-right: 48px;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.auth-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
}

.auth-form input::placeholder {
  color: var(--ink-subtle);
}

.auth-form input:hover {
  border-color: var(--ink-subtle);
}

.auth-form input:focus-visible {
  border-color: var(--ink);
  outline: 3px solid rgba(23, 25, 28, 0.12);
  outline-offset: 1px;
}

.auth-form > button[type="submit"] {
  min-height: 50px;
  margin-top: 2px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.auth-form > button[type="submit"]:hover {
  opacity: 0.88;
}

.auth-form > button[type="submit"]:focus-visible {
  outline: 3px solid rgba(23, 25, 28, 0.2);
  outline-offset: 3px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 1;
  width: 36px !important;
  min-height: 36px;
  height: 36px !important;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  opacity: 1;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: manipulation;
}

.auth-password-toggle:hover {
  background: var(--surface-2) !important;
  color: var(--ink);
  opacity: 1;
  transform: translateY(-50%);
}

.auth-password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke-width: 2;
  pointer-events: none;
}

.auth-panel__footer {
  margin: 0;
  text-align: center;
}

.auth-panel__footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 12px;
}

.auth-panel .alert {
  margin: 0;
}

/* Shared filter toolbars stay flat; individual controls provide the affordance. */
.filter-toolbar,
.goals-page .filter-bar.filter-toolbar {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

@media (max-width: 600px) {
  .auth-shell {
    padding: 96px 16px 32px;
  }

  .auth-masthead {
    padding: 24px 18px;
  }

  .auth-masthead__note {
    display: none;
  }

  .auth-panel {
    width: calc(100vw - 32px);
    max-width: 460px;
    gap: 22px;
    padding: 28px 22px 26px;
    border-radius: 14px;
  }

  .filter-toolbar,
  .goals-page .filter-bar.filter-toolbar {
    padding: 0 0 14px;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .auth-panel {
    border-color: var(--line-strong);
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Sidebar collapse control stays visually unboxed in every interaction state. */
button.sidebar-toggle,
button.sidebar-toggle:hover,
button.sidebar-toggle:active {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-color: transparent !important;
  background: transparent !important;
  color: var(--sidebar-ink-active) !important;
  box-shadow: none !important;
  transform: none;
}

button.sidebar-toggle:focus-visible {
  background: transparent !important;
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Check-in dialog
   Compact modal geometry, flat field grouping, and a quiet close control.
   -------------------------------------------------------------------------- */
dialog.glass-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 24px 72px rgba(29, 35, 48, 0.22) !important;
  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
}

dialog.glass-dialog::backdrop {
  background: rgba(36, 40, 49, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dialog__header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px 15px 24px;
  border-bottom: 1px solid rgba(201, 205, 212, 0.72);
}

.dialog__heading {
  min-width: 0;
}

.dialog__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.dialog__heading > p {
  margin: 3px 0 0;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.4;
}

button.dialog__close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--ink-muted) !important;
  box-shadow: none !important;
  transform: none;
  touch-action: manipulation;
}

button.dialog__close svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

button.dialog__close:hover {
  background: rgba(23, 25, 28, 0.06) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  transform: none;
}

button.dialog__close:active {
  background: rgba(23, 25, 28, 0.1) !important;
  transform: translateY(1px);
}

button.dialog__close:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
}

.dialog__body {
  max-height: calc(min(760px, 100dvh - 32px) - 72px);
  padding: 22px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#checkin-dialog .checkin-form {
  width: 100%;
  max-width: none;
  gap: 18px;
}

#checkin-dialog .checkin-form__grid {
  grid-template-columns: minmax(0, 1fr) minmax(176px, 210px);
  align-items: end;
  gap: 14px;
}

.checkin-form__grid:has(.checkin-rag-field:not([hidden])) .field-span-full {
  grid-column: auto;
}

.checkin-form .checkin-rag-field {
  min-width: 0;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.checkin-field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.checkin-form .checkin-rag-field select {
  width: 100%;
}

#checkin-dialog .checkin-note-field {
  gap: 7px;
}

#checkin-dialog .checkin-note-field textarea {
  min-height: 150px;
  max-height: 260px;
  line-height: 1.5;
}

#checkin-dialog .checkin-note-field .support-text {
  max-width: 62ch;
  color: var(--ink-subtle);
  font-size: 12px;
  line-height: 1.45;
}

#checkin-dialog .checkin-form__status {
  min-height: 0;
  margin: -4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.checkin-form__status:empty {
  display: none;
}

#checkin-dialog .checkin-form__actions {
  margin-top: 2px;
  padding-top: 18px;
}

#checkin-dialog .checkin-form__actions button {
  min-height: 44px;
}

#checkin-dialog .checkin-form__actions button[type="submit"] {
  min-width: 132px;
}

@media (max-width: 700px) {
  dialog.glass-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }

  .dialog__header {
    min-height: 64px;
    padding: 13px 12px 12px 18px;
  }

  .dialog__heading > p {
    display: none;
  }

  .dialog__body {
    max-height: calc(100dvh - 80px);
    padding: 18px;
  }

  #checkin-dialog .checkin-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #checkin-dialog .checkin-form__grid .field-span-full {
    grid-column: auto;
  }

  #checkin-dialog .checkin-note-field textarea {
    min-height: 132px;
  }

  #checkin-dialog .checkin-form__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  #checkin-dialog .checkin-form__actions button {
    width: 100%;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  dialog.glass-dialog {
    border-color: var(--line-strong);
    background-color: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  dialog.glass-dialog::backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* --------------------------------------------------------------------------
   Shared frosted surfaces
   Apply one quiet material to top-level content panels. Rows, field groups,
   controls, and status elements remain opaque so information stays crisp.
   -------------------------------------------------------------------------- */
:root {
  --glass-surface: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-highlight: rgba(255, 255, 255, 0.96);
  --glass-shadow: 0 14px 36px rgba(53, 62, 80, 0.08);
}

.app-content {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.94), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(216, 221, 231, 0.5), transparent 30rem),
    linear-gradient(180deg, #f7f8fb 0%, var(--paper) 52%, #eef1f6 100%) !important;
  background-attachment: fixed;
}

.card,
.data-panel,
.side-section,
.report-charts,
.score-strip,
.ai-summary,
.empty-state,
.goal-empty-state,
.admin-tab-panel,
.person-form,
.profile-performance,
.profile-rail {
  border-color: var(--glass-border);
  background-color: var(--glass-surface);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow) !important;
  backdrop-filter: blur(18px) saturate(128%);
  -webkit-backdrop-filter: blur(18px) saturate(128%);
}

/* Inner regions inherit the material instead of creating nested glass cards. */
.profile-score,
.profile-metric-stack,
.profile-rail__section,
.person-form__section {
  background-color: transparent;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .card,
  .data-panel,
  .side-section,
  .report-charts,
  .score-strip,
  .ai-summary,
  .empty-state,
  .goal-empty-state,
  .admin-tab-panel,
  .person-form,
  .profile-performance,
  .profile-rail {
    border-color: var(--line-strong);
    background-color: var(--surface);
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Marks any label wrapping a required field with a red asterisk. Pure
   CSS, no template changes needed — new required fields get this for
   free, and it can't drift out of sync as forms change. */
label:has(input[required], textarea[required], select[required]) > span:first-child::after {
  content: " *";
  color: var(--danger);
}

/* login.html's Password label is `for=`-associated with an input that
   isn't a descendant, so the :has() rule above can't reach it — marked
   directly instead. Its "Password" text and this marker are wrapped in one
   shared <span> in the template (not two separate label children) so the
   app-wide flex/grid label layout has nothing to stack onto its own row. */
.required-marker {
  color: var(--danger);
}

/* Formal print/PDF treatment for performance reports. The stronger rules and
   tabular structure keep the export legible without reproducing the app UI. */
.report-print-masthead,
.report-print-subject {
  display: none;
}

@page {
  size: A4;
  margin: 14mm 13mm 16mm;
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #17233a !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
  }

  .report-page,
  .report-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-shell,
  .app-content,
  :root.sidebar-collapsed .app-content {
    display: block;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    background-image: none !important;
  }

  .report-page {
    --print-navy: #17191c;
    --print-ink: #17191c;
    --print-muted: #4f555e;
    --print-line: #c9cdd4;
    --print-soft: #eef1f6;
    display: block;
    color: var(--print-ink) !important;
  }

  .report-page .report-print-masthead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 5mm;
    padding: 0 0 3mm;
    border-bottom: 3px solid var(--print-navy);
    color: var(--print-navy);
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .report-page .report-print-masthead span:last-child {
    color: var(--print-muted);
    font-size: 7pt;
    font-weight: 600;
    letter-spacing: .06em;
  }

  .report-page .report-print-subject {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 5mm;
    border: 1px solid var(--print-line);
    border-top: 4px solid var(--print-navy);
    background: #fff;
  }

  .report-page .report-print-subject div {
    min-width: 0;
    padding: 3mm 3.5mm;
    border-right: 1px solid var(--print-line);
  }

  .report-page .report-print-subject div:last-child {
    border-right: 0;
  }

  .report-page .report-print-subject dt {
    margin-bottom: 1.2mm;
    color: var(--print-muted);
    font-size: 6.8pt;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .report-page .report-print-subject dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--print-ink);
    font-size: 9pt;
    font-weight: 700;
  }

  .sidebar,
  .breadcrumb-link,
  .report-actions,
  .report-cycle-tabs,
  .listing-toolbar,
  .listing-summary,
  .listing-empty,
  .pagination,
  .chart-tabs,
  .report-page form,
  .app-toast-viewport,
  dialog {
    display: none !important;
  }

  .report-page .report-header {
    min-height: 0;
    display: flex;
    align-items: flex-end;
    margin: 0 0 4mm;
    padding: 0 0 3.5mm;
    border-bottom: 1px solid var(--print-navy);
  }

  .report-page .report-header h1 {
    margin: 0;
    color: var(--print-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20pt;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
  }

  .report-page .report-header__meta {
    margin-top: 2mm;
  }

  .report-page .report-score strong {
    color: var(--print-navy);
    font-size: 15pt;
    font-variant-numeric: tabular-nums;
  }

  .report-page .report-score span,
  .report-page .section-header p,
  .report-page .feedback-entry__header > span,
  .report-page .cell-secondary {
    color: var(--print-muted) !important;
  }

  .report-page .status-pill,
  .report-page .badge {
    min-height: 0;
    padding: 1mm 2mm;
    border: 1px solid var(--print-line) !important;
    border-radius: 1px;
    background: #fff !important;
    color: var(--print-ink) !important;
    font-size: 7pt;
  }

  .report-page .score-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 6mm;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--print-line) !important;
    border-radius: 0;
    background: var(--print-soft) !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  .report-page .score-strip span,
  .report-page .score-strip span:first-child {
    padding: 3mm 3.5mm;
    border-right: 1px solid var(--print-line);
    color: var(--print-muted);
    font-size: 8pt;
  }

  .report-page .score-strip span:last-child {
    border-right: 0;
  }

  .report-page .score-strip strong {
    color: var(--print-navy);
    font-variant-numeric: tabular-nums;
  }

  .report-page .report-content {
    display: block;
  }

  .report-page .report-content__main,
  .report-page .report-content__aside {
    display: block;
  }

  .report-page .report-section,
  .report-page .side-section,
  .report-page .report-charts {
    margin: 0 0 7mm;
  }

  .report-page .section-header {
    break-after: avoid-page;
    margin: 0 0 3mm;
    padding: 0 0 2mm;
    border-bottom: 2px solid var(--print-navy);
  }

  .report-page .section-header h2,
  .report-page .side-section h2 {
    color: var(--print-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12.5pt;
    line-height: 1.2;
  }

  .report-page .data-panel,
  .report-page .side-section,
  .report-page .report-charts,
  .report-page .ai-summary {
    border: 1px solid var(--print-line) !important;
    border-radius: 0;
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  .report-page .data-panel,
  .report-page .side-section,
  .report-page .report-charts {
    padding: 4mm;
  }

  .report-page .rating-summary {
    grid-template-columns: 32mm minmax(0, 1fr);
    gap: 5mm;
    margin-bottom: 3mm;
    padding: 3mm;
    border: 1px solid var(--print-line);
    background: #fff;
    break-inside: avoid-page;
  }

  .report-page .rating-summary__average {
    border-color: var(--print-line);
  }

  .report-page .rating-summary__average strong {
    color: var(--print-navy);
    font-size: 24pt;
    font-variant-numeric: tabular-nums;
  }

  .report-page .rating-summary__average span,
  .report-page .rating-bar-row {
    color: var(--print-muted);
  }

  .report-page .rating-bars {
    gap: 2mm;
  }

  .report-page .rating-bar-row {
    grid-template-columns: 7mm minmax(35mm, 1fr) 11mm;
    gap: 2.5mm;
    font-size: 8pt;
    font-variant-numeric: tabular-nums;
  }

  .report-page .rating-bar-row .bar-track {
    height: 3mm;
    overflow: hidden;
    border: 1px solid #c5cfda;
    border-radius: 0;
    background: var(--print-soft) !important;
  }

  .report-page .rating-bar-row .bar-fill {
    height: 100%;
    min-height: 0;
    border: 1px solid var(--print-navy);
    border-radius: 0;
    background: var(--print-navy) !important;
    box-shadow: inset 0 0 0 100vw var(--print-navy);
  }

  .report-page .feedback-entry-list,
  .report-page .reflection-list,
  .report-page .summary-list {
    border-color: var(--print-line);
  }

  .report-page .feedback-entry-list > div,
  .report-page .feedback-entry,
  .report-page .reflection-list div,
  .report-page .summary-list div {
    border-color: var(--print-line);
    break-inside: avoid-page;
  }

  .report-page .feedback-entry {
    color: var(--print-ink) !important;
  }

  .report-page .feedback-entry__comment,
  .report-page .reflection-list dd,
  .report-page .summary-list dd {
    color: var(--print-ink);
    white-space: normal;
  }

  .report-page .report-quote {
    break-inside: avoid-page;
    border: 1px solid var(--print-line);
    border-left: 4px solid var(--print-navy);
    background: var(--print-soft) !important;
  }

  .report-page .data-table,
  .report-page .data-panel table {
    border: 1px solid var(--print-line);
  }

  .report-page .data-table th,
  .report-page .data-panel table th {
    height: auto;
    padding: 2.5mm;
    border: 1px solid var(--print-line);
    background: var(--print-soft) !important;
    color: var(--print-navy);
    font-size: 7.5pt;
    font-weight: 700;
  }

  .report-page .data-table td,
  .report-page .data-panel table td {
    min-height: 0;
    padding: 2.5mm;
    border: 1px solid var(--print-line);
    color: var(--print-ink);
    font-size: 8pt;
  }

  .report-page .ai-summary {
    display: block;
    padding: 0 0 4mm;
  }

  .report-page .ai-summary > summary {
    min-height: 0;
    padding: 3mm 4mm;
    border-bottom: 2px solid var(--print-navy);
    color: var(--print-navy);
    list-style: none;
  }

  .report-page .ai-summary > summary span:last-child {
    display: none;
  }

  .report-page .ai-summary > :not(summary) {
    display: block !important;
  }

  .report-page .report-content__aside {
    columns: 2;
    column-gap: 6mm;
  }

  .report-page .report-content__aside .side-section {
    break-inside: avoid-column;
  }

  .report-page [data-chart-panel][hidden] {
    display: block !important;
  }

  .report-page .chart-panel {
    min-height: 0;
    break-inside: avoid-page;
  }
}

/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 */
/* Hallmark · component: feedback row action menu · genre: modern-minimal · theme: Performance AI
 * states: default · hover · focus · active · disabled · loading · error · success
 * contrast: pass (46–50)
 */
.feedback-page .data-table .actions-cell {
  width: 64px;
  padding-inline: 8px;
}

.feedback-page .row-actions-trigger {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-muted);
  box-shadow: none;
  cursor: pointer;
  transform: translateY(0);
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    opacity 160ms var(--ease-out),
    transform 100ms var(--ease-out);
}

.feedback-page .row-actions-trigger svg {
  display: block;
  fill: currentColor;
}

@media (hover: hover) and (pointer: fine) {
  .feedback-page .row-actions-trigger:hover {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--ink);
  }
}

.feedback-page .row-actions-trigger:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.feedback-page .row-actions-trigger:active,
.feedback-page .row-actions-trigger.app-pointer-press {
  transform: translateY(1px) scale(.98);
}

.feedback-page .row-actions-trigger:has(+ .row-actions__menu:popover-open) {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
}

.feedback-page .row-actions-trigger:disabled,
.feedback-page .row-actions-trigger[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .48;
}

.feedback-page .row-actions-trigger[data-state="loading"] {
  cursor: wait;
}

.feedback-page .row-actions-trigger[data-state="loading"] svg {
  opacity: .24;
}

.feedback-page .row-actions-trigger[data-state="loading"]::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  border-radius: var(--radius-pill);
  animation: feedback-action-spin 700ms linear infinite;
}

.feedback-page .row-actions-trigger[data-state="error"] {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.feedback-page .row-actions-trigger[data-state="success"] {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

@keyframes feedback-action-spin {
  to { transform: rotate(360deg); }
}

.feedback-page .row-actions__menu {
  width: 204px;
  padding: 6px;
  border-color: var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  transform-origin: top right;
}

.feedback-page .row-actions__menu::before {
  display: none;
}

.feedback-page .row-actions__menu form {
  display: block;
  max-width: none;
  margin: 0;
}

.feedback-page .row-actions__menu button.row-actions__danger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--danger);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(0);
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    opacity 160ms var(--ease-out),
    transform 100ms var(--ease-out);
}

.feedback-page .row-actions__danger svg {
  flex: none;
}

@media (hover: hover) and (pointer: fine) {
  .feedback-page .row-actions__menu button.row-actions__danger:hover {
    border-color: var(--danger-soft);
    background: var(--danger-soft);
    color: var(--danger);
  }
}

.feedback-page .row-actions__menu button.row-actions__danger:focus-visible {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.feedback-page .row-actions__menu button.row-actions__danger:active,
.feedback-page .row-actions__menu button.row-actions__danger.app-pointer-press {
  background: var(--danger-soft);
  color: var(--danger);
  transform: translateY(1px) scale(.99);
}

.feedback-page .row-actions__menu button.row-actions__danger:disabled,
.feedback-page .row-actions__menu button.row-actions__danger[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .48;
}

.feedback-page .row-actions__menu button.row-actions__danger[data-state="loading"] {
  cursor: wait;
  opacity: .72;
}

.feedback-page .row-actions__menu button.row-actions__danger[data-state="error"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.feedback-page .row-actions__menu button.row-actions__danger[data-state="success"] {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

@media (prefers-reduced-motion: reduce) {
  .feedback-page .row-actions-trigger,
  .feedback-page .row-actions__menu button.row-actions__danger {
    transition-duration: 0ms;
  }

  .feedback-page .row-actions-trigger:active,
  .feedback-page .row-actions-trigger.app-pointer-press,
  .feedback-page .row-actions__menu button.row-actions__danger:active,
  .feedback-page .row-actions__menu button.row-actions__danger.app-pointer-press {
    transform: none;
  }
}

/* Shared motion layer: only transient state, spatial context, and pointer feedback. */
@media screen {
  button,
  .button-link {
    transition-duration: 160ms;
  }

  button.app-pointer-press,
  .button-link.app-pointer-press,
  [role="button"].app-pointer-press {
    transform: scale(.98);
  }

  dialog {
    opacity: 0;
    transform: scale(.96);
    transform-origin: center;
    transition:
      opacity 250ms var(--ease-out),
      transform 250ms var(--ease-out),
      overlay 250ms allow-discrete,
      display 250ms allow-discrete;
  }

  dialog[open] {
    opacity: 1;
    transform: scale(1);
  }

  dialog::backdrop {
    opacity: 0;
    transition:
      opacity 250ms var(--ease-out),
      overlay 250ms allow-discrete,
      display 250ms allow-discrete;
  }

  dialog[open]::backdrop {
    opacity: 1;
  }

  [popover] {
    opacity: 0;
    transform: scale(.97);
    transform-origin: top center;
    transition:
      opacity 160ms var(--ease-out),
      transform 160ms var(--ease-out),
      overlay 160ms allow-discrete,
      display 160ms allow-discrete;
  }

  [popover]:popover-open {
    opacity: 1;
    transform: scale(1);
  }

  .checkin-subject-dropdown:not([hidden]),
  .manager-combobox__list:not([hidden]),
  [role="tabpanel"]:not([hidden]) {
    animation: app-transient-enter 160ms var(--ease-out);
  }

  @starting-style {
    dialog[open] {
      opacity: 0;
      transform: scale(.96);
    }

    dialog[open]::backdrop {
      opacity: 0;
    }

    [popover]:popover-open {
      opacity: 0;
      transform: scale(.97);
    }
  }

  @keyframes app-transient-enter {
    from {
      opacity: 0;
      transform: translateY(-4px) scale(.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  html[data-input-modality="keyboard"] dialog,
  html[data-input-modality="keyboard"] dialog::backdrop,
  html[data-input-modality="keyboard"] [popover],
  html[data-input-modality="keyboard"] .checkin-subject-dropdown,
  html[data-input-modality="keyboard"] .manager-combobox__list,
  html[data-input-modality="keyboard"] [role="tabpanel"] {
    animation-duration: 0ms;
    transition-duration: 0ms;
  }
}

@media (hover: none), (pointer: coarse) {
  button:hover,
  .button-link:hover {
    transform: none;
  }

  button.app-pointer-press,
  .button-link.app-pointer-press,
  [role="button"].app-pointer-press {
    transform: scale(.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  button.app-pointer-press,
  .button-link.app-pointer-press,
  [role="button"].app-pointer-press {
    transform: none;
  }

  dialog,
  dialog::backdrop,
  [popover] {
    transform: none;
    transition: opacity 160ms var(--ease-out), display 160ms allow-discrete;
  }

  .checkin-subject-dropdown:not([hidden]),
  .manager-combobox__list:not([hidden]),
  [role="tabpanel"]:not([hidden]) {
    animation: app-transient-fade 160ms var(--ease-out);
  }

  @keyframes app-transient-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · genre: modern-minimal · tone: calm technical utilitarian · anchor: existing monochrome ink · macrostructure: Split Studio · theme: Performance AI light workspace · designed-as-app · contrast: pass (40–41) · nav: existing sidebar · footer: none · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57) */
/* Check-ins: creation and authored history share one focused workspace. */
html,
body {
  overflow-x: clip;
}

.checkin-page {
  width: min(100%, 1240px);
  max-width: 1240px;
  display: grid;
  gap: 20px;
  overflow-x: clip;
}

.checkin-page__header {
  align-items: flex-end;
}

.checkin-page h1,
.checkin-page h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkin-page__summary {
  min-width: 108px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 0 4px 20px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-subtle);
  font-size: 12px;
  white-space: nowrap;
}

.checkin-page__summary strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.checkin-workspace {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-items: start;
}

.checkin-page .checkin-composer {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.checkin-composer__header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.checkin-composer__header p,
.checkin-history__header p {
  margin: 4px 0 0;
  color: var(--ink-subtle);
  font-size: 12px;
}

.checkin-composer__mark {
  flex: none;
  color: var(--ink-subtle);
}

.checkin-page .checkin-form {
  gap: 24px;
  padding: 24px;
}

.checkin-page .checkin-form__grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.checkin-page .checkin-form__grid .field-span-full {
  grid-column: auto;
}

.checkin-page .checkin-note-field textarea {
  min-height: 210px;
  resize: vertical;
  line-height: 1.55;
}

.checkin-page .checkin-form__actions {
  margin-top: 0;
  padding-top: 20px;
}

.checkin-page .checkin-form__actions button {
  min-height: 44px;
  white-space: nowrap;
}

.checkin-history {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.checkin-history__header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.checkin-history__count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.checkin-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkin-history__item {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line-tertiary);
}

.checkin-history__item:last-child {
  border-bottom: 0;
}

.checkin-history__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkin-history__identity > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.checkin-history__identity strong,
.checkin-history__identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkin-history__identity strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.checkin-history__identity div > span {
  color: var(--ink-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.checkin-history__item > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.checkin-history__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.checkin-history__source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-subtle);
  font-size: 11px;
  white-space: nowrap;
}

.checkin-history__source svg {
  flex: none;
}

.checkin-history__meta .status-pill {
  min-height: 24px;
  font-size: 11px;
}

.checkin-history__empty {
  min-height: 310px;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 8px;
  padding: 32px 24px;
  color: var(--ink-subtle);
}

.checkin-history__empty h3,
.checkin-history__empty p {
  margin: 0;
}

.checkin-history__empty p {
  max-width: 45ch;
  font-size: 12px;
}

.checkin-history__empty-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.checkin-history__empty-action span {
  transition: transform 140ms var(--ease-out);
}

.checkin-history__empty-action:active {
  opacity: .72;
}

.checkin-history__pager {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.checkin-history__pager > a,
.checkin-history__pager-disabled {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.checkin-history__pager > a:last-child,
.checkin-history__pager-disabled:last-child {
  justify-self: end;
}

.checkin-history__pager > a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkin-history__pager > a:active {
  opacity: .72;
}

.checkin-history__pager-disabled {
  color: var(--ink-tertiary);
}

.checkin-history__pager-status {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.checkin-history__pager-status small {
  color: var(--ink-subtle);
  font-family: var(--font-sans);
  font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .checkin-history__empty-action:hover span {
    transform: translateY(-2px);
  }
}

@media (min-width: 44rem) {
  .checkin-page .checkin-form__grid:has(.checkin-rag-field:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    align-items: end;
  }
}

@media (min-width: 60rem) {
  .checkin-workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr);
    gap: 20px;
  }
}

@media (max-width: 43.99rem) {
  .checkin-page__header {
    align-items: flex-start;
  }

  .checkin-page__summary {
    justify-content: flex-start;
    padding: 0;
    border-left: 0;
  }

  .checkin-composer__header,
  .checkin-history__header {
    min-height: 78px;
    padding: 16px;
  }

  .checkin-page .checkin-form {
    padding: 16px;
  }

  .checkin-page .checkin-note-field textarea {
    min-height: 180px;
  }

  .checkin-page .checkin-form__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .checkin-page .checkin-form__actions button {
    width: 100%;
  }

  .checkin-history__item {
    padding: 16px;
  }

  .checkin-history__pager {
    grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr);
    gap: 8px;
    padding: 8px 16px;
  }

  .checkin-history__pager-status small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkin-history__empty-action span {
    transition: none;
  }
}

/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · genre: modern-minimal · tone: calm technical utilitarian · anchor: observation workbench · macrostructure: Workbench · theme: Performance AI light workspace · designed-as-app · contrast: pass (40–41) · nav: existing sidebar · footer: none · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57) */
/* Check-ins v2: a focused capture surface followed by a searchable, full-width ledger. */
.checkin-workbench-page {
  width: min(100%, 1280px);
  max-width: 1280px;
  gap: var(--space-checkin-6);
  color: var(--color-checkin-ink);
}

.checkin-workbench-page .checkin-page__header {
  margin-bottom: 0;
}

.checkin-workbench-page .checkin-page__header > div {
  max-width: 720px;
}

.checkin-workbench-page .checkin-composer,
.checkin-workbench-page .checkin-history {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--color-checkin-rule-strong);
  border-radius: var(--radius-checkin-panel);
  background: var(--color-checkin-paper);
  color: var(--color-checkin-ink);
  box-shadow: none;
  animation: checkin-surface-enter 360ms var(--ease-checkin-out) both;
}

.checkin-workbench-page .checkin-history {
  animation-delay: 60ms;
}

.checkin-workbench-page .checkin-composer__header,
.checkin-workbench-page .checkin-history__header {
  min-height: 84px;
  padding: var(--space-checkin-5);
}

.checkin-workbench-page .checkin-composer__header {
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-checkin-3);
}

.checkin-workbench-page .checkin-composer__header h2,
.checkin-workbench-page .checkin-history__header h2 {
  font-family: var(--font-checkin-display);
  letter-spacing: -0.025em;
}

.checkin-privacy-label {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-checkin-2);
  padding-inline: var(--space-checkin-3);
  border: 1px solid var(--color-checkin-rule);
  border-radius: var(--radius-pill);
  color: var(--color-checkin-muted);
  font-family: var(--font-checkin-data);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.checkin-privacy-label svg {
  flex: none;
  color: var(--color-checkin-accent);
}

.checkin-composer__body {
  min-width: 0;
  display: grid;
}

.checkin-workbench-page .checkin-form {
  min-width: 0;
  gap: var(--space-checkin-5);
  padding: var(--space-checkin-5);
}

.checkin-workbench-page .checkin-form__grid {
  gap: var(--space-checkin-4);
}

.checkin-workbench-page .checkin-note-field {
  gap: var(--space-checkin-2);
}

.checkin-workbench-page .checkin-note-field textarea {
  min-height: 164px;
  border-width: 1px;
  outline: 2px solid transparent;
  outline-offset: 1px;
  background: var(--color-checkin-paper);
  color: var(--color-checkin-ink);
  resize: vertical;
}

.checkin-workbench-page .checkin-note-field textarea:focus-visible {
  outline-color: var(--color-checkin-focus);
}

.checkin-workbench-page .checkin-form__actions {
  min-height: 64px;
  margin-top: 0;
  padding-top: var(--space-checkin-4);
  border-top: 1px solid var(--color-checkin-rule);
}

.checkin-workbench-page .checkin-form__actions button,
.checkin-history__toolbar button {
  min-height: 44px;
  white-space: nowrap;
  transition: background-color var(--duration-checkin-hover) var(--ease-checkin-out),
              color var(--duration-checkin-hover) var(--ease-checkin-out),
              transform var(--duration-checkin-press) var(--ease-checkin-out);
}

.checkin-workbench-page .checkin-form__actions button:active,
.checkin-history__toolbar button:active {
  transform: translateY(1px);
}

.checkin-note-guide {
  min-width: 0;
  padding: var(--space-checkin-6) var(--space-checkin-5);
  border-top: 1px solid var(--color-checkin-rule);
  background: var(--color-checkin-paper-muted);
  color: var(--color-checkin-ink);
}

.checkin-note-guide__eyebrow {
  display: block;
  margin-bottom: var(--space-checkin-2);
  color: var(--color-checkin-accent);
  font-family: var(--font-checkin-data);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkin-note-guide h3 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-checkin-display);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.checkin-note-guide ol {
  display: grid;
  gap: var(--space-checkin-4);
  margin: var(--space-checkin-6) 0 0;
  padding: 0;
  list-style: none;
}

.checkin-note-guide li {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--space-checkin-3);
  padding-top: var(--space-checkin-4);
  border-top: 1px solid var(--color-checkin-rule);
}

.checkin-note-guide li > span {
  color: var(--color-checkin-faint);
  font-family: var(--font-checkin-data);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.checkin-note-guide li div {
  min-width: 0;
}

.checkin-note-guide li strong {
  display: block;
  color: var(--color-checkin-ink);
  font-size: 12px;
}

.checkin-note-guide li p {
  margin: var(--space-checkin-1) 0 0;
  color: var(--color-checkin-muted);
  font-size: 11px;
  line-height: 1.5;
}

.checkin-workbench-page .checkin-history {
  overflow: hidden;
}

.checkin-history__total {
  display: flex;
  align-items: baseline;
  gap: var(--space-checkin-2);
  color: var(--color-checkin-subtle);
  font-size: 11px;
  white-space: nowrap;
}

.checkin-history__total strong {
  color: var(--color-checkin-ink);
  font-family: var(--font-checkin-data);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.checkin-history__toolbar {
  width: 100%;
  max-width: none;
  min-width: 0;
  display: grid;
  gap: var(--space-checkin-3);
  padding: var(--space-checkin-4) var(--space-checkin-5);
  border-bottom: 1px solid var(--color-checkin-rule);
  background: var(--color-checkin-paper-muted);
  color: var(--color-checkin-ink);
}

.checkin-history__toolbar label {
  min-width: 0;
  display: grid;
  gap: var(--space-checkin-2);
  color: var(--color-checkin-muted);
  font-size: 11px;
  font-weight: 600;
}

.checkin-history__toolbar label > span:first-child {
  white-space: nowrap;
}

.checkin-history__toolbar .search-field,
.checkin-history__toolbar select {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--color-checkin-rule-strong);
  border-radius: var(--radius-checkin-control);
  outline: 2px solid transparent;
  outline-offset: 1px;
  background-color: var(--color-checkin-paper);
  color: var(--color-checkin-ink);
}

.checkin-history__toolbar .search-field:focus-within,
.checkin-history__toolbar select:focus-visible {
  outline-color: var(--color-checkin-focus);
}

.checkin-history__toolbar .search-field input {
  min-width: 0;
  height: 42px;
  color: var(--color-checkin-ink);
}

.checkin-history__toolbar .search-field input:focus-visible {
  outline: 0;
}

.checkin-history__toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: var(--space-checkin-2);
}

.checkin-history__toolbar-actions button {
  min-width: 84px;
}

.checkin-history__clear {
  min-width: 52px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-checkin-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.checkin-history__clear:active {
  color: var(--color-checkin-ink);
}

.checkin-history__results {
  margin: 0;
  padding: var(--space-checkin-3) var(--space-checkin-5);
  border-bottom: 1px solid var(--color-checkin-rule);
  color: var(--color-checkin-muted);
  font-family: var(--font-checkin-data);
  font-size: 10px;
}

.checkin-history__columns {
  display: none;
}

.checkin-workbench-page .checkin-history__item {
  min-width: 0;
  display: grid;
  gap: var(--space-checkin-4);
  padding: var(--space-checkin-5);
  border-bottom: 1px solid var(--color-checkin-rule);
  background: var(--color-checkin-paper);
  color: var(--color-checkin-ink);
  transition: background-color var(--duration-checkin-hover) var(--ease-checkin-out);
}

.checkin-workbench-page .checkin-history__item:last-child {
  border-bottom: 0;
}

.checkin-workbench-page .checkin-history__identity {
  align-items: center;
}

.checkin-workbench-page .checkin-history__identity strong {
  font-size: 13px;
}

.checkin-workbench-page .checkin-history__identity div > span {
  font-family: var(--font-checkin-data);
  font-size: 10px;
}

.checkin-history__note,
.checkin-history__date,
.checkin-workbench-page .checkin-history__meta {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-checkin-3);
}

.checkin-history__note::before,
.checkin-history__date::before,
.checkin-workbench-page .checkin-history__meta::before {
  content: attr(data-label);
  color: var(--color-checkin-subtle);
  font-family: var(--font-checkin-data);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
}

.checkin-workbench-page .checkin-history__item > .checkin-history__note {
  margin: 0;
  color: var(--color-checkin-muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.checkin-workbench-page .checkin-history__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  column-gap: var(--space-checkin-3);
  row-gap: var(--space-checkin-2);
}

.checkin-workbench-page .checkin-history__meta::before {
  flex: 0 0 92px;
}

.checkin-history__date {
  color: var(--color-checkin-subtle);
  font-family: var(--font-checkin-data);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.checkin-history__no-signal {
  color: var(--color-checkin-faint);
}

.checkin-workbench-page .checkin-history__empty {
  min-height: 240px;
  padding: var(--space-checkin-8) var(--space-checkin-5);
}

.checkin-workbench-page .checkin-history__pager {
  background: var(--color-checkin-paper-muted);
  color: var(--color-checkin-ink);
}

@media (hover: hover) and (pointer: fine) {
  .checkin-workbench-page .checkin-history__item:hover {
    background: var(--color-checkin-paper-muted);
    color: var(--color-checkin-ink);
  }

  .checkin-history__clear:hover {
    color: var(--color-checkin-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (min-width: 44rem) {
  .checkin-workbench-page .checkin-composer__header,
  .checkin-workbench-page .checkin-history__header {
    padding-inline: var(--space-checkin-6);
  }

  .checkin-workbench-page .checkin-composer__header {
    align-items: center;
    flex-direction: row;
  }

  .checkin-workbench-page .checkin-form {
    padding: var(--space-checkin-6);
  }

  .checkin-note-guide {
    padding: var(--space-checkin-8) var(--space-checkin-6);
  }

  .checkin-history__toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 220px) auto;
    align-items: end;
    padding: var(--space-checkin-4) var(--space-checkin-6);
  }

  .checkin-history__toolbar-actions {
    min-height: 44px;
  }

  .checkin-workbench-page .checkin-history__item {
    padding-inline: var(--space-checkin-6);
  }
}

@media (min-width: 60rem) {
  .checkin-composer__body {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.78fr);
  }

  .checkin-note-guide {
    border-top: 0;
    border-inline-start: 1px solid var(--color-checkin-rule);
  }

  .checkin-history__columns,
  .checkin-workbench-page .checkin-history__item {
    grid-template-columns: minmax(180px, 0.82fr) minmax(280px, 2fr) minmax(148px, 0.72fr) 112px;
    column-gap: var(--space-checkin-6);
  }

  .checkin-history__columns {
    min-height: 40px;
    display: grid;
    align-items: center;
    padding-inline: var(--space-checkin-6);
    border-bottom: 1px solid var(--color-checkin-rule);
    background: var(--color-checkin-paper-muted);
    color: var(--color-checkin-subtle);
    font-family: var(--font-checkin-data);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .checkin-workbench-page .checkin-history__item {
    align-items: start;
    gap: var(--space-checkin-6);
  }

  .checkin-history__note,
  .checkin-history__date,
  .checkin-workbench-page .checkin-history__meta {
    display: flex;
    min-height: 32px;
    align-items: center;
  }

  .checkin-history__note::before,
  .checkin-history__date::before,
  .checkin-workbench-page .checkin-history__meta::before {
    display: none;
  }
}

@media (pointer: coarse) {
  .checkin-workbench-page button,
  .checkin-workbench-page a,
  .checkin-workbench-page input,
  .checkin-workbench-page select {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkin-workbench-page .checkin-composer,
  .checkin-workbench-page .checkin-history {
    animation: none;
  }

  .checkin-workbench-page .checkin-form__actions button,
  .checkin-history__toolbar button,
  .checkin-workbench-page .checkin-history__item {
    transition: none;
  }
}

@keyframes checkin-surface-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Hallmark application theme — studied public-reference visual DNA
   Pre-emit critique: keep the enterprise workbench intact; borrow atmosphere,
   typography, luminous surfaces, restrained depth, and near-black actions.
   Do not copy the reference's chat structure, robot imagery, or decorative UI.
   -------------------------------------------------------------------------- */

:root {
  --paper: var(--color-paper);
  --surface: var(--color-panel);
  --surface-2: var(--color-paper-cool);
  --surface-3: var(--color-paper-muted);
  --surface-4: var(--color-rule);
  --ink: var(--color-ink);
  --ink-muted: var(--color-muted);
  --ink-subtle: var(--color-subtle);
  --ink-tertiary: var(--color-faint);
  --line: var(--color-rule);
  --line-strong: var(--color-rule-strong);
  --line-tertiary: var(--color-rule-faint);
  --accent: var(--color-accent);
  --accent-hover: var(--color-accent-ink);
  --accent-ink: var(--color-accent-ink);
  --accent-soft: var(--color-accent-soft);
  --accent-tint: var(--color-accent-soft);
  --on-accent: var(--color-action-ink);
  --danger: var(--color-danger);
  --danger-soft: var(--color-danger-soft);
  --success: var(--color-success);
  --success-soft: var(--color-success-soft);
  --warning: var(--color-warning);
  --warning-soft: var(--color-warning-soft);
  --info: var(--color-info);
  --info-soft: var(--color-info-soft);
  --focus-ring: var(--color-focus);
  --glass-surface: var(--color-panel);
  --glass-surface-strong: var(--color-panel-strong);
  --glass-border: var(--color-rule-faint);
  --sidebar-ink: var(--color-muted);
  --sidebar-ink-active: var(--color-action-ink);
  --sidebar-active-bg: var(--color-action);
  --sidebar-border: var(--color-rule);
  --sidebar-width: 248px;
  --font-sans: var(--font-body-system);
  --font-display: var(--font-display-system);
  --font-mono: var(--font-body-system);
  --radius: var(--radius-control);
  --radius-lg: var(--radius-panel);
  --shadow-sm: var(--shadow-card);
  --shadow-md: var(--shadow-float);
}

@media screen {
  html {
    overflow-x: clip;
    scrollbar-color: var(--color-rule-strong) var(--color-paper-cool);
  }

  body {
    min-height: 100dvh;
    overflow-x: clip;
    background-color: var(--color-paper) !important;
    background-image:
      radial-gradient(circle at 84% 2%, var(--color-ambient-warm), transparent 34rem),
      radial-gradient(circle at 18% 8%, var(--color-ambient-cool), transparent 42rem) !important;
    background-attachment: fixed;
    color: var(--color-ink);
    font-family: var(--font-body-system);
    font-size: var(--text-base);
    line-height: 1.55;
  }

  body::before {
    display: none;
    background-image: none !important;
  }

  ::selection {
    background: var(--color-accent-soft);
    color: var(--color-accent-ink);
  }

  ::-webkit-scrollbar-track { background: var(--color-paper-cool); }
  ::-webkit-scrollbar-thumb {
    border-color: var(--color-paper-cool);
    background: var(--color-rule-strong);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--color-subtle); }

  :focus-visible {
    outline-color: var(--color-focus) !important;
    outline-offset: 3px;
  }

  .app-shell {
    min-height: 100dvh;
    background: transparent !important;
  }

  .sidebar {
    top: var(--space-4);
    bottom: var(--space-4);
    left: var(--space-4);
    width: calc(var(--sidebar-width) - var(--space-8));
    height: auto;
    padding: var(--space-4) var(--space-3);
    border: 1px solid var(--color-rule-faint);
    border-radius: var(--radius-shell);
    background: var(--color-panel) !important;
    box-shadow: var(--shadow-float) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .sidebar-top {
    min-height: 48px;
    padding: 0 var(--space-2) var(--space-3);
    border-bottom-color: var(--color-rule-faint);
  }

  .wordmark {
    color: var(--color-ink);
    font-family: var(--font-display-system);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .sidebar-nav { gap: var(--space-1); }

  .sidebar-nav > a,
  .sidebar-admin-row > a,
  .sidebar-footer > a {
    min-height: 42px;
    border-radius: var(--radius-control);
    color: var(--color-muted);
    font-size: var(--text-sm);
    font-weight: 600;
    transition:
      color var(--duration-hover) var(--ease-standard),
      background-color var(--duration-hover) var(--ease-standard),
      transform var(--duration-press) var(--ease-out);
  }

  .sidebar-nav > a:hover,
  .sidebar-admin-row > a:hover,
  .sidebar-footer > a:hover {
    background: var(--color-panel-hover) !important;
    color: var(--color-ink);
  }

  .sidebar-nav > a.active,
  .sidebar-admin-row > a.active {
    background: var(--color-action) !important;
    color: var(--color-action-ink) !important;
  }

  .sidebar-nav > a.active:hover,
  .sidebar-admin-row > a.active:hover {
    background: var(--color-action-hover) !important;
    color: var(--color-action-ink) !important;
  }

  .sidebar-section-label {
    color: var(--color-subtle);
    font-family: var(--font-data-system);
  }

  .sidebar-subnav {
    border-left-color: var(--color-rule);
  }

  .sidebar-subnav a {
    border-radius: 0 var(--radius-control) var(--radius-control) 0;
    color: var(--color-muted);
  }

  .sidebar-subnav a.active {
    background: var(--color-accent-soft) !important;
    color: var(--color-accent-ink);
  }

  .sidebar-profile {
    padding: var(--space-3) var(--space-2);
    border-top-color: var(--color-rule-faint);
  }

  .avatar-initials,
  .avatar {
    border-color: var(--color-rule-strong);
    border-radius: 50%;
    background: var(--color-paper-cool);
    color: var(--color-muted);
  }

  .app-content {
    width: calc(100% - var(--sidebar-width));
    max-width: none;
    margin-left: var(--sidebar-width);
    padding: var(--space-10) var(--space-10) 72px;
  }

  :root.sidebar-collapsed .sidebar {
    width: 64px;
  }

  :root.sidebar-collapsed .app-content {
    width: calc(100% - 96px);
    margin-left: 96px;
  }

  h1,
  h2,
  h3,
  .page-title,
  .card-title,
  .dialog__title,
  .auth-wordmark {
    color: var(--color-ink);
    font-family: var(--font-display-system);
    min-width: 0;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  h1,
  .page-header h1,
  .page-title {
    font-size: clamp(28px, 2.6vw, var(--text-2xl));
    line-height: 1.12;
    letter-spacing: -0.04em;
  }

  h2 { letter-spacing: -0.03em; }
  h3 { letter-spacing: -0.02em; }
  p { text-wrap: pretty; }

  .page-header {
    min-height: 92px;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom-color: var(--color-rule);
  }

  .page-lede,
  .muted,
  .helper-text,
  .field-help {
    color: var(--color-muted);
  }

  .page-kicker,
  .eyebrow,
  .section-kicker,
  .metric-label {
    color: var(--color-subtle);
    font-family: var(--font-body-system);
    font-size: var(--text-xs);
    letter-spacing: 0.055em;
  }

  .card,
  .data-panel,
  .side-section,
  .dashboard-panel,
  .filter-bar,
  .admin-tab-panel,
  .goal-owner-panel,
  .goal-composer-panel,
  .goal-preview,
  .checkin-composer,
  .checkin-history,
  .report-charts,
  .ai-summary {
    border-color: var(--color-rule);
    border-radius: var(--radius-panel);
    background: var(--color-panel) !important;
    box-shadow: var(--shadow-card) !important;
  }

  .panel-surface-muted,
  .metric,
  .stat-card,
  .summary-item,
  .empty-state {
    border-color: var(--color-rule-faint);
    background: var(--color-paper-cool) !important;
  }

  button,
  .button-link,
  .primary-button,
  .btn-primary {
    min-height: var(--control-height);
    border-radius: var(--radius-pill);
    background-color: var(--color-action);
    color: var(--color-action-ink);
    font-family: var(--font-body-system);
    font-weight: 650;
    white-space: nowrap;
    transition:
      background-color var(--duration-hover) var(--ease-standard),
      color var(--duration-hover) var(--ease-standard),
      border-color var(--duration-hover) var(--ease-standard),
      transform var(--duration-press) var(--ease-out),
      opacity var(--duration-hover) var(--ease-standard);
  }

  button:hover,
  .button-link:hover,
  .primary-button:hover,
  .btn-primary:hover {
    background-color: var(--color-action-hover);
    color: var(--color-action-ink);
  }

  .button-link,
  /* Buttons are primary by default; anything listed here opts out.
   This was six near-identical copies of the same rule that had drifted
   apart — .peer-chip__remove and .peer-picker__close were missing from one
   of them, so those two rendered as dark pills. One rule now, so a new
   opt-out is added in exactly one place.

   Not converted to an opt-in .btn-primary class: that would mean adding it
   to 64 template buttons plus 5 built in JS, and anything missed silently
   loses its styling with no test to catch it. Worth doing on its own, with
   a visual diff. */
button:not(.app-toast__action):not(.app-toast__close):not(.auth-password-toggle):not(.ghost):not(.icon-text-button):not(.inline-button-link):not(.pagination__button):not(.peer-chip__remove):not(.peer-picker__close):not(.popover-menu-item):not(.progress-value):not(.ql-bucket):not(.row-actions-trigger):not(.row-actions__danger):not(.secondary):not(.status-pill):not(.text-action) {
  background: var(--color-action);
  border-color: var(--color-action);
  color: var(--color-action-ink);
}

button:not(.app-toast__action):not(.app-toast__close):not(.auth-password-toggle):not(.ghost):not(.icon-text-button):not(.inline-button-link):not(.pagination__button):not(.peer-chip__remove):not(.peer-picker__close):not(.popover-menu-item):not(.progress-value):not(.ql-bucket):not(.row-actions-trigger):not(.row-actions__danger):not(.secondary):not(.status-pill):not(.text-action):hover {
  background: var(--color-action-hover);
  border-color: var(--color-action-hover);
  color: var(--color-action-ink);
}

button:active,
  .button-link:active,
  .primary-button:active,
  .btn-primary:active {
    transform: translateY(1px) scale(0.985);
  }

  button.secondary,
  .button-link.secondary,
  .btn-secondary,
  .button-secondary {
    border-color: var(--color-rule-strong);
    background: var(--color-panel) !important;
    color: var(--color-ink-soft);
  }

  button.secondary:hover,
  .button-link.secondary:hover,
  .btn-secondary:hover,
  .button-secondary:hover {
    border-color: var(--color-subtle);
    background: var(--color-panel-hover) !important;
    color: var(--color-ink);
  }

  button:disabled,
  .button-link[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .search-field,
  .combobox-input {
    border-color: var(--color-rule-strong);
    border-radius: var(--radius-control);
    background: var(--color-panel-strong) !important;
    color: var(--color-ink);
    font-family: var(--font-body-system);
    outline: 2px solid transparent;
    outline-offset: 1px;
    transition:
      border-color var(--duration-hover) var(--ease-standard),
      background-color var(--duration-hover) var(--ease-standard);
  }

  input:not([type="checkbox"]):not([type="radio"]):hover,
  select:hover,
  textarea:hover,
  .search-field:hover {
    border-color: var(--color-subtle);
  }

  input:not([type="checkbox"]):not([type="radio"]):focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  .search-field:focus-within {
    border-color: var(--color-focus);
    outline: 2px solid var(--color-focus) !important;
    outline-offset: 1px;
  }

  input::placeholder,
  textarea::placeholder { color: var(--color-faint); }

  .segmented,
  .tabs,
  .filter-toolbar,
  .data-toolbar,
  .checkin-history__toolbar {
    border-color: var(--color-rule);
    background: var(--color-paper-cool) !important;
  }

  .segmented a,
  .tab-link,
  .filter-chip {
    border-radius: var(--radius-pill);
  }

  .segmented a.active,
  .tab-link.active,
  .filter-chip.active {
    background: var(--color-panel-strong) !important;
    color: var(--color-ink);
  }

  .data-panel table th,
  .table-wrap table th,
  .org-tree__header,
  .checkin-history__columns {
    background: var(--color-paper-muted) !important;
    color: var(--color-muted);
    font-family: var(--font-body-system);
  }

  .data-panel table td,
  .table-wrap table td,
  .org-tree__row,
  .checkin-history__item {
    border-color: var(--color-rule-faint);
  }

  .data-panel table tbody tr:hover td,
  .table-wrap table tbody tr:hover td,
  .org-tree__row:hover,
  .checkin-history__item:hover {
    background: var(--color-panel-hover) !important;
  }

  .status-pill,
  .badge,
  .role-badge,
  .chip,
  .tag {
    border-radius: var(--radius-pill);
    font-family: var(--font-body-system);
  }

  progress,
  .progress-track,
  .score-bar,
  .distribution-track {
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: var(--color-paper-muted) !important;
  }

  .progress-fill,
  .score-bar__fill,
  .distribution-fill {
    border-radius: inherit;
    background: var(--color-accent) !important;
  }

  dialog.glass-dialog,
  .dialog,
  .modal,
  .popover-menu,
  .combobox-listbox,
  .app-toast {
    border-color: var(--color-rule);
    border-radius: var(--radius-panel);
    background: var(--color-panel-strong) !important;
    box-shadow: var(--shadow-float) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  dialog::backdrop {
    background: color-mix(in oklab, var(--color-ink) 24%, transparent);
  }

  .popover-menu-item {
    border-radius: var(--radius-control);
  }

  .popover-menu-item:hover,
  .combobox-option:hover,
  .combobox-option[aria-selected="true"] {
    background: var(--color-panel-hover) !important;
  }

  .app-toast {
    overflow: hidden;
  }

  .auth-shell {
    min-height: 100dvh;
    padding: 112px var(--space-6) 72px;
    background-color: transparent !important;
    background-image: none !important;
  }

  .auth-wordmark { color: var(--color-ink); }
  .auth-masthead__note { color: var(--color-muted); }

  .auth-panel {
    width: 460px;
    gap: var(--space-6);
    padding: 38px var(--space-10) var(--space-8);
    border-color: var(--color-rule-faint);
    border-radius: var(--radius-shell);
    background: var(--color-panel) !important;
    box-shadow: var(--shadow-float) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .auth-form input { min-height: 50px; }

  .auth-form > button[type="submit"] {
    min-height: 50px;
    border-color: var(--color-action);
    border-radius: var(--radius-pill);
    background: var(--color-action) !important;
    color: var(--color-action-ink);
  }

  .auth-password-toggle,
  .auth-password-toggle:hover,
  .auth-password-toggle:active {
    border-radius: 50%;
    background: transparent !important;
    color: var(--color-ink);
    transform: translateY(-50%);
  }

  .auth-password-toggle:hover {
    background: var(--color-paper-muted) !important;
  }
}

@media screen and (max-width: 78rem) {
  .app-content {
    padding-right: var(--space-6);
    padding-left: var(--space-6);
  }
}

@media screen and (max-width: 48.75rem) {
  .sidebar,
  :root.sidebar-collapsed .sidebar {
    position: sticky;
    inset: 0;
    width: 100%;
    height: auto;
    display: flex;
    padding: var(--space-3) var(--space-4);
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: var(--shadow-card) !important;
  }

  .sidebar-top {
    min-height: 40px;
    padding-bottom: var(--space-2);
  }

  .sidebar-nav {
    padding-bottom: var(--space-1);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar { display: none; }

  .sidebar-nav > a .sidebar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    display: block;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .sidebar-nav > a,
  .sidebar-admin-row > a {
    min-height: 40px;
    flex: 0 0 auto;
  }

  .sidebar-footer,
  .sidebar-admin-group { display: none; }

  .app-content,
  :root.sidebar-collapsed .app-content {
    width: 100%;
    margin-left: 0;
    padding: var(--space-6) var(--space-4) var(--space-12);
  }

  .page-header {
    min-height: 0;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .auth-panel {
    width: calc(100vw - var(--space-8));
    padding: 30px var(--space-6) 28px;
  }
}

@media screen and (max-width: 30rem) {
  .app-content,
  :root.sidebar-collapsed .app-content {
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }

  .page-header__actions,
  .form-actions,
  .dialog__actions {
    width: 100%;
  }

  .page-header__actions > *,
  .form-actions > * {
    flex: 1 1 auto;
  }

  .auth-shell { padding-inline: var(--space-4); }
  .auth-panel {
    width: 100%;
    padding-inline: var(--space-5);
    border-radius: var(--radius-panel);
  }
}

@media (pointer: coarse) {
  button,
  a.button-link,
  input,
  select {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Hallmark · theme: studied-DNA (source: image) · macrostructure: Workbench · knob-delta: inset-rail+atmospheric-canvas · design-system: design.md · designed-as-app · app-viewport: 1440x900 · nav: N3 · footer: none · contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57) · mobile-checked: 320,375,414,768 */

/* Vercel Web Interface Guidelines · application-wide interaction hardening. */
@media screen {
  html {
    scroll-padding-top: var(--space-6);
  }

  :where(h1, h2, h3, h4, h5, h6)[id],
  :where(section, article)[id] {
    scroll-margin-top: var(--space-16);
  }

  :where(button, a, summary, input, select, textarea) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: color-mix(in oklab, var(--color-accent) 16%, transparent);
  }

  :where(.numeric, .tabular, time, output, [data-listing-summary], [data-roster-count]) {
    font-variant-numeric: tabular-nums;
  }

  :where(
    .cell-primary,
    .cell-secondary,
    .person-cell__copy,
    .feedback-entry__comment,
    .feedback-detail-comment,
    .checkin-history__note,
    .note-body,
    .report-quote,
    .goal-card__title,
    .goal-card__description
  ) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  :where(.search-field, .goal-search-field, .goal-filter-search, .peer-picker__search, .checkin-search-field, .manager-combobox__control):focus-within {
    border-color: var(--color-focus) !important;
    outline: 2px solid var(--color-focus) !important;
    outline-offset: 1px;
  }

  :where(summary, input[type="range"], .checkin-subject-option):focus-visible {
    outline: 2px solid var(--color-focus) !important;
    outline-offset: 2px;
  }

  dialog.glass-dialog:focus-visible {
    outline: 2px solid var(--color-focus) !important;
    outline-offset: 4px;
  }

  :where(input, select, textarea):disabled {
    cursor: not-allowed;
    border-color: var(--color-rule) !important;
    background: var(--color-paper-muted) !important;
    opacity: 0.55;
  }

  :where(input[type="checkbox"], input[type="radio"], input[type="range"]) {
    accent-color: var(--color-accent);
  }

  :where(button, .button-link)[aria-busy="true"] {
    cursor: progress;
    gap: var(--space-2);
    pointer-events: none;
  }

  :where(button, .button-link)[aria-busy="true"]::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid color-mix(in oklab, currentColor 34%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: interface-spin 700ms linear infinite;
  }

  body:has(dialog[open]) {
    overflow: hidden;
  }

  dialog,
  [popover],
  [role="listbox"] {
    overscroll-behavior: contain;
  }

  .app-confirm-dialog {
    width: min(440px, calc(100vw - var(--space-8)));
  }

  .app-confirm-dialog .dialog__body {
    display: grid;
    gap: var(--space-6);
  }

  .app-confirm-dialog .dialog__body > p {
    margin: 0;
    color: var(--color-muted);
  }

  .app-confirm-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
  }

  button.app-confirm-dialog__accept,
  button.app-confirm-dialog__accept:hover {
    border-color: var(--color-danger) !important;
    background: var(--color-danger) !important;
    color: var(--color-action-ink) !important;
  }

  .feedback-entry-list > [data-listing-item],
  .compact-list > [data-listing-item],
  .org-tree__item,
  .checkin-history__item {
    content-visibility: auto;
    contain-intrinsic-size: auto 56px;
  }
}

@keyframes interface-spin {
  to { transform: rotate(1turn); }
}

@keyframes ai-fill-interface {
  from { opacity: 0.72; transform: scale(0.995); }
  to { opacity: 1; transform: scale(1); }
}

.ai-filled {
  animation-name: ai-fill-interface;
  animation-duration: var(--duration-enter);
  animation-timing-function: var(--ease-out);
}

@media screen and (max-width: 48.75rem) {
  html { scroll-padding-top: 88px; }

  .sidebar,
  :root.sidebar-collapsed .sidebar {
    padding-top: max(var(--space-3), env(safe-area-inset-top));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
    padding-left: max(var(--space-4), env(safe-area-inset-left));
  }

  .app-content,
  :root.sidebar-collapsed .app-content {
    padding-right: max(var(--space-4), env(safe-area-inset-right));
    padding-bottom: max(var(--space-12), env(safe-area-inset-bottom));
    padding-left: max(var(--space-4), env(safe-area-inset-left));
  }

  :where(h1, h2, h3, h4, h5, h6)[id],
  :where(section, article)[id] {
    scroll-margin-top: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(button, .button-link)[aria-busy="true"]::before {
    animation: none;
    border-top-color: transparent;
  }
}

@media (forced-colors: active) {
  :where(button, a, input, select, textarea, summary):focus-visible {
    outline: 2px solid CanvasText !important;
  }

  :where(.status-pill, .badge, .chip) {
    border: 1px solid CanvasText;
  }
}
