/* ============================================================
   upkept/dev — design system
   White canvas · electric blue · Bricolage Grotesque + Figtree
   ============================================================ */

:root {
  /* Brand — navy on white */
  --blue: #1b336f;
  --blue-deep: #142757;
  --blue-ink: #0d1b3e;
  --tint: #f2f5fb;
  --tint-2: #e2e9f7;
  --ink: #0a1633;
  --muted: #5c6b85;
  --faint: #8b97ad;
  --line: #e6eaf2;
  --bg: #ffffff;
  --danger: #d43a3a;
  --danger-bg: #fdf1f1;
  --ok: #1a8f5c;
  --ok-bg: #eefaf4;

  /* Type */
  --display: "Bricolage Grotesque", Georgia, serif;
  --body: "Figtree", "Segoe UI", sans-serif;

  /* Shape — bubbly */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 30px;
  --shadow-sm: 0 1px 2px rgba(10, 22, 51, 0.05);
  --shadow: 0 14px 40px -14px rgba(10, 22, 51, 0.12);
  --shadow-blue: 0 8px 24px -10px rgba(27, 51, 111, 0.4);
  --ring: 0 0 0 3px rgba(27, 51, 111, 0.15);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

img { max-width: 100%; }

::selection { background: var(--tint-2); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 620px; margin: 0 auto; padding: 0 28px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Logo ---------- */
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.logo:hover { color: var(--ink); }
.logo sup {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  margin-left: 2px;
  letter-spacing: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-deep); color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: default; transform: none; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn-soft { background: var(--tint); color: var(--blue-deep); }
.btn-soft:hover { background: var(--tint-2); color: var(--blue-ink); }

.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 17px 34px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}
.field label .opt { color: var(--faint); font-weight: 500; }

.field .hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.input, .textarea, .select {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--ring);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c6b85' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field-error { color: var(--danger); font-size: 13px; margin: 6px 0 0; font-weight: 500; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input-group { display: flex; }
.input-group .select { width: 110px; border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 0; background-color: var(--tint); font-weight: 600; }
.input-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* Selectable option cards (radio) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.choice-grid.cols-2 { grid-template-columns: 1fr 1fr; }

.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice .choice-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}
.choice .choice-card strong { display: block; font-size: 15px; font-weight: 700; }
.choice-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
.choice-icon svg { width: 20px; height: 20px; }
.choice input:checked + .choice-card .choice-icon { background: var(--blue); color: #fff; }
.choice .choice-card span:not(.choice-icon) { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.choice:hover .choice-card { border-color: var(--blue); }
.choice input:checked + .choice-card {
  border-color: var(--blue);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.choice input:focus-visible + .choice-card { box-shadow: var(--ring); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-pending    { background: #fff7e8; color: #9a6b0f; }
.badge-in_review  { background: var(--tint); color: var(--blue-deep); }
.badge-matched    { background: #f0edff; color: #5b45c9; }
.badge-in_progress{ background: var(--tint-2); color: var(--blue-ink); }
.badge-completed  { background: var(--ok-bg); color: var(--ok); }
.badge-closed     { background: #f1f3f7; color: var(--muted); }

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 24px;
}
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

/* ---------- Marketing nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-nav nav { display: flex; align-items: center; gap: 26px; }
.site-nav nav a:not(.btn) { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.site-nav nav a:not(.btn):hover { color: var(--ink); }
.site-nav nav .btn { margin-left: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 110px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-globe { display: flex; justify-content: center; align-items: center; min-height: 380px; }
.hero-globe canvas { display: block; max-width: 100%; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--tint-2) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 75% 90% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 50% 0%, #000 30%, transparent 75%);
}
.hero .wrap { position: relative; }

.hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  max-width: 13ch;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
  position: relative;
}
.hero .lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 38px;
}
.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-cta .aside { font-size: 14px; color: var(--faint); }

/* Load-in animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.15s; }
.rise-3 { animation-delay: 0.25s; }
.rise-4 { animation-delay: 0.35s; }

/* ---------- Marketing sections ---------- */
.section { padding: 108px 0; }
.section-tinted { background: linear-gradient(180deg, var(--tint) 0%, #fff 100%); }

.section-head { max-width: 560px; margin-bottom: 64px; }
.section-head .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
  display: block;
}
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }

.feature {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 38px 34px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tint-2); }
.feature .num {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  background: var(--tint);
  width: 44px; height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* Work showcase */
.work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tint-2); }
.work-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}
.work-card:hover .work-shot img { transform: scale(1.04); }
.work-body { padding: 24px 26px 26px; }
.work-cat {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.work-card h3 { font-size: 18px; margin: 10px 0 6px; }
.work-body p { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.work-visit {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-visit .host { color: var(--faint); font-weight: 500; }
.work-card:hover .work-visit .arrow { transform: translate(2px, -2px); }
.work-visit .arrow { transition: transform 0.2s ease; }

/* Work marquee — infinite single-row carousel, pauses on hover/focus */
.work-marquee {
  position: relative;
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.work-track {
  display: flex;
  width: max-content;
  animation: work-scroll 55s linear infinite;
  will-change: transform;
}
.work-marquee:hover .work-track,
.work-marquee:focus-within .work-track { animation-play-state: paused; }
.work-track .work-card {
  flex: 0 0 340px;
  width: 340px;
  margin-right: 26px;
}
@keyframes work-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .work-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* Process timeline */
.process { max-width: 760px; position: relative; }
.process::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--tint-2);
  border-radius: 2px;
}
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 26px;
  padding: 6px 0;
}
.process-step + .process-step { margin-top: 34px; }
.process-dot {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px #fff, var(--shadow-blue);
  position: relative;
  z-index: 1;
}
.process-body h3 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.process-body p { color: var(--muted); font-size: 15.5px; max-width: 56ch; margin: 0; }
.process-tag {
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--blue-deep);
  background: var(--tint);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* Tick chip (why-us cards) */
.tick {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* FAQ accordion */
.faq { max-width: 760px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 26px;
  transition: border-color 0.15s ease;
}
.faq details + details { margin-top: 14px; }
.faq details:hover { border-color: var(--tint-2); }
.faq details[open] { border-color: var(--blue); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 500;
  color: var(--blue);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: -6px 0 22px; max-width: 60ch; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
}
.stat { padding: 42px 32px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .value {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
}
.stat .label { font-size: 14px; color: var(--muted); margin-top: 8px; display: block; }

/* Big CTA */
.cta-panel {
  background: var(--blue);
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border-radius: 48px;
  padding: 92px 48px;
  text-align: center;
  color: #fff;
}
.cta-panel h2 { font-size: clamp(28px, 4vw, 44px); color: #fff; max-width: 20ch; margin: 0 auto 14px; }
.cta-panel p { color: rgba(255, 255, 255, 0.82); font-size: 17px; max-width: 46ch; margin: 0 auto 32px; }
.cta-panel .btn { background: #fff; color: var(--blue-deep); box-shadow: 0 10px 30px -8px rgba(6, 42, 128, 0.5); }
.cta-panel .btn:hover { background: var(--tint); transform: translateY(-1px); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer .fine { font-size: 13.5px; color: var(--faint); }

/* ---------- App shell ---------- */
.app-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-nav .wrap { display: flex; align-items: center; height: 64px; gap: 30px; }
.app-nav .links { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.app-nav .links::-webkit-scrollbar { display: none; }
.app-nav .links a {
  font-size: 14.5px;
  font-weight: 550;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.app-nav .links a:hover { color: var(--ink); background: var(--tint); }
.app-nav .links a.active { color: var(--blue-deep); background: var(--tint); font-weight: 650; }
.app-nav .user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.app-nav .user form { margin: 0; }
.app-nav .user button {
  background: none; border: none; cursor: pointer;
  font-family: var(--body); font-size: 14px; font-weight: 550; color: var(--muted); padding: 0;
}
.app-nav .user button:hover { color: var(--danger); }

.page { padding: 48px 0 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 15px; margin: 6px 0 0; }

/* ---------- Cards & tables ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card + .card { margin-top: 20px; }
.card h2 { font-size: 20px; }

.job-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  margin-bottom: 14px;
}
.job-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); color: var(--ink); transform: translateY(-1px); }
.job-card .top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 8px; }
.job-card .top h3 { font-size: 17px; margin: 0; }
.job-card .meta { display: flex; gap: 18px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.job-card .meta strong { color: var(--ink); font-weight: 600; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 680px; }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: var(--tint); }
.table tbody tr[data-href] { cursor: pointer; }
.table a.row-link { color: var(--ink); font-weight: 600; }
.table a.row-link:hover { color: var(--blue); }

/* Stat tiles (dashboards) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
.tile { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: #fff; }
.tile .value { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; display: block; }
.tile .value.accent { color: var(--blue); }
.tile .label { font-size: 13.5px; color: var(--muted); margin-top: 7px; display: block; }

/* Detail definition list */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.detail dt { font-size: 12.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.detail dd { margin: 0; font-size: 15px; font-weight: 500; }
.detail.full { grid-column: 1 / -1; }
.detail dd.prose { font-weight: 400; white-space: pre-line; color: var(--ink); line-height: 1.65; }

/* Empty state */
.empty {
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 70px 30px;
}
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 24px; }

/* ---------- Stepper ---------- */
.stepper-rail {
  display: flex;
  align-items: center;
  margin-bottom: 42px;
}
.stepper-rail .node { display: flex; align-items: center; gap: 10px; }
.stepper-rail .dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--faint);
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--display);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.stepper-rail .name { font-size: 13.5px; font-weight: 600; color: var(--faint); transition: color 0.25s ease; white-space: nowrap; }
.stepper-rail .bar { flex: 1; height: 1.5px; background: var(--line); margin: 0 14px; position: relative; overflow: hidden; }
.stepper-rail .bar::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.stepper-rail .node.active .dot { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.stepper-rail .node.active .name { color: var(--ink); }
.stepper-rail .node.done .dot { border-color: var(--blue); background: var(--tint); color: var(--blue); }
.stepper-rail .node.done .name { color: var(--muted); }
.stepper-rail .bar.done::after { transform: scaleX(1); }

.step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.step.active { display: block; animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.step legend, .step .step-title { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; padding: 0; }
.step .step-sub { color: var(--muted); font-size: 15px; margin-bottom: 28px; }

.step-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Review summary */
.review-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.review-list .row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 15px 20px; font-size: 14.5px; }
.review-list .row + .row { border-top: 1px solid var(--line); }
.review-list .row .k { color: var(--muted); font-weight: 550; }
.review-list .row .v { font-weight: 550; white-space: pre-line; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: 520px; }
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-empty { text-align: center; color: var(--faint); font-size: 14px; margin: auto; }

.msg { max-width: 76%; display: flex; flex-direction: column; animation: rise 0.3s ease both; }
.msg .bubble {
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: break-word;
}
.msg .who { font-size: 12px; color: var(--faint); margin-top: 5px; }

.msg.theirs { align-self: flex-start; }
.msg.theirs .bubble { background: var(--tint); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.theirs .who { margin-left: 4px; }

.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.mine .who { margin-right: 4px; }

.chat-form { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.chat-form .input { flex: 1; }

/* ---------- Inbox (Messages page) ---------- */
.inbox {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  height: calc(100vh - 250px);
  min-height: 480px;
}
.inbox-side { border-right: 1px solid var(--line); overflow-y: auto; }

.thread {
  display: block;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.12s ease;
}
.thread:hover { background: var(--tint); color: var(--ink); }
.thread.active { background: var(--tint); box-shadow: inset 3px 0 0 var(--blue); }
.thread-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.thread-top strong { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-sub { display: block; font-size: 12.5px; font-weight: 600; color: var(--blue-deep); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-snippet { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { display: block; font-size: 11.5px; color: var(--faint); margin-top: 4px; }

.unread {
  background: var(--blue);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge {
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  vertical-align: 1px;
}

.inbox-main { display: flex; flex-direction: column; min-width: 0; }
.inbox-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.inbox-thread-head h2 { margin: 0; font-size: 17px; }
.inbox-main .chat { flex: 1; height: auto; min-height: 0; padding: 14px 22px 18px; }
.inbox-empty { margin: auto; color: var(--faint); font-size: 14.5px; }

/* ---------- Blog ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 30px;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tint-2); color: var(--ink); }
.post-card .post-date { font-size: 12.5px; font-weight: 600; color: var(--faint); letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 12px; }
.post-card h2 { font-size: 20px; margin-bottom: 8px; }
.post-card p { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; }
.post-card .post-more { margin-top: auto; font-size: 14px; font-weight: 650; color: var(--blue); }

.prose-article { font-size: 17px; line-height: 1.75; color: var(--ink); }
.prose-article h2 { font-size: 26px; margin: 1.6em 0 0.5em; }
.prose-article h3 { font-size: 21px; margin: 1.5em 0 0.5em; }
.prose-article p { margin: 0 0 1.2em; }
.prose-article a { text-decoration: underline; text-underline-offset: 3px; }
.prose-article ul, .prose-article ol { margin: 0 0 1.2em; padding-left: 26px; }
.prose-article li { margin-bottom: 0.4em; }
.prose-article blockquote {
  border-left: 3px solid var(--blue);
  background: var(--tint);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 1.2em;
  padding: 14px 22px;
  color: var(--blue-ink);
}
.prose-article pre {
  background: var(--ink);
  color: #e8edf7;
  border-radius: var(--r-sm);
  padding: 18px 22px;
  overflow-x: auto;
  font-size: 14px;
  margin: 0 0 1.2em;
}
.prose-article img { border-radius: var(--r); }

/* Quill editor — match the design system */
#editor { min-height: 280px; font-family: var(--body); font-size: 15px; }
.ql-toolbar.ql-snow { border: 1px solid var(--line); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.ql-container.ql-snow { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }

/* ---------- Modal ---------- */
.modal {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 380px;
  width: calc(100vw - 48px);
  background: #fff;
  color: var(--ink);
}
.modal::backdrop { background: rgba(10, 22, 51, 0.45); }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Auth panels ---------- */
.auth-page { min-height: calc(100vh - 68px); display: flex; align-items: center; padding: 60px 0; }
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
}
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.auth-card .swap { text-align: center; font-size: 14px; color: var(--muted); margin: 22px 0 0; }

/* Onboarding / form pages */
.form-page { max-width: 720px; margin: 0 auto; }

/* Status form (admin) */
.status-form { display: flex; gap: 10px; align-items: center; }
.status-form .select { width: auto; min-width: 190px; }

/* Filter pills */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  transition: all 0.13s ease;
}
.filters a:hover { border-color: var(--blue); color: var(--blue); }
.filters a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Pagination */
.pagination-wrap { margin-top: 28px; }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pager-btn:hover { border-color: var(--blue); color: var(--blue); }
.pager-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.pager-btn.is-current {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  cursor: default;
}
.pager-btn.is-disabled {
  color: var(--faint);
  background: var(--tint);
  border-color: var(--line);
  cursor: default;
}
.pager-gap { padding: 0 4px; color: var(--faint); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .tiles { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-globe { display: none; }

  /* App nav folds into two rows: logo + account on top, links below */
  .app-nav .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 6px 14px;
  }
  .app-nav .user { margin-left: auto; }
  .app-nav .links {
    order: 3;
    flex-basis: 100%;
    margin: 0 -4px;
    padding: 2px 4px;
  }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-side { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .inbox-main .chat { height: 440px; flex: none; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stepper-rail .name { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .grid-3, .grid-4, .tiles { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .hero .lede { font-size: 17px; }
  .hero-cta .aside { display: block; width: 100%; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .site-nav .wrap { height: 62px; }
  .site-nav nav { gap: 10px; }
  .site-nav nav a:not(.btn) { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .app-nav .links a { padding: 7px 10px; font-size: 13.5px; }
  .page { padding: 32px 0 70px; }
  .page-head h1 { font-size: 24px; }
  .card { padding: 22px 20px; }
  .msg { max-width: 90%; }
  .auth-card { padding: 28px 22px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .choice-grid.cols-2 { grid-template-columns: 1fr; }
  .process::before { left: 22px; }
  .process-step { grid-template-columns: 44px 1fr; gap: 16px; }
  .process-step + .process-step { margin-top: 26px; }
  .process-dot { width: 44px; height: 44px; font-size: 16px; }
  .cta-panel { padding: 60px 24px; border-radius: 32px; }
  .review-list .row { grid-template-columns: 1fr; gap: 4px; padding: 13px 16px; }
  .step-actions { gap: 10px; }
  .inbox-thread-head { padding: 14px 16px; }
  .inbox-main .chat { padding: 12px 16px 16px; }
  .chat-form .btn { padding: 12px 18px; }
  .status-form { width: 100%; }
  .status-form .select { flex: 1; min-width: 0; }
}

/* ============================================================
   Repositioning additions — care plans, testimonials, founder
   Reuses existing tokens (--blue, --line, --r-lg, --tint …).
   ============================================================ */

/* Hero CTA microcopy — force onto its own row under the buttons */
.hero-cta .aside { flex-basis: 100%; margin-top: 2px; }

/* ---------- Ongoing care plans ---------- */
.care-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
}

/* Flat pricing — two cards */
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  align-items: start;
  max-width: 760px;
  margin: 0 auto;
}
.price-tag {
  align-self: flex-start;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--tint);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 16px;
}
.price-sub { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.pricing-note {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: 30px auto 0;
  max-width: 560px;
}
.care-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 32px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.care-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tint-2); }
.care-card.is-featured {
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}
.care-badge {
  position: absolute;
  top: -13px;
  left: 32px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  padding: 5px 14px;
}
.care-card h3 { font-size: 21px; margin-bottom: 6px; }
.care-price {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 6px 0 20px;
  line-height: 1;
}
.care-price .amount { font-size: 34px; }
.care-price .per { font-size: 15px; font-weight: 600; color: var(--muted); }
.care-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.care-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
}
.care-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-weight: 800;
}
.care-card .btn { margin-top: auto; }

/* ---------- Case-study outcome line ---------- */
.work-outcome {
  font-size: 13.5px;
  color: var(--ink);
  margin: -8px 0 16px;
  line-height: 1.5;
}

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.testimonial {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 30px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.testimonial blockquote {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.testimonial figcaption { margin-top: auto; font-size: 14px; color: var(--muted); }
.testimonial figcaption strong { color: var(--ink); font-weight: 650; display: block; }

/* Client reviews (below Work) */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.review-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 28px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tint-2); }
.review-stars { display: flex; gap: 2px; margin-bottom: 16px; font-size: 16px; line-height: 1; }
.review-stars span { color: var(--line); }
.review-stars span.is-on { color: #f5a623; }
.review-card blockquote {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}
.review-card figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.review-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.review-role { font-size: 13.5px; color: var(--muted); }
.review-project { font-size: 12.5px; color: var(--blue); font-weight: 600; margin-top: 4px; }

/* ---------- Founder block ---------- */
.founder {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 32px;
  align-items: center;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 36px;
  background: #fff;
}
.founder-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  background: var(--tint);
  border: 1px solid var(--line);
}
.founder-body h3 { font-size: 20px; margin-bottom: 4px; }
.founder-body .founder-role { font-size: 14px; color: var(--blue); font-weight: 600; margin-bottom: 12px; }
.founder-body p { font-size: 15.5px; color: var(--muted); margin: 0; line-height: 1.65; }

@media (max-width: 900px) {
  .care-grid, .testimonials, .pricing-grid, .reviews-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .founder { grid-template-columns: 1fr; text-align: center; padding: 28px 24px; gap: 20px; }
  .founder-photo { margin: 0 auto; }
}

/* ============================================================
   Full-screen board — client (read-only) + admin editor
   ============================================================ */
.btn-danger { color: var(--danger); border-color: var(--line); background: transparent; }
.btn-danger:hover { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.input-sm { padding: 8px 12px; font-size: 14px; }

/* Full-screen shell */
.board-body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.board-topbar {
  flex: 0 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.board-topbar-left, .board-topbar-right { display: flex; align-items: center; gap: 8px; }
.board-topbar-right { margin-left: auto; }
.board-topbar-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38vw;
}
.board-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.board-brand sup { font-size: 10px; color: var(--blue); margin-left: 2px; }
.board-inline-form { margin: 0; display: inline; }

.board-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.board-btn:hover { border-color: var(--blue); color: var(--blue); }
.board-btn-ghost { background: transparent; }
.board-btn-danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.board-btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* Requirements / details slide-down */
.board-req-panel {
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  max-height: 44vh;
  overflow-y: auto;
}
.board-req-panel[hidden] { display: none; }
.board-req-panel > strong { font-family: var(--display); font-size: 15px; display: block; margin-bottom: 6px; }
.board-req-panel > p { color: var(--muted); font-size: 14.5px; white-space: pre-line; margin: 0; max-width: 72ch; }
.board-req-client { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.board-req-panel .field { margin-bottom: 14px; max-width: 560px; }

/* Board scroll area */
.board-main { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.kanban { height: 100%; overflow-x: auto; overflow-y: hidden; padding: 22px; }
.kanban-loading { padding: 40px; }
.kanban-track {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  height: 100%;
  min-height: 0;
  width: max-content;
}

/* Columns — each takes a rotating accent for a lively board */
.board-col {
  flex: 0 0 300px;
  width: 300px;
  max-height: 100%;
  --accent: #3d5a99;
  --accent-soft: #eef2fb;
  background: var(--accent-soft);
  border-radius: 14px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 1px 2px rgba(10, 22, 51, 0.05);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.board-col:nth-child(6n+1) { --accent: #3d5a99; --accent-soft: #eef2fb; }
.board-col:nth-child(6n+2) { --accent: #c07d18; --accent-soft: #fbf3e4; }
.board-col:nth-child(6n+3) { --accent: #1a8f5c; --accent-soft: #e7f6ee; }
.board-col:nth-child(6n+4) { --accent: #7c5cc4; --accent-soft: #f1ecfb; }
.board-col:nth-child(6n+5) { --accent: #cc4f74; --accent-soft: #fbe9ef; }
.board-col:nth-child(6n+6) { --accent: #2b8fa8; --accent-soft: #e5f3f7; }

.board-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.board-col-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-col-name::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}
.board-col-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border-radius: 999px;
  padding: 1px 9px;
}
.board-col-del, .ticket-act {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--faint);
  font-size: 14px;
  line-height: 1;
  padding: 3px;
  border-radius: 6px;
}
.board-col-del:hover, .ticket-act:hover { color: var(--danger); background: var(--danger-bg); }

.board-col-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 20px;
  padding: 2px;
  border-radius: 10px;
  transition: background 0.12s ease;
}
.board-col-body::-webkit-scrollbar { width: 8px; }
.board-col-body::-webkit-scrollbar-thumb { background: #cdd8ea; border-radius: 8px; }
.board-col-body.drop-target { background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 2px var(--accent); }

/* Cards */
.ticket {
  position: relative;
  background: #fff;
  border: 1px solid #eef1f7;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(10, 22, 51, 0.07);
}
[data-admin="1"] .ticket { cursor: grab; }
[data-admin="1"] .ticket:hover { box-shadow: 0 8px 18px -8px rgba(10, 22, 51, 0.22); transform: translateY(-1px); }
.ticket.dragging { opacity: 0.45; }
.ticket-title { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.4; padding-right: 34px; }
.ticket-desc { font-size: 12.5px; color: var(--muted); margin-top: 5px; white-space: pre-line; line-height: 1.5; }
.ticket-actions { position: absolute; top: 8px; right: 8px; display: none; gap: 2px; }
.ticket:hover .ticket-actions { display: flex; }

/* Admin add controls */
.board-add-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.board-add-btn:hover { background: rgba(255, 255, 255, 0.7); color: var(--blue); }
.board-col-new {
  background: transparent;
  border: 1px dashed #c9d4e6;
  border-top: 1px dashed #c9d4e6;
  box-shadow: none;
  justify-content: flex-start;
  min-height: 52px;
}
.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 22, 51, 0.06);
}
.ticket-form[hidden] { display: none; }
.board-add-btn[hidden] { display: none; }
.ticket-form textarea.input { resize: vertical; }
.ticket-form-actions { display: flex; gap: 8px; }

/* Floating, minimizable chat */
.chat-widget { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(27, 51, 111, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(27, 51, 111, 0.55); }
.chat-panel {
  width: 370px;
  max-width: calc(100vw - 44px);
  height: 540px;
  max-height: calc(100dvh - 44px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(10, 22, 51, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
}
.chat-min { border: none; background: none; cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted); padding: 0 4px; }
.chat-min:hover { color: var(--ink); }
.chat-widget .chat { flex: 1; min-height: 0; height: auto; padding: 14px 16px 16px; }
.chat-widget[data-collapsed] .chat-panel { display: none; }
.chat-widget:not([data-collapsed]) .chat-fab { display: none; }

@media (max-width: 600px) {
  .board-topbar-title { max-width: 28vw; }
  .board-btn { padding: 7px 11px; }
  .chat-panel { width: calc(100vw - 24px); }
  .chat-widget { right: 12px; bottom: 12px; }
}
